RingGeometry 圈形

—> Geometry

如果把 innerRadius 设置为0, 也是可以得到一个 CircleGeometry 圆形的.

function RingGeometry( innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength ) { } var geometry = new THREE.RingGeometry(2, 3, 40, 1, 0, Math.PI*2), material = new THREE.MeshBasicMaterial({color: 0x663399, side: THREE.DoubleSide}), ring = new THREE.Mesh( geometry, material ); scene.add( ring );

Parameters

innerRadius outerRadius thetaSegments phiSegments thetaStart thetaLength
0.5 1 8 1 0 Math.PI * 2
内半径 外半径 圆周分段数 半径分段数 开始角度 闭合角度

Methods 继承自 Geometry 并自动调用

fromBufferGeometry( new RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength ) )
mergeVertices( )

RingBufferGeometry

function RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength ) { } var geometry = new THREE.RingBufferGeometry(2, 3, 40, 1, 0, Math.PI*2), material = new THREE.MeshBasicMaterial({color: 0x663399, side: THREE.DoubleSide}), ring = new THREE.Mesh( geometry, material ); scene.add( ring );

Methods 继承自 BufferGeometry 并自动调用

setIndex( )
addAttribute( )

图解API

纹理Texture来渲染圈形模型. 点开查看