4 ms·
Different use cases. It's like why there is a need for both Illustrator and Photoshop. SVG is great for vector graphics but for fast bitmap-based graphics you
by bd 17y ago
Different use cases. It's like why there is a need for both Illustrator and Photoshop.
SVG is great for vector graphics but for fast bitmap-based graphics you need <canvas>.
You do not want to handle bitmaps where each pixel is an object.
- briansmith 17y agoBesides some kind of interactive bitmap editor, where would someone need dynamic bitmap graphics that would be too much for a very fast SVG implementation but not too much for <canvas>?
- bd 17y agoWhenever "vector look" is not what you aim for. One huge example is games - vast majority of games use bitmap graphics. Or if you want to do some pretty data visualizations like heatmaps. ---- Edit: Here are some examples showing what fast canvas bitmap graphics can do (and what would be very very hard to do with SVG): http://29a.ch/2010/3/24/normal-mapping-with-javascript-and-canvas-tag http://29a.ch/2010/3/24/normal-mapping-with-javascript-and-c... http://mrdoob.com/lab/javascript/effects/fire/01/ http://mrdoob.com/lab/javascript/effects/fire/01/ http://mrdoob.com/lab/javascript/effects/water/00/ http://mrdoob.com/lab/javascript/effects/water/00/ http://www.nihilogic.dk/labs/canvas_music_visualization/ http://www.nihilogic.dk/labs/canvas_music_visualization/ http://www.nihilogic.dk/labs/strange_attractors/ http://www.nihilogic.dk/labs/strange_attractors/ http://www.p01.org/releases/512b_jspongy/jspongy.htm http://www.p01.org/releases/512b_jspongy/jspongy.htm http://www.p01.org/releases/20_lines_hypno_trip_down_the_fractal_rug/ http://www.p01.org/releases/20_lines_hypno_trip_down_the_fra... http://www.p01.org/releases/20_lines_dynamic_hypnoglow/ http://www.p01.org/releases/20_lines_dynamic_hypnoglow/ http://www.ehkä.fi/ http://www.ehkä.fi/
- Sephr 17y agoFlash isn't bitmap-based though. SVG is more like Flash in so many more ways that would make the implementation easier and better (scalability, for example).
- bd 17y agoFlash can do both vector and bitmap graphics (which is BTW much faster than current canvas implementations, even in fast browsers like Chrome [1]). Adobe used canvas probably because you can redo vector graphics with a decent performance in canvas, while it doesn't work the other way around. Flash exporter to SVG could be marginally better for vector parts of what Flash can do, but it would lose all bitmap capabilities, while Flash exporter to canvas can potentially replicate everything what Flash can do. ---- [1] Flash bitmap graphics is fast enough to do pretty decent full-screen 3d graphics with textures and shading: http://away3d.com/ http://away3d.com/ http://dailypv3d.wordpress.com/ http://dailypv3d.wordpress.com/