围绕场景的用于绘制星星的天空盒。天空盒使用真赤道平均春分点(TEME)轴定义。
仅支持 3D。当过渡到 2D 或 Columbus 视图时,天空盒会逐渐消失。
天空盒的大小不能超过 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
获取或设置图元对象。
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,并且必须具有 positiveX、negativeX、positiveY、negativeY、positiveZ 和 negativeZ 属性。
-
DeveloperError : this.sources 属性必须都是相同类型。
