Phaser API Documentation

  Version: 
particles([x], [y], [texture], [config])

Description:

Creates a new Particle Emitter Game Object and adds it to the Scene.

If you wish to configure the Emitter after creating it, use the ParticleEmitter.setConfig method.

Prior to Phaser v3.60 this function would create a ParticleEmitterManager. These were removed in v3.60 and replaced with creating a ParticleEmitter instance directly. Please see the updated function parameters and class documentation for more details.

Note: This method will only be available if the Particles Game Object has been built into Phaser.

Parameters:

name type arguments description
x number <optional>

The horizontal position of this Game Object in the world.

y number <optional>

The vertical position of this Game Object in the world.

texture string | Phaser.Textures.Texture <optional>

The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.

config Phaser.Types.GameObjects.Particles.ParticleEmitterConfig <optional>

Configuration settings for the Particle Emitter.

Returns:
Description:

The Game Object that was created.