天空盒,在场景周围画星星。天空盒使用真正的赤道平均春分点(TEME)轴定义。
只支持3D模式,大小不能超过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
天空盒的6个面的图像。
-
Default Value:
undefined
Methods
销毁此对象持有的WebGL资源。
一旦对象被销毁,它将不能在使用; 调用除
一旦对象被销毁,它将不能在使用; 调用除
isDestroyed
之外的任何函数都会导致DeveloperError
异常。
因此,将返回值(undefined
)赋给对象,如示例所示。
Throws:
-
DeveloperError : 对象已经被销毁。
Example:
skyBox = skyBox && skyBox.destroy();
See:
Returns:
false
See:
Throws:
-
DeveloperError : this.sources 是需要的并且必须有 positiveX,negativeX,positiveY,negativeY,positiveZ,和 negativeZ 属性。
-
DeveloperError : this.sources 属性必须是相同的类型。