ConeGeometry 圆锥

—> CylinderGeometry

ConeGeometry 圆锥是从 CylinderGeometry 进化而来的, 把 radiusTop 去掉, 只保留底部半径. 对 radialSegments 进行不同的设置, 可得以下两种形状.

function ConeGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) { } var geometry = new THREE.ConeGeometry(3, 7, 64), material = new THREE.MeshBasicMaterial({color: 0x663399, side: THREE.DoubleSide}), cube = new THREE.Mesh( geometry, material ); scene.add( cube );

Parameters

dang
radius height radialSegments heightSegments openEnded thetaStartthetaLength
1 1 8 ( >=3 ) 1 false 0 Math.PI * 2
底部半径 底部的圆周分段数 侧面分段数 是否打开 开始角度 闭合角度

继承自 CylinderGeometry

ConeBufferGeometry

function ConeBufferGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) { } var geometry = new THREE.ConeBufferGeometry(3, 7, 64), material = new THREE.MeshBasicMaterial({color: 0x663399, side: THREE.DoubleSide}), cube = new THREE.Mesh( geometry, material ); scene.add( cube );

图解API

纹理Texture来渲染圆锥模型. 点开查看