DynamicEnvironmentMapManager

open external class DynamicEnvironmentMapManager(options: DynamicEnvironmentMapManager.ConstructorOptions? = definedExternally)(source)

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
external object Companion
Link copied to clipboard
external interface ConstructorOptions

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
external var brightness: Double

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
external var enabled: Boolean

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

Link copied to clipboard
external var gamma: Double

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
external var groundAlbedo: Double

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

Link copied to clipboard
external var groundColor: Color

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
external var position: Cartesian3?

The position around which the environment map is generated.

Link copied to clipboard
external var saturation: Double

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
external 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
external fun isDestroyed(): Boolean

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