KeyframeTrack constructor

KeyframeTrack(
  1. dynamic name,
  2. dynamic times,
  3. dynamic values, [
  4. dynamic interpolation,
])

Implementation

KeyframeTrack(name, times, values, [interpolation]) {
  if (name == null) throw ('THREE.KeyframeTrack: track name is null');
  if (times == null || times.length == 0) {
    throw ('THREE.KeyframeTrack: no keyframes in track named $name');
  }

  this.name = name;
  _interpolation = interpolation;
  this.times = AnimationUtils.convertArray(times, TimeBufferType, false);
  this.values =
      AnimationUtils.convertArray(values, ValueBufferType, false);

  setInterpolation(interpolation ?? DefaultInterpolation);
}