Skip to content

aninest-root / module:Interp

module:Interp

Several interpolation function constructors.

Type Aliases

Type AliasDescription
InterpInterpolation function. At time 0 it should return either 0 or null (for NO_INTERP)

Functions

FunctionDescription
getCubicBezierReturns a cubic bezier interpolation function.
getLinearInterpReturns a linear interpolation function.
getProgressGets the linear progress of an animation based on time and duration, clamped between 0 and 1.
getSlerpReturns a smooth interpolation function based on the sine function.
NO_INTERPA constant interpolation function that makes all animations instantaneous, meaning they will transition between states without needing to call updateAnimation.