3 ms·
There are at least three ways to draw in browsers now - a canvas object, WebGL, and SVG. Apparently SVG is losing out for that application. As a common repres
by Animats 10y ago
There are at least three ways to draw in browsers now - a canvas object, WebGL, and SVG. Apparently SVG is losing out for that application.
As a common representation for draw programs, SVG is quite useful. But apparently it accumulated way too many features, and SVG 2, this author says, was an solution to a non-problem.
- peterbraden 10y agoThey're all quite different. Canvas is raster based, SVG is vector, and WebGL is a totally different approach tailored to hardware acceleration (and still paints into a canvas, so it's raster ultimately).
- Animats 10y agoFor display, eventually everything is a raster, unless you output to something like a pen plotter. Canvas has primitives including 'draw line', 'draw circle', etc., and can be used as a lower level for a scene graph. There's "scenegraph.js"; unclear if it's used much. You can use WebGL as a 2D drawing system. On machines with OpenGL hardware support (which today is everything above a flip phone) that's a reasonable way to do fast 2D work. Games often do that for their menu screens. SVG is more useful as a storage format than as a graphics toolbox.