Advanced
The buffer containing attribute data for all elements in the batch.
The current size of the attribute data in the batch.
An array of all batches created during the current rendering process.
The current index of the batch being processed.
Indicates whether the batch data has been modified and needs updating.
The total number of elements currently in the batch.
The starting index of elements in the current batch.
The geometry used by this batcher. Must be implemented by subclasses.
The buffer containing index data for all elements in the batch.
The current size of the index data in the batch.
Readonly
maxThe maximum number of textures per batch.
The name of the batcher. Must be implemented by subclasses.
The shader used by this batcher. Must be implemented by subclasses. this can be shared by multiple batchers of the same type.
Readonly
uidunique id for this batcher
The size of one attribute. 1 = 32 bit. x, y, u, v, color, textureIdAndRound -> total = 6
Static
defaultbreaks the batcher. This happens when a batch gets too big, or we need to switch to a different type of rendering (a filter for example)
Resizes the attribute buffer to the given size (1 = 1 float32)
the size in vertices to ensure (not bytes!)
Resizes the index buffer to the given size (1 = 1 float32)
the size in vertices to ensure (not bytes!)
Packs the attributes of a DefaultBatchableMeshElement into the provided views.
The DefaultBatchableMeshElement to pack.
The Float32Array view to pack into.
The Uint32Array view to pack into.
The starting index in the views.
The texture ID to use.
Packs the attributes of a DefaultBatchableQuadElement into the provided views.
The DefaultBatchableQuadElement to pack.
The Float32Array view to pack into.
The Uint32Array view to pack into.
The starting index in the views.
The texture ID to use.
The default batcher is used to batch quads and meshes. This batcher will batch the following elements: