Answer the question
In order to leave comments, you need to log in
How to optimize animation on canvas?
In the toy fintank.ru , the screen (canvas) is redrawn at 20 fps. Each frame is drawn with several putImageData() calls, which, like Google maps, make up a picture from square fragments. The fragments are converted to ImageData and are in the cache. Each fragment can sometimes be changed by the server (put/removed a game object). The modified fragment is rendered in ImageData and replaces the old version in the cache.
How can this architecture be changed so that 60fps is achievable and the CPU doesn't run hot as hell? Forget about these dances with a tambourine putImageData () and move to WebGL?
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