clipper2-lib-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

clipper2-lib-js

https://www.npmjs.com/package/clipper2-lib-js
A Path Clipping and Offsetting library.
A port of Clipper2(C#) version 1.2.3 to js/ts.

Examples

const subj = new PathsD();
const clip = new PathsD();
subj.push([
    {x:100, y:50},
    {x:10, y:79},
    {x:65, y:2},
    {x:65, y:98},
    {x:10, y:21}
]);
clip.push(Clipper.makePathD([ 98, 63, 4, 68, 77, 8, 52, 100, 19, 12 ]));
const solution = Clipper.intersect(subj, clip, FillRule.NonZero);

clipper-2-example

Todo

  • [ ] Add build process.
  • [x] Add tests.
  • [ ] Add comments.
  • [ ] Add demo.
  • [ ] Add benchmark.

Plan

  • [x] TypedArray Path.

Change Log

See ChangeLog.

Package Sidebar

Install

npm i clipper2-lib-js

Weekly Downloads

202

Version

0.0.6

License

BSL-1.0

Unpacked Size

2.21 MB

Total Files

132

Last publish

Collaborators

  • umaneko