variableStepTimes property

set variableStepTimes (List<double> stepTimes)

Sets a different step time to each frame. The sizes of the arrays must match.

Implementation

set variableStepTimes(List<double> stepTimes) {
  assert(stepTimes.length == frames.length);
  for (var i = 0; i < frames.length; i++) {
    assert(stepTimes[i] > 0, 'All step times must be positive');
    frames[i].stepTime = stepTimes[i];
  }
}