The structural component of the viewer’s scenegraph. All loaded objects are split and organized into batches.
Instead of adding each individual object as an Object3D derived entity to the three.js scene,
we split and organize them into batches, which are then added to the three.js scene.The Batch is defined as an interface, and is implemented by several batch types based on the geometry type.
Sets materials to specific objects inside the batch by specifying their draw ranges.
Materials are assigned to objects inside batches by using this method.
Normally, the viewer offers a higher level of assigning materials through
SpeckleRenderer’s
setMaterial which calls this
method internally.
Sets visibility of objects inside the batch. Implementation specific.
Mesh batches currently only allow for contiguous visibility between draw ranges. i.e no different visibility gaps. Line batches however are not restricted by this.
Represents a region of the batch. Multi purpose. It can represent either a specific object from the batch, or a specific index range in the batch spanning across multiple objects.