Skip to content
Advertisement

Tag: computer-vision

Three.js + OrbitControls – Uncaught TypeError: Cannot read property ‘addEventListener’ of undefined

I am tryint to use OrbitControls in THREE.js. If I removed the line let cameraControl = new OrbitControls(camera) from below, there will be no error. But now, I have “Uncaught TypeError: Cannot read property ‘addEventListener’ of undefined” I tried to change OrbitControls(camera) to THREE.OrbitControls(camera), and then I had “Uncaught TypeError: THREE.OrbitControls is not a constructor”. I tried to import OrbitControls.js

Advertisement