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 key directly.

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

Parameters:

name type description
key string | Phaser.Textures.Texture

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

Returns:
Description:

The Texture that was created.

Since: 3.0.0