Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.


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?


Because DOM elements are much heavier than Javascript objects in size, query/update performance, and update requirements.


Don't forget SMIL.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: