five-on-it / packages/ai/src/traffic-route / buildRoute
Function: buildRoute()
buildRoute(
roads,junctions,junctionAt,lanes):TrafficRoute
Defined in: packages/ai/src/traffic-route.ts:165
The route along lanes (each one leaving the node the one before ends at): see the module documentation. junctionAt maps a node to its index in junctions, or −1.
Parameters
roads
junctions
readonly Junction[]
junctionAt
Int32Array
lanes
readonly number[]