|
|
|
|
|
by mdrzn
1603 days ago
|
|
OOC question regarding console scripts: unless it's specified by the code that the function will stop at a certain point, most functions like yours will loop forever. Is there a way to stop them, once pasted in the console, apart from refreshing the page? Is there no way to "stop" the loop of that specific function that was started? I googled around a bit but I think I'm out of my depth here. |
|
One easy way is to add a flag
Programmatically, you have the function cancelAnimationFrame that you give as parameter what requestAnimationFrame returns. The same as setTimeout and clearTimeout