Polynomic
A set of advanced utilities to manipulate SVG paths.
Installation
npm install --save polynomic
Basic usage
import Polynomic from "polynomic"
let path = Polynomic.pathstring.parse("M0 0 L100 0 L100 100 L0 100 z")
path = Polynomic.transforms.rotate(path, Math.PI / 4, "center", "center")
path = Polynomic.transforms.translate(path, 25, 50)
const pathstring = Polynomic.pathstring.build(path)
Documentation
See the official documentation.
Contributing
Clone the repo:
git clone https://github.com/anthonydugois/polynomic.git
Run tests:
npm test
Run linting:
npm run lint
License
MIT