Skip to content

Commit a76e270

Browse files
committed
Jsdoc fixup: Number -> Integer, array -> Type[]
1 parent 191f621 commit a76e270

39 files changed

Lines changed: 131 additions & 131 deletions

v3/src/gameobjects/tilemap/ParseToTilemap.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ var Tilemap = require('./Tilemap');
1111
*
1212
* @param {Scene} scene - [description]
1313
* @param {string} [key] - The key in the Phaser cache that corresponds to the loaded tilemap data.
14-
* @param {number} [tileWidth=32] - The width of a tile in pixels.
15-
* @param {number} [tileHeight=32] - The height of a tile in pixels.
16-
* @param {number} [width=10] - The width of the map in tiles.
17-
* @param {number} [height=10] - The height of the map in tiles.
18-
* @param {array} [data] - Instead of loading from the cache, you can also load directly from a 2D
19-
* array of tile indexes.
14+
* @param {integer} [tileWidth=32] - The width of a tile in pixels.
15+
* @param {integer} [tileHeight=32] - The height of a tile in pixels.
16+
* @param {integer} [width=10] - The width of the map in tiles.
17+
* @param {integer} [height=10] - The height of the map in tiles.
18+
* @param {integer[][]} [data] - Instead of loading from the cache, you can also load directly from
19+
* a 2D array of tile indexes.
2020
* @param {boolean} [insertNull=false] - Controls how empty tiles, tiles with an index of -1, in the
2121
* map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
2222
* location will get a Tile object with an index of -1. If you've a large sparsely populated map and

