diff options
-rw-r--r-- | sly/transition.scm | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sly/transition.scm b/sly/transition.scm index f813828..ae18e84 100644 --- a/sly/transition.scm +++ b/sly/transition.scm @@ -152,13 +152,12 @@ transition." (define (value-at t) (interpolator start end (ease t duration))) - (let ((signal (make-signal start))) - (coroutine - (let lp ((t 0)) - (if (< t duration) - (begin - (wait (min step (- duration t))) - (signal-set! signal (value-at t)) - (lp (+ t step))) - (signal-set! signal end)))) - signal))) + (signal-generator + (let lp ((t 0)) + (yield start) + (if (< t duration) + (begin + (wait (min step (- duration t))) + (yield (value-at t)) + (lp (+ t step))) + (yield end)))))) |