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#nearValueNearFarScalar#farValue 当摄像机距离落在下限和上限内时 指定的 NearFarScalar#nearNearFarScalar#far 的 。 在这些范围之外,半透明性仍然被限制在最近的边界上。 如果未定义,则 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#imageryLayers、 和 Globe#baseColor,所有这些都包含半透明,然后乘以 GlobeTranslucency#frontFaceAlphaGlobeTranslucency#frontFaceAlphaByDistance 用于正面和 GlobeTranslucency#backFaceAlphaGlobeTranslucency#backFaceAlphaByDistance 用于背面。 当摄像机位于地下时,背面和正面会互换,即背面几何形状 被视为正面。

默认情况下,半透明处于禁用状态。
Default Value: false
See:
应用于地球仪正面的持续半透明效果。

GlobeTranslucency#enabled 必须设置为 true 才能使此选项生效。
Default Value: 1.0
Example:
// Set front face translucency to 0.5.
globe.translucency.frontFaceAlpha = 0.5;
globe.translucency.enabled = true;
See:
根据到摄像机的距离获取或设置地球正面的近距和远距半透明属性。 半透明将在 NearFarScalar#nearValueNearFarScalar#farValue 当摄像机距离落在下限和上限内时 指定的 NearFarScalar#nearNearFarScalar#far 的。 在这些范围之外,半透明性仍然被限制在最近的边界上。 如果未定义,则 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
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.