1681-engine / index / FindPathOptions
Interface: FindPathOptions ​
Defined in: src/nav/findPath.ts:13
What a search may be told beyond the grid, shared by findPath, floodFill and straightenPath.
Extends ​
Properties ​
cost? ​
ts
optional cost?: (tx, ty) => number;Defined in: src/nav/navGrid.ts:25
Extra cost of stepping onto a tile, on top of the step itself (1 straight, √2 diagonal). Must not be negative, or A* stops being exact. nearWallCost is one: it keeps a route off the edges of a clearing.
Parameters ​
| Parameter | Type |
|---|---|
tx | number |
ty | number |
Returns ​
number
Inherited from ​
endOnly? ​
ts
optional endOnly?: (tx, ty) => boolean;Defined in: src/nav/navGrid.ts:30
Tiles a path may end on but never pass through or brush past diagonally: a door that throws a body onto another map, a trap, a ledge. A start standing on one may still leave it.
Parameters ​
| Parameter | Type |
|---|---|
tx | number |
ty | number |
Returns ​
boolean
Inherited from ​
maxNodes? ​
ts
optional maxNodes?: number;Defined in: src/nav/findPath.ts:15
Tiles settled before giving up, so a goal walled off on a big map cannot stall a frame.