Phaser API Documentation

  Version: 
addRenderTexture(key, renderTexture)

Description:

Adds a Render Texture to the Texture Manager using the given key. This allows you to then use the Render Texture as a normal texture for texture based Game Objects like Sprites.

Parameters:

name type description
key string

The unique string-based key of the Texture.

renderTexture Phaser.GameObjects.RenderTexture

The source Render Texture.

Returns:
Description:

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

Since: 3.12.0