From 9224412274e1e1a31a959083bb257a7d6ab2b113 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 19 Aug 2016 20:40:12 -0400 Subject: Add Sly manual. --- manuals/sly/Tweening.html | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 manuals/sly/Tweening.html (limited to 'manuals/sly/Tweening.html') diff --git a/manuals/sly/Tweening.html b/manuals/sly/Tweening.html new file mode 100644 index 0000000..9b0b741 --- /dev/null +++ b/manuals/sly/Tweening.html @@ -0,0 +1,101 @@ + + + + + +Sly: Tweening + + + + + + + + + + + + + + + + + + + + +
+

+Previous: , Up: Tweens   [Contents][Index]

+
+
+ +

4.2.4.2 Tweening

+ +

The tween procedure creates new procedures to be used for +animation. For example, the code below creates a tween procedure that +linearly interpolates (0, 0) to (10, 10) over the course of ten ticks. +

+
+
(define t (tween vlerp ease-linear (vector2 0 0) (vector2 10 0) 10))
+
+(t 5) ;; => (vector2 5 5)
+
+ +
+
Scheme Procedure: tween interpolator ease start end duration
+

Return a procedure that interpolates from start to end in +duration ticks. The value returned for a given time is +determined by applying ease with the time ratio to acquire an +alpha value, and then applying interpolator with +start, end, and alpha. alpha is a rational +number in the range [0, 1]. +

+ + + + + + -- cgit v1.2.3