You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pointer events through a Fisheye camera become inaccurate after canvas size change. This can be observed in the ThreeJS Journey Lv 1 Fisheye demo on the rotating box—resizing the window causes a offset to its pointer events.
Relevant code:
Split view demo of the current behavior, and the suggested solution:
Adding width and height to the dependency array of compute's useCallback inside Fisheye fixes the issue (see linked FisheyePatch component in above demo)
The text was updated successfully, but these errors were encountered:
three
version:0.169.0
@react-three/fiber
version:8.17.6
@react-three/drei
version:9.115.0
node
version:22.9.0
npm
(oryarn
) version: 10.8.3Problem description:
Pointer events through a Fisheye camera become inaccurate after canvas size change. This can be observed in the ThreeJS Journey Lv 1 Fisheye demo on the rotating box—resizing the window causes a offset to its pointer events.
Relevant code:
Split view demo of the current behavior, and the suggested solution:
https://codesandbox.io/p/sandbox/drei-fisheye-raycast-resize-demo-g6cq3n?file=%2Fsrc%2FFisheyePatched.tsx%3A75%2C5-75%2C20
Suggested solution:
Adding
width
andheight
to the dependency array ofcompute
'suseCallback
insideFisheye
fixes the issue (see linkedFisheyePatch
component in above demo)The text was updated successfully, but these errors were encountered: