Skip to content

Commit 89b9f42

Browse files
committed
Adding jsdocs
1 parent f869794 commit 89b9f42

13 files changed

Lines changed: 59 additions & 43 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@
88

99
### Bug Fixes
1010

11+
### Examples, Documentation and TypeScript
12+
13+
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
14+
15+
@shaneMLK
16+
Arian Fornaris
17+
cyantree
18+
DannyT
19+
Elliott Wallace
20+
Lee
21+
Nathaniel Foldan
22+
Peter Pedersen
23+
Stephen Hamilton
24+
STuFF
25+
1126

1227
## Version 3.13.0 - Yuuki - 20th September 2018
1328

src/animations/AnimationManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ var AnimationManager = new Class({
187187
* @since 3.0.0
188188
*
189189
* @param {(string|JSONAnimationManager|JSONAnimation)} data - [description]
190-
* @param {boolean} [clearCurrentAnimations=false] - [description]
190+
* @param {boolean} [clearCurrentAnimations=false] - If set to `true`, the current animations will be removed (`anims.clear()`). If set to `false` (default), the animations in `data` will be added.
191191
*
192192
* @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.
193193
*/

src/boot/Config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ var Config = new Class({
275275
}
276276

277277
/**
278-
* @const {number} Phaser.Boot.Config#renderType - [description]
278+
* @const {number} Phaser.Boot.Config#renderType - Force Phaser to use a specific renderer. Can be `CONST.CANVAS`, `CONST.WEBGL`, `CONST.HEADLESS` or `CONST.AUTO` (default)
279279
*/
280280
this.renderType = GetValue(config, 'type', CONST.AUTO);
281281

src/curves/QuadraticBezierCurve.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ var QuadraticBezier = new Class({
137137
*
138138
* @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]
139139
*
140-
* @param {Phaser.GameObjects.Graphics} graphics - [description]
141-
* @param {integer} [pointsTotal=32] - [description]
140+
* @param {Phaser.GameObjects.Graphics} graphics - `Graphics` object to draw onto.
141+
* @param {integer} [pointsTotal=32] - Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing.
142142
*
143-
* @return {Phaser.GameObjects.Graphics} [description]
143+
* @return {Phaser.GameObjects.Graphics} `Graphics` object that was drawn to.
144144
*/
145145
draw: function (graphics, pointsTotal)
146146
{
@@ -163,7 +163,7 @@ var QuadraticBezier = new Class({
163163
},
164164

165165
/**
166-
* [description]
166+
* Converts the curve into a JSON compatible object.
167167
*
168168
* @method Phaser.Curves.QuadraticBezier#toJSON
169169
* @since 3.2.0
@@ -185,14 +185,14 @@ var QuadraticBezier = new Class({
185185
});
186186

187187
/**
188-
* [description]
188+
* Creates a curve from a JSON object, e. g. created by `toJSON`.
189189
*
190190
* @function Phaser.Curves.QuadraticBezier.fromJSON
191191
* @since 3.2.0
192192
*
193193
* @param {JSONCurve} data - The JSON object containing this curve data.
194194
*
195-
* @return {Phaser.Curves.QuadraticBezier} [description]
195+
* @return {Phaser.Curves.QuadraticBezier} The created curve instance.
196196
*/
197197
QuadraticBezier.fromJSON = function (data)
198198
{

src/curves/path/Path.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ var Path = new Class({
558558
* @method Phaser.Curves.Path#getPoints
559559
* @since 3.0.0
560560
*
561-
* @param {integer} [divisions=12] - [description]
561+
* @param {integer} [divisions=12] - Get random point on path.
562562
*
563563
* @return {Phaser.Math.Vector2[]} [description]
564564
*/
@@ -614,7 +614,7 @@ var Path = new Class({
614614
*
615615
* @generic {Phaser.Math.Vector2} O - [out,$return]
616616
*
617-
* @param {Phaser.Math.Vector2} [out] - [description]
617+
* @param {Phaser.Math.Vector2} [out] - `Vector2` instance that should be used for storing the result. If `undefined` a new `Vector2` will be created.
618618
*
619619
* @return {Phaser.Math.Vector2} [description]
620620
*/

src/geom/line/NormalX.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var Angle = require('./Angle');
1313
* @function Phaser.Geom.Line.NormalX
1414
* @since 3.0.0
1515
*
16-
* @param {Phaser.Geom.Line} line - [description]
16+
* @param {Phaser.Geom.Line} line - The Line object to get the normal value from.
1717
*
1818
* @return {number} [description]
1919
*/

src/geom/point/Equals.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
*/
66

77
/**
8-
* [description]
8+
* A comparison of two `Point` objects to see if they are equal.
99
*
1010
* @function Phaser.Geom.Point.Equals
1111
* @since 3.0.0
1212
*
13-
* @param {Phaser.Geom.Point} point - [description]
14-
* @param {Phaser.Geom.Point} toCompare - [description]
13+
* @param {Phaser.Geom.Point} point - The original `Point` to compare against.
14+
* @param {Phaser.Geom.Point} toCompare - The second `Point` to compare.
1515
*
16-
* @return {boolean} [description]
16+
* @return {boolean} Returns true if the both `Point` objects are equal.
1717
*/
1818
var Equals = function (point, toCompare)
1919
{

src/geom/polygon/Polygon.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ var Polygon = new Class({
5151
},
5252

5353
/**
54-
* [description]
54+
* Check to see if the Polygon contains the given x / y coordinates.
5555
*
5656
* @method Phaser.Geom.Polygon#contains
5757
* @since 3.0.0
5858
*
59-
* @param {number} x - [description]
60-
* @param {number} y - [description]
59+
* @param {number} x - The x coordinate to check within the polygon.
60+
* @param {number} y - The y coordinate to check within the polygon.
6161
*
62-
* @return {boolean} [description]
62+
* @return {boolean} `true` if the coordinates are within the polygon, otherwise `false`.
6363
*/
6464
contains: function (x, y)
6565
{
@@ -141,7 +141,7 @@ var Polygon = new Class({
141141
* @method Phaser.Geom.Polygon#calculateArea
142142
* @since 3.0.0
143143
*
144-
* @return {number} [description]
144+
* @return {number} The area of the polygon.
145145
*/
146146
calculateArea: function ()
147147
{

src/geom/rectangle/ContainsPoint.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
var Contains = require('./Contains');
88

99
/**
10-
* [description]
10+
* Determines whether the specified point is contained within the rectangular region defined by this Rectangle object.
1111
*
1212
* @function Phaser.Geom.Rectangle.ContainsPoint
1313
* @since 3.0.0
1414
*
15-
* @param {Phaser.Geom.Rectangle} rect - [description]
16-
* @param {Phaser.Geom.Point} point - [description]
15+
* @param {Phaser.Geom.Rectangle} rect - The Rectangle object.
16+
* @param {Phaser.Geom.Point} point - The point object to be checked. Can be a Phaser Point object or any object with x and y values.
1717
*
18-
* @return {boolean} [description]
18+
* @return {boolean} A value of true if the Rectangle object contains the specified point, otherwise false.
1919
*/
2020
var ContainsPoint = function (rect, point)
2121
{

src/geom/rectangle/Decompose.js

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

77
/**
8-
* [description]
8+
* Create an array of points for each corner of a Rectangle
9+
* If an array is specified, each point object will be added to the end of the array, otherwise a new array will be created.
910
*
1011
* @function Phaser.Geom.Rectangle.Decompose
1112
* @since 3.0.0
1213
*
13-
* @param {Phaser.Geom.Rectangle} rect - [description]
14-
* @param {array} [out] - [description]
14+
* @param {Phaser.Geom.Rectangle} rect - The Rectangle object to be decomposed.
15+
* @param {array} [out] - If provided, each point will be added to this array.
1516
*
16-
* @return {array} [description]
17+
* @return {array} Will return the array you specified or a new array containing the points of the Rectangle.
1718
*/
1819
var Decompose = function (rect, out)
1920
{

0 commit comments

Comments
 (0)