Phaser API Documentation

  Version: 
draw(x, y, source)

Description:

Draws the given Image or Canvas element to this CanvasTexture, then updates the internal ImageData buffer and arrays.

Parameters:

name type description
x number

The x coordinate to draw the source at.

y number

The y coordinate to draw the source at.

source HTMLImageElement | HTMLCanvasElement

The element to draw to this canvas.

Returns:
Description:

This CanvasTexture.

Examples:
Since: 3.13.0