Fit model to window in traverse and FBXLoader()

hi, I use this function:

			const fitCameraToObject = function ( object, offset, orbitControls ) {

				const boundingBox = new THREE.Box3();
				boundingBox.setFromObject( object );
				console.log( 'THREE.Box3 / boundingBox:', boundingBox );

				const center = boundingBox.getCenter( new THREE.Vector3() );
				const size = boundingBox.getSize( new THREE.Vector3() );
				console.log( 'center:', center );

				// get the max side of the bounding box
				const maxDim = Math.max( size.x, size.y, size.z );
				const fov = camera.fov * ( Math.PI / 180 );
				let cameraZ = Math.abs( maxDim / 4 * Math.tan( fov * 2 ) );
				
				// offset the camera as desired - usually a value of ~ 1.25 is good to prevent
				// object filling the whole canvas
				if( offset !== undefined && offset !== 0 ) cameraZ *= offset;

				camera.position.set( center.x, center.y, cameraZ );

				// set the far plane of the camera so that it easily encompasses the whole object
				const minZ = boundingBox.min.z;
				const cameraToFarEdge = ( minZ < 0 ) ? -minZ + cameraZ : cameraZ - minZ;

				camera.far = cameraToFarEdge * 3;
				camera.updateProjectionMatrix();

				if ( orbitControls !== undefined ) {

					// set camera to rotate around center of loaded object
					orbitControls.target = center;

					// prevent camera from zooming out far enough to create far plane cutoff
					orbitControls.maxDistance = cameraToFarEdge * 2;

				}

			};

got it from here:

the problem is the model don’t shows up after load. I need to rotate the camera (just pan the mouse around the scene) and the model will show up after few momenets of this manipulations. How to solve this?

here’s the model: Model Viewer

p.s.: my goal is to make the model fit to the screen (mobile/desktop) from this:

to this: