Skip to content

code4fukui/clipper-es

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clipper-es

LIVE DEMO: https://code4fukui.github.io/clipper-es/example/main_demo.html

forked from junmer/clipper-lib

forked from Javascript Clipper

Usage

import ClipperLib from "https://code4fukui.github.io/clipper-es/clipper.js";

const lines = [
  [{ X: 1, Y: 2 }, { X: 2, Y: 3 }],
  [{ X: 1, Y: 2 }, { X: 2, Y: 3 }],
];

const scale = 100;
ClipperLib.JS.ScaleUpPaths(lines, scale);
console.log(lines);

Description

clipper-es is a library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.

clipper-es is a port of Angus Johnson's Clipper library: https://sourceforge.net/projects/polyclipping/

Information and examples: http://jsclipper.sourceforge.net/6.2.1.0/

Donate Javascript Clipper Project: https://sourceforge.net/p/jsclipper/wiki/Donations/

Use cases:

Javascript Clipper Web Site

Features

  • Line and polygon clipping - intersection, union, difference & xor
  • Line and polygon offsetting with 3 types of joining - miter, square and round
  • Polygons can be of any shape, including self-intersecting polygons
  • Minkowski Addition and Minkowski Difference functions included
  • The library is written in Javascript
  • Comprehensive documentation
  • Demos use inline SVG and Canvas libraries
  • The library is significantly faster than commercial alternatives
  • Uses Tom Wu's fast big integer library
  • UMD support

Categories

Algorithms, Graphics

Links

License

Boost Software License (BSL1.0)

About

Boolean operations and offsetting library in JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 59.3%
  • JavaScript 40.7%