Phaser API Documentation

  Version: 
get(key)

Description:

Returns a Texture from the Texture Manager that matches the given key.

If the key is undefined it will return the __DEFAULT Texture.

If the key is an instance of a Texture, it will return the instance.

If the key is an instance of a Frame, it will return the frames parent Texture instance.

Finally, if the key is given, but not found, and not a Texture or Frame instance, it will return the __MISSING Texture.

Parameters:

name type description
key string | Phaser.Textures.Texture | Phaser.Textures.Frame

The unique string-based key of the Texture, or a Texture, or Frame instance.

Returns:
Description:

The Texture matching the given key.

Since: 3.0.0