# HG changeset patch # User Steve Losh # Date 1467292629 0 # Node ID 82a47826346dc868f2c9bc80703763f63dd129bc # Parent 783609c42ef0955634097267531ee06541275574 Docstring diff -r 783609c42ef0 -r 82a47826346d src/tween.lisp --- 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