Replies: 2 comments 5 replies
-
the canvas is responsive by default in that is adapts to resize. objects stay put in their size because that has to do with camera fov. you can use useThree and adapt: https://codesandbox.io/s/reurope-r3f-basic-7kuzy |
Beta Was this translation helpful? Give feedback.
2 replies
-
How would you be able to override the default resize behaviour? For example I simple want to cap the camera aspect ratio, so that it is responsive up until a give 16/9 ratio |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm trying to make all the contents in my Canvas responsive to window resizing and scale up/down accordingly. The Canvas has a fixed aspect ratio. Is there anything like a svg viewBox attribute available in react-three-fiber that makes this simple? I'm using an orthographic camera that is either programmatically (dolly-like) controlled, or controlled with Trackball Controls to look at an instanced mesh.
Thank you for any help.
Beta Was this translation helpful? Give feedback.
All reactions