Represents a command to set the environment by its ID.
To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
What does it unlock?
Sets environmental/lighting settings for the scene. Controls factors like lighting conditions and environmental appearance.
Practical Application
Changes the 3D scene/environment (studio, showroom, outdoor, etc.). Takes an environmentId UUID.
Environments include lighting, backdrop, and optionally dynamic sky (udsEnabled) with time-of-day (udsHour) control.
AI Coding Best Practices
Call api.sendCommandToMetabox(new SetEnvironment('env-uuid')). Get valid environment IDs from the configurator
definition in configuratorDataUpdated. Set environment after product during initialization. Each environment has
its own material slots, thumbnails, and lighting properties.
//Subscribe to the event before sending the command to ensure you capture the response api.addEventListener('configuratorDataUpdated', (data:ConfiguratorEnvelope) => { console.log('State updated after applied new environment:', data); });
Represents a command to set the environment by its ID. To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
What does it unlock?
Sets environmental/lighting settings for the scene. Controls factors like lighting conditions and environmental appearance.
Practical Application
Changes the 3D scene/environment (studio, showroom, outdoor, etc.). Takes an environmentId UUID. Environments include lighting, backdrop, and optionally dynamic sky (udsEnabled) with time-of-day (udsHour) control.
AI Coding Best Practices
Call
api.sendCommandToMetabox(new SetEnvironment('env-uuid')). Get valid environment IDs from the configurator definition in configuratorDataUpdated. Set environment after product during initialization. Each environment has its own material slots, thumbnails, and lighting properties.Example
Param: environmentId
The environment ID.