@aninest/extensions / DynamicDuration / dynamicDurationExtension
dynamicDurationExtension()
ts
function dynamicDurationExtension<Animating>(
mask,
interp,
speed, ...
params): Extension<Animating>
Extension to make the animation duration dynamic based on the distance between the start and end points.
Type Parameters
• Animating extends RecursiveAnimatable
<unknown
>
Parameters
• mask: Partial
<Mask
<Animating
>> = {}
• interp: InterpWithDuration
The interpolation function to use.
• speed: number
The speed in units per second.
• ...params: unknown
[]
The additional parameters to pass to the interpolation function (after duration
).
Returns
Extension
<Animating
>