Phaser API Documentation

  Version: 
updateCanvasTexture(srcCanvas, dstTexture, [flipY])

Description:

Updates a WebGL Texture based on the given Canvas Element.

Parameters:

name type arguments Default description
srcCanvas HTMLCanvasElement

The Canvas to update the WebGL Texture from.

dstTexture WebGLTexture

The destination WebGL Texture to update.

flipY boolean <optional> false

Should the WebGL Texture set UNPACK_MULTIPLY_FLIP_Y?

Returns:
Description:

The updated WebGL Texture.

Type:
  • WebGLTexture
Examples:
Since: 3.20.0