Navigation
These archived docs are for Phaser 2.4.6 Phaser 3 docs can be found on newdocs.phaser.io.
Phaser CE docs can be found on the Phaser CE Documentation site.

Constructor

Phaser.Component. Bounds

new Bounds()

The Bounds component contains properties related to the bounds of the Game Object.

Source code: gameobjects/components/Bounds.js (Line 12)

Public Properties

[readonly] bottom : number

The sum of the y and height properties. This is the same as y + height - offsetY.

Source code: gameobjects/components/Bounds.js (Line 110)

[readonly] left : number

The left coordinate of the Game Object. This is the same as x - offsetX.

Source code: gameobjects/components/Bounds.js (Line 59)

[readonly] offsetX : number

The amount the Game Object is visually offset from its x coordinate. This is the same as width * anchor.x. It will only be > 0 if anchor.x is not equal to zero.

Source code: gameobjects/components/Bounds.js (Line 24)

[readonly] offsetY : number

The amount the Game Object is visually offset from its y coordinate. This is the same as height * anchor.y. It will only be > 0 if anchor.y is not equal to zero.

Source code: gameobjects/components/Bounds.js (Line 42)

The right coordinate of the Game Object. This is the same as x + width - offsetX.

Source code: gameobjects/components/Bounds.js (Line 76)

[readonly] top : number

The y coordinate of the Game Object. This is the same as y - offsetY.

Source code: gameobjects/components/Bounds.js (Line 93)