@realsee/dnalogel 2.1.0-alpha.21 → 2.1.0-alpha.22

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.
Files changed (131) hide show
  1. package/dist/index.es.js +12944 -17266
  2. package/dist/index.js +6027 -5946
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/CruisePluginController.html +1 -1
  5. package/docs/classes/Magnifier.html +1 -1
  6. package/docs/classes/ModelRoomLabelController.html +1 -1
  7. package/docs/classes/Object3DHelperController.html +1 -1
  8. package/docs/classes/PaintBrush.html +1 -1
  9. package/docs/classes/PanoTagPluginController.html +3 -3
  10. package/docs/enums/CameraMovementEffect.html +1 -1
  11. package/docs/enums/ContentType.html +1 -1
  12. package/docs/enums/DIRECTION.html +1 -1
  13. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  14. package/docs/enums/DimensionType.html +1 -1
  15. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  16. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  17. package/docs/enums/LinkType.html +1 -1
  18. package/docs/enums/PaintBrushTypeEnum.html +1 -1
  19. package/docs/enums/PointType.html +1 -1
  20. package/docs/enums/Rotation.html +1 -1
  21. package/docs/index.html +2 -2
  22. package/docs/interfaces/CSS3DRenderPluginEventMap.html +1 -1
  23. package/docs/interfaces/CSS3DRenderPluginState.html +1 -1
  24. package/docs/interfaces/CameraMovementPluginExportType.html +1 -1
  25. package/docs/interfaces/ContentTypeMap.html +23 -0
  26. package/docs/interfaces/FloorplanBounding.html +1 -1
  27. package/docs/interfaces/FloorplanData.html +1 -1
  28. package/docs/interfaces/FloorplanEntrance.html +1 -1
  29. package/docs/interfaces/FloorplanExtraObject.html +1 -1
  30. package/docs/interfaces/FloorplanExtraObject3D.html +1 -1
  31. package/docs/interfaces/FloorplanFloorData.html +1 -1
  32. package/docs/interfaces/FloorplanImagePosition.html +1 -1
  33. package/docs/interfaces/FloorplanObserver.html +1 -1
  34. package/docs/interfaces/FloorplanOutlineItem.html +1 -1
  35. package/docs/interfaces/FloorplanPosition.html +1 -1
  36. package/docs/interfaces/FloorplanRoomItem.html +1 -1
  37. package/docs/interfaces/FloorplanRoomLabelItem.html +1 -1
  38. package/docs/interfaces/FloorplanServerBounding.html +1 -1
  39. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  40. package/docs/interfaces/FloorplanServerData.html +1 -1
  41. package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
  42. package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
  43. package/docs/interfaces/FloorplanServerEntrance.html +1 -1
  44. package/docs/interfaces/FloorplanServerFloorData.html +1 -1
  45. package/docs/interfaces/FloorplanServerImagePosition.html +1 -1
  46. package/docs/interfaces/FloorplanServerObserver.html +1 -1
  47. package/docs/interfaces/FloorplanServerOutlineItem.html +1 -1
  48. package/docs/interfaces/FloorplanServerPosition.html +1 -1
  49. package/docs/interfaces/FloorplanServerRoomItem.html +1 -1
  50. package/docs/interfaces/FloorplanServerRoomLabelItem.html +1 -1
  51. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  52. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  53. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  54. package/docs/interfaces/LineJson.html +1 -1
  55. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  56. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  57. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  58. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  59. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  60. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  61. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  62. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  63. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  64. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  65. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  66. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  67. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  68. package/docs/interfaces/Object3DHelperState.html +1 -1
  69. package/docs/interfaces/OpenParameter.html +1 -1
  70. package/docs/interfaces/PaintBrushAction.html +1 -1
  71. package/docs/interfaces/PaintBrushConfigs.html +1 -1
  72. package/docs/interfaces/PaintBrushState.html +1 -1
  73. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +1 -1
  74. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  75. package/docs/interfaces/PanoMeasureParameterType.html +1 -1
  76. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  77. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  78. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  79. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
  80. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
  81. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
  82. package/docs/interfaces/PanoRulerProPluginState.html +1 -1
  83. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  84. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  85. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  86. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  87. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  88. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  89. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  90. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  91. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  92. package/docs/interfaces/Point.html +1 -1
  93. package/docs/interfaces/PointJson.html +1 -1
  94. package/docs/interfaces/Room.html +1 -1
  95. package/docs/interfaces/RoomInfo.html +1 -1
  96. package/docs/interfaces/RoomLabel.html +1 -1
  97. package/docs/interfaces/RoomRules.html +1 -1
  98. package/docs/interfaces/Rooms.html +1 -1
  99. package/docs/interfaces/Scissor.html +1 -1
  100. package/docs/interfaces/TagConfig.html +1 -1
  101. package/docs/interfaces/Tags.html +1 -1
  102. package/docs/modules.html +3 -3
  103. package/libs/PanoTagPlugin/Assets/Icon.d.ts +2 -1
  104. package/libs/PanoTagPlugin/Assets/Icon.js +3 -2
  105. package/libs/PanoTagPlugin/Components/Common/Media.js +558 -548
  106. package/libs/PanoTagPlugin/Components/Common/MediaItem.js +107 -57
  107. package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +85 -79
  108. package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +65 -69
  109. package/libs/PanoTagPlugin/Components/PointTag.js +1 -1
  110. package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +42 -42
  111. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +91 -93
  112. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +54 -58
  113. package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +43 -40
  114. package/libs/PanoTagPlugin/Components/Tag/TextTag.js +56 -56
  115. package/libs/PanoTagPlugin/Components/Tag/index.js +1 -1
  116. package/libs/PanoTagPlugin/Components/TagWrapper.js +1 -1
  117. package/libs/PanoTagPlugin/controller/TagComputer.d.ts +1 -0
  118. package/libs/PanoTagPlugin/controller/TagComputer.js +1 -1
  119. package/libs/PanoTagPlugin/controller/index.js +24 -30
  120. package/libs/PanoTagPlugin/index.js +2 -2
  121. package/libs/PanoTagPlugin/tag.config.js +1 -2
  122. package/libs/PanoTagPlugin/typings/tag.d.ts +1 -1
  123. package/libs/PanoTagPlugin/utils/doUtil.d.ts +1 -0
  124. package/libs/PanoTagPlugin/utils/doUtil.js +12 -0
  125. package/libs/{TagComputer.5bd7014b.js → TagComputer.0920083a.js} +108 -90
  126. package/libs/index.js +2 -2
  127. package/package.json +1 -3
  128. package/dist/index.cjs.js +0 -556
  129. package/dist/index.umd.js +0 -556
  130. package/libs/PanoTagPlugin/utils/nullishCoalescing.d.ts +0 -2
  131. package/libs/PanoTagPlugin/utils/nullishCoalescing.js +0 -7
