frontFaceAlphaByDistance

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.

// 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 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 also