Skip to content

Commit af3c03a

Browse files
committed
Update JSDoc on "Arcade" physics
1 parent edeb63e commit af3c03a

17 files changed

Lines changed: 92 additions & 92 deletions

src/physics/arcade/ArcadePhysics.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ var ArcadePhysics = new Class({
188188
* @method Phaser.Physics.Arcade.ArcadePhysics#pause
189189
* @since 3.0.0
190190
*
191-
* @return {[type]} [description]
191+
* @return {Phaser.Physics.Arcade.World} [description]
192192
*/
193193
pause: function ()
194194
{
@@ -201,7 +201,7 @@ var ArcadePhysics = new Class({
201201
* @method Phaser.Physics.Arcade.ArcadePhysics#resume
202202
* @since 3.0.0
203203
*
204-
* @return {[type]} [description]
204+
* @return {Phaser.Physics.Arcade.World} [description]
205205
*/
206206
resume: function ()
207207
{
@@ -210,9 +210,9 @@ var ArcadePhysics = new Class({
210210

211211
/**
212212
* Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.)
213-
*
213+
*
214214
* You must give a maximum speed value, beyond which the game object won't go any faster.
215-
*
215+
*
216216
* Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.
217217
* Note: The game object doesn't stop moving once it reaches the destination coordinates.
218218
*
@@ -246,9 +246,9 @@ var ArcadePhysics = new Class({
246246

247247
/**
248248
* Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.)
249-
*
249+
*
250250
* You must give a maximum speed value, beyond which the game object won't go any faster.
251-
*
251+
*
252252
* Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.
253253
* Note: The game object doesn't stop moving once it reaches the destination coordinates.
254254
*

src/physics/arcade/Body.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ var Body = new Class({
315315
* [description]
316316
*
317317
* @name Phaser.Physics.Arcade.Body#worldBounce
318-
* @type {?[type]}
318+
* @type {?Phaser.Math.Vector2}
319319
* @default null
320320
* @since 3.0.0
321321
*/

src/physics/arcade/World.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ var World = new Class({
15311531
* @since 3.0.0
15321532
*
15331533
* @param {Phaser.GameObjects.Group} group - [description]
1534-
* @param {[type]} tilemapLayer - [description]
1534+
* @param {Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} tilemapLayer - [description]
15351535
* @param {function} collideCallback - [description]
15361536
* @param {function} processCallback - [description]
15371537
* @param {object} callbackContext - [description]
@@ -1571,7 +1571,7 @@ var World = new Class({
15711571
* @since 3.0.0
15721572
*
15731573
* @param {Phaser.GameObjects.GameObject} sprite - [description]
1574-
* @param {[type]} tilemapLayer - [description]
1574+
* @param {Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} tilemapLayer - [description]
15751575
* @param {function} collideCallback - [description]
15761576
* @param {function} processCallback - [description]
15771577
* @param {object} callbackContext - [description]

src/physics/arcade/components/Acceleration.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ var Acceleration = {
1818
* @method Phaser.Physics.Arcade.Components.Acceleration#setAcceleration
1919
* @since 3.0.0
2020
*
21-
* @param {[type]} x - [description]
22-
* @param {[type]} y - [description]
21+
* @param {number} x - The horizontal acceleration
22+
* @param {number} [y=x] - The vertical acceleration
2323
*
24-
* @return {[type]} [description]
24+
* @return {Phaser.GameObjects.GameObject} This Game Object.
2525
*/
2626
setAcceleration: function (x, y)
2727
{
@@ -36,9 +36,9 @@ var Acceleration = {
3636
* @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationX
3737
* @since 3.0.0
3838
*
39-
* @param {[type]} value - [description]
39+
* @param {number} value - The horizontal acceleration
4040
*
41-
* @return {[type]} [description]
41+
* @return {Phaser.GameObjects.GameObject} This Game Object.
4242
*/
4343
setAccelerationX: function (value)
4444
{
@@ -53,9 +53,9 @@ var Acceleration = {
5353
* @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationY
5454
* @since 3.0.0
5555
*
56-
* @param {[type]} value - [description]
56+
* @param {number} value - The vertical acceleration
5757
*
58-
* @return {[type]} [description]
58+
* @return {Phaser.GameObjects.GameObject} This Game Object.
5959
*/
6060
setAccelerationY: function (value)
6161
{

src/physics/arcade/components/Angular.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ var Angular = {
1818
* @method Phaser.Physics.Arcade.Components.Angular#setAngularVelocity
1919
* @since 3.0.0
2020
*
21-
* @param {[type]} value - [description]
21+
* @param {number} value - [description]
2222
*
23-
* @return {[type]} [description]
23+
* @return {Phaser.GameObjects.GameObject} This Game Object.
2424
*/
2525
setAngularVelocity: function (value)
2626
{
@@ -35,9 +35,9 @@ var Angular = {
3535
* @method Phaser.Physics.Arcade.Components.Angular#setAngularAcceleration
3636
* @since 3.0.0
3737
*
38-
* @param {[type]} value - [description]
38+
* @param {number} value - [description]
3939
*
40-
* @return {[type]} [description]
40+
* @return {Phaser.GameObjects.GameObject} This Game Object.
4141
*/
4242
setAngularAcceleration: function (value)
4343
{
@@ -52,9 +52,9 @@ var Angular = {
5252
* @method Phaser.Physics.Arcade.Components.Angular#setAngularDrag
5353
* @since 3.0.0
5454
*
55-
* @param {[type]} value - [description]
55+
* @param {number} value - [description]
5656
*
57-
* @return {[type]} [description]
57+
* @return {Phaser.GameObjects.GameObject} This Game Object.
5858
*/
5959
setAngularDrag: function (value)
6060
{

src/physics/arcade/components/Bounce.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ var Bounce = {
1818
* @method Phaser.Physics.Arcade.Components.Bounce#setBounce
1919
* @since 3.0.0
2020
*
21-
* @param {[type]} x - [description]
22-
* @param {[type]} y - [description]
21+
* @param {number} x - [description]
22+
* @param {number} [y=x] - [description]
2323
*
24-
* @return {[type]} [description]
24+
* @return {Phaser.GameObjects.GameObject} This Game Object.
2525
*/
2626
setBounce: function (x, y)
2727
{
@@ -36,9 +36,9 @@ var Bounce = {
3636
* @method Phaser.Physics.Arcade.Components.Bounce#setBounceX
3737
* @since 3.0.0
3838
*
39-
* @param {[type]} value - [description]
39+
* @param {number} value - [description]
4040
*
41-
* @return {[type]} [description]
41+
* @return {Phaser.GameObjects.GameObject} This Game Object.
4242
*/
4343
setBounceX: function (value)
4444
{
@@ -53,9 +53,9 @@ var Bounce = {
5353
* @method Phaser.Physics.Arcade.Components.Bounce#setBounceY
5454
* @since 3.0.0
5555
*
56-
* @param {[type]} value - [description]
56+
* @param {number} value - [description]
5757
*
58-
* @return {[type]} [description]
58+
* @return {Phaser.GameObjects.GameObject} This Game Object.
5959
*/
6060
setBounceY: function (value)
6161
{
@@ -70,9 +70,9 @@ var Bounce = {
7070
* @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds
7171
* @since 3.0.0
7272
*
73-
* @param {[type]} value - [description]
73+
* @param {number} value - [description]
7474
*
75-
* @return {[type]} [description]
75+
* @return {Phaser.GameObjects.GameObject} This Game Object.
7676
*/
7777
setCollideWorldBounds: function (value)
7878
{

src/physics/arcade/components/Debug.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ var Debug = {
1818
* @method Phaser.Physics.Arcade.Components.Debug#setDebug
1919
* @since 3.0.0
2020
*
21-
* @param {[type]} showBody - [description]
22-
* @param {[type]} showVelocity - [description]
23-
* @param {[type]} bodyColor - [description]
21+
* @param {boolean} showBody - [description]
22+
* @param {boolean} showVelocity - [description]
23+
* @param {number} bodyColor - [description]
2424
*
25-
* @return {[type]} [description]
25+
* @return {Phaser.GameObjects.GameObject} This Game Object.
2626
*/
2727
setDebug: function (showBody, showVelocity, bodyColor)
2828
{
@@ -39,9 +39,9 @@ var Debug = {
3939
* @method Phaser.Physics.Arcade.Components.Debug#setDebugBodyColor
4040
* @since 3.0.0
4141
*
42-
* @param {[type]} value - [description]
42+
* @param {number} value - [description]
4343
*
44-
* @return {[type]} [description]
44+
* @return {Phaser.GameObjects.GameObject} This Game Object.
4545
*/
4646
setDebugBodyColor: function (value)
4747
{
@@ -54,7 +54,7 @@ var Debug = {
5454
* [description]
5555
*
5656
* @name Phaser.Physics.Arcade.Components.Debug#debugShowBody
57-
* @type {[type]}
57+
* @type {boolean}
5858
* @since 3.0.0
5959
*/
6060
debugShowBody: {
@@ -75,7 +75,7 @@ var Debug = {
7575
* [description]
7676
*
7777
* @name Phaser.Physics.Arcade.Components.Debug#debugShowVelocity
78-
* @type {[type]}
78+
* @type {boolean}
7979
* @since 3.0.0
8080
*/
8181
debugShowVelocity: {
@@ -96,7 +96,7 @@ var Debug = {
9696
* [description]
9797
*
9898
* @name Phaser.Physics.Arcade.Components.Debug#debugBodyColor
99-
* @type {[type]}
99+
* @type {number}
100100
* @since 3.0.0
101101
*/
102102
debugBodyColor: {

src/physics/arcade/components/Drag.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ var Drag = {
1818
* @method Phaser.Physics.Arcade.Components.Drag#setDrag
1919
* @since 3.0.0
2020
*
21-
* @param {[type]} x - [description]
22-
* @param {[type]} y - [description]
21+
* @param {number} x - [description]
22+
* @param {number} [y=x] - [description]
2323
*
24-
* @return {[type]} [description]
24+
* @return {Phaser.GameObjects.GameObject} This Game Object.
2525
*/
2626
setDrag: function (x, y)
2727
{
@@ -36,9 +36,9 @@ var Drag = {
3636
* @method Phaser.Physics.Arcade.Components.Drag#setDragX
3737
* @since 3.0.0
3838
*
39-
* @param {[type]} value - [description]
39+
* @param {number} value - [description]
4040
*
41-
* @return {[type]} [description]
41+
* @return {Phaser.GameObjects.GameObject} This Game Object.
4242
*/
4343
setDragX: function (value)
4444
{
@@ -53,9 +53,9 @@ var Drag = {
5353
* @method Phaser.Physics.Arcade.Components.Drag#setDragY
5454
* @since 3.0.0
5555
*
56-
* @param {[type]} value - [description]
56+
* @param {number} value - [description]
5757
*
58-
* @return {[type]} [description]
58+
* @return {Phaser.GameObjects.GameObject} This Game Object.
5959
*/
6060
setDragY: function (value)
6161
{

src/physics/arcade/components/Friction.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ var Friction = {
1818
* @method Phaser.Physics.Arcade.Components.Friction#setFriction
1919
* @since 3.0.0
2020
*
21-
* @param {[type]} x - [description]
22-
* @param {[type]} y - [description]
21+
* @param {number} x - [description]
22+
* @param {number} [y=x] - [description]
2323
*
24-
* @return {[type]} [description]
24+
* @return {Phaser.GameObjects.GameObject} This Game Object.
2525
*/
2626
setFriction: function (x, y)
2727
{
@@ -36,9 +36,9 @@ var Friction = {
3636
* @method Phaser.Physics.Arcade.Components.Friction#setFrictionX
3737
* @since 3.0.0
3838
*
39-
* @param {[type]} x - [description]
39+
* @param {number} x - [description]
4040
*
41-
* @return {[type]} [description]
41+
* @return {Phaser.GameObjects.GameObject} This Game Object.
4242
*/
4343
setFrictionX: function (x)
4444
{
@@ -53,9 +53,9 @@ var Friction = {
5353
* @method Phaser.Physics.Arcade.Components.Friction#setFrictionY
5454
* @since 3.0.0
5555
*
56-
* @param {[type]} y - [description]
56+
* @param {number} y - [description]
5757
*
58-
* @return {[type]} [description]
58+
* @return {Phaser.GameObjects.GameObject} This Game Object.
5959
*/
6060
setFrictionY: function (y)
6161
{

src/physics/arcade/components/Gravity.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ var Gravity = {
1818
* @method Phaser.Physics.Arcade.Components.Gravity#setGravity
1919
* @since 3.0.0
2020
*
21-
* @param {[type]} x - [description]
22-
* @param {[type]} y - [description]
21+
* @param {number} x - [description]
22+
* @param {number} [y=x] - [description]
2323
*
24-
* @return {[type]} [description]
24+
* @return {Phaser.GameObjects.GameObject} This Game Object.
2525
*/
2626
setGravity: function (x, y)
2727
{
@@ -36,9 +36,9 @@ var Gravity = {
3636
* @method Phaser.Physics.Arcade.Components.Gravity#setGravityX
3737
* @since 3.0.0
3838
*
39-
* @param {[type]} x - [description]
39+
* @param {number} x - [description]
4040
*
41-
* @return {[type]} [description]
41+
* @return {Phaser.GameObjects.GameObject} This Game Object.
4242
*/
4343
setGravityX: function (x)
4444
{
@@ -53,9 +53,9 @@ var Gravity = {
5353
* @method Phaser.Physics.Arcade.Components.Gravity#setGravityY
5454
* @since 3.0.0
5555
*
56-
* @param {[type]} y - [description]
56+
* @param {number} y - [description]
5757
*
58-
* @return {[type]} [description]
58+
* @return {Phaser.GameObjects.GameObject} This Game Object.
5959
*/
6060
setGravityY: function (y)
6161
{

0 commit comments

Comments
 (0)