five-on-it / packages/world/src/road-graph / RoadEdge
Interface: RoadEdge
Defined in: packages/world/src/road-graph.ts:36
One lane of one stretch of road between two consecutive nodes, in its direction of travel.
Properties
from
from:
number
Defined in: packages/world/src/road-graph.ts:40
The node it starts at.
id
id:
number
Defined in: packages/world/src/road-graph.ts:38
Index into RoadGraph.edges.
lane
lane:
number
Defined in: packages/world/src/road-graph.ts:46
Which lane of its direction, 0 being the rightmost.
length
length:
number
Defined in: packages/world/src/road-graph.ts:50
Distance between the two nodes (m).
offset
offset:
number
Defined in: packages/world/src/road-graph.ts:48
Offset of the lane's centre from the road's centre line, to the right of travel (m).
road
road:
number
Defined in: packages/world/src/road-graph.ts:44
Index into the level's roads.
speed
speed:
number
Defined in: packages/world/src/road-graph.ts:52
Speed limit (m/s).
to
to:
number
Defined in: packages/world/src/road-graph.ts:42
The node it ends at.