You’re reading the docs for Phaser v3.88.2. The latest is Phaser v4.1.0.

Phaser.Textures.Parsers

Scope: static

Source: src/textures/parsers/index.js#L7

Static functions

KTXParser

staticKTXParser(data)

Description:

Parses a KTX format Compressed Texture file and generates texture data suitable for WebGL from it.

Parameters:

nametypeoptionaldescription
dataArrayBufferNoThe data object created by the Compressed Texture File Loader.

Returns: Phaser.Types.Textures.CompressedTextureData - The Compressed Texture data.

Source: src/textures/parsers/KTXParser.js#L7
Since: 3.60.0


PVRParser

staticPVRParser(data)

Description:

Parses a PVR format Compressed Texture file and generates texture data suitable for WebGL from it.

Parameters:

nametypeoptionaldescription
dataArrayBufferNoThe data object created by the Compressed Texture File Loader.

Returns: Phaser.Types.Textures.CompressedTextureData - The Compressed Texture data.

Source: src/textures/parsers/PVRParser.js#L236
Since: 3.60.0


verifyCompressedTexture

staticverifyCompressedTexture(data)

Description:

Verify whether the given compressed texture data is valid.

Compare the dimensions of each mip layer to the rules for that

specific format.

Mip layer size is assumed to have been calculated correctly during parsing.

Parameters:

nametypeoptionaldescription
dataPhaser.Types.Textures.CompressedTextureDataNoThe compressed texture data to verify.

Returns: boolean - Whether the compressed texture data is valid.

Source: src/textures/parsers/VerifyCompressedTexture.js#L9
Since: 3.80.0