A skybox around the scene.
Only used in a 3D scene to change to a 2D scene, the skybox will fade out, and the size of the skybox must not exceed Scene#maximumCubeMapSize
.
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
an object with the following properties:
|
Example:
scene.skyBox = new SuperMap3D.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
-
Get or set the horizontal rotation angle of the skybox itself, with the unit of radians.
-
Default Value:
0
-
Implement a skybox effect using a single JPG or HDR image.
-
Whether to show the skybox.
-
Default Value:
true
-
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
-
Get or set the animation speed of the skybox moving around the x-axis. When set to 1, it means 0.01 radian per second, the same below.
-
Default Value:
0.0
-
Get or set the animation speed of the skybox moving around the y-axis.
-
Default Value:
0.0
-
Get or set the animation speed of the skybox moving around the z-axis.
-
Default Value:
0.0
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 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:
-
-
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:
-
Called when
Viewer
orWidget
render 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.
-