Glimmr Canvas Animation

version 1/111030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Invocation phrases for flicker preset
    [Flicker-animating a canvas and flicker-animating a window are nearly, but not quite, the same thing. Whatever canvas is shown in a targeted window will blink on and off. When a canvas is targeted, though, that canvas will be toggled in any and all windows in which it is currently displayed.]

    [NOTE: If the canvas is not being displayed in a window when the animation is invoked, it will be necessary to identify it specifically before invoking the animation.]

    To animate (track - an animation track) as a flicker animation targeting (targ - an object) at (interv - a number) with a/-- duration of/-- (len - a number) frame/frames, randomized and/or cycling:
        if targ is a graphics g-window:
            now the target-canvas of the track is the associated canvas of targ;
        now the animation-target of the track is targ;
        if randomized:
            now the track is animation-randomized;
        otherwise:
            now the track is not animation-randomized;
        if cycling:
            now the track is cycling;
        otherwise:
            now the track is not cycling;
        set up track as flicker with duration len;
        now the cycle-length of the track is len;
        animate the track at interv[ ms per frame].

    To animate (track - an animation track) as a flicker animation targeting (targ - an object) at (interv - a number), randomized and/or cycling:
        set up track as flicker;
        if targ is a graphics g-window:
            now the target-canvas of the track is the associated canvas of targ;
        now the animation-target of the track is targ;
        if randomized:
            now the track is animation-randomized;
        otherwise:
            now the track is not animation-randomized;
        now the track is cycling;[Notice that, with no duration specified, the animation is always a cycling one--otherwise, we'd have only a single frame of flicker]
        now the cycle-length of the track is 1;
        animate the track at interv[ ms per frame].