BufferGeometry

车削缓冲几何体(LatheBufferGeometry)

这是LatheGeometry中的BufferGeometry接口。

代码示例

const points = []; for (let i = 0; i < 10; i++) { points.push(new v3d.Vector2(Math.sin(i * 0.2) * 10 + 5, (i - 5) * 2)); } const geometry = new v3d.LatheBufferGeometry(points); const material = new v3d.MeshBasicMaterial({ color: 0xffff00 }); const lathe = new v3d.Mesh(geometry, material); scene.add(lathe);

构造函数

LatheBufferGeometry(points : Array, segments : Integer, phiStart : Float, phiLength : Float)

points — 一个Vector2对象数组。每个点的X坐标必须大于0。
segments — 要生成的车削几何体圆周分段的数量,默认值是12。
phiStart — 以弧度表示的起始角度,默认值为0。
phiLength — 车削部分的弧度(0-2PI)范围,2PI将是一个完全闭合的、完整的车削几何体,小于2PI是部分的车削。默认值是2PI。

基于参数创建一个LatheGeometry。

属性

共有属性请参见其基类BufferGeometry

.parameters : Object

一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。

方法(Methods)

共有方法请参见其基类BufferGeometry

源代码

src/geometries/LatheBufferGeometry.js