Phaser API Documentation

  Version: 
setContext([ctx])

Description:

Changes the Canvas Rendering Context that all draw operations are performed against.

Parameters:

name type arguments description
ctx CanvasRenderingContext2D <optional>

The new Canvas Rendering Context to draw everything to. Leave empty to reset to the Game Canvas.

Returns:
Description:

The Canvas Renderer instance.

Since: 3.12.0