littlektframework / littlekt

A multiplatform WebGPU 2D game framework written in Kotlin. Build your own game engine on top.
https://littlekt.com
Apache License 2.0
321 stars 12 forks source link

Update `NodeList` to keep original children order while using custom render sort #150

Closed LeHaine closed 2 years ago

LeHaine commented 2 years ago

Previously, sorting with ySort or any custom sort would sort the nodes list directly which would change the order in which the Node.update() method is invoked. This change allows to keep the original update order while using a custom sort to allow for rendering in a different order.