GlobeTranslucency

Properties for controlling globe translucency.

Members

A constant translucency to apply to back faces of the globe.

GlobeTranslucency#enabled must be set to true for this option to take effect.
Default Value: 1.0
Example:
// Set back face translucency to 0.5.
globe.translucency.backFaceAlpha = 0.5;
globe.translucency.enabled = true;
See:
Gets or sets near and far translucency properties of back faces of the globe based on the distance to the camera. The translucency will interpolate between the NearFarScalar#nearValue and NearFarScalar#farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar#near and NearFarScalar#far. Outside of these ranges the translucency remains clamped to the nearest bound. If undefined, backFaceAlphaByDistance will be disabled.

GlobeTranslucency#enabled must be set to true for this option to take effect.
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:
When true, the globe is rendered as a translucent surface.

The alpha is computed by blending Globe#material, Globe#imageryLayers, and Globe#baseColor, all of which may contain translucency, and then multiplying by GlobeTranslucency#frontFaceAlpha and GlobeTranslucency#frontFaceAlphaByDistance for front faces and GlobeTranslucency#backFaceAlpha and GlobeTranslucency#backFaceAlphaByDistance for back faces. When the camera is underground back faces and front faces are swapped, i.e. back-facing geometry is considered front facing.

Translucency is disabled by default.
Default Value: false
See:
A constant translucency to apply to front faces of the globe.

GlobeTranslucency#enabled must be set to true for this option to take effect.
Default Value: 1.0
Example:
// Set front face translucency to 0.5.
globe.translucency.frontFaceAlpha = 0.5;
globe.translucency.enabled = true;
See:
Gets or sets near and far translucency properties of front faces of the globe based on the distance to the camera. The translucency will interpolate between the NearFarScalar#nearValue and NearFarScalar#farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar#near and NearFarScalar#far. Outside of these ranges the translucency remains clamped to the nearest bound. If undefined, frontFaceAlphaByDistance will be disabled.

GlobeTranslucency#enabled must be set to true for this option to take effect.
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:
A property specifying a Rectangle used to limit translucency to a cartographic area. Defaults to the maximum extent of cartographic coordinates.
Default Value: Rectangle.MAX_VALUE
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.