0.0.1 • Published 7 years ago

decurve v0.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

shapepath

No-dependecy, fast and lightweight SVG Shape Parser and Compiler

size gzipsize CDNJS jsdelivr unpkg npmcdn NPM Version NPM Downloads NPM

CDN

# unpkg
https://unpkg.com/shapepath

# npmcdn
https://npmcdn.com/shapepath

# jsDelivr
https://cdn.jsdelivr.net/npm/shapepath

Installing

$ npm install shapepath
# or
$ yarn add shapepath

Usage

var ShapePath = require('shapepath');
var toPoints = ShapePath.toPoints;
var toPath = ShapePath.toPath;

var RectSVG = toPoints({type:'rect',x:0,y:0,width:200,height:200});

var getAsPathD = toPath(RectSVG);

Methods

toPoints

Parse path string or rect, etc, inputs object parametrs to Array of Points

toPath

Converts Array of Points to Path string