Utils.Debug#box2dBody()

box2dBody(sprite, color)

Renders 'debug draw' data for the given Box2D body.
This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.

Parameters
Name Type Argument Default Description
sprite Phaser.Sprite

The sprite whos body will be rendered.

color string <optional>
'rgb(0,255,0)'

color of the debug info to be rendered. (format is css color string).

Source code: utils/Debug.js (Line 828)
doc_phaser
2017-02-14 11:19:03
Comments
Leave a Comment

Please login to continue.