File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed
Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export type PathfindingTaskConfig = {
2121 */
2222export 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 ;
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export type PathfindingTaskConfig = {
2525 */
2626export 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 ;
You can’t perform that action at this time.
0 commit comments