4 ms·
so tick calls requestAnimationFrame that calls tick that... Doesn't it create an ever growing stack? Isn't there a way to do it with a while loop?
by mxtopher 12y ago
so tick calls requestAnimationFrame that calls tick that...
Doesn't it create an ever growing stack? Isn't there a way to do it with a while loop?
- zerocrates 12y agoIt doesn't create an ever-growing stack. tick calls requestAnimationFrame, tick returns, the browser waits for the next frame and calls tick...
- Rusky 12y agorequestAnimationFrame just queues up the callback for later, it doesn't actually call into it. There's no stack growth.