Ear-clip
Ear-clipping algorithms for triangulating 2D polygons
dev.comradevanti.ear-clip Unity Compatibility
Unity 6 Supported
2023.2 Supported
2023.1 Supported
2022.3 LTS Supported
2021.3 LTS Supported
2020.3 LTS Unsupported
2019.4 LTS Unsupported
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/ear-clip.git 
README Markdown
Copy this to your project's README.md
## Installation
Add **Ear-clip** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/ear-clip.git
```
[](https://www.pkglnk.dev/pkg/ear-clip)README
Ear-clip
Super lightweight ear-clipping 2D polygon triangulation package for Unity. Can only handle simple polygons.
⚠️ 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.
Comments
No comments yet. Be the first!
Sign in to join the conversation
Sign In