Added world reduction after subtree removel from the scene. Removed all sandbox calls to the World interface
This commit is contained in:
@@ -126,16 +126,16 @@ export default class Sandbox {
|
||||
this.refresh()
|
||||
})
|
||||
viewer.on(ViewerEvent.UnloadComplete, (url: string) => {
|
||||
url
|
||||
this.removeViewControls()
|
||||
this.addViewControls()
|
||||
this.properties = this.viewer.getObjectProperties()
|
||||
viewer.World.reduceWorld(this.viewer.getWorldTree().getRenderTree(url).treeBounds)
|
||||
})
|
||||
viewer.on(ViewerEvent.UnloadAllComplete, (url: string) => {
|
||||
this.removeViewControls()
|
||||
this.addViewControls()
|
||||
this.properties = this.viewer.getObjectProperties()
|
||||
viewer.World.resetWorld()
|
||||
// viewer.World.resetWorld()
|
||||
url
|
||||
})
|
||||
viewer.on(ViewerEvent.ObjectClicked, (selectionEvent: SelectionEvent) => {
|
||||
|
||||
@@ -600,6 +600,11 @@ export default class SpeckleRenderer {
|
||||
this.rootGroup.remove(this.rootGroup.getObjectByName(subtreeId))
|
||||
this.updateShadowCatcher()
|
||||
|
||||
const batches = this.batcher.getBatches(subtreeId)
|
||||
batches.forEach((value) => {
|
||||
this.viewer.World.reduceWorld(value.bounds)
|
||||
})
|
||||
|
||||
this.batcher.purgeBatches(subtreeId)
|
||||
this.updateDirectLights()
|
||||
this.updateHelpers()
|
||||
|
||||
Reference in New Issue
Block a user