Updated the older synchronous object loading function

This commit is contained in:
AlexandruPopovici
2023-06-06 20:29:26 +03:00
parent b3d8c5d28c
commit fe1a9f2eb3
3 changed files with 6 additions and 4 deletions
@@ -496,8 +496,8 @@ export default class SpeckleRenderer {
this._needsRender = true
}
public addRenderTree(subtreeId: string) {
this.batcher.makeBatches(
public async addRenderTree(subtreeId: string) {
await this.batcher.makeBatches(
this.viewer.getWorldTree().getRenderTree(subtreeId),
SpeckleTypeAllRenderables
)
+1 -1
View File
@@ -477,7 +477,7 @@ export class Viewer extends EventEmitter implements IViewer {
Logger.log('SYNC Tree build time -> ', performance.now() - t0)
t0 = performance.now()
this.speckleRenderer.addRenderTree(url)
await this.speckleRenderer.addRenderTree(url)
Logger.log('SYNC batch build time -> ', performance.now() - t0)
this.zoom()