title: Three.js zoom to fit width of objects (ignoring height)
body: <p>I have a set of block objects, and I'd like to set the perspective camera so that their entire width is fully visible (the height will be too big - that's OK, we're going to pan up and down).</p>
  
  <p>I've seen there are a number of questions close to this, such as:</p>
  
  <p><a href="https://stackoverflow.com/questions/11274358/adjusting-camera-for-visible-three-js-shape">Adjusting camera for visible Three.js shape</a></p>
  
  <p><a href="https://stackoverflow.com/questions/13350875/three-js-width-of-view">Three.js - Width of view</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15331358/three-js-get-object-size-with-respect-to-camera-and-object-position-on-screen">THREE.JS: Get object size with respect to camera and object position on screen</a></p>
  
  <p><a href="https://stackoverflow.com/questions/14614252/how-to-fit-camera-to-object">How to Fit Camera to Object</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15761644/threejs-how-to-implement-zoomall-and-make-sure-a-given-box-fills-the-canvas-are">ThreeJS. How to implement ZoomALL and make sure a given box fills the canvas area?</a></p>
  
  <p>However, none of them seem to quite cover everything I'm looking for:</p>
  
  <ul>
  <li><p>I'm not interested in the height, only the width (they won't be the same - the size will be dynamic but I can presume the height will be larger than the width)</p></li>
  <li><p>The camera.position.z (or the FOV I guess) is the unknown, so I'm trying to get the equations round the right way to solve that</p></li>
  </ul>
  
  <p>(I'm not great with 3D maths. Thanks in advance!)</p>