threejs-worldgen
    Preparing search index...

    Interface RoadNetwork

    The road network vehicles drive on. RoadGraph from threejs-city fits as is (city.graph), but any planar graph with these fields works.

    interface RoadNetwork {
        edges: readonly { a: number; b: number; width: number }[];
        nodes: readonly {
            edges: readonly number[];
            x: number;
            y: number;
            z: number;
        }[];
    }
    Index
    edges: readonly { a: number; b: number; width: number }[]

    Straight road segments between nodes.

    nodes: readonly { edges: readonly number[]; x: number; y: number; z: number }[]

    Intersections; y may be NaN (then a height function or 0 is used).