Skip to content

Commit ada4656

Browse files
committed
Merge branch 'master' of https://github.com/photonstorm/phaser
2 parents aa8d207 + ab5853f commit ada4656

16 files changed

Lines changed: 242 additions & 175 deletions

src/gameobjects/UpdateList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ var UpdateList = new Class({
231231
* @method Phaser.GameObjects.UpdateList#removeAll
232232
* @since 3.0.0
233233
*
234-
* @return {Phaser.GameObjects.UpdateList} The UpdateList object.
234+
* @return {Phaser.GameObjects.UpdateList} This UpdateList.
235235
*/
236236
removeAll: function ()
237237
{
@@ -285,7 +285,7 @@ var UpdateList = new Class({
285285
},
286286

287287
/**
288-
* [description]
288+
* The length of the list.
289289
*
290290
* @name Phaser.GameObjects.UpdateList#length
291291
* @type {integer}

src/gameobjects/bitmaptext/GetBitmapTextSize.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@
77
/**
88
* @typedef {object} BitmapTextSize
99
*
10-
* @property {GlobalBitmapTextSize} global - The position and size of the BitmapText, taking into consideration the position and scale of the Game Object.
11-
* @property {LocalBitmapTextSize} local - The position and size of the BitmapText, taking just the font size into consideration.
10+
* @property {GlobalBitmapTextSize} global - The position and size of the BitmapText, taking into account the position and scale of the Game Object.
11+
* @property {LocalBitmapTextSize} local - The position and size of the BitmapText, taking just the font size into account.
1212
*/
1313

1414
/**
15+
* The position and size of the Bitmap Text in global space, taking into account the Game Object's scale and world position.
16+
*
1517
* @typedef {object} GlobalBitmapTextSize
1618
*
17-
* @property {number} x - The x position of the BitmapText, taking into consideration the x coordinate of the Game Object.
18-
* @property {number} y - The y position of the BitmapText, taking into consideration the y coordinate of the Game Object.
19-
* @property {number} width - The width of the BitmapText, taking into consideration the x scale of the Game Object.
20-
* @property {number} width - The height of the BitmapText, taking into consideration the y scale of the Game Object.
19+
* @property {number} x - The x position of the BitmapText, taking into account the x position and scale of the Game Object.
20+
* @property {number} y - The y position of the BitmapText, taking into account the y position and scale of the Game Object.
21+
* @property {number} width - The width of the BitmapText, taking into account the x scale of the Game Object.
22+
* @property {number} width - The height of the BitmapText, taking into account the y scale of the Game Object.
2123
*/
2224

2325
/**
26+
* The position and size of the Bitmap Text in local space, taking just the font size into account.
27+
*
2428
* @typedef {object} LocalBitmapTextSize
2529
*
2630
* @property {number} x - The x position of the BitmapText.
@@ -35,16 +39,16 @@
3539
* Returns a BitmapTextSize object that contains global and local variants of the Game Objects x and y coordinates and
3640
* its width and height.
3741
*
38-
* The global position and size take into consideration the Game Object's position and scale.
42+
* The global position and size take into account the Game Object's position and scale.
3943
*
40-
* The local position and size just takes into consideration the font data.
44+
* The local position and size just takes into account the font data.
4145
*
4246
* @function GetBitmapTextSize
4347
* @since 3.0.0
4448
* @private
4549
*
4650
* @param {(Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText)} src - The BitmapText to calculate the position, width and height of.
47-
* @param {boolean} round - Whether to round the results to the nearest integer.
51+
* @param {boolean} [round] - Whether to round the results to the nearest integer.
4852
*
4953
* @return {BitmapTextSize} The calculated position, width and height of the BitmapText.
5054
*/

src/gameobjects/bitmaptext/ParseFromAtlas.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ var ParseXMLBitmapFont = require('./ParseXMLBitmapFont');
99
/**
1010
* Parse an XML Bitmap Font from an Atlas.
1111
*
12+
* Adds the parsed Bitmap Font data to the cache with the `fontName` key.
13+
*
1214
* @function ParseFromAtlas
1315
* @since 3.0.0
1416
* @private
@@ -20,6 +22,8 @@ var ParseXMLBitmapFont = require('./ParseXMLBitmapFont');
2022
* @param {string} xmlKey - The key of the XML data of the font to parse.
2123
* @param {integer} xSpacing - The x-axis spacing to add between each letter.
2224
* @param {integer} ySpacing - The y-axis spacing to add to the line height.
25+
*
26+
* @return {boolean} Whether the parsing was successful or not.
2327
*/
2428
var ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing)
2529
{

src/gameobjects/bitmaptext/ParseRetroFont.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ var GetValue = require('../../utils/object/GetValue');
1515
*
1616
* @param {Phaser.Scene} scene - A reference to the Phaser Scene.
1717
* @param {Phaser.GameObjects.RetroFont.Config} config - The font configuration object.
18+
*
19+
* @return {object} A parsed Bitmap Font data entry for the Bitmap Font cache.
1820
*/
1921
var ParseRetroFont = function (scene, config)
2022
{

src/gameobjects/bitmaptext/ParseXMLBitmapFont.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,25 @@
55
*/
66

77
/**
8+
* Read an integer value from an XML Node.
9+
*
810
* @function getValue
911
* @since 3.0.0
1012
* @private
13+
*
14+
* @param {Node} node - The XML Node.
15+
* @param {string} attribute - The attribute to read.
16+
*
17+
* @return {integer} The parsed value.
1118
*/
1219
function getValue (node, attribute)
1320
{
1421
return parseInt(node.getAttribute(attribute), 10);
1522
}
1623

1724
/**
25+
* Parse an XML font to Bitmap Font data for the Bitmap Font cache.
26+
*
1827
* @function ParseXMLBitmapFont
1928
* @since 3.0.0
2029
* @private
@@ -23,6 +32,8 @@ function getValue (node, attribute)
2332
* @param {integer} [xSpacing=0] - The x-axis spacing to add between each letter.
2433
* @param {integer} [ySpacing=0] - The y-axis spacing to add to the line height.
2534
* @param {Phaser.Textures.Frame} [frame] - The texture frame to take into account while parsing.
35+
*
36+
* @return {BitmapFontData} The parsed Bitmap Font data.
2637
*/
2738
var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame)
2839
{

src/gameobjects/bitmaptext/RetroFont.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var Extend = require('../../utils/object/Extend');
1010
/**
1111
* @typedef {object} Phaser.GameObjects.RetroFont.Config
1212
*
13-
* @property {string} image - [description]
13+
* @property {string} image - The key of the image containing the font.
1414
* @property {number} offset.x - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.
1515
* @property {number} offset.y - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.
1616
* @property {number} width - The width of each character in the font set.

0 commit comments

Comments
 (0)