Phaser API Documentation

  Version: 
graphics([config])

Description:

Creates a new Graphics Game Object and adds it to the Scene.

Note: This method will only be available if the Graphics Game Object has been built into Phaser.

Parameters:

name type arguments description
config Phaser.Types.GameObjects.Graphics.Options <optional>

The Graphics configuration.

Returns:
Description:

The Game Object that was created.

Since: 3.0.0