Utils.Debug#spriteBounds()

spriteBounds(sprite, color, filled)

Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!

Parameters
Name Type Argument Default Description
sprite Phaser.Sprite | Phaser.Image

The sprite to display the bounds of.

color string <optional>

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

filled boolean <optional>
true

Render the rectangle as a fillRect (default, true) or a strokeRect (false)

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

Please login to continue.