Packagecv.orion.filters
Classpublic class GravityFilter
ImplementsIFilter

The GravityFilter causes the particle to fall downwards towards the floor based on the given rate. This is added to the Y velocity each time the particle is updated.


Example
There are two ways to apply the filter. The first way it so set it via the config object. The second way is to add it to the effectFilters array itself.
  import cv.Orion;
  import cv.orion.filters.GravityFilter;
  
  // First method
  var e:Orion = new Orion(linkageClass, null, {effectFilters:[new GravityFilter(0.3)]});
  
  // Second method
  var e2:Orion = new Orion(linkageClass);
  e2.effectFilters.push(new GravityFilter(0.3));
  



Public Properties
 PropertyDefined by
  value : Number
The current rate affeecting th Y axis.
GravityFilter
Public Methods
 MethodDefined by
  
GravityFilter(value:Number = 0.3)
Causes particles to be attracted to the floor.
GravityFilter
  
applyFilter(particle:ParticleVO, target:Orion):void
Applies the specified filter to a particular particle.
GravityFilter
Property detail
valueproperty
public var value:Number

The current rate affeecting th Y axis.

Constructor detail
GravityFilter()constructor
public function GravityFilter(value:Number = 0.3)

Causes particles to be attracted to the floor.

Parameters
value:Number (default = 0.3) — The velocity added to the Y axis. The higher the number, the stronger the gravitational force is. Use negatives to push particles up, positive numbers to pull down.
Method detail
applyFilter()method
public function applyFilter(particle:ParticleVO, target:Orion):void

Applies the specified filter to a particular particle.

Parameters
particle:ParticleVO — The individual particle.
 
target:Orion — The emitter associated with the particle.