Atmosphere

new Cesium.Atmosphere()

3D Tiles 和模型用于渲染天空气氛、地面气氛和雾的常见大气设置。

此类与 SkyAtmosphere 不应混淆,它负责渲染天空。

虽然大气设置影响雾的颜色,请参见 Fog 控制雾的渲染方式。

Examples:
// Turn on dynamic atmosphere lighting using the sun direction
scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SUNLIGHT;
// Turn on dynamic lighting using whatever light source is in the scene
scene.light = new Cesium.DirectionalLight({
  direction: new Cesium.Cartesian3(1, 0, 0)
});
scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SCENE_LIGHT;
// Adjust the color of the atmosphere effects.
scene.atmosphere.hueShift = 0.4; // Cycle 40% around the color wheel
scene.atmosphere.brightnessShift = 0.25; // Increase the brightness
scene.atmosphere.saturationShift = -0.1; // Desaturate the colors
See:

Members

brightnessShift : number

应用于大气的亮度偏移。默认值为 0.0(无偏移)。 亮度偏移为 -1.0 表示完全黑暗,将允许空间显现出来。
Default Value: 0.0
当不是 DynamicAtmosphereLightingType.NONE 时,选择的光源将 用于动态照亮所有与大气相关的渲染效果。
Default Value: DynamicAtmosphereLightingType.NONE
应用于大气的色调偏移。默认值为 0.0(无偏移)。 色调偏移为 1.0 表示可用色调的完全旋转。
Default Value: 0.0

lightIntensity : number

用于计算地面气氛颜色的光的强度。
Default Value: 10.0

mieAnisotropy : number

考虑到米散射的介质各向异性。

有效值在 -1.0 和 1.0 之间。

Default Value: 0.9
用于地面气氛的气态散射方程中的米散射系数。
Default Value: Cartesian3(21e-6, 21e-6, 21e-6)

mieScaleHeight : number

用于地面气氛的气态散射方程中的米尺度高度,以米为单位。
Default Value: 3200.0
用于地面气氛的气态散射方程中的瑞利散射系数。
Default Value: Cartesian3(5.5e-6, 13.0e-6, 28.4e-6)

rayleighScaleHeight : number

用于地面气氛的气态散射方程中的瑞利尺度高度,以米为单位。
Default Value: 10000.0

saturationShift : number

应用于大气的饱和度偏移。默认值为 0.0(无偏移)。 饱和度偏移为 -1.0 表示单色。
Default Value: 0.0

Methods

static Cesium.Atmosphere.requiresColorCorrect(atmosphere)boolean

返回 true 如果大气着色器需要颜色校正步骤。
Name Type Description
atmosphere Atmosphere 要检查的大气实例
Returns:
如果大气着色器需要颜色校正步骤则返回 true
需要帮助?获得答案的最快方法是来自社区和团队 Cesium Forum.