setAlpha(min, max, rate, ease, yoyo) → {Phaser.Particles.Arcade.Emitter}
A more compact way of setting the alpha constraints of the particles.
The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max.
If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
min | number | <optional> | 1 | The minimum value for this range. |
max | number | <optional> | 1 | The maximum value for this range. |
rate | number | <optional> | 0 | The rate (in ms) at which the particles will change in alpha from min to max, or set to zero to pick a random alpha between the two. |
ease | function | <optional> | Phaser.Easing.Linear.None | If you've set a rate > 0 this is the easing formula applied between the min and max values. |
yoyo | boolean | <optional> | false | If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values) |
Returns
This Emitter instance.
- Source code: particles/arcade/Emitter.js (Line 769)
Please login to continue.