English中文

GlobeTranslucency

new Cesium.GlobeTranslucency()

用于控制球体半透明度的属性。 Properties for controlling globe translucency.

成员 Members

应用于地球背面的恒定半透明度。 A constant translucency to apply to back faces of the globe.

GlobeTranslucency#enabled 必须设置为 true 才能使该选项生效。 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。在这些范围之外,半透明度仍然被限制在最近的范围内。如果未定义,backFaceAlphaByDistance 将被禁用。 . Outside of these ranges the translucency remains clamped to the nearest bound. If undefined, backFaceAlphaByDistance will be disabled.

GlobeTranslucency#enabled 必须设置为 true 才能使该选项生效。 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:
如果为 true,地球将呈现为半透明表面。 When true, the globe is rendered as a translucent surface.

alpha 是通过混合计算的 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 必须设置为 true 才能使该选项生效。 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。在这些范围之外,半透明度仍然被限制在最近的范围内。如果未定义,frontFaceAlphaByDistance 将被禁用。 . Outside of these ranges the translucency remains clamped to the nearest bound. If undefined, frontFaceAlphaByDistance will be disabled.

GlobeTranslucency#enabled 必须设置为 true 才能使该选项生效。 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.