How to change this attenuation function to bounce less?

I am trying to change the Flash CS3 function that comes with the function fl.motion.easing.bounceto reduce the resulting animation result. I appreciate that the “bounce less” is a bit vague, but I would appreciate any help in understanding the function.

Thanks.

 /**
 *  @param t Specifies the current time, between 0 and duration inclusive.
 *
 *  @param b Specifies the initial value of the animation property.
 *
 *  @param c Specifies the total change in the animation property.
 *
 *  @param d Specifies the duration of the motion.
 *
 *  @return The value of the interpolated property at the specified time.     
 */  
public static function easeOut(t:Number, b:Number,
                               c:Number, d:Number):Number
{
    if ((t /= d) < (1 / 2.75))
        return c * (7.5625 * t * t) + b;

    else if (t < (2 / 2.75))
        return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b;

    else if (t < (2.5 / 2.75))
        return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b;

    else
        return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b;
}
+3
source share
3 answers

In principle, the function returns the interpolated value for the new position depending on 4 factors: the current animation time, the initial value of the animated property, the total animation change, and the total animation duration.

: - 36% (1/2,75) , ; 36% 72%, ; .

, , .

7,5625 ( , ), .


7.5625 Math.pow(2.75, 2);, .

+1

, , , Macromedia Flash MX. , , , . , , , .

0

, 1,4/2,7, 1,4 ~ 2,1, 0,7, 0,35,0,35 * 0,35 = 0,1225, 1-0.1225 = 0.8775, , , : .

    t /= d;
    if (t < 1.4 / 2.75) {
        return 3.858419 * t * t;
    }
    else if (t < 2.1 / 2.75) {
        t -= 1.75f / 2.75;
        return 7.5625 * t * t + 0.8775f;
    }
    else if (t < 2.5 / 2.75) {
        t -= 2.3f / 2.75;
        return 7.5625 * t * t + 0.96f;
    }
    t -= 2.625f / 2.75;
    return 7.5625 * t * t + 0.984375f;
0

Source: https://habr.com/ru/post/1706274/


All Articles