Skip to content

Commit

Permalink
feat: reverting old implem on globecontrols
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Dec 19, 2024
1 parent 7986222 commit dc48291
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Controls/GlobeControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ class GlobeControls extends THREE.EventDispatcher {
const range = this.getRange(point);
if (point && range > this.minDistance) {
return this.lookAtCoordinate({
coord: new Coordinates('EPSG:4978').setFromVector3(point),
coord: new Coordinates('EPSG:4978', point),
range: range * (event.direction === 'out' ? 1 / 0.6 : 0.6),
time: 1500,
});
Expand Down Expand Up @@ -1028,9 +1028,7 @@ class GlobeControls extends THREE.EventDispatcher {
*/

getCameraCoordinate() {
return new Coordinates('EPSG:4978')
.setFromVector3(this.camera.position)
.as('EPSG:4326');
return new Coordinates('EPSG:4978', this.camera.position).as('EPSG:4326');
}

/**
Expand Down Expand Up @@ -1218,9 +1216,7 @@ class GlobeControls extends THREE.EventDispatcher {
return;
}

return new Coordinates('EPSG:4978')
.setFromVector3(pickedPosition)
.as('EPSG:4326');
return new Coordinates('EPSG:4978', pickedPosition).as('EPSG:4326');
}
}

Expand Down

0 comments on commit dc48291

Please sign in to comment.