Phaser API Documentation

  Version: 
getTileTextureCoordinates(tileIndex)

Description:

Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index. Returns null if tile index is not contained in this Tileset.

Parameters:

name type description
tileIndex number

The unique id of the tile across all tilesets in the map.

Returns:
Description:

Object in the form { x, y } representing the top-left UV coordinate within the Tileset image.

Type:
  • object
Examples:
Since: 3.0.0
Source: src/tilemaps/Tileset.js (Line 256)