Просмотр исходного кода

Editor: Scale down touchscreen zoom speed (#32454)

Tyler Selden 2 месяцев назад
Родитель
Сommit
06a4e973c7
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      editor/js/EditorControls.js

+ 2 - 1
editor/js/EditorControls.js

@@ -364,7 +364,8 @@ class EditorControls extends THREE.EventDispatcher {
 
 					touches[ 0 ].set( event.pageX, event.pageY, 0 ).divideScalar( window.devicePixelRatio );
 					touches[ 1 ].set( position.x, position.y, 0 ).divideScalar( window.devicePixelRatio );
-					var distance = touches[ 0 ].distanceTo( touches[ 1 ] );
+					// Divide by 10 to offset inherent over-sensitivity (https://github.com/mrdoob/three.js/issues/32442)
+					var distance = touches[ 0 ].distanceTo( touches[ 1 ] ) / 10;
 					scope.zoom( delta.set( 0, 0, prevDistance - distance ) );
 					prevDistance = distance;
 

粤ICP备19079148号