跳至主要內容

Wall

小于 1 分钟

Wall

墙体,继承自Geometry对象,拥有一切GeometryThing属性及方法。

构造器

new VT.Wall({
    name: "Wall",
    // 点位
    points: [],
    // 几何体构造
    geometry: {
        height: 3.0,
        width: 0.2,
        closed: false,
        openEnded: false,
    },
    // 材质
    material: {
        side: 2,
        map: {
            image: "sdk:/resources/texture/wall1.jpg",
        },
    },
});

属性成员

type

  • 类型:{String} 物体类型Wall, 不可改

isWall

  • 类型:{Boolean} 是否为isWall,不可更改,默认为true

length

  • 类型:{Number} 墙体长度,不可更改,默认值为0

points

  • 类型:{Array<Array<Number>>} 点位数组,默认值为[]

方法

updatePoints

更新点位

  • updatePoints(points)
  • 类型:{Function}
  • 参数:
    • points {Array<Array<Number>} [[0, 0, 0],...]
  • 返回:无
上次编辑于:
贡献者: dashun