CubeMap

CubeMap

new

A cube map with faces +x, -x, +y, -y, +z, and -z. Cube maps are used for environment techniques like approximate reflection and refraction as used in the Reflection and Refraction Materials.

See:
Source:

Members

:Boolean

True if the source pixels are flipped vertically when cube-map faces are created or updated, i.e., UNPACK_FLIP_Y_WEBGL is used.

:Number

The height, in texels, of faces in this cube map. All faces in the same cube map have the same width and height, and the width equals the height.

:CubeMapFace

The negative x face of this cube map for modification, rendering to, etc.

:CubeMapFace

The negative y face of this cube map for modification, rendering to, etc.

:CubeMapFace

The negative z face of this cube map for modification, rendering to, etc.

:PixelDatatype

The pixel datatype of this cube map. All faces in the same cube map have the same pixel datatype.

:PixelFormat

The pixel format of this cube map. All faces in the same cube map have the same pixel format.

:CubeMapFace

The positive x face of this cube map for modification, rendering to, etc.

:CubeMapFace

The positive y face of this cube map for modification, rendering to, etc.

:CubeMapFace

The positive z face of this cube map for modification, rendering to, etc.

:Boolean

True if the cubemap was created with premultiplied alpha (UNPACK_PREMULTIPLY_ALPHA_WEBGL).

:Object

DOC_TBA

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 cube map was destroyed, i.e., destroy() was called.
Returns:
Example
cubeMap = cubeMap && cubeMap.destroy();
See:

Generates a complete mipmap chain for each cubemap face.

Parameters:
Name Type Argument Default Description
hint MipmapHint <optional>
MipmapHint.DONT_CARE A performance vs. quality hint.
Throws:
  • DeveloperError : hint is invalid.
  • DeveloperError : This CubeMap's width must be a power of two to call generateMipmap().
  • DeveloperError : This CubeMap's height must be a power of two to call generateMipmap().
  • DeveloperError : This CubeMap was destroyed, i.e., destroy() was called.
Example
// Generate mipmaps, and then set the sampler so mipmaps are used for
// minification when the cube map is sampled.
cubeMap.generateMipmap();
cubeMap.sampler = context.createSampler({
  minificationFilter : Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR
});

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: