Class: KTXLoader


Loader plugin for handling KTX texture container files.

This KTX loader does not currently support the following features:

  • cube textures
  • 3D textures
  • vendor-specific key/value data parsing
  • endianness conversion for big-endian machines
  • embedded *.basis files

It does supports the following features:

  • multiple textures per file
  • mipmapping


  • PIXI.ILoaderPlugin


PIXI.KTXLoader.parse (url, arrayBuffer) void static

Parses the KTX file header, generates base-textures, and puts them into the texture cache.

Name Type Description
url string
arrayBuffer ArrayBuffer

PIXI.KTXLoader.use (resource, next) void static

Called after a KTX file is loaded.

This will parse the KTX file header and add a {@code BaseTexture} to the texture cache.

Name Type Description
resource PIXI.LoaderResource
next Function
  • PIXI.Loader.loaderMiddleware

PIXI.KTXLoader.validate (url, dataView) boolean static

Checks whether the arrayBuffer contains a valid *.ktx file.

Name Type Description
url string
dataView DataView
Type Description