Phaser API Documentation

  Version: 
Filter
Namespace: Debug
Phaser.Physics.Arcade.Components.Debug

Members

debugBodyColor: number
Focus
Focus

Description:

The color of the body outline when it renders to the debug display.

Type:
number
Since: 3.0.0
Focus
Focus
debugShowBody: boolean
Focus
Focus

Description:

Set to true to have this body render its outline to the debug display.

Type:
boolean
Since: 3.0.0
Focus
Focus
debugShowVelocity: boolean
Focus
Focus

Description:

Set to true to have this body render a velocity marker to the debug display.

Type:
boolean
Since: 3.0.0
Focus
Focus

Methods

setDebug(showBody, showVelocity, bodyColor)
Focus
Focus

Description:

Sets the debug values of this body.

Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole. Note that there is a performance cost in drawing debug displays. It should never be used in production.

Parameters:

name type description
showBody boolean

Set to true to have this body render its outline to the debug display.

showVelocity boolean

Set to true to have this body render a velocity marker to the debug display.

bodyColor number

The color of the body outline when rendered to the debug display.

Returns:
Description:

This Game Object.

Since: 3.0.0
Focus
Focus
setDebugBodyColor(value)
Focus
Focus

Description:

Sets the color of the body outline when it renders to the debug display.

Parameters:

name type description
value number

The color of the body outline when rendered to the debug display.

Returns:
Description:

This Game Object.

Since: 3.0.0
Focus
Focus