LatheGeometry(车削缓冲几何体)
小于 1 分钟约 262 字
LatheGeometry
const points = [];
for ( let i = 0; i < 10; i ++ ) {
points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) );
}
const geometry = new THREE.LatheGeometry( points );
const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
const lathe = new THREE.Mesh( geometry, material );
scene.add( lathe );
构造器
points : Array
一个Vector2对象数组。每个点的X坐标必须大于0
segments : Integer
要生成的车削几何体圆周分段的数量,默认值是12
phiStart : Float
以弧度表示的起始角度,默认值为0
phiLength : Float
车削部分的弧度(0-2PI)范围,2PI将是一个完全闭合的、完整的车削几何体,小于2PI是部分的车削。默认值是2PI
属性
共有属性请参见其基类BufferGeometry
.parameters : Object
一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体
方法
共有方法请参见其基类BufferGeometry