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.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:cloneCreates an identical copy of the ParticleSystem in the stopped state.Added since 0.9.1
ParticleSystem:countGets the amount of particles that are currently in the system. Removed in 0.9.0
ParticleSystem:emitEmits a burst of particles from the particle emitter.Added since 0.9.0
ParticleSystem:getAreaSpreadGets the area-based spawn parameters for the particles.Added since 0.9.0
ParticleSystem:getBufferSizeGets the maximum number of particles the ParticleSystem can have at once.Added since 0.9.0
ParticleSystem:getColorsGets the colors to apply to the particle sprite.Added since 0.9.0
ParticleSystem:getCountGets the number of particles that are currently in the system.Added since 0.9.0
ParticleSystem:getDirectionGets the direction of the particle emitter (in radians).
ParticleSystem:getEmissionRateGets the amount of particles emitted per second.Added since 0.9.0
ParticleSystem:getEmitterLifetimeGets how long the particle system will emit particlesAdded since 0.9.0
ParticleSystem:getImageGets the image used for the particles.Added since 0.9.0
ParticleSystem:getInsertModeGets the mode used when the ParticleSystem adds new particles.Added since 0.9.0
ParticleSystem:getLinearAccelerationGets the linear acceleration (acceleration along the x and y axes) for particles.Added since 0.9.0
ParticleSystem:getOffsetGets the particle image's draw offset.Added since 0.9.0
ParticleSystem:getOffsetXGet the x coordinate of the particle rotation offset. Removed in 0.9.0
ParticleSystem:getOffsetYGet the y coordinate of the particle rotation offset. Removed in 0.9.0
ParticleSystem:getParticleLifetimeGets the lifetime of the particles.Added since 0.9.0
ParticleSystem:getPositionGets the position of the emitter.
ParticleSystem:getRadialAccelerationGets the radial acceleration (away from the emitter).Added since 0.9.0
ParticleSystem:getRotationGets the rotation of the image upon particle creation (in radians).Added since 0.9.0
ParticleSystem:getSizeVariationGets the amount of size variation.Added since 0.9.0
ParticleSystem:getSizesGets the sizes of the particle over its lifetime.Added since 0.9.0
ParticleSystem:getSpeedGets the speed of the particles.Added since 0.9.0
ParticleSystem:getSpinGets the spin of the sprite.Added since 0.9.0
ParticleSystem:getSpinVariationGets the amount of spin variation.Added since 0.9.0
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).Added since 0.9.0
ParticleSystem:getTextureGets the texture (Image or Canvas) used for the particles.Added since 0.9.1
ParticleSystem:getXGets the x-coordinate of the particle emitter's position. Removed in 0.9.0
ParticleSystem:getYGets the y-coordinate of the particle emitter's position. Removed in 0.9.0
ParticleSystem:hasRelativeRotationGets whether particle angles and rotations are relative to their velocities.Added since 0.9.1
ParticleSystem:isActiveChecks whether the particle system is actively emitting particles.
ParticleSystem:isEmptyChecks whether the particle system is empty of particles. Removed in 0.9.0
ParticleSystem:isFullChecks whether the particle system is full of particles. Removed in 0.9.0
ParticleSystem:isPausedChecks whether the particle system is paused.Added since 0.9.0
ParticleSystem:isStoppedChecks whether the particle system is stopped.Added since 0.9.0
ParticleSystem:moveToMoves the position of the emitter.Added since 0.9.1
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.Added since 0.9.0
ParticleSystem:setBufferSizeSets the size of the buffer (the max allowed amount of particles in the system).
ParticleSystem:setColorSets the color of the image. Removed in 0.8.0
ParticleSystem:setColorsSets the colors to apply to the particle sprite.Added since 0.8.0
ParticleSystem:setDirectionSets the direction the particles will be emitted in.
ParticleSystem:setEmissionRateSets the amount of particles emitted per second.
ParticleSystem:setEmitterLifetimeSets how long the particle system should emit particlesAdded since 0.9.0
ParticleSystem:setGravitySets the gravity affecting the particles (acceleration along the y-axis). Removed in 0.9.0
ParticleSystem:setImageSets the image to be used for the particles.Added since 0.9.0
ParticleSystem:setInsertModeSets the mode to use when the ParticleSystem adds new particles.Added since 0.9.0
ParticleSystem:setLifetimeSets how long the particle system should emit particles (if -1 then it emits particles forever). Removed in 0.9.0
ParticleSystem:setLinearAccelerationSets the linear acceleration (acceleration along the x and y axes) for particles.Added since 0.9.0
ParticleSystem:setOffsetSet the offset position which the particle sprite is rotated around.
ParticleSystem:setParticleLifeSets the life of the particles. Removed in 0.9.0
ParticleSystem:setParticleLifetimeSets the lifetime of the particles.Added since 0.9.0
ParticleSystem:setPositionSets the position of the emitter.
ParticleSystem:setRadialAccelerationSet the radial acceleration (away from the emitter).
ParticleSystem:setRelativeRotationSets whether particle angles and rotations are relative to their velocities.Added since 0.9.1
ParticleSystem:setRotationSets the rotation of the image upon particle creation (in radians).
ParticleSystem:setSizeSets the size of the particle (1.0 being normal size). Removed in 0.8.0
ParticleSystem:setSizeVariationSets the amount of size variation.
ParticleSystem:setSizesSets the sizes of the particle over its lifetime.Added since 0.8.0
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. Removed in 0.9.0
ParticleSystem:setTangentialAccelerationSets the tangential acceleration (acceleration perpendicular to the particle's direction).
ParticleSystem:setTextureSets the texture (Image or Canvas) to be used for the particles.Added since 0.9.1
ParticleSystem:startStarts the particle emitter.
ParticleSystem:stopStops the particle emitter, resetting the lifetime counter.
ParticleSystem:updateUpdates the particle system; moving, creating and killing particles.

Enums

AreaSpreadDistributionTypes of particle area spread distribution.Added since 0.9.0
ParticleInsertModeHow newly created particles are added to the ParticleSystem.Added since 0.9.0

Supertypes

See Also


Particle editors:

Other Languages

Personal tools