瀏覽代碼

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;
 
 	}