recast-navigation 0.10.0 → 0.10.2
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/README.md +28 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
**recast-navigation-js** is a WebAssembly port of [the Recast and Detour libraries](https://github.com/recastnavigation/recastnavigation). Recast is a state of the art navigation mesh construction toolset for games, and Detour is a path-finding and spatial reasoning toolkit.
|
|
23
23
|
|
|
24
|
-
This library provides high level APIs that make it easy to get started creating navigation meshes, querying them, and simulating crowds. It also provides lower-level APIs that give you fine-grained control over the navmesh generation process.
|
|
24
|
+
This library provides high level APIs that make it easy to get started creating navigation meshes, querying them, and simulating crowds. It also provides lower-level APIs that give you fine-grained control over the navmesh generation process.
|
|
25
25
|
|
|
26
26
|
> **Warning** This library is still in early development. Versions in the 0.x.x range may have breaking changes.
|
|
27
27
|
|
|
@@ -230,6 +230,33 @@ tileCache.removeObstacle(boxObstacle);
|
|
|
230
230
|
tileCache.removeObstacle(cylinderObstacle);
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
+
### Off Mesh Connections
|
|
234
|
+
|
|
235
|
+
Off mesh connections are user-defined connections between two points on a NavMesh. You can use them to create things like ladders, teleporters, jump pads, etc.
|
|
236
|
+
|
|
237
|
+
Off mesh connections can be bidirectional or unidirectional.
|
|
238
|
+
|
|
239
|
+
You can provide list of off mesh connections to the high level generator functions.
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
const { success, navMesh } = generateSoloNavMesh(positions, indices, {
|
|
243
|
+
// ...
|
|
244
|
+
offMeshConnections: [
|
|
245
|
+
{
|
|
246
|
+
startPosition: { x: 0, y: 5, z: 0 },
|
|
247
|
+
endPosition: { x: 2, y: 0, z: 0 },
|
|
248
|
+
radius: 0.5,
|
|
249
|
+
bidirectional: false,
|
|
250
|
+
area: 0,
|
|
251
|
+
flags: 1,
|
|
252
|
+
userId: 0, // optional
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
});
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
You can use `agent.state()` to determine if an agent is currently traversing an off mesh connection.
|
|
259
|
+
|
|
233
260
|
### Debugging
|
|
234
261
|
|
|
235
262
|
You can use `getDebugNavMesh` to get a debug representation of the NavMesh.
|
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.
|
|
21
|
+
"version": "0.10.2",
|
|
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.
|
|
60
|
-
"@recast-navigation/three": "0.10.
|
|
59
|
+
"@recast-navigation/core": "0.10.2",
|
|
60
|
+
"@recast-navigation/three": "0.10.2"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@babel/core": "^7.22.11",
|