new SkyBox(options)
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. The size of
the sky box must not exceed 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:
Source:
Scene/SkyBox.js, line 75
Members
-
show :Boolean
-
Determines if the sky box will be shown.
-
Default Value:
trueSource: Scene/SkyBox.js, line 94 -
sources :Object
-
The sources used to create the cube map faces: an object with
positiveX,negativeX,positiveY,negativeY,positiveZ, andnegativeZproperties. These can be either URLs orImageobjects.-
Default Value:
undefinedSource: Scene/SkyBox.js, line 85
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 thanisDestroyedwill result in aDeveloperErrorexception. 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 241 -
-
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 thanisDestroyedwill result in aDeveloperErrorexception.Returns:
trueif this object was destroyed; otherwise,false.See:
Source: Scene/SkyBox.js, line 220 -
update()
-
Called when
ViewerorCesiumWidgetrender the scene to get the draw commands needed to render this primitive.Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered:
Throws:
-
DeveloperError : this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.
-
DeveloperError : this.sources properties must all be the same type.
Source: Scene/SkyBox.js, line 114 -
