Capítulo 216 de 859

Chapter 216: CompressedArrayTexture

Core Idea

Creates a texture 2D array based on data in compressed form.

These texture are usually loaded with CompressedTextureLoader.

Key Concepts

  • image : Object: The image property of a compressed texture just defines its dimensions.
  • isCompressedArrayTexture : boolean (readonly): This flag can be used for type testing.
  • layerUpdates : Set.<number>: A set of all layers which need to be updated in the texture.
  • wrapR : RepeatWrapping | ClampToEdgeWrapping | MirroredRepeatWrapping: This defines how the texture is wrapped in the depth and corresponds to W in UVW mapping.

Reference Tables

Constructor

Signature
new CompressedArrayTexture( mipmaps : Array.<Object>, width : number, height : number, depth : number, format : number, type : number )

Properties

PropertyDescription
.image : ObjectThe image property of a compressed texture just defines its dimensions.
.isCompressedArrayTexture : boolean (readonly)This flag can be used for type testing.
.layerUpdates : Set.<number>A set of all layers which need to be updated in the texture.
`.wrapR : RepeatWrappingClampToEdgeWrapping

Methods

MethodDescription
.addLayerUpdate( layerIndex : number )Describes that a specific layer of the texture needs to be updated. Normally when Texture#needsUpdate is set to true, the entire compressed texture array is sent to the …
.clearLayerUpdates()Resets the layer updates registry.

Key Takeaways

  1. CompressedArrayTexture extends: EventDispatcher → Texture → CompressedTexture
  2. Most relevant properties: image, isCompressedArrayTexture, layerUpdates, wrapR.
  3. Key methods: addLayerUpdate, clearLayerUpdates.

Connects To