threejs-worldgen
    Preparing search index...

    Interface RoadSurfaceContext

    Live inputs of a RoadSurface (not JSON); all optional, for adopting it on other geometry.

    interface RoadSurfaceContext {
        coords?: Node;
        halfWidth?: Node;
        look?: StateLook;
        part?: Node;
        states?: Partial<
            Record<StateChannel | "heat" | "ash", number | Node<"float">>,
        >;
        surfaceIndex?: Node;
        time?: Node;
    }

    Hierarchy (View Summary)

    Index
    coords?: Node

    (metres across from the centreline, metres along). Default: uv().

    halfWidth?: Node

    Half carriageway width node. Default: width / 2. threejs-city: attribute('road', 'vec4').x.

    look?: StateLook

    Weathering look.

    part?: Node

    Part code node (ROAD_PART). Default: the roadPart vertex attribute. threejs-city: attribute('road', 'vec4').w.

    states?: Partial<Record<StateChannel | "heat" | "ash", number | Node<"float">>>

    Per-pixel weather, e.g. a threejs-weathering StateField.node(). Combined with options.states by max.

    surfaceIndex?: Node

    Surface index node (ROAD_SURFACE_KINDS). Default: options.surface. threejs-city: attribute('road', 'vec4').z.

    time?: Node

    Seconds for animated weather.