@@ -1,20 +1,20 @@
1
- var V = Object.defineProperty;
2
- var U = (r, d, e) => d in r ? V(r, d, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[d] = e;
3
- var T = (r, d, e) => (U(r, typeof d != "symbol" ? d + "" : d, e), e);
1
+ var U = Object.defineProperty;
2
+ var V = (r, d, e) => d in r ? U(r, d, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[d] = e;
3
+ var T = (r, d, e) => (V(r, typeof d != "symbol" ? d + "" : d, e), e);
4
4
  import * as w from "three";
5
5
  import { DefaultConfig as E } from "./PanoTagPlugin/tag.config.js";
6
6
  import { DimensionType as b, PointType as v } from "./PanoTagPlugin/typings/tag.js";
7
- import { arrayPositionToVector3 as R, anyPositionToVector3 as M } from "./CSS3DRenderPlugin/utils/positionToVector3.js";
7
+ import { arrayPositionToVector3 as M, anyPositionToVector3 as R } from "./CSS3DRenderPlugin/utils/positionToVector3.js";
8
8
  import { planeNormal as O } from "./PanoTagPlugin/utils/planeNormal.js";
9
- import { tagPosition as m } from "./PanoTagPlugin/utils/tagPosition.js";
9
+ import { tagPosition as C } from "./PanoTagPlugin/utils/tagPosition.js";
10
10
  import { checkRange as P } from "./PanoTagPlugin/utils/checkRange.js";
11
- import { TagCacheController as $ } from "./PanoTagPlugin/controller/TagCacheController.js";
11
+ import { TagCacheController as S } from "./PanoTagPlugin/controller/TagCacheController.js";
12
12
  var y = { exports: {} };
13
- function C(r) {
13
+ function m(r) {
14
14
  return r === null ? "null" : typeof r > "u" ? "undefined" : typeof r == "object" ? Array.isArray(r) ? "array" : "object" : typeof r;
15
15
  }
16
16
  function B(r) {
17
- return C(r) === "object" ? D(r) : C(r) === "array" ? I(r) : r;
17
+ return m(r) === "object" ? D(r) : m(r) === "array" ? I(r) : r;
18
18
  }
19
19
  function I(r) {
20
20
  return r.map(B);
@@ -28,28 +28,28 @@ function D(r) {
28
28
  function x(r, d = [], e = {}) {
29
29
  const i = {
30
30
  arrayBehaviour: e.arrayBehaviour || "replace"
31
- }, o = d.map((t) => t || {}), n = r || {};
32
- for (let t = 0; t < o.length; t++) {
33
- const c = o[t], s = Object.keys(c);
34
- for (let a = 0; a < s.length; a++) {
35
- const f = s[a], u = c[f], l = C(u), g = C(n[f]);
36
- if (l === "object")
31
+ }, n = d.map((t) => t || {}), o = r || {};
32
+ for (let t = 0; t < n.length; t++) {
33
+ const c = n[t], s = Object.keys(c);
34
+ for (let l = 0; l < s.length; l++) {
35
+ const f = s[l], u = c[f], a = m(u), g = m(o[f]);
36
+ if (a === "object")
37
37
  if (g !== "undefined") {
38
- const h = g === "object" ? n[f] : {};
39
- n[f] = x({}, [h, D(u)], i);
38
+ const h = g === "object" ? o[f] : {};
39
+ o[f] = x({}, [h, D(u)], i);
40
40
  } else
41
- n[f] = D(u);
42
- else if (l === "array")
41
+ o[f] = D(u);
42
+ else if (a === "array")
43
43
  if (g === "array") {
44
44
  const h = I(u);
45
- n[f] = i.arrayBehaviour === "merge" ? n[f].concat(h) : h;
45
+ o[f] = i.arrayBehaviour === "merge" ? o[f].concat(h) : h;
46
46
  } else
47
- n[f] = I(u);
47
+ o[f] = I(u);
48
48
  else
49
- n[f] = u;
49
+ o[f] = u;
50
50
  }
51
51
  }
52
- return n;
52
+ return o;
53
53
  }
54
54
  y.exports = function(d, ...e) {
55
55
  return x(d, e);
@@ -60,7 +60,7 @@ y.exports.noMutate = function(...d) {
60
60
  y.exports.withOptions = function(d, e, i) {
61
61
  return x(d, e, i);
62
62
  };
63
- class L extends $ {
63
+ class K extends S {
64
64
  constructor(e) {
65
65
  super(e);
66
66
  T(this, "tags", []);
@@ -68,7 +68,7 @@ class L extends $ {
68
68
  T(this, "raycaster", new w.Raycaster());
69
69
  }
70
70
  getTagById(e) {
71
- const i = this.tags.find((o) => o.id === e);
71
+ const i = this.tags.find((n) => n.id === e);
72
72
  if (!i) {
73
73
  console.error(`getTagById(): tag is ${i}, id is ${e}`);
74
74
  return;
@@ -81,57 +81,57 @@ class L extends $ {
81
81
  changeGlobalConfig(e, i = !0) {
82
82
  i ? this.config.globalConfig = y.exports({}, this.config.globalConfig, e) : this.config.globalConfig = e, this.clearCache();
83
83
  }
84
- changeContentTypeConfig(e, i, o = !0) {
85
- this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), o ? this.config.contentTypeConfig[e] = y.exports({}, this.config.contentTypeConfig[e], i) : this.config.contentTypeConfig[e] = i, this.clearCache();
84
+ changeContentTypeConfig(e, i, n = !0) {
85
+ this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), n ? this.config.contentTypeConfig[e] = y.exports({}, this.config.contentTypeConfig[e], i) : this.config.contentTypeConfig[e] = i, this.clearCache();
86
86
  }
87
87
  getVisibleByPanoIndex(e, i) {
88
88
  var t;
89
- const o = this.getCaches({ panoIndex: i, id: e.id }), n = (t = this.five.panoIndex) != null ? t : i;
90
- if (o.visible !== void 0)
91
- return o.visible;
89
+ const n = this.getCaches({ panoIndex: i, id: e.id }), o = (t = this.five.panoIndex) != null ? t : i;
90
+ if (n.visible !== void 0)
91
+ return n.visible;
92
92
  {
93
93
  const c = (() => {
94
- var f, u, l, g, h;
95
- const s = (f = this.getTagConfig(e).visibleConfig) != null ? f : {}, a = this.getDistance(e);
94
+ var f, u, a, g, h;
95
+ const s = (f = this.getTagConfig(e).visibleConfig) != null ? f : {}, l = this.getDistance(e);
96
96
  if (typeof s == "function")
97
- return s(this.five, { tag: e, distance: a });
97
+ return s(this.five, { tag: e, distance: l });
98
98
  if (s.keep === "hidden")
99
99
  return !1;
100
100
  if (s.keep === "visible")
101
101
  return !0;
102
- if (s.visiblePanoIndex !== void 0 && (n === void 0 || !s.visiblePanoIndex.includes(n)) || s.visibleDistance !== void 0 && s.visibleDistance !== "unLimited" && P(a, s.visibleDistance) === !1)
102
+ if (s.visiblePanoIndex !== void 0 && (o === void 0 || !s.visiblePanoIndex.includes(o)) || s.visibleDistance !== void 0 && s.visibleDistance !== "unLimited" && P(l, s.visibleDistance) === !1)
103
103
  return !1;
104
104
  if (((u = s.intersectRaycaster) == null ? void 0 : u.enabled) !== !1) {
105
- if (n === void 0)
105
+ if (o === void 0)
106
106
  return !1;
107
- const p = (l = this.five.work.observers[n]) == null ? void 0 : l.position;
107
+ const p = (a = this.five.work.observers[o]) == null ? void 0 : a.position;
108
108
  if (p === void 0)
109
109
  throw new Error(`getVisible(): observerPosition is ${p}`);
110
- const j = m(e.position).sub(p).normalize();
110
+ const j = C(e.position).sub(p).normalize();
111
111
  this.raycaster.set(p, j);
112
112
  const [k] = this.five.model.intersectRaycaster(this.raycaster), A = (h = (g = s.intersectRaycaster) == null ? void 0 : g.distanceAccuracy) != null ? h : 0.01;
113
- if (k && k.distance + A < a)
113
+ if (k && k.distance + A < l)
114
114
  return !1;
115
115
  }
116
116
  return !(s.angleRange && e.dimensionType === b.Three && P(this.getAngle(e), s.angleRange) === !1);
117
117
  })();
118
- return o.visible = c, o.visible;
118
+ return n.visible = c, n.visible;
119
119
  }
120
120
  }
121
121
  getUnfoldedByPanoIndex(e, i) {
122
122
  if (!this.getVisibleByPanoIndex(e))
123
123
  return;
124
- const n = this.getCaches({ panoIndex: i, id: e.id });
125
- if (n.unfolded !== void 0)
126
- return n.unfolded;
124
+ const o = this.getCaches({ panoIndex: i, id: e.id });
125
+ if (o.unfolded !== void 0)
126
+ return o.unfolded;
127
127
  {
128
128
  const t = this.getTagConfig(e).unfoldedConfig;
129
129
  if (!t)
130
130
  return;
131
131
  const c = (() => {
132
- const a = this.getDistance(e);
132
+ const l = this.getDistance(e);
133
133
  if (typeof t == "function")
134
- return t(this.five, { tag: e, distance: a });
134
+ return t(this.five, { tag: e, distance: l });
135
135
  if (t.keep === "folded")
136
136
  return !1;
137
137
  if (t.keep === "unfolded")
@@ -140,21 +140,21 @@ class L extends $ {
140
140
  return !1;
141
141
  if (t.disableFold === !0)
142
142
  return !0;
143
- if (t.unfoldDistance && P(a, t.unfoldDistance) === !1)
143
+ if (t.unfoldDistance && P(l, t.unfoldDistance) === !1)
144
144
  return !1;
145
145
  })();
146
- n.unfolded = c;
146
+ o.unfolded = c;
147
147
  const s = this.getUnfoldedByCamera(e);
148
- return s !== void 0 ? s : n.unfolded;
148
+ return s !== void 0 ? s : o.unfolded;
149
149
  }
150
150
  }
151
151
  getUnfoldedByCamera(e) {
152
152
  return this.getVisibleByPanoIndex(e) ? (() => {
153
153
  var c;
154
- const n = this.getDistance(e), t = this.getTagConfig(e).unfoldedConfig;
154
+ const o = this.getDistance(e), t = this.getTagConfig(e).unfoldedConfig;
155
155
  if (!!t) {
156
156
  if (typeof t == "function")
157
- return t(this.five, { tag: e, distance: n });
157
+ return t(this.five, { tag: e, distance: o });
158
158
  if (t.keep === "folded")
159
159
  return !1;
160
160
  if (t.keep === "unfolded")
@@ -171,17 +171,17 @@ class L extends $ {
171
171
  return !1;
172
172
  }
173
173
  if (t.autoUnfold.strategy === "MinimumDistance") {
174
- const f = this.filterPointTag().filter((l) => this.getVisibleByPanoIndex(l)).filter((l) => {
175
- const g = this.getTagProject(l);
174
+ const f = this.filterPointTag().filter((a) => this.getVisibleByPanoIndex(a)).filter((a) => {
175
+ const g = this.getTagProject(a);
176
176
  if (!g)
177
177
  return !1;
178
178
  const { x: h, y: p, z: j } = g;
179
179
  return !(Math.abs(j) > 1 || Math.abs(h) > 1 || Math.abs(p) > 1);
180
- }).filter((l) => {
180
+ }).filter((a) => {
181
181
  var h;
182
- const g = this.getTagConfig(l).unfoldedConfig;
182
+ const g = this.getTagConfig(a).unfoldedConfig;
183
183
  return typeof g == "object" && ((h = g.autoUnfold) == null ? void 0 : h.strategy) === "MinimumDistance";
184
- }).map((l) => ({ id: l.id, distance: this.getDistance(l) })).filter((l) => l.distance !== void 0).sort((l, g) => l.distance - g.distance).findIndex((l) => l.id === e.id);
184
+ }).map((a) => ({ id: a.id, distance: this.getDistance(a) })).filter((a) => a.distance !== void 0).sort((a, g) => a.distance - g.distance).findIndex((a) => a.id === e.id);
185
185
  if (f === -1 || f <= ((c = t.autoUnfold.maxNumber) != null ? c : 1) - 1 === !1)
186
186
  return !1;
187
187
  }
@@ -191,66 +191,84 @@ class L extends $ {
191
191
  }
192
192
  getDistance(e, i) {
193
193
  var t, c, s;
194
- const o = (t = this.five.panoIndex) != null ? t : i;
195
- if (o === void 0)
196
- throw new Error(`getDistance(): fivePanoIndex is ${o}`);
197
- const n = this.getCaches({ panoIndex: i, id: e.id });
198
- if (n.distance !== void 0)
199
- return n.distance;
194
+ const n = (t = this.five.panoIndex) != null ? t : i;
195
+ if (n === void 0)
196
+ throw new Error(`getDistance(): fivePanoIndex is ${n}`);
197
+ const o = this.getCaches({ panoIndex: i, id: e.id });
198
+ if (o.distance !== void 0)
199
+ return o.distance;
200
200
  {
201
- const a = (s = (c = this.five.work) == null ? void 0 : c.observers[o]) == null ? void 0 : s.position;
202
- if (a === void 0)
203
- throw new Error(`getDistance(): observerPosition is ${a}`);
204
- const f = (() => e.pointType === v.PointTag ? R(e == null ? void 0 : e.position) : m(e.position))(), u = a.distanceTo(f);
205
- return n.distance = u, u;
201
+ const l = (s = (c = this.five.work) == null ? void 0 : c.observers[n]) == null ? void 0 : s.position;
202
+ if (l === void 0)
203
+ throw new Error(`getDistance(): observerPosition is ${l}`);
204
+ const f = (() => e.pointType === v.PointTag ? M(e == null ? void 0 : e.position) : C(e.position))(), u = l.distanceTo(f);
205
+ return o.distance = u, u;
206
206
  }
207
207
  }
208
208
  getAngle(e, i) {
209
209
  var t, c, s;
210
- const o = (t = this.five.panoIndex) != null ? t : i;
211
- if (o === void 0)
212
- throw new Error(`getDistance(): fivePanoIndex is ${o}`);
213
- const n = this.getCaches({ panoIndex: i, id: e.id });
214
- if (n.angle !== void 0)
215
- return n.angle;
210
+ const n = (t = this.five.panoIndex) != null ? t : i;
211
+ if (n === void 0)
212
+ throw new Error(`getDistance(): fivePanoIndex is ${n}`);
213
+ const o = this.getCaches({ panoIndex: i, id: e.id });
214
+ if (o.angle !== void 0)
215
+ return o.angle;
216
216
  {
217
- const a = (s = (c = this.five.work) == null ? void 0 : c.observers[o]) == null ? void 0 : s.position;
218
- if (a === void 0)
219
- throw new Error(`getAngleRange(): observerPosition is ${a}`);
220
- const f = (() => e.pointType === v.PointTag ? M(e.normal) : O(e.position))();
217
+ const l = (s = (c = this.five.work) == null ? void 0 : c.observers[n]) == null ? void 0 : s.position;
218
+ if (l === void 0)
219
+ throw new Error(`getAngleRange(): observerPosition is ${l}`);
220
+ const f = (() => e.pointType === v.PointTag ? R(e.normal) : O(e.position))();
221
221
  if (!f)
222
222
  return;
223
- const u = new w.Vector3().copy(a).sub(m(e.position)), l = f.angleTo(u) * 180 / Math.PI;
224
- return n.angle = l, n.angle;
223
+ const u = new w.Vector3().copy(l).sub(C(e.position)), a = f.angleTo(u) * 180 / Math.PI;
224
+ return o.angle = a, o.angle;
225
225
  }
226
226
  }
227
227
  getTagConfig(e) {
228
- var n;
228
+ var o;
229
229
  if (!e)
230
- return (n = this.config.globalConfig) != null ? n : {};
230
+ return (o = this.config.globalConfig) != null ? o : {};
231
231
  const i = {};
232
232
  return this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((t) => {
233
233
  const c = t;
234
234
  if (i[c])
235
235
  return;
236
- const s = c.split("-"), [a = "Any", f = "Any", u = "Any"] = s || [];
237
- (e.dimensionType === a || a === "Any") && (e.contentType === f || f === "Any") && (e.pointType === u || u === "Any") && (i[c] = this.config.contentTypeConfig[c]);
236
+ const s = c.split("-"), [l = "Any", f = "Any", u = "Any"] = s || [];
237
+ (e.dimensionType === l || l === "Any") && (e.contentType === f || f === "Any") && (e.pointType === u || u === "Any") && (i[c] = this.config.contentTypeConfig[c]);
238
238
  }), y.exports({}, this.config.globalConfig, ...Object.values(i), e.config);
239
239
  }
240
+ canBe(e, i) {
241
+ const n = this.getTagConfig(i);
242
+ if (!n || typeof n != "object")
243
+ return !0;
244
+ if (e === "show" || e === "hide") {
245
+ if (!n.visibleConfig || typeof n.visibleConfig != "object")
246
+ return !0;
247
+ if (e === "show" && n.visibleConfig.keep === "hidden" || e === "hide" && (n.visibleConfig.keep === "visible" || n.visibleConfig.alwaysShowWhenMovePano))
248
+ return !1;
249
+ }
250
+ if (e === "fold" || e === "unfold") {
251
+ if (!n.unfoldedConfig || typeof n.unfoldedConfig != "object")
252
+ return !0;
253
+ if (e === "fold" && (n.unfoldedConfig.disableFold || n.unfoldedConfig.keep === "unfolded") || e === "unfold" && (n.unfoldedConfig.disableUnfold || n.unfoldedConfig.keep === "folded"))
254
+ return !1;
255
+ }
256
+ return !0;
257
+ }
240
258
  setPointTagPosition() {
241
259
  const e = this.filterPointTag();
242
260
  e.length !== 0 && e.forEach((i) => {
243
- var n;
244
- if (!((n = i.state) != null && n.visible)) {
261
+ var o;
262
+ if (!((o = i.state) != null && o.visible)) {
245
263
  i.pointTagStyle = void 0;
246
264
  return;
247
265
  }
248
- const o = this.getTagProject(i);
249
- if (!o) {
266
+ const n = this.getTagProject(i);
267
+ if (!n) {
250
268
  i.pointTagStyle = void 0;
251
269
  return;
252
270
  }
253
- i.pointTagStyle = { leftPercent: (o.x + 1) / 2 * 100, topPercent: (-o.y + 1) / 2 * 100 };
271
+ i.pointTagStyle = { leftPercent: (n.x + 1) / 2 * 100, topPercent: (-n.y + 1) / 2 * 100 };
254
272
  });
255
273
  }
256
274
  setVisibleByPanoIndex() {
@@ -263,17 +281,17 @@ class L extends $ {
263
281
  this.tags.forEach((e) => {
264
282
  const i = this.getUnfoldedByPanoIndex(e);
265
283
  if (!!e.state && (i !== void 0 && (e.state.unfolded = i), i && !e.state.visible)) {
266
- const o = this.getTagConfig(e);
267
- typeof o.unfoldedConfig == "object" && o.unfoldedConfig.autoUnfoldWhenHide !== !1 && (e.state.unfolded = !1);
284
+ const n = this.getTagConfig(e);
285
+ typeof n.unfoldedConfig == "object" && n.unfoldedConfig.autoUnfoldWhenHide !== !1 && (e.state.unfolded = !1);
268
286
  }
269
287
  });
270
288
  }
271
289
  getTagProject(e) {
272
290
  if (!this.getVisibleByPanoIndex(e))
273
291
  return;
274
- const o = m(e.position), { x: n, y: t, z: c } = o.project(this.five.camera);
292
+ const n = C(e.position), { x: o, y: t, z: c } = n.project(this.five.camera);
275
293
  if (!(c > 1))
276
- return { x: n, y: t, z: c };
294
+ return { x: o, y: t, z: c };
277
295
  }
278
296
  filterPointTag() {
279
297
  return this.tags.filter((e) => e.pointType === v.PointTag);
@@ -292,6 +310,6 @@ class L extends $ {
292
310
  }
293
311
  }
294
312
  export {
295
- L as T,
313
+ K as T,
296
314
  y as o
297
315
  };
package/libs/index.js CHANGED
@@ -205,7 +205,7 @@ import "./ItemLabelPlugin/utils/getStrokeLength.js";
205
205
  import "./ItemLabelPlugin/utils/getLabelTransform.js";
206
206
  import "./ItemLabelPlugin/utils/transform2RenderData.js";
207
207
  import "./ItemLabelPlugin/utils/parseData.js";
208
- import "./TagComputer.5bd7014b.js";
208
+ import "./TagComputer.0920083a.js";
209
209
  import "./PanoTagPlugin/tag.config.js";
210
210
  import "./PanoTagPlugin/utils/planeNormal.js";
211
211
  import "./PanoTagPlugin/utils/tagPosition.js";
@@ -224,7 +224,7 @@ import "./PanoTagPlugin/utils/search.js";
224
224
  import "./PanoTagPlugin/utils/constants.js";
225
225
  import "./PanoTagPlugin/Components/Common/Arrow.js";
226
226
  import "./PanoTagPlugin/Assets/Icon.js";
227
- import "./PanoTagPlugin/utils/nullishCoalescing.js";
227
+ import "./PanoTagPlugin/utils/doUtil.js";
228
228
  import "./PanoTagPlugin/Components/Tag/ImageTextTag.js";
229
229
  import "./PanoTagPlugin/Components/Common/Line/Polyline.js";
230
230
  import "./PanoTagPlugin/Components/Common/Media.js";
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
3
  "main": "dist/index.es.js",
4
- "module": "dist/index.es.js",
5
- "browser": "dist/index.es.js",
6
4
  "type": "module",
7
5
  "types": "libs/index.d.ts",
8
6
  "author": "REALSEE-DEVELOPER",
9
7
  "repository": "https://github.com/realsee-developer/dnalogel.git",
10
8
  "description": "如视 VR 看房插件合集",
11
9
  "private": false,
12
- "version": "2.1.0-alpha.21",
10
+ "version": "2.1.0-alpha.22",
13
11
  "license": "SEE LICENSE IN TERMS.txt",
14
12
  "scripts": {
15
13
  "build": "sh bin/build-production.sh",