3 ms·
Their code uses Date.now() but wouldn't it be better to use the high-resolution timestamp[1] passed as the parameter to the requestAnimationFrame callback[2]?
by ggorlen 4y ago
Their code uses Date.now() but wouldn't it be better to use the high-resolution timestamp[1] passed as the parameter to the requestAnimationFrame callback[2]?
[1]: https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResT...
[2]: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame https://developer.mozilla.org/en-US/docs/Web/API/window/requ...