1681-engine / index / flowField
Function: flowField() ​
ts
function flowField(
g,
goals,
options?
): FlowField;Defined in: src/nav/flowField.ts:26
A flow field towards goals (any number: every door out of a burning house), by the same steps, corner rules, costs and end-only tiles findPath takes, so a body following it walks the route findPath would have found. maxCost stops the spread (bodies further off stand still or wander).
Parameters ​
| Parameter | Type |
|---|---|
g | NavGrid |
goals | readonly TilePoint[] |
options | NavOptions & object |