KeyframeTrack constructor
name
- the identifier for the KeyframeTrack
.
times
- an array of keyframe times, converted internally to a
Float32Array.
values
- an array with the values related to the times array,
converted internally to a
Float32Array.
interpolation
- the type of interpolation to use. See Constants
for possible values. Default is InterpolateLinear
.
Implementation
KeyframeTrack(this.name,List<num> times,List<num> values, [int? interpolation]) {
// if (name == null) throw ('THREE.KeyframeTrack: track name is null');
// this.name = name;
// if (times == null || times.isEmpty) throw ('THREE.KeyframeTrack: no keyframes in track named $name');
this.times = AnimationUtils.convertArray(times, timeBufferType, false);
_interpolation = interpolation;
this.values = AnimationUtils.convertArray(values, valueBufferType, false);
setInterpolation(_interpolation ?? defaultInterpolation);
}