Texture

CubeTexture

Creates a cube texture made up of six images.

Code Example

const loader = new v3d.CubeTextureLoader(); loader.setPath('textures/cube/pisa/'); const textureCube = loader.load([ 'px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png' ]); const material = new v3d.MeshBasicMaterial({ color: 0xffffff, envMap: textureCube });

Constructor

CubeTexture(images : Array, mapping : Constant, wrapS : Constant, wrapT : Constant, magFilter : Constant, minFilter : Constant, format : Constant, type : Constant, anisotropy : Integer, encoding : Constant)

CubeTexture is almost equivalent in functionality and usage to Texture. The only differences are that the images are an array of 6 images as opposed to a single image, and the mapping options are v3d.CubeReflectionMapping (default) or v3d.CubeRefractionMapping

Properties

See the base Texture class for common properties.

.flipY : Boolean

If set to true, the texture is flipped along the vertical axis when uploaded to the GPU. Default is false.

.isCubeTexture : Boolean

Read-only flag to check if a given object is of type CubeTexture.

Methods

See the base Texture class for common methods.

Source

For more info on how to obtain the source code of this module see this page.