Replies: 3 comments 6 replies
-
This happens when I duplicate the 3d viewer on the page: Not really sure what that tells me tho.. something isn't mounting or something. |
Beta Was this translation helpful? Give feedback.
-
the context loss is normal, when the canvas unmounts it must force a context loss to avoid memory leaks, threejs has a function for that that it calls. i would first check if all versions are up to date @react-three/fiber and @react-three/drei. the other error looks like you are re-using things across multiple canvases? if that's the case threejs does not allow that. |
Beta Was this translation helpful? Give feedback.
-
I'm also experiencing this with my Next JS application. Everything works when navigating to the page with the scene OR loading the site on the page with the scene. But when I navigate to the home page from the page with the scene and then try returning to the page with the scene, the canvas is blank. Works: Does not work: I've tried removing the environment component, upgrading the R3F and DREI packages, as well as a handful of other things and the scene still shows a blank canvas. Any help would be appreciated! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
www.fiberstand.com < The 3dviewer works fine, but when navigating with the menu window and then navigating back the scene loses some lightning looks like it (or some other issue) You can see the sides of the model are super dark when navigating back. Refreshing the page again solves the issue.
when navigating out this is a console error: THREE.WebGLRenderer: Context Lost.
I am using next ,react three fiber and drei.
I just spend time to setup a sandbox to recreate it but the issue doesn't happen in the sandbox. But you can still view the code:https://codesandbox.io/s/reactfiberlightningissue-ynueu?file=/src/App.js
This is without next. I use a dynamic import SSR false to load the react component in next.
Or maybe the problem does exists but because codesandbox does a hardrefresh everytime it doesn't show?
It looks like there is some caching going on of some sort or things aren't disposed right. I am a pretty noob in JS and three so any pointers will help.
Beta Was this translation helpful? Give feedback.
All reactions