Skip to content

measuredweighed/Earcut.swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Earcut.swift

A Swift port of Mapbox's earcut.js polygon triangulation library.

Usage

Pass Earcut a flat array of vertex coordinates and optionally include an array of hole indices, and the tesselate function will return a flat array of triangle indices.

let result = Earcut.tesselate(data: [10, 0, 0, 50, 60, 60, 70, 10])

// result: [1, 0, 3, 3, 2, 1]

About

🤖 A Swift port of Mapbox's earcut.js library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published