Glimmr Canvas Animation

version 1/111030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter: Animation track presets

    Each animation track will trigger a different rule from the "animation" rulebook, depending on the preset that is associated with it. For example, the "zooming" preset triggers the "default zooming animation rule", which will, for each frame of the animation, set the scaling factor of the target element to an appropriate value.

    The specific parameters available for each track preset are laid out in the sections below, but the basic form for the invocation of an animation track is this:

        animate <animation track> as a <preset> animation targeting the <target> ... at <interval> with a duration of <length> frames, <options>

    The items in angle brackets are present in nearly all of the commands; here are quick explanations for each of them:

        preset - this is the type of the animation, e.g. motion, reel, zooming, etc.

        target - this is the object that will be affected by the animation. Usually, this will be a graphic element, but it might also be the canvas itself, or the window framing the canvas (see the individual presets below for more information).

        interval - this is the time between frames. It can be expressed either by specifying it directly, e.g. "200 milliseconds per frame", or by providing the frames per second we desire, e.g. "12 frames per second" or just "12 fps".

        length - the number of frames in the animation. Note that this term is optional for some types of preset. If we don't specify a length for these presets, the animation will be automatically set to the most likely .

        options - we can add one or more options, depending on the type of preset; see the next section.

    As you read the following sections, you may also want to refer to the documentation for Glimmr Canvas-Based Drawing for a refresher on graphic element types and their properties.