Name | Type | Default | Description |
---|---|---|---|
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
optional 决定 的大小和形状 球。 |
Members
应用于大气的亮度偏移。默认为 0.0(无偏移)。
-1.0 的亮度偏移是完全黑暗的,这将使空间透出。
-
Default Value:
0.0
应用于大气的色相偏移。默认为 0.0(无偏移)。
色相偏移 1.0 表示可用色相完全旋转。
-
Default Value:
0.0
用于计算地面大气颜色的光的强度。
-
Default Value:
10.0
米氏散射要考虑的介质的各向异性。
有效值介于 -1.0 和 1.0 之间。
-
Default Value:
0.9
atmosphereMieCoefficient : Cartesian3
地面大气的大气散射方程中使用的 Mie 散射系数。
-
Default Value:
Cartesian3(21e-6, 21e-6, 21e-6)
地面大气的大气散射方程中使用的米氏标尺高度,以米为单位。
-
Default Value:
3200.0
atmosphereRayleighCoefficient : Cartesian3
地面大气的大气散射方程中使用的瑞利散射系数。
-
Default Value:
Cartesian3(5.5e-6, 13.0e-6, 28.4e-6)
地面大气大气散射方程中使用的瑞利标尺高度,以米为单位。
-
Default Value:
10000.0
应用于大气的饱和度偏移。默认为 0.0(无偏移)。
-1.0 的饱和度偏移为单色。
-
Default Value:
0.0
是否剔除背面的地形。当摄像机位于地下或启用半透明时,不会剔除背面。
-
Default Value:
true
baseColor : Color
获取或设置color of the globe when no imagery is available.
cartographicLimitRectangle : Rectangle
指定
Rectangle
的属性,用于将 globe 渲染限制为制图区域。
默认为制图坐标的最大范围。
-
Default Value:
Rectangle.MAX_VALUE
clippingPlanes : ClippingPlaneCollection
一个属性,用于指定
ClippingPlaneCollection
,用于选择性地禁用每个平面外部的渲染。
clippingPolygons : ClippingPolygonCollection
一个属性,用于指定
ClippingPolygonCollection
,用于选择性地禁用多边形列表内部或外部的渲染。
如果应对 billboard、polylines、labels 等基元进行深度测试,则为 True。
针对地形表面,如果此类基元应始终绘制在顶部,则为 false
的地形,除非它们位于地球的另一侧。 深度的缺点
根据地形测试基元是轻微的数值噪声或地形细节级别
switched 有时会使本应位于表面上的基元在其下方消失。
-
Default Value:
false
在大气和雾气上启用动态照明效果。这只会生效
当
enableLighting
为 true
时。
-
Default Value:
true
动态氛围照明是否使用太阳方向而不是场景的方向
灯光方向。这仅在
enableLighting
和
dynamicAtmosphereLighting
为 true
。
-
Default Value:
false
ellipsoid : Ellipsoid
获取描述此地球形状的椭球体。
启用使用场景的光源照亮地球。
-
Default Value:
false
fillHighlightColor : Color
用于高亮显示地形填充图块的颜色。如果未定义,则填充平铺不会
完全突出显示。alpha 值用于与图块的
实际颜色。由于 terrain fill 平铺不表示实际的 terrain 表面,因此
在某些应用程序中,直观地表明它们不值得信任可能很有用。
-
Default Value:
undefined
imageryLayers : ImageryLayerCollection
获取将在此地球上渲染的图像图层的集合。
readonly imageryLayersUpdatedEvent : Event
获取在添加、显示、隐藏、移动或移除影像图层时引发的事件。
用于调整地形朗伯光照的乘数。
此数字乘以 GlobeFS.glsl 中
czm_getLambertDiffuse
的结果。
仅当 enableLighting
为 true
时,此选项才会生效。
-
Default Value:
0.9
恢复照明的距离。这只会生效
当
enableLighting
或 showGroundAtmosphere
为 true
时。
-
Default Value:
pi * ellipsoid.minimumRadius
所有东西都亮起的距离。这只会生效
当
enableLighting
或 showGroundAtmosphere
为 true
时。
-
Default Value:
1/2 * pi * ellipsoid.minimumRadius
获取或设置被视为“太多”的加载后代瓦片的数量。
如果瓦片具有太多加载后代,则该瓦片将在任何
加载并渲染其后代。 这意味着用户会有更多的反馈
的发生是以更长的总体加载时间为代价的。 将此设置为 0 将导致每个
连续加载瓦片级别,显著增加加载时间。 将其设置为较大的
数字(例如 1000)将最大限度地减少加载但往往会使
经过漫长的等待后,细节一下子全部出现。
-
Default Value:
20
material : Material|undefined
获取或设置material appearance of the Globe. This can be one of several built-in
Material
objects or a custom material, scripted with
Fabric.
用于驱动细节层次优化的最大屏幕空间误差。 高等
值将提供更好的性能,但会降低视觉质量。
-
Default Value:
2
夜晚的黑暗与地面大气层淡入未点亮的地面大气的距离。
仅当
showGroundAtmosphere
、enableLighting
和
dynamicAtmosphereLighting
为 true
。
-
Default Value:
5/2 * pi * ellipsoid.minimumRadius
夜晚的黑暗从地面大气中淡出到被照亮的地面大气的距离。
仅当
showGroundAtmosphere
、enableLighting
和
dynamicAtmosphereLighting
为 true
。
-
Default Value:
1/2 * pi * ellipsoid.minimumRadius
用于渲染海洋中波浪的法线贴图。 设置此属性将
仅在配置的 terrain 提供程序包含水遮罩时有效。
-
Default Value:
buildModuleUrl('Assets/Textures/waterNormalsSmall.jpg')
获取或设置一个值,该值指示是否应预加载呈现的图块的上级。
将此项设置为 true 可优化缩小体验,并在
平移时新曝光的区域。缺点是它需要加载更多的图块。
-
Default Value:
true
获取或设置一个值,该值指示是否应预加载呈现的磁贴的同级。
将此项设置为 true 会导致加载与渲染瓦片具有相同父级的瓦片,甚至
如果他们被淘汰。将此设置为 true 可能会在
加载更多图块的成本。
-
Default Value:
false
shadows : ShadowMode
确定地球是投射还是接收来自光源的阴影。设置地球仪
投射阴影可能会影响性能,因为地形会再次从光源的角度渲染。
当前,只有视野中的地形会投射阴影。默认情况下,地球不会投射阴影。
-
Default Value:
ShadowMode.RECEIVE_ONLY
确定是否显示地球仪。
-
Default Value:
true
启用地面大气,当从
lightingFadeInDistance
和 lightingFadeOutDistance
之间的距离查看时,将绘制地球上。
-
Default Value:
true 使用 WGS84 椭球体时,否则为 false
是否显示地形裙边。地形裙边是从图块边缘向下延伸的几何体,用于隐藏相邻图块之间的接缝。
当摄像机位于地下或启用半透明时,裙边始终处于隐藏状态。
-
Default Value:
true
如果动画波形效果应显示在地球的某些区域,则为 True。
被水覆盖;否则为 false。 如果
terrainProvider
不提供水遮罩。
-
Default Value:
true
terrainProvider : TerrainProvider
为此地球提供表面几何图形的 terrain 提供程序。
readonly terrainProviderChanged : Event
获取在更改地形提供程序时引发的事件
地形瓦片缓存的大小,以瓦片数表示。 任何其他
超出此数字的瓦片将被释放,只要它们不是渲染所必需的
这个框架。 数字越大,消耗的内存越多,但显示细节的速度越快
例如,缩小然后重新缩小时。
-
Default Value:
100
tileLoadProgressEvent : Event
获取一个事件,该事件在图块加载队列的长度自上一个渲染帧以来发生变化时引发。 当加载队列为空时,
当前视图的所有地形和影像均已加载。 该事件传递磁贴加载队列的新长度。
当瓦片加载队列为空时返回
true
,否则返回 false
。 当加载队列为空时,
当前视图的所有地形和影像均已加载。
translucency : GlobeTranslucency
用于控制地球半透明的属性。
undergroundColor : Color
当摄像机位于地下或地球仪为半透明时,用于渲染地球仪背面的颜色,
根据照相机的距离与地球颜色混合。
要禁用 underground 着色,请将
要禁用 underground 着色,请将
undergroundColor
设置为 undefined
。
-
Default Value:
Color.BLACK
See:
undergroundColorAlphaByDistance : NearFarScalar
获取或设置near and far distance for blending
When the camera is above the ellipsoid the distance is computed from the nearest point on the ellipsoid instead of the camera's position.
Globe#undergroundColor
with the globe color.
The alpha 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 alpha remains clamped to the nearest bound. If undefined,
the underground color will not be blended with the globe color.
When the camera is above the ellipsoid the distance is computed from the nearest point on the ellipsoid instead of the camera's position.
确定顶点阴影的暗度。
仅当
enableLighting
为 true
时,此选项才会生效。
-
Default Value:
0.3
Methods
销毁此对象持有的 WebGL 资源。 销毁对象允许确定性
释放 WebGL 资源,而不是依赖垃圾回收器来销毁这个对象。
一旦对象被销毁,就不应该使用它;调用
一旦对象被销毁,就不应该使用它;调用
isDestroyed
将导致 DeveloperError
异常。 因此
将返回值 (undefined
) 分配给对象,如示例中所示。
Throws:
-
DeveloperError : 这个物体被摧毁了,destroy()。
Example:
globe = globe & globe.destroy();
See:
获取给定制图处的表面高度。
Name | Type | Description |
---|---|---|
cartographic |
Cartographic | 要为其查找高度的制图。 |
Returns:
制图的高度,如果找不到,则为 undefined。
Returns:
如果此对象被销毁,则为 True;否则为 false。
See:
pick(ray, scene, result) → Cartesian3|undefined
查找光线与渲染的地球表面之间的交集。射线必须以世界坐标给出。
Name | Type | Description |
---|---|---|
ray |
Ray | 用于测试交集的射线。 |
scene |
Scene | 场景。 |
result |
Cartesian3 | optional 要在其上存储结果的对象。 |
Returns:
交集或
undefined
(如果未找到)。
Example:
// 求穿过像素的光线与地球的交点
const ray = viewer.camera.getPickRay(windowCoordinates);
const 交集 = globe.pick(ray, scene);