camera-controls icon indicating copy to clipboard operation
camera-controls copied to clipboard

It would be nice to have setFov method with smooth transition

Open vinkovsky opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

vinkovsky avatar Apr 22 '24 11:04 vinkovsky

Is this different than setZoom?

richfwebb avatar Jun 04 '24 22:06 richfwebb

Exactly. The functionality of zoom and FOV are closely related. zoom affect its fov in a perspective camera. see https://github.com/mrdoob/three.js/blob/7a62164566e030611c0e4c92e9747bc005cdab26/src/cameras/PerspectiveCamera.js#L217

Use zoom instead, which works in both perspective and orthographic.

If you wish to compute the final FOV, please check below. https://github.com/mrdoob/three.js/blob/7a62164566e030611c0e4c92e9747bc005cdab26/src/cameras/PerspectiveCamera.js#L88-L93

yomotsu avatar Jun 07 '24 02:06 yomotsu