mrdoob/three.js — pull request #3733 by erich666 (2013-08-09 14:43:27+00:00)
Title: New OrbitControls.js, fixing pan, adding touch support, and more

Original pull request: https://github.com/mrdoob/three.js/pull/3353

Previous discussion: https://github.com/mrdoob/three.js/issues/3346#issuecomment-21154258

Folded in this pull request: https://github.com/mrdoob/three.js/pull/3374

Also added documentation.

My apologies for not knowing how to update my previous pull request - git and github is non-obvious to us beginners. Anyway, this pull request integrates the two previous pull requests, https://github.com/mrdoob/three.js/pull/3353 and https://github.com/mrdoob/three.js/pull/3374.

I have tested against all the examples that currently use OrbitControls - the new code works about the same. The arrow keys are a bit different, as this new code (properly) makes the arrows work with respect to the screen, not the environment.

Where you'll see the difference is in using OrbitControls as a replacement for TrackballControls for examples such as webgl_materials_lightmap.html or webgl_morphtargets_md2.html the mouse pointer stays closely tied to the object when panning.