Skip to content

lanius/dynagon

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Dynagon

Dynamically generates polygon meshes in Unity. It implements 2D/3D Delaunay triangulation.

Demo

Dynagon demo

Usage

Drop Dynagon folder into Assets of the project.

Can create meshes from vertices:

using UnityEngine;
using System.Collections.Generic;
using Dynagon;

var vertices = new List<Vector3>() {
    new Vector3(0f, 1f, 0f),
    new Vector3(0f, -0.3f, 0.9f),
    new Vector3(0.8f, -0.3f, -0.5f),
    new Vector3(-0.8f, -0.3f, -0.5f)
};

Factory.Create(vertices);

Or separately, can triangulate and create a polygon:

var triangles = Triangulator3D.Triangulate(vertices);
new Polygon3D(new GameObject(), triangles).Build();

See samples for more details.

About

Dynamically generates polygon meshes in Unity.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages