Loader → CompressedTextureLoader →

# KTXLoader

A loader for the KTX texture compression format.

References:

- The KTX File Format and Tools
- Babylon.JS khronosTextureContainer.ts

## Code Example

    const loader = new KTXLoader();
    const map = loader.load( 'textures/compressed/lensflare_ASTC8x8.ktx' )
    map.colorSpace = THREE.SRGBColorSpace; // only for color textures

## Import

KTXLoader is an addon, and must be imported explicitly, see Installation#Addons.

    import { KTXLoader } from 'three/addons/loaders/KTXLoader.js';

## Constructor

### new KTXLoader ( manager : LoadingManager )

Constructs a new KTX loader.

manager | The loading manager.

## Methods

### .parse ( buffer : ArrayBuffer, loadMipmaps : boolean ) : CompressedTextureLoader~TexData

Parses the given KTX texture data.

buffer | The raw texture data.
loadMipmaps | Whether to load mipmaps or not.

Overrides: CompressedTextureLoader#parse

Returns: An object representing the parsed texture data.

## Source

examples/jsm/loaders/KTXLoader.js