Abstract
Create a new instance.
Changes to objects will be propagated to the change tracker
Protected
Readonly
batchesBatches. All batches in this collection are at least partially occupied.
Protected
Readonly
changeChanges to objects will be propagated to the change tracker
Protected
Optional
maximumsProtected
Readonly
queuedNew entries are queued until all changes are applied to a batch.
Entries across all batches. Does not respect queued adds/deletes.
Add an object to the batcher. Additions are queued, apply with Batcher#finalize.
Object to add
Created entry
Protected
addProtected
applyApply only entries with queued changes. Entries in between will may be moved if gaps occur or space is needed.
Batch
Protected
applyProtected
applyApply all queued changes.
Protected
applyDistribute queued new entries into batches. May create new batches if needed.
Protected
canMark an entry as changed. Changes are queued, apply with Batcher#finalize.
Changed entry
true
if the entry was present
Protected
changeClear batcher of all batches and entries.
Protected
clearClear a batch of all its entries. Batcher#discardEntry should be called for each entry.
Batch
Protected
Abstract
copyMove data within a batch. Used if e.g. entries change size and multiple entries must be moved to fill gaps or crate space.
Affected batch
Target element offset
Start element offset
End element offset
Protected
Abstract
createProtected
Abstract
createDelete an entry. Deletes are queued unless the entry is itself queued for add, apply with Batcher#finalize.
Entry
true
if an entry was deleted/queued
Protected
Abstract
discardProtected
discardDiscard empty batches.
Protected
Abstract
discardFind an entry for object
by doing a linear search through all batches and entries.
Object to find entry for
First entry, if present
If Batcher#add was called multiple times with the same object, multiple entries can exist for the same object. In this case this method returns only the first entry it finds.
Generally, the returned entry from Batcher#add should be stored to then reuse it for Batcher#change and Batcher#change calls.
Protected
onProtected
queueProtected
queueProtected
rebuildOptional
maxSpriteCount: numberProtected
shouldDecide if a batch should be completely rebuilt. Generally this should be true if most/all of the batch's entries must be processed anyways.
Batch
true
if batch should be rebuilt.
Protected
updateUpdate batch. Should call either Batcher#rebuildBatch or Batcher#applyBatchChanges.
Batch