-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mouseup vs. mousedown selectivity #27
Comments
Hi @psytron, please check, if the 'click' event fires only on that object and let me know. It should actually rather be browser-related than three.js related. Which browser are you using? Do you have your code online? |
the 'click' event ( subscribed as 'mouseup' ) fires anywhere on the whole screen. 'mousedown' fires correctly when clicking on the object but 'mouseup' fires everywhere. Using Chrome Version 126.0.6479.126 (Official Build) (arm64) The code is pretty simple pretty much like the code above:
The two functions are subscribed to mouseup and mousedown in exactly the same way, but one behaves differently |
'mousemove' is also same issue ( firing everywhere on whole screen ) |
Hi @psytron, sorry for my late reply. I was on holiday. "mouseup" will of course fire everywhere on the screen. "click" should fire only on the object.
You can also use the properties |
I'm adding listeners to objects in a loop like this:
'mousedown' activates correctly only when clicked object ref
but 'mouseup' activates everywhere to all clicks in whole scene
This worked correctly in previous THREE REV, so perhaps it is a THREE.js R165 interaction
The text was updated successfully, but these errors were encountered: