Lights
Light functions allow you to control and manipulate lighting in your rooomSpaces scenes. You can retrieve information about existing lights and update their properties to create the desired lighting atmosphere.
getLights
getLights(callback: Function)
Gets 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