GlobeTranslucency

new Cesium.GlobeTranslucency()

控制地球透明度的属性。

Members

应用于地球背面面的常量透明度。

GlobeTranslucency#enabled 必须设置为 true 才能使此选项生效。
Default Value: 1.0
Example:
// Set back face translucency to 0.5.
globe.translucency.backFaceAlpha = 0.5;
globe.translucency.enabled = true;
See:
获取或设置地球背面面的近距离和远距离透明度属性,基于与相机的距离。 当相机距离在指定的 NearFarScalar#nearNearFarScalar#far 的上下限内时,透明度将在 NearFarScalar#nearValueNearFarScalar#farValue 之间进行插值。 在这些范围之外,透明度保持在最近的边界。如果未定义, backFaceAlphaByDistance 将被禁用。

GlobeTranslucency#enabled 必须设置为 true 才能使此选项生效。
Default Value: undefined
Examples:
// Example 1.
// Set back face translucency to 0.5 when the
// camera is 1500 meters from the surface and 1.0
// as the camera distance approaches 8.0e6 meters.
globe.translucency.backFaceAlphaByDistance = new Cesium.NearFarScalar(1.5e2, 0.5, 8.0e6, 1.0);
globe.translucency.enabled = true;
// Example 2.
// Disable back face translucency by distance
globe.translucency.backFaceAlphaByDistance = undefined;
See:
当为 true 时,地球作为透明表面进行渲染。

alpha 值通过混合 Globe#materialGlobe#imageryLayersGlobe#baseColor 来计算,这些都可能包含透明度,然后乘以 GlobeTranslucency#frontFaceAlphaGlobeTranslucency#frontFaceAlphaByDistance 处理前面,以及 GlobeTranslucency#backFaceAlphaGlobeTranslucency#backFaceAlphaByDistance 处理后面。 当相机位于地下时,背面和前面的面会交换,即背面几何体 被视为正面。

默认情况下禁用透明度。
Default Value: false
See:
应用于地球前面面的常量透明度。

GlobeTranslucency#enabled 必须设置为 true 才能使此选项生效。
Default Value: 1.0
Example:
// 将前面面的透明度设置为 0.5。
globe.translucency.frontFaceAlpha = 0.5;
globe.translucency.enabled = true;
See:
获取或设置地球前面面的近距离和远距离透明度属性,基于与相机的距离。 当相机距离在指定的 NearFarScalar#nearNearFarScalar#far 的上下限内时,透明度将在 NearFarScalar#nearValueNearFarScalar#farValue 之间进行插值。 在这些范围之外,透明度保持在最近的边界。如果未定义, frontFaceAlphaByDistance 将被禁用。

GlobeTranslucency#enabled 必须设置为 true 才能使此选项生效。
Default Value: undefined
Examples:
// Example 1.
// Set front face translucency to 0.5 when the
// camera is 1500 meters from the surface and 1.0
// as the camera distance approaches 8.0e6 meters.
globe.translucency.frontFaceAlphaByDistance = new Cesium.NearFarScalar(1.5e2, 0.5, 8.0e6, 1.0);
globe.translucency.enabled = true;
// Example 2.
// Disable front face translucency by distance
globe.translucency.frontFaceAlphaByDistance = undefined;
See:
指定一个 Rectangle 的属性,用于限制透明度在一个大地区域内。 默认为大地坐标的最大范围。
Default Value: Rectangle.MAX_VALUE
需要帮助?获得答案的最快方法是来自社区和团队 Cesium Forum.