Skip to main content
Version: Phaser v4.0.0-rc.6

CompressedTextureFile

A Compressed Texture File suitable for loading by the Loader.

These are created when you use the Phaser.Loader.LoaderPlugin#texture method and are not typically created directly.

For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#texture.

Constructor

new CompressedTextureFile(loader, key, entry, [xhrSettings])

Parameters

nametypeoptionaldescription
loaderPhaser.Loader.LoaderPluginNoA reference to the Loader that is responsible for this file.
keystringNoThe key to use for this file.
entryPhaser.Types.Loader.FileTypes.CompressedTextureFileEntryNoThe compressed texture file entry to load.
xhrSettingsPhaser.Types.Loader.XHRSettingsObjectYesExtra XHR Settings specifically for this file.

Scope: static

Extends

Phaser.Loader.MultiFile

Source: src/loader/filetypes/CompressedTextureFile.js#L22
Since: 3.60.0

Inherited Methods

From Phaser.Loader.MultiFile:


Public Methods

addMultiToCache

<instance> addMultiToCache()

Description:

Adds all of the multi-file entties to their target caches upon successful loading and processing.

Source: src/loader/filetypes/CompressedTextureFile.js#L257
Since: 3.60.0


addToCache

<instance> addToCache()

Description:

Adds this file to its target cache upon successful loading and processing.

Source: src/loader/filetypes/CompressedTextureFile.js#L186
Since: 3.60.0


onFileComplete

<instance> onFileComplete(file)

Description:

Called by each File when it finishes loading.

Parameters:

nametypeoptionaldescription
filePhaser.Loader.FileNoThe File that has completed processing.

Overrides: Phaser.Loader.MultiFile#onFileComplete

Source: src/loader/filetypes/CompressedTextureFile.js#L97
Since: 3.60.0


Inherited Members

From Phaser.Loader.MultiFile: