aninest-root / Animatable / getLocalInterpingTo
getLocalInterpingTo()
ts
function getLocalInterpingTo<Animating>(anim, into): SlicedAnimatable<Animating>;
Defined in: Animate/Animatable.ts:589
Gets the local target state that the animation is currently headed to. If the animation is not headed to any state, it will return the current state. This only returns the local state of the animation, meaning only the numbers in the topmost level of the animation.
Type Parameters
Animating
Animating
extends Partial
<SlicedAnimatable
<Animatable
<unknown
>>>
Parameters
anim
Animation
<Animating
>
The animation object
into
SlicedAnimatable
<Animating
> = ...
Returns
SlicedAnimatable
<Animating
>
The local target state of the animation
Example
ts
const anim = createAnimation({a: newVec(0, 0), b: 0, c: 0}, getLinearInterp(1))
getLocalInterpingTo(anim) // {b: 0, c: 0}
modifyTo(anim, {a: newVec(1, 1), b: 1})
getLocalInterpingTo(anim) // {b: 1, c: 0}