Skip to content

five-on-it / packages/world/src/road-route / roadRoute

Function: roadRoute() ​

roadRoute(graph, from, to): GroundPoint[]

Defined in: packages/world/src/road-route.ts:102

The route from from to to over the roads: the two points, where it joins and leaves the roads, and every node it passes in between, in order (the centre lines'). Straight from one to the other when the level has no roads or no lane leads from the one to the other.

Parameters ​

graph ​

RoadGraph

from ​

GroundPoint

to ​

GroundPoint

Returns ​

GroundPoint[]