Interface: SceneConfig
Defines a complete set of scene components and their configuration.
The SceneConfig interface brings together all the elements that make up a 3D scene, including cameras, lights, ground settings, shadows, and environment properties. This comprehensive configuration creates the complete visual environment in which products are displayed and experienced.
A well-balanced scene configuration creates the ideal presentation context for products, with appropriate lighting, viewing angles, shadows, and background elements.
Example
// Defining a complete studio-like scene setup
const studioScene = {
camera: [mainCamera, closeupCamera],
light: [keyLight, fillLight, rimLight],
ground: floorSettings,
shadows: { resolution: 1024, darkness: 0.7 },
clearColor: [0.95, 0.95, 0.97], // Very light blue-gray background
environmentIntensity: 0.8
};
Properties
boundingBox?
optionalboundingBox:SceneBoundingBoxSettings
Settings for the scene's bounding box visualization.
Controls the appearance of the box that represents the limits of the scene, useful for debugging and development.
camera
camera:
CameraSettings[]
Collection of camera definitions for the scene.
Multiple cameras can be defined for different viewing perspectives, allowing users to switch between predetermined views.
clearColor
clearColor:
number[]
Background color of the scene [r, g, b].
This color appears in areas not covered by the environment texture or when no environment texture is used.
environmentIntensity?
optionalenvironmentIntensity:number
Strength of environmental lighting from the environment texture.
Controls how strongly the environment contributes to global illumination, affecting ambient lighting and reflections.
ground
ground:
GroundSettings
Configuration for the ground/floor of the scene.
Defines how the surface beneath products appears and behaves, including its texture, color, and measurement grid.
light
light:
LightSettings[]
Collection of light sources illuminating the scene.
Multiple lights work together to create the desired lighting environment, typically including key, fill, and ambient sources.
shadows?
optionalshadows:ShadowSettings
Settings that control shadow rendering quality and appearance.
Fine-tunes how shadows are calculated and displayed, affecting their softness, darkness, and precision.
useLegacyLightingIntensityMode?
optionaluseLegacyLightingIntensityMode:boolean
If true, it will be using buggy approach to lightning intensity and skip a lot of new logic for calculating reflections intensity
It's mainly for legacy scenes which were looking too bright or too dark at current settings when used on the newest babylonjs version