Starling-Extension-Particle-System icon indicating copy to clipboard operation
Starling-Extension-Particle-System copied to clipboard

particles sorting, "Shaken, not stirred"

Open kutu opened this issue 11 years ago • 2 comments

if i want to do trail effect, but some new initialized particles rendered under oldest

white rectangle is a head

before

after

kutu avatar Oct 27 '12 06:10 kutu

Hm ... I see what you mean, but this will have performance implications. First, depending on how the vector class works internally, "splice" will have to move all indices above the current index "down". Furthermore, the method creates a temporary object each time it is called (the return vector).

So I'm not super happy about the implications this has -- especially on those particle systems that don't care about the sorting.

But we could make this an optional feature; a property that controls that behavior ... we'd need a good name for that, though. Any ideas?

PrimaryFeather avatar Oct 29 '12 15:10 PrimaryFeather

name it how you like it maybe add new boolean parameter to the end of constructor with default value to false

kutu avatar Oct 29 '12 16:10 kutu