| Package | org.flintparticles.threeD.actions |
| Class | public class MutualGravity |
| Inheritance | MutualGravity ActionBase Object |
This action has a priority of 10, so that it executes before other actions.
| Property | Defined By | ||
|---|---|---|---|
| epsilon : Number
The minimum distance for which the gravity force is calculated. | MutualGravity | ||
| maxDistance : Number
The maximum distance between particles for the gravitational
effect to be calculated. | MutualGravity | ||
| power : Number
The strength of the gravity force. | MutualGravity | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| Method | Defined By | ||
|---|---|---|---|
MutualGravity(power:Number = 0, maxDistance:Number = 0, epsilon:Number = 1)
The constructor creates a MutualGravity action for use by
an emitter. | MutualGravity | ||
addedToEmitter(emitter:Emitter):void [override]
This method does nothing. | MutualGravity | ||
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
This method does nothing. | MutualGravity | ||
| 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| maxDistance | property |
maxDistance:NumberThe maximum distance between particles for the gravitational effect to be calculated. You can speed up this action by reducing the maxDistance since often only the closest other particles have a significant effect on the motion of a particle.
public function get maxDistance():Number public function set maxDistance(value:Number):void| power | property |
power:NumberThe strength of the gravity force.
public function get power():Number public function set power(value:Number):void| MutualGravity | () | Constructor |
public function MutualGravity(power:Number = 0, maxDistance:Number = 0, epsilon:Number = 1)The constructor creates a MutualGravity action for use by an emitter. To add a MutualGravity to all particles created by an emitter, use the emitter's addAction method.
Parameterspower:Number (default = 0) — The strength of the gravitational pull between the particles.
| |
maxDistance:Number (default = 0) — The maximum distance between particles for the gravitational
effect to be calculated. You can speed up this action by reducing the maxDistance
since often only the closest other particles have a significant effect on the
motion of a particle.
| |
epsilon:Number (default = 1) |
See also
| addedToEmitter | () | method |
override public function addedToEmitter(emitter:Emitter):voidThis method does nothing. Some derived classes override this method to perform actions when the action is added to an emitter.
Parameters
emitter:Emitter — The Emitter that the Action was added to.
|
| 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.
|