@realsee/dnalogel 3.11.0 → 3.12.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.
Files changed (45) hide show
  1. package/dist/CruisePlugin/BaseController.d.ts +5 -0
  2. package/dist/CruisePlugin/Work.d.ts +1 -5
  3. package/dist/GuideLinePlugin/Controller.d.ts +4 -0
  4. package/dist/PanoTagPlugin/controller/TagUtil.d.ts +2 -3
  5. package/dist/PanoTagPlugin/controller/index.d.ts +1 -0
  6. package/dist/PanoTagPlugin/utils/DebugUtil.d.ts +6 -0
  7. package/dist/base/BasePlugin.d.ts +1 -1
  8. package/dist/index.cjs.js +52 -52
  9. package/dist/index.js +3178 -3067
  10. package/dist/index.umd.js +44 -44
  11. package/dist/shared-utils/Utils/BaseUtil.d.ts +5 -0
  12. package/dist/shared-utils/Utils/FiveUtil.d.ts +10 -0
  13. package/dist/shared-utils/Utils/WorkUtil.d.ts +33 -0
  14. package/libs/CruisePlugin/BaseController.d.ts +5 -0
  15. package/libs/CruisePlugin/BaseController.js +66 -54
  16. package/libs/CruisePlugin/Move.js +29 -25
  17. package/libs/CruisePlugin/Work.d.ts +1 -5
  18. package/libs/CruisePlugin/Work.js +133 -129
  19. package/libs/CruisePlugin/index.js +10 -6
  20. package/libs/GuideLinePlugin/Controller.d.ts +4 -0
  21. package/libs/GuideLinePlugin/Controller.js +41 -30
  22. package/libs/GuideLinePlugin/GuideLineItem.js +6 -2
  23. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +61 -61
  24. package/libs/GuideLinePlugin/GuideLineModeItem.js +5 -2
  25. package/libs/GuideLinePlugin/index.js +12 -8
  26. package/libs/PanoTagPlugin/controller/TagComputer.js +24 -22
  27. package/libs/PanoTagPlugin/controller/TagRender.js +4 -2
  28. package/libs/PanoTagPlugin/controller/TagUtil.d.ts +2 -3
  29. package/libs/PanoTagPlugin/controller/TagUtil.js +92 -100
  30. package/libs/PanoTagPlugin/controller/index.d.ts +1 -0
  31. package/libs/PanoTagPlugin/controller/index.js +32 -26
  32. package/libs/PanoTagPlugin/index.js +14 -11
  33. package/libs/PanoTagPlugin/utils/DebugUtil.d.ts +6 -0
  34. package/libs/PanoTagPlugin/utils/DebugUtil.js +25 -0
  35. package/libs/base/BasePlugin.d.ts +1 -1
  36. package/libs/base/BasePlugin.js +2 -2
  37. package/libs/index.js +125 -121
  38. package/libs/shared-utils/Utils/BaseUtil.d.ts +5 -0
  39. package/libs/shared-utils/Utils/BaseUtil.js +12 -0
  40. package/libs/shared-utils/Utils/FiveUtil.d.ts +10 -0
  41. package/libs/shared-utils/Utils/FiveUtil.js +27 -0
  42. package/libs/shared-utils/Utils/WorkUtil.d.ts +33 -0
  43. package/libs/shared-utils/Utils/WorkUtil.js +68 -0
  44. package/libs/shared-utils/logger.js +1 -1
  45. package/package.json +1 -1
@@ -75,6 +75,8 @@ import "../utils/tag/adaptConfig.js";
75
75
  import "../../shared-utils/typescript/entries.js";
76
76
  import "../../shared-utils/url/getUrl.js";
77
77
  import "../../shared-utils/five/transformPosition.js";
78
+ import "../../shared-utils/Utils/WorkUtil.js";
79
+ import "../../shared-utils/Utils/BaseUtil.js";
78
80
  import "../../shared-utils/five/getFloorIndex.js";
79
81
  import "../../shared-utils/safeObj.js";
80
82
  import "../../shared-utils/three/loadTexture.js";
@@ -160,7 +162,7 @@ import "../../CSS3DRenderPlugin/Controller.js";
160
162
  import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
161
163
  import "@realsee/five/gltf-loader";
162
164
  const $ = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map();
