82a47826346d

Docstring
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 30 Jun 2016 13:17:09 +0000
parents 783609c42ef0
children a5c7bfeb34c3
branches/tags (none)
files src/tween.lisp

Changes

--- a/src/tween.lisp	Thu Jun 30 13:01:54 2016 +0000
+++ b/src/tween.lisp	Thu Jun 30 13:17:09 2016 +0000
@@ -39,10 +39,21 @@
 
 (defmacro tween-places!
     ((tweening-function duration &key callback-progress callback-finished)
-     &rest places)
+     &rest places-and-targets)
+  "Tween `places-and-targets` over `duration` seconds with `tweening-function`
+
+      (tween-places! (#'tween-quadratic-in 1.5)
+        (vec-x location) (find-target :x)
+        (vec-y location) (find-target :y)
+        (color-alpha (slot-value shape 'color)) 0.0
+        ;...
+        )
+
+  "
   (once-only (duration tweening-function)
     `(progn
-      ,@(loop :for (place target . remaining) :on places :by #'cddr :collect
+      ,@(loop :for (place target . remaining) :on places-and-targets :by #'cddr
+              :collect
               `(tween-place! ,place ,target ,duration ,tweening-function
                 ,@(when (null remaining)
                     `(:callback-progress ,callback-progress