Capítulo 292 de 859
Represents a timed sequence of keyframes, which are composed of lists of times and related values, and which are used to animate a specific property of an object.
Constructor
| Signature |
|---|
| `new KeyframeTrack( name : string, times : Array.<number>, values : Array.<(number |
Properties
| Property | Description |
|---|---|
| `.DefaultInterpolation : InterpolateLinear | InterpolateDiscrete |
| `.TimeBufferType : TypedArray | Array` |
| `.ValueBufferType : TypedArray | Array` |
.ValueTypeName : string | The value type name. |
.name : string | The track's name can refer to morph targets or bones or possibly other values within an animated object. See PropertyBinding#parseTrackName for the forms of strings that can be parsed for property bi… |
.times : Float32Array | The keyframe times. |
.values : Float32Array | The keyframe values. |
Methods
| Method | Description |
|---|---|
.InterpolantFactoryMethodBezier( result : TypedArray ) : BezierInterpolant | Factory method for creating a new Bezier interpolant. |
.InterpolantFactoryMethodDiscrete( result : TypedArray ) : DiscreteInterpolant | Factory method for creating a new discrete interpolant. |
.InterpolantFactoryMethodLinear( result : TypedArray ) : LinearInterpolant | Factory method for creating a new linear interpolant. |
.InterpolantFactoryMethodSmooth( result : TypedArray ) : CubicInterpolant | Factory method for creating a new smooth interpolant. |
.clone() : KeyframeTrack | Returns a new keyframe track with copied values from this instance. |
| `.getInterpolation() : InterpolateLinear | InterpolateDiscrete |
.getValueSize() : number | Returns the value size. |
.optimize() : KeyframeTrack | Optimizes this keyframe track by removing equivalent sequential keys (which are common in morph target sequences). |
.scale( timeScale : number ) : KeyframeTrack | Scale all keyframe times by a factor (useful for frame - seconds conversions). |
| `.setInterpolation( interpolation : InterpolateLinear | InterpolateDiscrete |
.shift( timeOffset : number ) : KeyframeTrack | Moves all keyframes either forward or backward in time. |
.trim( startTime : number, endTime : number ) : KeyframeTrack | Removes keyframes before and after animation without changing any values within the defined time range. |
.validate() : boolean | Performs minimal validation on the keyframe track. Returns true if the values are valid. |