Class: GravityWell

Phaser.GameObjects.Particles. GravityWell

[description]


new GravityWell( [x] [, y] [, power] [, epsilon] [, gravity])

Parameters:
Name Type Argument Default Description
x number | GravityWellConfig <optional>
0

The x coordinate of the Gravity Well, in world space.

y number <optional>
0

The y coordinate of the Gravity Well, in world space.

power number <optional>
0

The power of the Gravity Well.

epsilon number <optional>
100

[description]

gravity number <optional>
50

The gravitational force of this Gravity Well.

Since: 3.0.0
Source: src/gameobjects/particles/GravityWell.js (Line 20)

Members


active :boolean

The active state of the Gravity Well. An inactive Gravity Well will not influence any particles.

Type:
  • boolean
Since: 3.0.0
Default Value:
  • true
Source: src/gameobjects/particles/GravityWell.js (Line 78)

epsilon :number

[description]

Type:
  • number
Since: 3.0.0
Source: src/gameobjects/particles/GravityWell.js (Line 129)

power :number

The power of the Gravity Well.

Type:
  • number
Since: 3.0.0
Source: src/gameobjects/particles/GravityWell.js (Line 120)

x :number

The x coordinate of the Gravity Well, in world space.

Type:
  • number
Since: 3.0.0
Source: src/gameobjects/particles/GravityWell.js (Line 60)

y :number

The y coordinate of the Gravity Well, in world space.

Type:
  • number
Since: 3.0.0
Source: src/gameobjects/particles/GravityWell.js (Line 69)

Methods


update(particle, delta, step)

Takes a Particle and updates it based on the properties of this Gravity Well.

Parameters:
Name Type Description
particle Phaser.GameObjects.Particles.Particle

The Particle to update.

delta number

The delta time in ms.

step number

The delta value divided by 1000.

Since: 3.0.0
Source: src/gameobjects/particles/GravityWell.js (Line 139)