react-three-lightmap icon indicating copy to clipboard operation
react-three-lightmap copied to clipboard

scene not rendered in latest react-three/fiber

Open JosephClay opened this issue 3 years ago • 14 comments
trafficstars

The latest version of @react-three/fiber prevents rendering

Modified the example sandbox to demonstrate

Tried solving the issue locally. There seems to be 2 issues:

JosephClay avatar Jun 24 '22 18:06 JosephClay

Hey, thanks a lot for looking into this and reporting the specific issues. I will try to fix this in the next few days.

unframework avatar Jun 25 '22 20:06 unframework

Let me know if I can help. I'm on the poimandres discord

JosephClay avatar Jun 28 '22 15:06 JosephClay

I upgraded to latest React/r3f was able to repro the sceneRef.current issue, still figuring out a fix.

unframework avatar Jul 05 '22 23:07 unframework

Hi guys, I'm having the same issue. Any idea how to fix it?

vsabinin avatar Jul 15 '22 16:07 vsabinin

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.

unframework avatar Jul 19 '22 19:07 unframework

Hey team any updates on this? Really keen to use this in a project. Thanks for the awesome work.

nikolai-sim avatar Aug 03 '22 22:08 nikolai-sim

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.

unframework avatar Aug 04 '22 01:08 unframework

Hi, I am also very excited to use this in my project. Any updates? Thanks for amazing work!

03hgryan avatar Aug 16 '22 18:08 03hgryan

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.

unframework avatar Aug 19 '22 01:08 unframework

Thank you so much!!!

03hgryan avatar Aug 22 '22 05:08 03hgryan

The update is not yet published to npm right?

03hgryan avatar Aug 24 '22 12:08 03hgryan

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 😅.

unframework avatar Aug 25 '22 14:08 unframework

Oh okay okay, Thanks. I did not meant to rush you btw:)

03hgryan avatar Aug 25 '22 14:08 03hgryan

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.

unframework avatar Nov 07 '22 02:11 unframework