| Package | org.flintparticles.twoD.actions |
| Class | public class AntiGravity |
| Inheritance | AntiGravity GravityWell ActionBase Object |
This is the same as the GravityWell action with a negative force.
See also
| Property | Defined By | ||
|---|---|---|---|
![]() | epsilon : Number
The minimum distance for which the gravity force is calculated. | GravityWell | |
| power : Number [override]
The strength of the anti-gravity force - larger numbers produce a
stronger force. | AntiGravity | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
![]() | x : Number
The x coordinate of the point towards which the force draws
the particles. | GravityWell | |
![]() | y : Number
The y coordinate of the point towards which the force draws
the particles. | GravityWell | |
| Method | Defined By | ||
|---|---|---|---|
AntiGravity(power:Number = 0, x:Number = 0, y:Number = 0, epsilon:Number = 1)
The constructor creates an AntiGravity action for use by an emitter. | AntiGravity | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | [override]
Calculates the gravity force on the particle and applies it for
the period of time indicated. | GravityWell | |
| power | property |
power:Number[override] The strength of the anti-gravity force - larger numbers produce a stronger force.
public function get power():Number public function set power(value:Number):void| AntiGravity | () | Constructor |
public function AntiGravity(power:Number = 0, x:Number = 0, y:Number = 0, epsilon:Number = 1)The constructor creates an AntiGravity action for use by an emitter. To add an AntiGravity to all particles created by an emitter, use the emitter's addAction method.
Parameterspower:Number (default = 0) — The strength of the force - larger numbers produce a
stronger force.
| |
x:Number (default = 0) — The x coordinate of the point away from which the force pushes
the particles.
| |
y:Number (default = 0) — The y coordinate of the point away from which the force pushes
the particles.
| |
epsilon:Number (default = 1) — The minimum distance for which the anti-gravity force is
calculated. Particles closer than this distance experience the
anti-gravity as if they were this distance away. This stops the
anti-gravity effect blowing up as distances get small.
|
See also