the buffer/URL holding the compressed texture data
Pre-creates buffer views for each mipmap level
Returns the key (to ContextSystem#extensions) for the WebGL extension supporting the compression format
The height of the resource.
Has been validated
The width of the resource.
Bind to a parent BaseTexture
Parent texture
Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.
Destroy and don't use after this
Loads the blob
Trigger a resize event
X dimension
Y dimension
Set the style, optional to override
true
is success
Unbind to a parent BaseTexture
Parent texture
Has been updated trigger event
Used to auto-detect the type of resource.
The source object
true
if
Generated using TypeDoc
Resource for compressed texture formats, as follows: S3TC/DXTn (& their sRGB formats), ATC, ASTC, ETC 1/2, PVRTC.
Compressed textures improve performance when rendering is texture-bound. The texture data stays compressed in graphics memory, increasing memory locality and speeding up texture fetches. These formats can also be used to store more detail in the same amount of memory.
For most developers, container file formats are a better abstraction instead of directly handling raw texture data. PixiJS provides native support for the following texture file formats (via PIXI.Loader):
@pixi/basis-loader
,@pixi/basis-transcoder
packages separately to use these files. See {@link PIXI.BasisLoader}.The loaders for the aforementioned formats use
CompressedTextureResource
internally. It is strongly suggested that they be used instead.Working directly with CompressedTextureResource
Since
CompressedTextureResource
inheritsBlobResource
, you can provide it a URL pointing to a file containing the raw texture data (with no file headers!):PIXI