mrdoob/three.js — pull request #5204 by WestLangley (2014-08-17 01:30:04+00:00)
Title: OrbitControls: Added support for constraining azimuthal rotation

Added support for constraining azimuthal (horizontal) rotation in `OrbitControls`.

Usage

controls.constrainAzimuth = true;
controls.minAzimuthAngle = - 0.5 * Math.PI; // radians
controls.maxAzimuthAngle = 0.5 * Math.PI; // radians

I preferred to omit the `constrainAzimuth` flag, but due to wrapping issues, this was cleaner. We'll see how it goes.