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
+3 -1
View File
@@ -109,7 +109,7 @@ const getStream = () => {
// prettier-ignore
// 'https://speckle.xyz/streams/da9e320dad/commits/5388ef24b8?c=%5B-7.66134,10.82932,6.41935,-0.07739,-13.88552,1.8697,0,1%5D'
// Revit sample house (good for bim-like stuff with many display meshes)
'https://speckle.xyz/streams/da9e320dad/commits/5388ef24b8'
// 'https://speckle.xyz/streams/da9e320dad/commits/5388ef24b8'
// 'https://latest.speckle.dev/streams/c1faab5c62/commits/6c6e43e5f3'
// 'https://latest.speckle.dev/streams/58b5648c4d/commits/60371ecb2d'
// 'Super' heavy revit shit
@@ -272,6 +272,8 @@ const getStream = () => {
// 'https://latest.speckle.dev/streams/e258b0e8db/commits/108971810d'
// 'https://latest.speckle.dev/streams/55cc1cbf0a/objects/d7ae178fb6a7b1f599a177486e14f9a6'
// 'https://latest.speckle.dev/streams/e258b0e8db/objects/3fcd63d80cf791c3f554a795846e62f6'
// 'https://latest.speckle.dev/streams/92b620fb17/commits/6adbcfa8dc'
'https://latest.speckle.dev/streams/92b620fb17/commits/6adbcfa8dc'
)
}
@@ -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()