Class MeshBatcher<O>

Type Parameters

Hierarchy (View Summary)

Constructors

Properties

_batches: MeshBatch<O>[] = []
batches: readonly MeshBatch<O>[] = ...

Batches. All batches in this collection are at least partially occupied.

batchPool: Pool<MeshBatch<O>>

Object pool for batches

changeTracker: ChangeTracker

Changes to objects will be propagated to the change tracker

entryPool: Pool<MeshBatchEntry<O>>

Object pool for batch entries

maxSize: number

Max size of a batch. Unit depends on batcher.

maxTextureCount: number
maxVertexCount: number
objectBatches: Map<O, MeshBatch<O>> = ...

For faster lookup of object -> batch.

queuedAdds: MeshBatchEntry<O>[] = []

Newly added entries are queued until all changes are applied to a batch.

Methods