Extends
Members
vertexSize number overrides
The size of one attribute. 1 = 32 bit. x, y, u, v, color, textureIdAndRound -> total = 6
- Default Value:
- 6
Methods
Packs the attributes of a DefaultBatchableMeshElement into the provided views.
Name | Type | Description |
---|---|---|
element |
DefaultBatchableMeshElement |
The DefaultBatchableMeshElement 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 DefaultBatchableQuadElement into the provided views.
Name | Type | Description |
---|---|---|
element |
DefaultBatchableQuadElement |
The DefaultBatchableQuadElement 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. |
Inherited Properties
From class Batcher
attributeBuffer ViewableBuffer inherited
The buffer containing attribute data for all elements in the batch.
attributeSize number inherited
The current size of the attribute data in the batch.
An array of all batches created during the current rendering process.
batchIndex number inherited
The current index of the batch being processed.
- Default Value:
- 0
dirty boolean inherited
Indicates whether the batch data has been modified and needs updating.
- Default Value:
- true
elementSize number inherited
The total number of elements currently in the batch.
elementStart number inherited
The starting index of elements in the current batch.
The geometry used by this batcher. Must be implemented by subclasses.
indexBuffer IndexBufferArray inherited
The buffer containing index data for all elements in the batch.
indexSize number inherited
The current size of the index data in the batch.
maxTextures number readonly inherited
The maximum number of textures per batch.
name string inherited
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.
uid number readonly inherited
unique id for this batcher
Inherited Methods
From class Batcher
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!) |