API Docs for: 1.13.1
Show:

game.DebugDraw Class

Extends game.Class
Module: debug

DebugDraw will draw all interactive sprite hit areas and physic shapes. Automatically enabled, if URL contains ?debugdraw.

Methods

addBody

(
  • body
)

Add physic body to DebugDraw.

Parameters:

addSprite

(
  • sprite
)

Add interactive sprite to DebugDraw.

Parameters:

drawBodySprite

(
  • sprite
  • body
)

Draw debug sprite for physics body.

Parameters:

reset

()

Remove all sprites from DebugDraw.

update

()

Update DebugDraw sprites.

Attributes

bodyAlpha

Number

Alpha of DebugDraw bodies.

Default: 0.5

bodyColor

Number

Color of DebugDraw bodies.

Default: 0x0000ff

bodyLineColor

Number

Stroke color of DebugDraw bodies.

Default: 0xff0000

enabled

Boolean

Enable DebugDraw.

spriteAlpha

Number

Alpha of DebugDraw sprites.

Default: 0.5

spriteColor

Number

Color of DebugDraw sprites.

Default: 0xff0000

spriteLineColor

Number

Stroke color of DebugDraw sprites.

Default: 0x0000ff