H3DU.CubeMap
H3DU.CubeMap(textures)
A cube map, or a set of six textures forming the sides of a cube.
Parameters
textures
(Type: Array.<(String|Texture|TextureInfo)>)
An array of six elements, each of which is a URL of the texture data or the texture object itself. However, this constructor will not load those images yet. The six texture are, in order, the texture seen when looking toward the positive X axis, the negative X axis, positive Y, negative Y, positive Z, and negative Z.
Methods
- getHeight
Gets this texture's known height. - getTexture
Gets a texture used by this cube map. - getWidth
Gets this texture's known width. - setTexture
Sets a texture used by this cube map.
H3DU.CubeMap#getHeight()
Gets this texture's known height.
Return Value
This texture's height in pixels. Will be 0 if the texture's image data wasn't loaded yet. (Type: number)
H3DU.CubeMap#getTexture(index)
Gets a texture used by this cube map.
Parameters
index
(Type: number)
Texture index to get.
Return Value
The texture with the given index, or null if the index is out of range. (Type: H3DU.Texture)
H3DU.CubeMap#getWidth()
Gets this texture's known width.
Return Value
This texture's width in pixels. Will be 0 if the texture's image data wasn't loaded yet. (Type: number)
H3DU.CubeMap#setTexture(index, texture)
Sets a texture used by this cube map.
Parameters
index
(Type: number)
Texture index to set, from 0 through 5.texture
(Type: H3DU.Texture | H3DU.TextureInfo | String)
An H3DU.Texture object, a texture information object, or a string with the URL of the texture data.
Return Value
This object. (Type: H3DU.CubeMap)