module implements common easing functions. This module is used by Animated.timing()
to convey physically believable motion in animations.
Easing module provides several predefined animations through the following methods:
provides a basic animation where the object goes slightly back before moving forward
provides a bouncing animation
provides a basic inertial animation
provides a basic spring interaction
Three standard easing functions are provided:
function can be used to implement quartic, quintic, and other higher power functions.
Additional mathematical functions are provided by the following methods:
provides a cubic bezier curve
provides a circular function
provides a sinusoidal function
provides an exponential function
The following helpers are used to modify other easing functions.
runs an easing function forwards
makes any easing function symmetrical
runs an easing function backwards
A stepping function, returns 1 for any positive value of
A stepping function, returns 1 if
n is greater than or equal to 1.
A linear function,
f(t) = t. Position correlates to elapsed time one to one.
A basic inertial interaction, similar to an object slowly accelerating to speed.
A quadratic function,
f(t) = t * t. Position equals the square of elapsed time.
A cubic function,
f(t) = t * t * t. Position equals the cube of elapsed time.
A power function. Position is equal to the Nth power of elapsed time.
A sinusoidal function.
A circular function.
An exponential function.
A basic elastic interaction, similar to a spring oscillating back and forth.
Default bounciness is 1, which overshoots a little bit once. 0 bounciness doesn't overshoot at all, and bounciness of N > 1 will overshoot about N times.
Animated.parallel() to create a basic effect where the object animates back slightly as the animation starts.
Provides a basic bouncing effect.
static bezier(x1, y1, x2, y2)
Provides a cubic bezier curve, equivalent to CSS Transitions'
static in easing;
Runs an easing function forwards.
Runs an easing function backwards.
Makes any easing function symmetrical. The easing function will run forwards for half of the duration, then backwards for the rest of the duration.