yomotsu / camera-controls

A camera control for three.js, similar to THREE.OrbitControls yet supports smooth transitions and more features.

Home Page:https://yomotsu.github.io/camera-controls/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It would be nice to have setFov method with smooth transition

vinkovsky opened this issue · 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

Is this different than setZoom?

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