new SkyBox()
A sky box around the scene to draw stars. The sky box is defined using the True Equator Mean Equinox (TEME) axes.
This is only supported in 3D. The sky box is faded out when morphing to 2D or Columbus view.
Name | Type | Default | Description |
---|---|---|---|
options.sources |
Object |
optional
The source URL or Image object for each of the six cube map faces. See the example below. |
|
options.show |
Boolean |
true
|
optional Determines if this primitive will be shown. |
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:
Source:
Scene/SkyBox.js, line 65
Members
-
show :Boolean
-
Determines if the sky box will be shown.
-
Default Value:
true
Source: Scene/SkyBox.js, line 84 -
sources :Object
-
The sources used to create the cube map faces: an object with
positiveX
,negativeX
,positiveY
,negativeY
,positiveZ
, andnegativeZ
properties. These can be either URLs orImage
objects.-
Default Value:
undefined
Source: Scene/SkyBox.js, line 75
Methods
-
destroy() → undefined
-
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.
Once an object is destroyed, it should not be used; calling any function other thanisDestroyed
will result in aDeveloperError
exception. Therefore, assign the return value (undefined
) to the object as done in the example.Returns:
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
Example:
skyBox = skyBox && skyBox.destroy();
See:
Source: Scene/SkyBox.js, line 221 -
-
isDestroyed() → Boolean
-
Returns true if this object was destroyed; otherwise, false.
If this object was destroyed, it should not be used; calling any function other thanisDestroyed
will result in aDeveloperError
exception.Returns:
true
if this object was destroyed; otherwise,false
.See:
Source: Scene/SkyBox.js, line 198