File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -569,6 +569,10 @@ class GlobeControls extends THREE.EventDispatcher {
569
569
handleDrag ( event ) {
570
570
const normalized = this . view . viewToNormalizedCoords ( event . viewCoords ) ;
571
571
572
+ // An updateMatrixWorld on the camera prevents camera jittering when moving globe on a zoomed out view, with
573
+ // devtools open in web browser.
574
+ this . camera . updateMatrixWorld ( ) ;
575
+
572
576
raycaster . setFromCamera ( normalized , this . camera ) ;
573
577
574
578
// If there's intersection then move globe else we stop the move
@@ -815,6 +819,9 @@ class GlobeControls extends THREE.EventDispatcher {
815
819
case this . states . MOVE_GLOBE . finger : {
816
820
const coords = this . view . eventToViewCoords ( event ) ;
817
821
const normalized = this . view . viewToNormalizedCoords ( coords ) ;
822
+ // An updateMatrixWorld on the camera prevents camera jittering when moving globe on a zoomed out view, with
823
+ // devtools open in web browser.
824
+ this . camera . updateMatrixWorld ( ) ;
818
825
raycaster . setFromCamera ( normalized , this . camera ) ;
819
826
// If there's intersection then move globe else we stop the move
820
827
if ( raycaster . ray . intersectSphere ( pickSphere , intersection ) ) {
You can’t perform that action at this time.
0 commit comments