Using Threejs + OrbitContols in TypeScript
After few hours spend on this problem, I ended up creating a new package: three-orbitcontrols-ts
import * as THREE from 'three';
import { OrbitControls } from 'three-orbitcontrols-ts';
const controls = new OrbitControls(camera, renderer.domElement);
As described in the docs do the following:
import * as THREE from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
Important is that you use the folder jsm
instead of js
. And keep in mind that not all modules are available in the jsm folder yet