| Package | org.flintparticles.threeD.actions |
| Class | public class ApproachNeighbours |
| Inheritance | ApproachNeighbours ActionBase Object |
This action has a priority of 10, so that it executes before other actions.
| Property | Defined By | ||
|---|---|---|---|
| acceleration : Number
The acceleration force applied to approach the other particles. | ApproachNeighbours | ||
| maxDistance : Number
The maximum distance, in pixels, over which this action operates. | ApproachNeighbours | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| Method | Defined By | ||
|---|---|---|---|
ApproachNeighbours(maxDistance:Number = 0, acceleration:Number = 0)
The constructor creates a ApproachNeighbours action for use by an emitter. | ApproachNeighbours | ||
addedToEmitter(emitter:Emitter):void [override]
This method does nothing. | ApproachNeighbours | ||
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
Causes the particle to check all nearby particles and move towards their
average position. | ApproachNeighbours | ||
| acceleration | property |
acceleration:NumberThe acceleration force applied to approach the other particles.
public function get acceleration():Number public function set acceleration(value:Number):void| maxDistance | property |
maxDistance:NumberThe maximum distance, in pixels, over which this action operates. Particles further away than this distance are ignored.
public function get maxDistance():Number public function set maxDistance(value:Number):void| ApproachNeighbours | () | Constructor |
public function ApproachNeighbours(maxDistance:Number = 0, acceleration:Number = 0)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.
ParametersmaxDistance:Number (default = 0) — The maximum distance, in pixels, over which this action
operates. Particles further away than this distance are ignored.
| |
acceleration:Number (default = 0) — The acceleration force applied to approach the other
particles.
|
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):voidCauses the particle to check all nearby particles and move towards their average position.
This method is called by the emitter and need not be called by the user
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.
|
See also