CubeTexture Class

Extends Texture
Module: Textures

CubeTextures represent 360 view using six images, these images correspond to the faces of a cube.

CubeTextures can be used to simulate reflections and transparency refraction in materials.

Is also possible to create dynamic cubetextures using the CubeCamera object.

Constructor

CubeTexture

(
  • images
  • mapping
  • wrapS
  • wrapT
  • magFilter
  • minFilter
  • format
  • type
  • anisotropy
  • encoding
)

Parameters:

  • images Array

    Image array with 6 images

  • mapping Number
  • wrapS Number
  • wrapT Number
  • magFilter Number
  • minFilter Number
  • format Number
  • type Number
  • anisotropy Number
  • encoding Number

Item Index

Properties

Methods

toJSON

(
  • meta
)
Object

Serialize cube texture to JSON All six images of the cube texture are stored individually

Parameters:

  • meta Object

Returns:

Object:

json

updateImages

()

Updates the CubeTexture images, should be called after changing the images attached to the texture

Properties

size

Number

Size of each on of the texture that composte the CubeTexture

Default: 512

Attributes

BACK

Number

Cubemap back image index

BOTTOM

Number

Cubemap bottom image index

CUBE

Number

CubeMap mode, 6 images used as source for the texture.

EQUIRECTANGULAR

Number

Equirectangular projection mode, 1 single image used as source.

FRONT

Number

Cubemap front image index

LEFT

Number

Cubemap left image index

RIGHT

Number

Cubemap right image index

TOP

Number

Cubemap top image index