Easing module implements common easing functions. This module is used by Animated.timing() to convey physically believable motion in animations.
You can find a visualization of some common easing functions at https://easings.net/
Predefined animations
TheEasing module provides several predefined animations through the following methods:
backprovides a basic animation where the object goes slightly back before moving forwardbounceprovides a bouncing animationeaseprovides a basic inertial animationelasticprovides a basic spring interaction
Standard functions
Three standard easing functions are provided: Thepoly function can be used to implement quartic, quintic, and other higher power functions.
Additional functions
Additional mathematical functions are provided by the following methods:bezierprovides a cubic bezier curvecircleprovides a circular functionsinprovides a sinusoidal functionexpprovides an exponential function
inruns an easing function forwardsinOutmakes any easing function symmetricaloutruns an easing function backwards
Example
Reference
Methods
step0()
n.
step1()
n is greater than or equal to 1.
linear()
f(t) = t. Position correlates to elapsed time one to one.
https://cubic-bezier.com/#0,0,1,1
ease()
quad()
f(t) = t * t. Position equals the square of elapsed time.
https://easings.net/#easeInQuad
cubic()
f(t) = t * t * t. Position equals the cube of elapsed time.
https://easings.net/#easeInCubic
poly()
sin()
circle()
exp()
elastic()
back()
Animated.parallel() to create a basic effect where the object animates back slightly as the animation starts.
bounce()
bezier()
transition-timing-function.
A useful tool to visualize cubic bezier curves can be found at https://cubic-bezier.com/

