Re:Paper.js — The Swiss Army Knife of Vector Graphics Scripting
by csytan on Monday June 27, 2011 @01:52PM
(#2702227)
I don't think SVG is particularly suited to animation, as it would require manipulating multiple DOM elements. This tends to be quite slow compared to redrawing the canvas.
[ Parent
| on HN ]
Re:Paper.js — The Swiss Army Knife of Vector Graphics Scripting
by MatthewPhillips on Monday June 27, 2011 @02:17PM
(#2702363)
SVG is hardware accelerated in IE9 and coming to Chrome as well. When that happens I doubt there will be much of a difference performance wise. Canvas and SVG will serve different ends. Doing something like GUI in Canvas would be an incredible pain, whereas doing it in SVG (using raphael.js) is a breeze. Canvas is better for games.
Re:Paper.js — The Swiss Army Knife of Vector Graphics Scripting
by haberman on Monday June 27, 2011 @02:09PM
(#2702327)
The alternative is keeping your own "DOM" of vector objects in a JavaScript-based scene graph. Why would this be more efficient than manipulating the DOM?
Re:Paper.js — The Swiss Army Knife of Vector Graphics Scripting
by donpark on Monday June 27, 2011 @04:49PM
(#2702958)
Because DOM elements are much heavier than Javascript objects in size, query/update performance, and update requirements.
Re:Paper.js — The Swiss Army Knife of Vector Graphics Scripting
by euroclydon on Monday June 27, 2011 @02:24PM
(#2702396)
Don't forget SMIL.