8 ms·
What you mean is setInterval and does work well for synchronous execution. His approach is correct and would even work if the animate function is asynchronous a
by telcy 8y ago
What you mean is setInterval and does work well for synchronous execution. His approach is correct and would even work if the animate function is asynchronous as the next tick gets scheduled at the end of animate function execution.
- Qwertie 8y agoAh yes, you are right. Got those mixed up.
- derrikcurran 8y agoRecursive setTimeout is a great way to allow for easy timing/speed changes on the fly.
- telcy 8y agogood point :)