Class: TextureCube

TextureCube

TextureCube represents a cube map texture. The order of the textures in a cross map is as such:


new TextureCube()

Properties:
Name Type Description
name

The name of the texture.

size

The cube texture's size

Author:
  • derschmale <http://www.derschmale.com>

Methods


initEmpty(size, format, dataType)

Inits an empty texture.

Parameters:
Name Type Description
size

The size of the texture.

format TextureFormat

The texture's format.

dataType DataType

The texture's data format.


uploadCompressedData(data, size, generateMips, internalFormat, mipLevel)

Uploads compressed data.

Parameters:
Name Type Description
data *

An typed array containing the initial data.

size number

The size of the texture.

generateMips boolean

Whether or not a mip chain should be generated.

internalFormat *

The texture's internal compression format.

mipLevel number

The target mip map level. Defaults to 0. If provided, generateMips should be false.


uploadData(data, size, generateMips, format, dataType, mipLevel)

Initializes the texture with the given data.

Parameters:
Name Type Description
data

A array of typed arrays (per CubeFace) containing the initial data.

size

The size of the texture.

generateMips

Whether or not a mip chain should be generated.

format TextureFormat

The texture's format.

dataType DataType

The texture's data format.

mipLevel number

The target mip map level. Defaults to 0. If provided, generateMips should be false.


uploadImages(data, generateMips, format, dataType, mipLevel)

Initializes the texture with the given Images.

Parameters:
Name Type Description
data

A array of typed arrays (per CubeFace) containing the initial data.

generateMips

Whether or not a mip chain should be generated.

format TextureFormat

The texture's format.

dataType DataType

The texture's data format.

mipLevel number

The target mip map level. Defaults to 0. If provided, generateMips should be false.