Difference between revisions of "love.graphics.newParticleSystem"

m
(Added texture variant)
Line 7: Line 7:
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|Image|image|The image object.}}
+
{{param|Image|image|The image to use.}}
 +
{{param|number|buffer|The max number of particles at the same time.}}
 +
=== Returns ===
 +
{{param|ParticleSystem|system|A new ParticleSystem.}}
 +
 
 +
== Function ==
 +
{{newin|[[0.9.1]]|091|type=variant}}
 +
=== Synopsis ===
 +
<source lang="lua">
 +
system = love.graphics.newParticleSystem( texture, buffer )
 +
</source>
 +
=== Arguments ===
 +
{{param|Texture|texture|The texture to use.}}
 
{{param|number|buffer|The max number of particles at the same time.}}
 
{{param|number|buffer|The max number of particles at the same time.}}
 
=== Returns ===
 
=== Returns ===

Revision as of 08:10, 30 January 2014

Creates a new ParticleSystem.

O.png This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!  



Function

Synopsis

system = love.graphics.newParticleSystem( image, buffer )

Arguments

Image image
The image to use.
number buffer
The max number of particles at the same time.

Returns

ParticleSystem system
A new ParticleSystem.

Function

Available since LÖVE 0.9.1
This variant is not supported in earlier versions.

Synopsis

system = love.graphics.newParticleSystem( texture, buffer )

Arguments

Texture texture
The texture to use.
number buffer
The max number of particles at the same time.

Returns

ParticleSystem system
A new ParticleSystem.

See Also


Other Languages