Phaser API Documentation

  Version: 
createDebugGraphic()

Description:

Creates a Phaser.GameObjects.Graphics object that is used to render all of the debug bodies and joints to.

This method is called automatically by the constructor, if debugging has been enabled.

The created Graphics object is automatically added to the Scene at 0x0 and given a depth of Number.MAX_VALUE, so it renders above all else in the Scene.

The Graphics object is assigned to the debugGraphic property of this class and drawDebug is enabled.

Returns:
Description:

The newly created Graphics object.

Since: 3.0.0