What is the fastest way to animate multiple sprites under html5?

I am trying to animate 50 or so sprites at the same time using setInterval 30 ms.

What gives Bettter performance? Using canvas? Or using -webkit-transform and divs? Anyone have any tips on creating animations for html5?

+3
source share
2 answers

The short answer to your question is that Canvas should give better performance.

This post from Facebook engineering should also be helpful in understanding Canvas speed:

http://www.facebook.com/notes/facebook-engineering/html5-games-01-speedy-sprites/491691753919

+2
source

Javascript HTML5 canvas , -webkit-transform divs, .

HTML5 canvas Javascript (), -webkit-transform Webkit.

, , 20 (FPS), A setInterval() 0,05 ( 50 ), , .

, XNA, 2 setInterval(), 1 - , - .

0

All Articles