MikaFil commited on
Commit
6afa911
·
verified ·
1 Parent(s): dcdc3c5

Update viewer.js

Browse files
Files changed (1) hide show
  1. viewer.js +4 -4
viewer.js CHANGED
@@ -261,7 +261,7 @@ export async function initializeViewer(config, instanceId) {
261
  });
262
 
263
 
264
- /*// ----- Modification du material "transparent" du filtre
265
  traverse(filtreEntity, node => {
266
  if (node.render && node.render.meshInstances) {
267
  for (let mi of node.render.meshInstances) {
@@ -269,8 +269,8 @@ export async function initializeViewer(config, instanceId) {
269
  // Ici tu as ton matériau
270
  const mat = mi.material;
271
 
272
- mat.opacity = 0.1;
273
- //mat.blendType = pc.BLEND_NORMAL;
274
  mat.depthTest = false;
275
  mat.depthWrite = false;
276
  mat.useMetalness = true;
@@ -280,7 +280,7 @@ export async function initializeViewer(config, instanceId) {
280
  }
281
  }
282
  }
283
- });*/
284
 
285
 
286
  // ----- Model, Tube, Filtre transforms -----
 
261
  });
262
 
263
 
264
+ // ----- Modification du material "transparent" du filtre
265
  traverse(filtreEntity, node => {
266
  if (node.render && node.render.meshInstances) {
267
  for (let mi of node.render.meshInstances) {
 
269
  // Ici tu as ton matériau
270
  const mat = mi.material;
271
 
272
+ mat.opacity = 0.07;
273
+ mat.blendType = pc.BLEND_NORMAL;
274
  mat.depthTest = false;
275
  mat.depthWrite = false;
276
  mat.useMetalness = true;
 
280
  }
281
  }
282
  }
283
+ });
284
 
285
 
286
  // ----- Model, Tube, Filtre transforms -----