@aninest/extensions / DynamicDuration / setRecursiveDynamicDuration
setRecursiveDynamicDuration()
ts
function setRecursiveDynamicDuration<Animating>(
anim,
mask,
interp,
speed, ...
params): unmount
Sets the duration of an animation to be dynamic based on the distance between the start and end points.
Type Parameters
• Animating extends RecursiveAnimatable
<unknown
>
Parameters
• anim: Animation
<Animating
>
• 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
unmount