Animation
An Animation is a set of keyframes groups that can be used to animate any object or group of objects, such as animating a character or creating a cutscene.
Each keyframes group is bound to animating one object, it can be toggled on or off individually to disable part of an animation.
For example, a running animation could temporarily toggle off the keyframes group bound to an arm to simultaneously play a wave animation on that arm.
Constructors
Functions
Add a keyframe to the group identified by its name, at a given weight, for a transformation of any or all of position, rotation and scale through the last parameter { position, rotation, scale }.
The weight can be any number, allowing you to organize keyframes relative to each others' weight.
Keyframes are then played in order of increasing weight.
Note that when the animation is played for the first time, keyframes weights are automatically normalized.
Register a function to be called any time the animation is played.
Register a function to be called any time the animation is stopped.
Binds a keyframes group identified by its name to the given object. It means whenever this animation is played, that particular group of keyframes will modify the bound object.
Reverse, then starts or resumes the animation.
Unregister a function that was previously registered with AddOnPlayCallback.
Unregister a function that was previously registered with AddOnStopCallback.
Toggles a keyframes group identified by its name. Whenever this animation is played, that particular group of keyframes will not be used until toggled back on.
Properties
Number of cycles to repeat the animation. The default count of 1 will play a full cycle once. Setting this to 0 will repeat the animation indefenitely.
Speed of one animation cycle. This is the inverse of Duration, you can choose to set one or the other.