Skip to content

aninest root / Animatable

Animatable

This module deals with creating and modifying Animations.

Index

Construction

FunctionDescription
createAnimationCreates an animation info object, automatically inferring type from the init object.
createParentAnimationCreates a parent animation from a dictionary of children which will function the same as though the parent and children were created at once.

Interpolation

FunctionDescription
changeInterpFunctionChanges the interpolation function of specific subproperties based on the mask.
changeLocalInterpFunctionUpdates the interpolation function of the animation only for the topmost level.

State Modification

FunctionDescription
modifyToSets the final stopping point of the animation. The animation will start to interpolate to the new state the next time updateAnimation is called.
updateAnimationMoves the animation forward by a certain amount of time.

State Retrieval

FunctionDescription
getInterpingToTreeGets the full state tree that the animation is currently interpolating to. If the animation is not headed to any state, it will return the current state.
getLocalInterpingToGets 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.
getLocalInterpingToValueGets a value
getLocalStateGets the current local state of the animation, meaning only the strings and numbers in the topmost level of the animation. To access the local state of a child, use anim.children.childName as the input. Numbers will smoothly interpolate from the starting to the ending value while strings will snap to the ending value once the animation is at least 50% complete.
getStateTreeGets the full state of the animation, including all children.

Status

FunctionDescription
animationNeedsUpdateReturns whether the animation needs to be updated.