Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -230,6 +230,15 @@ export async function initializeViewer(config, instanceId) {
|
|
| 230 |
app.root.addChild(glbEntity);
|
| 231 |
}
|
| 232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
const presentoirEntity =assets.presentoir.resource.instantiateRenderEntity();
|
| 234 |
presentoirEntity.setLocalScale(presentoirScaleX, presentoirScaleY, presentoirScaleZ);
|
| 235 |
app.root.addChild(presentoirEntity);
|
|
|
|
| 230 |
app.root.addChild(glbEntity);
|
| 231 |
}
|
| 232 |
|
| 233 |
+
if(config.glb_url == undefined){
|
| 234 |
+
let matSol = new pc.StandardMaterial();
|
| 235 |
+
matSol.blendType = pc.BLEND_NORMAL;
|
| 236 |
+
matSol.emissivve = new pc.Color(color_bg);
|
| 237 |
+
matSol.emissiveIntensity = 1;
|
| 238 |
+
|
| 239 |
+
glbEntity.material = matSol;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
const presentoirEntity =assets.presentoir.resource.instantiateRenderEntity();
|
| 243 |
presentoirEntity.setLocalScale(presentoirScaleX, presentoirScaleY, presentoirScaleZ);
|
| 244 |
app.root.addChild(presentoirEntity);
|