+ 22

How to get the frame rate (fps) at the time of animation?

So, I was just trying to make something magical but I'm stuck in between... [Repeat] How do we get the fps rate at the time of animation with a time interval of every 1 second? Is it with requestAnimationFrame or something else?

14th May 2017, 8:55 AM
Dev
Dev - avatar
3 Réponses
+ 17
@Gami, @Aloisia Thanks... ^^
15th May 2017, 8:53 AM
Dev
Dev - avatar
+ 12
setInterval(whateverFunction(), 1000) for 1 second If you want to keep it at the browser's fps, you would need to do this function whateverFunction() { requestAnimationFrame(whateverFunction) } whateverFunction()
15th May 2017, 8:12 AM
Gami
Gami - avatar