Environment Zoom #2864
Unanswered
sameterkanboz
asked this question in
Q&A
Replies: 1 comment
-
Hi there, To zoom in on the Environment component in your code, you can adjust the camera's position and field of view. Here's an example of how you can modify your code to achieve that: <>
<Canvas
style={{
width: "100%",
height: windowHeight.current,
}}
camera={{ position: [0, 0, 2], fov: 60 }} // Adjust the camera's position and field of view (fov)
>
<Environment files="./assets/new_hdr.hdr" background />
<Html transform position={[0, 10, 5]}>
<text style={{ backgroundColor: "red" }}>MyButton</text>
</Html>
<Stats />
<OrbitControls
minPolarAngle={-Math.PI / 2}
maxPolarAngle={Math.PI / 2.1}
autoRotate
autoRotateSpeed={-0.75}
enableZoom={true}
enablePan={false}
enableRotate={true}
/>
<MyModel position={[0, 0, 0]} />
</Canvas>
</> In the updated code, I added Feel free to experiment with different values for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hi, is there a way for me to zoom right into the Environment component? (I am using Environment component as 360 viewer. and to examine the results of the seat in the hdr extension image I uploaded) here ise the example code;
Beta Was this translation helpful? Give feedback.
All reactions