ThreeJS OrbitControls as a standalone and typescript compatible npm module.
Installation
npm install --save three-orbitcontrols-ts
Usage
;; const camera = ...;const controls = camera rendererdomElement; // How far you can orbit vertically, upper and lower limits.controlsminPolarAngle = 0;controlsmaxPolarAngle = MathPI; // How far you can dolly in and out ( PerspectiveCamera only )controlsminDistance = 0;controlsmaxDistance = Infinity; thisenableZoom = true; // Set to false to disable zoomingthiszoomSpeed = 10; controlsenablePan = true; // Set to false to disable panning (ie vertical and horizontal translations)
Credit
All credit goes to OrbitControls.js contributors.