Applies an easing function to a given progress value.
This function calculates eased progress using a specified easing function, bezier curve, or custom easing function.
The current progress value, typically between 0 and 1.
The easing method to apply. It can be:
EaseInBounce
[0.25, 0.1, 0.25, 1]
(value) => Math.sin(Math.PI * 0.5 * value)
easing(0.35, EaseInBounce);// => 0.167 (eased progress using EaseInBounce)easing(0.35, [0.25, 0.1, 0.25, 1]);// => 0.604 (eased progress using a bezier curve)easing(0.35, (value) => Math.sin(Math.PI * 0.5 * value));// => 0.522 (eased progress using a custom easing function) Copy
easing(0.35, EaseInBounce);// => 0.167 (eased progress using EaseInBounce)easing(0.35, [0.25, 0.1, 0.25, 1]);// => 0.604 (eased progress using a bezier curve)easing(0.35, (value) => Math.sin(Math.PI * 0.5 * value));// => 0.522 (eased progress using a custom easing function)
Calculate easing value
Optional
Applies an easing function to a given progress value.
This function calculates eased progress using a specified easing function, bezier curve, or custom easing function.
Param: progress
The current progress value, typically between 0 and 1.
Param: easingType
The easing method to apply. It can be:
EaseInBounce
).[0.25, 0.1, 0.25, 1]
).(value) => Math.sin(Math.PI * 0.5 * value)
).Returns
Example