Skip to content

KBE3D / KBCore / Cesium / SkyBox

类: SkyBox

A sky box around the scene to draw stars. The sky box is defined using the True Equator Mean Equinox (TEME) axes. <p> This is only supported in 3D. The sky box is faded out when morphing to 2D or Columbus view. The size of the sky box must not exceed Scene#maximumCubeMapSize. </p>

示例

ts
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'
  }
});

参数

Object with the following properties:

参数

The source URL or <code>Image</code> object for each of the six cube map faces. See the example below.

参数

Determines if this primitive will be shown.

属性

show

show: boolean

Determines if the sky box will be shown.


sources

sources: any

Gets or sets the the primitive object.

方法

createEarthSkyBox()

static createEarthSkyBox(): SkyBox

Creates a skybox instance with the default starmap for the Earth.

返回

SkyBox

The default skybox for the Earth

示例

ts
viewer.scene.skyBox = Cesium.SkyBox.createEarthSkyBox();

update()

update(): void

Called when Viewer or CesiumWidget render the scene to get the draw commands needed to render this primitive. <p> Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered: </p>

返回

void


isDestroyed()

isDestroyed(): boolean

Returns true if this object was destroyed; otherwise, false. <br /><br /> If this object was destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception.

返回

boolean

true if this object was destroyed; otherwise, false.


destroy()

destroy(): void

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object. <br /><br /> Once an object is destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. Therefore, assign the return value (<code>undefined</code>) to the object as done in the example.

返回

void

示例

ts
skyBox = skyBox && skyBox.destroy();

构造函数

构造函数

new SkyBox(options: { sources?: any; show?: boolean; }): SkyBox

参数

options
sources?

any

show?

boolean

返回

SkyBox

KBE3D @3.0.0 Copyright © 2024-present KBE3D