shift method

KeyframeTrack shift(
  1. dynamic timeOffset
)

Moves all keyframes either forward or backward in time.

Implementation

KeyframeTrack shift(timeOffset) {
  if (timeOffset != 0.0) {
    final times = this.times;

    for (int i = 0, n = times.length; i != n; ++i) {
      times[i] += timeOffset;
    }
  }

  return this;
}