Version 3.18.1
Show:

Easing Class

Module: anim-easing
Parent Module: anim

The easing module provides methods for customizing how an animation behaves during each run.

Methods

backBoth

(
  • t
  • b
  • c
  • d
  • s
)
Number

Backtracks slightly, then reverses direction, overshoots end, then reverses and comes back to end.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

  • s Number

    Overshoot (optional)

Returns:

Number:

The computed value for the current animation frame

backIn

(
  • t
  • b
  • c
  • d
  • s
)
Number

Backtracks slightly, then reverses direction and moves to end.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

  • s Number

    Overshoot (optional)

Returns:

Number:

The computed value for the current animation frame

backOut

(
  • t
  • b
  • c
  • d
  • s
)
Number

Overshoots end, then reverses and comes back to end.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

  • s Number

    Overshoot (optional)

Returns:

Number:

The computed value for the current animation frame

bounceBoth

(
  • t
  • b
  • c
  • d
)
Number

Bounces off start and end.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

bounceIn

(
  • t
  • b
  • c
  • d
)
Number

Bounce off of start.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

bounceOut

(
  • t
  • b
  • c
  • d
)
Number

Bounces off end.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

easeBoth

(
  • t
  • b
  • c
  • d
)
Number

Begins slowly and decelerates towards end. (quadratic)

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

easeBothStrong

(
  • t
  • b
  • c
  • d
)
Number

Begins slowly and decelerates towards end. (quartic)

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

easeIn

(
  • t
  • b
  • c
  • d
)
Number

Begins slowly and accelerates towards end. (quadratic)

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

easeInStrong

(
  • t
  • b
  • c
  • d
)
Number

Begins slowly and accelerates towards end. (quartic)

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

easeNone

(
  • t
  • b
  • c
  • d
)
Number

Uniform speed between points.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

easeOut

(
  • t
  • b
  • c
  • d
)
Number

Begins quickly and decelerates towards end. (quadratic)

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

easeOutStrong

(
  • t
  • b
  • c
  • d
)
Number

Begins quickly and decelerates towards end. (quartic)

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

Returns:

Number:

The computed value for the current animation frame

elasticBoth

(
  • t
  • b
  • c
  • d
  • a
  • p
)
Number

Snap both elastic effect.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

  • a Number

    Amplitude (optional)

  • p Number

    Period (optional)

Returns:

Number:

The computed value for the current animation frame

elasticIn

(
  • t
  • b
  • c
  • d
  • a
  • p
)
Number

Snap in elastic effect.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

  • a Number

    Amplitude (optional)

  • p Number

    Period (optional)

Returns:

Number:

The computed value for the current animation frame

elasticOut

(
  • t
  • b
  • c
  • d
  • a
  • p
)
Number

Snap out elastic effect.

Parameters:

  • t Number

    Time value used to compute current value

  • b Number

    Starting value

  • c Number

    Delta between start and end values

  • d Number

    Total length of animation

  • a Number

    Amplitude (optional)

  • p Number

    Period (optional)

Returns:

Number:

The computed value for the current animation frame