Glimmr Canvas Animation
version 1/111030 by Erik Temple
Section: Implementation details
Every easing equation utilizes four parameters, conventionally known as "t", "d", "b", and "c":
t - time, the current frame of the animation.
d - duration, the length in frames of the animation.
b - initial value of the property being animated; that is, the value at a "t" of 0.
c - change, the difference between the ending value of the property being animated and the initial value (i.e., "b").
The values for "t" and "d" are calculated as needed (generally equivalent to the current-frame and the animation-length properties of the track), but the "b" and "c" are are initialized when the "animate..." phrase is invoked, and are stored in the following properties of the animation track itself:
start-x ("b") - The initial value or x-coordinate of the object being animated. In the case of a zooming animation, this number is an integer representation of the scaling factor (the latter multiplied by 10,000).
start-y ("b") - In the case of a motion animation or a zooming animation when we are scaling on both axes independently, we may also store the initial value or y-coordinate of the object being animated, for use in the secondary easing equation.
delta-x ("c") - The difference between the ending value that we provide in the "animate" phrase and the starting value stored in start-x (i.e., the "b" parameter).
delta-y ("c") - If we are using a secondary easing equation, the difference between the ending value that we provide in the "animate" phrase and the starting value stored in start-y (i.e., the "b" parameter).