|
|
|
|
|
by hertog
5569 days ago
|
|
I understand what you are saying, but I thought that it wouldn't matter for browsers on mobile devices. I thought that the performance on a mobile device was slow enough to ignore the setInterval limit. Apparently not, since your test gives me a 200fps on my iPhone 3Gs. However, although the fps is higher, the animation looks worse. Is that because the 'render cycle' is not completed using this technique? |
|
But with zeroTimeout, the movement is happening so fast that the snapshot copy is behind. The browser might be only updating the video every 20ms at the fastest, while the block is moving several pixels every few ms.
But be assured the render of the block is completely happening and then being erased. It's a proper render. If it wasn't, you'd get a permanent "smear" of the results in the browser.