LightBox
小于 1 分钟
LightBox
继承自Thing,拥有Thing
、THREE.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
- 类型:
ImagePlane
ImagePlane
方法
updateLight
更新灯光参数
- updateLight(light)
- 类型:
Function
- 参数:
- light
{Object}
light 参数,见下
- light
- 返回:无
{
color: "#ffffff",
intensity: 1,
}
updateStyle
更新图片样式
- updateStyle(style)
- 类型:
Function
- 参数:
- style
{Object}
style 参数,见下
- style
- 返回:无
{
images: [],
current: 0,
duration: 1000,
}
play
播放灯箱图片
- play()
- 类型:
Function
- 参数:无
- 返回:无
pause
暂停播放灯箱图片
- pause()
- 类型:
Function
- 参数:无
- 返回:无