You can try to use an animation library like GSAP to translate the camera towards the selected 3D object. The code for this looks like so:
gsap.to( camera.position, {
duration: 1, // seconds
x: target.x,
y: target.y,
z: target.z,
onUpdate: function() {
camera.lookAt( center );
}
} );
The target
vector is the destination that you have to define in the first place. After that you can put the above code at the place where console.log( 'Intersection:', intersects[ 0 ] );
is now executed.
Related topic: Need help with gsap camera and OrbitControls animations
Opening a popup after the animation has been finished can be triggered in the onComplete()
callback.