Create#grid()

grid(key, width, height, cellWidth, cellHeight, color) → {PIXI.Texture}

Creates a grid texture based on the given dimensions.

Parameters
Name Type Description
key string

The key used to store this texture in the Phaser Cache.

width integer

The width of the grid in pixels.

height integer

The height of the grid in pixels.

cellWidth integer

The width of the grid cells in pixels.

cellHeight integer

The height of the grid cells in pixels.

color string

The color to draw the grid lines in. Should be a Canvas supported color string like #ff5500 or rgba(200,50,3,0.5).

Returns

The newly generated texture.

Source code: core/Create.js (Line 162)
doc_phaser
2017-02-14 10:43:12
Comments
Leave a Comment

Please login to continue.