aboutsummaryrefslogtreecommitdiffstats
path: root/alv-lib
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-02-04 00:18:05 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit6b79b6e2c7af377c43747eed933d78684d92ecb4 (patch)
tree3e94da0bfe819711715b35a7bdedcaea903dc2fb /alv-lib
parentadd Op:update_out and use in builtins (diff)
downloadalive-6b79b6e2c7af377c43747eed933d78684d92ecb4.tar.gz
alive-6b79b6e2c7af377c43747eed933d78684d92ecb4.zip
lib: small fixes
Diffstat (limited to 'alv-lib')
-rw-r--r--alv-lib/love.moon4
-rw-r--r--alv-lib/time.moon1
2 files changed, 3 insertions, 2 deletions
diff --git a/alv-lib/love.moon b/alv-lib/love.moon
index e3fa7e4..cb53d1a 100644
--- a/alv-lib/love.moon
+++ b/alv-lib/love.moon
@@ -146,8 +146,8 @@ color = Constant.meta
type: T['love/shape']
tick: =>
- { color, shape } = @unwrap_all!
- { r, g, b, a } = color
+ { col, shape } = @unwrap_all!
+ { r, g, b, a } = col
@out\set ->
love.graphics.setColor r, g, b, a
diff --git a/alv-lib/time.moon b/alv-lib/time.moon
index 6852f9e..e0eecff 100644
--- a/alv-lib/time.moon
+++ b/alv-lib/time.moon
@@ -364,6 +364,7 @@ Creates smooth transitions when `value` changes.
if clock
current = @.out!
delta = value - current
+ return if 1e-15 > math.abs delta
@out\set current + delta * rate
delay = Constant.meta