Environmental Lighting Controls
Control lighting in your virtual spaces to create immersive atmospheres and realistic environmental conditions. Proper lighting is crucial for creating believable virtual showrooms and engaging user experiences. Light functions allow you to control and manipulate lighting in your virtual space scenes. You can retrieve information about existing lights and update their properties to create the desired environmental atmosphere.
getLights
getLights(callback: Function)
Get a list of all lights in the scene.
js
api.getLights(function (lights) {
console.log(lights);
});
1
2
3
2
3
updateLight
updateLight(options: object, [callback: Function])
Updates a light by setting some options. To get all options of a given light, use the getLights function.
js
api.getLights(function (lights) {
light = lights[0];
light.intensity = 0.5;
api.updateLight(light);
});
1
2
3
4
5
2
3
4
5