A reusable set of keyframe tracks which represent an animation.
Constructs a new animation clip.
Note: Instead of instantiating an AnimationClip directly with the constructor, you can use the static interface of this class for creating clips. In most cases though, animation clips will automatically be created by loaders when importing animated 3D assets.
name
The clip's name.
Default is ''.
duration
The clip's duration in seconds. If a negative value is passed, the duration will be calculated from the passed keyframes.
Default is -1.
tracks
An array of keyframe tracks.
blendMode
Defines how the animation is blended/combined when two or more animations are simultaneously played.
Default is NormalAnimationBlendMode.
Defines how the animation is blended/combined when two or more animations are simultaneously played.
The clip's duration in seconds.
The clip's name.
An array of keyframe tracks.
An object that can be used to store custom data about the animation clip. It should not hold references to functions as these will not be cloned.
The UUID of the animation clip.
Returns a new animation clip with copied values from this instance.
Returns: A clone of this instance.
Optimizes each track by removing equivalent sequential keys (which are common in morph target sequences).
Returns: A reference to this animation clip.
Sets the duration of this clip to the duration of its longest keyframe track.
Returns: A reference to this animation clip.
Serializes this animation clip into JSON.
Returns: The JSON object.
Trims all tracks to the clip's duration.
Returns: A reference to this animation clip.
Performs minimal validation on each track in the clip. Returns true if all tracks are valid.
Returns: Whether the clip's keyframes are valid or not.