Add the ability to buffer commands
Proposed changes
This PR adds an optional command buffer to Matter's registry. The command buffer caches insertions, removals, spawns, and despawns until explicitly told to apply them. It is enabled by default if you use a Loop and will commit changes between systems.
The old system that prevented iterator invalidation has been replaced with this, but that is not the only motivation for a command buffer.
Related issues
TODO
Additional comments
This is a fairly breaking change even if you don't elect to use it. Educational materials will be important
CI will pass with https://github.com/matter-ecs/matter/pull/89
I am unsure, so I didn't mention anything in review, but it seems like we fail at tracking the correct size of the world in some places.
Can you double check this? And do we have tests for this?
I am unsure, so I didn't mention anything in review, but it seems like we fail at tracking the correct size of the world in some places.
Can you double check this? And do we have tests for this?
I've checked and I believe everything is fine - I've added a test for this in deferred mode.