You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Thanks to the following for helping with the Phaser 3 Examples and TypeScript de
36
36
37
37
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:
Copy file name to clipboardExpand all lines: src/geom/rectangle/Inflate.js
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,22 @@
6
6
7
7
varCenterOn=require('./CenterOn');
8
8
9
-
// Increases the size of the Rectangle object by the specified amounts.
10
-
// The center point of the Rectangle object stays the same, and its size increases
11
-
// to the left and right by the x value, and to the top and the bottom by the y value.
12
9
13
10
/**
14
-
* [description]
11
+
* Increases the size of a Rectangle by a specified amount.
12
+
*
13
+
* The center of the Rectangle stays the same. The amounts are added to each side, so the actual increase in width or height is two times bigger than the respective argument.
15
14
*
16
15
* @function Phaser.Geom.Rectangle.Inflate
17
16
* @since 3.0.0
18
17
*
19
18
* @generic {Phaser.Geom.Rectangle} O - [rect,$return]
20
19
*
21
-
* @param {Phaser.Geom.Rectangle} rect - [description]
22
-
* @param {number} x - [description]
23
-
* @param {number} y - [description]
20
+
* @param {Phaser.Geom.Rectangle} rect - The Rectangle to inflate.
21
+
* @param {number} x - How many pixels the left and the right side should be moved by horizontally.
22
+
* @param {number} y - How many pixels the top and the bottom side should be moved by vertically.
24
23
*
25
-
* @return {Phaser.Geom.Rectangle} [description]
24
+
* @return {Phaser.Geom.Rectangle} The inflated Rectangle.
Copy file name to clipboardExpand all lines: src/physics/matter-js/Factory.js
+33-32Lines changed: 33 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,14 @@ var PointerConstraint = require('./PointerConstraint');
16
16
17
17
/**
18
18
* @classdesc
19
-
* [description]
19
+
* The Matter Factory can create different types of bodies and them to a physics world.
20
20
*
21
21
* @class Factory
22
22
* @memberof Phaser.Physics.Matter
23
23
* @constructor
24
24
* @since 3.0.0
25
25
*
26
-
* @param {Phaser.Physics.Matter.World} world - [description]
26
+
* @param {Phaser.Physics.Matter.World} world - The Matter World which this Factory adds to.
27
27
*/
28
28
varFactory=newClass({
29
29
@@ -32,7 +32,7 @@ var Factory = new Class({
32
32
functionFactory(world)
33
33
{
34
34
/**
35
-
* [description]
35
+
* The Matter World which this Factory adds to.
36
36
*
37
37
* @name Phaser.Physics.Matter.Factory#world
38
38
* @type {Phaser.Physics.Matter.World}
@@ -41,7 +41,7 @@ var Factory = new Class({
41
41
this.world=world;
42
42
43
43
/**
44
-
* [description]
44
+
* The Scene which this Factory's Matter World belongs to.
45
45
*
46
46
* @name Phaser.Physics.Matter.Factory#scene
47
47
* @type {Phaser.Scene}
@@ -60,16 +60,16 @@ var Factory = new Class({
60
60
},
61
61
62
62
/**
63
-
* [description]
63
+
* Creates a new rigid rectangular Body and adds it to the World.
64
64
*
65
65
* @method Phaser.Physics.Matter.Factory#rectangle
66
66
* @since 3.0.0
67
67
*
68
-
* @param {number} x - [description]
69
-
* @param {number} y - [description]
70
-
* @param {number} width - [description]
71
-
* @param {number} height - [description]
72
-
* @param {object} options - [description]
68
+
* @param {number} x - The X coordinate of the center of the Body.
69
+
* @param {number} y - The Y coordinate of the center of the Body.
70
+
* @param {number} width - The width of the Body.
71
+
* @param {number} height - The height of the Body.
72
+
* @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.
73
73
*
74
74
* @return {MatterJS.Body} A Matter JS Body.
75
75
*/
@@ -83,17 +83,17 @@ var Factory = new Class({
83
83
},
84
84
85
85
/**
86
-
* [description]
86
+
* Creates a new rigid trapezoidal Body and adds it to the World.
87
87
*
88
88
* @method Phaser.Physics.Matter.Factory#trapezoid
89
89
* @since 3.0.0
90
90
*
91
-
* @param {number} x - [description]
92
-
* @param {number} y - [description]
93
-
* @param {number} width - [description]
94
-
* @param {number} height - [description]
95
-
* @param {number} slope - [description]
96
-
* @param {object} options - [description]
91
+
* @param {number} x - The X coordinate of the center of the Body.
92
+
* @param {number} y - The Y coordinate of the center of the Body.
93
+
* @param {number} width - The width of the trapezoid of the Body.
94
+
* @param {number} height - The height of the trapezoid of the Body.
95
+
* @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.
96
+
* @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.
97
97
*
98
98
* @return {MatterJS.Body} A Matter JS Body.
99
99
*/
@@ -107,16 +107,16 @@ var Factory = new Class({
107
107
},
108
108
109
109
/**
110
-
* [description]
110
+
* Creates a new rigid circular Body and adds it to the World.
111
111
*
112
112
* @method Phaser.Physics.Matter.Factory#circle
113
113
* @since 3.0.0
114
114
*
115
-
* @param {number} x - [description]
116
-
* @param {number} y - [description]
117
-
* @param {number} radius - [description]
118
-
* @param {object} options - [description]
119
-
* @param {number} maxSides - [description]
115
+
* @param {number} x - The X coordinate of the center of the Body.
116
+
* @param {number} y - The Y coordinate of the center of the Body.
117
+
* @param {number} radius - The radius of the circle.
118
+
* @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.
119
+
* @param {number} maxSides - The maximum amount of sides to use for the polygon which will approximate this circle.
120
120
*
121
121
* @return {MatterJS.Body} A Matter JS Body.
122
122
*/
@@ -130,16 +130,16 @@ var Factory = new Class({
130
130
},
131
131
132
132
/**
133
-
* [description]
133
+
* Creates a new rigid polygonal Body and adds it to the World.
134
134
*
135
135
* @method Phaser.Physics.Matter.Factory#polygon
136
136
* @since 3.0.0
137
137
*
138
-
* @param {number} x - [description]
139
-
* @param {number} y - [description]
140
-
* @param {number} sides - [description]
141
-
* @param {number} radius - [description]
142
-
* @param {object} options - [description]
138
+
* @param {number} x - The X coordinate of the center of the Body.
139
+
* @param {number} y - The Y coordinate of the center of the Body.
140
+
* @param {number} sides - The number of sides the polygon will have.
141
+
* @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.
142
+
* @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.
143
143
*
144
144
* @return {MatterJS.Body} A Matter JS Body.
145
145
*/
@@ -153,13 +153,14 @@ var Factory = new Class({
153
153
},
154
154
155
155
/**
156
-
* [description]
156
+
* Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World.
157
+
* If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes.
0 commit comments