我正在学习Three.js。我找不到有关CubeGeometry与BoxGeometry之间差异的正确答案。我两个都得到相同的输出。请帮忙。
**CubeGeometry:**
var geomatry = new THREE.CubeGeometry(100,100,100);
var material = new THREE.MeshLambertMaterial({color:0XF3FFE2});
var mesh = new THREE.Mesh(geomatry,material);
mesh.position.set(0,0,-1000);
scene.add(mesh);
**BoxGeometry:**
var geomatry = new THREE.BoxGeometry(100,100,100);
var material = new THREE.MeshLambertMaterial({color:0XF3FFE2});
var mesh = new THREE.Mesh(geomatry,material);
mesh.position.set(0,0,-1000);
scene.add(mesh);
答案 0 :(得分:2)
CubeGeometry
只是BoxGeometry
的别名。请记住,CubeGeometry
实际上已被弃用。