One of the advantages of Flash/Flex is that you can use vector graphics (SVG), which is nice. I did a bit of searching around and came across this Javascript vector graphics library. It's pretty simple stuff but it got me thinking: is there any possibility of using vector graphics files such as SVG with Javascript/HTML or it just can't be done or done reasonably?
+4
A:
I've used Raphaël Javascript Library and it worked quite well. Currently the library supports Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.
Marc Novakowski
2009-01-04 00:25:11
+3
A:
Give a look to Cake, Processing.js and jQuery SVG Integration Plugin.
Also check the Canvas element reference.
CMS
2009-01-04 00:30:37
+1
A:
Take a look at dojox.gfx. I posted more wordy answer in Recommend javascript graphics tutorials going over available graphics options in browsers including 2D and 3D cases.
Eugene Lazutkin
2009-01-04 18:21:06
+1
A:
Check out Google Closure. The vector graphics support is very well-done, IMO. If you've worked with Java2D before, this should seem very familiar.
Rich Apodaca
2010-01-07 16:29:46
does it work on browsers that do not support svg? do you just say goog.createGraphics and it decides whether to use Canvas, Svg or VML?
Evgeny
2010-01-21 06:09:35
@Evgeny, yes - it uses VML for IE with browser auto-detect.
Rich Apodaca
2010-01-22 00:24:03