Particles.Arcade.Emitter#setScale()

setScale(minX, maxX, minY, maxY, rate, ease, yoyo) → {Phaser.Particles.Arcade.Emitter}

A more compact way of setting the scale constraints of the particles.
The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis.
If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

Parameters
Name Type Argument Default Description
minX number <optional>
1

The minimum value of Particle.scale.x.

maxX number <optional>
1

The maximum value of Particle.scale.x.

minY number <optional>
1

The minimum value of Particle.scale.y.

maxY number <optional>
1

The maximum value of Particle.scale.y.

rate number <optional>
0

The rate (in ms) at which the particles will change in scale from min to max, or set to zero to pick a random size 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 811)
doc_phaser
2017-02-14 10:58:30
Comments
Leave a Comment

Please login to continue.