aninest root / Animatable / getLocalInterpingTo
getLocalInterpingTo()
ts
function getLocalInterpingTo<Animating>(anim, into): LocalAnimatable<Animating>
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 extends Partial
<LocalAnimatable
<RecursiveAnimatable
<unknown
>>>
Parameters
• anim: Animation
<Animating
>
The animation object
• into: object
= {}
Returns
LocalAnimatable
<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}