question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OrbitControls/MapControls not working

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
KLewin23commented, Mar 21, 2020

I have ended up making a normal static webpage hosting it in gitpages and using web view to see it in expo

1reaction
banjianpancommented, Jun 5, 2020

The problem is i followed the implementation of react-three-fiber, but it doesnt work natively on my android emulator, like it works on web perfectly fine. The problem is translating in into a workable way so that the android emulator would reflect the orbitcontrols i was able to create on the web

Read more comments on GitHub >

github_iconTop Results From Across the Web

THREE.js Orbit Controls not working - Stack Overflow
I'm now attempting to add some orbit controls so I can rotate, pan and zoom around the scene. I added the orbitControls script...
Read more >
Orbit Controls Import Not Working - Questions - three.js forum
I am using the import map, but I cannot extract the orbit controls from it. <!DOCTYPE html> <html> <head> <title>Parcel Sandbox</title> <meta ...
Read more >
pmndrs/react-three-fiber - OrbitControls Stopped working
I have had the Orbit Controls working with this same code in another project. I even tried using the same versions of Three...
Read more >
Extend three.js With a Camera Controls Plugin
However, these are sometimes poorly maintained and may not work with the latest three.js ... Orbit controls allow us to control the camera...
Read more >
Your Guide To The Orbit Controls Module In Three.js - YouTube
In this tutorial, we're going to discover a variety of the Three.js orbit controls ' functionalities that you may not know some of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found