我正在尝试添加一架飞机到场景中,但如果我检查儿童场景,则没有添加任何内容。
var plane = new THREE.Mesh( new THREE.PlaneGeometry( 2000, 2000, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xffff00, opacity: 0.25 } ) );
plane.visible = true;
this.scene.add( plane );
发布于 2015-04-28 10:59:56
试试这个:
var geo = new THREE.PlaneBufferGeometry(2000, 2000, 8, 8);
var mat = new THREE.MeshBasicMaterial({ color: 0x000000, side: THREE.DoubleSide });
var plane = new THREE.Mesh(geo, mat);
scene.add(plane);
如果要将平面用作地板,则必须旋转它。
plane.rotateX( - Math.PI / 2);
https://stackoverflow.com/questions/29916886
复制相似问题