A class with various methods to assist with animations.
Converts an array to a specific type
array
The array to convert.
type
The constructor of a type array.
Returns: The converted array
Used for parsing AOS keyframe formats.
jsonKeys
A list of JSON keyframes.
times
This array will be filled with keyframe times by this method.
values
This array will be filled with keyframe values by this method.
valuePropertyName
The name of the property to use.
Returns an array by which times and values can be sorted.
times
The keyframe time values.
Returns: The array.
Returns true if the given object is a typed array.
object
The object to check.
Returns: Whether the given object is a typed array.
Converts the keyframes of the given animation clip to an additive format.
targetClip
The clip to make additive.
referenceFrame
The reference frame.
Default is 0.
referenceClip
The reference clip.
Default is targetClip.
fps
The FPS.
Default is 30.
Returns: The updated clip which is now additive.
Sorts the given array by the previously computed order via getKeyframeOrder().
values
The values to sort.
stride
The stride.
order
The sort order.
Returns: The sorted values.
Creates a new clip, containing only the segment of the original clip between the given frames.
sourceClip
The values to sort.
name
The name of the clip.
startFrame
The start frame.
endFrame
The end frame.
fps
The FPS.
Default is 30.
Returns: The new sub clip.