< Zurück | Inhalt | Weiter >

Animation parameters

The Alpha class that is used to control the PositionInterpolator can be parameterized using nine variables (figure 3.2) to produce a sophisticated timing function.


Figure 3.2 The phases of the Alpha class: trigger time (1), phase delay (2), increasing alpha (3), increasing alpha ramp (4), at one (5), decreasing alpha (6), decreasing alpha ramp (7), at zero (8), loop count (9)

I’ll discuss the Alpha class in depth in chapter 12 (Interpolators), but, for now, try changing some of the

Alpha parameters and noting the effects.

The axis that the PositionInterpolator is moving along can also be easily modified. For example try inserting the line:

xAxis.rotY( 1.2 );

This will move the Sphere along a trajectory more perpendicular to the screen. You can experiment with calls to rotX and rotZ as well. Remember that rotations are described using radians, not degrees.