try { requestAnimationFrame(function re(){ re(); })} catch (e){ console.log(e); }
I tried above code in console, i
You are calling the same function within the function re() inside your requestAnimationFrame() function. A correct way would be as follows:
re()
requestAnimationFrame()
function re(){ //code here requestAnimationFrame(re); //loop back to start }