Difference between revisions of "ParticleSystem"

Line 10: Line 10:
 
}}
 
}}
 
{{#ask: [[Category:Functions]] [[parent::Drawable]]
 
{{#ask: [[Category:Functions]] [[parent::Drawable]]
 +
| headers=hide
 +
| ?Description
 +
}}
 +
{{#ask: [[Category:Functions]] [[parent::Object]]
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description
Line 15: Line 19:
 
== Supertypes ==
 
== Supertypes ==
 
[[Drawable]]
 
[[Drawable]]
 +
[[Object]]
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]

Revision as of 01:57, 13 February 2011

Used to create cool effects, like fire. The particle systems are created and drawn on the screen using functions in love.graphics. They also need to be updated in the update(dt) callback for you to see any changes in the particles emitted.

Functions

ParticleSystem:cloneCreates an identical copy of the ParticleSystem in the stopped state.
ParticleSystem:countGets the amount of particles that are currently in the system.
ParticleSystem:emitEmits a burst of particles from the particle emitter.
ParticleSystem:getAreaSpreadGets the area-based spawn parameters for the particles.
ParticleSystem:getBufferSizeGets the maximum number of particles the ParticleSystem can have at once.
ParticleSystem:getColorsGets the colors to apply to the particle sprite.
ParticleSystem:getCountGets the number of particles that are currently in the system.
ParticleSystem:getDirectionGets the direction of the particle emitter (in radians).
ParticleSystem:getEmissionAreaGets the area-based spawn parameters for the particles.
ParticleSystem:getEmissionRateGets the amount of particles emitted per second.
ParticleSystem:getEmitterLifetimeGets how long the particle system will emit particles
ParticleSystem:getImageGets the image used for the particles.
ParticleSystem:getInsertModeGets the mode used when the ParticleSystem adds new particles.
ParticleSystem:getLinearAccelerationGets the linear acceleration (acceleration along the x and y axes) for particles.
ParticleSystem:getLinearDampingGets the amount of linear damping (constant deceleration) for particles.
ParticleSystem:getOffsetGets the particle image's draw offset.
ParticleSystem:getOffsetXGet the x coordinate of the particle rotation offset.
ParticleSystem:getOffsetYGet the y coordinate of the particle rotation offset.
ParticleSystem:getParticleLifetimeGets the lifetime of the particles.
ParticleSystem:getPositionGets the position of the emitter.
ParticleSystem:getQuadsGets a series of Quads used for the particle sprites.
ParticleSystem:getRadialAccelerationGets the radial acceleration (away from the emitter).
ParticleSystem:getRotationGets the rotation of the image upon particle creation (in radians).
ParticleSystem:getSizeVariationGets the amount of size variation.
ParticleSystem:getSizesGets the sizes of the particle over its lifetime.
ParticleSystem:getSpeedGets the speed of the particles.
ParticleSystem:getSpinGets the spin of the sprite.
ParticleSystem:getSpinVariationGets the amount of spin variation.
ParticleSystem:getSpreadGets the amount of directional spread of the particle emitter (in radians).
ParticleSystem:getTangentialAccelerationGets the tangential acceleration (acceleration perpendicular to the particle's direction).
ParticleSystem:getTextureGets the texture (Image or Canvas) used for the particles.
ParticleSystem:getXGets the x-coordinate of the particle emitter's position.
ParticleSystem:getYGets the y-coordinate of the particle emitter's position.
ParticleSystem:hasRelativeRotationGets whether particle angles and rotations are relative to their velocities.
ParticleSystem:isActiveChecks whether the particle system is actively emitting particles.
ParticleSystem:isEmptyChecks whether the particle system is empty of particles.
ParticleSystem:isFullChecks whether the particle system is full of particles.
ParticleSystem:isPausedChecks whether the particle system is paused.
ParticleSystem:isStoppedChecks whether the particle system is stopped.
ParticleSystem:moveToMoves the position of the emitter.
ParticleSystem:pausePauses the particle emitter.
ParticleSystem:resetResets the particle emitter, removing existing particles and resetting the lifetime counter.
ParticleSystem:setAreaSpreadSets area-based spawn parameters for the particles.
ParticleSystem:setBufferSizeSets the size of the buffer (the max allowed amount of particles in the system).
ParticleSystem:setColorSets the color of the image.
ParticleSystem:setColorsSets the colors to apply to the particle sprite.
ParticleSystem:setDirectionSets the direction the particles will be emitted in.
ParticleSystem:setEmissionAreaSets area-based spawn parameters for the particles.
ParticleSystem:setEmissionRateSets the amount of particles emitted per second.
ParticleSystem:setEmitterLifetimeSets how long the particle system should emit particles
... further results
Object:releaseImmediately destroys the object's Lua reference.
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.

Supertypes

Drawable Object

See Also

Other Languages