2
0
Эх сурвалжийг харах

TrackballControls: Fix scale finished rotate on mobile. (#22100)

* fix(TrackballControls): fix scale finished rorate on mobild

* Revert "fix(TrackballControls): fix scale finished rorate on mobild"

This reverts commit 229b0c4a5522a929117fcd422398b537a9946b30.

* fix(TrackballControls): fix in example/jsm

Co-authored-by: shen <[email protected]>
LeoShen 4 жил өмнө
parent
commit
8f7e477b02

+ 6 - 0
examples/jsm/controls/TrackballControls.js

@@ -706,6 +706,12 @@ class TrackballControls extends EventDispatcher {
 					_movePrev.copy( _moveCurr );
 					_movePrev.copy( _moveCurr );
 					break;
 					break;
 
 
+				case 2:
+					_state = STATE.TOUCH_ZOOM_PAN;
+					_moveCurr.copy( getMouseOnCircle( event.pageX - _movePrev.pageX, event.pageY - _movePrev.pageY ) );
+					_movePrev.copy( _moveCurr );
+					break;
+
 			}
 			}
 
 
 			scope.dispatchEvent( _endEvent );
 			scope.dispatchEvent( _endEvent );