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.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:count Gets the amount of particles that are currently in the system.
ParticleSystem:getDirection Gets the direction of the particle emitter (in radians).
ParticleSystem:getOffsetX Get the x coordinate of the particle rotation offset.
ParticleSystem:getOffsetY Get the y coordinate of the particle rotation offset.
ParticleSystem:getSpread Gets the amount of directional spread of the particle emitter (in radians).
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: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:pause Pauses the particle emitter.
ParticleSystem:reset Resets the particle emitter, removing any existing particles and resetting the lifetime counter.
ParticleSystem:setBufferSize Sets the size of the buffer (the max allowed amount of particles in the system).
ParticleSystem:setColor Sets the color of the image (color modulation needs to be activated for it to have any effect).
ParticleSystem:setDirection Sets the direction the particles will be emitted in.
ParticleSystem:setEmissionRate Sets the amount of particles emitted per second.
ParticleSystem:setGravity Sets the gravity affecting the particles (acceleration along the y-axis).
ParticleSystem:setLifetime Sets how long the particle system should emit particles (if -1 then it emits particles forever).
ParticleSystem:setOffset Set the offset position which the particle sprite is rotated around.
ParticleSystem:setParticleLife Sets the life of the particles.
ParticleSystem:setPosition Sets the position of the emitter.
ParticleSystem:setRadialAcceleration Set the radial acceleration (away from the emitter).
ParticleSystem:setRotation Sets the rotation of the image upon particle creation (in radians).
ParticleSystem:setSize Sets the size of the particle (1.0 being normal size).
ParticleSystem:setSizeVariation Sets the degree of variation (0 meaning no variation and 1 meaning full variation between start and end).
ParticleSystem:setSpeed Sets the speed of the particles.
ParticleSystem:setSpin Sets the spin of the sprite.
ParticleSystem:setSpinVariation Sets the degree of variation (0 meaning no variation and 1 meaning full variation between start and end).
ParticleSystem:setSpread Sets the amount of spread for the system.
ParticleSystem:setSprite Sets the image which is to be emitted.
ParticleSystem:setTangentialAcceleration Sets the tangential acceleration (acceleration perpendicular to the particle's direction).
ParticleSystem:start Starts the particle emitter.
ParticleSystem:stop Stops the particle emitter, resetting the lifetime counter.
ParticleSystem:update Updates the particle system; moving, creating and killing particles.

Supertypes

See Also


Other Languages

Personal tools