根据场景当前照明条件在指定位置生成环境图. 从这里,它产生多层次的谱图和球形的谐振系数,而不能与
ImageBasedLighting 用于模型或瓷砖.
| Name | Type | Description |
|---|---|---|
options |
DynamicEnvironmentMapManager.ConstructorOptions | optional 一个描述初始化选项的对象 . |
Examples:
// 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");
Members
static readonly Cesium.DynamicEnvironmentMapManager.AVERAGE_EARTH_GROUND_COLOR : Color
地球上地面颜色的平均色调,一种温暖的绿色灰色.
static readonly Cesium.DynamicEnvironmentMapManager.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS : Array.<Cartesian3>
默认的第三顺序球形谐波系数用于图像基照明的散色,一种低强度的白色环境光.
有9个NT++1+NT+0+NT+2+系数. 系数的顺序为: NT 18 ,0 NT 1 , NT 19 ,-1 NT 3 , NT 20 ,0 NT 5 , NT 21 ,1 NT 7 , NT 22 ,-2 NT 9 , NT 23 ,-1 NT 11 , NT 24 ,0 NT 13 , NT 25 ,1 NT 15 , NT 26 2 NT 17
The intensity of the scattered light emitted from the atmosphere. This should be adjusted relative to the value of
Scene.light intensity.
-
Default Value:
- DirectionalLight.intensity
- SunLight.intensity
2.0
See:
环境发出的光亮。 1.0 使用未修改的环境颜色。 少于1.0
使光变暗,而大于1.0则使其亮.
-
Default Value:
1.0
如果真实,环境图和相关属性将继续更新.
-
Default Value:
true
伽玛校正适用于环境发射光的范围。 1.0使用未修改的来光颜色.
-
Default Value:
1.0
从地面反射的光的比例。 平均土反照率为0.31.
-
Default Value:
0.31
groundColor : Color
实色用来代表地面.
-
Default Value:
-NT=0=- 翻译:
创建新环境图之前的最大位置差异, 以米计 。 立场上的微小差异不会明显影响结果.
-
Default Value:
1000
创建新环境图前的最大已过期秒数 .
-
Default Value:
3600
position : Cartesian3|undefined
环境图的生成位置 .
环境释放出的光线饱和度。 1.0 使用未修改的环境颜色。 小于1.0 减少
饱和度在大于1.0的同时增加.
-
Default Value:
1.0
Methods
Returns
true if dynamic updates are supported in the current WebGL rendering context.
动态更新需要 EXT color buffer float 或 EXT color buffer half float 扩展名.
| Name | Type | Description |
|---|---|---|
scene |
Scene | 包含渲染上下文的对象 |
Returns:
如果支持则为真
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
释放 WebGL 资源,而不是依赖垃圾收集器来摧毁此对象.
Once an object is destroyed, it should not be used; calling any function other than
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.
Example:
mapManager = mapManager && mapManager.destroy();
See:
如果此对象被销毁, 返回真实; 否则, 错误 .
If this object was destroyed, it should not be used; calling any function other than
If this object was destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception.
Returns:
true if this object was destroyed; otherwise, false.
Type Definitions
动态环境管理器的选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
enabled |
boolean |
<optional> |
true | If true, the environment map and related properties will continue to update. |
mipmapLevels |
number |
<optional> |
7 | The maximum desired number of mipmap levels to generate for specular maps. More mipmap levels will produce a higher resolution specular reflection. The actual number of mipmaps used will be bounded by the cubemap texture size supported on the client machine. The number of mipmaps must be at least one for the environment map to be generated. |
maximumSecondsDifference |
number |
<optional> |
3600 | The maximum amount of elapsed seconds before a new environment map is created. |
maximumPositionEpsilon |
number |
<optional> |
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 |
<optional> |
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 |
<optional> |
1.0 | 伽玛校正适用于环境发射光的范围。 1.0 使用未修改的发射光色. |
brightness |
number |
<optional> |
1.0 | 环境发出的光亮。 1.0 使用未修改的环境颜色。 小于1.0使光变暗,而大于1.0则使其亮. |
saturation |
number |
<optional> |
1.0 | 环境释放出的光的饱和度. 1.0 使用未修改的环境颜色。 少于1.0会减少饱和度,而大于1.0会增加饱和度. |
groundColor |
Color |
<optional> |
DynamicEnvironmentMapManager.AVERAGE_EARTH_GROUND_COLOR | Solid color used to represent the ground. |
groundAlbedo |
number |
<optional> |
0.31 | 从地面反射光的百分比. 平均土反照率为0.31. |