Răsfoiți Sursa

Fixed zoom increment to normalize responsiveness across various inputs

Some zoom inputs, such as multitouch trackpads, trigger the mousewheel event at higher frequencies but smaller increments. The zoom delta was inverted (I'm not sure why) which would cause these inputs to be exponentially more sensitive and generally unusable. This tweak should make zoom responsiveness more regular across various inputs.
protometa 13 ani în urmă
părinte
comite
9f751b3a56
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      examples/js/controls/TrackballControls.js

+ 1 - 1
examples/js/controls/TrackballControls.js

@@ -428,7 +428,7 @@ THREE.TrackballControls = function ( object, domElement ) {
 
 		}
 
-		_zoomStart.y += ( 1 / delta ) * 0.05;
+		_zoomStart.y += delta * 0.01;
 
 	}
 

粤ICP备19079148号