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

Function handleMouseMoveRotate

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

Source from the content-addressed store, hash-verified

429 }
430
431 function handleMouseMoveRotate( event ) {
432
433 //console.log( 'handleMouseMoveRotate' );
434
435 rotateEnd.set( event.clientX, event.clientY );
436 rotateDelta.subVectors( rotateEnd, rotateStart );
437
438 var element = scope.domElement === document ? scope.domElement.body : scope.domElement;
439
440 // rotating across whole screen goes 360 degrees around
441 rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth * scope.rotateSpeed );
442
443 // rotating up and down along whole screen attempts to go 360, but limited to 180
444 rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight * scope.rotateSpeed );
445
446 rotateStart.copy( rotateEnd );
447
448 scope.update();
449
450 }
451
452 function handleMouseMoveDolly( event ) {
453

Callers 1

onMouseMoveFunction · 0.85

Calls 2

rotateLeftFunction · 0.85
rotateUpFunction · 0.85

Tested by

no test coverage detected