DynamicEnvironmentMapManager

new Cesium.DynamicEnvironmentMapManager(options)

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.
参数名称 类型 描述信息
options DynamicEnvironmentMapManager.ConstructorOptions 可选 An object describing initialization options.
使用示例s:
// Enable time-of-day environment mapping in a scene
scene.atmosphere.dynamicLighting = Cesium.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 = Cesium.Color.fromCssColorString("#203b34");

成员(属性)

static Cesium.DynamicEnvironmentMapManager.AVERAGE_EARTH_GROUND_COLOR : Color

Average hue of ground color on earth, a warm green-gray.

atmosphereScatteringIntensity : number

The intensity of the scattered light emitted from the atmosphere. This should be adjusted relative to the value of Scene.light intensity.
默认值: 2.0
参考:
  • DirectionalLight.intensity
  • SunLight.intensity
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.
默认值: 1.0
If true, the environment map and related properties will continue to update.
默认值: true
The gamma correction to apply to the range of light emitted from the environment. 1.0 uses the unmodified incoming light color.
默认值: 1.0
The percentage of light reflected from the ground. The average earth albedo is 0.31.
默认值: 0.31
Solid color used to represent the ground.
默认值: DynamicEnvironmentMapManager.AVERAGE_EARTH_GROUND_COLOR
The maximum difference in position before a new environment map is created, in meters. Small differences in position will not visibly affect results.
默认值: 1000
The maximum amount of elapsed seconds before a new environment map is created.
默认值: 3600
The position around which the environment map is generated.
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.
默认值: 1.0

方法

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.

Once an object is destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception. Therefore, assign the return value (undefined) to the object as done in the example.
Throws:
  • DeveloperError : This object was destroyed, i.e., destroy() was called.
使用示例:
mapManager = mapManager && mapManager.destroy();
参考:
Returns true if this object was destroyed; otherwise, false.

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.
返回值:
true if this object was destroyed; otherwise, false.
参考:

定义的类型

Cesium.DynamicEnvironmentMapManager.ConstructorOptions

Options for the DynamicEnvironmentMapManager constructor
属性:
属性名称 类型 可选 默认值 描述信息
enabled boolean <可选>
true If true, the environment map and related properties will continue to update.
mipmapLevels number <可选>
10 The number of mipmap levels to generate for specular maps. More mipmap levels will produce a higher resolution specular reflection.
maximumSecondsDifference number <可选>
3600 The maximum amount of elapsed seconds before a new environment map is created.
maximumPositionEpsilon number <可选>
1000 The maximum difference in position before a new environment map is created, in meters. Small differences in position will not visibly affect results.
atmosphereScatteringIntensity number <可选>
2.0 The intensity of the scattered light emitted from the atmosphere. This should be adjusted relative to the value of Scene.light intensity.
gamma number <可选>
1.0 The gamma correction to apply to the range of light emitted from the environment. 1.0 uses the unmodified emitted light color.
brightness number <可选>
1.0 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.
saturation number <可选>
1.0 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.
groundColor Color <可选>
DynamicEnvironmentMapManager.AVERAGE_EARTH_GROUND_COLOR Solid color used to represent the ground.
groundAlbedo number <可选>
0.31 The percentage of light reflected from the ground. The average earth albedo is 0.31.