Lights
rooomSpaces Viewer API lighting controls for immersive virtual environments. Get and update light properties, intensity, and colors to create perfect 3D space illumination and atmosphere.
Are you an LLM? You can read better optimized documentation at /docs/rooom-spaces/viewer/viewer-api/lights.md for this page in Markdown format
Light functions allow you to retrieve and update lighting properties within the virtual space scene.
getLights
getLights(callback: Function)
Get a list of all lights in the scene.
js
api.getLights(function (lights) {
console.log(lights);
});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) {
const light = lights[0];
light.intensity = 0.5;
api.updateLight(light);
});