HTML5 Canvas Performance: Loading Images vs Drawing

后端 未结 7 577
渐次进展
渐次进展 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:45

    This article discusses the subject and has several tests to benchmark the differences.

    Conculsions

    In brief — Canvas likes small size of canvas and DOM likes working with few elements (although DOM in Firefox is so slow that it's not always true).

    And if you are planing to use particles I thought that you might want to take a look to Doodle-js.

提交回复
热议问题