Remove code I'm surprised even runs without crashing (c.strokeW just by itself on one line)
Remove unused and nonfunctional code
Add some {}s, to avoid a certain category of bug, including in one case where I had to guess the correct behaviour (scene.frameNr++; when paused?)
Speed improvements: cache index calculations, move invariants out of loops — feel free to disregard these if you feel they detract from the educational value of the project
Summary of all changes on my branch:
c.strokeW
just by itself on one line){}
s, to avoid a certain category of bug, including in one case where I had to guess the correct behaviour (scene.frameNr++;
when paused?)