Browse Source

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 years ago
parent
commit
8f7e477b02
1 changed files with 6 additions and 0 deletions
  1. 6 0
      examples/jsm/controls/TrackballControls.js

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

@@ -706,6 +706,12 @@ class TrackballControls extends EventDispatcher {
 					_movePrev.copy( _moveCurr );
 					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 );