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

Make looking for parent not crash #2250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

i-am-the-slime
Copy link
Contributor

@i-am-the-slime i-am-the-slime commented Dec 4, 2024

Why

I have trouble with this codesandbox:

It uses the latest versions of react and fiber. Every frame it fails to find a parent and logs an error. I suppose this is because this logic doesn't work anymore.

What

I'm proposing a safer variant here checking if __r3f exists, but I'm not sure if internals have changed and there's a better way.

Checklist

  • Ready to be merged

I have trouble with this [codesandbox](https://codesandbox.io/p/sandbox/scene-transitions-reveal-forked-nnj7py?file=%2Fpackage.json%3A19%2C8):

It uses the latest versions of react and fiber. Every frame it fails to find a parent and logs an error. I suppose this is because [this logic](https://github.com/pmndrs/drei/blob/master/src/core/RenderTexture.tsx#L60-L66) doesn't work anymore. 

I'm proposing a safer variant here, but I'm not sure if internals have changed and there's a better way.
Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 7:09pm

Copy link

vercel bot commented Dec 4, 2024

@i-am-the-slime is attempting to deploy a commit to the Poimandres Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codesandbox-ci bot commented Dec 4, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant