Skip to content

Commit 82ddc03

Browse files
committed
Added new batch of jsdocs
1 parent d8fcde4 commit 82ddc03

13 files changed

Lines changed: 119 additions & 110 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,20 @@ Arian Fornaris
7474
cyantree
7575
DannyT
7676
Elliott Wallace
77+
felixnemis
78+
griga
79+
Hsaka
80+
icbat
7781
Lee
7882
Nathaniel Foldan
7983
Peter Pedersen
84+
rootasjey
85+
Sam Frantz
86+
snowbillr
8087
Stephen Hamilton
8188
STuFF
89+
TadejZupancic
90+
8291

8392
## Version 3.13.0 - Yuuki - 20th September 2018
8493

src/boot/Config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ var ValueToColor = require('../display/color/ValueToColor');
181181
* @property {CanvasRenderingContext2D} [context] - Provide your own Canvas Context for Phaser to use, instead of creating one.
182182
* @property {object} [scene=null] - [description]
183183
* @property {string[]} [seed] - [description]
184-
* @property {string} [title=''] - [description]
185-
* @property {string} [url='http://phaser.io'] - [description]
186-
* @property {string} [version=''] - [description]
184+
* @property {string} [title=''] - The title of the game.
185+
* @property {string} [url='http://phaser.io'] - The url of the game.
186+
* @property {string} [version=''] - The version of the game.
187187
* @property {boolean} [autoFocus=true] - Automatically call window.focus() when the game boots.
188188
* @property {(boolean|InputConfig)} [input] - [description]
189189
* @property {boolean} [disableContextMenu=false] - [description]
@@ -307,17 +307,17 @@ var Config = new Class({
307307
MATH.RND.init(this.seed);
308308

309309
/**
310-
* @const {string} Phaser.Boot.Config#gameTitle - [description]
310+
* @const {string} Phaser.Boot.Config#gameTitle - The title of the game.
311311
*/
312312
this.gameTitle = GetValue(config, 'title', '');
313313

314314
/**
315-
* @const {string} Phaser.Boot.Config#gameURL - [description]
315+
* @const {string} Phaser.Boot.Config#gameURL - The URL of the game.
316316
*/
317317
this.gameURL = GetValue(config, 'url', 'https://phaser.io');
318318

319319
/**
320-
* @const {string} Phaser.Boot.Config#gameVersion - [description]
320+
* @const {string} Phaser.Boot.Config#gameVersion - The version of the game.
321321
*/
322322
this.gameVersion = GetValue(config, 'version', '');
323323

@@ -396,7 +396,7 @@ var Config = new Class({
396396
this.inputGamepadEventTarget = GetValue(config, 'input.gamepad.target', window);
397397

398398
/**
399-
* @const {boolean} Phaser.Boot.Config#disableContextMenu - [description]
399+
* @const {boolean} Phaser.Boot.Config#disableContextMenu - Set to `true` to disable context menu. Default value is `false`.
400400
*/
401401
this.disableContextMenu = GetValue(config, 'disableContextMenu', false);
402402

@@ -466,7 +466,7 @@ var Config = new Class({
466466
this.roundPixels = GetValue(renderConfig, 'roundPixels', false);
467467

468468
/**
469-
* @const {boolean} Phaser.Boot.Config#pixelArt - [description]
469+
* @const {boolean} Phaser.Boot.Config#pixelArt - Prevent pixel art from becoming blurred when scaled. It will remain crisp (tells the WebGL renderer to automatically create textures using a linear filter mode).
470470
*/
471471
this.pixelArt = GetValue(renderConfig, 'pixelArt', false);
472472

@@ -566,7 +566,7 @@ var Config = new Class({
566566
this.loaderPath = GetValue(config, 'loader.path', '');
567567

568568
/**
569-
* @const {integer} Phaser.Boot.Config#loaderMaxParallelDownloads - [description]
569+
* @const {integer} Phaser.Boot.Config#loaderMaxParallelDownloads - Maximum parallel downloads allowed for resources (Default to 32).
570570
*/
571571
this.loaderMaxParallelDownloads = GetValue(config, 'loader.maxParallelDownloads', 32);
572572

src/curves/CubicBezierCurve.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var Vector2 = require('../math/Vector2');
1313

1414
/**
1515
* @classdesc
16-
* [description]
16+
* A higher-order Bézier curve constructed of four points.
1717
*
1818
* @class CubicBezier
1919
* @extends Phaser.Curves.Curve
@@ -45,7 +45,7 @@ var CubicBezierCurve = new Class({
4545
}
4646

4747
/**
48-
* [description]
48+
* The start point of this curve.
4949
*
5050
* @name Phaser.Curves.CubicBezier#p0
5151
* @type {Phaser.Math.Vector2}
@@ -54,7 +54,7 @@ var CubicBezierCurve = new Class({
5454
this.p0 = p0;
5555

5656
/**
57-
* [description]
57+
* The first control point of this curve.
5858
*
5959
* @name Phaser.Curves.CubicBezier#p1
6060
* @type {Phaser.Math.Vector2}
@@ -63,7 +63,7 @@ var CubicBezierCurve = new Class({
6363
this.p1 = p1;
6464

6565
/**
66-
* [description]
66+
* The second control point of this curve.
6767
*
6868
* @name Phaser.Curves.CubicBezier#p2
6969
* @type {Phaser.Math.Vector2}
@@ -72,7 +72,7 @@ var CubicBezierCurve = new Class({
7272
this.p2 = p2;
7373

7474
/**
75-
* [description]
75+
* The end point of this curve.
7676
*
7777
* @name Phaser.Curves.CubicBezier#p3
7878
* @type {Phaser.Math.Vector2}
@@ -101,7 +101,7 @@ var CubicBezierCurve = new Class({
101101
},
102102

103103
/**
104-
* [description]
104+
* Returns the resolution of this curve.
105105
*
106106
* @method Phaser.Curves.CubicBezier#getResolution
107107
* @since 3.0.0
@@ -141,17 +141,17 @@ var CubicBezierCurve = new Class({
141141
},
142142

143143
/**
144-
* [description]
144+
* Draws this curve to the specified graphics object.
145145
*
146146
* @method Phaser.Curves.CubicBezier#draw
147147
* @since 3.0.0
148148
*
149149
* @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]
150150
*
151-
* @param {Phaser.GameObjects.Graphics} graphics - [description]
152-
* @param {integer} [pointsTotal=32] - [description]
151+
* @param {Phaser.GameObjects.Graphics} graphics - The graphics object this curve should be drawn to.
152+
* @param {integer} [pointsTotal=32] - The number of intermediary points that make up this curve. A higher number of points will result in a smoother curve.
153153
*
154-
* @return {Phaser.GameObjects.Graphics} [description]
154+
* @return {Phaser.GameObjects.Graphics} The graphics object this curve was drawn to. Useful for method chaining.
155155
*/
156156
draw: function (graphics, pointsTotal)
157157
{
@@ -174,7 +174,7 @@ var CubicBezierCurve = new Class({
174174
},
175175

176176
/**
177-
* [description]
177+
* Returns a JSON object that describes this curve.
178178
*
179179
* @method Phaser.Curves.CubicBezier#toJSON
180180
* @since 3.0.0
@@ -197,14 +197,14 @@ var CubicBezierCurve = new Class({
197197
});
198198

199199
/**
200-
* [description]
200+
* Generates a curve from a JSON object.
201201
*
202202
* @function Phaser.Curves.CubicBezier.fromJSON
203203
* @since 3.0.0
204204
*
205205
* @param {JSONCurve} data - The JSON object containing this curve data.
206206
*
207-
* @return {Phaser.Curves.CubicBezier} [description]
207+
* @return {Phaser.Curves.CubicBezier} The curve generated from the JSON object.
208208
*/
209209
CubicBezierCurve.fromJSON = function (data)
210210
{

src/curves/Curve.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ var Curve = new Class({
192192
* @method Phaser.Curves.Curve#getEndPoint
193193
* @since 3.0.0
194194
*
195-
* @param {Phaser.Math.Vector2} out - [description]
195+
* @param {Phaser.Math.Vector2} [out] - Optional Vector object to store the result in.
196196
*
197-
* @return {Phaser.Math.Vector2} [description]
197+
* @return {Phaser.Math.Vector2} Vector2 containing the coordinates of the curves end point.
198198
*/
199199
getEndPoint: function (out)
200200
{
@@ -398,7 +398,7 @@ var Curve = new Class({
398398
* @param {number} t - [description]
399399
* @param {Phaser.Math.Vector2} [out] - [description]
400400
*
401-
* @return {Phaser.Math.Vector2} [description]
401+
* @return {Phaser.Math.Vector2} Vector approximating the tangent line at the point t (delta +/- 0.0001)
402402
*/
403403
getTangent: function (t, out)
404404
{

src/curves/path/Path.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,9 @@ var Path = new Class({
558558
* @method Phaser.Curves.Path#getPoints
559559
* @since 3.0.0
560560
*
561-
* @param {integer} [divisions=12] - Get random point on path.
561+
* @param {integer} [divisions=12] - The number of points to divide the path in to.
562562
*
563-
* @return {Phaser.Math.Vector2[]} [description]
563+
* @return {Phaser.Math.Vector2[]} An array of Vector2 objects that containing the points along the Path.
564564
*/
565565
getPoints: function (divisions)
566566
{

src/geom/rectangle/GetPoints.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ var Perimeter = require('./Perimeter');
1111
// each spaced out based on the quantity or step required
1212

1313
/**
14-
* [description]
14+
* Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.
1515
*
1616
* @function Phaser.Geom.Rectangle.GetPoints
1717
* @since 3.0.0
1818
*
1919
* @generic {Phaser.Geom.Point[]} O - [out,$return]
2020
*
21-
* @param {Phaser.Geom.Rectangle} rectangle - [description]
21+
* @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.
2222
* @param {number} step - [description]
2323
* @param {integer} quantity - [description]
24-
* @param {(array|Phaser.Geom.Point[])} [out] - [description]
24+
* @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.
2525
*
26-
* @return {(array|Phaser.Geom.Point[])} [description]
26+
* @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.
2727
*/
2828
var GetPoints = function (rectangle, quantity, stepRate, out)
2929
{

src/geom/rectangle/MergeRect.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88
// Neither rect should have negative widths or heights
99

1010
/**
11-
* [description]
11+
* Merges the source rectangle into the target rectangle and returns the target.
12+
* Neither rectangle should have a negative width or height.
1213
*
1314
* @function Phaser.Geom.Rectangle.MergeRect
1415
* @since 3.0.0
1516
*
1617
* @generic {Phaser.Geom.Rectangle} O - [target,$return]
1718
*
18-
* @param {Phaser.Geom.Rectangle} target - [description]
19-
* @param {Phaser.Geom.Rectangle} source - [description]
19+
* @param {Phaser.Geom.Rectangle} target - Target rectangle. Will be modified to include source rectangle.
20+
* @param {Phaser.Geom.Rectangle} source - Rectangle that will be merged into target rectangle.
2021
*
21-
* @return {Phaser.Geom.Rectangle} [description]
22+
* @return {Phaser.Geom.Rectangle} Modified target rectangle that contains source rectangle.
2223
*/
2324
var MergeRect = function (target, source)
2425
{

src/geom/rectangle/Rectangle.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ var Rectangle = new Class({
205205
},
206206

207207
/**
208-
* [description]
208+
* Sets the width and height of the Rectangle.
209209
*
210210
* @method Phaser.Geom.Rectangle#setSize
211211
* @since 3.0.0
212212
*
213-
* @param {number} width - [description]
214-
* @param {number} [height=width] - [description]
213+
* @param {number} width - The width to set the Rectangle to.
214+
* @param {number} [height=width] - The height to set the Rectangle to.
215215
*
216216
* @return {Phaser.Geom.Rectangle} This Rectangle object.
217217
*/
@@ -226,12 +226,12 @@ var Rectangle = new Class({
226226
},
227227

228228
/**
229-
* [description]
229+
* Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.
230230
*
231231
* @method Phaser.Geom.Rectangle#isEmpty
232232
* @since 3.0.0
233233
*
234-
* @return {boolean} [description]
234+
* @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.
235235
*/
236236
isEmpty: function ()
237237
{
@@ -323,7 +323,8 @@ var Rectangle = new Class({
323323
},
324324

325325
/**
326-
* [description]
326+
* The x coordinate of the left of the Rectangle.
327+
* Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.
327328
*
328329
* @name Phaser.Geom.Rectangle#left
329330
* @type {number}
@@ -353,7 +354,8 @@ var Rectangle = new Class({
353354
},
354355

355356
/**
356-
* [description]
357+
* The sum of the x and width properties.
358+
* Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.
357359
*
358360
* @name Phaser.Geom.Rectangle#right
359361
* @type {number}
@@ -381,7 +383,8 @@ var Rectangle = new Class({
381383
},
382384

383385
/**
384-
* [description]
386+
* The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.
387+
* However it does affect the height property, whereas changing the y value does not affect the height property.
385388
*
386389
* @name Phaser.Geom.Rectangle#top
387390
* @type {number}
@@ -411,7 +414,8 @@ var Rectangle = new Class({
411414
},
412415

413416
/**
414-
* [description]
417+
* The sum of the y and height properties.
418+
* Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.
415419
*
416420
* @name Phaser.Geom.Rectangle#bottom
417421
* @type {number}
@@ -439,7 +443,7 @@ var Rectangle = new Class({
439443
},
440444

441445
/**
442-
* [description]
446+
* The x coordinate of the center of the Rectangle.
443447
*
444448
* @name Phaser.Geom.Rectangle#centerX
445449
* @type {number}
@@ -460,7 +464,7 @@ var Rectangle = new Class({
460464
},
461465

462466
/**
463-
* [description]
467+
* The y coordinate of the center of the Rectangle.
464468
*
465469
* @name Phaser.Geom.Rectangle#centerY
466470
* @type {number}

src/geom/triangle/BuildEquilateral.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,18 @@
66

77
var Triangle = require('./Triangle');
88

9-
// Builds an equilateral triangle.
10-
// In the equilateral triangle, all the sides are the same length (congruent)
11-
// and all the angles are the same size (congruent).
12-
13-
// The x/y specifies the top-middle of the triangle (x1/y1) and length
14-
// is the length of each side
15-
169
/**
17-
* [description]
10+
* Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent).
11+
* The x/y specifies the top-middle of the triangle (x1/y1) and length is the length of each side.
1812
*
1913
* @function Phaser.Geom.Triangle.BuildEquilateral
2014
* @since 3.0.0
2115
*
22-
* @param {number} x - [description]
23-
* @param {number} y - [description]
24-
* @param {number} length - [description]
16+
* @param {number} x - x coordinate of the top point of the triangle.
17+
* @param {number} y - y coordinate of the top point of the triangle.
18+
* @param {number} length - Length of each side of the triangle.
2519
*
26-
* @return {Phaser.Geom.Triangle} [description]
20+
* @return {Phaser.Geom.Triangle} The Triangle object of the given size.
2721
*/
2822
var BuildEquilateral = function (x, y, length)
2923
{

0 commit comments

Comments
 (0)