Open JosephClay opened 2 years ago
Hey, thanks a lot for looking into this and reporting the specific issues. I will try to fix this in the next few days.
Let me know if I can help. I'm on the poimandres discord
I upgraded to latest React/r3f was able to repro the sceneRef.current
issue, still figuring out a fix.
Hi guys, I'm having the same issue. Any idea how to fix it?
Hi Slava and others, I appreciate the long wait - a bit of a crunch at work but I should have some cycles this week to wrap this up.
Hey team any updates on this? Really keen to use this in a project. Thanks for the awesome work.
Thanks for checking in again! Yeah the last month has been really busy at work, I am hoping that time management improves in the coming week. Really appreciating the wait - suspense related issues are super finicky to try and figure out, hence why I need to dig in a bit deeper on this.
Hi, I am also very excited to use this in my project. Any updates? Thanks for amazing work!
Ok, so I did some cleanup work and upgraded to React 18.
As is, the main
branch now works with the latest React but I had to take out the fancy logic that triggered Suspense while baking was going on. So what you'll see currently is the intermediate lightmap texture flashing briefly on the models while baking is going on.
To help with that, I added an onComplete
callback - so at least one can hide the scene initially until the baking is complete.
I will try to wrap up the new work on re-adding Suspense soon, and maybe treat that as a 0.1.0
release haha.
Thank you so much!!!
The update is not yet published to npm right?
The update is not yet published to npm right?
I did not push a new version to NPM yet, this is in a temporary state until I fix suspense 😅.
Oh okay okay, Thanks. I did not meant to rush you btw:)
Some more work in progress here: https://github.com/pmndrs/react-three-lightmap/pull/23. I am moving the actual baking to work in a separate React root and WebGL context - this keeps logic a bit simpler (no need to clean up the temporary baker scene), and should plug into Suspense much better, because the process is completely independent of the suspended React tree.
The latest version of
@react-three/fiber
prevents renderingModified the example sandbox to demonstrate
Tried solving the issue locally. There seems to be 2 issues:
sceneRef.current
isn't receiving a valuerunWorkflow
method gets called twice and errors in the withLightScene method (line 91)