Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispose() method in Viewer.ts #1544

Closed
saschabul opened this issue Apr 20, 2023 · 6 comments
Closed

Dispose() method in Viewer.ts #1544

saschabul opened this issue Apr 20, 2023 · 6 comments
Assignees
Labels
bug Something isn't working [ viewer ] issues related to the 3d viewer package

Comments

@saschabul
Copy link

Would be great to have Dispose() method in Viewer.ts implemented :)

@saschabul saschabul added the bug Something isn't working label Apr 20, 2023
@AlexandruPopovici AlexandruPopovici added the [ viewer ] issues related to the 3d viewer package label May 29, 2023
@Sticcia
Copy link

Sticcia commented Dec 11, 2023

Any news about this?

We have a Vue3 web app with multiple routes.

When the viewer is loaded the first time it works fine:
Screenshot_3

But after routing back to the same viewer component the shading breaks:
Screenshot_4
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.

@AlexandruPopovici
Copy link
Contributor

Thank you for letting us know about this issue. We'll look into it as soon as we have some bandwidth available

@Sticcia
Copy link

Sticcia commented Mar 19, 2024

Hi again, do you have any information about a possible workaround for this issue? How can we properly dispose of the Renderer ourselves?

@AlexandruPopovici
Copy link
Contributor

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

@AlexandruPopovici AlexandruPopovici mentioned this issue Apr 4, 2024
6 tasks
@AlexandruPopovici
Copy link
Contributor

Hi @Sticcia

We've merged in a fix for this issue and will be available in the next release soon!

Cheers

@Sticcia
Copy link

Sticcia commented Apr 4, 2024

Thank you so much for the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working [ viewer ] issues related to the 3d viewer package
Projects
None yet
Development

No branches or pull requests

3 participants