@mappedin/viewer 0.11.2-fa40d07.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.11.2](https://github.com/MappedIn/viewer/compare/viewer-v0.11.1...viewer-v0.11.2) (2023-11-16)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **MKR-542:** reduce AO graininess on low DPR monitors ([#80](https://github.com/MappedIn/viewer/issues/80)) ([5201037](https://github.com/MappedIn/viewer/commit/5201037ab1a425c95f233cb210fc8b9251852992))
9
+
3
10
  ## [0.11.1](https://github.com/MappedIn/viewer/compare/viewer-v0.11.0...viewer-v0.11.1) (2023-11-15)
4
11
 
5
12
 
package/dist/index.js CHANGED
@@ -69699,10 +69699,22 @@ class Cet {
69699
69699
  return i == null ? !1 : (this.rootStore.state === Fo.DIRECTIONS && this.rootStore.departureMode === yn.LOCATION && this.rootStore.departure == null ? this.rootStore.setDepartureLocationId(i.id) : this.rootStore.setSelectedLocationId(i.id), !0);
69700
69700
  }
69701
69701
  getAOSettings() {
69702
- let e = "medium", i = "full";
69703
- return this.rootStore.isAppMobile ? (e = "medium", i = "half") : devicePixelRatio > 1 && (e = "low", i = "full"), {
69702
+ let e = "high";
69703
+ const i = "full";
69704
+ devicePixelRatio > 1 && (e = "medium");
69705
+ const n = {
69706
+ // Experimentally determined values
69707
+ denoiseIterations: devicePixelRatio > 1 ? 2 : 5,
69708
+ aoRadius: 7 * devicePixelRatio - 4,
69709
+ intensity: 5 / devicePixelRatio,
69710
+ screenSpaceRadius: !0,
69711
+ halfRes: !1,
69712
+ depthAwareUpsampling: !0
69713
+ };
69714
+ return {
69704
69715
  aoQuality: e,
69705
- aoResolution: i
69716
+ aoResolution: i,
69717
+ effectController: n
69706
69718
  };
69707
69719
  }
69708
69720
  showWatermark() {
@@ -69717,31 +69729,31 @@ class Cet {
69717
69729
  return this.rootStore.departureMode === yn.DROPPED_PIN && this.rootStore.departure == null || this.directions.directions != null ? od.CAMERA_ONLY : od.DEFAULT;
69718
69730
  }
69719
69731
  async init(e) {
69720
- var u;
69732
+ var h;
69721
69733
  this.container = e;
69722
- const { aoQuality: i, aoResolution: n } = this.getAOSettings(), r = this.rootStore.startupOptions.outdoorMapsKey ?? "f8fd42d9e1c2751f", o = !!(this.rootStore.uiStore.theme.map.streetMapVisible && r != null), a = {
69734
+ const { aoQuality: i, aoResolution: n, effectController: r } = this.getAOSettings(), o = this.rootStore.startupOptions.outdoorMapsKey ?? "f8fd42d9e1c2751f", a = !!(this.rootStore.uiStore.theme.map.streetMapVisible && o != null), s = {
69723
69735
  aoEnabled: !0,
69724
69736
  antialias: !0,
69725
69737
  aoQuality: i,
69726
69738
  aoResolution: n,
69727
69739
  multiBufferRendering: !0,
69728
69740
  outdoorView: {
69729
- enabled: o,
69741
+ enabled: a,
69730
69742
  headers: {
69731
- "x-mappedin-tiles-key": r
69743
+ "x-mappedin-tiles-key": o
69732
69744
  }
69733
69745
  },
69734
- firstMap: (u = this.rootStore.currentMap) == null ? void 0 : u.id
69746
+ firstMap: (h = this.rootStore.currentMap) == null ? void 0 : h.id
69735
69747
  };
69736
69748
  this.rootStore.uiStore.theme.map.watermarkVisible && this.showWatermark();
69737
- const s = await zMe(e, this.rootStore.data, a);
69738
- return s.Camera.minZoom = this.rootStore.uiStore.theme.map.minZoom, s.Camera.maxZoom = this.rootStore.uiStore.theme.map.maxZoom, s.Camera.set({
69749
+ const u = await zMe(e, this.rootStore.data, s);
69750
+ return u.setAmbientOcclusionSettings(r), u.Camera.minZoom = this.rootStore.uiStore.theme.map.minZoom, u.Camera.maxZoom = this.rootStore.uiStore.theme.map.maxZoom, u.Camera.set({
69739
69751
  tilt: this.rootStore.uiStore.theme.map.initialTilt,
69740
69752
  rotation: this.rootStore.uiStore.theme.map.initialRotation
69741
- }), s.setHoverColor(this.rootStore.uiStore.theme.colors.map.polygons.hover), s.setBackgroundColor(this.rootStore.uiStore.theme.colors.map.background), s.on($4.CLICK, this.handleMapClick), s.Camera.on(F1.CHANGED, this.camera.handleCameraChange), new Promise(
69742
- (h) => requestAnimationFrame(() => {
69753
+ }), u.setHoverColor(this.rootStore.uiStore.theme.colors.map.polygons.hover), u.setBackgroundColor(this.rootStore.uiStore.theme.colors.map.background), u.on($4.CLICK, this.handleMapClick), u.Camera.on(F1.CHANGED, this.camera.handleCameraChange), new Promise(
69754
+ (g) => requestAnimationFrame(() => {
69743
69755
  Mfe(() => {
69744
- this.mapView = s, h();
69756
+ this.mapView = u, g();
69745
69757
  });
69746
69758
  })
69747
69759
  );
@@ -107092,7 +107104,7 @@ const S2t = cr.div`
107092
107104
  ] })
107093
107105
  ] });
107094
107106
  }), Gve = (t) => {
107095
- const e = "phc_vZrwt3z6JmdPnErvTgZoazTAGlCRMiz6c2NqWtBt8qz", i = "https://ph-api.mappedin.com";
107107
+ const e = "phc_sRrjUwz9zicl4GeXtSnwcuKMr50SB76ma6NVi6zlPou", i = "https://ph-api.mappedin.com";
107096
107108
  {
107097
107109
  rg.init(e, {
107098
107110
  api_host: i,
@@ -107105,7 +107117,7 @@ const S2t = cr.div`
107105
107117
  }
107106
107118
  }, Wve = () => {
107107
107119
  const t = document.createElement("meta");
107108
- t.name = "app-version", t.content = "0.11.1", document.head.appendChild(t);
107120
+ t.name = "app-version", t.content = "0.11.2", document.head.appendChild(t);
107109
107121
  let e = document.querySelector("meta[name=viewport]");
107110
107122
  e == null && (e = document.createElement("meta"), e.name = "viewport", document.head.appendChild(e)), e.content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no";
107111
107123
  }, Zve = (t) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.11.2-fa40d07.0",
3
+ "version": "0.11.2",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",