1 unstable release
0.1.0 | Mar 3, 2022 |
---|
#457 in Visualization
17KB
340 lines
hex-spiral
hex-spiral is library for working with 2D hexagonal maps using single-coordinate positions.
Overview
While most hex-grid-based 2D games use multiple coordinates, hex-spiral uses a single-coordinate spiral,
where the central hex has the position 0
, and further hexes are placed within theoretical hexagonal rings
that surround it.
lib.rs
:
While most hex-grid-based 2D games use multiple coordinates, hex-spiral uses a single-coordinate spiral,
where the central hex has the position 0
, and further hexes are placed within theoretical hexagonal rings
that surround it. The hexes are flat-topped and every ring is indexed starting with the hex on the top edge
of the previous ring and with further positions growing clockwise.
Dependencies
~3.5MB
~56K SLoC