Unclaimed Package Is this your package? Claim it to unlock full analytics and manage your listing.
Claim This Package

Install via UPM

Add to Unity Package Manager using this URL

https://www.pkglnk.dev/ear-clip.git
Ear-clip

README Markdown

Copy this to your project's README.md

Style
Preview
pkglnk installs badge
## 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
```

[![pkglnk](https://www.pkglnk.dev/badge/ear-clip.svg?style=pkglnk)](https://www.pkglnk.dev/pkg/ear-clip)

README

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.

Comments

No comments yet. Be the first!