Glimmr Canvas Animation

version 1/111030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Section - Invocation phrase for parameterized zooming
    To animate (track - an animation track) as a parameterized zooming animation targeting (P - a value of kind K valued property) of (targ - an object) and ending at (zto - a real number) at (interv - a number) with a/-- duration of/-- (len - a number) frame/frames, cycling:
        let P1 be P converted to a number;
        if cycling:
            now the track is cycling;
            now the track is not cycling;
        now the animation-target of the track is targ;
        if targ has property number P1:
            now the property-storage of the track is P1;
        if the targ provides the property display status:
            now the display status of the targ is g-active;
        let zfrom be the value stored in property number P1 of targ;
        now the start-x of the track is (zfrom ** 10000) as an integer;
        now the delta-x of the track is ( (zto -- zfrom) ** 10000) as an integer;
        [say "start-x: [start-x of the track]; delta-x: [delta-x of the track].";]
        now the cycle-length of the track is len;
        set up track as parameterized zooming with duration len;
        animate the track at interv[ ms per frame].

    To decide what real number is the value stored in property number (P - a number) of (O - an object): (- {O}.{P} -).