Skip to content

five-on-it / apps/tools/src/port-level / splitRoads

Function: splitRoads() ​

splitRoads(roads): RoadDef[]

Defined in: apps/tools/src/port-level.ts:83

Roads as blocks can hold them: a two-point road as itself, a polyline (a bend, a serpentine) as one straight slab per segment, named <name>-1, <name>-2, …. Lossy on purpose: a bend has no block, so the scene holds the chain and the export gives it back as that many two-point roads, which the road graph joins end to end. A real curve is a kit road piece carrying its centre line.

Parameters ​

roads ​

readonly RoadDef[]

Returns ​

RoadDef[]