Holds information about batched mesh instances. Created in BatchManager#create.
new Batch(
meshInstances: MeshInstance[],
dynamic: boolean,
batchGroupId: number): Batch
Create a new Batch instance.
The mesh instances to be batched.
boolean
Whether this batch is dynamic (supports transforming mesh instances at runtime).
number
Link this batch to a specific batch group. This is done automatically with default batches.
batchGroupId: number
Link this batch to a specific batch group. This is done automatically with default batches.
dynamic: boolean
Whether this batch is dynamic (supports transforming mesh instances at runtime).
meshInstance: MeshInstance = null
A single combined mesh instance, the result of batching.
origMeshInstances: MeshInstance[];
An array of original mesh instances, from which this batch was generated.
destroy(scene: Scene, layers: number[]): void
Removes the batch from the layers and destroys it.
The scene.
number
The layers to remove the batch from.
void