我已经能够将一组BoxGeometry对象放置成一个圆圈。
for(var i = 0; i < 20; i++) {
var geometry = new THREE.BoxGeometry( 5, 5, 5 );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
var cube = new THREE.Mesh( geometry, material );
angle = (i / (20/2)) * Math.PI;
cube .position.x = (50 * Math.cos(angle));
cube .position.z = (50 * Math.sin(angle));
cube .position.y = 5;
scene.add(cube);
}
但是以下内容仅将一组PlaneGeometry对象放置在半圆内。
var img = new THREE.MeshBasicMaterial({
map:THREE.ImageUtils.loadTexture('../images/texture.png')
});
img.map.needsUpdate = true;
for(var i = 0; i < 20; i++) {
var plane = new THREE.Mesh(new THREE.PlaneGeometry(10, 10),img);
plane.overdraw = true;
angle = (i / (20/2)) * Math.PI;
plane.position.x = (50 * Math.cos(angle));
plane.position.z = (50 * Math.sin(angle));
plane.position.y = 5;
scene.add(plane);
}
如何将PlaneGeometry对象定位成一个完整的圆?为什么使用PlaneGeometry和相同的方程式时它只有半个圆?