recast-navigation 0.7.1 → 0.7.3

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 +100 -6
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,27 +1,55 @@
1
- # recast-navigation
1
+ ![cover](https://raw.githubusercontent.com/isaac-mason/recast-navigation-js/main/packages/recast-navigation/cover.png)
2
2
 
3
- ### Recast Navigation for JavaScript!
3
+ [![Version](https://img.shields.io/npm/v/recast-navigation?style=for-the-badge)](https://www.npmjs.com/package/recast-navigation)
4
+ ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/isaac-mason/recast-navigation-js/release.yml?style=for-the-badge)
5
+ [![Downloads](https://img.shields.io/npm/dt/recast-navigation.svg?style=for-the-badge)](https://www.npmjs.com/package/recast-navigation)
6
+ [![Bundle Size](https://img.shields.io/bundlephobia/min/recast-navigation?style=for-the-badge&label=bundle%20size)](https://bundlephobia.com/result?p=recast-navigation)
4
7
 
5
- A WebAssembly port of [Recast Navigation](https://github.com/recastnavigation/recastnavigation), plus other goodies.
8
+ # recast-navigation-js
6
9
 
7
- ## Features
10
+ ### [Try the NavMesh Generator Website!](https://navmesh.isaacmason.com/)
8
11
 
9
12
  - 📐 ‎ NavMesh generation
10
13
  - 🧭 ‎ Pathfinding
11
14
  - 🧑‍🤝‍🧑 ‎ Crowd simulation
15
+ - 🚧 ‎ Temporary obstacles
12
16
  - 🌐 ‎ Web and Node support
13
17
  - 💙 ‎ TypeScript friendly
14
18
  - 🖇 ‎ [Easy integration with three.js via @recast-navigation/three](https://github.com/isaac-mason/recast-navigation-js/tree/main/packages/recast-navigation-three)
15
19
 
20
+ ## Overview
21
+
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
+
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
+
26
+ > **Warning** This library is still in early development. Versions in the 0.x.x range may have breaking changes.
27
+
16
28
  ## Installation
17
29
 
18
- You can install the library using npm:
30
+ This package ships as ECMAScript modules, and is compatible with Node.js and browser environments.
31
+
32
+ **CDN**
33
+
34
+ ```html
35
+ <script type="module">
36
+ import { generateSoloNavMesh } from 'https://www.unpkg.com/@recast-navigation/core@0.7.1/dist/index.es.js';
37
+ </script>
38
+ ```
39
+
40
+ **NPM**
19
41
 
20
42
  ```sh
21
43
  npm install recast-navigation
22
44
  ```
23
45
 
24
- This package ships as ECMAScript modules, and is compatible with Node.js and browser environments.
46
+ If you are using Vite, you may need to opt `recast-navigation` out of pre-bundling:
47
+
48
+ ```js
49
+ export default defineConfig(() => ({
50
+ optimizeDeps: { exclude: ['recast-navigation'] }
51
+ )}
52
+ ```
25
53
 
26
54
  ## Usage
27
55
 
@@ -236,3 +264,69 @@ const { navMesh, tileCache } = importNavMesh(navMeshExport);
236
264
  This library provides low-level APIs that aim to match the recast and detour c++ api, allowing you to create custom navigation mesh generators based on your specific needs. See: https://github.com/isaac-mason/recast-navigation-js/tree/main/packages/recast-navigation-core/src/generators
237
265
 
238
266
  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.
267
+
268
+ <!-- REMOVE-FROM-DOCS-START -->
269
+
270
+ ## API Documentation
271
+
272
+ Documentation can be found at [https://docs.recast-navigation-js.isaacmason.com](https://docs.recast-navigation-js.isaacmason.com).
273
+
274
+ <!-- REMOVE-FROM-DOCS-END -->
275
+
276
+ ## Examples
277
+
278
+ Some demonstrations of how to use the library in different environments can be found in the [examples](./examples) directory.
279
+
280
+ There are also storybooks that demonstrate the library in action: [https://recast-navigation-js.isaacmason.com](https://recast-navigation-js.isaacmason.com). The source code for the storybooks can be found in [./packages/recast-navigation/.storybook/stories](./packages/recast-navigation/.storybook/stories).
281
+
282
+ ## Packages
283
+
284
+ Functionality is spread across packages in the `@recast-navigation/*` organization, with the `recast-navigation` acting as an umbrella package.
285
+
286
+ You can choose between picking the scoped packages you need, or using the umbrella `recast-navigation` package, which provides additional entrypoints for specific frameworks and libraries.
287
+
288
+ All packages ship as ECMAScript modules, and are compatible with Node.js and browser environments.
289
+
290
+ ### [**`recast-navigation`**](https://github.com/isaac-mason/recast-navigation-js/tree/main/packages/recast-navigation)
291
+
292
+ [![Version](https://img.shields.io/npm/v/recast-navigation)](https://www.npmjs.com/package/recast-navigation)
293
+
294
+ The umbrella package for `recast-navigation`.
295
+
296
+ ```bash
297
+ > npm install recast-navigation
298
+ ```
299
+
300
+ ### [**`@recast-navigation/core`**](https://github.com/isaac-mason/recast-navigation-js/tree/main/packages/recast-navigation-core)
301
+
302
+ [![Version](https://img.shields.io/npm/v/@recast-navigation/core)](https://www.npmjs.com/package/@recast-navigation/core)
303
+
304
+ The core library!
305
+
306
+ ```bash
307
+ > npm install @recast-navigation/core
308
+ ```
309
+
310
+ ### [**`@recast-navigation/three`**](https://github.com/isaac-mason/recast-navigation-js/tree/main/packages/recast-navigation-three)
311
+
312
+ [![Version](https://img.shields.io/npm/v/@recast-navigation/three)](https://www.npmjs.com/package/@recast-navigation/three)
313
+
314
+ Helpers for three.js.
315
+
316
+ ```bash
317
+ > npm install @recast-navigation/three
318
+ ```
319
+
320
+ ## Apps
321
+
322
+ ### [NavMesh Generator](https://navmesh.isaacmason.com/)
323
+
324
+ A website for generating navmeshes for your game. Drag 'n' drop your GLTF, fine tune your settings, and download your navmesh!
325
+
326
+ ([source](./apps/navmesh-website/))
327
+
328
+ ## Acknowledgements
329
+
330
+ - This would not exist without [Recast Navigation](https://github.com/recastnavigation/recastnavigation) itself!
331
+ - The demos use recastnavigation's level mesh
332
+ - The WASM build was based on the [Babylon.js Recast Extension](https://github.com/BabylonJS/Extensions/tree/master/recastjs)
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.7.1",
21
+ "version": "0.7.3",
22
22
  "license": "MIT",
23
23
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
24
24
  "bugs": {
@@ -50,8 +50,8 @@
50
50
  "build-storybook": "storybook build"
51
51
  },
52
52
  "dependencies": {
53
- "@recast-navigation/core": "0.7.1",
54
- "@recast-navigation/three": "0.7.1"
53
+ "@recast-navigation/core": "0.7.3",
54
+ "@recast-navigation/three": "0.7.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@babel/core": "^7.22.11",