Skip to content

Commit

Permalink
feat(*): update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
neki-dev committed Jul 26, 2024
1 parent 1f35923 commit f14a16f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export declare class Pathfinding {
*
* @param config - Pathfinding configuration
*/
constructor({ runtime, workerPath, loopRate, }?: PathfindingConfig);
constructor({ runtime, workerPath, loopRate, resourceLimits, }?: PathfindingConfig);
/**
* Terminate worker thread.
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/task/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ export declare class PathfindingTask {
readonly from: PathfindingPosition;
readonly to: PathfindingPosition;
readonly id: number;
readonly diagonals: boolean;
readonly layer: string;
private tree;
private nodes;
readonly complete: (result: PathfindingTaskResult) => void;
constructor({ idTask, from, to, layer }: PathfindingTaskConfig, onComplete: (result: PathfindingTaskResult) => void);
constructor({ idTask, from, to, layer, diagonals }: PathfindingTaskConfig, onComplete: (result: PathfindingTaskResult) => void);
private getDistanceFrom;
addNode(parent: PathfindingNode, position: PathfindingPosition, weight: number): void;
private pushNode;
Expand Down
1 change: 1 addition & 0 deletions dist/task/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export type PathfindingTaskConfig = {
from: PathfindingPosition;
to: PathfindingPosition;
layer: string;
diagonals?: boolean;
};
export type PathfindingTaskResult = {
path: PathfindingPosition[] | null;
Expand Down
9 changes: 9 additions & 0 deletions dist/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ResourceLimits } from 'worker_threads';
export type PathfindingConfig = {
/**
* Finding process loop rate
Expand All @@ -14,6 +15,10 @@ export type PathfindingConfig = {
* Default: true
*/
runtime?: boolean;
/**
* Worker resource limits
*/
resourceLimits?: ResourceLimits;
};
export type PathfindingTaskConfig = {
/**
Expand All @@ -28,6 +33,10 @@ export type PathfindingTaskConfig = {
* End tile position
*/
to: PathfindingPosition;
/**
* Allow diagonal directions
*/
diagonals?: boolean;
};
export type PathfindingPosition = {
x: number;
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pathfinding-worker",
"description": "Fast node.js pathfinding on workers for grid-based games",
"version": "1.1.0",
"version": "1.2.0",
"keywords": [
"astar",
"dijkstra",
Expand Down Expand Up @@ -46,8 +46,7 @@
"typescript": "5.5.3",
"typescript-eslint": "7.16.1",
"webpack": "5.93.0",
"webpack-cli": "5.1.4",
"wrapper-webpack-plugin": "^2.2.2"
"webpack-cli": "5.1.4"
},
"repository": {
"type": "git",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3984,11 +3984,6 @@ wrap-ansi@^7.0.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrapper-webpack-plugin@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/wrapper-webpack-plugin/-/wrapper-webpack-plugin-2.2.2.tgz#a950b7fbc39ca103e468a7c06c225cb1e337ad3b"
integrity sha512-twLGZw0b2AEnz3LmsM/uCFRzGxE+XUlUPlJkCuHY3sI+uGO4dTJsgYee3ufWJaynAZYkpgQSKMSr49n9Yxalzg==

wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
Expand Down

0 comments on commit f14a16f

Please sign in to comment.