Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -235,8 +235,15 @@ export async function initializeViewer(config, instanceId) {
|
|
| 235 |
matSol.blendType = pc.BLEND_NORMAL;
|
| 236 |
matSol.emissivve = new pc.Color(color_bg);
|
| 237 |
matSol.emissiveIntensity = 1;
|
| 238 |
-
|
| 239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
}
|
| 241 |
|
| 242 |
const presentoirEntity =assets.presentoir.resource.instantiateRenderEntity();
|
|
|
|
| 235 |
matSol.blendType = pc.BLEND_NORMAL;
|
| 236 |
matSol.emissivve = new pc.Color(color_bg);
|
| 237 |
matSol.emissiveIntensity = 1;
|
| 238 |
+
matSol.update();
|
| 239 |
+
|
| 240 |
+
traverse(glbEntity, node => {
|
| 241 |
+
if (node.render && node.render.meshInstances) {
|
| 242 |
+
for (let mi of node.render.meshInstances) {
|
| 243 |
+
mi.material = matSol;
|
| 244 |
+
}
|
| 245 |
+
}
|
| 246 |
+
});
|
| 247 |
}
|
| 248 |
|
| 249 |
const presentoirEntity =assets.presentoir.resource.instantiateRenderEntity();
|