Glimmr Canvas Animation
version 1/111030 by Erik Temple
Section - Animation handlers
To cycle (track - an animation track):
now track is cycling.
To stop cycling (track - an animation track):
now track is not cycling.
To randomize (track - an animation track):
now track is animation-randomized.
To remove randomization from (track - an animation track):
now track is not animation-randomized.
[The following "fit" rule is intended only for reel and parameterized reel tracks; it allows us to change the length of a reel sequence to a specified number of frames. The animation rule will use the easing of the track to extend or contract the length of the animation using the frames in the original reel. For example, if our original image reel was specified as a list with four entries, and we then fit the sequence to 12 frames using the linear easing rule, each of the four images in the original would be displayed for approximately 3 frames. However, note that, due to rounding errors, this will not always work well, particularly when the original reel sequence specified is short.]
To fit (track - an animation track) sequence into/to (N - a number) frame/frames:
if the track is reel or the track is parameterized reel:
now the cycle-length of the track is N;
now the animation-length of the track is N;
#if utilizing animation debugging;
say "[>console][CA]Track [i][track][/i] was manually fit to a sequence of [N] frames.[<]";