new CubeMapFace
A face of a cube map (+x, -x, +y, -y, +z, or -z) that can be modified and rendered to.
See:
Source:
Methods
- 
    
copyFrom
 - 
    
    
    
Copies texels from the source to the cubemap's face.
Parameters:
Name Type Argument Default Description sourceObject The source ImageData, HTMLImageElement, HTMLCanvasElement, HTMLVideoElement, or an object with a width, height, and typed array as shown in the example. xOffsetNumber <optional> 
0 An offset in the x direction in the cubemap where copying begins. yOffsetNumber <optional> 
0 An offset in the y direction in the cubemap where copying begins. Throws:
- 
DeveloperError : source is required.
 - 
DeveloperError : xOffset must be greater than or equal to zero.
 - 
DeveloperError : yOffset must be greater than or equal to zero.
 - 
DeveloperError : xOffset + source.width must be less than or equal to getWidth().
 - 
DeveloperError : yOffset + source.height must be less than or equal to getHeight().
 - 
DeveloperError : This CubeMap was destroyed, i.e., destroy() was called.
 
Example
// Create a cubemap with 1x1 faces, and make the +x face red. var cubeMap = context.createCubeMap({ width : 1, height : 1 }); cubeMap.getPositiveX().copyFrom({ width : 1, height : 1, arrayBufferView : new Uint8Array([255, 0, 0, 255]) }); - 
 - 
    
copyFromFramebuffer
 - 
    
    
    
Copies texels from the framebuffer to the cubemap's face.
Parameters:
Name Type Argument Default Description xOffsetNumber <optional> 
0 An offset in the x direction in the cubemap where copying begins. yOffsetNumber <optional> 
0 An offset in the y direction in the cubemap where copying begins. framebufferXOffsetNumber <optional> 
0 An offset in the x direction in the framebuffer where copying begins from. framebufferYOffsetNumber <optional> 
0 An offset in the y direction in the framebuffer where copying begins from. widthNumber <optional> 
CubeMap's width The width of the subimage to copy. heightNumber <optional> 
CubeMap's height The height of the subimage to copy. Throws:
- 
DeveloperError : Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
 - 
DeveloperError : This CubeMap was destroyed, i.e., destroy() was called.
 - 
DeveloperError : xOffset must be greater than or equal to zero.
 - 
DeveloperError : yOffset must be greater than or equal to zero.
 - 
DeveloperError : framebufferXOffset must be greater than or equal to zero.
 - 
DeveloperError : framebufferYOffset must be greater than or equal to zero.
 - 
DeveloperError : xOffset + source.width must be less than or equal to getWidth().
 - 
DeveloperError : yOffset + source.height must be less than or equal to getHeight().
 - 
DeveloperError : This CubeMap was destroyed, i.e., destroy() was called.
 
Example
// Copy the framebuffer contents to the +x cube map face. cubeMap.getPositiveX().copyFromFramebuffer();
 - 
 - 
    
getPixelDatatype
 - 
    
    
    
Returns the pixel data type of this cube map face. All faces in the same cube map have the same pixel data type.
Throws:
DeveloperError : This CubeMap was destroyed, i.e., destroy() was called.Returns:
PixelFormat The pixel data type of this cubemap face. - 
    
getPixelFormat
 - 
    
    
    
Returns the pixel format of this cube map face. All faces in the same cube map have the same pixel format.
Throws:
DeveloperError : This CubeMap was destroyed, i.e., destroy() was called.Returns:
PixelFormat The pixel format of this cubemap face. 
