Skip to content

Commit 2780bab

Browse files
committed
Final Doc Jam merge
1 parent 6f8759c commit 2780bab

35 files changed

Lines changed: 248 additions & 173 deletions

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,9 @@ Thanks to the following for helping with the Phaser 3 Examples and TypeScript de
146146

147147
### Phaser Doc Jam
148148

149-
The [Phaser Doc Jam](http://docjam.phaser.io) is an on-going effort to ensure that the Phaser 3 API has 100% documentation coverage. Thanks to the monumental effort of myself and the following people we're now really close to that goal! My thanks to:
150-
151-
16patsle - @icbat - @gurungrahul2 - @samme - @telinc1 - anandu pavanan - blackhawx - candelibas - Diego Romero - Elliott Wallace - eric - Georges Gabereau - Haobo Zhang - henriacle - madclaws - marc136 - Mihail Ilinov - naum303 - NicolasRoehm - rejacobson - Robert Kowalski - rootasjey - scottwestover - stetso - therealsamf - Tigran - willblackmore - zenwaichi
149+
The Phaser Doc Jam was a community-backed effort to try and get the Phaser 3 API documentation to 100% coverage. The Doc Jam is now over and I offer my thanks to the following who helped with docs in this release:
152150

153-
If you'd like to help finish off the last parts of documentation then take a look at the [Doc Jam site](http://docjam.phaser.io).
151+
16patsle - @gurungrahul2 - @icbat - @samme - @telinc1 - anandu pavanan - blackhawx - candelibas - Diego Romero - doronlinder - Elliott Wallace - eric - Georges Gabereau - Haobo Zhang - henriacle - jak6jak - Jake Jensen - James Van Roose - JamesSkemp - joelahoover - Joey - madclaws - marc136 - Mihail Ilinov - naum303 - NicolasRoehm - nuane - rejacobson - Robert Kowalski - rodri042 - rootasjey - sawamara - scottwestover - sir13tommy - stetso - therealsamf - Tigran - willblackmore - zenwaichi
154152

155153
## Version 3.15.1 - Batou - 16th October 2018
156154

src/animations/AnimationManager.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ var AnimationManager = new Class({
421421
* @param {string} key - The key of the animation to load.
422422
* @param {(string|integer)} [startFrame] - The name of a start frame to set on the loaded animation.
423423
*
424-
* @return {Phaser.GameObjects.GameObject} [description]
424+
* @return {Phaser.GameObjects.GameObject} The Game Object with the animation loaded into it.
425425
*/
426426
load: function (child, key, startFrame)
427427
{
@@ -576,7 +576,7 @@ var AnimationManager = new Class({
576576
},
577577

578578
/**
579-
* [description]
579+
* Get the animation data as javascript object by giving key, or get the data of all animations as array of objects, if key wasn't provided.
580580
*
581581
* @method Phaser.Animations.AnimationManager#toJSON
582582
* @since 3.0.0
@@ -608,7 +608,8 @@ var AnimationManager = new Class({
608608
},
609609

610610
/**
611-
* [description]
611+
* Destroy this Animation Manager and clean up animation definitions and references to other objects.
612+
* This method should not be called directly. It will be called automatically as a response to a `destroy` event from the Phaser.Game instance.
612613
*
613614
* @method Phaser.Animations.AnimationManager#destroy
614615
* @since 3.0.0

src/curves/path/MoveTo.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ var Vector2 = require('../../math/Vector2');
99

1010
/**
1111
* @classdesc
12-
* [description]
12+
* A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path.
1313
*
1414
* @class MoveTo
1515
* @memberof Phaser.Curves
1616
* @constructor
1717
* @since 3.0.0
1818
*
19-
* @param {number} [x] - [description]
20-
* @param {number} [y] - [description]
19+
* @param {number} [x] - `x` pixel coordinate.
20+
* @param {number} [y] - `y` pixel coordinate.
2121
*/
2222
var MoveTo = new Class({
2323

@@ -28,7 +28,7 @@ var MoveTo = new Class({
2828
// Skip length calcs in paths
2929

3030
/**
31-
* [description]
31+
* Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors.
3232
*
3333
* @name Phaser.Curves.MoveTo#active
3434
* @type {boolean}
@@ -38,7 +38,7 @@ var MoveTo = new Class({
3838
this.active = false;
3939

4040
/**
41-
* [description]
41+
* The lone point which this curve consists of.
4242
*
4343
* @name Phaser.Curves.MoveTo#p0
4444
* @type {Phaser.Math.Vector2}
@@ -68,17 +68,17 @@ var MoveTo = new Class({
6868
},
6969

7070
/**
71-
* [description]
71+
* Retrieves the point at given position in the curve. This will always return this curve's only point.
7272
*
7373
* @method Phaser.Curves.MoveTo#getPointAt
7474
* @since 3.0.0
7575
*
7676
* @generic {Phaser.Math.Vector2} O - [out,$return]
7777
*
78-
* @param {number} u - [description]
79-
* @param {Phaser.Math.Vector2} [out] - [description]
78+
* @param {number} u - The position in the path to retrieve, between 0 and 1. Not used.
79+
* @param {Phaser.Math.Vector2} [out] - An optional vector in which to store the point.
8080
*
81-
* @return {Phaser.Math.Vector2} [description]
81+
* @return {Phaser.Math.Vector2} The modified `out` vector, or a new `Vector2` if none was provided.
8282
*/
8383
getPointAt: function (u, out)
8484
{
@@ -112,12 +112,12 @@ var MoveTo = new Class({
112112
},
113113

114114
/**
115-
* [description]
115+
* Converts this curve into a JSON-serializable object.
116116
*
117117
* @method Phaser.Curves.MoveTo#toJSON
118118
* @since 3.0.0
119119
*
120-
* @return {JSONCurve} [description]
120+
* @return {JSONCurve} A primitive object with the curve's type and only point.
121121
*/
122122
toJSON: function ()
123123
{

src/geom/line/NormalY.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ var MATH_CONST = require('../../math/const');
88
var Angle = require('./Angle');
99

1010
/**
11-
* [description]
11+
* The Y value of the normal of the given line.
12+
* The normal of a line is a vector that points perpendicular from it.
1213
*
1314
* @function Phaser.Geom.Line.NormalY
1415
* @since 3.0.0
1516
*
16-
* @param {Phaser.Geom.Line} line - [description]
17+
* @param {Phaser.Geom.Line} line - The line to calculate the normal of.
1718
*
18-
* @return {number} [description]
19+
* @return {number} The Y value of the normal of the Line.
1920
*/
2021
var NormalY = function (line)
2122
{

src/geom/point/GetCentroid.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
var Point = require('./Point');
88

99
/**
10-
* [description]
10+
* Get the centroid or geometric center of a plane figure (the arithmetic mean position of all the points in the figure).
11+
* Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin.
1112
*
1213
* @function Phaser.Geom.Point.GetCentroid
1314
* @since 3.0.0

src/geom/point/SetMagnitude.js

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

99
/**
10-
* [description]
10+
* Changes the magnitude (length) of a two-dimensional vector without changing its direction.
1111
*
1212
* @function Phaser.Geom.Point.SetMagnitude
1313
* @since 3.0.0
1414
*
1515
* @generic {Phaser.Geom.Point} O - [point,$return]
1616
*
17-
* @param {Phaser.Geom.Point} point - [description]
18-
* @param {number} magnitude - [description]
17+
* @param {Phaser.Geom.Point} point - The Point to treat as the end point of the vector.
18+
* @param {number} magnitude - The new magnitude of the vector.
1919
*
20-
* @return {Phaser.Geom.Point} [description]
20+
* @return {Phaser.Geom.Point} The modified Point.
2121
*/
2222
var SetMagnitude = function (point, magnitude)
2323
{

src/geom/polygon/Clone.js

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

99
/**
10-
* [description]
10+
* Create a new polygon which is a copy of the specified polygon
1111
*
1212
* @function Phaser.Geom.Polygon.Clone
1313
* @since 3.0.0
1414
*
15-
* @param {Phaser.Geom.Polygon} polygon - [description]
15+
* @param {Phaser.Geom.Polygon} polygon - The polygon to create a clone of
1616
*
17-
* @return {Phaser.Geom.Polygon} [description]
17+
* @return {Phaser.Geom.Polygon} A new separate Polygon cloned from the specified polygon, based on the same points.
1818
*/
1919
var Clone = function (polygon)
2020
{

src/geom/polygon/Polygon.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,26 @@ var GetPoints = require('./GetPoints');
1010

1111
/**
1212
* @classdesc
13-
* [description]
13+
* A Polygon object
14+
*
15+
16+
* The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points.
17+
* Several formats are supported to define the list of points, check the setTo method for details.
18+
* This is a geometry object allowing you to define and inspect the shape.
19+
* It is not a Game Object, in that you cannot add it to the display list, and it has no texture.
20+
* To render a Polygon you should look at the capabilities of the Graphics class.
1421
*
1522
* @class Polygon
1623
* @memberof Phaser.Geom
1724
* @constructor
1825
* @since 3.0.0
1926
*
20-
* @param {Phaser.Geom.Point[]} [points] - [description]
27+
* @param {Phaser.Geom.Point[]} [points] - List of points defining the perimeter of this Polygon. Several formats are supported:
28+
* - A string containing paired x y values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`
29+
* - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`
30+
* - An array of objects with public x y properties: `[obj1, obj2, ...]`
31+
* - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
32+
* - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`
2133
*/
2234
var Polygon = new Class({
2335

@@ -82,7 +94,7 @@ var Polygon = new Class({
8294
* @method Phaser.Geom.Polygon#setTo
8395
* @since 3.0.0
8496
*
85-
* @param {array} points - [description]
97+
* @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats.
8698
*
8799
* @return {Phaser.Geom.Polygon} This Polygon object.
88100
*/

src/geom/polygon/Reverse.js

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

77
/**
8-
* [description]
8+
* Reverses the order of the points of a Polygon.
99
*
1010
* @function Phaser.Geom.Polygon.Reverse
1111
* @since 3.0.0
1212
*
1313
* @generic {Phaser.Geom.Polygon} O - [polygon,$return]
1414
*
15-
* @param {Phaser.Geom.Polygon} polygon - [description]
15+
* @param {Phaser.Geom.Polygon} polygon - The Polygon to modify.
1616
*
17-
* @return {Phaser.Geom.Polygon} [description]
17+
* @return {Phaser.Geom.Polygon} The modified Polygon.
1818
*/
1919
var Reverse = function (polygon)
2020
{

src/geom/rectangle/Area.js

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

77
/**
8-
* [description]
8+
* Calculates the area of the given Rectangle object.
99
*
1010
* @function Phaser.Geom.Rectangle.Area
1111
* @since 3.0.0
1212
*
13-
* @param {Phaser.Geom.Rectangle} rect - [description]
13+
* @param {Phaser.Geom.Rectangle} rect - The rectangle to calculate the area of.
1414
*
15-
* @return {number} [description]
15+
* @return {number} The area of the Rectangle object.
1616
*/
1717
var Area = function (rect)
1818
{

0 commit comments

Comments
 (0)