0

Both Paper.js and pomax's Bezier library library use canvas for rendering on their pages. I would expect that for such eminently vector-y things, SVG would be the natural choice.

I assume they've thought that through, so what are the benefits of canvas for these use cases?

simone
  • 4,667
  • 4
  • 25
  • 47
  • I won't designate this as answer, because I just googled it, but canvas is basically a bitmap that you can draw on, while svq is a scalable vector graphic, designed to be scalable after the fact. You just define objects that are then rendered. If you change the scale, the objects can be rerendered. On a canvas, if you rescale, the drawn pixels would be scaled, I suppose, but the objects would not be rerendered. – TreffnonX Apr 29 '19 at 06:13
  • Probably raw performance, see https://stackoverflow.com/questions/5882716/html5-canvas-vs-svg-vs-div. – ewramner Apr 29 '19 at 06:15

0 Answers0