Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@geoblocks/cesium-compass

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@geoblocks/cesium-compass - npm Package Compare versions

Comparing version 0.4.2 to 0.5.0

25

cesium-compass.js

@@ -236,2 +236,5 @@ // Original code from TerriaJS

handleRotatePointerMove(event) {
if (this.moveUpIfTooCloseToTerrain()) {
return;
}
const camera = this.scene.camera;

@@ -312,2 +315,5 @@ clickLocationScratch.x = event.clientX - this.context.compassRectangle.left;

handleOrbitTick() {
if (this.moveUpIfTooCloseToTerrain()) {
return;
}
const camera = this.scene.camera;

@@ -338,2 +344,21 @@ const timestamp = performance.now();

distanceToTerrain() {
const camera = this.scene.camera;
const height = this.scene.globe.getHeight(camera.positionCartographic);
return camera.positionCartographic.height - height;
}
moveUpIfTooCloseToTerrain() {
const controller = this.scene.screenSpaceCameraController;
if (!controller.enableCollisionDetection) {
return false;
}
const distanceDiff = this.distanceToTerrain() - controller.minimumZoomDistance;
if (CesiumMath.lessThan(distanceDiff, 0.0, CesiumMath.EPSILON1)) {
this.scene.camera.moveUp(-distanceDiff);
return true;
}
return false;
}
/**

@@ -340,0 +365,0 @@ * @param {Cartesian2} vector

4

package.json
{
"name": "@geoblocks/cesium-compass",
"version": "0.4.2",
"version": "0.5.0",
"license": "BSD-3-Clause",

@@ -17,3 +17,3 @@ "repository": "github:geoblocks/cesium-helpers",

},
"gitHead": "e3b8b8ce9751e3902faeeda37f59ed81a3b318c9"
"gitHead": "92649db7086e59de94fba975b3423e50288fa0ea"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc