HTML5 Canvas Performance: Loading Images vs Drawing

后端 未结 7 586
渐次进展
渐次进展 2021-02-04 08:23

I\'m planning on writing a game using javascript / canvas and I just had 1 question: What kind of performance considerations should I think about in regards to loading images vs

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 08:37

    Image loading out of the cache is faster than generating it / loading it from the original resource. But then you have to preload the images, so they get into the cache.

提交回复
热议问题