threejs-worldgen
    Preparing search index...

    Function decorateRoads

    • Places street furniture and rural props along a road network deterministically: street lights, hydrants, bins, benches and bus stops on urban sidewalks; traffic lights, stop signs and street name signs at junctions; speed limit signs; and along rural roads power lines on one side, mailboxes at lot frontages (or driveways), biome-matched fence runs, hay bales in the fields and the odd well. Props never stand in water, on the carriageway, or on top of each other.

      Parameters

      Returns PropPlacement[]

      Placements for Props (poles of one power line share a line id).

      const placements = decorateRoads(city.data()!.roads, world, { seed: 7, powerLines: { spacing: 40 } }, { frame: city.frame, lots: city.data()!.lots })
      const props = await Props.create({ placements })
      city.local.add(props.object)