Delaunator GDScript
Delaunator GDScript is a GDScript port of the Delaunator library, providing fast Delaunay triangulation of 2D points within the Godot Engine. It offers efficient computation of Voronoi cells and includes comprehensive API documentation and performance benchmarks.
https://github.com/hiulit/Delaunator-GDScriptPreview Images


Delaunator GDScript: Fast Delaunay Triangulation for Godot
Delaunator GDScript is a port of the popular Delaunator library, designed for fast Delaunay triangulation of 2D points in the Godot Engine. This library is particularly useful for applications requiring efficient computation of Voronoi cells and other spatial data structures.
Key Features
- Delaunay Triangulation: Efficiently computes Delaunay triangulations from a set of 2D points.
- Voronoi Cell Generation: Supports the generation of Voronoi cells based on the Delaunay triangulation.
- Comprehensive API: Provides a well-documented API for constructing and manipulating Delaunay triangulation objects.
- Performance Benchmarks: Includes performance benchmarks to illustrate the library's speed and efficiency.
Usage
The library is easy to use, with a simple API for constructing Delaunay triangulation objects from arrays of Vector2 points. The resulting triangulation data can then be accessed through the triangles
, halfedges
, and hull
properties.
Performance
While GDScript's performance might not match the original library's speed, Delaunator GDScript still offers reasonable performance for many applications. The provided benchmarks offer insights into the library's performance with varying numbers of points.
This library is a valuable asset for Godot Engine developers working on projects that require Delaunay triangulation or Voronoi cell generation.