Control/limit requestAnimationFrame FPS

52 views
Skip to first unread message

Joao Paulo Oliveira Fernandes

unread,
Jun 14, 2022, 3:24:54 PMJun 14
to Chromium HTML5
Is there a way to limit/cap requestAnimationFrame FPS in Chromium browsers? I want to cap it to 60 fps and have each frame lasting exactly 1/60 second. It seems that --limit-fps flag used to exist, but it's not working at least for newer versions.

Thanks!

PhistucK

unread,
Jun 14, 2022, 3:26:25 PMJun 14
to Joao Paulo Oliveira Fernandes, Chromium HTML5
I believe it is already limited to 60... Are you seeing higher frame rates?

PhistucK


On Tue, Jun 14, 2022 at 8:24 PM Joao Paulo Oliveira Fernandes <jjp...@gmail.com> wrote:
Is there a way to limit/cap requestAnimationFrame FPS in Chromium browsers? I want to cap it to 60 fps and have each frame lasting exactly 1/60 second. It seems that --limit-fps flag used to exist, but it's not working at least for newer versions.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-html5/98250df9-b821-42bf-bf18-d754b21b3ae6n%40chromium.org.

Joao Paulo Oliveira Fernandes

unread,
Jun 14, 2022, 3:37:13 PMJun 14
to Chromium HTML5, PhistucK, Chromium HTML5, Joao Paulo Oliveira Fernandes
Yes, I'm seeing higher rates. Not only me but a lot of people trying to play my game. And it's not limited to 60 fps. requestAnimationFrame runs according to the current monitor refresh rate. From MDN: "The number of callbacks is usually 60 times per second, but will generally match the display refresh rate in most web browsers as per W3C recommendation."

Many thanks!
Reply all
Reply to author
Forward
0 new messages