Triangulation and Boolean Operations for 2D Polygons. Supported operations: intersection, union, difference, XOR, and self-intersections for all polygon varieties.
npm install ishape_wasm
- Stars Rotation
- Shapes Editor
- Path Offset
- Polygon Offset
- Triangulation
- Boolean Operations: union, intersection, difference, and exclusion.
- Polygons: with holes, self-intersections, and multiple paths.
- Simplification: removes degenerate vertices and merges collinear edges.
- Fill Rules: even-odd, non-zero, positive and negative.
#### Download Library Files:
- ishape_wasm.js
- ishape_bg_wasm.wasm
You can find it at: pkg
#### Place Files:
Place these files in a directory that your HTML file can access; in this example, the directory is named ./ishape
#### Installation
You can install the iShape library from NPM:
``bash`
npm install ishape_wasm
The NPM package is available here
#### Import and Usage
After installing the NPM package, you can import it in your JavaScript or TypeScript file as follows:
`javascript
import init, { Overlay, OverlayRule, FillRule } from './ishape/ishape_wasm.js';
// Your code here
`
html
iShape
``#### Explanation:
Import classes and initialize the WebAssembly module using init().
Use the imported classes to perform geometric operations.