this post was submitted on 06 Apr 2024
2 points (100.0% liked)

Project Harmonia

34 readers
6 users here now

A work-in-progress life simulation game.

GitHub

founded 8 months ago
MODERATORS
2
Switched from earcutr to earcut-rs (files.mastodon.social)
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 

Switched from earcutr to earcut-rs

earcutr is an excellent crate for polygon triangulation. But it's API isn't convenient to use with Bevy.
Recently discovered this crate that I wanted to share with others: https://github.com/MIERUNE/earcut-rs
It's generic over indices and provides a way to reuse allocations.

I found it quite convenient to use for cutting holes in walls. My walls are 3D, but I cut wall planes in 2D and generate the rest of the mesh.

@projectharmonia

#bevyengine #projectharmonia #rustlang

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here