Set the property by which active particles are sorted prior to be rendered.
It allows you to control the rendering order of the particles.
This can be any valid property of the Particle
class, such as y
, alpha
or lifeT
.
The 'alive' particles array is sorted in place each game frame. Setting a
sort property will override the particleBringToTop
setting.
If you wish to use your own sorting function, see setSortCallback
instead.
name | type | arguments | Default | description |
---|---|---|---|---|
property | string | <optional> |
The property on the |
|
ascending | boolean | <optional> | true |
Should the particles be sorted in ascending or descending order? |
This Particle Emitter.