Transitions are the mathematical algorithms inside the Spry Effects library that are used to compute the path between a starting value and the end value of an effect.
A transition function has a different effect on each effect's smoothness and perception. An effect may look nice using a certain transition while using the same algorithm with another effect may have a different perception. For instance, a bouncing transition is good for moving panels, but might not be right for changing colors.
To move from the beginning to the end, the simplest and shortest path is a linear transition. Transitions are time-dependent functions. This means that a transition always takes the same amount of time. Therefore, a transition is faster if it has to go farther, growing for instance.
Transition functions return the current position of the value at any given time between the starting and the ending values.
All the effects in the Spry framework are designed to receive transition functions as parameters. Spry includes eight transition functions:
Spry.linearTransition
Spry.sinusoidalTransition
Spry.squareTransition
Spry.squarerootTransition
Spry.fifthTransition
Spry.circleTransition
Spry.pulsateTransition
Spry.growSpecificTransition
The mathematical transition algorithms are difficult to describe verbally. Consult the Transitions samples page to see how these transitions work with Spry effects. The graph on the samples page gives a visual representation of the transition.