Packageorg.flintparticles.threeD.actions
Classpublic class RandomDrift
InheritanceRandomDrift Inheritance ActionBase Inheritance Object

The RandomDrift action moves the particle by a random small amount every frame, causing the particle to drift around.



Public Properties
 PropertyDefined By
  driftX : Number
The maximum amount of horizontal drift in pixels per second.
RandomDrift
  driftY : Number
The maximum amount of vertical drift in pixels per second.
RandomDrift
  driftZ : Number
The maximum amount of vertical drift in pixels per second.
RandomDrift
 Inheritedpriority : int
Returns a default priority of 0 for this action.
ActionBase
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
RandomDrift(driftX:Number = 0, driftY:Number = 0, driftZ:Number = 0)
The constructor creates a RandomDrift action for use by an emitter.
RandomDrift
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActionBase
 Inherited
This method does nothing.
ActionBase
  
update(emitter:Emitter, particle:Particle, time:Number):void
[override] This method does nothing.
RandomDrift
Property Detail
driftXproperty
driftX:Number

The maximum amount of horizontal drift in pixels per second.


Implementation
    public function get driftX():Number
    public function set driftX(value:Number):void
driftYproperty 
driftY:Number

The maximum amount of vertical drift in pixels per second.


Implementation
    public function get driftY():Number
    public function set driftY(value:Number):void
driftZproperty 
driftZ:Number

The maximum amount of vertical drift in pixels per second.


Implementation
    public function get driftZ():Number
    public function set driftZ(value:Number):void
Constructor Detail
RandomDrift()Constructor
public function RandomDrift(driftX:Number = 0, driftY:Number = 0, driftZ:Number = 0)

The constructor creates a RandomDrift action for use by an emitter. To add a RandomDrift to all particles created by an emitter, use the emitter's addAction method.

Parameters
driftX:Number (default = 0) — The maximum amount of horizontal drift in pixels per second.
 
driftY:Number (default = 0) — The maximum amount of vertical drift in pixels per second.
 
driftZ:Number (default = 0)

See also

Method Detail
update()method
override public function update(emitter:Emitter, particle:Particle, time:Number):void

This 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.