BufferGeometry

圆环缓冲几何体(TorusBufferGeometry)

这是TorusGeometry中的BufferGeometry接口。

代码示例

const geometry = new v3d.TorusBufferGeometry(10, 3, 16, 100); const material = new v3d.MeshBasicMaterial({ color: 0xffff00 }); const torus = new v3d.Mesh(geometry, material); scene.add(torus);

构造函数

TorusBufferGeometry(radius : Float, tube : Float, radialSegments : Integer, tubularSegments : Integer, arc : Float)

radius - 圆环的半径,从圆环的中心到管道(横截面)的中心。默认值是1。
tube — 管道的半径,默认值为0.4。
radialSegments — 圆环的分段数,默认值为8。
tubularSegments — 管道的分段数,默认值为6。
arc — 圆环的圆心角(单位是弧度),默认值为Math.PI * 2。

属性

共有属性请参见其基类BufferGeometry

.parameters

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

方法(Methods)

共有方法请参见其基类BufferGeometry

源代码

src/geometries/TorusBufferGeometry.js