@caveworld/honeycomb-grid
Version:
Create hexagon grids easily
6 lines (5 loc) • 481 B
TypeScript
import { CompassDirection } from '../../compass';
import { Hex, PartialCubeCoordinates } from '../../hex';
export declare const neighborOfPointy: <T extends Hex>({ offset, q, r, col, row }: T, direction: CompassDirection) => PartialCubeCoordinates;
export declare const neighborOfFlat: <T extends Hex>({ offset, q, r, col, row }: T, direction: CompassDirection) => PartialCubeCoordinates;
export declare const neighborOf: <T extends Hex>(hex: T, direction: CompassDirection) => T;