Navigation · interface
NavEdge
Explained in Navigation.
interface NavEdgeimport type { NavEdge } from '@driftengine/nav';Properties
| Name | Type | Description |
|---|---|---|
fromreadonly | number | |
toreadonly | number | |
costreadonlyoptional | number | What crossing it costs. Defaults to the distance between its ends.MoreA cost is not a distance and the difference is the whole of route quality. Mud, a hill, a
toll, a road an agent should prefer, a corridor it should avoid unless there is nothing else:
all of them are this number, and a consumer that never sets it gets shortest-path behaviour.
The one rule the search depends on is that a cost is never less than the straight-line
distance between the two ends — see |
bidirectionalreadonlyoptional | boolean | Whether it may also be crossed the other way. Default true. |