MikaFil commited on
Commit
f817dc2
·
verified ·
1 Parent(s): 6f9b0cf

Update viewer.js

Browse files
Files changed (1) hide show
  1. viewer.js +2 -2
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 === "transparent") {
269
  // Ici tu as ton matériau
270
  const mat = mi.material;
271
 
272
- mat.opacity = 0.9;
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
  }