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
fix: View component supports non-full screen use cases #981
fix: View component supports non-full screen use cases #981
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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. Latest deployment of this branch, based on commit d0f6751:
|
Handling seems correct with latest react-three-fiber: https://codesandbox.io/s/view-skissor-forked-cxyur1?file=/src/App.js Confirmed that the warning message is logged with older versions but the bottom two views have gone missing: https://codesandbox.io/s/view-skissor-forked-249ngx I'll investigate |
The bug in the old version box is that the Lines 44 to 46 in c7fa011
Fixed box: https://codesandbox.io/s/view-skissor-forked-gvhfg1?file=/src/View.tsx:2788-2912 Any ideas why the "incorrect" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
67e8bc3
to
d0f6751
Compare
Implemented a speculative fix. I think I'll add a story ( |
Any update on this? |
🎉 This PR is included in version 9.42.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Why
Resolves #944
What
Since the upstream fix to @react-three/fiber has been released in v8.1.0, this takes advantage of the position information to get
View
working as expected in non-fullscreen use cases.Additionally, a warning is logged (using console.warn) if an older version of react-three-fiber is detected. I couldn't find any existing logging infrastructure for this type of dev mode warning at a glance so I opted to keep it simple. Please advise if there is a better approach here.
Checklist