Capítulo 285 de 859
A reusable set of keyframe tracks which represent an animation.
Constructor
| Signature |
|---|
| `new AnimationClip( name : string, duration : number, tracks : Array.<KeyframeTrack>, blendMode : NormalAnimationBlendMode |
Properties
| Property | Description |
|---|---|
| `.blendMode : NormalAnimationBlendMode | AdditiveAnimationBlendMode` |
.duration : number | The clip's duration in seconds. |
.name : string | The clip's name. |
.tracks : Array.<KeyframeTrack> | An array of keyframe tracks. |
.userData : Object | 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. |
.uuid : string (readonly) | The UUID of the animation clip. |
Methods
| Method | Description |
|---|---|
.clone() : AnimationClip | Returns a new animation clip with copied values from this instance. |
.optimize() : AnimationClip | Optimizes each track by removing equivalent sequential keys (which are common in morph target sequences). |
.resetDuration() : AnimationClip | Sets the duration of this clip to the duration of its longest keyframe track. |
.toJSON() : Object | Serializes this animation clip into JSON. |
.trim() : AnimationClip | Trims all tracks to the clip's duration. |
.validate() : boolean | Performs minimal validation on each track in the clip. Returns true if all tracks are valid. |