Packagecv.orion.filters
Classpublic class MouseSpringFilter
ImplementsIFilter

The MouseSpringFilter causes particles to move toward the mouse in a spring motion. If the particle is going too fast when it hits the mouse, it will zoom past it til it slows down enough to head back towards the mouse. It will do this til it finally stops moving.


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.MouseSpringFilter;
  
  // First method
  var e:Orion = new Orion(linkageClass, null, {effectFilters:[new MouseSpringFilter(0.01)]});
  
  // Second method
  var e2:Orion = new Orion(linkageClass);
  e2.effectFilters.push(new MouseSpringFilter(0.01));
  



Public Properties
 PropertyDefined by
  minDist : Number
The minimum distance the particle must be from the mouse for the filter to take effect.
MouseSpringFilter
  springStrength : Number
The strength of the spring used in the motion.
MouseSpringFilter
Public Methods
 MethodDefined by
  
MouseSpringFilter(springStrength:Number = 0.05, minDist:Number = 100)
Causes particles to be attracted to the mouse and move with a spring motion.
MouseSpringFilter
  
applyFilter(particle:ParticleVO, target:Orion):void
Applies the specified filter to a particular particle.
MouseSpringFilter
Property detail
minDistproperty
public var minDist:Number

The minimum distance the particle must be from the mouse for the filter to take effect.

springStrengthproperty 
public var springStrength:Number

The strength of the spring used in the motion.

Constructor detail
MouseSpringFilter()constructor
public function MouseSpringFilter(springStrength:Number = 0.05, minDist:Number = 100)

Causes particles to be attracted to the mouse and move with a spring motion.

Parameters
springStrength:Number (default = 0.05) — The strength of the spring used in the motion.
 
minDist:Number (default = 100) — The minimum distance the particle must be from the mouse for the filter to take effect.
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.