Lights
rooomProducts Viewer API lighting controls for optimal product presentation. Get and update light properties, intensity, and colors to create perfect product illumination and showcase features.
Are you an LLM? You can read better optimized documentation at /docs/rooom-products/viewer/viewer-api/lights.md for this page in Markdown format
getLights
getLights(callback: Function)
Gets 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) {
var light = lights[0];
light.intensity = 0.5;
api.updateLight(light);
});