@santigp258/simplify
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@santigp258/simplify

Extracts Path#simplify() from Paper.js

Installation

npm install @santigp258/simplify

or

yarn add @santigp258/simplify

API

simplifySvgPath(
  points: [x: number, y: number][], // `{ x: number, y: number }[]` is also acceptable
  {
    tolerance: number = 2.5,
    precision: number = 5,
  } = {}
): string
// SVG path command string such as
// "M10,10c0,3.33333 -2.35702,7.64298 0,10c2.35702,2.35702 6.66667,0 10,0"

Note

This repo is a fork of @luncheon/simplify-svg-path

Also The logic is a copy of Paper.js v0.12.11.

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i @santigp258/simplify

    Weekly Downloads

    2

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    103 kB

    Total Files

    9

    Last publish

    Collaborators

    • santigp258