Class: Cubemap

Cubemap()

new Cubemap()

Cubemap for environment mapping.
Properties:
Name Type Description
gl WebGLRenderingContext The WebGL context.
texture WebGLTexture Handle to the texture.
type GLenum Type of data stored in the texture.
format GLenum Layout of texture data.
internalFormat GLenum Internal arrangement of the texture data.
currentUnit Number The current texture unit this cubemap is bound to.
flipY boolean Whether the y-axis is flipped for this cubemap.
premultiplyAlpha boolean Whether alpha should be pre-multiplied when loading this cubemap.
appState Object Tracked GL state.
Source:

Methods

delete() → {Cubemap}

Delete this cubemap.
Source:
Returns:
The Cubemap object.
Type
Cubemap

restore(optionsopt) → {Cubemap}

Restore cubemap after context loss.
Parameters:
Name Type Attributes Description
options Object <optional>
Texture options.
Properties
Name Type Attributes Description
negX HTMLElement | ArrayBufferView <optional>
The image data for the negative X direction. Can be any format that would be accepted by texImage2D.
posX HTMLElement | ArrayBufferView <optional>
The image data for the positive X direction. Can be any format that would be accepted by texImage2D.
negY HTMLElement | ArrayBufferView <optional>
The image data for the negative Y direction. Can be any format that would be accepted by texImage2D.
posY HTMLElement | ArrayBufferView <optional>
The image data for the positive Y direction. Can be any format that would be accepted by texImage2D.
negZ HTMLElement | ArrayBufferView <optional>
The image data for the negative Z direction. Can be any format that would be accepted by texImage2D.
posZ HTMLElement | ArrayBufferView <optional>
The image data for the positive Z direction. Can be any format that would be accepted by texImage2D.
Source:
Returns:
The Cubemap object.
Type
Cubemap