recast-navigation 0.0.4 → 0.0.6
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 +6 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -15,10 +15,14 @@ A WebAssembly port of [Recast Navigation](https://github.com/recastnavigation/re
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
+
You can install the library using npm:
|
|
19
|
+
|
|
18
20
|
```sh
|
|
19
21
|
npm install recast-navigation
|
|
20
22
|
```
|
|
21
23
|
|
|
24
|
+
This package ships as ECMAScript modules, and is compatible with Node.js and browser environments.
|
|
25
|
+
|
|
22
26
|
## Usage
|
|
23
27
|
|
|
24
28
|
### Initialization
|
|
@@ -127,12 +131,9 @@ crowd.update(dt);
|
|
|
127
131
|
Next, you can create and interface with agents in the crowd.
|
|
128
132
|
|
|
129
133
|
```ts
|
|
130
|
-
const position = { x: 0, y: 0, z: 0 };
|
|
131
|
-
const radius = 0.6;
|
|
132
|
-
|
|
133
134
|
const initialAgentPosition = navMesh.getRandomPointAround(
|
|
134
|
-
{ x: 0, y: 0, z: 0 },
|
|
135
|
-
2
|
|
135
|
+
{ x: 0, y: 0, z: 0 }, // position
|
|
136
|
+
2 // radius
|
|
136
137
|
);
|
|
137
138
|
|
|
138
139
|
const agentIndex = crowd.addAgent(initialAgentPosition, {
|
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.0.
|
|
21
|
+
"version": "0.0.6",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"homepage": "https://github.com/isaac-mason/recast-navigation-js",
|
|
24
24
|
"bugs": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"build-storybook": "storybook build"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@recast-navigation/core": "0.0.
|
|
53
|
-
"@recast-navigation/three": "0.0.
|
|
52
|
+
"@recast-navigation/core": "0.0.6",
|
|
53
|
+
"@recast-navigation/three": "0.0.6"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"three": "^0.150.1"
|