amaccann / phaser-navmesh-generation

12 stars 1 forks source link

Improve Cluster => Delaunay workflow #7

Open amaccann opened 7 years ago

amaccann commented 7 years ago

There's a bit of repetition between when each recursive cluster is calculated, and when we pass that final data into the Constrained Delaunay generator.

We already have the vertex points of the Cluster when we create a new instance of it, why then loop around the edges needlessly in the DelaunayCluster class to find a unique set of points we already know at this point.

May be doubly relevant when trying to offset the polygons a little to solve the "parallel movement" problem.