Phaser.Physics.Arcade.Components.Debug

Scope: static

Source: src/physics/arcade/components/Debug.js#L7
Since: 3.0.0

Methods:

Public Members

setDebug

<instance> setDebug(showBody, showVelocity, bodyColor)

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:

nametypeoptionaldescription
showBodybooleanNoSet to true to have this body render its outline to the debug display.
showVelocitybooleanNoSet to true to have this body render a velocity marker to the debug display.
bodyColornumberNoThe color of the body outline when rendered to the debug display.

Returns: Phaser.Physics.Arcade.Components.Debug - This Game Object.

Source: src/physics/arcade/components/Debug.js#L15
Since: 3.0.0


setDebugBodyColor

<instance> setDebugBodyColor(value)

Description:

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

Parameters:

nametypeoptionaldescription
valuenumberNoThe color of the body outline when rendered to the debug display.

Returns: Phaser.Physics.Arcade.Components.Debug - This Game Object.

Source: src/physics/arcade/components/Debug.js#L39
Since: 3.0.0


Private Members

Public Members

debugBodyColor

debugBodyColor: number

Description:

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

Source: src/physics/arcade/components/Debug.js#L98
Since: 3.0.0


debugShowBody

debugShowBody: boolean

Description:

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

Source: src/physics/arcade/components/Debug.js#L56
Since: 3.0.0


debugShowVelocity

debugShowVelocity: boolean

Description:

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

Source: src/physics/arcade/components/Debug.js#L77
Since: 3.0.0


Private Members

Updated on