我有一个问题,我怎样才能得到一种像圆环一样的平方的“开环”?我试着用一个形状加一条路径作为洞:
var arcShape = new THREE.Shape();
arcShape.moveTo( 40, 0 );
arcShape.arc( 0, 0, 40, 0, 2*Math.PI, false );
var holePath = new THREE.Path();
holePath.moveTo( 30,0 )
holePath.arc( 0, 0, 30, 0, 2*Math.PI, true );到目前为止,制作网格:
new THREE.Mesh( arcShape.extrude({ amount: 5, bevelEnabled: false }), MATERIAL );它是有效的,但是如何制作一个中间的环呢?我的意思是:
var arcShape = new THREE.Shape();
arcShape.moveTo( 40, 0 );
arcShape.arc( 0, 0, 40, 0, Math.PI, false );
var holePath = new THREE.Path();
holePath.moveTo( 30,0 );
holePath.arc( 0, 0, 30, 0, Math.PI, true );它可以工作,但它仍然是终端部分之间的一个微妙的面...有没有办法让它完全开放?
发布于 2012-08-08 08:08:48
尝试更改圆环几何体构造函数中的参数,而不是从头开始:
// Torus geometry parameters:
// radius of entire torus,
// diameter of tube (should be less than total radius),
// segments around radius,
// segments around torus ("sides")
var torusGeom = new THREE.TorusGeometry( 25, 10, 4, 4 );https://stackoverflow.com/questions/11531462
复制相似问题