MCPcopy
hub / github.com/lo-th/Oimo.js / onTouchMove

Function onTouchMove

examples/js/controls/OrbitControls.js:809–851  ·  view source on GitHub ↗
( event )

Source from the content-addressed store, hash-verified

807 }
808
809 function onTouchMove( event ) {
810
811 if ( scope.enabled === false ) return;
812
813 event.preventDefault();
814 event.stopPropagation();
815
816 switch ( event.touches.length ) {
817
818 case 1: // one-fingered touch: rotate
819
820 if ( scope.enableRotate === false ) return;
821 if ( state !== STATE.TOUCH_ROTATE ) return; // is this needed?...
822
823 handleTouchMoveRotate( event );
824
825 break;
826
827 case 2: // two-fingered touch: dolly
828
829 if ( scope.enableZoom === false ) return;
830 if ( state !== STATE.TOUCH_DOLLY ) return; // is this needed?...
831
832 handleTouchMoveDolly( event );
833
834 break;
835
836 case 3: // three-fingered touch: pan
837
838 if ( scope.enablePan === false ) return;
839 if ( state !== STATE.TOUCH_PAN ) return; // is this needed?...
840
841 handleTouchMovePan( event );
842
843 break;
844
845 default:
846
847 state = STATE.NONE;
848
849 }
850
851 }
852
853 function onTouchEnd( event ) {
854

Callers

nothing calls this directly

Calls 3

handleTouchMoveRotateFunction · 0.85
handleTouchMoveDollyFunction · 0.85
handleTouchMovePanFunction · 0.85

Tested by

no test coverage detected