I'm trying to change the number of segments of the sphere, but I can't cut it if I have reached the 45 limit, and there's no other way to make the sphere a little smoother.
var result;
var sphereG = new THREE.SphereGeometry( 115, 45, 45 );
var sphereM = new THREE.MeshPhongMaterial({color:"#fff"} );
var sphere = new THREE.Mesh(sphereG,sphereM);
var polyhedronG = new THREE.Geometry();
polyhedronG.vertices.push(
new THREE.Vector3(-200,200,-200), //A 0
new THREE.Vector3(-200,-200,200), //B 1
new THREE.Vector3(200,-200,-200), //D 2
new THREE.Vector3(-1,-1,-1) //O 3
);
polyhedronG.faces.push(
new THREE.Face3( 0, 1, 2 ),
new THREE.Face3( 0, 2, 3 ),
new THREE.Face3( 0, 3, 1 ),
new THREE.Face3( 3, 2, 1 )
);
var polyhedronM = new THREE.MeshPhongMaterial( {
color:"#E8FBFF",
side:THREE.DoubleSide,
transparent:true,
opacity:0.1
});
var polyhedron = new THREE.Mesh(polyhedronG,polyhedronM);
var boxBSP = new ThreeBSP(polyhedron);
var sphereBSP = new ThreeBSP(sphere);
var resultBSP = sphereBSP.subtract(boxBSP);
result = resultBSP.toMesh();
result.material=new THREE.MeshPhongMaterial({color:'#fff'});