Glimmr Canvas Animation

version 1/111030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Parameterized motion tracks

    Section - Parameterized motion animation rule

    First animation rule for a parameterized motion animation track (called the track) (this is the default parameterized motion animation rule):
        let cyclic-frame be current-frame of the track - (cycles completed of the track * cycle-length of the track);
        let P be the property-storage of the track;
        let xx be a number;
        let yy be a number;
        if the delta-x of the track is not 0:
            let xx be the easing applied to the cyclic-frame and the cycle-length of the track and the start-x of the track and the delta-x of the track;
            if the property-name-storage of the track is "":
                store non-block value (xx) as property number (P) in the animation-target of the track;
            if the property-name-storage of the track is "origin":
                now entry 1 of the origin of the animation-target of the track is xx;
            if the property-name-storage of the track is "endpoint":
                now entry 1 of the endpoint of the animation-target of the track is xx;
        if the delta-y of the track is not 0:
            if the secondary easing of the track is not the null easing rule:
                let yy be the secondary easing applied to the cyclic-frame and the cycle-length of the track and the start-y of the track and the delta-y of the track;
            otherwise:
                let yy be the easing applied to the cyclic-frame and the cycle-length of the track and the start-y of the track and the delta-y of the track;
            if the property-name-storage of the track is "":
                store non-block value (yy) as property number (P) in the animation-target of the track;
            if the property-name-storage of the track is "origin":
                now entry 2 of the origin of the animation-target of the track is yy;
            if the property-name-storage of the track is "endpoint":
                now entry 2 of the endpoint of the animation-target of the track is yy;
        #if utilizing animation debugging;
        say "[>console][CA]Processed frame [b][current-frame][/b][if track is cycling] (frame [cyclic-frame] of cycle [cycles completed of the track + 1])[end if] of [i][track][/i] as a parameterized motion track targeting the [property-name-storage] of [the animation-target of the track], using the [easing of the track] (t: [cyclic-frame], d: [cycle-length of the track], b: [start-x of the track], c: [delta-x of the track])[if the secondary easing of the track is not the null easing rule] and the [secondary easing of the track] (t: [cyclic-frame], d: [cycle-length of the track], b: [start-y of the track], c: [delta-y of the track])[end if].[<]";
        #end if.