From 08aba8a028f16bb02a09c3762382efeda336da25 Mon Sep 17 00:00:00 2001 From: Bladymir Tellez Date: Fri, 21 Aug 2020 08:51:54 -0500 Subject: [PATCH] Fix on-animate Example --- examples/events/on-animate.lisp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/events/on-animate.lisp b/examples/events/on-animate.lisp index 276fa84..539f1a0 100644 --- a/examples/events/on-animate.lisp +++ b/examples/events/on-animate.lisp @@ -1,6 +1,7 @@ ; this demo shows how to use the animate event to animate lines into a sine wave. +(def frame (get-frame)) ; -(def seg-count 50) +(def seg-count 100) ; (def seg-width (div frame:w seg-count)) @@ -22,7 +23,7 @@ (mul (sub i 1) seg-width)) (def y - (elevation i)) + (elevation i)) (stroke (line x (elevation @@ -36,6 +37,7 @@ (defn redraw () ( - (clear) - (times seg-count draw-dash))) -(on "animate" redraw) \ No newline at end of file + (clear) + (each (range 0 seg-count) draw-dash))) +; +(on "animate" redraw)