Phaser API Documentation

  Version: 
GridAlignConfig
Properties:
name type arguments Default description
width number <optional> -1

The width of the grid in items (not pixels). -1 means lay all items out horizontally, regardless of quantity. If both this value and height are set to -1 then this value overrides it and the height value is ignored.

height number <optional> -1

The height of the grid in items (not pixels). -1 means lay all items out vertically, regardless of quantity. If both this value and width are set to -1 then width overrides it and this value is ignored.

cellWidth number <optional> 1

The width of the cell, in pixels, in which the item is positioned.

cellHeight number <optional> 1

The height of the cell, in pixels, in which the item is positioned.

position number <optional> 0

The alignment position. One of the Phaser.Display.Align consts such as TOP_LEFT or RIGHT_CENTER.

x number <optional> 0

Optionally place the top-left of the final grid at this coordinate.

y number <optional> 0

Optionally place the top-left of the final grid at this coordinate.

Type:
object
Since: 3.0.0