UNPKG

@rickosborne/hexgrid

Version:

Rick Osborne's collection of hexagonal grid-related code.

10 lines 796 B
import type { HexLayout, PointXY } from "./orientation.js"; import type { BareQRSPoint } from "./qrs.js"; export declare const pixelFromFlatQRS: ({ q, r }: BareQRSPoint, scale?: number) => PointXY; export declare const pixelFromPointyQRS: ({ q, r }: BareQRSPoint, scale?: number) => PointXY; export declare const pixelFromQRS: ({ q, r }: BareQRSPoint, { orientation: { f0, f1, f2, f3 }, origin: { x: cx, y: cy }, size: { x: scaleX, y: scaleY } }: HexLayout) => PointXY; export type HexCorner = 0 | 1 | 2 | 3 | 4 | 5; export declare const HEX_CORNERS: readonly HexCorner[]; export declare const pixelOffsetOfCorner: (t: HexCorner, u: HexLayout) => Readonly<PointXY>; export declare const hexCorners: (qrs: BareQRSPoint, layout: HexLayout) => PointXY[]; //# sourceMappingURL=pixel-from-qrs.d.ts.map