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

Rendering stops when using an offset View with a non-full-screen Canvas #2223

Open
zerovox opened this issue Nov 19, 2024 · 0 comments · May be fixed by #2224
Open

Rendering stops when using an offset View with a non-full-screen Canvas #2223

zerovox opened this issue Nov 19, 2024 · 0 comments · May be fixed by #2224
Labels
bug Something isn't working

Comments

@zerovox
Copy link

zerovox commented Nov 19, 2024

  • three version: 0.170.0
  • @react-three/fiber version: 8.17.10
  • @react-three/drei version: 9.117.3
  • node version: 23.2.0
  • npm (or yarn) version: 10.9.0

Problem description:

When using a non-full screen canvas and an offset <View />, there are situations where the scene does not render.

Screenshot.2024-11-19.at.03.15.25.PM.mp4

Relevant code:

https://github.com/zerovox/drei-view-canvas-size-bug

npm install
npn run dev

Suggested solution:

I believe the bug is in this computeContainerPosition function, I'll take a look at submitting a patch for this shortly https://github.com/kmannislands/drei/blob/d0f6751b1edbfc7a27f34c61fec259e895d2b88a/src/web/View.tsx#L50-L72

@zerovox zerovox added the bug Something isn't working label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant