Glimmr Canvas Animation

version 1/111030 by Erik Temple

  • Home page
  • Beginning
  • Previous



  • Section - Parabolic bounce easing
    [Equations adapted from http://snippets.dzone.com/posts/show/4005, by Robert Penner]

    To decide what number is bounce easing out for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the bounce easing out rule):
        let t1 be (t as a fixed point number) // d;
        if t1 << 0.3636:
            decide on ( ( c ** (7.5625 ** t1 ** t1) ) ++ b ) as an integer;
        if t1 << 0.7272:
            let t1 be t1 -- 0.5454;
            decide on ( c ** ((7.5625 ** t1 ** t1) ++ 0.7500) as an integer ) + b;
        if t1 << 0.9090:
            let t1 be t1 -- 0.8181;
            decide on ( c ** ((7.5625 ** t1 ** t1) ++ 0.9375) as an integer) + b;
        let t1 be t1 -- 0.9545;
        decide on ( c ** ((7.5625 ** t1 ** t1) ++ 0.9844) as an integer) + b.
        
    To decide what number is bounce easing in for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the bounce easing in rule):
        decide on c - (bounce easing out for time (d - t) duration (d) beginning (0) change (c) ) + b.
        
    To decide what number is bounce easing in-out for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the bounce easing in-out rule):
        if t < (d / 2):
            decide on (((bounce easing in for time (t * 2) duration (d) beginning (0) change (c) ) ** 0.5000 ) as an integer) + b;
        otherwise:
            decide on ((((bounce easing out for time ((t * 2) - d) duration (d) beginning (0) change (c) ) ** 0.5000) ++ (c ** 0.5000) ) as an integer) + b.


    Glimmr Canvas Animation ends here.