Phaser API Documentation

  Version: 
<static> first([canvasType])

Description:

Gets the first free canvas index from the pool.

Parameters:

name type arguments Default description
canvasType number <optional> Phaser.CANVAS

The type of the Canvas. Either Phaser.CANVAS or Phaser.WEBGL.

Returns:
Description:

The first free canvas, or null if a WebGL canvas was requested or if the pool doesn't have free canvases.

Type:
  • HTMLCanvasElement
Since: 3.0.0