recast-navigation 0.20.0 → 0.21.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.
- package/README.md +17 -13
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -25,25 +25,33 @@ This library provides high level APIs that make it easy to get started creating
|
|
|
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
|
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
Go to the [examples website](https://recast-navigation-js.isaacmason.com) to see the project in action:
|
|
31
|
+
- live: [https://recast-navigation-js.isaacmason.com](https://recast-navigation-js.isaacmason.com).
|
|
32
|
+
- examples source code: [./packages/recast-navigation/.storybook/stories](./packages/recast-navigation/.storybook/stories).
|
|
33
|
+
|
|
34
|
+
Demonstrations of how to use the library in different environments (such as NodeJS, CommonJS) can be found in the [examples](./examples) directory.
|
|
35
|
+
|
|
28
36
|
## Installation
|
|
29
37
|
|
|
30
38
|
This package ships as both ECMAScript modules and CJS, and is compatible with Node.js and browser environments.
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
**NPM**
|
|
33
41
|
|
|
34
42
|
```sh
|
|
35
43
|
npm install recast-navigation
|
|
36
44
|
```
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
**Unpkg**
|
|
39
47
|
|
|
40
48
|
```html
|
|
41
49
|
<script type="importmap">
|
|
42
50
|
{
|
|
43
51
|
"imports": {
|
|
44
|
-
"@recast-navigation/core": "https://unpkg.com/@recast-navigation/core@0.
|
|
45
|
-
"@recast-navigation/generators": "https://unpkg.com/@recast-navigation/generators@0.
|
|
46
|
-
"@recast-navigation/three": "https://unpkg.com/@recast-navigation/three@0.
|
|
52
|
+
"@recast-navigation/core": "https://unpkg.com/@recast-navigation/core@0.20.0/dist/index.mjs",
|
|
53
|
+
"@recast-navigation/generators": "https://unpkg.com/@recast-navigation/generators@0.20.0/dist/index.mjs",
|
|
54
|
+
"@recast-navigation/three": "https://unpkg.com/@recast-navigation/three@0.20.0/dist/index.mjs"
|
|
47
55
|
}
|
|
48
56
|
}
|
|
49
57
|
</script>
|
|
@@ -54,7 +62,7 @@ npm install recast-navigation
|
|
|
54
62
|
</script>
|
|
55
63
|
```
|
|
56
64
|
|
|
57
|
-
|
|
65
|
+
**Usage with bundlers**
|
|
58
66
|
|
|
59
67
|
If you are using Vite, you may need to opt `recast-navigation` out of pre-bundling:
|
|
60
68
|
|
|
@@ -142,7 +150,9 @@ See the docs for more information on generator options: https://docs.recast-navi
|
|
|
142
150
|
|
|
143
151
|
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. You can use the NavMesh generators provided by `@recast-navigation/generators` as a basis: https://github.com/isaac-mason/recast-navigation-js/tree/main/packages/recast-navigation-generators/src/generators
|
|
144
152
|
|
|
145
|
-
|
|
153
|
+
An example of a custom NavMesh generator with custom areas can be found here: https://recast-navigation-js.isaacmason.com/?path=/story/advanced-custom-areas--compute-path
|
|
154
|
+
|
|
155
|
+
Please note that not all recast and detour functionality is exposed yet. If you require unexposed functionality, please submit an issue or a pull request.
|
|
146
156
|
|
|
147
157
|
### Querying a NavMesh
|
|
148
158
|
|
|
@@ -459,12 +469,6 @@ const { navMesh, tileCache } = importNavMesh(
|
|
|
459
469
|
);
|
|
460
470
|
```
|
|
461
471
|
|
|
462
|
-
## Examples
|
|
463
|
-
|
|
464
|
-
Some demonstrations of how to use the library in different environments can be found in the [examples](./examples) directory.
|
|
465
|
-
|
|
466
|
-
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).
|
|
467
|
-
|
|
468
472
|
## Packages
|
|
469
473
|
|
|
470
474
|
Functionality is spread across packages in the `@recast-navigation/*` organization, with the `recast-navigation` acting as an umbrella package.
|
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
|
+
"version": "0.21.0",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"homepage": "https://github.com/isaac-mason/recast-navigation-js",
|
|
24
24
|
"bugs": {
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"lint": "eslint --ext .ts src"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@recast-navigation/core": "0.
|
|
70
|
-
"@recast-navigation/generators": "0.
|
|
71
|
-
"@recast-navigation/three": "0.
|
|
69
|
+
"@recast-navigation/core": "0.21.0",
|
|
70
|
+
"@recast-navigation/generators": "0.21.0",
|
|
71
|
+
"@recast-navigation/three": "0.21.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@babel/core": "^7.
|
|
74
|
+
"@babel/core": "^7.24.4",
|
|
75
75
|
"@isaac-mason/eslint-config-typescript": "^0.0.5",
|
|
76
76
|
"@mdx-js/react": "^2.3.0",
|
|
77
77
|
"@pmndrs/assets": "^1.6.0",
|
|
@@ -103,7 +103,8 @@
|
|
|
103
103
|
"three": "^0.160.0",
|
|
104
104
|
"three-pathfinding": "^1.2.0",
|
|
105
105
|
"typescript": "^5.4.3",
|
|
106
|
-
"vitest": "^1.
|
|
106
|
+
"vitest": "^1.5.0",
|
|
107
|
+
"zustand": "^4.5.2"
|
|
107
108
|
},
|
|
108
109
|
"packageManager": "yarn@3.2.2"
|
|
109
110
|
}
|