From 5c7d2f186834bf6f4659a7af315c06623805a7a5 Mon Sep 17 00:00:00 2001 From: Boutade Date: Fri, 4 Oct 2019 13:12:32 -0500 Subject: documenting forms --- tweening.lisp | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'tweening.lisp') diff --git a/tweening.lisp b/tweening.lisp index 12ddc5e..cc6adb1 100644 --- a/tweening.lisp +++ b/tweening.lisp @@ -8,6 +8,13 @@ (defvar *start-time*) (defmacro sequencing ((&key loop-mode start starting with-target targeting target) &body forms) + "START and STARTING are synonym keywords, and are used to specify as tart time. + + WITH-TARGET, TARGETING, and TARGET are synonym keywords, used to specify a + default tween target for all tweens made within the body of this form. + + LOOP-MODE is supplied to the LOOP-MODE slot on the TWEEN-SEQ class that this + form returns." (let ((this-seq (gensym)) (dyn-vars (append (when (or with-target target targeting) `((*target* ,(or with-target target targeting)))) @@ -20,10 +27,16 @@ (defun pausing (&key for duration start) + "A light wrapper around PAUSE. Is aware of default parameters that may have + been set in an enclosing form." (pause (or for duration (when-bound *duration*) 0) (or start (when-bound *start-time*) 0))) (defmacro grouping ((&key duration for with-duration) &body forms) + "Returns a TWEEN-GROUP instance. + + DURATION, FOR, and WITH-DURATION are all synonym keywords, used to specify a default + duration for any tweens define din this body, where applicable." (let ((dyn-vars (append (when (or duration for with-duration) `((*duration* ,(or duration for with-duration))))))) `(let ,dyn-vars @@ -45,7 +58,32 @@ ((:sine-in-out :sinusoidally-in-out :sinusoidal-in-out) #'sinusoidal-in-out) ((:sine-out :sinusoidal-out :sinusoidally-out) #'sinusoidal-out))) -(defun animating (ease &key the modifying of to for start starting) +(defun animating (ease &key the modifying of to for start starting) + "A wrapper around ANIMATE that is aware of any default values defined in the + the most recently enclosing form. + + EASE is either an easing function, or a keyword that indicates an easing + function. The valid keywords are :BOUNCE-OUT :BOUNCING-OUT :CUBING-IN + :CUBICALLY-IN :CUBIC-IN :CUBING-IN-OUT :CUBICALLY-IN-OUT :CUBIC-IN-OUT + :CUBING-OUT :CUBICALLY-OUT :CUBIC-OUT :ELASTIC-OUT :ELASTICALLY-OUT + :LINEAR :LINEARLY :QUADING-IN :QUAD-IN :QUADRATICALLY-IN :QUADING-IN-OUT + :QUAD-IN-OUT :QUADRATICALLY-IN-OUT :QUADING-OUT :QUAD-OUT :QUADRATICALLY-OUT + :SINE-IN :SINUSOIDAL-IN :SINUSOIDALLY-IN :SINE-IN-OUT :SINUSOIDALLY-IN-OUT + :SINUSOIDAL-IN-OUT :SINE-OUT :SINUSOIDAL-OUT :SINUSOIDALLY-OUT + + THE and MODIFYING are synonym keywords. Either one specifies the ACCESSOR to + use for the tween. + + OF becomes the value of the TARGET slot of this TWEEN. If OF is NIL, + then any default target value already set in an enclosing form is used. + + TO becomes the value of the END-VAL slot this TWEEN. + + FOR becomes the value of the DURATION slot of this TWEEN, superseding any + default value set in the enclosing form. + + START and STARTING are synonym keywords, specifiying a START-TIME. + " (animate (or of (when-bound *target*)) (or the modifying) to -- cgit v1.2.3