Re:Sprite.js: HTML5 framework for creating efficient animati...
by rudd on Thursday December 09, 2010 @09:54AM
(#1987615)
Curious that Canvas rendering is so much slower / causes more load than the HTML backend, at least for me. Anyone know why?
[ Parent
| on HN ]
Re:Sprite.js: HTML5 framework for creating efficient animati...
by al_james on Thursday December 09, 2010 @10:36AM
(#1987788)
Because using Canvas requires you to manage redrawing the entire scene each frame in javascript. When using DOM based sprites, the browser takes care of the redrawing whenever you move an element (e.g. a spite).
Re:Sprite.js: HTML5 framework for creating efficient animati...
by chipsy on Thursday December 09, 2010 @02:17PM
(#1988710)
It's also a display model problem. A big bitmap that you draw on arbitrarily is just harder to optimize than a decomposable scenegraph.
This downside of Canvas also means it may become a dead-end for high-performance 2D, unless we discover some way of making all manipulations go completely on-GPU. Canvas is presently best suited for creation of individual textures and sprites, while other methods(CSS, SVG, WebGL) are better to render and transform them.