I would caution you against changing the API too much if you hope for this project to become part of Flashpunk proper. Including a z
property in addition to the layer
property is just being redundant; it would be far better to abstract render depth away and set z
based on the layer
.
Besides, there’s no good reason for the depth/z value to be a Number in orthographic rendering. All you need to know is if object A should be below object B, and integers work well enough for that.