Question

I'm new to three.js and 3d programming in general,I used the three.js draw a Sector,I can the object in one direction ,but i can't see it in the opposite direction,it seems that the three.js examplehere have the same phenomenon,how can i see the object in both dretions?

var squareShape = new THREE.Shape();
var arc = 1/6*Math.PI
var len = 20
squareShape.moveTo( 0,0 );
squareShape.absarc( 0, 0, 20, 4/3*Math.PI, 5/3*Math.PI, false );
squareShape.moveTo( 0, 0 );
var geometry = new THREE.ExtrudeGeometry( squareShape,  {amount:0.1} );
var mesh = THREE.SceneUtils.createMultiMaterialObject( geometry, [ new THREE.MeshLambertMaterial( { color: 0xff0000 ,opacity: 1.0} ), new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true, transparent: true ,opacity: 1.0} ) ] );
mesh.position.set( 10, 10, 10  );
mesh.rotation.set( Math.PI/2, 0, Math.PI/2 );
scene.add( mesh );
Was it helpful?

Solution

In your case, it would be

new THREE.MeshLambertMaterial( { color: 0xff0000, opacity: 1.0, side: THREE.DoubleSide } )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top