| Package | org.flintparticles.twoD.actions |
| Class | public class MinimumDistance |
| Inheritance | MinimumDistance ActionBase |
| Property | Defined by | ||
|---|---|---|---|
| acceleration : Number
The acceleration force applied to avoid the other particles.
| MinimumDistance | ||
| minimum : Number
The minimum distance, in pixels, that this action maintains between
particles.
| MinimumDistance | ||
| Method | Defined by | ||
|---|---|---|---|
|
MinimumDistance(minimum:Number, acceleration:Number)
The constructor creates a ApproachNeighbours action for use by an emitter.
| MinimumDistance | ||
|
addedToEmitter(emitter:Emitter):void
Instructs the emitter to produce a sorted particle array for optimizing
the calculations in the update method of this action.
| MinimumDistance | ||
|
getDefaultPriority():Number
Returns a value of 10, so that the MinimumDistance action executes
before accelerating actions that act on particles independently of
other particles, like Acceleration and GravityWell.
| MinimumDistance | ||
![]() |
removedFromEmitter(emitter:Emitter):void
This method does nothing.
| ActionBase | |
|
Checks for particles closer than the minimum distance to the current
particle and if any are found applies the acceleration to move the
particles apart.
| MinimumDistance | ||
| acceleration | property |
acceleration:Number [read-write]The acceleration force applied to avoid the other particles.
Implementation public function get acceleration():Number
public function set acceleration(value:Number):void
| minimum | property |
minimum:Number [read-write]The minimum distance, in pixels, that this action maintains between particles.
Implementation public function get minimum():Number
public function set minimum(value:Number):void
| MinimumDistance | () | constructor |
public function MinimumDistance(minimum:Number, acceleration:Number)The constructor creates a ApproachNeighbours action for use by an emitter. To add a ApproachNeighbours to all particles created by an emitter, use the emitter's addAction method.
Parametersminimum:Number — The minimum distance, in pixels, that this action
maintains between particles.
|
|
acceleration:Number — The acceleration force applied to avoid the
other particles.
|
See also
| addedToEmitter | () | method |
public override function addedToEmitter(emitter:Emitter):voidInstructs the emitter to produce a sorted particle array for optimizing the calculations in the update method of this action.
Parametersemitter:Emitter — The emitter this action has been added to.
|
See also
| getDefaultPriority | () | method |
public override function getDefaultPriority():NumberReturns a value of 10, so that the MinimumDistance action executes before accelerating actions that act on particles independently of other particles, like Acceleration and GravityWell.
ReturnsNumber |
See also
| update | () | method |
public override function update(emitter:Emitter, particle:Particle, time:Number):voidChecks for particles closer than the minimum distance to the current particle and if any are found applies the acceleration to move the particles apart.
This method is called by the emitter and need not be called by the user.
Parametersemitter: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.
|
See also