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

[BUG] When resizing a canvas with a LayoutCamera, pointer events on meshes are aligned incorrectly. #2621

Open
zArubaru opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@zArubaru
Copy link

zArubaru commented Apr 15, 2024

2. Describe the bug

When resizing the canvas, LayoutCamera displays the scene correctly. But pointer events are treated like the meshes exist within the original area of the canvas.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
This was forked (updated packages to latest) and simplified from the Layout animations example on the framer motion website:
https://codesandbox.io/p/sandbox/framer-motion-3d-layoutcamera-forked-5lxprc

4. Steps to reproduce
Steps to reproduce the behavior:

  1. Open console (for log).
  2. Hover over black ball (should get "hovering over sphere" in console).
  3. Click within container, will transition canvas to cover the page.
  4. Hover over red highlighted area (should get "hovering over sphere" in console).
  5. You may test this again, but first remove the <Camera />, and see that then meshes get pointer events correctly.

5. Expected behavior
We should get "hovering over sphere" in console, when hovering over black ball, in both states.

7. Environment details
MacOS / Arc (Chromium Webkit)

@zArubaru zArubaru added the bug Something isn't working label Apr 15, 2024
@zArubaru zArubaru changed the title [BUG] When reizing a canvas with a LayoutCamera, pointer events on meshes are aligned incorrectly. [BUG] When resizing a canvas with a LayoutCamera, pointer events on meshes are aligned incorrectly. Apr 15, 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

No branches or pull requests

1 participant