three-trackballcontrols-ts
Version:
ThreeJS Trackball Controls as a standalone and typescript compatible npm module
25 lines (15 loc) • 549 B
Markdown
as a standalone and typescript compatible npm module.
```shell
npm install --save three-trackballcontrols-ts
```
```js
import * as THREE from 'three';
import { TrackballControls } from 'three-trackballcontrols-ts';
const camera = new THREE.SomeCamera(...);
const controls = new TrackballControls(camera, renderer.domElement);
```
All credit goes to [TrackballControls.js](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TrackballControls.js) contributors.