线性几何体 WireframeGeometry 网格几何体 EdgesGeometry 边缘几何体
WireframeGeometry 网格几何体
WireframeGeometry( geometry : BufferGeometry )
const geometry = new SphereGeometry ( ) ;
const wireframe = new WireframeGeometry ( geometry) ;
const line = new LineSegments ( wireframe) ;
const mat = line. material as LineBasicMaterial;
mat. depthTest = false ;
mat. opacity = 0.5 ;
mat. transparent = true ;
EdgesGeometry 边缘几何体
EdgesGeometry( geometry : BufferGeometry, thresholdAngle : Integer )
geometry — 任何一个几何体对象。 thresholdAngle — 仅当相邻面的法线之间的角度(单位为角度)超过这个值时,才会渲染边缘。默认值为1。
const geometry = new SphereGeometry ( 2 , 8 , 8 ) ;
const edges = new EdgesGeometry ( geometry) ;
const line = new LineSegments ( edges) ;