mrdoob/three.js — pull request #3132 by aleeper (2013-02-26 08:32:16+00:00)
Title: basis functions for Vector3, and "pan" for Orbit control

This is not quite ready for prime time yet (and so perhaps I should have just opened an issue...), but I wanted to get your feedback.

I think the pan additions to the orbit controller would be generally useful, without breaking the existing functionality. I also made it so that the this controller pays attention to the "up" vector of the camera. By the way, this is closer to the way the Orbit control behaves in Rviz, the visualization program in ROS, which is why i wanted to replicate it :)

Something along the lines of the API additions I made to Vector3 would be useful for doing math with bases, and I used this in the Orbit controller. The number of functions could be reduced, if you prefer, by taking an index as argument instead, e.g. Vector3.getBasisComponentFromMatrix4( matrix, 0/1/2 ).