Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -224,10 +224,8 @@ export async function initializeViewer(config, instanceId) {
|
|
| 224 |
matSol.emissiveIntensity = 1;
|
| 225 |
matSol.update();
|
| 226 |
|
| 227 |
-
presentoirEntity.material = matSol;
|
| 228 |
-
glbEntity.material = matSol;
|
| 229 |
|
| 230 |
-
|
| 231 |
if (node.render && node.render.meshInstances) {
|
| 232 |
for (let mi of node.render.meshInstances) {
|
| 233 |
mi.material = matSol;
|
|
@@ -241,7 +239,7 @@ export async function initializeViewer(config, instanceId) {
|
|
| 241 |
mi.material = matSol;
|
| 242 |
}
|
| 243 |
}
|
| 244 |
-
})
|
| 245 |
|
| 246 |
console.log("matSol : ok");
|
| 247 |
}
|
|
|
|
| 224 |
matSol.emissiveIntensity = 1;
|
| 225 |
matSol.update();
|
| 226 |
|
|
|
|
|
|
|
| 227 |
|
| 228 |
+
traverse(presentoirEntity, node => {
|
| 229 |
if (node.render && node.render.meshInstances) {
|
| 230 |
for (let mi of node.render.meshInstances) {
|
| 231 |
mi.material = matSol;
|
|
|
|
| 239 |
mi.material = matSol;
|
| 240 |
}
|
| 241 |
}
|
| 242 |
+
});
|
| 243 |
|
| 244 |
console.log("matSol : ok");
|
| 245 |
}
|