1function animateFunction()
2{
3 //animate stuff
4 window.requestAnimationFrame(animateFunction);
5}
6window.requestAnimationFrame(animateFunction);
1/* Request Animation Frame By Gourav Khurana */
2
3
4https://flaviocopes.com/requestanimationframe/
5https://glitch.com/edit/#!/flavio-requestanimationframe-example?path=script.js%3A1%3A0
6https://glitch.com/edit/#!/flavio-settimeout-animation?path=script.js%3A54%3A4