Packageorg.flintparticles.twoD.actions
Classpublic class RotationalFriction
InheritanceRotationalFriction Inheritance ActionBase Inheritance Object

The RotationalFriction action applies friction to the particle's rotational movement to slow it down when it's rotating. The frictional force is constant, irrespective of how fast the particle is rotating. For forces proportional to the particle's angular velocity, use one of the rotational drag effects - RotationalLinearDrag and RotationalQuadraticDrag.

See also

RotationalLinearDrag
RotationalQuadraticDrag


Public Properties
 PropertyDefined By
  friction : Number
The amount of friction.
RotationalFriction
 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
  
RotationalFriction(friction:Number = 0)
The constructor creates a RotationalFriction action for use by an emitter.
RotationalFriction
 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 effect of the friction on the particle over the period of time indicated and adjusts the particle's angular velocity accordingly.
RotationalFriction
Property Detail
frictionproperty
friction:Number

The amount of friction. A higher number produces a stronger frictional force.


Implementation
    public function get friction():Number
    public function set friction(value:Number):void
Constructor Detail
RotationalFriction()Constructor
public function RotationalFriction(friction:Number = 0)

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

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

See also

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

Calculates the effect of the friction on the particle over the period of time indicated and adjusts the particle's angular velocity accordingly.

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