hex-world
    Preparing search index...

    Interface RoadGeneratorOptions

    interface RoadGeneratorOptions {
        gridSpacing?: number;
        maxElevationDiff?: number;
        waterTerrainIndex?: number | number[];
        bridges?: boolean;
        orientation?: HexOrientation;
    }
    Index

    Properties

    gridSpacing?: number

    Grid spacing between parallel horizontal and vertical road bands. Default 24.

    maxElevationDiff?: number

    Maximum elevation difference between adjacent cells for a road to continue. Default 1.

    waterTerrainIndex?: number | number[]

    Terrain index(es) treated as impassable water. Default [5] (built-in Water).

    bridges?: boolean

    Let roads cross river cells. A road never shares an edge with a river, but it may pass through a river cell from bank to bank, and the chunk builder spans that crossing with a deck (see hasBridge). Default true; false stops a road at the bank instead.

    orientation?: HexOrientation

    Hex orientation providing the edge-index → direction mapping. Must match the layout used for rendering or road edges point at the wrong neighbors. Default POINTY_TOP. Note: the offset-grid traversal (odd-r rows) assumes a pointy-top layout — see the library's offset coordinate convention.