API Reference / @gtkx/animated / InterpolatorConfig
Type Alias: InterpolatorConfig<Output>
InterpolatorConfig<
Output> =object
Type Parameters
Output
Output = Animatable
Properties
easing?
optionaleasing?:EasingFunction
Custom easing to apply in interpolator.
extrapolate?
optionalextrapolate?:ExtrapolateType
What happens when the spring exceeds its target value. Shortcut to set extrapolateLeft and extrapolateRight.
extendcontinues the interpolation past the target valueclamplimits the interpolation at the max valueidentitysets the value to the interpolation input as soon as it hits the boundary
Default
'extend'extrapolateLeft?
optionalextrapolateLeft?:ExtrapolateType
What happens when the spring goes below its target value.
extendcontinues the interpolation past the target valueclamplimits the interpolation at the max valueidentitysets the value to the interpolation input as soon as it hits the boundary
Default
'extend'extrapolateRight?
optionalextrapolateRight?:ExtrapolateType
What happens when the spring exceeds its target value.
extendcontinues the interpolation past the target valueclamplimits the interpolation at the max valueidentitysets the value to the interpolation input as soon as it hits the boundary
Default
'extend'map?
optionalmap?: (value) =>number
Transformation to apply to the value before interpolation.
Parameters
value
number
Returns
number
output
output: readonly
Constrain<Output,Animatable>[]
Output values from the interpolation function. Should match the length of the range array.
range?
optionalrange?: readonlynumber[]
Input ranges mapping the interpolation to the output values.
Example
range: [0, 0.5, 1], output: ['yellow', 'orange', 'red']Default
[0,1]