| Package | starling.extensions |
| Class | public class ParticleSystem |
| Inheritance | ParticleSystem DisplayObject EventDispatcher Object |
| Implements | IAnimatable |
| Subclasses | PDParticleSystem |
| Property | Defined By | ||
|---|---|---|---|
![]() | alpha : Number The opacity of the object. | DisplayObject | |
![]() | base : DisplayObject [read-only] The topmost object in the display tree the object is part of. | DisplayObject | |
| blendFactorDestination : String | ParticleSystem | ||
| blendFactorSource : String | ParticleSystem | ||
![]() | blendMode : String The blend mode determines how the object is blended with the objects underneath. | DisplayObject | |
![]() | bounds : Rectangle [read-only] The bounds of the object relative to the local coordinates of the parent. | DisplayObject | |
| capacity : int [read-only] | ParticleSystem | ||
| emissionRate : Number | ParticleSystem | ||
| emitterX : Number | ParticleSystem | ||
| emitterY : Number | ParticleSystem | ||
![]() | filter : FragmentFilter The filter that is attached to the display object. | DisplayObject | |
![]() | hasVisibleArea : Boolean [read-only] Indicates if an object occupies any visible area. | DisplayObject | |
![]() | height : Number The height of the object in pixels. | DisplayObject | |
| maxCapacity : int | ParticleSystem | ||
![]() | name : String The name of the display object (default: null). | DisplayObject | |
| numParticles : int [read-only] | ParticleSystem | ||
![]() | parent : DisplayObjectContainer [read-only] The display object container that contains this display object. | DisplayObject | |
![]() | pivotX : Number The x coordinate of the object's origin in its own coordinate space (default: 0). | DisplayObject | |
![]() | pivotY : Number The y coordinate of the object's origin in its own coordinate space (default: 0). | DisplayObject | |
![]() | root : DisplayObject [read-only] The root object the display object is connected to (i.e. | DisplayObject | |
![]() | rotation : Number The rotation of the object in radians. | DisplayObject | |
![]() | scaleX : Number The horizontal scale factor. | DisplayObject | |
![]() | scaleY : Number The vertical scale factor. | DisplayObject | |
![]() | skewX : Number The horizontal skew angle in radians. | DisplayObject | |
![]() | skewY : Number The vertical skew angle in radians. | DisplayObject | |
![]() | stage : Stage [read-only] The stage the display object is connected to, or null if it is not connected
to the stage. | DisplayObject | |
| texture : Texture | ParticleSystem | ||
![]() | touchable : Boolean Indicates if this object (and its children) will receive touch events. | DisplayObject | |
![]() | transformationMatrix : Matrix The transformation matrix of the object relative to its parent. | DisplayObject | |
![]() | useHandCursor : Boolean Indicates if the mouse cursor should transform into a hand while it's over the sprite. | DisplayObject | |
![]() | visible : Boolean The visibility of the object. | DisplayObject | |
![]() | width : Number The width of the object in pixels. | DisplayObject | |
![]() | x : Number The x coordinate of the object relative to the local coordinates of the parent. | DisplayObject | |
![]() | y : Number The y coordinate of the object relative to the local coordinates of the parent. | DisplayObject | |
| Property | Defined By | ||
|---|---|---|---|
| mBlendFactorDestination : String | ParticleSystem | ||
| mBlendFactorSource : String | ParticleSystem | ||
| mEmitterX : Number | ParticleSystem | ||
| mEmitterY : Number | ParticleSystem | ||
| mPremultipliedAlpha : Boolean | ParticleSystem | ||
| Method | Defined By | ||
|---|---|---|---|
ParticleSystem(texture:Texture, emissionRate:Number, initialCapacity:int = 128, maxCapacity:int = 8192, blendFactorSource:String = null, blendFactorDest:String = null) | ParticleSystem | ||
![]() | addEventListener(type:String, listener:Function):void [override] | DisplayObject | |
advanceTime(passedTime:Number):void | ParticleSystem | ||
![]() | alignPivot(hAlign:String = center, vAlign:String = center):void Moves the pivot point to a certain position within the local coordinate system
of the object. | DisplayObject | |
![]() | dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher | |
![]() | dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void Dispatches an event with the given parameters to all objects that have registered
listeners for the given type. | EventDispatcher | |
dispose():void [override] | ParticleSystem | ||
getBounds(targetSpace:DisplayObject, resultRect:Rectangle = null):Rectangle [override] Returns an empty rectangle at the particle system's position. | ParticleSystem | ||
![]() | getTransformationMatrix(targetSpace:DisplayObject, resultMatrix:Matrix = null):Matrix Creates a matrix that represents the transformation from the local coordinate system
to another. | DisplayObject | |
![]() | globalToLocal(globalPoint:Point, resultPoint:Point = null):Point Transforms a point from global (stage) coordinates to the local coordinate system. | DisplayObject | |
![]() | hasEventListener(type:String):Boolean Returns if there are listeners registered for a certain event type. | EventDispatcher | |
![]() | hitTest(localPoint:Point, forTouch:Boolean = false):DisplayObject Returns the object that is found topmost beneath a point in local coordinates, or nil if
the test fails. | DisplayObject | |
![]() | localToGlobal(localPoint:Point, resultPoint:Point = null):Point Transforms a point from the local coordinate system to global (stage) coordinates. | DisplayObject | |
pause():void Pauses the system; when you 'start' again, it will continue from the old state. | ParticleSystem | ||
![]() | removeEventListener(type:String, listener:Function):void [override] | DisplayObject | |
![]() | removeEventListeners(type:String = null):void [override] | DisplayObject | |
![]() | removeFromParent(dispose:Boolean = false):void Removes the object from its parent, if it has one, and optionally disposes it. | DisplayObject | |
render(support:RenderSupport, alpha:Number):void [override] | ParticleSystem | ||
start(duration:Number):void Starts the sysytem for a certain time. | ParticleSystem | ||
stop():void Stops the system and removes all existing particles. | ParticleSystem | ||
| Method | Defined By | ||
|---|---|---|---|
advanceParticle(particle:Particle, passedTime:Number):void | ParticleSystem | ||
| ParticleSystem | |||
initParticle(particle:Particle):void | ParticleSystem | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
![]() | Dispatched when an object is added to a parent. | DisplayObject | ||
![]() | Dispatched when an object is connected to the stage (directly or indirectly). | DisplayObject | ||
| Dispatched when emission of particles is finished. | ParticleSystem | |||
![]() | Dispatched once every frame on every object that is connected to the stage. | DisplayObject | ||
![]() | Dispatched when a key on the keyboard is pressed. | DisplayObject | ||
![]() | Dispatched when a key on the keyboard is released. | DisplayObject | ||
![]() | Dispatched when an object is removed from its parent. | DisplayObject | ||
![]() | Dispatched when an object is removed from the stage and won't be rendered any longer. | DisplayObject | ||
![]() | Dispatched when an object is touched. | DisplayObject | ||
| blendFactorDestination | property |
blendFactorDestination:String public function get blendFactorDestination():String public function set blendFactorDestination(value:String):void| blendFactorSource | property |
blendFactorSource:String public function get blendFactorSource():String public function set blendFactorSource(value:String):void| capacity | property |
capacity:int [read-only] public function get capacity():int| emissionRate | property |
emissionRate:Number public function get emissionRate():Number public function set emissionRate(value:Number):void| emitterX | property |
emitterX:Number public function get emitterX():Number public function set emitterX(value:Number):void| emitterY | property |
emitterY:Number public function get emitterY():Number public function set emitterY(value:Number):void| maxCapacity | property |
maxCapacity:int public function get maxCapacity():int public function set maxCapacity(value:int):void| mBlendFactorDestination | property |
protected var mBlendFactorDestination:String| mBlendFactorSource | property |
protected var mBlendFactorSource:String| mEmitterX | property |
protected var mEmitterX:Number| mEmitterY | property |
protected var mEmitterY:Number| mPremultipliedAlpha | property |
protected var mPremultipliedAlpha:Boolean| numParticles | property |
numParticles:int [read-only] public function get numParticles():int| texture | property |
texture:Texture public function get texture():Texture public function set texture(value:Texture):void| ParticleSystem | () | Constructor |
public function ParticleSystem(texture:Texture, emissionRate:Number, initialCapacity:int = 128, maxCapacity:int = 8192, blendFactorSource:String = null, blendFactorDest:String = null)texture:Texture | |
emissionRate:Number | |
initialCapacity:int (default = 128) | |
maxCapacity:int (default = 8192) | |
blendFactorSource:String (default = null) | |
blendFactorDest:String (default = null) |
| advanceParticle | () | method |
protected function advanceParticle(particle:Particle, passedTime:Number):voidParameters
particle:Particle | |
passedTime:Number |
| advanceTime | () | method |
public function advanceTime(passedTime:Number):voidParameters
passedTime:Number |
| createParticle | () | method |
| dispose | () | method |
override public function dispose():void| getBounds | () | method |
override public function getBounds(targetSpace:DisplayObject, resultRect:Rectangle = null):RectangleReturns an empty rectangle at the particle system's position. Calculating the actual bounds would be too expensive.
Parameters
targetSpace:DisplayObject | |
resultRect:Rectangle (default = null) |
Rectangle |
| initParticle | () | method |
| pause | () | method |
public function pause():voidPauses the system; when you 'start' again, it will continue from the old state.
| render | () | method |
override public function render(support:RenderSupport, alpha:Number):voidParameters
support:RenderSupport | |
alpha:Number |
| start | () | method |
public function start(duration:Number):voidStarts the sysytem for a certain time.
Parameters
duration:Number (default = NaN) |
| stop | () | method |
public function stop():voidStops the system and removes all existing particles.
| complete | Event |