Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Now that you’ve seen how to use animation timers with time-warp functions to manipulate the flow of time through your animations, let’s look at some classic examples of motion tweening with an application, shown in Figure 7.8, that lets you apply those time-warp functions to the movement of a ball.
Figure 7.8. Various motion tweening algorithms
The following time-warp functions are supported by the application:
• Linear: Move at constant velocity
• Ease In: Start slowly, gradually accelerate
• Ease Out: Start quickly, gradually decelerate
• Ease In/Out: Start slowly; accelerate; decelerate
• Elastic: Oscillate about a point
• Bounce: Bounce off a point
If you select a function and click one of the arrows, the application animates the ball with the selected function. Example 7.8 illustrates how the application moves the ball.