Skip to content

Commit cef9aa2

Browse files
committed
New Type Defs
1 parent b035d19 commit cef9aa2

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

src/tilemaps/typedefs/GIDData.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @typedef {object} Phaser.Types.Tilemaps.GIDData
3+
* @since 3.0.0
4+
*
5+
* @property {number} gid - The Tiled GID.
6+
* @property {boolean} flippedHorizontal - Horizontal flip flag.
7+
* @property {boolean} flippedVertical - Vertical flip flag.
8+
* @property {boolean} flippedAntiDiagonal - Diagonal flip flag.
9+
* @property {number} rotation - Amount of rotation.
10+
* @property {boolean} flipped - Is flipped?
11+
*/
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* @typedef {object} Phaser.Types.Tilemaps.LayerDataConfig
3+
* @since 3.0.0
4+
*
5+
* @property {string} [name] - The name of the layer, if specified in Tiled.
6+
* @property {number} [x=0] - The x offset of where to draw from the top left.
7+
* @property {number} [y=0] - The y offset of where to draw from the top left.
8+
* @property {number} [width=0] - The width of the layer in tiles.
9+
* @property {number} [height=0] - The height of the layer in tiles.
10+
* @property {number} [tileWidth=0] - The pixel width of the tiles.
11+
* @property {number} [tileHeight=0] - The pixel height of the tiles.
12+
* @property {number} [baseTileWidth=0] - The base tile width.
13+
* @property {number} [baseTileHeight=0] - The base tile height.
14+
* @property {number} [widthInPixels=0] - The width in pixels of the entire layer.
15+
* @property {number} [heightInPixels=0] - The height in pixels of the entire layer.
16+
* @property {number} [alpha=1] - The alpha value of the layer.
17+
* @property {boolean} [visible=true] - Is the layer visible or not?
18+
* @property {object[]} [properties] - Layer specific properties (can be specified in Tiled)
19+
* @property {array} [indexes] - Tile ID index map.
20+
* @property {array} [collideIndexes] - Tile Collision ID index map.
21+
* @property {array} [callbacks] - An array of callbacks.
22+
* @property {array} [bodies] - An array of physics bodies.
23+
* @property {array} [data] - An array of the tile data indexes.
24+
* @property {Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} [data] - A reference to the Tilemap layer that owns this data.
25+
*/

0 commit comments

Comments
 (0)