Packageorg.flintparticles.threeD.actions
Classpublic class AntiGravity
InheritanceAntiGravity Inheritance GravityWell Inheritance ActionBase Inheritance Object

The AntiGravity action applies a force to the particle to push it away from a single point - the center of the effect. The force applied is inversely proportional to the square of the distance from the particle to the point.



Public Properties
 PropertyDefined By
 Inheritedepsilon : Number
The minimum distance for which the gravity force is calculated.
GravityWell
 Inheritedposition : Vector3D
The x coordinate of the center of the gravity force.
GravityWell
  power : Number
[override] The strength of the anti-gravity force - larger numbers produce a stronger force.
AntiGravity
 Inheritedpriority : int
Returns a default priority of 0 for this action.
ActionBase
 Inheritedx : Number
The x coordinate of the point that the force pulls the particles towards.
GravityWell
 Inheritedy : Number
The y coordinate of the point that the force pulls the particles towards.
GravityWell
 Inheritedz : Number
The z coordinate of the point that the force pulls the particles towards.
GravityWell
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
AntiGravity(power:Number = 0, position:Vector3D = null, epsilon:Number = 1)
The constructor creates an AntiGravity action for use by an emitter.
AntiGravity
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActionBase
 Inherited
This method does nothing.
ActionBase
 Inherited
update(emitter:Emitter, particle:Particle, time:Number):void
[override] This method does nothing.
GravityWell
Property Detail
powerproperty
power:Number[override]

The strength of the anti-gravity force - larger numbers produce a stronger force.


Implementation
    public function get power():Number
    public function set power(value:Number):void
Constructor Detail
AntiGravity()Constructor
public function AntiGravity(power:Number = 0, position:Vector3D = null, 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.

Parameters
power:Number (default = 0) — The strength of the force - larger numbers produce a stronger force.
 
position:Vector3D (default = null) — The point in 3D space that the force pushes the particles away from.
 
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 it they were this distance away. This stops the anti-gravity effect blowing up as distances get very small.

See also