threejs-worldgen
    Preparing search index...

    Interface RoadOptions

    Road network rules (Parish & Müller 2001 global goals + local constraints).

    interface RoadOptions {
        arms: number;
        extent: number;
        maxBridge: number;
        maxGrade: number;
        maxSegments: number;
        minAngle: number;
        minor: RoadClassOptions;
        primary: RoadClassOptions;
        rural: Record<RoadType, RoadSurface>;
        secondary: RoadClassOptions;
        snapRadius: number;
        surfaceSpeed: Record<RoadSurface, number>;
        traffic: Record<RoadType, RoadTraffic>;
        unpavedWidth: number;
    }
    Index
    arms: number

    Arterials leaving the centre (0 = from the size class).

    extent: number

    How far beyond the radius arterials reach (multiple of the radius).

    maxBridge: number

    Longest stretch of water a bridge may span, metres (0 = no bridges).

    maxGrade: number

    Steepest grade a road segment may climb (rise / run) before it is steered or pruned.

    maxSegments: number

    Hard cap on growth steps (keeps huge settings bounded).

    minAngle: number

    Smallest angle between two roads at a junction, degrees.

    Local streets.

    Arterial roads.

    rural: Record<RoadType, RoadSurface>

    Surfaces of roads through farmland (used where worse than the settlement's own).

    secondary: RoadClassOptions

    Collector roads.

    snapRadius: number

    Road ends within this distance of a junction or road join it, metres.

    surfaceSpeed: Record<RoadSurface, number>

    Speed multiplier per surface (cobbles and dirt are slow).

    traffic: Record<RoadType, RoadTraffic>

    Lanes per direction and speed limit (m/s) per class, for vehicles.

    unpavedWidth: number

    Gravel and dirt roads are this much narrower (fraction of the class width).