DynamicEnvironmentMapManager

Generates an environment map at the given position based on scene's current lighting conditions. From this, it produces multiple levels of specular maps and spherical harmonic coefficients than can be used with ImageBasedLighting for models or tilesets.

// Enable time-of-day environment mapping in a scene
scene.atmosphere.dynamicLighting = DynamicAtmosphereLightingType.SUNLIGHT;

// Decrease the directional lighting contribution
scene.light.intensity = 0.5

// Increase the intensity of of the environment map lighting contribution
const environmentMapManager = tileset.environmentMapManager;
environmentMapManager.atmosphereScatteringIntensity = 3.0;
// Change the ground color used for a model's environment map to a forest green
const environmentMapManager = model.environmentMapManager;
environmentMapManager.groundColor = Color.fromCssColorString("#203b34");

Parameters

options

An object describing initialization options.

See also

Constructors

Link copied to clipboard
constructor(options: DynamicEnvironmentMapManager.ConstructorOptions? = definedExternally)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Options for the DynamicEnvironmentMapManager constructor

Properties

Link copied to clipboard

The intensity of the scattered light emitted from the atmosphere. This should be adjusted relative to the value of Scene.light intensity.

Link copied to clipboard

The brightness of light emitted from the environment. 1.0 uses the unmodified emitted environment color. Less than 1.0 makes the light darker while greater than 1.0 makes it brighter.

Link copied to clipboard

If true, the environment map and related properties will continue to update.

Link copied to clipboard

The gamma correction to apply to the range of light emitted from the environment. 1.0 uses the unmodified incoming light color.

Link copied to clipboard

The percentage of light reflected from the ground. The average earth albedo is 0.31.

Link copied to clipboard

Solid color used to represent the ground.

Link copied to clipboard

The maximum difference in position before a new environment map is created, in meters. Small differences in position will not visibly affect results.

Link copied to clipboard

The maximum amount of elapsed seconds before a new environment map is created.

Link copied to clipboard

The position around which the environment map is generated.

Link copied to clipboard

The saturation of the light emitted from the environment. 1.0 uses the unmodified emitted environment color. Less than 1.0 reduces the saturation while greater than 1.0 increases it.

Functions

Link copied to clipboard
fun destroy()

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

Link copied to clipboard

Returns true if this object was destroyed; otherwise, false.