mattdesl / three-orbit-controls

orbit controls for ThreeJS
216 stars 72 forks source link

Ties event handling to scope.domElement only #19

Closed charlesfleche closed 7 years ago

charlesfleche commented 7 years ago

OrbitControls globally listens to mousemove, mouseup and keydown events. That means that even if an<input> element exists outside of the OrbitControls, moving the text cursor with the key arrows within this <input> will pan the OrbitControls.

This PR ensures that only scope key / mouse events are processed by the OrbitControls.

mattdesl commented 7 years ago

Thanks!

This module just tracks ThreeJS's orbit controls directly. You should submit a new PR to ThreeJS, and after it gets merged we can fix up this module to keep it consistent with the upstream code. 😊

charlesfleche commented 7 years ago

Ah sorry, my bad. I didn't get that... Apologies...

charlesfleche commented 7 years ago

A new PR has been created upstream : https://github.com/mrdoob/three.js/pull/10302