Skip to content
forked from lanius/dynagon

Dynamically generates polygon meshes in Unity.

License

Notifications You must be signed in to change notification settings

bitnaughts/dynagon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • C# 100.0%