Members
-
Default Value:
1.0
Example:
// Set back face translucency to 0.5.
globe.translucency.backFaceAlpha = 0.5;
globe.translucency.enabled = true;
See:
backFaceAlphaByDistance : NearFarScalar
获取或设置地球背面面的近距离和远距离透明度属性,基于与相机的距离。
当相机距离在指定的
NearFarScalar#near 和 NearFarScalar#far 的上下限内时,透明度将在
NearFarScalar#nearValue 和 NearFarScalar#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 值通过混合
默认情况下禁用透明度。
alpha 值通过混合
Globe#material、Globe#imageryLayers 和
Globe#baseColor 来计算,这些都可能包含透明度,然后乘以
GlobeTranslucency#frontFaceAlpha 和 GlobeTranslucency#frontFaceAlphaByDistance 处理前面,以及
GlobeTranslucency#backFaceAlpha 和 GlobeTranslucency#backFaceAlphaByDistance 处理后面。
当相机位于地下时,背面和前面的面会交换,即背面几何体
被视为正面。
默认情况下禁用透明度。
-
Default Value:
false
See:
-
Default Value:
1.0
Example:
// 将前面面的透明度设置为 0.5。
globe.translucency.frontFaceAlpha = 0.5;
globe.translucency.enabled = true;
See:
frontFaceAlphaByDistance : NearFarScalar
获取或设置地球前面面的近距离和远距离透明度属性,基于与相机的距离。
当相机距离在指定的
NearFarScalar#near 和 NearFarScalar#far 的上下限内时,透明度将在
NearFarScalar#nearValue 和 NearFarScalar#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
