Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -176,12 +176,12 @@ export async function initializeViewer(config, instanceId) {
|
|
| 176 |
for (const key in assets) app.assets.add(assets[key]);
|
| 177 |
|
| 178 |
// Load HDR *before* loading any models
|
| 179 |
-
assets.helipad.ready(() => {
|
| 180 |
app.scene.envAtlas = assets.helipad.resource;
|
| 181 |
app.scene.skyboxRotation = new pc.Quat().setFromEulerAngles(0, -90, 0);
|
| 182 |
app.scene.skyboxIntensity = 4;
|
| 183 |
app.scene.skyboxMip = 0;
|
| 184 |
-
|
| 185 |
|
| 186 |
// Now load all GLBs and other assets
|
| 187 |
const loader = new pc.AssetListLoader([
|
|
@@ -295,7 +295,7 @@ export async function initializeViewer(config, instanceId) {
|
|
| 295 |
// Further simplify material as needed
|
| 296 |
}
|
| 297 |
|
| 298 |
-
traverse(modelEntity, node => {
|
| 299 |
if (node.render && node.render.meshInstances) {
|
| 300 |
for (let mi of node.render.meshInstances) {
|
| 301 |
mi.material = matOpaque;
|
|
@@ -310,7 +310,7 @@ export async function initializeViewer(config, instanceId) {
|
|
| 310 |
mi.material = tubeOpaque;
|
| 311 |
}
|
| 312 |
}
|
| 313 |
-
});
|
| 314 |
|
| 315 |
|
| 316 |
// 3. Position/scale/orientation
|
|
|
|
| 176 |
for (const key in assets) app.assets.add(assets[key]);
|
| 177 |
|
| 178 |
// Load HDR *before* loading any models
|
| 179 |
+
/*assets.helipad.ready(() => {
|
| 180 |
app.scene.envAtlas = assets.helipad.resource;
|
| 181 |
app.scene.skyboxRotation = new pc.Quat().setFromEulerAngles(0, -90, 0);
|
| 182 |
app.scene.skyboxIntensity = 4;
|
| 183 |
app.scene.skyboxMip = 0;
|
| 184 |
+
*/
|
| 185 |
|
| 186 |
// Now load all GLBs and other assets
|
| 187 |
const loader = new pc.AssetListLoader([
|
|
|
|
| 295 |
// Further simplify material as needed
|
| 296 |
}
|
| 297 |
|
| 298 |
+
/*traverse(modelEntity, node => {
|
| 299 |
if (node.render && node.render.meshInstances) {
|
| 300 |
for (let mi of node.render.meshInstances) {
|
| 301 |
mi.material = matOpaque;
|
|
|
|
| 310 |
mi.material = tubeOpaque;
|
| 311 |
}
|
| 312 |
}
|
| 313 |
+
});*/
|
| 314 |
|
| 315 |
|
| 316 |
// 3. Position/scale/orientation
|