@realsee/dnalogel 2.28.1 → 2.28.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/dist/index.js CHANGED
@@ -39,7 +39,7 @@ import cl from "animejs";
39
39
  import { GLTFLoader as Ff } from "@realsee/five/gltf-loader";
40
40
  function _f() {
41
41
  console.debug(
42
- "%c %c@realsee/dnalogel %cv2.28.1",
42
+ "%c %c@realsee/dnalogel %cv2.28.2",
43
43
  [
44
44
  "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
45
45
  "background-repeat: no-repeat",
@@ -6849,7 +6849,7 @@ let ps = class {
6849
6849
  /**
6850
6850
  * @realsee/dnalogel 版本号
6851
6851
  */
6852
- f(this, "VERSION", "2.28.1");
6852
+ f(this, "VERSION", "2.28.2");
6853
6853
  f(this, "five");
6854
6854
  /**
6855
6855
  * 插件事件钩子
@@ -32243,6 +32243,10 @@ class lE {
32243
32243
  f(this, "onPluginConfigChange", (t) => {
32244
32244
  this.makerObject.material.depthTest = t.config.modelDepthTest, this.outline.material.depthTest = t.config.modelDepthTest, this.plugin.five.needsRender = !0;
32245
32245
  });
32246
+ /** 插件整体可见性变化时,需要更新自身可见性 */
32247
+ f(this, "onPluginStateChange", () => {
32248
+ this.updateVisible(), this.updateTagVisible();
32249
+ });
32246
32250
  /** 更新标注可见性 */
32247
32251
  f(this, "updateVisible", () => {
32248
32252
  const { result: t, msg: e } = this.checkVisible();
@@ -32310,12 +32314,12 @@ class lE {
32310
32314
  };
32311
32315
  this.tagApp = new rE({ target: e, props: i }), this.updateTag();
32312
32316
  }
32313
- this.plugin.five.needsRender = !0, this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.hooks.on("stateChange", this.updateVisible), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate);
32317
+ this.plugin.five.needsRender = !0, this.plugin.hooks.on("stateChange", this.onPluginStateChange), this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate);
32314
32318
  }
32315
32319
  /** 卸载标注 */
32316
32320
  unmount() {
32317
32321
  var t;
32318
- this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (t = this.tagApp) == null || t.$destroy(), this.tagApp = null, this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.hooks.off("stateChange", this.updateVisible), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate);
32322
+ this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (t = this.tagApp) == null || t.$destroy(), this.tagApp = null, this.plugin.hooks.off("stateChange", this.onPluginStateChange), this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate);
32319
32323
  }
32320
32324
  /** 更改标注透明度
32321
32325
  * @param opacity 标注透明度,范围:0-1
@@ -32628,10 +32632,10 @@ class dE extends si {
32628
32632
  this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: s, userAction: i });
32629
32633
  }
32630
32634
  _enable(e) {
32631
- this.hooks.emit("enable", { userAction: e.userAction }), this.five.scene.add(this.modelGroup), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture), this.five.on("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("cameraUpdate", this.onFiveCameraUpdate);
32635
+ this.hooks.emit("enable", { userAction: e.userAction }), this.five.scene.add(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture), this.five.on("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("cameraUpdate", this.onFiveCameraUpdate);
32632
32636
  }
32633
32637
  _disable(e) {
32634
- this.hooks.emit("disable", { userAction: e.userAction }), this.five.scene.remove(this.modelGroup), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture), this.five.off("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraUpdate", this.onFiveCameraUpdate);
32638
+ this.hooks.emit("disable", { userAction: e.userAction }), this.five.scene.remove(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture), this.five.off("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraUpdate", this.onFiveCameraUpdate);
32635
32639
  }
32636
32640
  _show(e) {
32637
32641
  return H(this, null, function* () {
@@ -32644,7 +32648,7 @@ class dE extends si {
32644
32648
  });
32645
32649
  }
32646
32650
  }
32647
- const Tk = (n) => new dE(n);
32651
+ const Tk = (n, t) => new dE(n, t);
32648
32652
  Wf();
32649
32653
  _f();
32650
32654
  export {