File: CubeTexture.md | Updated: 11/15/2025
Creates a cube texture made up of six images.
const loader = new THREE.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 THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } );
Constructs a new cube texture.
images | An array holding a image for each side of a cube. Default is [].
---|---
mapping | The texture mapping. Default is CubeReflectionMapping.
wrapS | The wrapS value. Default is ClampToEdgeWrapping.
wrapT | The wrapT value. Default is ClampToEdgeWrapping.
magFilter | The mag filter value. Default is LinearFilter.
minFilter | The min filter value. Default is LinearMipmapLinearFilter.
format | The texture format. Default is RGBAFormat.
type | The texture type. Default is UnsignedByteType.
anisotropy | The anisotropy value. Default is Texture.DEFAULT_ANISOTROPY.
colorSpace | The color space value. Default is NoColorSpace.
If set to true, the texture is flipped along the vertical axis when uploaded to the GPU.
Overwritten and set to false by default.
Default is false.
Overrides: Texture#flipY
Alias for CubeTexture#image.
This flag can be used for type testing.
Default is true.