3 ms·
> 1) window.requestAnimationFrame(main): It calls main function. No, it doesn’t. It asks the browser to call the function. It will do that at some later time.
by Someone 4y ago
> 1) window.requestAnimationFrame(main): It calls main function.
No, it doesn’t. It asks the browser to call the function. It will do that at some later time.
If you wanted to call main, you’d just write main().
https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame https://developer.mozilla.org/en-US/docs/Web/API/window/requ...:
“The window.requestAnimationFrame() method tells the browser that you wish to perform an animation and requests that the browser calls a specified function to update an animation before the next repaint.”