Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TileInstance

This interfaceure represents a single tile from a given Tileset.

Hierarchy

  • TileInstance

Index

Properties

Properties

d

d: [ruleId: number, coordId: number] | [coordId: number]

Internal data used by the editor.

For auto-layer tiles: "[ruleId, coordId]".

For tile-layer tiles: "[coordId]".

f

f: number

"Flip bits", a 2-bits integer to represent the mirror transformations of the tile.

  • Bit 0 = X flip
  • Bit 1 = Y flip

Examples:

  • f == 0 -> no flip
  • f == 1 -> X flip only
  • f == 2 -> Y flip only
  • f == 3 -> both flips

px

px: [x: number, y: number]

Pixel coordinates of the tile in the layer.

Don't forget optional layer offsets, if they exist!

src

src: [x: number, y: number]

Pixel coordinates of the tile in the tileset

t

t: number

The Tile ID in the corresponding tileset.

Generated using TypeDoc