v3/src/gameobjects/tilemap/Tilemap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ var Tilemap = new Class({
134134
* property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created.
135135
*
136136
* @param {string} name - The name of the object layer (from Tiled) to create Sprites from.
137-
* @param {number} id - Either the id (object), gid (tile object) or name (object or tile
138-
* object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects with the
139-
* same graphic. The same name can be used on multiple objects.
137+
* @param {integer|string} id - Either the id (object), gid (tile object) or name (object or
138+
* tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects
139+
* with the same graphic. The same name can be used on multiple objects.
140140
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
141141
* scene.make.sprite).
142142
* @param {Scene} [scene=the scene the map is within] - The Scene to create the Sprites within.
143-
* @return {array} An array of the Sprites that were created.
143+
* @return {Sprite[]} An array of the Sprites that were created.
144144
*/
145145
createFromObjects: function (name, id, spriteConfig, scene)
146146
{

v3/src/gameobjects/tilemap/TilemapCreator.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ var ParseToTilemap = require('./ParseToTilemap');
44
// When registering a factory function 'this' refers to the GameObjectCreator context.
55

66
/**
7-
* Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data
8-
* provided. When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When
9-
* parsing from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the
10-
* map data. For an empty map, you should specify tileWidth, tileHeight, width & height.
7+
* Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.
8+
* When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing
9+
* from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map
10+
* data. For an empty map, you should specify tileWidth, tileHeight, width & height.
1111
*
1212
* @param {object} [config] - The config options for the Tilemap.
1313
* @param {string} [config.key] - The key in the Phaser cache that corresponds to the loaded tilemap
1414
* data.
15-
* @param {array} [config.data] - Instead of loading from the cache, you can also load directly from
16-
* a 2D array of tile indexes.
17-
* @param {number} [config.tileWidth=32] - The width of a tile in pixels.
18-
* @param {number} [config.tileHeight=32] - The height of a tile in pixels.
19-
* @param {number} [config.width=10] - The width of the map in tiles.
20-
* @param {number} [config.height=10] - The height of the map in tiles.
15+
* @param {integer[][]} [config.data] - Instead of loading from the cache, you can also load
16+
* directly from a 2D array of tile indexes.
17+
* @param {integer} [config.tileWidth=32] - The width of a tile in pixels.
18+
* @param {integer} [config.tileHeight=32] - The height of a tile in pixels.
19+
* @param {integer} [config.width=10] - The width of the map in tiles.
20+
* @param {integer} [config.height=10] - The height of the map in tiles.
2121
* @param {boolean} [config.insertNull=false] - Controls how empty tiles, tiles with an index of -1,
2222
* in the map data are handled. If `true`, empty locations will get a value of `null`. If `false`,
2323
* empty location will get a Tile object with an index of -1. If you've a large sparsely populated

v3/src/gameobjects/tilemap/TilemapFactory.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ var ParseToTilemap = require('./ParseToTilemap');
1616
* data. For an empty map, you should specify tileWidth, tileHeight, width & height.
1717
*
1818
* @param {string} [key] - The key in the Phaser cache that corresponds to the loaded tilemap data.
19-
* @param {number} [tileWidth=32] - The width of a tile in pixels. Pass in `null` to leave as the
19+
* @param {integer} [tileWidth=32] - The width of a tile in pixels. Pass in `null` to leave as the
2020
* default.
21-
* @param {number} [tileHeight=32] - The height of a tile in pixels. Pass in `null` to leave as the
21+
* @param {integer} [tileHeight=32] - The height of a tile in pixels. Pass in `null` to leave as the
2222
* default.
23-
* @param {number} [width=10] - The width of the map in tiles. Pass in `null` to leave as the
23+
* @param {integer} [width=10] - The width of the map in tiles. Pass in `null` to leave as the
2424
* default.
25-
* @param {number} [height=10] - The height of the map in tiles. Pass in `null` to leave as the
25+
* @param {integer} [height=10] - The height of the map in tiles. Pass in `null` to leave as the
2626
* default.
27-
* @param {array} [data] - Instead of loading from the cache, you can also load directly from a 2D
28-
* array of tile indexes. Pass in `null` for no data.
27+
* @param {integer[][]} [data] - Instead of loading from the cache, you can also load directly from
28+
* a 2D array of tile indexes. Pass in `null` for no data.
2929
* @param {boolean} [insertNull=false] - Controls how empty tiles, tiles with an index of -1, in the
3030
* map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
3131
* location will get a Tile object with an index of -1. If you've a large sparsely populated map and

v3/src/gameobjects/tilemap/Tileset.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var Tileset = new Class({
88
* A Tileset is a combination of an image containing the tiles and a container for data about
99
* each tile.
1010
*
11-
* @class MapData
11+
* @class Tileset
1212
* @constructor
1313
*
1414
* @param {string} name - The name of the tileset in the map data.
@@ -115,7 +115,7 @@ var Tileset = new Class({
115115
/**
116116
* The look-up table to specific tile image texture coordinates (UV in pixels). Each element
117117
* contains the coordinates for a tile in an object of the form {x, y}.
118-
* @property {array} texCoordinates
118+
* @property {object[]} texCoordinates
119119
* @readonly
120120
*/
121121
this.texCoordinates = [];

v3/src/gameobjects/tilemap/components/CalculateFacesWithin.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ var GetTilesWithin = require('./GetTilesWithin');
66
* layer. Interesting faces are used internally for optimizing collisions against tiles. This method
77
* is mostly used internally.
88
*
9-
* @param {number} [tileX=0] - [description]
10-
* @param {number} [tileY=0] - [description]
11-
* @param {number} [width=max width based on tileX] - [description]
12-
* @param {number} [height=max height based on tileY] - [description]
9+
* @param {integer} [tileX=0] - [description]
10+
* @param {integer} [tileY=0] - [description]
11+
* @param {integer} [width=max width based on tileX] - [description]
12+
* @param {integer} [height=max height based on tileY] - [description]
1313
* @param {LayerData} layer - [description]
1414
*/
1515
var CalculateFacesWithin = function (tileX, tileY, width, height, layer)

v3/src/gameobjects/tilemap/components/Copy.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ var CalculateFacesWithin = require('./CalculateFacesWithin');
66
* coordinates) within the layer. This copies all tile properties & recalculates collision
77
* information in the destination region.
88
*
9-
* @param {number} srcTileX - [description]
10-
* @param {number} srcTileY - [description]
11-
* @param {number} width - [description]
12-
* @param {number} height - [description]
13-
* @param {number} destTileX - [description]
14-
* @param {number} destTileY - [description]
15-
* @param {number} destTileY - [description]
9+
* @param {integer} srcTileX - [description]
10+
* @param {integer} srcTileY - [description]
11+
* @param {integer} width - [description]
12+
* @param {integer} height - [description]
13+
* @param {integer} destTileX - [description]
14+
* @param {integer} destTileY - [description]
15+
* @param {integer} destTileY - [description]
1616
* @param {boolean} [recalculateFaces=true] - [description]
1717
* @param {LayerData} layer - [description]
1818
*/

v3/src/gameobjects/tilemap/components/CreateFromTiles.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ var ReplaceByIndex = require('./ReplaceByIndex');
99
* created. This is useful if you want to lay down special tiles in a level that are converted to
1010
* Sprites, but want to replace the tile itself with a floor tile or similar once converted.
1111
*
12-
* @param {number|array} indexes - The tile index, or array of indexes, to create Sprites from.
13-
* @param {number|array} replacements - The tile index, or array of indexes, to change a converted
12+
* @param {integer|array} indexes - The tile index, or array of indexes, to create Sprites from.
13+
* @param {integer|array} replacements - The tile index, or array of indexes, to change a converted
1414
* tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a
1515
* one-to-one mapping with the indexes array.
1616
* @param {object} spriteConfig - The config object to pass into the Sprite creator (i.e.
1717
* scene.make.sprite).
1818
* @param {Scene} [scene=scene the map is within] - The Scene to create the Sprites within.
1919
* @param {Camera} [camera=main camera] - The Camera to use when determining the world XY
2020
* @param {LayerData} layer - [description]
21-
* @return {array} An array of the Sprites that were created.
21+
* @return {Sprite[]} An array of the Sprites that were created.
2222
*/
2323
var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, camera, layer)
2424
{

v3/src/gameobjects/tilemap/components/CullTiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @param {LayerData} layer - [description]
66
* @param {Camera} [camera=main camera] - [description]
77
* @param {array} [outputArray] - [description]
8-
* @returns {array}
8+
* @returns {Tile[]}
99
*/
1010
var CullTiles = function (layer, camera, outputArray)
1111
{

v3/src/gameobjects/tilemap/components/Fill.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ var CalculateFacesWithin = require('./CalculateFacesWithin');
66
* specified index. Tiles will be set to collide if the given index is a colliding index.
77
* Collision information in the region will be recalculated.
88
*
9-
* @param {number} index - [description]
10-
* @param {number} [tileX=0] - [description]
11-
* @param {number} [tileY=0] - [description]
12-
* @param {number} [width=max width based on tileX] - [description]
13-
* @param {number} [height=max height based on tileY] - [description]
9+
* @param {integer} index - [description]
10+
* @param {integer} [tileX=0] - [description]
11+
* @param {integer} [tileY=0] - [description]
12+
* @param {integer} [width=max width based on tileX] - [description]
13+
* @param {integer} [height=max height based on tileY] - [description]
1414
* @param {boolean} [recalculateFaces=true] - [description]
1515
* @param {LayerData} layer - [description]
1616
*/

0 commit comments

Comments
 (0)