3 ms·
#11: Your user's browser has the final say in all matters of timing. Whatever you do, ultimately, if the browser decides that something has to be computed on yo
by Kenji 10y ago
#11: Your user's browser has the final say in all matters of timing. Whatever you do, ultimately, if the browser decides that something has to be computed on your main JS thread while you are trying to hit frames and timings, you're screwed. Source: Making multiple HTML5 games with the intention of having them render at 60 fps and not missing a single frame.
- paulirish 10y agoThe reason why transform & opacity (via CSS animations) are always recommended is because they can be done completely on the compositor thread without going back to the main thread. If you need to run every frame of animation from JS then, yes, you're screwed. At least until https://groups.google.com/a/chromium.org/d/topic/blink-dev/YlG2OvHgVaQ/discussion https://groups.google.com/a/chromium.org/d/topic/blink-dev/Y... & https://github.com/flackr/compositor-worker https://github.com/flackr/compositor-worker)
- Kenji 10y agoThanks for the explanation. Yeah, I noticed that the hard way. I now moved off JavaScript and went back to classic C++ game programming. I like it much more at this lower level with fine-grained control.