| Package | org.flintparticles.common.actions |
| Class | public class Fade |
| Inheritance | Fade ActionBase Object |
Usually a particle's energy changes from 1 to 0 over its lifetime, but this can be altered via the easing function set within the age action.
This action should be used in conjunction with the Age action.
See also
| Property | Defined By | ||
|---|---|---|---|
| endAlpha : Number
The alpha value for the particle when its energy is 0. | Fade | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| startAlpha : Number
The alpha value for the particle when its energy is 1. | Fade | ||
| Method | Defined By | ||
|---|---|---|---|
Fade(startAlpha:Number = 1, endAlpha:Number = 0)
The constructor creates a Fade action for use by
an emitter. | Fade | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
Sets the transparency of the particle based on the values defined
and the particle's energy level. | Fade | ||
| endAlpha | property |
endAlpha:NumberThe alpha value for the particle when its energy is 0. The value should be between 0 and 1.
public function get endAlpha():Number public function set endAlpha(value:Number):void| startAlpha | property |
startAlpha:NumberThe alpha value for the particle when its energy is 1. The value should be between 0 and 1.
public function get startAlpha():Number public function set startAlpha(value:Number):void| Fade | () | Constructor |
public function Fade(startAlpha:Number = 1, endAlpha:Number = 0)The constructor creates a Fade action for use by an emitter. To add a Fade to all particles created by an emitter, use the emitter's addAction method.
This action has a priority of -5, so that the Fade executes after color changes.
ParametersstartAlpha:Number (default = 1) — The alpha value for the particle when its energy
is 1 - usually at the start of its lifetime. The value should be
between 0 and 1.
| |
endAlpha:Number (default = 0) — The alpha value of the particle when its energy
is 0 - usually at the end of its lifetime. The value should be
between 0 and 1.
|
See also
| update | () | method |
override public function update(emitter:Emitter, particle:Particle, time:Number):voidSets the transparency of the particle based on the values defined and the particle's energy level.
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