Creates a new [[ParticleSystem]].
{{newobjectnotice (日本語)}}
== 関数 ==
=== 概要 ===
<source lang="lua">
system = love.graphics.newParticleSystem( image, buffer )
</source>
=== 引数 ===
{{param (日本語)|Image|image|The image to use.}}
{{param (日本語)|number|buffer (1000)|The max number of particles at the same time.}}
=== 返値 ===
{{param (日本語)|ParticleSystem|system|A new ParticleSystem.}}

== 関数 ==
{{newin|[[0.9.1]]|091|type=variant}}
=== 概要 ===
<source lang="lua">
system = love.graphics.newParticleSystem( texture, buffer )
</source>
=== 引数 ===
{{param (日本語)|Texture|texture|The texture ([[Image]] or [[Canvas]]) to use.}}
{{param (日本語)|number|buffer (1000)|The max number of particles at the same time.}}
=== 返値 ===
{{param (日本語)|ParticleSystem|system|A new ParticleSystem.}}

== 用例 ==
=== Creation and usage of a particle system ===
You can use the [[:File:Love-game-logo-256x256.png|LÖVE logo]] as an example image.
<source lang="lua">
function love.load()
	local img = love.graphics.newImage('logo.png')

	psystem = love.graphics.newParticleSystem(img, 32)
	psystem:setParticleLifetime(2, 5) -- Particles live at least 2s and at most 5s.
	psystem:setEmissionRate(5)
	psystem:setSizeVariation(1)
	psystem:setLinearAcceleration(-20, -20, 20, 20) -- Random movement in all directions.
	psystem:setColors(1, 1, 1, 1, 1, 1, 1, 0) -- Fade to transparency.
end

function love.draw()
	-- Draw the particle system at the center of the game window.
	love.graphics.draw(psystem, love.graphics.getWidth() * 0.5, love.graphics.getHeight() * 0.5)
end

function love.update(dt)
	psystem:update(dt)
end
</source>

== 関連 ==
* [[parent::love.graphics (日本語)]]
* [[ParticleSystem:clone (日本語)]]
* [[Constructs::ParticleSystem (日本語)]]
[[Category:Functions (日本語)]]
[[Sub-Category::Object Creation (日本語)| ]]
{{#set:Description=Creates a new [[ParticleSystem]].}}
{{#set:Since=000}}
== そのほかの言語 ==
{{i18n (日本語)|love.graphics.newParticleSystem}}