ParticleSystem
A ParticleSystem can be used to create particle effects like fire or smoke.
The particle system has to be created using love.graphics.newParticleSystem. Just like any other Drawable it can be drawn to the screen using love.graphics.draw. You also have to update it in the update callback to see any changes in the particles emitted.
The particle system won't create any particles unless you call setParticleLifetime and setEmissionRate.
Constructors
love.graphics.newParticleSystem | Creates a new ParticleSystem. |
Functions
Object:type | Gets the type of the object as a string. | ||
Object:typeOf | Checks whether an object is of a certain type. | ||
ParticleSystem:clone | Creates an identical copy of the ParticleSystem in the stopped state. |
![]() |
|
ParticleSystem:count | Gets the amount of particles that are currently in the system. |
![]() |
|
ParticleSystem:emit | Emits a burst of particles from the particle emitter. |
![]() |
|
ParticleSystem:getAreaSpread | Gets the area-based spawn parameters for the particles. |
![]() |
|
ParticleSystem:getBufferSize | Gets the maximum number of particles the ParticleSystem can have at once. |
![]() |
|
ParticleSystem:getCount | Gets the number of particles that are currently in the system. |
![]() |
|
ParticleSystem:getImage | Gets the image used for the particles. |
![]() |
|
ParticleSystem:getInsertMode | Gets the mode used when the ParticleSystem adds new particles. |
![]() |
|
ParticleSystem:getLinearDamping | Gets the amount of linear damping (constant deceleration) for particles. |
![]() |
|
ParticleSystem:getPosition | Gets the position of the emitter. | ||
ParticleSystem:getRadialAcceleration | Gets the radial acceleration (away from the emitter). |
![]() |
|
ParticleSystem:getTexture | Gets the texture (Image or Canvas) used for the particles. |
![]() |
|
ParticleSystem:getX | Gets the x-coordinate of the particle emitter's position. |
![]() |
|
ParticleSystem:getY | Gets the y-coordinate of the particle emitter's position. |
![]() |
|
ParticleSystem:hasRelativeRotation | Gets whether particle angles and rotations are relative to their velocities. |
![]() |
|
ParticleSystem:isActive | Checks whether the particle system is actively emitting particles. | ||
ParticleSystem:isEmpty | Checks whether the particle system is empty of particles. |
![]() |
|
ParticleSystem:isFull | Checks whether the particle system is full of particles. |
![]() |
|
ParticleSystem:isPaused | Checks whether the particle system is paused. |
![]() |
|
ParticleSystem:isStopped | Checks whether the particle system is stopped. |
![]() |
|
ParticleSystem:moveTo | Moves the position of the emitter. |
![]() |
|
ParticleSystem:setAreaSpread | Sets area-based spawn parameters for the particles. |
![]() |
|
ParticleSystem:setBufferSize | Sets the size of the buffer (the max allowed amount of particles in the system). | ||
ParticleSystem:setEmissionRate | Sets the amount of particles emitted per second. | ||
ParticleSystem:setEmitterLifetime | Sets how long the particle system should emit particles |
![]() |
|
ParticleSystem:setGravity | Sets the gravity affecting the particles (acceleration along the y-axis). |
![]() |
|
ParticleSystem:setImage | Sets the image to be used for the particles. |
![]() |
|
ParticleSystem:setInsertMode | Sets the mode to use when the ParticleSystem adds new particles. |
![]() |
|
ParticleSystem:setLifetime | Sets how long the particle system should emit particles (if -1 then it emits particles forever). |
![]() |
|
ParticleSystem:setLinearAcceleration | Sets the linear acceleration (acceleration along the x and y axes) for particles. |
![]() |
|
ParticleSystem:setLinearDamping | Sets the amount of linear damping (constant deceleration) for particles. |
![]() |
|
ParticleSystem:setParticleLife | Sets the life of the particles. |
![]() |
|
ParticleSystem:setParticleLifetime | Sets the lifetime of the particles. |
![]() |
|
ParticleSystem:setPosition | Sets the position of the emitter. | ||
ParticleSystem:setQuads | Sets a series of Quads to use for the particle sprites. |
![]() |
|
ParticleSystem:setRelativeRotation | Sets whether particle angles and rotations are relative to their velocities. |
![]() |
|
ParticleSystem:setSize | Sets the size of the particle (1.0 being normal size). |
![]() |
|
ParticleSystem:setSizeVariation | Sets the amount of size variation. | ||
ParticleSystem:setSizes | Sets the sizes of the particle over its lifetime. |
![]() |
|
ParticleSystem:setSprite | Sets the image which is to be emitted. |
![]() |
|
ParticleSystem:setTexture | Sets the texture (Image or Canvas) to be used for the particles. |
![]() |
|
ParticleSystem:update | Updates the particle system; moving, creating and killing particles. |
Enums
AreaSpreadDistribution | Types of particle area spread distribution. |
![]() |
|
ParticleInsertMode | How newly created particles are added to the ParticleSystem. |
![]() |
Supertypes
See Also
Particle editors:
- https://love2d.org/forums/viewtopic.php?f=4&t=2110
- https://love2d.org/forums/viewtopic.php?f=5&t=32954
- https://love2d.org/forums/viewtopic.php?f=5&t=76986
Category: