Skip to content

Commit 38cacfd

Browse files
committed
Added new jsdocs
1 parent b687f05 commit 38cacfd

5 files changed

Lines changed: 20 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ Nathaniel Foldan
103103
Peter Pedersen
104104
rootasjey
105105
Sam Frantz
106+
SBCGames
106107
snowbillr
107108
Stephen Hamilton
108109
STuFF

src/actions/SetTint.js

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

77
/**
8-
* [description]
8+
* Takes an array of Game Objects, or any objects that have the public method setTint() and then updates it to the given value(s). You can specify tint color per corner or provide only one color value for `topLeft` parameter, in which case whole item will be tinted with that color.
99
*
1010
* @function Phaser.Actions.SetTint
1111
* @since 3.0.0
1212
*
1313
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
1414
*
1515
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
16-
* @param {number} topLeft - [description]
17-
* @param {number} [topRight] - [description]
18-
* @param {number} [bottomLeft] - [description]
19-
* @param {number} [bottomRight] - [description]
16+
* @param {number} topLeft - The tint being applied to top-left corner of item. If other parameters are given no value, this tint will be applied to whole item.
17+
* @param {number} [topRight] - The tint to be applied to top-right corner of item.
18+
* @param {number} [bottomLeft] - The tint to be applied to the bottom-left corner of item.
19+
* @param {number} [bottomRight] - The tint to be applied to the bottom-right corner of item.
2020
*
2121
* @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
2222
*/

src/geom/intersects/GetRectangleIntersection.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,22 @@ var Rectangle = require('../rectangle/Rectangle');
88
var RectangleToRectangle = require('./RectangleToRectangle');
99

1010
/**
11-
* [description]
11+
* Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object.
12+
*
13+
* If optional `output` parameter is omitted, new Rectangle object is created and returned. If there is intersection, it will contain intersection area. If there is no intersection, it wil be empty Rectangle (all values set to zero).
14+
*
15+
* If Rectangle object is passed as `output` and there is intersection, then intersection area data will be loaded into it and it will be returned. If there is no intersetion, it will be returned without any change.
1216
*
1317
* @function Phaser.Geom.Intersects.GetRectangleIntersection
1418
* @since 3.0.0
1519
*
1620
* @generic {Phaser.Geom.Rectangle} O - [output,$return]
1721
*
18-
* @param {Phaser.Geom.Rectangle} rectA - [description]
19-
* @param {Phaser.Geom.Rectangle} rectB - [description]
20-
* @param {Phaser.Geom.Rectangle} [output] - [description]
22+
* @param {Phaser.Geom.Rectangle} rectA - The first Rectangle object.
23+
* @param {Phaser.Geom.Rectangle} rectB - The second Rectangle object.
24+
* @param {Phaser.Geom.Rectangle} [output] - Optional Rectangle object. If given, the intersection data will be loaded into it (in case of no intersection, it will be left unchanged). Otherwise, new Rectangle object will be created and returned with either intersection data or empty (all values set to zero), if there is no intersection.
2125
*
22-
* @return {Phaser.Geom.Rectangle} [description]
26+
* @return {Phaser.Geom.Rectangle} A rectangle object with intersection data.
2327
*/
2428
var GetRectangleIntersection = function (rectA, rectB, output)
2529
{

src/geom/intersects/RectangleToTriangle.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ var ContainsArray = require('../triangle/ContainsArray');
1010
var Decompose = require('../rectangle/Decompose');
1111

1212
/**
13-
* [description]
13+
* Checks for intersection between Rectangle shape and Triangle shape.
1414
*
1515
* @function Phaser.Geom.Intersects.RectangleToTriangle
1616
* @since 3.0.0
1717
*
18-
* @param {Phaser.Geom.Rectangle} rect - [description]
19-
* @param {Phaser.Geom.Triangle} triangle - [description]
18+
* @param {Phaser.Geom.Rectangle} rect - Rectangle object to test.
19+
* @param {Phaser.Geom.Triangle} triangle - Triangle object to test.
2020
*
21-
* @return {boolean} [description]
21+
* @return {boolean} A value of `true` if objects intersect; otherwise `false`.
2222
*/
2323
var RectangleToTriangle = function (rect, triangle)
2424
{

src/geom/point/Interpolate.js

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

99
/**
10-
* [description]
10+
* Interpolate two given Point objects, based on `t` value. Return result either as new Point if `out` parameter is omitted or load result into Point passed as `out` parameter and return it. For `out` parameter you can also use any object with public x/y properties.
1111
*
1212
* @function Phaser.Geom.Point.Interpolate
1313
* @since 3.0.0

0 commit comments

Comments
 (0)