Skip to content

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 ​

RoadGraph

junctions ​

readonly Junction[]

junctionAt ​

Int32Array

lanes ​

readonly number[]

Returns ​

TrafficRoute