Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -265,11 +265,11 @@ export async function initializeViewer(config, instanceId) {
|
|
| 265 |
traverse(filtreEntity, node => {
|
| 266 |
if (node.render && node.render.meshInstances) {
|
| 267 |
for (let mi of node.render.meshInstances) {
|
| 268 |
-
if (mi.material && mi.material.name === "
|
| 269 |
// Ici tu as ton matériau
|
| 270 |
const mat = mi.material;
|
| 271 |
|
| 272 |
-
mat.opacity = 0.
|
| 273 |
mat.blendType = pc.BLEND_NORMAL;
|
| 274 |
mat.update();
|
| 275 |
}
|
|
|
|
| 265 |
traverse(filtreEntity, node => {
|
| 266 |
if (node.render && node.render.meshInstances) {
|
| 267 |
for (let mi of node.render.meshInstances) {
|
| 268 |
+
if (mi.material && mi.material.name === "transparant") {
|
| 269 |
// Ici tu as ton matériau
|
| 270 |
const mat = mi.material;
|
| 271 |
|
| 272 |
+
mat.opacity = 0.2;
|
| 273 |
mat.blendType = pc.BLEND_NORMAL;
|
| 274 |
mat.update();
|
| 275 |
}
|