Phaser API Documentation

  Version: 
preDestroy([width], [height], [tile])

Description:

Modifies the layout of this Plane by adjusting the grid dimensions to the given width and height. The values are given in cells, not pixels.

The tile parameter allows you to control if the texture is tiled, or applied across the entire Plane? A tiled texture will repeat with one iteration per cell. A non-tiled texture will be applied across the whole Plane.

Note that if this Plane is using a single texture, not from a texture atlas or sprite sheet, then you can use the Plane.uvScale method to have much more fine-grained control over the texture tiling.

Parameters:

name type arguments Default description
width number <optional> 8

The width of this Plane, in cells, not pixels.

height number <optional> 8

The height of this Plane, in cells, not pixels.

tile boolean <optional> false

Is the texture tiled? I.e. repeated across each cell.

Since: 3.60.0