| Package | org.flintparticles.common.initializers |
| Class | public class AlphaInit |
| Inheritance | AlphaInit InitializerBase Object |
| Property | Defined By | ||
|---|---|---|---|
| alpha : Number
When reading, returns the average of minAlpha and maxAlpha. | AlphaInit | ||
| maxAlpha : Number
The maximum alpha value for particles initialised by
this initializer. | AlphaInit | ||
| minAlpha : Number
The minimum alpha value for particles initialised by
this initializer. | AlphaInit | ||
![]() | priority : int
Returns a default priority of 0 for this action. | InitializerBase | |
| Method | Defined By | ||
|---|---|---|---|
AlphaInit(minAlpha:Number = 1, maxAlpha:Number)
The constructor creates an AlphaInit initializer for use by
an emitter. | AlphaInit | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
[override]
This method does nothing. | AlphaInit | ||
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
| alpha | property |
alpha:NumberWhen reading, returns the average of minAlpha and maxAlpha. When writing this sets both maxAlpha and minAlpha to the same alpha value.
public function get alpha():Number public function set alpha(value:Number):void| maxAlpha | property |
maxAlpha:NumberThe maximum alpha value for particles initialised by this initializer. Should be between 0 and 1.
public function get maxAlpha():Number public function set maxAlpha(value:Number):void| minAlpha | property |
minAlpha:NumberThe minimum alpha value for particles initialised by this initializer. Should be between 0 and 1.
public function get minAlpha():Number public function set minAlpha(value:Number):void| AlphaInit | () | Constructor |
public function AlphaInit(minAlpha:Number = 1, maxAlpha:Number)The constructor creates an AlphaInit initializer for use by an emitter. To add an AlphaInit to all particles created by an emitter, use the emitter's addInitializer method.
The alpha of particles initialized by this class will be a random value between the minimum and maximum values set. If no maximum value is set, the minimum value is used with no variation.
This initializer has a priority of -10 so that it occurs after the color assignment.
ParametersminAlpha:Number (default = 1) — the minimum alpha for particles
initialized by the instance. The value should be between 1 and 0.
| |
maxAlpha:Number (default = NaN) — the maximum alpha for particles
initialized by the instance. The value should be between 1 and 0.
|
See also
| initialize | () | method |
override public function initialize(emitter:Emitter, particle:Particle):voidThis method does nothing. All derived classes override this method to initialize each particle created by the emitter.
Parameters
emitter:Emitter | |
particle:Particle |