Generator function which takes the id of a render tree, builds the batches, then adds the batches to the scene. The function will yield after each batch has been created, allowing for user defined code to be run in the following fashion.
Copy
Ask AI
for await (const step of speckleRenderer.addRenderTree(id)) { // User defined code}
Parameters
subtreeId: The id of the render tree to add to the scene
Creates a material based on the intersection between RenderMaterial, DisplayStyle and MaterialOptions. Because this method does not discriminate based on the render view’s geometry type (mesh, lines, points) it needs to be able to build materials suitable for all gometry types.Parameters
{ objects: number batchCount: number drawCalls: number trisCount: number vertCount: number batchDetails: Array<{ drawCalls: number minDrawCalls: number tris: number verts: number }}