Vector graphics in Javascript?

梦想与她 提交于 2019-12-29 17:48:07

问题


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?


回答1:


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+.




回答2:


I know this is a pretty old question, but in case anyone comes across this question, the most impressive vector graphics I've seen in JavaScript is Paper.js.

Hope that helps.




回答3:


Give a look to Cake, Processing.js and jQuery SVG Integration Plugin.

Also check the Canvas element reference.




回答4:


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.




回答5:


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.




回答6:


Check out WebCode app from PixelCut. It generates JS, SVG, HTML from vector drawings. http://www.webcodeapp.com




回答7:


Just to add an additional answer. the creator of one of the popular vector js (Raphaël) joined Adobe and worked on this (http://snapsvg.io/) for several years.

although the last release is from 2017 its much more maintained and newer than other libraries mentioned here. hope this helps someone looking for svg vector graphics library in js.

if you are looking for a meteorjs build for snap you can get it here (https://atmospherejs.com/mirageglobe/snapsvgcdn) with

$ meteor add mirageglobe:snapsvgcdn


来源:https://stackoverflow.com/questions/410146/vector-graphics-in-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!