Batched collision layer updates when tiles change.
Queues changed tile positions and rebuilds collision in bulk.
Usage:
constrebuilder = newCollisionRebuilder(); rebuilder.markDirty(5, 3); rebuilder.markDirty(5, 4); // At end of frame or after batch operations: constdirtyTiles = rebuilder.flush(); for (const { x, y } ofdirtyTiles) { tilemapLayer.setCollision(x, y, ...); }
Batched collision layer updates when tiles change. Queues changed tile positions and rebuilds collision in bulk.
Usage: