var s1 = new THREE.Mesh(new THREE.CubeGeometry(20,0.5,15),mesh1);
var s2 = new THREE.Mesh(new THREE.CubeGeometry(10,10,10),mesh1);
var p1 = new ThreeBSP(s1);
var p2 = new ThreeBSP(s2);
var resShape = p1.subtract(p2);
var res = resShape.toMesh();
res.geometry.computeFaceNormal();
res.geometry.computeVertexNormals();
scene.add(res)
想创建一个如图的效果,就是类似于墙上掏个洞
结果提示如下错误:
ThreeBSP.js:83 Uncaught TypeError: mesh.rotation.setFromRotationMatrix is not a function
PIPIONE
相关分类