Phaser API Documentation

  Version: 
addImage(key, source, [dataSource])

Description:

Adds a new Texture to the Texture Manager created from the given Image element.

Parameters:

name type arguments description
key string

The unique string-based key of the Texture.

source HTMLImageElement

The source Image element.

dataSource HTMLImageElement | HTMLCanvasElement <optional>

An optional data Image element.

Returns:
Description:

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

Since: 3.0.0