/** * Apply a flip-mask transform to a Matrix2d in-place. Resets the matrix to * identity first, then applies the H / V / AD operations to flip / rotate a * tile of `width × height` pixels around its center. * * This is the typed-array equivalent of `Tile.setTileTransform()` — both share * the same math, but this variant is driven by a packed 3-bit mask (H=1, V=2, * AD=4) so callers that have raw layerData bytes can build a flip transform * without constructing a Tile. * * @param {Matrix2d} transform - the matrix to fill (mutated in place) * @param {number} flipMask - 3-bit packed flip mask * @param {number} width - tile width in pixels * @param {number} height - tile height in pixels * @returns {Matrix2d} the same matrix, for chaining * @ignore */ export function buildFlipTransform(transform: Matrix2d, flipMask: number, width: number, height: number): Matrix2d; /** * a basic tile object * @category Tilemap */ export default class Tile extends Bounds { /** * @param {number} x - x index of the Tile in the map * @param {number} y - y index of the Tile in the map * @param {number} gid - tile gid * @param {TMXTileset} tileset - the corresponding tileset object */ constructor(x: number, y: number, gid: number, tileset: TMXTileset); /** * the corresponding tileset * @type {TMXTileset} */ tileset: TMXTileset; /** * the tile transformation matrix (if flipped) * @type {Matrix2d|null} * @ignore */ currentTransform: Matrix2d | null; /** * tile column position in the map * @type {number} */ col: number; /** * tile row position in the map * @type {number} */ row: number; /** * the global tile ID (with flip bits cleared) * @type {number} */ tileId: number; /** * True if the tile is flipped horizontally * @type {boolean} */ flippedX: boolean; /** * True if the tile is flipped vertically * @type {boolean} */ flippedY: boolean; /** * True if the tile is flipped anti-diagonally * @type {boolean} */ flippedAD: boolean; /** * Global flag that indicates if the tile is flipped * @type {boolean} */ flipped: boolean; /** * set the transformation matrix for this tile * @param {Matrix2d} transform - the transformation matrix to apply * @ignore */ setTileTransform(transform: Matrix2d): void; /** * return a renderable object for this Tile object * @param {object} [settings] - see {@link Sprite} * @returns {Renderable} a me.Sprite object */ getRenderable(settings?: object): Renderable; } import { Matrix2d } from "../../math/matrix2d.ts"; import { Bounds } from "../../physics/bounds.ts"; //# sourceMappingURL=TMXTile.d.ts.map