0

I have collada model (.dae) displayed by this code, and I add THREE.DoubleSide but it dose not work how can i fix this?

var loadingManager = new THREE.LoadingManager( function() {

                scene.add( car );

            } );

            var loader = new THREE.ColladaLoader( loadingManager );
            var textureLoader = new THREE.TextureLoader();
            var texture = textureLoader.load('./model/car_Red.jpg');
            loader.options.convertUpAxis = true;
            loader.load( './car.dae', function ( collada ) {
                car = collada.scene;
                car.traverse(function (node) {

                      if (node.isMesh)
                      {
                          node.material.map = texture;
                          node.material.side = THREE.DoubleSide;
                      }
                 });
                console.log(car);
Manar Bedor
  • 1
  • 1
  • 2
  • Without further information, I'm guessing this could be related to the 'side' flag in your Collada model which has been known to cause similar issues in the past. Take a look at https://stackoverflow.com/questions/11770052/collada-model-faces-not-displaying-correctly-in-three-js – AquaVitae Sep 23 '17 at 18:43
  • Could you try `console.log(node.material.side)` _before_ changing it? I have noticed that sometimes `material` is an array, so `material.side` would be undefined. – Anders Carstensen Sep 23 '17 at 19:49

0 Answers0