Answer the question
In order to leave comments, you need to log in
How to achieve maximum fps with canvas?
There is canvas. It is stretched to full screen. A line is simply drawn on it (and redrawn with requestAnimationFrame)
That is, everything that happens in js when redrawing has nowhere to speed up. In any case, this should be enough for fps much more than 60.
Everything is fine in firefox. There fps is on average 60.
But in other browsers 13-25.
Of course, if you reduce the size of the canvas, then everywhere the fps will be excellent. But I would like it to work well in full screen.
Why is fps so much higher in firefox (more precisely, why is it not so in other browsers)?
And can there be any recommendations on how to speed it up?
Primitive example: js-coder.tk/test
True, now my computer really slows down something ... (although in firefox it's still 60 fps)
At the same time, it's not just me. More precisely, many, though not 5, but 10-20 fps.
- - - - -
Apparently, these are browser problems (namely, Yandex).
I kind of recently looked in Chrome, it was somewhere the same. But now everything works well. I don't know how I looked
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question