Vector.svg
A lightweight Javascript library for creating Vector
graphics and manipulating SVG
.
Lightweight library for manipulating SVG.
Install
NPM
Install it from npm
:
$ npm install --save vector.svg
CDN
If you prefer CDN, then just insert it into your HTML page:
<script src="https://cdn.jsdelivr.net/npm/vector.svg/dist/vector.svg.min.js"></script>
Demo
This is a simple Drawing Pad built with Vector.svg
library.
Getting Started
First of all, create a HTML page consisting of a HTML element with an id
attribute and ready to serve as the container of the drawing:
Vector.svg Getting Started
Then, create a SVG Document within the container element:
var paper = ;
Now, lets create some basic shapes:
var paper = ; var circle = paper;circle ; var rect = paperx100y100;rect ;
That's it. Here is the JSFiddle
link.
Contributing
Your PRs and stars are always welcome.
Please, try to follow:
- Clone the repository.
- Checkout
develop
branch. - Install dependencies.
- Add your new features or fixes.
- Build the project.
$ git clone https://github.com/rousan/vector.svg.git$ cd vector.svg$ git checkout develop$ npm i$ npm run build