围绕场景绘制星空的天空盒。天空盒使用真赤道平均春分点(TEME)轴定义。
仅支持 3D 模式。当切换到 2D 或 Columbus 视图时,天空盒会淡出。天空盒的大小不得超过 Scene#maximumCubeMapSize。
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Object with the following properties:
|
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 的所有属性必须类型相同。
