npm install curveCurve is a vector drawing library providing a layer of user interaction tools over SVG. It is used in an [Electron][electron]-based vector drawing app called [Curve.app][app].
!shot
Built on top of [svg.js][svg].
* Will load any svg file
* Will serialize (save!) the loaded svg file
* Can create paths (pen tool), rectangles, and ellipses
* Can select and modify paths, rectangles, and ellipses
* python -m SimpleHTTPServer 8080
* Load up http://localhost:8080/examples/example.html
Curve is built with [browserify][browserify] and works in the browser, and node.js and Electron applications.
The only dependency is svg.js which is bundled in curve.js and curve.min.js. Download curve.js or curve.min.js, and include it in your page
``html`
Then in your JS:
`js`
var doc = new Curve.SVGDocument("canvas")
var svgString = ""
doc.deserialize(svgString)
doc.initializeTools()
`bash`
npm install --save curve
And it works similarly
`js
var SVGDocument = require('curve').SVGDocument
var canvas = document.createElement('div')
var doc = new Curve.SVGDocument(canvas)
var svgString = ""
doc.deserialize(svgString)
doc.initializeTools()
`
Officially tested on Chrome
* Requires grunt npm install -g grunt-clinpm install
* Install grunt modules grunt watch
* Automatically compile changes npm test`
* Run tests with
MIT License
[electron]:http://electron.atom.io
[app]:https://github.com/benogle/curve-app
[svg]:https://github.com/wout/svg.js
[browserify]:http://browserify.org/