几何体

作者: Look_a_Look | 来源:发表于2017-09-25 10:26 被阅读14次

创建常见几何形状:

立方体

THREE.CubeGeometry(width, height, depth, widthSegments, heightSegments, depthSegments) 

球体,半球

THREE.SphereGeometry(radius, segmentsWidth, segmentsHeight, phiStart, phiLength, thetaStart, thetaLength)  

平面(x、y轴所在平面)

THREE.PlaneGeometry(width, height, widthSegments, heightSegments)

圆、扇面(x、y轴所在平面)

THREE.CircleGeometry(radius, segments, thetaStart, thetaLength) 

圆柱(台、锥)

THREE.CylinderGeometry(radiusTop, radiusBottom, height, radiusSegments, heightSegments, openEnded) 
openEnded 表示是否有顶面和底面,缺省值为false,表示有顶面和底面。

正四面体、正八面体、正二十面体

THREE.TetrahedronGeometry(radius, detail)
THREE.OctahedronGeometry(radius, detail)
THREE.IcosahedronGeometry(radius, detail) 

圆环体

THREE.TorusGeometry(radius, tube, radialSegments, tubularSegments, arc)

圆环打结

THREE.TorusKnotGeometry(radius, tube, radialSegments, tubularSegments, p, q, heightScale) 

自定义形状

geometry.vertices.push(new THREE.Vector3(x,y,z));
  ... // 依次增加多个节点
 geometry.faces.push(new THREE.Face3(0,1,2)); // 节点顺序

相关文章

网友评论

      本文标题:几何体

      本文链接:https://www.haomeiwen.com/subject/ntdjjxtx.html