Phaser API Documentation

  Version: 
addCompressedTexture(key, textureData, [atlasData])

Description:

Adds a Compressed Texture to this Texture Manager.

The texture should typically have been loaded via the CompressedTextureFile loader, in order to prepare the correct data object this method requires.

You can optionally also pass atlas data to this method, in which case a texture atlas will be generated from the given compressed texture, combined with the atlas data.

Parameters:

name type arguments description
key string

The unique string-based key of the Texture.

textureData Phaser.Types.Textures.CompressedTextureData

The Compressed Texture data object.

atlasData object <optional>

Optional Texture Atlas data.

Returns:
Description:

The Texture that was created, or null if the key is already in use.

Since: 3.60.0