2 ms·
Canvas is pixel oriented whereas with SVG you have a hierarchical document structure to work with. So if you want to do an online image editor I'd probably go
by arethuza 17y ago
Canvas is pixel oriented whereas with SVG you have a hierarchical document structure to work with.
So if you want to do an online image editor I'd probably go with canvas. For something that needs multiple objects with their own individual event handling - SVG looks a lot easier to me.
- steadicat 17y agoSVG is easier out of the box, but you can also use a "scene graph" JavaScript library to create an object abstraction on top of Canvas. In my experience managing the scene graph in JS turns out to be much faster than letting the browser handle it with SVG.