degenerate icon indicating copy to clipboard operation
degenerate copied to clipboard

Make reboot reset start time

Open casey opened this issue 3 years ago • 0 comments

This interferes with the way that we're using reboot in this program:

while(true) {
  reboot();
  rotateColor('green', 0.05 * TAU);
  circle();
  scale(0.5 * elapsed() / 20000);
  wrap();
  for (let i = 0; i < 8; i++) {
    render();
  }
  rotateColor('blue', 0.05 * TAU);
  for (let i = 0; i < 8; i++) {
    render();
  }
  await frame();
}

However, the only reason we're using reboot and not clear() is because all of our functions are stateful. Making them idempotent would mean that we don't have to use reboot to reset the state.

casey avatar Jun 30 '22 21:06 casey