Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Dec 6, 2024
1 parent 5e98300 commit 17b77b1
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 21 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cesium-binoculars.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><script type="module" src="cesium-binoculars.b863545a.js"></script><script src="https://cesium.com/downloads/cesiumjs/releases/1.123/Build/Cesium/Cesium.js"></script><link href="https://cesium.com/downloads/cesiumjs/releases/1.123/Build/Cesium/Widgets/widgets.css" rel="stylesheet"><style>html,body,#cesiumContainer{height:100%;margin:0}#activate{font-family:monospace;font-size:1.6em;font-weight:700;position:absolute;top:30px;right:30px}</style></head><body> <div id="cesiumContainer"></div> <button id="activate" type="button">toggle mode</button> <script type="module">function e(e,t,i,r){Object.defineProperty(e,t,{get:i,set:r,enumerable:!0,configurable:!0})}var t=globalThis,i={},r={},n=t.parcelRequire5532;null==n&&((n=function(e){if(e in i)return i[e].exports;if(e in r){var t=r[e];delete r[e];var n={id:e,exports:{}};return i[e]=n,t.call(n.exports,n,n.exports),n.exports}var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(e,t){r[e]=t},t.parcelRequire5532=n);var s=n.register;s("hLMsx",function(t,i){e(t.exports,"createViewer",()=>n);let r=Cesium.Rectangle.fromDegrees(4,45,12,48);async function n(e){Object.assign(Cesium.RequestScheduler.requestsByServer,{"wmts.geo.admin.ch:443":28,"download.swissgeol.ch:443":28,"tile.openstreetmap.org:443":28});let t=new Cesium.Viewer(e,{timeline:!1,navigationHelpButton:!1,animation:!1,baseLayerPicker:!1,sceneModePicker:!1,geocoder:!1,homeButton:!1,fullscreenButton:!1,scene3DOnly:!0,baseLayer:new Cesium.ImageryLayer(new Cesium.UrlTemplateImageryProvider({url:"https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.swissimage/default/current/3857/{z}/{x}/{y}.jpeg",rectangle:r})),terrainProvider:await Cesium.CesiumTerrainProvider.fromUrl("https://3d.geo.admin.ch/ch.swisstopo.terrain.3d/v1/")});return t.scene.highDynamicRange=!0,t.scene.globe.showGroundAtmosphere=!0,t.scene.globe.enableLighting=!0,t.scene.globe.preloadSiblings=!0,t.scene.fog.density=4e-4,t.scene.fog.minimumBrightness=.3,t.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(7.863775,46.686447,1200),orientation:{heading:Cesium.Math.toRadians(25),pitch:0},duration:0}),t}}),s("7HKs5",function(t,i){e(t.exports,"default",()=>r);var r=Object.freeze({LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19})});var o=n("hLMsx"),a=n("AXvpI"),c=n("7HKs5");class l{constructor(e,t=Math.PI/36){this.viewer=e,this.zoomFactor_=t,this.originalFov_=void 0,this.active_=!1,this.onMouseWheel_=this.onMouseWheel.bind(this)}get active(){return this.active_}set active(e){if(e===this.active_)return;this.active_=e,this.viewer.scene.screenSpaceCameraController.enableZoom=!e;let t=this.viewer.scene.camera.frustum;e?(this.originalFov_=t.fov,this.viewer.screenSpaceEventHandler.setInputAction(this.onMouseWheel_,c.default.WHEEL)):(t.fov=this.originalFov_,this.viewer.screenSpaceEventHandler.removeInputAction(c.default.WHEEL))}onMouseWheel(e){let t=this.viewer.scene.camera.frustum,i=t.fov+(e>0?-this.zoomFactor_:this.zoomFactor_);t.fov=(0,a.default).clamp(i,(0,a.default).toRadians(1),(0,a.default).toRadians(60))}}(0,o.createViewer)("cesiumContainer").then(e=>{let t=new l(e);document.querySelector("#activate").addEventListener("click",()=>t.active=!t.active)});</script> </body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><script type="module" src="cesium-binoculars.40a88c35.js"></script><script src="https://cesium.com/downloads/cesiumjs/releases/1.124/Build/Cesium/Cesium.js"></script><link href="https://cesium.com/downloads/cesiumjs/releases/1.124/Build/Cesium/Widgets/widgets.css" rel="stylesheet"><style>html,body,#cesiumContainer{height:100%;margin:0}#activate{font-family:monospace;font-size:1.6em;font-weight:700;position:absolute;top:30px;right:30px}</style></head><body> <div id="cesiumContainer"></div> <button id="activate" type="button">toggle mode</button> <script type="module">function e(e,t,i,r){Object.defineProperty(e,t,{get:i,set:r,enumerable:!0,configurable:!0})}var t=globalThis,i={},r={},n=t.parcelRequire94c2;null==n&&((n=function(e){if(e in i)return i[e].exports;if(e in r){var t=r[e];delete r[e];var n={id:e,exports:{}};return i[e]=n,t.call(n.exports,n,n.exports),n.exports}var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(e,t){r[e]=t},t.parcelRequire94c2=n);var s=n.register;s("hLMsx",function(t,i){e(t.exports,"createViewer",()=>n);let r=Cesium.Rectangle.fromDegrees(4,45,12,48);async function n(e){Object.assign(Cesium.RequestScheduler.requestsByServer,{"wmts.geo.admin.ch:443":28,"download.swissgeol.ch:443":28,"tile.openstreetmap.org:443":28});let t=new Cesium.Viewer(e,{timeline:!1,navigationHelpButton:!1,animation:!1,baseLayerPicker:!1,sceneModePicker:!1,geocoder:!1,homeButton:!1,fullscreenButton:!1,scene3DOnly:!0,baseLayer:new Cesium.ImageryLayer(new Cesium.UrlTemplateImageryProvider({url:"https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.swissimage/default/current/3857/{z}/{x}/{y}.jpeg",rectangle:r})),terrainProvider:await Cesium.CesiumTerrainProvider.fromUrl("https://3d.geo.admin.ch/ch.swisstopo.terrain.3d/v1/")});return t.scene.highDynamicRange=!0,t.scene.globe.showGroundAtmosphere=!0,t.scene.globe.enableLighting=!0,t.scene.globe.preloadSiblings=!0,t.scene.fog.density=4e-4,t.scene.fog.minimumBrightness=.3,t.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(7.863775,46.686447,1200),orientation:{heading:Cesium.Math.toRadians(25),pitch:0},duration:0}),t}}),s("7HKs5",function(t,i){e(t.exports,"default",()=>r);var r=Object.freeze({LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19})});var o=n("hLMsx"),a=n("AXvpI"),c=n("7HKs5");class l{constructor(e,t=Math.PI/36){this.viewer=e,this.zoomFactor_=t,this.originalFov_=void 0,this.active_=!1,this.onMouseWheel_=this.onMouseWheel.bind(this)}get active(){return this.active_}set active(e){if(e===this.active_)return;this.active_=e,this.viewer.scene.screenSpaceCameraController.enableZoom=!e;let t=this.viewer.scene.camera.frustum;e?(this.originalFov_=t.fov,this.viewer.screenSpaceEventHandler.setInputAction(this.onMouseWheel_,c.default.WHEEL)):(t.fov=this.originalFov_,this.viewer.screenSpaceEventHandler.removeInputAction(c.default.WHEEL))}onMouseWheel(e){let t=this.viewer.scene.camera.frustum,i=t.fov+(e>0?-this.zoomFactor_:this.zoomFactor_);t.fov=(0,a.default).clamp(i,(0,a.default).toRadians(1),(0,a.default).toRadians(60))}}(0,o.createViewer)("cesiumContainer").then(e=>{let t=new l(e);document.querySelector("#activate").addEventListener("click",()=>t.active=!t.active)});</script> </body></html>
1 change: 0 additions & 1 deletion cesium-compass-bar.019a53c3.js.map

This file was deleted.

Loading

0 comments on commit 17b77b1

Please sign in to comment.