ParticleSystem

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.

Constructors

love.graphics.newParticleSystemCreates a new ParticleSystem.

Functions

Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.
ParticleSystem:countGets the amount of particles that are currently in the system.
ParticleSystem:getDirectionGets the direction of the particle emitter (in radians).
ParticleSystem:getEmissionRateGets the amount of particles emitted per second.
ParticleSystem:getOffsetXGet the x coordinate of the particle rotation offset.
ParticleSystem:getOffsetYGet the y coordinate of the particle rotation offset.
ParticleSystem:getPositionGets the position of the emitter.
ParticleSystem:getSpreadGets the amount of directional spread of the particle emitter (in radians).
ParticleSystem:getXGets the x-coordinate of the particle emitter's position.
ParticleSystem:getYGets the y-coordinate of the particle emitter's position.
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:pausePauses the particle emitter.
ParticleSystem:resetResets the particle emitter, removing existing particles and resetting the lifetime counter.
ParticleSystem:setBufferSizeSets the size of the buffer (the max allowed amount of particles in the system).
ParticleSystem:setColorSets the color of the image.
ParticleSystem:setDirectionSets the direction the particles will be emitted in.
ParticleSystem:setEmissionRateSets the amount of particles emitted per second.
ParticleSystem:setGravitySets the gravity affecting the particles (acceleration along the y-axis).
ParticleSystem:setLifetimeSets how long the particle system should emit particles (if -1 then it emits particles forever).
ParticleSystem:setOffsetSet the offset position which the particle sprite is rotated around.
ParticleSystem:setParticleLifeSets the life of the particles.
ParticleSystem:setPositionSets the position of the emitter.
ParticleSystem:setRadialAccelerationSet the radial acceleration (away from the emitter).
ParticleSystem:setRotationSets the rotation of the image upon particle creation (in radians).
ParticleSystem:setSizeSets the size of the particle (1.0 being normal size).
ParticleSystem:setSizeVariationSets the amount of size variation.
ParticleSystem:setSpeedSets the speed of the particles.
ParticleSystem:setSpinSets the spin of the sprite.
ParticleSystem:setSpinVariationSets the amount of spin variation.
ParticleSystem:setSpreadSets the amount of spread for the system.
ParticleSystem:setSpriteSets the image which is to be emitted.
ParticleSystem:setTangentialAccelerationSets the tangential acceleration (acceleration perpendicular to the particle's direction).
ParticleSystem:startStarts the particle emitter.
ParticleSystem:stopStops the particle emitter, resetting the lifetime counter.
ParticleSystem:updateUpdates the particle system; moving, creating and killing particles.

Supertypes

See Also


Other Languages