@caveworld/honeycomb-grid
Version:
Create hexagon grids easily
18 lines (17 loc) • 597 B
TypeScript
import { CompassDirection } from '../../compass';
import { Hex, HexCoordinates } from '../../hex';
import { Traverser } from '../types';
export declare function line<T extends Hex>(options: LineAsVectorOptions): Traverser<T>;
export declare function line<T extends Hex>(options: LineBetweenOptions): Traverser<T>;
export interface LineAsVectorOptions {
start?: HexCoordinates;
direction: CompassDirection;
length: number;
}
export interface LineBetweenOptions {
start?: HexCoordinates;
/**
* These coordinates are included in the line.
*/
stop: HexCoordinates;
}