@recast-navigation/core 0.21.0 → 0.22.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.
@@ -31,7 +31,13 @@ export declare class NavMeshQuery {
31
31
  * Finds the polygon nearest to the given position.
32
32
  */
33
33
  findNearestPoly(position: Vector3, options?: {
34
+ /**
35
+ * The polygon filter to apply to the query.
36
+ */
34
37
  filter?: QueryFilter;
38
+ /**
39
+ * The search distance along each axis. [(x, y, z)]
40
+ */
35
41
  halfExtents?: Vector3;
36
42
  }): {
37
43
  success: boolean;
@@ -90,21 +96,39 @@ export declare class NavMeshQuery {
90
96
  * Returns the closest point on the NavMesh to the given position.
91
97
  */
92
98
  getClosestPoint(position: Vector3, options?: {
99
+ /**
100
+ * The polygon filter to apply to the query.
101
+ */
93
102
  filter?: QueryFilter;
103
+ /**
104
+ * The search distance along each axis. [(x, y, z)]
105
+ */
94
106
  halfExtents?: Vector3;
95
107
  }): Vector3;
96
108
  /**
97
109
  * Returns a random point on the NavMesh within the given radius of the given position.
98
110
  */
99
111
  getRandomPointAround(position: Vector3, radius: number, options?: {
112
+ /**
113
+ * The polygon filter to apply to the query.
114
+ */
100
115
  filter?: QueryFilter;
116
+ /**
117
+ * The search distance along each axis. [(x, y, z)]
118
+ */
101
119
  halfExtents?: Vector3;
102
120
  }): Vector3;
103
121
  /**
104
122
  * Moves from the start to the end position constrained to the navigation mesh.
105
123
  */
106
124
  moveAlongSurface(startRef: number, startPosition: Vector3, endPosition: Vector3, options?: {
125
+ /**
126
+ * The polygon filter to apply to the query.
127
+ */
107
128
  filter?: QueryFilter;
129
+ /**
130
+ * The maximum number of polygons the output visited array can hold.
131
+ */
108
132
  maxVisitedSize?: number;
109
133
  }): {
110
134
  success: boolean;
@@ -130,8 +154,18 @@ export declare class NavMeshQuery {
130
154
  * @returns an array of Vector3 positions that make up the path, or an empty array if no path was found.
131
155
  */
132
156
  computePath(start: Vector3, end: Vector3, options?: {
157
+ /**
158
+ * The polygon filter to apply to the query.
159
+ */
133
160
  filter?: QueryFilter;
134
- maxPolyPathLength?: number;
161
+ /**
162
+ * The maximum number of polygons the @p path array can hold. [Limit: >= 1]
163
+ */
164
+ maxPathPolys?: number;
165
+ /**
166
+ * The maximum number of points the straight path arrays can hold. [Limit: > 0]
167
+ */
168
+ maxStraightPathPoints?: number;
135
169
  }): Vector3[];
136
170
  /**
137
171
  * Destroys the NavMeshQuery instance
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.21.0",
9
+ "version": "0.22.0",
10
10
  "license": "MIT",
11
11
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
12
12
  "bugs": {
@@ -26,7 +26,7 @@
26
26
  "lint": "eslint --ext .ts src"
27
27
  },
28
28
  "dependencies": {
29
- "@recast-navigation/wasm": "0.21.0"
29
+ "@recast-navigation/wasm": "0.22.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.24.4",