warp method

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

Implementation

warp(startTimeScale, endTimeScale, duration) {
  var mixer = _mixer, 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;
}