Boolean operations and offsetting library in Javascript


8646.4.2-b4 years ago4 years agoMinified + gzip package size for @doodle3d/clipper-lib in KB



forked from Javascript Clipper


The Javascript Clipper 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.

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

LIVE DEMO: http://jsclipper.sourceforge.net/

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

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

Use cases:

Javascript Clipper Web Site


  • 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


Algorithms, Graphics



Boost Software License (BSL1.0)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.