hexagon_core 1.0.0-beta.1
hexagon_core: ^1.0.0-beta.1 copied to clipboard
Pure Dart hexagonal grid math: axial, cube, offset and doubled coordinates, pixel layouts, map shapes, pathfinding, reachability and field of view.
1.0.0-beta.1 #
Beta of 1.0.0. The API may still change before the stable release.
First release, split out of hexagon so the grid math can be used without
Flutter.
Hex: axial/cube coordinates, arithmetic, distance, neighbors and diagonals, rotation, reflection, lines, rings, spirals and ranges.- Offset (odd/even, rows or columns) and doubled coordinate conversions.
FractionalHexwith cube rounding.HexLayout: hex ↔ pixel conversion with spacing and origin, corners, bounds and visible-hex queries (hexesInRect).HexShape: hexagon, rectangle, parallelogram and triangle maps. Triangles point up, down, left or right for both hexagon types (exact when the base follows the hexagons' flat sides, stepped otherwise), can be centered on a hex or hollow.HexShape.outlineandHexShape.centerOnwork with any shape.HexMap<T>: per-cell storage.HexSearch:reachable(Dijkstra),pathTo(A*),canSeeandfieldOfView.HexagonType(moved fromhexagon), with the oldFLAT/POINTYnames kept as deprecated aliases anddart fixsupport for renaming them.