The ColorFilter transitions a particle's tint/color to the target color. This filter
is useful for effects such as the FireworkEffect, where a particle goes from yellow
to red.
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.ColorFilter;
// First method
var e:Orion = new Orion(linkageClass, null, {effectFilters:[new ColorFilter(0xCC3300)]});
// Second method
var e2:Orion = new Orion(linkageClass);
e2.effectFilters.push(new ColorFilter(0xCC3300));
color:uint
[read-write]
The target color to match.
Implementation
public function get color():uint
public function set color(value:uint):void
public function ColorFilter(color:uint = 0xFFFFFF)
Tweens the tint/color of the particle to the target color specified.
Parameters
| color:uint (default = 0xFFFFFF ) — The target color to match.
|
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.
|
Copyright 2009 Gabriel Mariani (http://blog.coursevector.com/orion)