@realsee/dnalogel 3.10.3 → 3.11.0

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 ta from "animejs";
39
39
  import { GLTFLoader as nm } from "@realsee/five/gltf-loader";
40
40
  function sm() {
41
41
  console.debug(
42
- "%c %c@realsee/dnalogel %cv3.10.3",
42
+ "%c %c@realsee/dnalogel %cv3.11.0",
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",
@@ -7085,7 +7085,7 @@ let Fi = class {
7085
7085
  /**
7086
7086
  * @realsee/dnalogel 版本号
7087
7087
  */
7088
- u(this, "VERSION", "3.10.3");
7088
+ u(this, "VERSION", "3.11.0");
7089
7089
  u(this, "five");
7090
7090
  /**
7091
7091
  * 插件事件钩子
@@ -33111,7 +33111,7 @@ class RE {
33111
33111
  /** 标注标签实例 */
33112
33112
  u(this, "tagApp");
33113
33113
  /** 标注标签是否可见 */
33114
- u(this, "tagVisible", !0);
33114
+ u(this, "tagVisible", null);
33115
33115
  /** 标注标签的世界坐标 */
33116
33116
  u(this, "tagPosition", new P.Vector3());
33117
33117
  /** 标注标签的 NDC 坐标 */
@@ -33217,7 +33217,7 @@ class RE {
33217
33217
  u(this, "updateTagVisible", () => {
33218
33218
  var i;
33219
33219
  const { result: t, msg: e } = this.checkTagVisible();
33220
- this.checkMsg.checkTagVisibleMsg = e, this.tagVisible !== t && (this.tagVisible = t, (i = this.tagApp) == null || i.$set({ visible: t }));
33220
+ this.checkMsg.checkTagVisibleMsg = e, this.tagVisible !== t && (this.tagVisible = t, this.tagVisible ? this.hooks.emit("tagShow") : this.hooks.emit("tagHide"), (i = this.tagApp) == null || i.$set({ visible: t }));
33221
33221
  });
33222
33222
  /** 检测标注标签是否可见 */
33223
33223
  u(this, "checkTagVisible", () => {
@@ -33254,6 +33254,8 @@ class RE {
33254
33254
  }
33255
33255
  /** 挂载标注 */
33256
33256
  mount() {
33257
+ if (this.mounted)
33258
+ return;
33257
33259
  this.mounted = !0, this.updateVisible(), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.modelGroup.add(this.makerObject, this.outline);
33258
33260
  const t = !!this.name, e = this.plugin.tagDomContainer;
33259
33261
  if (t) {
@@ -33272,7 +33274,7 @@ class RE {
33272
33274
  /** 卸载标注 */
33273
33275
  unmount() {
33274
33276
  var t, e;
33275
- 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), (e = this.resizeObserver) == null || e.unobserve();
33277
+ this.mounted && (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), (e = this.resizeObserver) == null || e.unobserve());
33276
33278
  }
33277
33279
  /** 更改标注透明度
33278
33280
  * @param opacity 标注透明度,范围:0-1