speckle-server
speckle-server copied to clipboard
Dispose() method in Viewer.ts
Would be great to have Dispose() method in Viewer.ts implemented :)
Any news about this?
We have a Vue3 web app with multiple routes.
When the viewer is loaded the first time it works fine:
But after routing back to the same viewer component the shading breaks:
We do the following
onBeforeUnmount(async () => {
if (viewer) {
await viewer.unloadAll();
viewer.dispose();
}
});
The current implementation of dispose()
says // TODO: currently it's easier to simply refresh the page :)
Refreshing the page does solve the issue which can also be done with location.reload()
but this causes a white page every time we change components.
Is there a better workaround?
I tried using DebugViewer
and disposing of the WebGLRenderer but with no luck.
Thanks.
Thank you for letting us know about this issue. We'll look into it as soon as we have some bandwidth available
Hi again, do you have any information about a possible workaround for this issue? How can we properly dispose of the Renderer ourselves?
Hello @Sticcia
Thank you for your patience! We we will be looking into this issue in the following days and will surely come back with a resolution
Cheers
Hi @Sticcia
We've merged in a fix for this issue and will be available in the next release soon!
Cheers
Thank you so much for the great work!