warp method

dynamic warp(
  1. dynamic startTimeScale,
  2. dynamic endTimeScale,
  3. dynamic duration
)

Implementation

warp(startTimeScale, endTimeScale, duration) {
  var now = mixer.time, timeScale = this.timeScale;

  var interpolant = _timeScaleInterpolant;

  if (interpolant == null) {
    interpolant = mixer.lendControlInterpolant();
    _timeScaleInterpolant = interpolant;
  }

  var times = interpolant.parameterPositions, values = interpolant.sampleValues;

  times[0] = now;
  times[1] = now + duration;

  values[0] = startTimeScale / timeScale;
  values[1] = endTimeScale / timeScale;

  return this;
}