aboutsummaryrefslogtreecommitdiffstats
path: root/examples/love.alv
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2025-03-18 11:47:22 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-18 12:06:18 +0000
commitb6cbc69461dc054019f50f8971704f6ef9de63ab (patch)
treed2b8942b780f668ccbe57b52dd8d65f61613e935 /examples/love.alv
parentbuiltins: switch takes single array as value (diff)
downloadalive-wip.tar.gz
alive-wip.zip
language: [array] and {struct} literalswip
Diffstat (limited to 'examples/love.alv')
-rw-r--r--examples/love.alv14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/love.alv b/examples/love.alv
index 71a8287..113ea2d 100644
--- a/examples/love.alv
+++ b/examples/love.alv
@@ -3,17 +3,17 @@
The size changes when the left mouse button is held, and the color
changes when space is pressed.
)
-([1]import* love math time array-)
+([1]import* love math time array)
([20]def
#(cycle colors when space is pressed)
fill-color ([21]switch ([22]key-presses "space")
- ([23]array 0.3 0 0.9)
- ([24]array 0 0.9 0.3)
- ([27]array 0.9 0.3 0)
- ([28]array 0.3 0.9 0)
- ([30]array 0 0.3 0.9)
- ([31]array 0.9 0 0.3))
+ [0.3 0 0.9]
+ [0 0.9 0.3]
+ [0.9 0.3 0]
+ [0.3 0.9 0]
+ [0 0.3 0.9]
+ [0.9 0 0.3])
#(smooth out rgb channels individually)
smooth-color ([36]map fill-color