Added missing description of the anims property of the particle emitter

- Created a description of the object handed to the function setAnim
- Added the property anim to ParticleEmitterConfig
- Changed the parameters description of setAnim to better match
This commit is contained in:
Alvaro Estrada 2023-08-17 11:09:04 -06:00
parent 9080dbf1fd
commit 525730dbb1
3 changed files with 10 additions and 1 deletions

View file

@ -1333,7 +1333,7 @@ var ParticleEmitter = new Class({
* @method Phaser.GameObjects.Particles.ParticleEmitter#setAnim
* @since 3.60.0
*
* @param {(array|string|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} anims - One or more animations, or a configuration object.
* @param {(string|string[]|Phaser.Types.GameObjects.Particles.ParticleEmitterAnimConfig)} anims - One or more animations, or a configuration object.
* @param {boolean} [pickRandom=true] - Whether animations should be assigned at random from `anims`.
* @param {number} [quantity=1] - The number of consecutive particles that will receive each animation.
*

View file

@ -0,0 +1,8 @@
/**
* @typedef {object} Phaser.Types.GameObjects.Particles.ParticleEmitterAnimConfig
* @since 3.60.0
*
* @property {string|string[]} [anims] - One or more animations names.
* @property {boolean} [cycle] - Whether animations will be assigned consecutively (true) or at random (false).
* @property {number} [quantity] - The number of consecutive particles receiving each animation, when `cycle` is true.
*/

View file

@ -58,6 +58,7 @@
* @property {object} [followOffset] - Assigns to {@link Phaser.GameObjects.Particles.ParticleEmitter#followOffset}.
* @property {number} [followOffset.x] - x coordinate of the offset.
* @property {number} [followOffset.y] - y coordinate of the offset.
* @property {string|string[]|Phaser.Types.GameObjects.Particles.ParticleEmitterAnimConfig} [anim] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}.
* @property {number|number[]|string|string[]|Phaser.Textures.Frame|Phaser.Textures.Frame[]|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig} [frame] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.
* @property {string|Phaser.Textures.Frame} [texture] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#texture}. Overrides any texture already set on the Emitter.
* @property {number} [reserve] - Creates specified number of inactive particles and adds them to this emitter's pool. {@link Phaser.GameObjects.Particles.ParticleEmitter#reserve}