Packageidv.cjcat.stardust.common.actions
Classpublic class AlphaCurve
InheritanceAlphaCurve Inheritance Action Inheritance StardustElement

Alters a particle's alpha value according to its life property.

The alpha transition is applied using the easing functions designed by Robert Penner. These functions can be found in the idv.cjcat.stardust.common.easing package.



Public Properties
 PropertyDefined by
 Inheritedactive : Boolean
Denotes if the action is active, true by default.
Action
  inAlpha : Number
The initial alpha value of a particle, 0 by default.
AlphaCurve
  inFunction : Function
The easing function from the initial alpha to the normal alpha, Linear.easeIn by default.
AlphaCurve
  inFunctionExtraParams : Array
Some easing functions take more than four parameters.
AlphaCurve
  inLifespan : Number
The transition lifespan of alpha value from the initial alpha to the normal alpha.
AlphaCurve
 Inheritedmask : int
The action will affect a particle only if it's active and the bitwise AND of the action's mask and the particle's mask is non-zero, 1 by default.
Action
 Inheritedname : String
StardustElement
 InheritedneedsSortedParticles : Boolean
Tells the emitter whether this action requires that particles must be sorted before the update() calls.
Action
 InheritedonAdd : ISignal
Dispatched when the added to an emitter.
Action
 InheritedonPriorityChange : ISignal
Dispatched when the action's priority is changed.
Action
 InheritedonRemove : ISignal
Dispatched when the removed from an emitter.
Action
  outAlpha : Number
The final alpha value of a particle, 0 by default.
AlphaCurve
  outFunction : Function
The easing function from the normal alpha to the final alpha, Linear.easeOut by default.
AlphaCurve
  outFunctionExtraParams : Array
Some easing functions take more than four parameters.
AlphaCurve
  outLifespan : Number
The transition lifespan of alpha value from the normal alpha to the final alpha.
AlphaCurve
 Inheritedpriority : int
Actions will be sorted by the associated emitter according to their priorities.
Action
 InheritedskipThisAction : Boolean
Reset to false on each emitter step.
Action
 Inheritedsupports2D : Boolean
Whether this action supports 2D.
Action
 Inheritedsupports3D : Boolean
Whether this action supports 3D.
Action
Public Methods
 MethodDefined by
  
AlphaCurve(inLifespan:Number = 0, outLifespan:Number = 0, inFunction:Function = null, outFunction:Function = null)
AlphaCurve
 Inherited
Action
 Inherited
[Abstract Method] Returns the related objects of the element.
StardustElement
 Inherited
getXMLTag():XML
Returns the root tag of the XML representation.
StardustElement
  
getXMLTagName():String
AlphaCurve
  
parseXML(xml:XML, builder:XMLBuilder = null):void
AlphaCurve
 Inherited
postUpdate(emitter:Emitter, time:Number):void
[Template Method] This method is called once after each Emitter.step() method call, after the update() calls with each particles in the emitter.
Action
  
toXML():XML
AlphaCurve
  
update(emitter:Emitter, particle:Particle, time:Number):void
AlphaCurve
Property detail
inAlphaproperty
public var inAlpha:Number

The initial alpha value of a particle, 0 by default.

inFunctionproperty 
inFunction:Function  [read-write]

The easing function from the initial alpha to the normal alpha, Linear.easeIn by default.

Implementation
    public function get inFunction():Function
    public function set inFunction(value:Function):void
inFunctionExtraParamsproperty 
inFunctionExtraParams:Array  [read-write]

Some easing functions take more than four parameters. This property specifies those extra parameters passed to the inFunction.

Implementation
    public function get inFunctionExtraParams():Array
    public function set inFunctionExtraParams(value:Array):void
inLifespanproperty 
public var inLifespan:Number

The transition lifespan of alpha value from the initial alpha to the normal alpha.

outAlphaproperty 
public var outAlpha:Number

The final alpha value of a particle, 0 by default.

outFunctionproperty 
outFunction:Function  [read-write]

The easing function from the normal alpha to the final alpha, Linear.easeOut by default.

Implementation
    public function get outFunction():Function
    public function set outFunction(value:Function):void
outFunctionExtraParamsproperty 
outFunctionExtraParams:Array  [read-write]

Some easing functions take more than four parameters. This property specifies those extra parameters passed to the outFunction.

Implementation
    public function get outFunctionExtraParams():Array
    public function set outFunctionExtraParams(value:Array):void
outLifespanproperty 
public var outLifespan:Number

The transition lifespan of alpha value from the normal alpha to the final alpha.

Constructor detail
AlphaCurve()constructor
public function AlphaCurve(inLifespan:Number = 0, outLifespan:Number = 0, inFunction:Function = null, outFunction:Function = null)Parameters
inLifespan:Number (default = 0)
 
outLifespan:Number (default = 0)
 
inFunction:Function (default = null)
 
outFunction:Function (default = null)
Method detail
getXMLTagName()method
public override function getXMLTagName():String

Returns
String
parseXML()method 
public override function parseXML(xml:XML, builder:XMLBuilder = null):voidParameters
xml:XML
 
builder:XMLBuilder (default = null)
toXML()method 
public override function toXML():XML

Returns
XML
update()method 
public final override function update(emitter:Emitter, particle:Particle, time:Number):voidParameters
emitter:Emitter
 
particle:Particle
 
time:Number