run method

void run(
  1. double seconds, {
  2. int fps = 60,
})

Runs seconds of frames, fps a second: world.update(1 / fps) that many times.

Implementation

void run(double seconds, {int fps = 60}) {
  final frames = (seconds * fps).round();
  for (var i = 0; i < frames; i++) {
    update(1 / fps);
  }
}