Registry / utility / earcutr

earcutr

JSON →
library0.5.0rscratesunverified

A port of MapBox's earcut triangulation algorithm for polygon tessellation in Rust.

# Cargo.toml [dependencies] earcutr = "0.5.0"
INSTALL
IMPORT
SIG · EARCUTR
E
earcutr
utilityrustv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

earcut
use earcutr::earcut;

Triangulates a simple polygon using the earcut algorithm.

use earcutr::earcut; fn main() { let polygon = vec![0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0]; let holes = vec![]; let result = earcut(&polygon, &holes, 2).unwrap(); println!("Triangulation indices: {:?}", result); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
earcutr — cargo add earcutr · libregistry