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

Function handleTouchMoveRotate

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

Source from the content-addressed store, hash-verified

573 }
574
575 function handleTouchMoveRotate( event ) {
576
577 //console.log( 'handleTouchMoveRotate' );
578
579 rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY );
580 rotateDelta.subVectors( rotateEnd, rotateStart );
581
582 var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
583
584 // rotating across whole screen goes 360 degrees around
585 rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth * scope.rotateSpeed );
586
587 // rotating up and down along whole screen attempts to go 360, but limited to 180
588 rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight * scope.rotateSpeed );
589
590 rotateStart.copy( rotateEnd );
591
592 scope.update();
593
594 }
595
596 function handleTouchMoveDolly( event ) {
597

Callers 1

onTouchMoveFunction · 0.85

Calls 2

rotateLeftFunction · 0.85
rotateUpFunction · 0.85

Tested by

no test coverage detected