| Package | org.flintparticles.threeD.actions |
| Class | public class GravityWell |
| Inheritance | GravityWell ActionBase Object |
| Subclasses | AntiGravity |
| Property | Defined By | ||
|---|---|---|---|
| epsilon : Number
The minimum distance for which the gravity force is calculated. | GravityWell | ||
| position : Vector3D
The x coordinate of the center of the gravity force. | GravityWell | ||
| power : Number
The strength of the gravity force. | GravityWell | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| x : Number
The x coordinate of the point that the force pulls the particles towards. | GravityWell | ||
| y : Number
The y coordinate of the point that the force pulls the particles towards. | GravityWell | ||
| z : Number
The z coordinate of the point that the force pulls the particles towards. | GravityWell | ||
| Method | Defined By | ||
|---|---|---|---|
GravityWell(power:Number = 0, position:Vector3D = null, epsilon:Number = 100)
The constructor creates a GravityWell action for use by
an emitter. | GravityWell | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
This method does nothing. | GravityWell | ||
| epsilon | property |
epsilon:NumberThe minimum distance for which the gravity force is calculated. Particles closer than this distance experience the gravity as it they were this distance away. This stops the gravity effect blowing up as distances get small.
public function get epsilon():Number public function set epsilon(value:Number):void| position | property |
position:Vector3DThe x coordinate of the center of the gravity force.
public function get position():Vector3D public function set position(value:Vector3D):void| power | property |
power:NumberThe strength of the gravity force.
public function get power():Number public function set power(value:Number):void| x | property |
x:NumberThe x coordinate of the point that the force pulls the particles towards.
public function get x():Number public function set x(value:Number):void| y | property |
y:NumberThe y coordinate of the point that the force pulls the particles towards.
public function get y():Number public function set y(value:Number):void| z | property |
z:NumberThe z coordinate of the point that the force pulls the particles towards.
public function get z():Number public function set z(value:Number):void| GravityWell | () | Constructor |
public function GravityWell(power:Number = 0, position:Vector3D = null, epsilon:Number = 100)The constructor creates a GravityWell action for use by an emitter. To add a GravityWell 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 stringer force.
| |
position:Vector3D (default = null) — The point towards which the force draws the particles.
| |
epsilon:Number (default = 100) — The minimum distance for which gravity is calculated. Particles closer
than this distance experience a gravity force as it they were this distance away.
This stops the gravity effect blowing up as distances get small. For realistic gravity
effects you will want a small epsilon ( ~1 ), but for stable visual effects a larger
epsilon (~100) is often better.
|
See also
| update | () | method |
override public function update(emitter:Emitter, particle:Particle, time:Number):voidThis method does nothing. All derived classes override this method to update each particle every frame.
Parameters
emitter:Emitter — The Emitter that created the particle.
| |
particle:Particle — The particle to be updated.
| |
time:Number — The duration of the frame - used for time based updates.
|