Capítulo 218 de 859

Chapter 218: CompressedTexture

Core Idea

Creates a texture based on data in compressed form.

These texture are usually loaded with CompressedTextureLoader.

Key Concepts

  • flipY : boolean (readonly): If set to true, the texture is flipped along the vertical axis when uploaded to the GPU.
  • generateMipmaps : boolean (readonly): Whether to generate mipmaps (if possible) for a texture.
  • image : Object: The image property of a compressed texture just defines its dimensions.
  • isCompressedTexture : boolean (readonly): This flag can be used for type testing.
  • mipmaps : Array.<Object>: This array holds for all mipmaps (including the bases mip) the data and dimensions.

Reference Tables

Constructor

Signature
new CompressedTexture( mipmaps : Array.<Object>, width : number, height : number, format : number, type : number, mapping : number, wrapS : number, wrapT : number, magFilter : number, minFilter : number, anisotropy : number, colorSpace : string )

Properties

PropertyDescription
.flipY : boolean (readonly)If set to true, the texture is flipped along the vertical axis when uploaded to the GPU.
.generateMipmaps : boolean (readonly)Whether to generate mipmaps (if possible) for a texture.
.image : ObjectThe image property of a compressed texture just defines its dimensions.
.isCompressedTexture : boolean (readonly)This flag can be used for type testing.
.mipmaps : Array.<Object>This array holds for all mipmaps (including the bases mip) the data and dimensions.

Key Takeaways

  1. CompressedTexture extends: EventDispatcher → Texture
  2. Most relevant properties: flipY, generateMipmaps, image, isCompressedTexture.

Connects To