recast-navigation 0.10.2 → 0.11.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 +23 -5
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -67,7 +67,11 @@ await init();
67
67
 
68
68
  ### Generating a NavMesh
69
69
 
70
- To create a NavMesh, you can use the `generateSoloNavMesh` and `generateTiledNavMesh` functions.
70
+ The easiest way to generate a NavMesh is using the high level generator functions:
71
+
72
+ - `generateSoloNavMesh` - Generates a NavMesh with a single tile. You can use this for smaller environments.
73
+ - `generateTiledNavMesh` - Generates a NavMesh with multiple tiles. You should use this for larger environments.
74
+ - `generateTileCache` - Generates a TileCache that supports temporary obstacles. See the [Temporary Obstacles](https://github.com/isaac-mason/recast-navigation-js#temporary-obstacles) section.
71
75
 
72
76
  The input positions and indices should adhere to OpenGL conventions:
73
77
 
@@ -98,7 +102,7 @@ const { success, navMesh } = generateSoloNavMesh(
98
102
  );
99
103
  ```
100
104
 
101
- If you need to do something more advanced, you can use the lower level API to create your own NavMesh generator. See the "Advanced Usage" section for more information.
105
+ If you need to do something more advanced, you can use the lower level API to create your own NavMesh generator. See the [Advanced Usage](https://github.com/isaac-mason/recast-navigation-js#advanced-usage) section for more information.
102
106
 
103
107
  ### Querying a NavMesh
104
108
 
@@ -114,6 +118,12 @@ navMeshQuery.getClosestPoint(position);
114
118
  /* get a random point around the given position */
115
119
  const radius = 0.5;
116
120
  navMeshQuery.getRandomPointAround(position, radius);
121
+
122
+ /* compute a straight path between two points */
123
+ const path: Vector3[] = navMeshQuery.computePath(
124
+ { x: 0, y: 0, z: 0 }, // start position
125
+ { x: 2, y: 0, z: 0 } // end position
126
+ );
117
127
  ```
118
128
 
119
129
  ### Crowds and Agents
@@ -292,14 +302,22 @@ This library provides low-level APIs that aim to match the recast and detour c++
292
302
 
293
303
  Please note that this functionality is experimental, and not all everything is exposed. Familiarity with the recast and detour C++ libraries is required. If you require unexposed functionality, please submit an issue or a pull request.
294
304
 
295
- <!-- REMOVE-FROM-DOCS-START -->
305
+ ## Documentation
296
306
 
297
- ## API Documentation
307
+ <!-- REMOVE-FROM-DOCS-START -->
298
308
 
299
- Documentation can be found at [https://docs.recast-navigation-js.isaacmason.com](https://docs.recast-navigation-js.isaacmason.com).
309
+ API Documentation can be found at [https://docs.recast-navigation-js.isaacmason.com](https://docs.recast-navigation-js.isaacmason.com).
300
310
 
301
311
  <!-- REMOVE-FROM-DOCS-END -->
302
312
 
313
+ Documentation for the Recast and Detour c++ libraries can be found here:
314
+
315
+ - [Recast Navigation Website](http://recastnav.com/)
316
+ - [Recast Navigation GitHub](https://github.com/recastnavigation/recastnavigation)
317
+ - [Recast Navigation Google Discussions](https://groups.google.com/g/recastnavigation)
318
+
319
+ The GitHub issues and Google Discussions are a great resources for learning about the library and getting guidance on common issues.
320
+
303
321
  ## Examples
304
322
 
305
323
  Some demonstrations of how to use the library in different environments can be found in the [examples](./examples) directory.
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.10.2",
21
+ "version": "0.11.0",
22
22
  "license": "MIT",
23
23
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
24
24
  "bugs": {
@@ -56,8 +56,8 @@
56
56
  "build-storybook": "storybook build"
57
57
  },
58
58
  "dependencies": {
59
- "@recast-navigation/core": "0.10.2",
60
- "@recast-navigation/three": "0.10.2"
59
+ "@recast-navigation/core": "0.11.0",
60
+ "@recast-navigation/three": "0.11.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@babel/core": "^7.22.11",