Ah, well, optimization it is then.
I’m not one to argue much on semantics, it’s the idea that’s important. Simple example in the fiddle here (disregard the other unrelated stuff there): the rotations perform zero increments on every frame (basically, doing nothing), if you press the P key to animate. If you press the P key again, you can pause it via cancelAnimationFrame()
, with the same visual effect as not doing it at all … but with a noticeable effect on the CPU / GPU usage, if you’re curious to monitor them in real time like I do.
Note: You might need to focus the fiddle’s output window first via a click on it, in order for it to receive keystroke events.