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: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:getColors | Gets the colors to apply to the particle sprite. |
ParticleSystem:getCount | Gets the number of particles that are currently in the system. |
ParticleSystem:getDirection | Gets the direction of the particle emitter (in radians). |
ParticleSystem:getEmissionArea | Gets the area-based spawn parameters for the particles. |
ParticleSystem:getEmissionRate | Gets the amount of particles emitted per second. |
ParticleSystem:getEmitterLifetime | Gets how long the particle system will emit particles |
ParticleSystem:getImage | Gets the image used for the particles. |
ParticleSystem:getInsertMode | Gets the mode used when the ParticleSystem adds new particles. |
ParticleSystem:getLinearAcceleration | Gets the linear acceleration (acceleration along the x and y axes) for particles. |
ParticleSystem:getLinearDamping | Gets the amount of linear damping (constant deceleration) for particles. |
ParticleSystem:getOffset | Gets the particle image's draw offset. |
ParticleSystem:getOffsetX | Get the x coordinate of the particle rotation offset. |
ParticleSystem:getOffsetY | Get the y coordinate of the particle rotation offset. |
ParticleSystem:getParticleLifetime | Gets the lifetime of the particles. |
ParticleSystem:getPosition | Gets the position of the emitter. |
ParticleSystem:getQuads | Gets a series of Quads used for the particle sprites. |
ParticleSystem:getRadialAcceleration | Gets the radial acceleration (away from the emitter). |
ParticleSystem:getRotation | Gets the rotation of the image upon particle creation (in radians). |
ParticleSystem:getSizeVariation | Gets the amount of size variation. |
ParticleSystem:getSizes | Gets the sizes of the particle over its lifetime. |
ParticleSystem:getSpeed | Gets the speed of the particles. |
ParticleSystem:getSpin | Gets the spin of the sprite. |
ParticleSystem:getSpinVariation | Gets the amount of spin variation. |
ParticleSystem:getSpread | Gets the amount of directional spread of the particle emitter (in radians). |
ParticleSystem:getTangentialAcceleration | Gets the tangential acceleration (acceleration perpendicular to the particle's direction). |
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:pause | Pauses the particle emitter. |
ParticleSystem:reset | Resets the particle emitter, removing existing particles and resetting the lifetime counter. |
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:setColor | Sets the color of the image. |
ParticleSystem:setColors | Sets the colors to apply to the particle sprite. |
ParticleSystem:setDirection | Sets the direction the particles will be emitted in. |
ParticleSystem:setEmissionArea | Sets area-based spawn parameters for the particles. |
ParticleSystem:setEmissionRate | Sets the amount of particles emitted per second. |
ParticleSystem:setEmitterLifetime | Sets how long the particle system should emit particles |
... further results |
Object:release | Immediately destroys the object's Lua reference. |
Object:type | Gets the type of the object as a string. |
Object:typeOf | Checks whether an object is of a certain type. |
Supertypes
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info