backFaceAlphaByDistance
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.
// 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 NearFarScalar(1.5e2, 0.5, 8.0e6, 1.0);
globe.translucency.enabled = true;
Content copied to clipboard
// Example 2.
// Disable back face translucency by distance
globe.translucency.backFaceAlphaByDistance = undefined;
Content copied to clipboard