An Elm library for hexagonal grids handling, based on the awesome
Hexagonal Grids Reference from Red Blob Games
and extracted from Tacks source code.
For now this lib is focused on axial coordinates for horizontal (pointy-topped) hexagons.
Coordinates handling (
- Find pixel center of an hexagon:
- Find hexagon containing a pixel point:
- Compute "hexagonal distance" between two hexagons:
- Compute line between to hexagons:
- Compute all hexagons within distance from an hexagon (area):
Naive grid storage (
- A grid is a
Dict Int (Dict Int a)
- Get, set and remove data on grid:
- List all tiles in grid:
- Deal with vertical (flat-topped) hexagons
- Expose cubic functions (split
Hexagons main module into coordinates systems' specific modules?)
- Tests, tests, test!