git.s-ol.nu alive / 3d44ddd
update examples s-ol 1 year, 6 months ago
7 changed file(s) with 15 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
00 luarocks.lock
11 /*.alv
22 !/hello.alv
3 !/examples/*
3434
3535 ## starting the copilot
3636
37 $ bin/alv <session.alv>
37 $ bin/alv examples/hello.alv
3838
3939 For more information see the [getting started guide][guide].
4040
4343 To use the 'love' module for relatime 2d graphics, the copilot needs to be
4444 started using [love2d][love] (0.11+):
4545
46 $ love bin/alv-love <session.alv>
46 $ bin/alv-love examples/love2d.alv
4747
4848 ## running the tests
4949
0 package.path = "./?/init.lua;" .. package.path
01 require('moonscript')
12 local Copilot = require('alv.copilot.love').LoveCopilot
23 Copilot(arg):run()
11 LOVE=$(which love11 love 2>/dev/null | head -n 1)
22 BASE=$(dirname "$0")
33 echo "base '$BASE'"
4 exec "$LOVE" "$BASE/../alv/copilot/love" "$@"
4 cd "$BASE/.."
5 exec "$LOVE" "alv/copilot/love" "$@"
0 ([1]import* time)
1 ([2]print ([3]every 0.5 "hello world!"))
0 ([1]import* love math time)
1 ([2]draw ([3]->>
2 ([8]rectangle 'fill' 100 100)
3 ([14]color 1 0 0)
4 ([15]scale ([16]switch ([17]mouse-down? 1) 0.5 1))
5 ([5]rotate ([9]ramp 2 tau))
6 ([4]translate ([10]mouse-pos))))
+0
-2
hello.alv less more
0 ([1]import* time)
1 ([2]print ([3]every 0.5 "hello world!"))