Skip to content

Polygon 多边形 ​

基础用法 ​

说明

用于绘制线条,支持实线、虚线。

安装 ​

sh
npm install @poggi/three-entity
pnpm add @poggi/three-entity
yarn add @poggi/three-entity
loading

API ​

PolygonGeometry类 ​

Methods ​

constructor(points: number[], options: ExtrudeGeometryOptions = {})

构造函数

Interfaces ​

ExtrudeGeometryOptions

属性名说明类型是否必选默认值
curveSegments曲线上的点数number否12
steps用于沿挤出样条线深度方向细分段落的点数number否2
depth挤出形状的深度number否0
bevelEnabled是否对形状进行倒角boolean否false
bevelThickness倒角深入原形状的深度number否0.2
bevelSize倒角相对形状轮廓向外延伸的距离number否bevelThickness-0.1
bevelOffset倒角起始位置距形状轮廓的距离number否0
bevelSegments倒角层数number否3
extrudePath形状应沿其挤出的 3D 样条线路径(沿路径挤出不支持倒角)Curve<Vector3>否-
UVGenerator一个提供 UV 生成函数、用于自定义 UV 生成的对象UVGenerator否-

Polygon ​

Methods ​

constructor(geometry: PolygonGeometry, material?: Material)

构造函数