0

I have some geometry - with this code I can make them visible or unvisible:

THREE.SceneUtils.traverseHierarchy( selArr[i], function ( obj ) { obj.visible = true; } );

Is there a possibility to make a object transparent this way, so i can see an other object behind?

Phipps
  • 355
  • 1
  • 3
  • 10
  • Have you tried using a material with an alpha channel on the object that should be transparent? [See this question.](http://stackoverflow.com/questions/8502150/three-js-how-can-i-dynamically-change-objects-opacity) – Manuel Leuenberger Sep 17 '12 at 10:50
  • The problem is that I want to switch the transparency on and off by a keyboard event. I tried obj.material.opacity = 0.5 but i think only the wireframe get transparent. – Phipps Sep 17 '12 at 11:24
  • 1
    I have the solution i create a new material: `obj.material = new THREE.MeshLambertMaterial ({ color: 0x900000, transparent:true, opacity: 0.5} )` – Phipps Sep 19 '12 at 06:23

0 Answers0