Skip to content

Commit 44faa01

Browse files
committed
Tilemap Types
1 parent 0d831cc commit 44faa01

12 files changed

Lines changed: 31 additions & 31 deletions

File tree

src/tilemaps/Tilemap.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ var Tilemap = new Class({
859859
* @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.
860860
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
861861
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
862-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
862+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
863863
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.
864864
*
865865
* @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.
@@ -947,7 +947,7 @@ var Tilemap = new Class({
947947
* @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.
948948
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
949949
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
950-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
950+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
951951
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The Tile layer to run the search on. If not provided will use the current layer.
952952
*
953953
* @return {?Phaser.Tilemaps.Tile} Returns a Tiles, or null if the layer given was invalid.
@@ -976,7 +976,7 @@ var Tilemap = new Class({
976976
* @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.
977977
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
978978
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
979-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
979+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
980980
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The Tile layer to run the search on. If not provided will use the current layer.
981981
*
982982
* @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.
@@ -1181,7 +1181,7 @@ var Tilemap = new Class({
11811181
* @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.
11821182
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
11831183
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
1184-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
1184+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
11851185
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.
11861186
*
11871187
* @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.
@@ -1204,7 +1204,7 @@ var Tilemap = new Class({
12041204
* @since 3.0.0
12051205
*
12061206
* @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates
1207-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
1207+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
12081208
* @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.
12091209
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.
12101210
*
@@ -1230,7 +1230,7 @@ var Tilemap = new Class({
12301230
* @param {number} worldY - The world y coordinate for the top-left of the area.
12311231
* @param {number} width - The width of the area.
12321232
* @param {number} height - The height of the area.
1233-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
1233+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
12341234
* @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.
12351235
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.
12361236
*
@@ -1748,7 +1748,7 @@ var Tilemap = new Class({
17481748
* @since 3.0.0
17491749
*
17501750
* @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.
1751-
* @param {Phaser.Tilemaps.Types.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
1751+
* @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
17521752
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.
17531753
*
17541754
* @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.
@@ -1775,7 +1775,7 @@ var Tilemap = new Class({
17751775
* @since 3.17.0
17761776
*
17771777
* @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.
1778-
* @param {Phaser.Tilemaps.Types.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
1778+
* @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
17791779
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.
17801780
*
17811781
* @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.

src/tilemaps/TilemapCreator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var ParseToTilemap = require('./ParseToTilemap');
1616
* @method Phaser.GameObjects.GameObjectCreator#tilemap
1717
* @since 3.0.0
1818
*
19-
* @param {Phaser.Tilemaps.Types.TilemapConfig} [config] - The config options for the Tilemap.
19+
* @param {Phaser.Types.Tilemaps.TilemapConfig} [config] - The config options for the Tilemap.
2020
*
2121
* @return {Phaser.Tilemaps.Tilemap}
2222
*/

src/tilemaps/components/GetTilesWithin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var GetFastValue = require('../../utils/object/GetFastValue');
1717
* @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.
1818
* @param {integer} width - How many tiles wide from the `tileX` index the area will be.
1919
* @param {integer} height - How many tiles tall from the `tileY` index the area will be.
20-
* @param {Phaser.Tilemaps.Types.GetTilesWithinFilteringOptions} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles.
20+
* @param {Phaser.Types.Tilemaps.GetTilesWithinFilteringOptions} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles.
2121
* @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.
2222
*
2323
* @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.

src/tilemaps/dynamiclayer/DynamicTilemapLayer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ var DynamicTilemapLayer = new Class({
520520
* @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.
521521
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
522522
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
523-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
523+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
524524
*
525525
* @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.
526526
*/
@@ -565,7 +565,7 @@ var DynamicTilemapLayer = new Class({
565565
* @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.
566566
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
567567
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
568-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
568+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
569569
*
570570
* @return {?Phaser.Tilemaps.Tile}
571571
*/
@@ -587,7 +587,7 @@ var DynamicTilemapLayer = new Class({
587587
* @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.
588588
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
589589
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
590-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
590+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
591591
*
592592
* @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.
593593
*/
@@ -644,7 +644,7 @@ var DynamicTilemapLayer = new Class({
644644
* @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.
645645
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
646646
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
647-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
647+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
648648
*
649649
* @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.
650650
*/
@@ -661,7 +661,7 @@ var DynamicTilemapLayer = new Class({
661661
* @since 3.0.0
662662
*
663663
* @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates
664-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
664+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
665665
* @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.
666666
*
667667
* @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.
@@ -681,7 +681,7 @@ var DynamicTilemapLayer = new Class({
681681
* @param {number} worldY - The world y coordinate for the top-left of the area.
682682
* @param {number} width - The width of the area.
683683
* @param {number} height - The height of the area.
684-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
684+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
685685
* @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.
686686
*
687687
* @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.
@@ -867,7 +867,7 @@ var DynamicTilemapLayer = new Class({
867867
* @since 3.0.0
868868
*
869869
* @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.
870-
* @param {Phaser.Tilemaps.Types.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
870+
* @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
871871
*
872872
* @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.
873873
*/

src/tilemaps/mapdata/MapData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var GetFastValue = require('../../utils/object/GetFastValue');
1818
* @constructor
1919
* @since 3.0.0
2020
*
21-
* @param {Phaser.Tilemaps.Types.MapDataConfig} [config] - The Map configuration object.
21+
* @param {Phaser.Types.Tilemaps.MapDataConfig} [config] - The Map configuration object.
2222
*/
2323
var MapData = new Class({
2424

src/tilemaps/staticlayer/StaticTilemapLayer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ var StaticTilemapLayer = new Class({
941941
* @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.
942942
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
943943
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
944-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
944+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
945945
*
946946
* @return {?Phaser.Tilemaps.Tile}
947947
*/
@@ -966,7 +966,7 @@ var StaticTilemapLayer = new Class({
966966
* @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.
967967
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
968968
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
969-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
969+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
970970
*
971971
* @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.
972972
*/
@@ -989,7 +989,7 @@ var StaticTilemapLayer = new Class({
989989
* @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.
990990
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
991991
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
992-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
992+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
993993
*
994994
* @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.
995995
*/
@@ -1048,7 +1048,7 @@ var StaticTilemapLayer = new Class({
10481048
* @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area.
10491049
* @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.
10501050
* @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.
1051-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
1051+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
10521052
*
10531053
* @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.
10541054
*/
@@ -1067,7 +1067,7 @@ var StaticTilemapLayer = new Class({
10671067
* @param {number} worldY - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.
10681068
* @param {number} width - How many tiles wide from the `tileX` index the area will be.
10691069
* @param {number} height - How many tiles high from the `tileY` index the area will be.
1070-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
1070+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
10711071
* @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.
10721072
*
10731073
* @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.
@@ -1085,7 +1085,7 @@ var StaticTilemapLayer = new Class({
10851085
* @since 3.0.0
10861086
*
10871087
* @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates
1088-
* @param {Phaser.Tilemaps.Types.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
1088+
* @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.
10891089
* @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.
10901090
*
10911091
* @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.
@@ -1140,7 +1140,7 @@ var StaticTilemapLayer = new Class({
11401140
* @since 3.0.0
11411141
*
11421142
* @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.
1143-
* @param {Phaser.Tilemaps.Types.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
1143+
* @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
11441144
*
11451145
* @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.
11461146
*/

src/tilemaps/typedefs/FilteringOptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {object} Phaser.Tilemaps.Types.FilteringOptions
2+
* @typedef {object} Phaser.Types.Tilemaps.FilteringOptions
33
* @since 3.0.0
44
*
55
* @property {boolean} [isNotEmpty=false] - If true, only return tiles that don't have -1 for an index.

src/tilemaps/typedefs/GetTilesWithinFilteringOptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {object} Phaser.Tilemaps.Types.GetTilesWithinFilteringOptions
2+
* @typedef {object} Phaser.Types.Tilemaps.GetTilesWithinFilteringOptions
33
* @since 3.0.0
44
*
55
* @property {boolean} [isNotEmpty=false] - If true, only return tiles that don't have -1 for an index.

src/tilemaps/typedefs/MapDataConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {object} Phaser.Tilemaps.Types.MapDataConfig
2+
* @typedef {object} Phaser.Types.Tilemaps.MapDataConfig
33
* @since 3.0.0
44
*
55
* @property {string} [name] - The key in the Phaser cache that corresponds to the loaded tilemap data.

src/tilemaps/typedefs/StyleConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @typedef {object} Phaser.Tilemaps.Types.StyleConfig
2+
* @typedef {object} Phaser.Types.Tilemaps.StyleConfig
33
* @since 3.0.0
44
*
55
* @property {?(Phaser.Display.Color|number|null)} [tileColor=blue] - Color to use for drawing a filled rectangle at non-colliding tile locations. If set to null, non-colliding tiles will not be drawn.

0 commit comments

Comments
 (0)