recast-navigation 0.21.0 → 0.23.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.
Files changed (2) hide show
  1. package/README.md +8 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -170,10 +170,17 @@ const radius = 0.5;
170
170
  navMeshQuery.getRandomPointAround(position, radius);
171
171
 
172
172
  /* compute a straight path between two points */
173
- const path: Vector3[] = navMeshQuery.computePath(
173
+ const computePathResult = navMeshQuery.computePath(
174
174
  { x: 0, y: 0, z: 0 }, // start position
175
175
  { x: 2, y: 0, z: 0 } // end position
176
176
  );
177
+
178
+ if (!computePathResult.success) {
179
+ console.log(computePathResult.error);
180
+ }
181
+
182
+ const path = computePathResult.path; // { x: number, y: number, z: number }[]
183
+
177
184
  ```
178
185
 
179
186
  ### Crowds and Agents
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "email": "isaac@isaacmason.com",
19
19
  "url": "https://isaacmason.com/"
20
20
  },
21
- "version": "0.21.0",
21
+ "version": "0.23.0",
22
22
  "license": "MIT",
23
23
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
24
24
  "bugs": {
@@ -66,9 +66,9 @@
66
66
  "lint": "eslint --ext .ts src"
67
67
  },
68
68
  "dependencies": {
69
- "@recast-navigation/core": "0.21.0",
70
- "@recast-navigation/generators": "0.21.0",
71
- "@recast-navigation/three": "0.21.0"
69
+ "@recast-navigation/core": "0.23.0",
70
+ "@recast-navigation/generators": "0.23.0",
71
+ "@recast-navigation/three": "0.23.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@babel/core": "^7.24.4",