├── .github └── workflows │ └── node.yml ├── .gitignore ├── LICENSE ├── README.md ├── bench ├── basic.js └── bench.js ├── eslint.config.js ├── package.json ├── rollup.config.js ├── src └── earcut.js ├── test ├── expected.json ├── fixtures │ ├── bad-diagonals.json │ ├── bad-hole.json │ ├── boxy.json │ ├── building.json │ ├── collinear-diagonal.json │ ├── degenerate.json │ ├── dude.json │ ├── eberly-3.json │ ├── eberly-6.json │ ├── empty-square.json │ ├── filtered-bridge-jhl.json │ ├── hilbert.json │ ├── hole-touching-outer.json │ ├── hourglass.json │ ├── infinite-loop-jhl.json │ ├── issue107.json │ ├── issue111.json │ ├── issue119.json │ ├── issue131.json │ ├── issue142.json │ ├── issue149.json │ ├── issue16.json │ ├── issue17.json │ ├── issue186.json │ ├── issue29.json │ ├── issue34.json │ ├── issue35.json │ ├── issue45.json │ ├── issue52.json │ ├── issue83.json │ ├── outside-ring.json │ ├── rain.json │ ├── self-touching.json │ ├── shared-points.json │ ├── simplified-us-border.json │ ├── steiner.json │ ├── touching-holes.json │ ├── touching-holes2.json │ ├── touching-holes3.json │ ├── touching-holes4.json │ ├── touching-holes5.json │ ├── touching-holes6.json │ ├── touching2.json │ ├── touching3.json │ ├── touching4.json │ ├── water-huge.json │ ├── water-huge2.json │ ├── water.json │ ├── water2.json │ ├── water3.json │ ├── water3b.json │ └── water4.json └── test.js └── viz ├── index.html └── viz.js /.github/workflows/node.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/.github/workflows/node.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | coverage 2 | node_modules 3 | dist 4 | *.log 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/README.md -------------------------------------------------------------------------------- /bench/basic.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/bench/basic.js -------------------------------------------------------------------------------- /bench/bench.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/bench/bench.js -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | export {default} from 'eslint-config-mourner'; 2 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/rollup.config.js -------------------------------------------------------------------------------- /src/earcut.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/src/earcut.js -------------------------------------------------------------------------------- /test/expected.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/expected.json -------------------------------------------------------------------------------- /test/fixtures/bad-diagonals.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/bad-diagonals.json -------------------------------------------------------------------------------- /test/fixtures/bad-hole.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/bad-hole.json -------------------------------------------------------------------------------- /test/fixtures/boxy.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/boxy.json -------------------------------------------------------------------------------- /test/fixtures/building.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/building.json -------------------------------------------------------------------------------- /test/fixtures/collinear-diagonal.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/collinear-diagonal.json -------------------------------------------------------------------------------- /test/fixtures/degenerate.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/degenerate.json -------------------------------------------------------------------------------- /test/fixtures/dude.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/dude.json -------------------------------------------------------------------------------- /test/fixtures/eberly-3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/eberly-3.json -------------------------------------------------------------------------------- /test/fixtures/eberly-6.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/eberly-6.json -------------------------------------------------------------------------------- /test/fixtures/empty-square.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/empty-square.json -------------------------------------------------------------------------------- /test/fixtures/filtered-bridge-jhl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/filtered-bridge-jhl.json -------------------------------------------------------------------------------- /test/fixtures/hilbert.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/hilbert.json -------------------------------------------------------------------------------- /test/fixtures/hole-touching-outer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/hole-touching-outer.json -------------------------------------------------------------------------------- /test/fixtures/hourglass.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/hourglass.json -------------------------------------------------------------------------------- /test/fixtures/infinite-loop-jhl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/infinite-loop-jhl.json -------------------------------------------------------------------------------- /test/fixtures/issue107.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue107.json -------------------------------------------------------------------------------- /test/fixtures/issue111.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue111.json -------------------------------------------------------------------------------- /test/fixtures/issue119.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue119.json -------------------------------------------------------------------------------- /test/fixtures/issue131.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue131.json -------------------------------------------------------------------------------- /test/fixtures/issue142.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue142.json -------------------------------------------------------------------------------- /test/fixtures/issue149.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue149.json -------------------------------------------------------------------------------- /test/fixtures/issue16.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue16.json -------------------------------------------------------------------------------- /test/fixtures/issue17.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue17.json -------------------------------------------------------------------------------- /test/fixtures/issue186.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue186.json -------------------------------------------------------------------------------- /test/fixtures/issue29.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue29.json -------------------------------------------------------------------------------- /test/fixtures/issue34.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue34.json -------------------------------------------------------------------------------- /test/fixtures/issue35.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue35.json -------------------------------------------------------------------------------- /test/fixtures/issue45.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue45.json -------------------------------------------------------------------------------- /test/fixtures/issue52.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue52.json -------------------------------------------------------------------------------- /test/fixtures/issue83.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/issue83.json -------------------------------------------------------------------------------- /test/fixtures/outside-ring.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/outside-ring.json -------------------------------------------------------------------------------- /test/fixtures/rain.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/rain.json -------------------------------------------------------------------------------- /test/fixtures/self-touching.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/self-touching.json -------------------------------------------------------------------------------- /test/fixtures/shared-points.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/shared-points.json -------------------------------------------------------------------------------- /test/fixtures/simplified-us-border.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/simplified-us-border.json -------------------------------------------------------------------------------- /test/fixtures/steiner.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/steiner.json -------------------------------------------------------------------------------- /test/fixtures/touching-holes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching-holes.json -------------------------------------------------------------------------------- /test/fixtures/touching-holes2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching-holes2.json -------------------------------------------------------------------------------- /test/fixtures/touching-holes3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching-holes3.json -------------------------------------------------------------------------------- /test/fixtures/touching-holes4.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching-holes4.json -------------------------------------------------------------------------------- /test/fixtures/touching-holes5.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching-holes5.json -------------------------------------------------------------------------------- /test/fixtures/touching-holes6.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching-holes6.json -------------------------------------------------------------------------------- /test/fixtures/touching2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching2.json -------------------------------------------------------------------------------- /test/fixtures/touching3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching3.json -------------------------------------------------------------------------------- /test/fixtures/touching4.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/touching4.json -------------------------------------------------------------------------------- /test/fixtures/water-huge.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/water-huge.json -------------------------------------------------------------------------------- /test/fixtures/water-huge2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/water-huge2.json -------------------------------------------------------------------------------- /test/fixtures/water.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/water.json -------------------------------------------------------------------------------- /test/fixtures/water2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/water2.json -------------------------------------------------------------------------------- /test/fixtures/water3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/water3.json -------------------------------------------------------------------------------- /test/fixtures/water3b.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/water3b.json -------------------------------------------------------------------------------- /test/fixtures/water4.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/fixtures/water4.json -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/test/test.js -------------------------------------------------------------------------------- /viz/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/viz/index.html -------------------------------------------------------------------------------- /viz/viz.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/earcut/HEAD/viz/viz.js --------------------------------------------------------------------------------