Autodesk-forge, how to adjust the distance of the camera lens in the fittoview state?

when fittoview a component, is there any way to zoom out a little bit

clipboard.png
fittoview

clipboard.png
actually needs to achieve the effect, which is achieved by zooming the mouse wheel. Is there any way to adjust the camera or the method in navigation?

Apr.27,2021

check the methods in Navigation

clipboard.png

  • pass in the specified parameter

explain the pos parameters and coi parameters here. What I need is to cut into the position of the sensor from the first-person perspective, so these two parameters need to be passed into the center of the sensor, and the camera will also aim the cross mark in the first-person plug-in at the sensor (in the same way, you can get the component you want to point to)

.
  • update pivot after setting
self._viewer.navigation.setPivotPoint(true);
  • enable the first view function to cut into the model from the first perspective
self._viewer.loadExtension('Autodesk.FirstPerson', self._viewer.config)
                .then(function () {
                    self._viewer.setActiveNavigationTool('firstperson'); //viewer3d
                });
Menu