Skip to content

Commit

Permalink
more simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Dec 29, 2023
1 parent b290796 commit 0ebf0c5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions example/src/GlobeControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ const _quaternion = new Quaternion();
const _up = new Vector3( 0, 1, 0 );
const _plane = new Plane();

const _deltaPointer = new Vector2();
const _centerPoint = new Vector2();
const _newPointer = new Vector2();

// TODO
// - Touch controls
// - Add support for angled rotation plane (based on where the pivot point is)
// - Test with globe (adjusting up vector)
// ---
Expand Down Expand Up @@ -128,9 +131,6 @@ export class GlobeControls {
domElement.style.touchAction = 'none';

const _pointer = new Vector2();
const _newPointer = new Vector2();
const _deltaPointer = new Vector2();
const _centerPoint = new Vector2();
const _originalCenterPoint = new Vector2();
let _pinchAction = NONE;
let _pointerMoveQueued = false;
Expand Down Expand Up @@ -199,7 +199,6 @@ export class GlobeControls {

// the "pointer" for zooming and rotating should be based on the center point
mouseToCoords( _centerPoint.x, _centerPoint.y, domElement, _pointer );
_newPointer.copy( _pointer );

} else if ( _pointerTracker.getPointerCount() > 2 ) {

Expand Down

0 comments on commit 0ebf0c5

Please sign in to comment.