场景周围的天空框用于绘制星星。 天空盒使用真赤道平均分 (TEME) 轴定义。
这仅在 3D 中受支持。 天空盒在变形为 2D 或哥伦布视图时淡出。 的大小
天空盒不得超过 Scene#maximumCubeMapSize
。
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
对象,具有以下属性:
|
Example:
scene.skyBox = new Cesium.SkyBox({
sources : {
positiveX : 'skybox_px.png',
negativeX : 'skybox_nx.png',
positiveY : 'skybox_py.png',
negativeY : 'skybox_ny.png',
positiveZ : 'skybox_pz.png',
negativeZ : 'skybox_nz.png'
}
});
See:
Members
确定是否显示天空框。
-
Default Value:
true
用于创建立方体贴图面的源:对象
与
positiveX
、negativeX
、positiveY
、
negativeY
、positiveZ
和 negativeZ
属性。
这些可以是 URL 或 Image
对象。
-
Default Value:
undefined
Methods
static Cesium.SkyBox.createEarthSkyBox() → SkyBox
使用地球的默认星图创建天空盒实例。
Returns:
地球的默认天空盒
Example:
viewer.scene.skyBox = Cesium.SkyBox.createEarthSkyBox();
销毁此对象持有的 WebGL 资源。 销毁对象允许确定性
释放 WebGL 资源,而不是依赖垃圾回收器来销毁这个对象。
一旦对象被销毁,就不应该使用它;调用
一旦对象被销毁,就不应该使用它;调用
isDestroyed
将导致 DeveloperError
异常。 因此
将返回值 (undefined
) 分配给对象,如示例中所示。
Throws:
-
DeveloperError : 这个物体被摧毁了,destroy().
Example:
skyBox = skyBox && skyBox.destroy();
See:
Returns:
true
,如果此对象被销毁;否则为 false
。
See:
Throws:
-
DeveloperError : this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.
-
DeveloperError : this.sources properties must all be the same type.