Represents a command to set an environment material by its slot ID and Material ID.
To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
What does it unlock?
Sets environmental material properties such as textures and appearance attributes for the scene environment.
Practical Application
Applies materials to environment slots (floor, walls, backdrop textures). Takes slotId and materialId.
Use for scene-based configurators where the environment is also customizable — kitchen visualizers,
room planners, trade show booth designers.
AI Coding Best Practices
Pattern: new SetEnvironmentMaterial('floor-slot-id', 'material-uuid'). Get valid slot and material IDs from
the environment definition's slots array in configuratorDataUpdated. Only useful when the active environment
has configurable material slots.
//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 material:', data); });
Represents a command to set an environment material by its slot ID and Material ID. To listen for changes after sending this command, listen to the 'configuratorDataUpdated' event.
What does it unlock?
Sets environmental material properties such as textures and appearance attributes for the scene environment.
Practical Application
Applies materials to environment slots (floor, walls, backdrop textures). Takes slotId and materialId. Use for scene-based configurators where the environment is also customizable — kitchen visualizers, room planners, trade show booth designers.
AI Coding Best Practices
Pattern:
new SetEnvironmentMaterial('floor-slot-id', 'material-uuid'). Get valid slot and material IDs from the environment definition's slots array in configuratorDataUpdated. Only useful when the active environment has configurable material slots.Example
Param: slotId
The slot ID.
Param: materialId
The material ID.