Particle Class
Constructor
Item Index
Methods
applyArt
-
art
Sets the texture for the particle. This can be overridden to allow for an animated particle.
Parameters:
-
art
pixi.textures.TextureThe texture to set.
destroy
()
Destroys the particle, removing references and preventing future use.
init
()
Initializes the particle for use, based on the properties that have to have been set already on the particle.
kill
()
Kills the particle, removing it from the display list and telling the emitter to recycle it.
update
-
delta
Updates the particle.
Parameters:
-
delta
FloatTime elapsed since the previous frame, in seconds.
Returns:
The standard interpolation multiplier (0-1) used for all relevant particle properties. A value of -1 means the particle died of old age instead.
Properties
acceleration
pixi.geom.Point
Acceleration to apply to the particle.
age
Float
The current age of the particle, in seconds.
ease
Void->Void
A simple easing function to be applied to all properties that are being interpolated.
endAlpha
Float
The alpha of the particle at the end of its life.
endScale
Float
The scale of the particle at the start of its life.
extraData
Dynamic
Extra data that the emitter passes along for custom particles.
maxLife
Float
The maximum lifetime of this particle, in seconds.
startAlpha
Float
The alpha of the particle at the start of its life.
startColor
ArrayThe tint of the particle at the start of its life.
startScale
Float
The scale of the particle at the start of its life.
startSpeed
Float
The speed of the particle at the start of its life.
velocity
pixi.geom.Point
The velocity of the particle. Speed may change, but the angle also contained in velocity is constant.