SpriteBatch: setVisible() method
setVisible() method would allow specifying a subset of a SpriteBatch's sprites to be drawn by providing their ids. this would be useful in conjunction with eg. visibility queries you could get from libraries like hardoncollider.
it would have 3 variants:
SpriteBatch:setVisible(...) -- raw list of ids SpriteBatch:setVisible(ids) -- table of ids SpriteBatch:setVisible() -- return to drawing everything
if an invalid id is present, it would simply be ignored.
there could also be a corresponding
getVisible() method too.
not sure whether this would provide any significant performance improvement, but maybe it would help with very large spritebatches