Class: CompressedTextureLoader

PIXI.CompressedTextureLoader

Loader plugin for handling compressed textures for all platforms.

Implements

  • PIXI.ILoaderPlugin

Methods

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

Called after a compressed-textures manifest is loaded.

This will then load the correct compression format for the device. Your manifest should adhere to the following schema:

import { INTERNAL_FORMATS } from '@pixi/constants';

// The following should be present in a *.compressed-texture.json file!
const manifest = JSON.stringify({
  COMPRESSED_RGBA_S3TC_DXT5_EXT: "asset.s3tc.ktx",
  COMPRESSED_RGBA8_ETC2_EAC: "asset.etc.ktx",
  RGBA_PVRTC_4BPPV1_IMG: "asset.pvrtc.ktx",
  textureID: "asset.png",
  fallback: "asset.png"
});
Name Type Description
resource ILoaderResource
next (...args: any[]) => void