title: Three.js - how do up vectors work with lookAt()?
body: <p>I'm trying to understand how up vectors and lookAt() work together in three.js. I'm setting the up vector of this axisHelper, so that the Y axis always points at the target geo, which marks the position of the up vector. It works as expected for X and Y, rotating the axes around the Z axis; and when I try to adjust the Z value of the up vector I would expect the axes to rotate around the X axis, but nothing happens.</p>
  
  <p><a href="http://jsfiddle.net/68p5r/4/" rel="noreferrer">http://jsfiddle.net/68p5r/4/</a>
  [Edit: I've added geo to show the up target position.]</p>
  
  <p>I have a dat.gui interface manipulating the up vector to demonstrate, but the problem exists when I set the vector manually as well.</p>
  
  <p>I suspect the problem is around line 74:</p>
  
  <pre><code>zControl.onChange(function(value) {
    axes.up.set(this.object.x, this.object.y, value);
    axes.lookAt(new THREE.Vector3(0, 0, 1));
  });
  </code></pre>
  
  <p>When I update the up vector, I instruct the axisHelper to update its orientation onscreen by redoing its lookAt() down its Z axis. Changing the X and Y works as expected, why not the Z?</p>
  
  <p>(This is also the case if I use geo instead of an axisHelper: <a href="http://jsfiddle.net/68p5r/5/" rel="noreferrer">http://jsfiddle.net/68p5r/5/</a>)</p>
  
  <p><img src="https://i.stack.imgur.com/mAyCj.gif" alt="rotated axisHelper"></p>