2

我有一个问题,我怎样才能获得一种像圆环但平方的“开环”?我尝试使用形状加上路径作为孔:

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 );

它有效,但它仍然是终端部分之间的微妙面孔……有没有办法让它完全打开?

4

1 回答 1

2

与其从第一方开始,不如尝试更改 Torus 几何构造函数中的参数:

// 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 );
于 2012-08-08T00:08:48.223 回答