I have "expo-three": "^5.2.0"
and "three": "^0.110.0"
, and planning to use MapControls
and to support both web and Android devices.
When I implement and test OrbitControls
with the following code, I’m getting such error “the 2nd parameter is now mandatory” on an Android emulator:
import { THREE } from 'expo-three';
// global.THREE = global.THREE || THREE;
import 'three/examples/js/controls/OrbitControls';
let controls;
//...
onCreate={props => {
//...
controls = new THREE.OrbitControls(camera);
}
onUpdate={() => {
controls.update();
//...
}}
Even though I implement OrbitControls
as the following, it’s still not working on both platforms and seems no effect without any warning:
controls = new OrbitControls( camera, renderer.domElement );
Is there any updated guide to use camera controls such as OrbitControls or MapControls on both web and Android platforms? Thanks!