163
- class fi extends I {
165
+ class Ti extends I {
164
166
  constructor(t) {
165
167
  super(t);
166
168
  h(this, "rendererMap", /* @__PURE__ */ new Map());
@@ -493,5 +495,5 @@ class fi extends I {
493
495
  }
494
496
  }
495
497
  export {
496
- fi as TagRender
498
+ Ti as TagRender
497
499
  };
@@ -7,12 +7,13 @@ import { Five } from '@realsee/five';
7
7
  import type { State as FiveState } from '@realsee/five';
8
8
  import type { Mode } from '@realsee/five';
9
9
  import { FiveDomEvents } from '../../shared-utils/five/FiveDomEvents';
10
+ import { WorkUtil } from '../../shared-utils/Utils/WorkUtil';
10
11
  export declare abstract class TagUtil extends TagCache {
11
12
  tags: TagInstance[];
12
13
  config: Pick<Tags, 'globalConfig' | 'contentTypeConfig'>;
13
14
  set workCode(workCode: string);
14
15
  get workCode(): string;
15
- protected get work(): import("@realsee/five").Work;
16
+ workUtil: WorkUtil;
16
17
  protected mediaStore: MediaStore;
17
18
  /** css3DRenderPlugin */
18
19
  protected css3DRenderPlugin?: CSS3DRenderPluginExportType;
@@ -27,7 +28,6 @@ export declare abstract class TagUtil extends TagCache {
27
28
  disposed: boolean;
28
29
  };
29
30
  protected domEvents: FiveDomEvents;
30
- private _workCode;
31
31
  protected constructor(five: Five);
32
32
  getTagById<C extends TagContentType = TagContentType, S extends StickType = StickType>(id: TagId): TagInstance<C, S> | undefined;
33
33
  /** 暂停当前标签内进行的所有多媒体 */
@@ -43,7 +43,6 @@ export declare abstract class TagUtil extends TagCache {
43
43
  * @description 获取标签当前状态
44
44
  */
45
45
  getCurrentVisibleState(tag: TagInstance): boolean;
46
- protected getObserverPosition: (index: number) => THREE.Vector3;
47
46
  protected loadVideoFirstFrame: () => void;
48
47
  protected updateTagConfig(): void;
49
48
  protected can<T extends Tag>(action: 'show' | 'hide' | 'fold' | 'unfold', paramsTag: T): boolean;
@@ -1,40 +1,41 @@
1
- var K = Object.defineProperty, Q = Object.defineProperties;
2
- var Y = Object.getOwnPropertyDescriptors;
3
- var B = Object.getOwnPropertySymbols;
4
- var Z = Object.prototype.hasOwnProperty, ee = Object.prototype.propertyIsEnumerable;
5
- var w = (a, s, e) => s in a ? K(a, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[s] = e, M = (a, s) => {
1
+ var q = Object.defineProperty, K = Object.defineProperties;
2
+ var Q = Object.getOwnPropertyDescriptors;
3
+ var x = Object.getOwnPropertySymbols;
4
+ var Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable;
5
+ var w = (l, s, e) => s in l ? q(l, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[s] = e, k = (l, s) => {
6
6
  for (var e in s || (s = {}))
7
- Z.call(s, e) && w(a, e, s[e]);
8
- if (B)
9
- for (var e of B(s))
10
- ee.call(s, e) && w(a, e, s[e]);
11
- return a;
12
- }, N = (a, s) => Q(a, Y(s));
13
- var d = (a, s, e) => (w(a, typeof s != "symbol" ? s + "" : s, e), e);
14
- import { defaultGlobalConfig as ie } from "../typings/tag/TagConfig.js";
7
+ Y.call(s, e) && w(l, e, s[e]);
8
+ if (x)
9
+ for (var e of x(s))
10
+ Z.call(s, e) && w(l, e, s[e]);
11
+ return l;
12
+ }, R = (l, s) => K(l, Q(s));
13
+ var p = (l, s, e) => (w(l, typeof s != "symbol" ? s + "" : s, e), e);
14
+ import { defaultGlobalConfig as ee } from "../typings/tag/TagConfig.js";
15
15
  import { objectAssignDeepExports as y } from "../../vendor/object-assign-deep/objectAssignDeep.js";
16
- import * as te from "three";
17
- import { DefaultConfig as oe } from "../tag.config.js";
16
+ import * as ie from "three";
17
+ import { DefaultConfig as te } from "../tag.config.js";
18
18
  import { anyPositionToVector3 as C } from "../../shared-utils/positionToVector3.js";
19
19
  import { planeNormal as E } from "../utils/planeNormal.js";
20
- import { getTagCenterPosition as $ } from "../utils/tagPosition.js";
21
- import { normalPositionToPositions as re } from "../utils/normalPositionToPositions.js";
22
- import { TagCache as ne } from "./TagCache.js";
23
- import { writable as se } from "../../vendor/svelte/store/index.js";
24
- import { isIOSWX as fe } from "../../shared-utils/device.js";
25
- import { Five as ae } from "@realsee/five";
26
- import { isMediaPlaneTag as ce, isMediaModelTag as z, isPlaneTag as le, isPoint3DTag as de } from "../utils/tag/tagCheck.js";
27
- import { VideoPlane as ue } from "../utils/model/mediaPlane.js";
28
- import { FiveDomEvents as pe } from "../../shared-utils/five/FiveDomEvents.js";
29
- import H from "../utils/tag/adaptConfig.js";
30
- import { isPanoramaLike as A, isModelLike as J } from "../../shared-utils/five/mode.js";
20
+ import { getTagCenterPosition as _ } from "../utils/tagPosition.js";
21
+ import { normalPositionToPositions as oe } from "../utils/normalPositionToPositions.js";
22
+ import { TagCache as re } from "./TagCache.js";
23
+ import { writable as ne } from "../../vendor/svelte/store/index.js";
24
+ import { isIOSWX as se } from "../../shared-utils/device.js";
25
+ import { Five as fe } from "@realsee/five";
26
+ import { isMediaPlaneTag as le, isMediaModelTag as B, isPlaneTag as ce, isPoint3DTag as ae } from "../utils/tag/tagCheck.js";
27
+ import { VideoPlane as de } from "../utils/model/mediaPlane.js";
28
+ import { FiveDomEvents as ue } from "../../shared-utils/five/FiveDomEvents.js";
29
+ import N from "../utils/tag/adaptConfig.js";
30
+ import { isPanoramaLike as A, isModelLike as $ } from "../../shared-utils/five/mode.js";
31
31
  import "hammerjs";
32
32
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
33
33
  import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
34
34
  import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
35
- import { entries as U } from "../../shared-utils/typescript/entries.js";
36
- import { getUrlExt as G } from "../../shared-utils/url/getUrl.js";
37
- import { transformPosition as O } from "../../shared-utils/five/transformPosition.js";
35
+ import { entries as z } from "../../shared-utils/typescript/entries.js";
36
+ import { getUrlExt as H } from "../../shared-utils/url/getUrl.js";
37
+ import { transformPosition as J } from "../../shared-utils/five/transformPosition.js";
38
+ import { WorkUtil as me } from "../../shared-utils/Utils/WorkUtil.js";
38
39
  import "../../shared-utils/three/centerPoint.js";
39
40
  import "../../base/BasePlugin.js";
40
41
  import "../../shared-utils/Subscribe.js";
@@ -60,37 +61,32 @@ import "../../shared-utils/three/getPositionsByObjectFit.js";
60
61
  import "../../shared-utils/three/FragmentTransparencyMaterial.js";
61
62
  import "../../shared-utils/three/getNormal.js";
62
63
  import "../../shared-utils/five/calculateThreeMouse.js";
63
- class ci extends ne {
64
+ import "../../shared-utils/Utils/BaseUtil.js";
65
+ class di extends re {
64
66
  constructor(e) {
65
67
  super(e);
66
- d(this, "tags", []);
67
- d(this, "config", oe);
68
- d(this, "mediaStore", se({
68
+ p(this, "tags", []);
69
+ p(this, "config", te);
70
+ p(this, "workUtil", new me(this.five));
71
+ p(this, "mediaStore", ne({
69
72
  currentMediaElement: null
70
73
  }));
71
74
  /** css3DRenderPlugin */
72
- d(this, "css3DRenderPlugin");
73
- d(this, "store", {
75
+ p(this, "css3DRenderPlugin");
76
+ p(this, "store", {
74
77
  disposers: [],
75
78
  disposed: !1,
76
79
  resizeObserverDisposerAdding: !1,
77
80
  css3DRenderDisposer: /* @__PURE__ */ new Map()
78
81
  });
79
- d(this, "domEvents", new pe(this.five));
80
- d(this, "_workCode");
81
- d(this, "getObserverPosition", (e) => {
82
- var o, t, r;
83
- const i = (o = this.work) == null ? void 0 : o.observers[e];
84
- if (i)
85
- return O(i.position, (r = (t = this.work) == null ? void 0 : t.options) == null ? void 0 : r.transform);
86
- });
87
- d(this, "loadVideoFirstFrame", () => {
88
- fe && this.hooks.emit("loadVideoFirstFrame");
82
+ p(this, "domEvents", new ue(this.five));
83
+ p(this, "loadVideoFirstFrame", () => {
84
+ se && this.hooks.emit("loadVideoFirstFrame");
89
85
  });
90
86
  this.mediaStore.subscribe(({ currentMediaElement: i }) => {
91
87
  this.tags.forEach((o) => {
92
88
  var t;
93
- if (o.mediaPlane instanceof ue && i !== o.mediaPlane.videoInstance) {
89
+ if (o.mediaPlane instanceof de && i !== o.mediaPlane.videoInstance) {
94
90
  if (!((t = o.mediaPlane.videoInstance) != null && t.src) || i === o.mediaPlane.videoInstance)
95
91
  return;
96
92
  o.mediaPlane.pause();
@@ -99,15 +95,10 @@ class ci extends ne {
99
95
  });
100
96
  }
101
97
  set workCode(e) {
102
- this._workCode = e;
98
+ this.workUtil.workCode = e;
103
99
  }
104
100
  get workCode() {
105
- var e;
106
- return (e = this._workCode) != null ? e : this.five.state.workCode;
107
- }
108
- get work() {
109
- var e, i;
110
- return (i = (e = this.five.works) == null ? void 0 : e.find((o) => o.workCode === this.workCode)) != null ? i : this.five.work;
101
+ return this.workUtil.workCode;
111
102
  }
112
103
  getTagById(e) {
113
104
  const i = this.tags.find((o) => o.id === e);
@@ -126,7 +117,7 @@ class ci extends ne {
126
117
  */
127
118
  getTagConfig(e, i) {
128
119
  var n, f, c;
129
- const o = this.calculateTagConfig(e, i), t = (n = i == null ? void 0 : i.fiveMode) != null ? n : this.five.getCurrentState().mode, r = (f = o.configWithFiveMode) == null ? void 0 : f[t];
120
+ const o = this.calculateTagConfig(e, { useCache: i == null ? void 0 : i.useCache }), t = (n = i == null ? void 0 : i.fiveMode) != null ? n : this.five.getCurrentState().mode, r = (f = o.configWithFiveMode) == null ? void 0 : f[t];
130
121
  return (c = r != null ? r : o) != null ? c : {};
131
122
  }
132
123
  /**
@@ -137,11 +128,13 @@ class ci extends ne {
137
128
  }
138
129
  updateTagConfig() {
139
130
  this.clearCache(), this.tags.forEach((e) => {
140
- var o;
131
+ var t;
141
132
  const i = this.getTagConfig(e, { useCache: !1 });
142
- if (e.config = i, e.config.initialData) {
143
- const t = JSON.parse(JSON.stringify(e.data));
144
- e.data = (o = i.initialData) != null && o.important ? y(e.data, t, i.initialData) : y(e.data, i.initialData, t);
133
+ e.computedConfig = i;
134
+ const o = this.getTagConfig(e);
135
+ if (e.config = o, e.config.initialData) {
136
+ const r = JSON.parse(JSON.stringify(e.data));
137
+ e.data = (t = o.initialData) != null && t.important ? y(e.data, r, o.initialData) : y(e.data, o.initialData, r);
145
138
  }
146
139
  });
147
140
  }
@@ -172,15 +165,15 @@ class ci extends ne {
172
165
  return;
173
166
  const t = e.data.mediaData;
174
167
  if (!(!t || t.length === 0) && o.renderType === "Mesh") {
175
- if (ce(e)) {
168
+ if (le(e)) {
176
169
  if (t.length === 1) {
177
170
  if (t[0].type === "Video")
178
171
  return "Mesh";
179
172
  if (t[0].type === "Image")
180
- return G(t[0].url) === "gif" ? "Dom" : "Mesh";
173
+ return H(t[0].url) === "gif" ? "Dom" : "Mesh";
181
174
  }
182
- } else if (z(e))
183
- return t.length === 1 && t[0].type === "Image" ? G(t[0].url) === "gif" ? "Dom" : "Mesh" : "BehindDom";
175
+ } else if (B(e))
176
+ return t.length === 1 && t[0].type === "Image" ? H(t[0].url) === "gif" ? "Dom" : "Mesh" : "BehindDom";
184
177
  }
185
178
  })();
186
179
  return i != null ? i : "Dom";
@@ -196,16 +189,16 @@ class ci extends ne {
196
189
  if (t.angle !== void 0)
197
190
  return t.angle;
198
191
  {
199
- const r = this.getObserverPosition(o);
192
+ const r = this.workUtil.getObserverPosition(o);
200
193
  if (r === void 0)
201
194
  throw new Error(`getAngle(): observerPosition is ${r}`);
202
195
  const n = (() => e.stickType === "3DPoint" ? C(e.normal) : E(e.position))();
203
196
  if (!n)
204
197
  return;
205
- const f = $(e);
198
+ const f = _(e);
206
199
  if (!f)
207
200
  return;
208
- const c = new te.Vector3().copy(r).sub(f), g = n.angleTo(c) * 180 / Math.PI;
201
+ const c = new ie.Vector3().copy(r).sub(f), g = n.angleTo(c) * 180 / Math.PI;
209
202
  return t.angle = g, t.angle;
210
203
  }
211
204
  }
@@ -213,29 +206,29 @@ class ci extends ne {
213
206
  * @description: 获取距离
214
207
  */
215
208
  getDistance(e, i) {
216
- const o = M(M({}, this.five.getCurrentState()), i), { panoIndex: t, mode: r } = o, n = A(r) ? this.getPanoIndexCache({ panoIndex: t, id: e.id }) : void 0;
209
+ const o = k(k({}, this.five.getCurrentState()), i), { panoIndex: t, mode: r } = o, n = A(r) ? this.getPanoIndexCache({ panoIndex: t, id: e.id }) : void 0;
217
210
  if ((n == null ? void 0 : n.distance) !== void 0)
218
211
  return n.distance;
219
- const f = $(e);
212
+ const f = _(e);
220
213
  if (!f)
221
214
  return -1;
222
215
  if (A(r)) {
223
- const c = this.getObserverPosition(t);
216
+ const c = this.workUtil.getObserverPosition(t);
224
217
  if (c === void 0)
225
218
  return -1;
226
219
  const g = c.distanceTo(f);
227
220
  return n && (n.distance = g), g;
228
221
  }
229
- if (J(r))
222
+ if ($(r))
230
223
  return this.five.camera.position.distanceTo(f);
231
224
  }
232
225
  getPositions(e) {
233
- if (le(e))
226
+ if (ce(e))
234
227
  return e.position;
235
- if (z(e))
228
+ if (B(e))
236
229
  return e.data.mediaPosition;
237
- if (de(e))
238
- return re(this.five.camera.position, C(e.position), C(e.normal));
230
+ if (ae(e))
231
+ return oe(this.five.camera.position, C(e.position), C(e.normal));
239
232
  }
240
233
  addObjectClickHandler(e, i, o) {
241
234
  if (!i || !this.domEvents)
@@ -283,11 +276,10 @@ class ci extends ne {
283
276
  });
284
277
  }
285
278
  getTransformedPostion(e) {
286
- var o, t;
287
279
  if (!e)
288
280
  return;
289
- const i = (t = (o = this.work) == null ? void 0 : o.options) == null ? void 0 : t.transform;
290
- return Array.isArray(e) && e.length === 4 ? e.map(C).map((r) => O(r, i)) : O(C(e), i);
281
+ const i = this.workUtil.transform;
282
+ return Array.isArray(e) && e.length === 4 ? e.map(C).map((o) => J(o, i)) : J(C(e), i);
291
283
  }
292
284
  /**
293
285
  * @description 检查是否已经销毁
@@ -300,50 +292,50 @@ class ci extends ne {
300
292
  * @description: 获取merge后的配置
301
293
  */
302
294
  calculateTagConfig(e, i) {
303
- var j, S, I, W, F, V;
304
- const o = (j = i == null ? void 0 : i.useCache) != null ? j : !0;
295
+ var O, j, S, I, W;
296
+ const o = (O = i == null ? void 0 : i.useCache) != null ? O : !0;
305
297
  if (!e)
306
- return (S = this.config.globalConfig) != null ? S : {};
298
+ return (j = this.config.globalConfig) != null ? j : {};
307
299
  if (o) {
308
- if ((I = e == null ? void 0 : e.computedConfig) != null && I._isMerged)
300
+ if ((S = e == null ? void 0 : e.computedConfig) != null && S._isMerged)
309
301
  return e.computedConfig;
310
- if ((W = e == null ? void 0 : e.config) != null && W._isMerged)
302
+ if ((I = e == null ? void 0 : e.config) != null && I._isMerged)
311
303
  return e.config;
312
304
  }
313
305
  const t = {}, r = {}, n = {};
314
- this.config.contentTypeConfig && Object.entries(this.config.contentTypeConfig).forEach(([u, p]) => {
315
- var _, x;
316
- const l = u, D = l.split("-"), L = u.startsWith("["), T = L ? D[0].slice(1, -1) : void 0, h = L ? D.slice(1) : D, v = T ? ["PanoramaLike", "ModelLike"].includes(T) ? (_ = r[T]) != null ? _ : r[T] = {} : (x = n[T]) != null ? x : n[T] = {} : t;
317
- if (!v[l]) {
318
- if (h.length === 0 && (v[l] = p), h.length === 1) {
306
+ this.config.contentTypeConfig && Object.entries(this.config.contentTypeConfig).forEach(([d, u]) => {
307
+ var V, L;
308
+ const a = d, D = a.split("-"), F = d.startsWith("["), T = F ? D[0].slice(1, -1) : void 0, h = F ? D.slice(1) : D, v = T ? ["PanoramaLike", "ModelLike"].includes(T) ? (V = r[T]) != null ? V : r[T] = {} : (L = n[T]) != null ? L : n[T] = {} : t;
309
+ if (!v[a]) {
310
+ if (h.length === 0 && (v[a] = u), h.length === 1) {
319
311
  const [m] = h;
320
- (e.contentType === m || m === "Any") && (v[l] = p);
312
+ (e.contentType === m || m === "Any") && (v[a] = u);
321
313
  }
322
314
  if (h.length === 2) {
323
315
  const [m = "Any", P = "Any"] = h;
324
- m === "Mixin" && e.contentType === P && (v[l] = p), (e.stickType === m || m === "Any") && (e.contentType === P || P === "Any") && (v[l] = p);
316
+ m === "Mixin" && e.contentType === P && (v[a] = u), (e.stickType === m || m === "Any") && (e.contentType === P || P === "Any") && (v[a] = u);
325
317
  }
326
318
  if (h.length === 3) {
327
- const [m = "Any", P, q] = h;
319
+ const [m = "Any", P, X] = h;
328
320
  if (P === "Audio" && e.contentType === "Audio") {
329
- const R = e;
330
- (R.stickType === m || m === "Any") && R.data.appearance === q && (v[l] = p);
321
+ const U = e;
322
+ (U.stickType === m || m === "Any") && U.data.appearance === X && (v[a] = u);
331
323
  }
332
324
  }
333
325
  }
334
326
  });
335
- const f = (V = (F = e.initialConfig) != null ? F : e.config) != null ? V : {}, c = y({}, ie, this.config.globalConfig, ...Object.values(t)), g = y({}, c, f), k = {}, X = Object.values(ae.Mode);
336
- U(r).forEach(([u, p]) => {
337
- X.forEach((l) => {
338
- (u === "PanoramaLike" && A(l) || u === "ModelLike" && J(l)) && (k[l] = y({}, c, ...Object.values(p), f, { _isMerged: !0 }));
327
+ const f = (W = e.initialConfig) != null ? W : {}, c = y({}, ee, this.config.globalConfig, ...Object.values(t)), g = y({}, c, f), M = {}, G = Object.values(fe.Mode);
328
+ z(r).forEach(([d, u]) => {
329
+ G.forEach((a) => {
330
+ (d === "PanoramaLike" && A(a) || d === "ModelLike" && $(a)) && (M[a] = y({}, c, ...Object.values(u), f, { _isMerged: !0 }));
339
331
  });
340
- }), U(n).forEach(([u, p]) => {
341
- k[u] = y({}, c, ...Object.values(p), f, { _isMerged: !0 });
332
+ }), z(n).forEach(([d, u]) => {
333
+ M[d] = y({}, c, ...Object.values(u), f, { _isMerged: !0 });
342
334
  });
343
- const b = N(M({}, g), { configWithFiveMode: k });
344
- return H(b), Object.values(k).forEach((u) => H(u)), b._isMerged = !0, b;
335
+ const b = R(k({}, g), { configWithFiveMode: M });
336
+ return N(b), Object.values(M).forEach((d) => N(d)), b._isMerged = !0, b;
345
337
  }
346
338
  }
347
339
  export {
348
- ci as TagUtil
340
+ di as TagUtil
349
341
  };
@@ -15,6 +15,7 @@ declare class PanoTagPluginController extends TagRender {
15
15
  private params;
16
16
  /** debug */
17
17
  private debug;
18
+ private debugUtil;
18
19
  constructor(five: Five, params?: {
19
20
  config?: Pick<Tags, 'contentTypeConfig' | 'globalConfig'>;
20
21
  debug?: boolean;
@@ -1,15 +1,15 @@
1
- var U = Object.defineProperty, I = Object.defineProperties;
1
+ var E = Object.defineProperty, I = Object.defineProperties;
2
2
  var R = Object.getOwnPropertyDescriptors;
3
3
  var A = Object.getOwnPropertySymbols;
4
4
  var B = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
5
- var u = (d, a, e) => a in d ? U(d, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[a] = e, g = (d, a) => {
5
+ var u = (d, a, e) => a in d ? E(d, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[a] = e, g = (d, a) => {
6
6
  for (var e in a || (a = {}))
7
7
  B.call(a, e) && u(d, e, a[e]);
8
8
  if (A)
9
9
  for (var e of A(a))
10
10
  F.call(a, e) && u(d, e, a[e]);
11
11
  return d;
12
- }, v = (d, a) => I(d, R(a));
12
+ }, b = (d, a) => I(d, R(a));
13
13
  var l = (d, a, e) => (u(d, typeof a != "symbol" ? a + "" : a, e), e);
14
14
  var c = (d, a, e) => new Promise((t, i) => {
15
15
  var s = (r) => {
@@ -27,14 +27,14 @@ var c = (d, a, e) => new Promise((t, i) => {
27
27
  }, n = (r) => r.done ? t(r.value) : Promise.resolve(r.value).then(s, o);
28
28
  n((e = e.apply(d, a)).next());
29
29
  });
30
- import * as b from "three";
30
+ import * as v from "three";
31
31
  import { Subscribe as M } from "@realsee/five";
32
32
  import { objectAssignDeepExports as f } from "../../vendor/object-assign-deep/objectAssignDeep.js";
33
33
  import { addDebugPoints as O } from "../utils/addDebugPoints.js";
34
- import { arrayPositionToVector3 as P } from "../../shared-utils/positionToVector3.js";
35
- import { isMediaModelTag as _, isModelTag as k } from "../utils/tag/tagCheck.js";
36
- import { debounce as V } from "../utils/debounce.js";
37
- import { throttle as D } from "../utils/throttle.js";
34
+ import { arrayPositionToVector3 as D } from "../../shared-utils/positionToVector3.js";
35
+ import { isMediaModelTag as V, isModelTag as _ } from "../utils/tag/tagCheck.js";
36
+ import { debounce as k } from "../utils/debounce.js";
37
+ import { throttle as P } from "../utils/throttle.js";
38
38
  import L from "../utils/tag/format.js";
39
39
  import { generateBlankAudio as N, AudioNamespace as G } from "../../shared-utils/audio.js";
40
40
  import { resizeObserver as S } from "../../shared-utils/dom/resizeObserver.js";
@@ -47,6 +47,7 @@ import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
47
47
  import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
48
48
  import { tweenProgress as W } from "../../shared-utils/animationFrame/BetterTween.js";
49
49
  import { waitFiveModelLoaded as J } from "../../shared-utils/five/fiveModelLoad.js";
50
+ import { DebugUtil as j } from "../utils/DebugUtil.js";
50
51
  import "./TagComputer.js";
51
52
  import "../utils/tagPosition.js";
52
53
  import "../../shared-utils/three/centerPoint.js";
@@ -90,6 +91,8 @@ import "../utils/tag/adaptConfig.js";
90
91
  import "../../shared-utils/typescript/entries.js";
91
92
  import "../../shared-utils/url/getUrl.js";
92
93
  import "../../shared-utils/five/transformPosition.js";
94
+ import "../../shared-utils/Utils/WorkUtil.js";
95
+ import "../../shared-utils/Utils/BaseUtil.js";
93
96
  import "../../shared-utils/five/getFloorIndex.js";
94
97
  import "../../shared-utils/safeObj.js";
95
98
  import "../Components/TagContainer.js";
@@ -169,8 +172,8 @@ import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
169
172
  import "../../shared-utils/three/GLTFLoader.js";
170
173
  import "@realsee/five/gltf-loader";
171
174
  import "../../shared-utils/animationFrame/index.js";
172
- const w = "Dnalogel-PanoTagPlugin", Ui = (d) => `${w}--${d}`;
173
- class Ii extends z {
175
+ const w = "Dnalogel-PanoTagPlugin", Fi = (d) => `${w}--${d}`;
176
+ class Mi extends z {
174
177
  constructor(e, t) {
175
178
  super(e);
176
179
  /** state */
@@ -179,6 +182,7 @@ class Ii extends z {
179
182
  l(this, "params");
180
183
  /** debug */
181
184
  l(this, "debug");
185
+ l(this, "debugUtil", new j(this));
182
186
  /** 更改 tag 模型 */
183
187
  l(this, "changeTagModel", (e, t) => c(this, null, function* () {
184
188
  e.data = f({}, e.data, t), yield this.loadModel(e), this.updateRenderAllTags();
@@ -205,7 +209,7 @@ class Ii extends z {
205
209
  l(this, "updateVisible", () => {
206
210
  const e = this.five.getCurrentState().mode;
207
211
  this.tags.forEach((t) => {
208
- _(t) && e !== "Panorama" && this.changeTagMode(t, "behind");
212
+ V(t) && e !== "Panorama" && this.changeTagMode(t, "behind");
209
213
  }), this.setVisible(), this.updateRenderAllTags();
210
214
  });
211
215
  l(this, "handleFiveWantsMoveToPano", (e) => {
@@ -246,13 +250,13 @@ class Ii extends z {
246
250
  });
247
251
  l(this, "handleFivePanoArrived", () => c(this, null, function* () {
248
252
  this.setVisible(), this.updatePointTagPosition(), yield this.setVisibleAndUnfolded(), this.tags.forEach((e) => {
249
- e.temporaryState = v(g({}, e.temporaryState), { visible: !0 });
250
- }), this.tags.filter(k).filter((e) => {
253
+ e.temporaryState = b(g({}, e.temporaryState), { visible: !0 });
254
+ }), this.tags.filter(_).filter((e) => {
251
255
  var t;
252
256
  return (t = this.getTagConfig(e).modelConfig) == null ? void 0 : t.autoLookAtEnabled;
253
257
  }).forEach((e) => {
254
258
  var h;
255
- const t = new b.Mesh(new b.BoxGeometry(), new b.MeshBasicMaterial()), i = (h = e.model) == null ? void 0 : h.object;
259
+ const t = new v.Mesh(new v.BoxGeometry(), new v.MeshBasicMaterial()), i = (h = e.model) == null ? void 0 : h.object;
256
260
  if (!i)
257
261
  return;
258
262
  t.position.copy(i.position), t.quaternion.copy(i.quaternion);
@@ -305,8 +309,10 @@ class Ii extends z {
305
309
  return c(this, null, function* () {
306
310
  const s = (Array.isArray(e) ? e : [e]).filter((o) => o.position).map((o) => {
307
311
  var T, y, C;
308
- const n = JSON.parse(JSON.stringify(o.data)), r = o.config ? JSON.parse(JSON.stringify(o.config)) : void 0, h = this.calculateTagConfig(o), p = this.getTagConfig(o);
309
- return o.config = p, v(g({}, o), {
312
+ const n = JSON.parse(JSON.stringify(o.data)), r = o.config ? JSON.parse(JSON.stringify(o.config)) : {};
313
+ o.initialConfig = r;
314
+ const h = this.calculateTagConfig(o), p = this.getTagConfig(o);
315
+ return o.config = p, b(g({}, o), {
310
316
  enabled: (T = o.enabled) != null ? T : !0,
311
317
  id: (y = o.id) != null ? y : x(),
312
318
  data: (C = p.initialData) != null && C.important ? f(o.data, n, p.initialData) : f(o.data, p.initialData, n),
@@ -318,7 +324,7 @@ class Ii extends z {
318
324
  originPosition: o.position,
319
325
  position: (() => {
320
326
  const m = this.getTransformedPostion(o.position);
321
- return Array.isArray(m) ? m.map((E) => E.toArray()) : m.toArray();
327
+ return Array.isArray(m) ? m.map((U) => U.toArray()) : m.toArray();
322
328
  })(),
323
329
  initialConfig: r,
324
330
  computedConfig: h,
@@ -347,7 +353,7 @@ class Ii extends z {
347
353
  * @description: 改变全局配置
348
354
  */
349
355
  changeGlobalConfig(e, t = !0) {
350
- t ? this.config.globalConfig = f({}, this.config.globalConfig, e) : this.config.globalConfig = e, this.updateTagConfig(), this.updateRenderAllTags();
356
+ t ? this.config.globalConfig = f({}, this.config.globalConfig, e) : this.config.globalConfig = e, this.updateTagConfig(), this.setVisible(), this.updateRenderAllTags();
351
357
  }
352
358
  /**
353
359
  * @description: 改变类型配置
@@ -421,7 +427,7 @@ class Ii extends z {
421
427
  */
422
428
  changeTagNormalById(e, t) {
423
429
  const i = this.getTagById(e);
424
- i && i.tag3DContentSvelte && (i.tag3DContentSvelte.currentNormal = P(t));
430
+ i && i.tag3DContentSvelte && (i.tag3DContentSvelte.currentNormal = D(t));
425
431
  }
426
432
  /**
427
433
  * @description: 改变data
@@ -443,7 +449,7 @@ class Ii extends z {
443
449
  changeTagById(e, t, i = !0) {
444
450
  const s = this.getTagById(e);
445
451
  let o = !1;
446
- t && (t.data && (o = !0), i ? f(s, t) : Object.assign(s, t), s != null && s.tag3DContentSvelte && (t != null && t.normal) && (s.tag3DContentSvelte.currentNormal = P(t.normal)), this.setVisible(), this.updateRenderAllTags(), this.clearUnusedPanelTag(), o && s.hooks.emit("dataChanged", s.data));
452
+ t && (t.data && (o = !0), i ? f(s, t) : Object.assign(s, t), s != null && s.tag3DContentSvelte && (t != null && t.normal) && (s.tag3DContentSvelte.currentNormal = D(t.normal)), this.setVisible(), this.updateRenderAllTags(), this.clearUnusedPanelTag(), o && s.hooks.emit("dataChanged", s.data));
447
453
  }
448
454
  /**
449
455
  * @description: 销毁tag
@@ -491,7 +497,7 @@ class Ii extends z {
491
497
  addEventListener() {
492
498
  const { five: e, hooks: t } = this;
493
499
  let i = !1;
494
- const s = D(() => {
500
+ const s = P(() => {
495
501
  i || (i = !0, e.ready().then(() => {
496
502
  this.onFiveEveryReady(), i = !1;
497
503
  }));
@@ -516,12 +522,12 @@ class Ii extends z {
516
522
  }, i = () => {
517
523
  this.state.enabled && this.hide();
518
524
  }, { observe: s, unobserve: o } = S(
519
- D(() => {
525
+ P(() => {
520
526
  this.store.resizeObserverDisposer && i();
521
527
  }, 500),
522
528
  e
523
529
  ), { observe: n, unobserve: r } = S(
524
- V(() => t(), 400),
530
+ k(() => t(), 400),
525
531
  e
526
532
  );
527
533
  return s(), n(), () => {
@@ -544,7 +550,7 @@ class Ii extends z {
544
550
  }
545
551
  }
546
552
  export {
547
- Ii as PanoTagPluginController,
548
- Ii as default,
549
- Ui as pluginFlag
553
+ Mi as PanoTagPluginController,
554
+ Mi as default,
555
+ Fi as pluginFlag
550
556
  };
@@ -1,7 +1,7 @@
1
1
  import r from "./controller/index.js";
2
- import { pluginFlag as Nt } from "./controller/index.js";
3
- import { defaultGlobalConfig as Qt } from "./typings/tag/TagConfig.js";
4
- import { ContentType as St, DimensionType as Ut, PointType as Vt } from "./Archive/deprecated.js";
2
+ import { pluginFlag as Rt } from "./controller/index.js";
3
+ import { defaultGlobalConfig as Ut } from "./typings/tag/TagConfig.js";
4
+ import { ContentType as Wt, DimensionType as Xt, PointType as Yt } from "./Archive/deprecated.js";
5
5
  import "three";
6
6
  import "@realsee/five";
7
7
  import "../vendor/object-assign-deep/objectAssignDeep.js";
@@ -61,6 +61,8 @@ import "./utils/tag/adaptConfig.js";
61
61
  import "../shared-utils/typescript/entries.js";
62
62
  import "../shared-utils/url/getUrl.js";
63
63
  import "../shared-utils/five/transformPosition.js";
64
+ import "../shared-utils/Utils/WorkUtil.js";
65
+ import "../shared-utils/Utils/BaseUtil.js";
64
66
  import "../shared-utils/five/getFloorIndex.js";
65
67
  import "../shared-utils/safeObj.js";
66
68
  import "./Components/TagContainer.js";
@@ -143,14 +145,15 @@ import "@realsee/five/gltf-loader";
143
145
  import "../shared-utils/animationFrame/BetterTween.js";
144
146
  import "../shared-utils/animationFrame/index.js";
145
147
  import "../shared-utils/five/fiveModelLoad.js";
146
- const Kt = (o, t) => new r(o, t);
148
+ import "./utils/DebugUtil.js";
149
+ const Nt = (o, t) => new r(o, t);
147
150
  export {
148
- St as ContentType,
149
- Ut as DimensionType,
150
- Kt as PanoTagPlugin,
151
+ Wt as ContentType,
152
+ Xt as DimensionType,
153
+ Nt as PanoTagPlugin,
151
154
  r as PanoTagPluginController,
152
- Vt as PointType,
153
- Kt as default,
154
- Qt as defaultGlobalConfig,
155
- Nt as pluginFlag
155
+ Yt as PointType,
156
+ Nt as default,
157
+ Ut as defaultGlobalConfig,
158
+ Rt as pluginFlag
156
159
  };
@@ -0,0 +1,6 @@
1
+ import type PanoTagPluginController from '../controller';
2
+ export declare class DebugUtil {
3
+ plugin: PanoTagPluginController;
4
+ constructor(plugin: PanoTagPluginController);
5
+ private closeIntersectRaycaster;
6
+ }