SkyEnvironmentOptions
Options for sky.createEnvironmentMap(), which builds a SkyEnvironment. Also accepted by sky.createSkyProvider()'s envMap field.
The defaults below apply to a direct createEnvironmentMap() call. createSkyProvider({ envMap: true }) starts from the active quality tier; an options object passed as envMap overrides that tier field by field.
const env = sky.createEnvironmentMap({
width: 512,
cloudMarchSteps: 24,
});2
3
4
Options
width
Type: number
Default: 384
Units: pixels
Sets the texture width. Increasing both dimensions improves reflection detail but raises rendering cost with pixel count. height defaults to half the width.
height
Type: number
Default: width / 2
Units: pixels
Sets the height of the baked texture. Equirectangular maps are 2:1, so leave this alone unless you want a deliberately non-standard bake.
includeClouds
Type: boolean
Default: true
Units: -
Includes clouds in the environment map. Set it to false for a sky-only reflection and to skip the cloud raymarch.
This option is fixed at construction. To temporarily hide clouds from an existing environment map, use bakeClouds.
cloudMarchSteps
Type: number
Default: 16
Units: -
Sets the number of samples in the environment map's cloud raymarch. This does not affect on-screen clouds.
cloudMipBase
Type: number
Default: 0
Units: -
Selects a coarser cloud-noise mip level. Higher values reduce cost and soften reflected clouds.
origin
Type: THREE.Vector3
Default: (0,0,0)
Units: meters
Sets the world-space capture point. For a flat mirror, place it on the reflective surface. See Reflections.
skipFrames
Type: number
Default: 4
Units: frames
Sets how many update() calls pass between volumetric-cloud raymarches. 0 raymarches every frame; higher values trade cumulus freshness for speed on slow hardware. Animated cirrus/haze still updates between those raymarches. Clamped to 0–8.
initialBake
Type: boolean
Default: true
Units: -
Populates the texture synchronously during construction. Set this to false when assembling several startup settings, then call update() or bakeAll() before consuming the texture.
