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 |
-
|
| 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([
|
|
|
|
| 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([
|