@loaders.gl/textures module contains loaders for compressed textures. More specifically it contains loaders and writers for compressed texture container formats, including KTX, DDS and PVR. It also supports supercompressed Basis textures.
Note that a texture is more complex than an image. A texture typically has many subimages. A texture can represent a single logical image but can also be a texture cube, a texture array etc representing many logical images. In addition, each "image" typically has many mipmap levels.
In addition, in compressed textures each mipmap image is compressed opaquely into a format that can only be understood by certain GPUs.
Basis encoded textures are super compressed. A more recent addition, they can be efficiently transcoded on the client into actual compressed texture formats appropriate for each device and are therefore quite convenient to use.
npm install @loaders.gl/textures npm install @loaders.gl/core
A set of functions that can extract information from "unparsed" binary memory representation of certain compressed texture image formats. These functions are intended to be called on raw
ArrayBuffer data, before the
BasisLoader parses it and converts it to a parsed image type.
BasisLoader returns Array of Array of ArrayBuffer
BasisLoader for more details on options etc.