diff options
| author | s-ol <s+removethis@s-ol.nu> | 2021-05-01 21:53:29 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | cbc15d580baa6c653d83449a0e97ffd8e9624324 (patch) | |
| tree | 98db7259dee71719cd6b3717bb783cebc5c9a41f | |
| parent | use flake.nix instead of shell.nix (diff) | |
| download | alive-cbc15d580baa6c653d83449a0e97ffd8e9624324.tar.gz alive-cbc15d580baa6c653d83449a0e97ffd8e9624324.zip | |
more extensive love documentation
| -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 |
