Packageorg.flintparticles.twoD.actions
Classpublic class QuadraticDrag
InheritanceQuadraticDrag Inheritance ActionBase Inheritance Object

The QuadraticDrag action applies drag to the particle to slow it down when it's moving. The drag force is proportional to the square of the speed of the particle. For other types of drag see the LinerDrag and Friction actions.

See also

Friction
LinearDrag


Public Properties
 PropertyDefined By
  drag : Number
The amount of drag.
QuadraticDrag
 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
  
QuadraticDrag(drag:Number = 0)
The constructor creates a QuadraticDrag action for use by an emitter.
QuadraticDrag
 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] Calculates the drag on the particle and applies it for the period of time indicated.
QuadraticDrag
Property Detail
dragproperty
drag:Number

The amount of drag. A higher number produces a stronger drag force.


Implementation
    public function get drag():Number
    public function set drag(value:Number):void
Constructor Detail
QuadraticDrag()Constructor
public function QuadraticDrag(drag:Number = 0)

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

Parameters
drag:Number (default = 0) — The amount of drag. A higher number produces a stronger drag force.

See also

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

Calculates the drag on the particle and applies it for the period of time indicated.

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