Fra*_*984 -1 javascript three.js
我正在尝试向场景中添加一架飞机,但如果我检查儿童的场景,则不会添加任何内容.
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 );
Run Code Online (Sandbox Code Playgroud)
mar*_*cel 12
试试这个:
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);
Run Code Online (Sandbox Code Playgroud)
如果你想将飞机用作地板,你必须旋转它.
plane.rotateX( - Math.PI / 2);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5374 次 |
| 最近记录: |