@recast-navigation/core 0.7.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/nav-mesh-query.d.ts +22 -0
- package/package.json +3 -3
package/dist/nav-mesh-query.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare class NavMeshQuery {
|
|
|
21
21
|
filter?: R.dtQueryFilter;
|
|
22
22
|
halfExtents?: Vector3;
|
|
23
23
|
}): {
|
|
24
|
+
success: boolean;
|
|
24
25
|
status: number;
|
|
25
26
|
nearestRef: number;
|
|
26
27
|
nearestPoint: {
|
|
@@ -31,6 +32,7 @@ export declare class NavMeshQuery {
|
|
|
31
32
|
isOverPoly: boolean;
|
|
32
33
|
};
|
|
33
34
|
closestPointOnPoly(polyRef: number, position: Vector3): {
|
|
35
|
+
success: boolean;
|
|
34
36
|
status: number;
|
|
35
37
|
closestPoint: {
|
|
36
38
|
x: number;
|
|
@@ -51,10 +53,19 @@ export declare class NavMeshQuery {
|
|
|
51
53
|
getRandomPointAround(position: Vector3, radius: number, options?: {
|
|
52
54
|
filter?: R.dtQueryFilter;
|
|
53
55
|
}): Vector3;
|
|
56
|
+
/**
|
|
57
|
+
* Moves from the start to the end position constrained to the navigation mesh.
|
|
58
|
+
* @param startRef
|
|
59
|
+
* @param startPosition
|
|
60
|
+
* @param endPosition
|
|
61
|
+
* @param options
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
54
64
|
moveAlongSurface(startRef: number, startPosition: Vector3, endPosition: Vector3, options?: {
|
|
55
65
|
filter?: R.dtQueryFilter;
|
|
56
66
|
maxVisitedSize?: number;
|
|
57
67
|
}): {
|
|
68
|
+
success: boolean;
|
|
58
69
|
status: number;
|
|
59
70
|
resultPosition: {
|
|
60
71
|
x: number;
|
|
@@ -63,6 +74,17 @@ export declare class NavMeshQuery {
|
|
|
63
74
|
};
|
|
64
75
|
visited: number[];
|
|
65
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Gets the height of the polygon at the provided position using the height detail
|
|
79
|
+
* @param polyRef
|
|
80
|
+
* @param position
|
|
81
|
+
* @returns
|
|
82
|
+
*/
|
|
83
|
+
getPolyHeight(polyRef: number, position: Vector3): {
|
|
84
|
+
success: boolean;
|
|
85
|
+
status: number;
|
|
86
|
+
height: number;
|
|
87
|
+
};
|
|
66
88
|
/**
|
|
67
89
|
* Finds a straight path from the start position to the end position.
|
|
68
90
|
*
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"email": "isaac@isaacmason.com",
|
|
7
7
|
"url": "https://isaacmason.com/"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.8.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"homepage": "https://github.com/isaac-mason/recast-navigation-js",
|
|
12
12
|
"bugs": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test": "vitest run"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@recast-navigation/wasm": "0.
|
|
28
|
+
"@recast-navigation/wasm": "0.8.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/core": "^7.22.11",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@rollup/plugin-typescript": "^11.1.2",
|
|
36
36
|
"@types/three": "^0.155.0",
|
|
37
37
|
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
|
38
|
-
"@typescript-eslint/parser": "^6.
|
|
38
|
+
"@typescript-eslint/parser": "^6.6.0",
|
|
39
39
|
"babel-loader": "^8.2.5",
|
|
40
40
|
"eslint": "^8.5.0",
|
|
41
41
|
"eslint-config-airbnb": "^18.2.1",
|