فهرست منبع

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 12 سال پیش
والد
کامیت
9f751b3a56
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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;
 
 	}