Skip to content

Commit

Permalink
Cleanup: remove rollup, as I wasn't using it
Browse files Browse the repository at this point in the history
Also added a note about how I'm not using this library anymore.
Switched from watchify to esbuild for the docs.
  • Loading branch information
redblobgames committed Sep 24, 2024
1 parent 35be98e commit 550dbbe
Show file tree
Hide file tree
Showing 5 changed files with 1,433 additions and 1,913 deletions.
4 changes: 3 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[[http://unmaintained.tech/][http://unmaintained.tech/badge.svg]]

*This is my 2017 library* but in 2023 I abandoned this and switched to a [[https://www.redblobgames.com/x/2312-dual-mesh/][newer library]].

Dual mesh library for my polygon map generator projects (mapgen2, mapgen4). Feel free to use this, but it's not a stable library and I do make breaking changes. The create.js interface is the most likely to change in the future.

This is a wrapper around [[https://mapbox.github.io/delaunator/][Delaunator]]. I wrote the [[https://mapbox.github.io/delaunator/][Delaunator Guide]] based on the code from this project. The code in the guide is easier to read and more general but less efficient than the code in this library.

[[https://redblobgames.github.io/dual-mesh/][Documentation is here]], but it's a bit rough. See [[http://www.redblobgames.com/x/1721-voronoi-alternative/][my blog post about centroid polygons]] and [[http://www.redblobgames.com/x/1722-b-rep-triangle-meshes/][my blog post about the dual mesh data structure]] for the history. Those blog posts used the names “seeds, edges, triangles” but now I call them “regions, sides, triangles”, and I use “ghost” elements to eliminate the boundaries.

The naming convention is: =x_name_y= takes type x (r, s, t) as input and produces type y (r, s, t) as output. For example, =s_begin_r= is a function that takes a side (s) as input and returns a region (r), and could be called ~r = mesh.s_begin_r(s)~.
The naming convention is: =x_name_y= takes type x (r, s, t) as input and produces type y (r, s, t) as output. For example, =s_begin_r= is a function that takes a side (s) as input and returns a region (r), and could be called ~r = mesh.s_begin_r(s)~. In 2023 [[https://www.redblobgames.com/x/2312-dual-mesh/][I changed conventions]] to use =y_from_x=, putting the output first.

For efficiency, the accessors never allocate new arrays, but take a parameter where the result should be written:

Expand Down
Loading

0 comments on commit 550dbbe

Please sign in to comment.