Skip to content

Commit 54e61b6

Browse files
committed
chore(*): update README
1 parent 263d511 commit 54e61b6

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ const pathfinding = new Pathfinding(
4141

4242
- `config` - _Pathfinding configuration_
4343

44-
| Prop | Description | Default |
45-
| -------------- | -------------------------------------------------------------------------------- | ------- |
46-
| loopRate | Pause before executing the next task after all previous ones have been completed | 100 ms |
47-
| maxStackSize | Max recursive depth to handle task in one tick | 128 |
48-
| resourceLimits | Worker resource limits | - |
44+
| Prop | Description | Default |
45+
| --------------- | ----------------------------------------------------- | ------- |
46+
| taskFindingRate | Delay to handle next task after all previous are done | 100 ms |
47+
| maxStackSize | Max recursive depth to handle task in one tick | 128 |
48+
| resourceLimits | Worker resource limits | - |
4949

5050
### ⚡️ Terminate worker thread
5151

@@ -112,6 +112,11 @@ const idTask = layer.findPath(
112112

113113
- `callback` - _Callback with result_
114114

115+
| Prop | Description | Type |
116+
| ------ | ------------------- | --------------- |
117+
| path | Path to target cell | Array<{ x, y }> |
118+
| weight | Total path weight | number |
119+
115120
### ⚡️ Cancel pathfinder task
116121

117122
```ts

dist/task/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type PathfindingTaskConfig = {
2121
*/
2222
export type PathfindingTaskResult = {
2323
/**
24-
* Path from starting cell to ending cell
24+
* Path to target cell
2525
* Will be null if path is not found
2626
*/
2727
path: PathfindingPoint[] | null;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pathfinding-worker",
33
"description": "Fast node.js pathfinding on workers for grid-based games",
4-
"version": "2.7.0",
4+
"version": "2.7.1",
55
"keywords": [
66
"astar",
77
"dijkstra",

src/task/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type PathfindingTaskConfig = {
2525
*/
2626
export type PathfindingTaskResult = {
2727
/**
28-
* Path from starting cell to ending cell
28+
* Path to target cell
2929
* Will be null if path is not found
3030
*/
3131
path: PathfindingPoint[] | null;

0 commit comments

Comments
 (0)