Skip to content

GameboardCoordinateSystem

Defined in: src/coordinates/grid.ts:81

Convenience surface for KayKit-compatible coordinate math.

distance: (left, right) => number

Defined in: src/coordinates/grid.ts:93

Computes axial hex distance between two coordinates.

HexCoordinates

HexCoordinates

number


findPath: (start, goal, options?) => HexPathResult

Defined in: src/coordinates/grid.ts:95

Finds a path between two coordinates using the shared pathfinding helper.

HexCoordinates

HexCoordinates

HexPathOptions

HexPathResult


fromWorld: (position) => HexCoordinates

Defined in: src/coordinates/grid.ts:89

Converts a world X/Z position to the nearest axial coordinate.

Pick<WorldPosition, "x" | "z">

HexCoordinates


geometry: HexGeometry

Defined in: src/coordinates/grid.ts:83

Geometry used by all conversions in this coordinate system.


neighbors: (coordinates) => HexCoordinates[]

Defined in: src/coordinates/grid.ts:91

Returns the six axial neighbors around a coordinate.

HexCoordinates

HexCoordinates[]


rowSpacing: number

Defined in: src/coordinates/grid.ts:85

Z-axis spacing between adjacent hex rows.


spawnLocations: (options) => SpawnLocation[]

Defined in: src/coordinates/grid.ts:97

Selects deterministic spawn locations and projects them into world space.

SpawnLocationOptions

SpawnLocation[]


toWorld: (coordinates, elevation?) => WorldPosition

Defined in: src/coordinates/grid.ts:87

Converts an axial coordinate and optional elevation into world space.

HexCoordinates

number

WorldPosition