I’m having a “sticky mouse” problem with this Three.js project:
https://fractionalownership.io/BadCube/index-BIG-WALL.html
The problem occurs when I tap anywhere on the red navigation bar at the bottom of the screen: when I then move the mouse back off of it, the cube / camera spin around as though I was click dragging on them - even though I’m clearly not.
It’s very weird, cause it’s as if that single tap on the red nav bar “locks” the mouse into click-drag mode - when it shouldn’t.
Here’s how you can reproduce this problem:
- load the page
- click-drag anywhere on the screen to spin the camera around the cube
- Then move the mouse to the red navigation bar - and click ONCE on it anywhere (you don’t even have to tap on one of the 3 buttons - which are just dead links by the way.)
When you then move the mouse back off of the red nav-bar and into the main screen, you’ll see the whole screen is rotating.
WHY?
Note: I tried making a fiddle with this code but for some reason it’s working just fine in the fiddle. But it’s still messed up in my actual project.
Here’s the fiddle: https://jsfiddle.net/62qjgzep/
This has me tearing my hair my out.
Would really appreciate any help!