Gamua / Starling-Extension-Particle-System

A particle system for the Starling framework, compatible with the "Particle Designer" from 71squared.com
Other
323 stars 146 forks source link

particles sorting, "Shaken, not stirred" #9

Open kutu opened 11 years ago

kutu commented 11 years ago

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

white rectangle is a head

before

after

PrimaryFeather commented 11 years ago

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?

kutu commented 11 years ago

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