threejs-worldgen
    Preparing search index...

    Class RoadPath

    A road, sidewalk or path ribbon following a polyline over the terrain, drawn with a RoadSurface.

    const lane = new RoadPath({ scene, height: world.height, points: [[0, 0], [80, 30], [200, 20]], width: 4, surface: { surface: 'dirt' } })
    lane.surface.set({ states: { wetness: 0.9 } }) // puddles in the ruts
    Index
    height?: (x: number, z: number) => number

    Ground height used for draping.

    object: Mesh

    The mesh (frame-local coordinates).

    Resolved settings.

    surface: RoadSurface

    The material and its look.

    • Rebuilds the ribbon (e.g. after the ground changed).

      Returns void