setEnvironment
Configure 3D scene environment settings including background, lighting, fog, shadows, and post-processing effects for realistic or stylized rendering.
Instructions
Configure the scene environment: background, fog, tone mapping, shadows, and post-processing effects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| background | No | CSS color or HDRI URL for the background | |
| hdriUrl | No | URL to a .hdr or .exr HDRI file for image-based lighting. This sets both the environment map (for reflections) and optionally the background. Use with skyType:"hdri". | |
| fog | No | Fog settings. Pass null to disable. | |
| shadows | No | Enable/disable shadow rendering | |
| toneMapping | No | Tone mapping algorithm | |
| exposure | No | Renderer exposure (default 1.0) | |
| bloom | No | Bloom (glow) post-processing. Controls how bright/emissive surfaces bleed light. | |
| chromaticAberration | No | Chromatic aberration: splits RGB channels for a lens distortion look. | |
| vignette | No | Vignette: darkens screen edges for a cinematic look. |