Phaser API Documentation

  Version: 
getDataSourceImage([name])

Description:

Given a Frame name, return the data source image it uses to render with. You can use this to get the normal map for an image for example.

This will return the actual DOM Image.

Parameters:

name type arguments description
name string | number <optional>

The string-based name, or integer based index, of the Frame to get from this Texture.

Returns:
Description:

The DOM Image or Canvas Element.

Type:
  • HTMLImageElement
  • HTMLCanvasElement
Since: 3.7.0
Source: src/textures/Texture.js (Line 385)