three.js how to make double sided object

前端 未结 1 625
傲寒
傲寒 2020-12-10 01:00

Blender export obj don\'t export double sided objects. How can I render objects in double sided mode. I tried this without succes:

var loader = new THREE.OBJ         


        
相关标签:
1条回答
  • 2020-12-10 01:33

    In your case, you add the following to your callback function:

    objects.traverse( function( node ) {
        if( node.material ) {
            node.material.side = THREE.DoubleSide;
        }
    });
    

    The doubleSided property of Mesh is deprecated. It was replaced with the side property of Material

    Also, it is best to learn from three.js examples that work with the current version of the library.

    three.js r.57

    0 讨论(0)
提交回复
热议问题