PathfindingOptions
geometry/grid.types.ts:74 Extends NeighborOptions
Options for Grid.findPath. Extends NeighborOptions so the
same diagonal/wrap connectivity rules govern which moves the search may
make.
By default the search reads walkability and movement cost straight off each
cell's Cell.passable and Cell.cost metadata. The optional
callbacks override that per call without mutating the grid — pass an
isPassable that consults a separate mask, a line-of-sight check, or a
unit's movement rules.
Properties
cost?: (cell: Cell<TData>) => number Returns the cost of stepping into a cell. Defaults to reading
Cell.cost. Higher values make the search route around a cell;
values must be positive. For diagonal moves the cost is scaled by √2.
diagonal?: boolean When true, the four diagonal cells are included alongside the four
orthogonal ones, giving 8-connectivity. Defaults to false
(4-connectivity).
heuristic?: GridHeuristic isPassable?: (cell: Cell<TData>) => boolean Predicate deciding whether the search may step into a cell. Defaults to
reading Cell.passable. The start cell is always a valid origin
even when this returns false; the end cell must satisfy it or the path
is unreachable.
wrap?: boolean When true, lookups that fall off an edge wrap around to the opposite
edge (the grid behaves as a torus) instead of being dropped. Defaults to
false.