Glimmr Canvas Animation

version 1/111030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Invocation phrases for motion on simple values

    [Specify movement by points, duration, and timer.]
    To animate (track - an animation track) as a parameterized motion animation targeting (P - a value of kind K valued property) of (targ - an object) and ending at (end pt - a number) at (interv - a number) with a/-- duration of/-- (len - a number) frame/frames, cycling:
        let P1 be P converted to a number;
        now the animation-target of the track is targ;
        if targ has property number P1:
            now the property-storage of the track is P1;
            now the property-name-storage of the track is "";
        if cycling:
            now the track is cycling;
        otherwise:
            now the track is not cycling;
        assign non-block value in property P1 of targ to start-x of the track;
        now the start-y of the track is 0;
        now the delta-x of the track is end pt - start-x of the track;
        now the delta-y of the track is 0;
        now the animation-target of the track is targ;
        if the targ provides the property display status:
            now the display status of the targ is g-active;
        now the cycle-length of the track is len;
        set up track as parameterized motion with duration len;
        animate the track at interv[ ms per frame].
        

    [Specify movement by points, average velocity, and timer.]
    To animate (track - an animation track) as a parameterized motion animation targeting (P - a value of kind K valued property) of (targ - an object) and ending at (end pt - a number) at (interv - a number) with a/-- velocity of/-- (V - a number) --/unit/units, cycling:
        let P1 be P converted to a number;
        now the animation-target of the track is targ;
        if targ has property number P1:
            now the property-storage of the track is P1;
            now the property-name-storage of the track is "";
        if cycling:
            now the track is cycling;
        otherwise:
            now the track is not cycling;
        assign non-block value in property P1 of targ to start-x of the track;
        now the start-y of the track is 0;
        now the delta-x of the track is end pt - start-x of the track;
        now the delta-y of the track is 0;
        let len be ABS (delta-x of the track) / V;
        if len < 1, now len is 1;
        now the animation-target of the track is targ;
        if the targ provides the property display status:
            now the display status of the targ is g-active;
        now the cycle-length of the track is len;
        set up track as parameterized motion with duration len;
        animate the track at interv[ ms per frame].