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: src/gameobjects/particles/GravityWell.js
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,11 @@ var GetFastValue = require('../../utils/object/GetFastValue');
19
19
20
20
/**
21
21
* @classdesc
22
-
* [description]
22
+
* The GravityWell action applies a force on the particle to draw it towards, or repel it from, a single point.
23
+
*
24
+
* The force applied is inversely proportional to the square of the distance from the particle to the point, in accordance with Newton's law of gravity.
25
+
*
26
+
* This simulates the effect of gravity over large distances (as between planets, for example).
23
27
*
24
28
* @class GravityWell
25
29
* @memberof Phaser.GameObjects.Particles
@@ -28,8 +32,8 @@ var GetFastValue = require('../../utils/object/GetFastValue');
28
32
*
29
33
* @param {(number|GravityWellConfig)} [x=0] - The x coordinate of the Gravity Well, in world space.
30
34
* @param {number} [y=0] - The y coordinate of the Gravity Well, in world space.
31
-
* @param {number} [power=0] - The power of the Gravity Well.
32
-
* @param {number} [epsilon=100] - [description]
35
+
* @param {number} [power=0] - The strength of the gravity force - larger numbers produce a stronger force.
36
+
* @param {number} [epsilon=100] - The minimum distance for which the gravity force is calculated.
33
37
* @param {number} [gravity=50] - The gravitational force of this Gravity Well.
34
38
*/
35
39
varGravityWell=newClass({
@@ -118,7 +122,7 @@ var GravityWell = new Class({
118
122
this._epsilon=0;
119
123
120
124
/**
121
-
* The power of the Gravity Well.
125
+
* The strength of the gravity force - larger numbers produce a stronger force.
0 commit comments