0

I need to change the transparency of a file. Dae (collada), by my code with the library Three.js with dat.gui. I'm using: $gui = new DAT.GUI(); gui.add(opacity_pele, 'pele').onChange(function(){

                if ( opacity_pele.pele ) {
                    material[pele].transparency = 1.0;

                } else {
                    material[pele].transparency = 0.0;

                }

            });
           gui.close();
Andreas Köberle
  • 106,652
  • 57
  • 273
  • 297
Paula Lc
  • 41
  • 7

1 Answers1

0

Have you tried seting the transparency right in your 3D editor program? E.g. in Blender you can adjust the transparency of your object on the panels (please see below). I'm using this method for displaying transparent objects and this works perfectly for me.

enter image description here

Fract
  • 323
  • 1
  • 6
  • 22
  • 1
    I need to change the transparency of the object through the application code. The code is in JavaScript with three.js and dat.gui and establishing a checkbox, which when unchecked should change the transparency to 0. Recalling that the file being loaded for application is on. Dae, collada. In this code, I am trying to change the transparency through these commands below: – Paula Lc Oct 13 '12 at 15:55
  • gui = new DAT.GUI(); gui.add(opacity_pele, 'pele').onChange(function(){ if ( opacity_pele.pele ) { material[pele].transparency = 1.0; } else { material[pele].transparency = 0.0; } }); gui.close(); – Paula Lc Oct 13 '12 at 15:56