Classes
Type Definitions
DistanceMethod
Properties:
| Name | Type | Description |
|---|---|---|
Octile | octile | (Recommended) Is a variant of Chebyshev distance used when movement is allowed along diagonals in addition to horizontal and vertical directions, but diagonal movement has a cost of √2 times that of horizontal or vertical movement |
Manhattan | manhattan | It is a distance metric between two points in an N-dimensional vector space. |
Chebyshev | chebyshev | It is a distance metric defined on a vector space where the distance between two vectors is the greatest of their differences along any coordinate dimension |
- Source:
PathfindingConfig :Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
simplify | boolean | <optional> | false | If true the path will return only the nodes that change direction |
distanceMethod | DistanceMethod | <optional> | Octile | Choose the distance method to use, for more info see DistanceMethod |
diagonal | boolean | <optional> | true | If false the path won't have diagonal moves, and the Manhattan distance method will not have zig zag moves |
- Source: