SIGN IN SIGN UP

feat: Add `HasAutoBatchedChildren` mixin (#3850)

This pull request introduces automatic sprite batching for improved
rendering performance. The main change is the addition of the
`HasAutoBatchedChildren` mixin, which enables groups of sprite
components to be rendered in a single draw call per atlas, reducing
overhead

Sprite batching implementation:
- Added the `HasAutoBatchedChildren` mixin, which accumulates eligible
sprite and animation components for batch rendering, flushes batches at
priority boundaries, and provides runtime toggling
- Updated the `Component` class to support per-child rendering
interception (`renderChild`) and post-children rendering hooks
(`afterChildrenRendered`), enabling batching logic to be integrated
cleanly

Updated the Rogue Shooter example to use auto-batching with a toggle to
see the performance difference.


https://github.com/user-attachments/assets/4735d835-eb0f-431b-b093-68a858bba9d5
D
DevKage committed
a2b7f9385f993af51b5ce5f5724d2fa9ef058b79
Parent: f4048a2
Committed by GitHub <noreply@github.com> on 3/13/2026, 9:16:10 AM