SkyBox

SkyBox

new

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.

Parameters:
Name Type Description
sources Object The source URL or Image object for each of the six cube map faces. See the example below.
Throws:
  • DeveloperError : sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.
  • DeveloperError : sources properties must all be the same type.
Example
scene.skyBox = new SkyBox({
    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:

Members

:Boolean

Determines if the sky box will be shown.

The default is true.

Methods

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 than isDestroyed will result in a DeveloperError exception. Therefore, assign the return value (undefined) to the object as done in the example.

Throws:
DeveloperError : This object was destroyed, i.e., destroy() was called.
Returns:
Example
skyBox = skyBox && skyBox.destroy();
See:

Returns the sources used to create the cube map faces: an object with positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties. These are either URLs or Image objects, depending on how the sky box was constructed.

Returns:
Object The sources used to create the cube map faces.

Returns true if this object was destroyed; otherwise, false.

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.

Returns:
Boolean true if this object was destroyed; otherwise, false.
See: