| Package | org.flintparticles.common.particles |
| Class | public class Particle |
| Inheritance | Particle Object |
| Subclasses | Particle2D, Particle3D |
| Property | Defined By | ||
|---|---|---|---|
| age : Number = 0
The age of the particle, in seconds. | Particle | ||
| alpha : Number [read-only] | Particle | ||
| collisionRadius : Number = 1
The radius of the particle, for collision approximation
| Particle | ||
| color : uint = 0xFFFFFFFF
The 32bit ARGB color of the particle. | Particle | ||
| colorTransform : ColorTransform [read-only]
A ColorTransform object that converts white to the colour of the particle. | Particle | ||
| dictionary : Dictionary [read-only]
The dictionary object enables actions and activities to add additional properties to the particle. | Particle | ||
| energy : Number = 1
The energy of the particle. | Particle | ||
| image : * = null
The object used to display the image. | Particle | ||
| isDead : Boolean = false
Whether the particle is dead and should be removed from the stage. | Particle | ||
| lifetime : Number = 0
The lifetime of the particle, in seconds. | Particle | ||
| mass : Number = 1
The mass of the particle ( 1 is the default ). | Particle | ||
| scale : Number = 1
The scale of the particle ( 1 is normal size ). | Particle | ||
| Method | Defined By | ||
|---|---|---|---|
Particle()
Creates a particle. | Particle | ||
Creates a new particle with all the same properties as this one. | Particle | ||
initialize():void
Sets the particle's properties to their default values. | Particle | ||
revive():void | Particle | ||
| age | property |
public var age:Number = 0The age of the particle, in seconds.
| alpha | property |
alpha:Number [read-only] public function get alpha():Number| collisionRadius | property |
public var collisionRadius:Number = 1The radius of the particle, for collision approximation
| color | property |
public var color:uint = 0xFFFFFFFFThe 32bit ARGB color of the particle. The initial value is 0xFFFFFFFF (white).
| colorTransform | property |
colorTransform:ColorTransform [read-only] A ColorTransform object that converts white to the colour of the particle.
public function get colorTransform():ColorTransform| dictionary | property |
dictionary:Dictionary [read-only] The dictionary object enables actions and activities to add additional properties to the particle. Any object adding properties to the particle should use a reference to itself as the dictionary key, thus ensuring it doesn't clash with other object's properties. If multiple properties are needed, the dictionary value can be an object with a number of properties.
public function get dictionary():Dictionary| energy | property |
public var energy:Number = 1The energy of the particle.
| image | property |
public var image:* = nullThe object used to display the image. In a 2D particle, this is usually a DisplayObject. In a 3D particle, this may be a DisplayObject, for displaying on a billboard or similar, or a 3D object in the form used by the render system.
| isDead | property |
public var isDead:Boolean = falseWhether the particle is dead and should be removed from the stage.
| lifetime | property |
public var lifetime:Number = 0The lifetime of the particle, in seconds.
| mass | property |
public var mass:Number = 1The mass of the particle ( 1 is the default ).
| scale | property |
public var scale:Number = 1The scale of the particle ( 1 is normal size ).
| Particle | () | Constructor |
public function Particle()Creates a particle. Alternatively particles can be reused by using the ParticleCreator to create and manage them. Usually the emitter will create the particles and the user doesn't need to create them.
| clone | () | method |
public function clone(factory:ParticleFactory = null):ParticleCreates a new particle with all the same properties as this one.
Note that the new particle will use the same image object as the one you're cloning. This is fine if the particles are used with a Bitmaprenderer, but if they are used with a DisplayObjectRenderer you will need to replace teh image property with a new image, otherwise only one of the particles (original or clone) will be displayed.
Parameters
factory:ParticleFactory (default = null) |
Particle |
| initialize | () | method |
public function initialize():voidSets the particle's properties to their default values.
| revive | () | method |
public function revive():void