chbim-plugins 0.0.91 → 0.0.93

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/chbim-plugins.js CHANGED
@@ -20393,11 +20393,12 @@ class d1 {
20393
20393
  clip: T,
20394
20394
  flat: M,
20395
20395
  maximumScreenSpaceError: 16,
20396
- maximumMemoryUsage: 1024,
20397
- cacheBytes: 1073741824 * 2,
20398
- // 1024MB = 1024*1024*1024
20399
- maximumCacheOverflowBytes: 2147483648 * 2
20400
- // 2048MB = 2048*1024*1024
20396
+ /**
20397
+ * maximumMemoryUsage 移除
20398
+ */
20399
+ maximumMemoryUsage: 1024
20400
+ // cacheBytes: 1073741824 * 2, // 1024MB = 1024*1024*1024
20401
+ // maximumCacheOverflowBytes: 2147483648 * 2, // 2048MB = 2048*1024*1024
20401
20402
  // 1.04版本
20402
20403
  // customShader: new Cesium.CustomShader({
20403
20404
  // lightingModel: Cesium.LightingModel.UNLIT,
@@ -24972,23 +24973,23 @@ class v1 {
24972
24973
  }
24973
24974
  }
24974
24975
  class _1 {
24975
- constructor(a, o, ...c) {
24976
+ constructor(a, ...o) {
24976
24977
  /**
24977
24978
  * 手动释放 1秒防抖
24978
24979
  * @param { object } data - 模型的树形结构
24979
24980
  * @returns { any }
24980
24981
  */
24981
24982
  bc(this, "manualFreed", Bc.debounce(() => {
24982
- let { lng: a, lat: o, alt: c, pitch: d } = this.map.getCameraView(), u;
24983
+ let { lng: a, lat: o, alt: c, pitch: d } = window.map.getCameraView(), u;
24983
24984
  this.modelArray.forEach((m) => {
24984
24985
  u = m.releasedDistance ? m.releasedDistance : 1e4, this.disTance(
24985
24986
  [a, o, c],
24986
24987
  [m.center._lng, m.center._lat, m.center._alt],
24987
24988
  this.calculateDistance(d, u)
24988
- ) ? this.map.getLayer(m.id, "modelId") && this.emit("leave", m) : this.map.getLayer(m.id, "modelId") || this.emit("enter", m);
24989
+ ) ? window.map.getLayer(m.id, "modelId") && this.emit("leave", m) : window.map.getLayer(m.id, "modelId") || this.emit("enter", m);
24989
24990
  });
24990
24991
  }, 200));
24991
- mars3d ? (a && a != null && (this.modelArray = a), this.showModelArray = [], o && o != null && (this.map = o), this.Cesium = mars3d.Cesium, this.events = {}) : console.error("未引入指定插件");
24992
+ mars3d ? (a && a != null && (this.modelArray = a), this.showModelArray = [], this.Cesium = mars3d.Cesium, this.events = {}) : console.error("未引入指定插件");
24992
24993
  }
24993
24994
  /**
24994
24995
  * events
@@ -25109,7 +25110,7 @@ class _1 {
25109
25110
  * @returns { any }
25110
25111
  */
25111
25112
  resourceRelease() {
25112
- this.map.viewer.camera.moveEnd.addEventListener(() => {
25113
+ window.map.viewer.camera.moveEnd.addEventListener(() => {
25113
25114
  this.freed();
25114
25115
  });
25115
25116
  }
@@ -25120,16 +25121,16 @@ class _1 {
25120
25121
  * @returns { any }
25121
25122
  */
25122
25123
  freed() {
25123
- let { alt: a } = this.map.getCameraView();
25124
+ let { alt: a } = window.map.getCameraView();
25124
25125
  a < 2e4 && (this.freed = Bc.throttle(() => {
25125
- let { lng: o, lat: c, alt: d, pitch: u } = this.map.getCameraView();
25126
+ let { lng: o, lat: c, alt: d, pitch: u } = window.map.getCameraView();
25126
25127
  this.modelArray && this.modelArray.forEach((m) => {
25127
25128
  let _ = m.bimModel.releasedDistance ? m.bimModel.releasedDistance : 1e4;
25128
25129
  m.center && this.disTance(
25129
25130
  [o, c, d],
25130
25131
  [m.center._lng, m.center._lat, m.center._alt],
25131
25132
  this.calculateDistance(u, _)
25132
- ) ? this.map.getLayer(m.id, "modelId") && this.emit("leave", m) : this.showModelArray.indexOf(m.id) >= 0 && !this.map.getLayer(m.id, "modelId") && this.emit("enter", m);
25133
+ ) ? window.map.getLayer(m.id, "modelId") && this.emit("leave", m) : this.showModelArray.indexOf(m.id) >= 0 && !window.map.getLayer(m.id, "modelId") && this.emit("enter", m);
25133
25134
  });
25134
25135
  }, 2e3), this.freed());
25135
25136
  }
@@ -28288,7 +28289,7 @@ var Z_ = Fp.exports;
28288
28289
  const J_ = /* @__PURE__ */ rf(Z_);
28289
28290
  class x1 {
28290
28291
  constructor(a, o) {
28291
- window.mars3d ? (this.map = a, this.panoramicViewClass = o, this.coordinate = [
28292
+ window.mars3d ? (this.panoramicViewClass = o, this.coordinate = [
28292
28293
  {
28293
28294
  heading: 0,
28294
28295
  pitch: 0,
@@ -28331,10 +28332,10 @@ class x1 {
28331
28332
  this.timestamp = (/* @__PURE__ */ new Date()).getTime();
28332
28333
  const d = document.getElementById("app"), u = window.innerHeight, m = document.getElementById("mars3dContainer");
28333
28334
  m && (m.style.width = u.toString() + "px", m.style.height = u.toString() + "px"), d !== null && d.classList.add(this.panoramicViewClass);
28334
- let { lat: _, lng: y, alt: S } = this.map.getCameraView();
28335
- this.lat = _, this.lng = y, this.alt = S, this.map.viewer.scene.camera.frustum.fov = window.Cesium.Math.PI_OVER_THREE * 1.5;
28335
+ let { lat: _, lng: y, alt: S } = window.map.getCameraView();
28336
+ this.lat = _, this.lng = y, this.alt = S, window.map.viewer.scene.camera.frustum.fov = window.Cesium.Math.PI_OVER_THREE * 1.5;
28336
28337
  }
28337
- this.screenshotArray && this.coordinate ? this.coordinate[(o = this.screenshotArray) == null ? void 0 : o.length] ? this.map.setCameraView(
28338
+ this.screenshotArray && this.coordinate ? this.coordinate[(o = this.screenshotArray) == null ? void 0 : o.length] ? window.map.setCameraView(
28338
28339
  {
28339
28340
  lat: this.lat,
28340
28341
  lng: this.lng,
@@ -28358,11 +28359,14 @@ class x1 {
28358
28359
  * @returns { any }
28359
28360
  */
28360
28361
  async screenshot(a) {
28361
- const o = await this.map.expImage({ download: !1 }), c = this.map.container.getElementsByClassName(
28362
+ const o = await window.map.expImage({ download: !1 }), c = window.map.container.getElementsByClassName(
28362
28363
  "cesium-viewer-cesiumWidgetContainer"
28363
- ), d = await window.domtoimage.toPng(this.map.container, {
28364
- filter: (u) => u !== c[0]
28365
- });
28364
+ ), d = await window.domtoimage.toPng(
28365
+ window.map.container,
28366
+ {
28367
+ filter: (u) => u !== c[0]
28368
+ }
28369
+ );
28366
28370
  this.mergeImage(o.image, d, o.width, o.height).then(
28367
28371
  (u) => {
28368
28372
  var y;