Closed Allakazan closed 5 years ago
There is no method for iterating over the edges, but you can use voronoi.render to render all of the edges as a mesh, and you can look at the source if you want to access the edges directly yourself.
This notebook might clarify how this can be done: https://observablehq.com/d/045ae1b3e80973dc
A much simpler method is to use voronoi.render().split(/M/).slice(1)
https://observablehq.com/d/58f6cc721fa26757
I'm making a procedural street pattern with Delaunay, and using
voronoi.cellPolygons()
to get each polygon. But this give me duplicated lines.There's a way to iterate over each line separately ? Thanks !