Members
attributeBuffer ViewableBuffer
The buffer containing attribute data for all elements in the batch.
The current size of the attribute data in the batch.
batches Batch[]
An array of all batches created during the current rendering process.
The current index of the batch being processed.
- Default Value:
- 0
Indicates whether the batch data has been modified and needs updating.
- Default Value:
- true
The total number of elements currently in the batch.
The starting index of elements in the current batch.
geometry Geometry
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.
The maximum number of textures per batch.
The name of the batcher. Must be implemented by subclasses.
shader Shader
The shader used by this batcher. Must be implemented by subclasses. this can be shared by multiple batchers of the same type.
unique id for this batcher
The vertex size of the batcher. Must be implemented by subclasses.
Methods
breaks 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)
Name | Type | Description |
---|---|---|
instructionSet |
InstructionSet |
Resizes the attribute buffer to the given size (1 = 1 float32)
Name | Type | Description |
---|---|---|
size |
number |
the size in vertices to ensure (not bytes!) |
Resizes the index buffer to the given size (1 = 1 float32)
Name | Type | Description |
---|---|---|
size |
number |
the size in vertices to ensure (not bytes!) |
Packs the attributes of a BatchableMeshElement into the provided views. Must be implemented by subclasses.
Name | Type | Description |
---|---|---|
element |
BatchableMeshElement |
The BatchableMeshElement to pack. |
float32View |
Float32Array |
The Float32Array view to pack into. |
uint32View |
Uint32Array |
The Uint32Array view to pack into. |
index |
number |
The starting index in the views. |
textureId |
number |
The texture ID to use. |
Packs the attributes of a BatchableQuadElement into the provided views. Must be implemented by subclasses.
Name | Type | Description |
---|---|---|
element |
BatchableQuadElement |
The BatchableQuadElement to pack. |
float32View |
Float32Array |
The Float32Array view to pack into. |
uint32View |
Uint32Array |
The Uint32Array view to pack into. |
index |
number |
The starting index in the views. |
textureId |
number |
The texture ID to use. |