Phaser API Documentation

  Version: 
addEmitZone(zone)

Description:

Adds a new Particle Emission Zone to this Emitter.

An EdgeZone places particles on its edges. Its source can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable getPoints method.

A RandomZone places the particles randomly within its interior. Its source can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable getRandomPoint method.

An Emission Zone can only exist once within this Emitter.

Parameters:

name type description
zone Phaser.Types.GameObjects.Particles.EmitZoneObject | Array.<Phaser.Types.GameObjects.Particles.EmitZoneObject>

An Emission Zone configuration object, a RandomZone or EdgeZone instance, or an array of them.

Returns:
Description:

An array of the Emission Zones that were added to this Emitter.

Since: 3.60.0