| Package | org.flintparticles.twoD.particles |
| Class | public class Particle2D |
| Inheritance | Particle2D Particle Object |
| Property | Defined By | ||
|---|---|---|---|
![]() | age : Number = 0
The age of the particle, in seconds. | Particle | |
![]() | alpha : Number [read-only] | Particle | |
| angVelocity : Number = 0
The angular velocity of the particle in radians per second. | Particle2D | ||
![]() | 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 | |
| inertia : Number [read-only]
The moment of inertia of the particle about its center point
| Particle2D | ||
![]() | 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 | |
| matrixTransform : Matrix [read-only]
A transformation matrix for the position, scale and rotation of the particle. | Particle2D | ||
| previousX : Number = 0
The x coordinate of the particle prior to the latest update. | Particle2D | ||
| previousY : Number = 0
The y coordinate of the particle prior to the latest update. | Particle2D | ||
| rotation : Number = 0
The rotation of the particle in radians. | Particle2D | ||
![]() | scale : Number = 1
The scale of the particle ( 1 is normal size ). | Particle | |
| sortID : int = -1
The position in the emitter's horizontal spacial sorted array
| Particle2D | ||
| velX : Number = 0
The x coordinate of the velocity of the particle in pixels per second. | Particle2D | ||
| velY : Number = 0
The y coordinate of the velocity of the particle in pixels per second. | Particle2D | ||
| x : Number = 0
The x coordinate of the particle in pixels. | Particle2D | ||
| y : Number = 0
The y coordinate of the particle in pixels. | Particle2D | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a particle. | Particle2D | ||
[override]
Creates a new particle with all the same properties as this one. | Particle2D | ||
initialize():void [override]
Sets the particles properties to their default values. | Particle2D | ||
![]() | revive():void | Particle | |
| angVelocity | property |
public var angVelocity:Number = 0The angular velocity of the particle in radians per second.
| inertia | property |
inertia:Number [read-only] The moment of inertia of the particle about its center point
public function get inertia():Number| matrixTransform | property |
matrixTransform:Matrix [read-only] A transformation matrix for the position, scale and rotation of the particle.
public function get matrixTransform():Matrix| previousX | property |
public var previousX:Number = 0The x coordinate of the particle prior to the latest update.
| previousY | property |
public var previousY:Number = 0The y coordinate of the particle prior to the latest update.
| rotation | property |
public var rotation:Number = 0The rotation of the particle in radians.
| sortID | property |
public var sortID:int = -1The position in the emitter's horizontal spacial sorted array
| velX | property |
public var velX:Number = 0The x coordinate of the velocity of the particle in pixels per second.
| velY | property |
public var velY:Number = 0The y coordinate of the velocity of the particle in pixels per second.
| x | property |
public var x:Number = 0The x coordinate of the particle in pixels.
| y | property |
public var y:Number = 0The y coordinate of the particle in pixels.
| Particle2D | () | Constructor |
public function Particle2D()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 |
override 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 |
override public function initialize():voidSets the particles properties to their default values.