AnimationUtils

An object with various functions to assist with animations, used internally.

Methods

.arraySlice(array : TypedArray, from : Integer, to : Integer) → TypedArray

This is the same as Array.prototype.slice, but also works on typed arrays.

.convertArray(array : TypedArray, type : Constructor, forceClone : Boolean) → TypedArray

Converts an array to a specific type.

.flattenJSON(jsonKeys, times, values, valuePropertyName) → Array

Used for parsing AOS keyframe formats.

.getKeyframeOrder(times) → Array

Returns an array by which times and values can be sorted.

.isTypedArray(object) → Boolean

Returns true if the object is a typed array.

.makeClipAdditive(targetClip : AnimationClip, referenceFrame : Float, referenceClip : AnimationClip, fps : Float) → AnimationClip

Converts the keyframes of the given animation clip to an additive format.

.sortedArray(values, stride, order) → Array

Sorts the array previously returned by getKeyframeOrder.

.subclip(clip : AnimationClip, name : String, startFrame : Float, endFrame : Float, fps : Float) → AnimationClip

Creates a new clip, containing only the segment of the original clip between the given frames.

Source

For more info on how to obtain the source code of this module see this page.