Skip to content

CylinderGeometry

继承自BufferGeometry

一个用于生成圆柱几何体的类。

js
const geometry = new THREE.CylinderGeometry(
    radiusTop : Float,
    radiusBottom : Float,
    height : Float,
    radialSegments : Integer,
    heightSegments : Integer,
    openEnded : Boolean,
    thetaStart : Float,
    thetaLength : Float
)

参数:

  • radiusTop — 圆柱的顶部半径,默认值是 1。
  • radiusBottom — 圆柱的底部半径,默认值是 1。
  • height — 圆柱的高度,默认值是 1。
  • radialSegments — 圆柱侧面周围的分段数,默认为 32。
  • heightSegments — 圆柱侧面沿着其高度的分段数,默认值为 1。
  • openEnded — 一个 Boolean 值,指明该圆锥的底面是开放的还是封顶的。默认值为 false,即其底面默认是封顶的。
  • thetaStart — 第一个分段的起始角度,默认为 0。(three o'clock position)
  • thetaLength — 圆柱底面圆扇区的中心角,通常被称为“θ”(西塔)。默认值是 2*Pi,这使其成为一个完整的圆柱。

MIT Licensed