diff options
| -rw-r--r-- | alv-lib/love.moon | 29 | ||||
| -rwxr-xr-x | docs/gen/module | 2 |
2 files changed, 29 insertions, 2 deletions
diff --git a/alv-lib/love.moon b/alv-lib/love.moon index 1523011..e000d43 100644 --- a/alv-lib/love.moon +++ b/alv-lib/love.moon @@ -105,7 +105,34 @@ rotate = Constant.meta Constant.meta meta: name: 'love' - summary: "LÖVE visuals." + summary: "LÖVE graphics." + description: " +This module implements basic graphics using the [love2d game engine][love]. + +#### running + +In order to use this module, the copilot has to be started in a specific way: + + $ love bin/alv-love <session.alv> + +#### usage + +The [love/draw][] ops can be used to draw one or more `love/shape`s in a fixed +stacking order. `love/shape`s can be created using [love/rectangle][] etc, and +positioned and styled using the modifier ops like [love/translate][], +[love/color][] and so on. All modifier ops take the shape as the last input and +output a modified shape, and can be used comfortably with the thread-last +macro [->>][]: + + (import* love math) + (draw (->> + (rectangle 'fill' 100 100) + (color 1 0 0) + (rotate (/ pi 4)) + (translate 150 150))) + + +[love]: https://love2d.org" value: :draw diff --git a/docs/gen/module b/docs/gen/module index 450bd61..e6f4e89 100755 --- a/docs/gen/module +++ b/docs/gen/module @@ -30,7 +30,7 @@ get_description = (module) -> buf = p m.summary if m.description - buf ..= (compile autoref m.description).body + buf ..= (compile autoref(m.description), 'nopants').body buf |
