ExtrudePolygon
小于 1 分钟
ExtrudePolygon
挤出多边形,继承自内置PointsBase对象,拥有一切Thing属性及方法。
构造器
new VT.ExtrudePolygon({
    // 点位数组 [[x, y, z], [x, y, z]...]
    points: [],
    // 几何造型参数
    geometry: {
        // 开启斜边
        bevelEnabled: false,
        // 斜边厚度
        bevelThickness: 0.1,
        // 斜边大小
        bevelSize: 0.2,
        // 斜边偏移
        bevelOffset: 0.1,
        // 斜边分段
        bevelSegments: 1,
        // 深度
        depth: 1,
    },
    // 材质参数
    material: {
        // 面
        side: 2,
    }
})
属性成员
type
- 类型:
{String}物体类型ExtrudePolygon, 不可改 
isExtrudePolygon
- 类型:
{Boolean}是否为ExtrudePolygon,不可更改,默认为true 
needPoints
- 类型:
{Boolean}是否需要控制点,不可更改,默认为true 
mesh
- 类型:
{THREE.Mesh}网格 
方法
updatePoints
更新点位置
- updatePoints(points)
 - 类型:
{Function} - 参数: 
- points 
{Array}点位置 [[x, y, z], [x, y, z]...] 
 - points 
 - 返回:无