+ 8
Why requestAnimationFrame() does not work in my canvas java script
7 Respostas
+ 6
Could you share your code snippet here?
Meanwhile, this is a demo about requestAnimationFrame
https://code.sololearn.com/Wdjwm2m4P4iV/?ref=app
+ 7
Gordon unfortunatelly if you click the button restart several times behind the speed increases with every click, which is quite annoying. Can you fix that?
+ 6
Very good Artur thanks.
+ 5
Thanks for answering my question
+ 4
JaScript requestAnimationFrame returns a value (long numeric id). Just check if callback returned any value in variable "raf". If so, don't request another frame. If not, then kick it to start
+ 4
like so I guess
https://code.sololearn.com/WYdyaea4TFat/?ref=app
+ 4
JaScript You're welcome 🤗