Skip to content

Commit 5a4d1e5

Browse files
committed
Merge branch 'master' of https://github.com/photonstorm/phaser
2 parents 818a280 + 534814a commit 5a4d1e5

2 files changed

Lines changed: 18 additions & 17 deletions

File tree

src/physics/matter-js/components/Force.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@
77
var Body = require('../lib/body/Body');
88

99
/**
10-
* [description]
10+
* A component to apply force to Matter.js bodies.
1111
*
1212
* @name Phaser.Physics.Matter.Components.Force
1313
* @since 3.0.0
1414
*/
1515
var Force = {
1616

1717
// force = vec2 / point
18+
1819
/**
19-
* [description]
20+
* Applies a force to a body.
2021
*
2122
* @method Phaser.Physics.Matter.Components.Force#applyForce
2223
* @since 3.0.0
2324
*
24-
* @param {Phaser.Math.Vector2} force - [description]
25+
* @param {Phaser.Math.Vector2} force - A Vector that specifies the force to apply.
2526
*
2627
* @return {Phaser.GameObjects.GameObject} This Game Object.
2728
*/
@@ -35,13 +36,13 @@ var Force = {
3536
},
3637

3738
/**
38-
* [description]
39+
* Applies a force to a body from a given position.
3940
*
4041
* @method Phaser.Physics.Matter.Components.Force#applyForceFrom
4142
* @since 3.0.0
4243
*
43-
* @param {Phaser.Math.Vector2} position - [description]
44-
* @param {Phaser.Math.Vector2} force - [description]
44+
* @param {Phaser.Math.Vector2} position - The position in which the force comes from.
45+
* @param {Phaser.Math.Vector2} force - A Vector that specifies the force to apply.
4546
*
4647
* @return {Phaser.GameObjects.GameObject} This Game Object.
4748
*/
@@ -53,12 +54,12 @@ var Force = {
5354
},
5455

5556
/**
56-
* [description]
57+
* Apply thrust to the forward position of the body.
5758
*
5859
* @method Phaser.Physics.Matter.Components.Force#thrust
5960
* @since 3.0.0
6061
*
61-
* @param {number} speed - [description]
62+
* @param {number} speed - A speed value to be applied to a directional force.
6263
*
6364
* @return {Phaser.GameObjects.GameObject} This Game Object.
6465
*/
@@ -74,12 +75,12 @@ var Force = {
7475
},
7576

7677
/**
77-
* [description]
78+
* Apply thrust to the left position of the body.
7879
*
7980
* @method Phaser.Physics.Matter.Components.Force#thrustLeft
8081
* @since 3.0.0
8182
*
82-
* @param {number} speed - [description]
83+
* @param {number} speed - A speed value to be applied to a directional force.
8384
*
8485
* @return {Phaser.GameObjects.GameObject} This Game Object.
8586
*/
@@ -95,12 +96,12 @@ var Force = {
9596
},
9697

9798
/**
98-
* [description]
99+
* Apply thrust to the right position of the body.
99100
*
100101
* @method Phaser.Physics.Matter.Components.Force#thrustRight
101102
* @since 3.0.0
102103
*
103-
* @param {number} speed - [description]
104+
* @param {number} speed - A speed value to be applied to a directional force.
104105
*
105106
* @return {Phaser.GameObjects.GameObject} This Game Object.
106107
*/
@@ -116,12 +117,12 @@ var Force = {
116117
},
117118

118119
/**
119-
* [description]
120+
* Apply thrust to the back position of the body.
120121
*
121122
* @method Phaser.Physics.Matter.Components.Force#thrustBack
122123
* @since 3.0.0
123124
*
124-
* @param {number} speed - [description]
125+
* @param {number} speed - A speed value to be applied to a directional force.
125126
*
126127
* @return {Phaser.GameObjects.GameObject} This Game Object.
127128
*/

src/physics/matter-js/components/Gravity.js

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

77
/**
8-
* [description]
8+
* A component to manipulate world gravity for Matter.js bodies.
99
*
1010
* @name Phaser.Physics.Matter.Components.Gravity
1111
* @since 3.0.0
1212
*/
1313
var Gravity = {
1414

1515
/**
16-
* [description]
16+
* A togglable function for ignoring world gravity in real-time on the current body.
1717
*
1818
* @method Phaser.Physics.Matter.Components.Gravity#setIgnoreGravity
1919
* @since 3.0.0
2020
*
21-
* @param {boolean} value - [description]
21+
* @param {boolean} value - Set to true to ignore the effect of world gravity, or false to not ignore it.
2222
*
2323
* @return {Phaser.GameObjects.GameObject} This Game Object.
2424
*/

0 commit comments

Comments
 (0)