Previous Next


                                          800
CHAPTER 9                                                              Multimedia Features



The descriptions of the animation styles (see Table 9.37) use the following vari-
ables to represent application time or keyframe settings specified in the 3D art-
work.

• t is a point on the animation time line. This value is used in conjunction with
  the keyframe animation data to determine the state of the 3D artwork.
• [r0, r1] is the keyframe animation time line.
• ta is the current time of the viewer application.
• t0 is the time when the viewer application starts the animation.
• p is the time it takes to play the keyframe animation through one cycle. In the
  case of the Linear animation style, one cycle plays the animation through once
  from beginning to end. In the case of the Oscillating animation style, one cycle
  plays the animation from beginning to end and then from end to beginning.
• m is the positive multiplier specified by the TM entry in the animation style dic-
  tionary.

                           TABLE 9.37 Animation styles

None                    Keyframe animations should not be driven directly by the viewer applica-
                        tion. This value is used by documents that are intended to drive anima-
                        tions through an alternate means, such as JavaScript.
                        The remaining entries in the animation style dictionary are ignored.

Linear                  Keyframe animations are driven linearly from beginning to end. This ani-
                        mation style results in a repetitive playthrough of the animation, such as in
                        a walking motion.

                        t = (m(ta - t0) + r0) % (r1 - r0)
                        p = (r1 - r0) / m
                        The “%” symbol indicates the modulus operator.

Oscillating             Keyframe animations should oscillate along their time range. This anima-
                        tion style results in a back-and-forth playing of the animation, such as ex-
                        ploding or collapsing parts.

                        t = (0.5)(r1 - r0)(1 - cos(m(ta - t0))) + r0
                        p = 2 * pi / m

Previous Next