Has anyone tried using the OrbitControls function with ReactJS?
Here is the sample code I wrote:
import React, { Component } from 'react';
import 'tachyons';
import * as THREE from 'react';
import OrbitControls from 'three-orbitcontrols';
class App extends Component {
render() {
...
//Controls
const controls = new OrbitControls(camera, renderer.domElement)
controls.dampingFactor = 0.25
controls.enableZoom = false
It returns the following error:
./node_modules/three-orbitcontrols/OrbitControls.js 1054:70-89 "export 'OrbitControls' (imported as 'THREE') was not found in 'three'
Does anyone know how to resolve this issue?