Skip to content

Super lightweight ear-clipping 2D polygon triangulation package for Unity

License

Unlicense, Unknown licenses found

Licenses found

Unlicense
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

ComradeVanti/UnityEarClip

Repository files navigation

Ear-clip

openupm

Super lightweight ear-clipping 2D polygon triangulation package for Unity. Can only handle simple polygons.

Changelog

⚠️ Development is paused ⚠️
No new features will be added or bugs fixed unless requested through an issue.
If you wish to fork this repository and continue the work, you are very welcome to do so.

Usage

using Dev.ComradeVanti.EarClip;

var points = new Vector2[] { ... };

// Points need to be in clockwise order
// Sort if needed
points = points.Clockwise().ToArray();

// Triangulate
var triangles = Triangulate.ConcaveNoHoles(points).ToArray();

Installation

Install via OpenUPM openupm add dev.comradevanti.ear-clip

Compatibility

Developed with for Unity 2021.3.

About

Super lightweight ear-clipping 2D polygon triangulation package for Unity

Topics

Resources

License

Unlicense, Unknown licenses found

Licenses found

Unlicense
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Languages