跳至主要內容

LightBox

小于 1 分钟

LightBox

继承自Thing,拥有ThingTHREE.Object3D一切属性和方法。

构造器

new VT.LightBox({
    // 几何造型参数
    geometry: {
        width: 0,
        height: 0,
        depth: 0.01,
        border: 0.04,
    },
    // 灯光
    light: {
        color: "#ffffff",
        intensity: 1,
    },
    // 材质
    material: {
        metalness: 0.5,
        roughness: 0.7,
        side: 2,
        color: "#111111"
    },
    // 图片播放设置
    style: {
        images: [],
        current: 0,
        duration: 1000,
    },
})

属性成员

isLightBox

  • 类型: {Boolean} 是否LightBox对象,是,不可修改

type

  • 类型: {String} LightBox,不可修改

backPlane

  • 类型:Plane Plane 背板

light

  • 类型:RectAreaLight 矩形光

imagePlane

方法

updateLight

更新灯光参数

  • updateLight(light)
  • 类型:Function
  • 参数:
    • light {Object} light 参数,见下
  • 返回:无
{
    color: "#ffffff",
    intensity: 1,
}

updateStyle

更新图片样式

  • updateStyle(style)
  • 类型:Function
  • 参数:
    • style {Object} style 参数,见下
  • 返回:无
{
    images: [],
    current: 0,
    duration: 1000,
}

play

播放灯箱图片

  • play()
  • 类型:Function
  • 参数:无
  • 返回:无

pause

暂停播放灯箱图片

  • pause()
  • 类型:Function
  • 参数:无
  • 返回:无
上次编辑于:
贡献者: dashun