Phaser API Documentation

  Version: 

Member of: Phaser.Game

context: CanvasRenderingContext2D | WebGLRenderingContext

Description:

A reference to the Rendering Context belonging to the Canvas Element this game is rendering to. If the game is running under Canvas it will be a 2d Canvas Rendering Context. If the game is running under WebGL it will be a WebGL Rendering Context. This context is created automatically by Phaser unless you provide a context property in your Game Config.

Type:
CanvasRenderingContext2D | WebGLRenderingContext
Since: 3.0.0
Source: src/core/Game.js (Line 114)