Phaser API Documentation

  Version: 
Filter
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord

Phaser . GameObjects . Particles . Zones . RandomZone

This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord

Phaser . GameObjects . Particles . Zones . RandomZone

A zone that places particles randomly within a shapes area.

Constructor:

new RandomZone(source)

Parameters:

name type description
source Phaser.Types.GameObjects.Particles.RandomZoneSource

An object instance with a getRandomPoint(point) method.

Members

<private> _tempVec: Phaser.Math.Vector2
Focus
Focus

Description:

Internal calculation vector.

Type:
Focus
Focus

Description:

An object instance with a getRandomPoint(point) method.

Type:
Focus
Focus

Methods

getPoint(particle)
Focus
Focus

Description:

Get the next point in the Zone and set its coordinates on the given Particle.

Parameters:

name type description
particle Phaser.GameObjects.Particles.Particle

The Particle.

Examples:
Focus
Focus