English中文

Atmosphere

new Cesium.Atmosphere()

3D Tiles 和模型用于渲染天空大气、地面大气和雾的常见大气设置。 Common atmosphere settings used by 3D Tiles and models for rendering sky atmosphere, ground atmosphere, and fog.

这个类不要与 This class is not to be confused with SkyAtmosphere,它负责渲染天空。 , which is responsible for rendering the sky.

虽然大气设置会影响雾的颜色,但请参阅 While the atmosphere settings affect the color of fog, see Fog 控制雾的渲染方式。 to control how fog is rendered.

示例: 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 的亮度偏移表示完全黑暗,这将使空间显现出来。 The brightness shift to apply to the atmosphere. Defaults to 0.0 (no shift). A brightness shift of -1.0 is complete darkness, which will let space show through.
默认值: Default Value: 0.0
当不是 DynamicAtmosphereLightingType.NONE 时,选定的光源将用于动态照明所有与大气相关的渲染效果。 When not DynamicAtmosphereLightingType.NONE, the selected light source will be used for dynamically lighting all atmosphere-related rendering effects.
默认值: Default Value: DynamicAtmosphereLightingType.NONE
适用于气氛的色调变化。默认为 0.0(无移位)。色调偏移 1.0 表示可用色调的完整旋转。 The hue shift to apply to the atmosphere. Defaults to 0.0 (no shift). A hue shift of 1.0 indicates a complete rotation of the hues available.
默认值: Default Value: 0.0

lightIntensity : number

用于计算地面大气颜色的光强度。 The intensity of the light that is used for computing the ground atmosphere color.
默认值: Default Value: 10.0

mieAnisotropy : number

米氏散射要考虑的介质的各向异性。 The anisotropy of the medium to consider for Mie scattering.

有效值介于 -1.0 和 1.0 之间。 Valid values are between -1.0 and 1.0.

默认值: Default Value: 0.9
地面大气的大气散射方程中使用的米氏散射系数。 The Mie scattering coefficient used in the atmospheric scattering equations for the ground atmosphere.
默认值: Default Value: Cartesian3(21e-6, 21e-6, 21e-6)

mieScaleHeight : number

地面大气的大气散射方程中使用的米氏标度高度,以米为单位。 The Mie scale height used in the atmospheric scattering equations for the ground atmosphere, in meters.
默认值: Default Value: 3200.0
地面大气的大气散射方程中使用的瑞利散射系数。 The Rayleigh scattering coefficient used in the atmospheric scattering equations for the ground atmosphere.
默认值: Default Value: Cartesian3(5.5e-6, 13.0e-6, 28.4e-6)

rayleighScaleHeight : number

地面大气的大气散射方程中使用的瑞利标度高度,以米为单位。 The Rayleigh scale height used in the atmospheric scattering equations for the ground atmosphere, in meters.
默认值: Default Value: 10000.0

saturationShift : number

适用于大气的饱和度偏移。默认为 0.0(无移位)。 -1.0 的饱和度偏移是单色的。 The saturation shift to apply to the atmosphere. Defaults to 0.0 (no shift). A saturation shift of -1.0 is monochrome.
默认值: Default Value: 0.0

方法 Methods

static Cesium.Atmosphere.requiresColorCorrect(atmosphere)boolean

Returns true 如果大气着色器需要颜色校正步骤。 if the atmosphere shader requires a color correct step.
名称 Name 类型 Type 说明 Description
atmosphere Atmosphere 要检查的大气实例 The atmosphere instance to check
返回: Returns:
true 如果大气着色器需要颜色校正步骤 true if the atmosphere shader requires a color correct step
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.