Glimmr Canvas Animation

version 1/111030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Parametrized reel animation rule

    First animation rule for a parameterized reel animation track (called the track) (this is the default parameterized reel animation rule):
        let max-frames be the reel-length appropriate to the track and the property-name-storage of the track;
        let N be a number;
        let cyclic-frame be current-frame of the track - (cycles completed of the track * cycle-length of the track);
        if the track is animation-randomized:
            let N be a random number between 1 and max-frames;
        otherwise if the cycle-length of the track is not max-frames:
            let N be the easing of the track applied to the cyclic-frame and the cycle-length of the track and 1 and max-frames;
        otherwise:
            let N be cyclic-frame;
        if N is greater than max-frames:
            now N is max-frames;
        let T be the property-name-storage of the track;
        if T is "image-ID" or T is "background image":
            store non-block value at entry N of the image-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        if T is "tint" or T is "background tint":
            store non-block value at entry N of the color-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        if T is "scaling factor" or T is "x-scaling factor" or T is "y-scaling factor" or T is "arbitrary scaling factor":
            store non-block value at entry N of the scaling-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        if T is "cursor" or T is "line-weight" or T is "bit-size":
            store non-block value at entry N of the numerical-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        if T is "origin" or T is "endpoint":
            store block value at entry N of the coordinates-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        if T is "text-string" or T is "linked replacement-command":
            store block value at entry N of the indexed-text-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        if T is "associated font" or T is "associated canvas" or T is "associated tileset":
            store non-block value at entry N of the associated-objects-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        if T is "bitmap-array" or T is "tile-array":
            store block value at entry N of the numerical-array-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        if T is "figure-array":
            store block value at entry N of the image-array-reel of the track as property number (property-storage of the track) in the animation-target of the track;
        #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 reel track targeting the [T] of [the animation-target of the track]. Entry [N] of the reel displayed[if the cycle-length of the track is not max-frames], selected 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])[end if].[<]";
        #end if.