UNPKG

@brendonhudnell/react-hexgrid

Version:

Interactive hexagon grids with React bindings

19 lines (18 loc) 815 B
import Hex from './models/Hex'; declare function ring(center: Hex, mapRadius: number): Hex[]; declare function spiral(center: Hex, mapRadius: number): Hex[]; declare function parallelogram(q1: number, q2: number, r1: number, r2: number): Hex[]; declare function triangle(mapSize: number): Hex[]; declare function hexagon(mapRadius: number): Hex[]; declare function rectangle(mapWidth: number, mapHeight: number): Hex[]; declare function orientedRectangle(mapWidth: number, mapHeight: number): Hex[]; declare const GridGenerator: { ring: typeof ring; spiral: typeof spiral; parallelogram: typeof parallelogram; triangle: typeof triangle; hexagon: typeof hexagon; rectangle: typeof rectangle; orientedRectangle: typeof orientedRectangle; }; export default GridGenerator;