https://github.com/ljedrz/hex-spiral
A single-coordinate concentric 2D hex grid.
https://github.com/ljedrz/hex-spiral
Last synced: 3 months ago
JSON representation
A single-coordinate concentric 2D hex grid.
- Host: GitHub
- URL: https://github.com/ljedrz/hex-spiral
- Owner: ljedrz
- Created: 2022-02-28T12:05:56.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-31T08:16:32.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T13:13:33.142Z (8 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hex-spiral
[](https://crates.io/crates/hex-spiral)
[](https://docs.rs/hex-spiral)
[](https://deps.rs/repo/github/ljedrz/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.
## TODO
- [ ] add conversion from hex position to window/screen coordinates
- [ ] add conversion from window/screen coordinates to hex position
- [ ] revise the APIs and data types