@recast-navigation/three 0.10.0 → 0.10.1

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 +35 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -80,6 +80,18 @@ scene.add(navMeshHelper);
80
80
  navMeshHelper.update();
81
81
  ```
82
82
 
83
+ #### `OffMeshConnectionsHelper`
84
+
85
+ ```ts
86
+ import { OffMeshConnectionsHelper } from 'recast-navigation/three';
87
+
88
+ const offMeshConnectionsHelper = new OffMeshConnectionsHelper({
89
+ offMeshConnections,
90
+ });
91
+
92
+ scene.add(offMeshConnectionsHelper);
93
+ ```
94
+
83
95
  #### `TileCacheHelper`
84
96
 
85
97
  Visualises obstacles in a `TileCache`.
@@ -115,21 +127,41 @@ crowdHelper.update();
115
127
  You can optionally provide custom materials to the helpers.
116
128
 
117
129
  ```ts
130
+ // NavMeshHelper
118
131
  const navMeshMaterial = new THREE.MeshBasicMaterial({ color: 'red' });
119
- const obstacleMaterial = new THREE.MeshBasicMaterial({ color: 'blue' });
120
- const agentMaterial = new THREE.MeshBasicMaterial({ color: 'red' });
121
-
122
132
  const navMeshHelper = new NavMeshHelper({
123
133
  navMesh,
124
134
  navMeshMaterial,
125
135
  });
126
136
 
137
+ // OffMeshConnectionsHelper
138
+ const offMeshConnectionEntryCircleMaterial = new THREE.MeshBasicMaterial({
139
+ color: 'green',
140
+ });
141
+ const offMeshConnectionExitCircleMaterial = new THREE.MeshBasicMaterial({
142
+ color: 'yellow',
143
+ });
144
+ const offMeshConnectionLineMaterial = new THREE.LineBasicMaterial({
145
+ color: 'white',
146
+ });
147
+ const offMeshConnectionsHelper = new OffMeshConnectionsHelper({
148
+ offMeshConnections,
149
+ entryCircleMaterial: offMeshConnectionEntryCircleMaterial,
150
+ exitCircleMaterial: offMeshConnectionExitCircleMaterial,
151
+ lineMaterial: offMeshConnectionLineMaterial,
152
+ });
153
+
154
+ // TileCacheHelper
155
+ const obstacleMaterial = new THREE.MeshBasicMaterial({ color: 'blue' });
127
156
  const tileCacheHelper = new TileCacheHelper({
128
157
  tileCache,
129
158
  obstacleMaterial,
130
159
  });
131
160
 
161
+ // CrowdHelper
162
+ const agentMaterial = new THREE.MeshBasicMaterial({ color: 'red' });
132
163
  const crowdHelper = new CrowdHelper({
133
164
  crowd,
134
165
  agentMaterial,
166
+ });
135
167
  ```
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "email": "isaac@isaacmason.com",
7
7
  "url": "https://isaacmason.com/"
8
8
  },
9
- "version": "0.10.0",
9
+ "version": "0.10.1",
10
10
  "license": "MIT",
11
11
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
12
12
  "bugs": {
@@ -24,7 +24,7 @@
24
24
  "build": "rollup --config rollup.config.js --bundleConfigAsCjs"
25
25
  },
26
26
  "dependencies": {
27
- "@recast-navigation/core": "0.10.0"
27
+ "@recast-navigation/core": "0.10.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@types/three": "0.x.x",