@realsee/dnalogel 3.77.5 → 3.77.7

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 (145) hide show
  1. package/CHANGELOG.md +17 -11
  2. package/dist/PanoTagPlugin/controller/Tag/BaseTag.d.ts +5 -1
  3. package/dist/PanoTagPlugin/controller/Tag/BoxTag.d.ts +119 -0
  4. package/dist/PanoTagPlugin/controller/Tag/MaskTag.d.ts +257 -0
  5. package/dist/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +10 -0
  6. package/dist/PanoTagPlugin/controller/Tag/PolygonTag.d.ts +112 -0
  7. package/dist/PanoTagPlugin/controller/TagRender.d.ts +1 -1
  8. package/dist/PanoTagPlugin/controller/index.d.ts +55 -2
  9. package/dist/PanoTagPlugin/typings/controller.d.ts +10 -0
  10. package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +8 -3
  11. package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +50 -1
  12. package/dist/PanoTagPlugin/utils/sculptDataToBoxPosition.d.ts +6 -0
  13. package/dist/PanoTagPlugin/utils/tag/tagCheck.d.ts +6 -0
  14. package/dist/PanoTagPlugin/utils/tagPosition.d.ts +12 -3
  15. package/dist/Sculpt/Meshes/Line.d.ts +4 -0
  16. package/dist/index.cjs.js +178 -95
  17. package/dist/index.js +11378 -9801
  18. package/dist/index.umd.js +173 -90
  19. package/dist/shared-utils/five/getFiveFromParentChain.d.ts +7 -0
  20. package/libs/AreaMakerPlugin/Controller.js +3 -2
  21. package/libs/AreaMakerPlugin/index.js +3 -2
  22. package/libs/AreaMakerPlugin/utils/Item.js +3 -2
  23. package/libs/CSS3DRenderPlugin/Controller.js +3 -2
  24. package/libs/CSS3DRenderPlugin/index.js +6 -5
  25. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +39 -38
  26. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +10 -9
  27. package/libs/CruisePlugin/BaseController.js +5 -4
  28. package/libs/CruisePlugin/Move.js +8 -2
  29. package/libs/CruisePlugin/Work.js +8 -2
  30. package/libs/CruisePlugin/index.js +12 -6
  31. package/libs/CurrentPanoImagePlugin/Controller.js +15 -14
  32. package/libs/CurrentPanoImagePlugin/index.js +4 -3
  33. package/libs/GuideLinePlugin/Controller.js +10 -4
  34. package/libs/GuideLinePlugin/GuideLineItem.js +8 -2
  35. package/libs/GuideLinePlugin/GuideLineModeItem.js +8 -2
  36. package/libs/GuideLinePlugin/index.js +12 -6
  37. package/libs/MeasurePlugin/Controller.js +11 -10
  38. package/libs/MeasurePlugin/index.js +5 -4
  39. package/libs/MeasurePlugin/utils/MeasureMesh.js +3 -2
  40. package/libs/ModelChassisCompassPlugin/Plugin.js +4 -3
  41. package/libs/ModelChassisCompassPlugin/index.js +1 -0
  42. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +6 -5
  43. package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
  44. package/libs/ModelMakerPlugin/Controller.js +3 -2
  45. package/libs/ModelMakerPlugin/index.js +3 -2
  46. package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
  47. package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
  48. package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
  49. package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
  50. package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
  51. package/libs/ModelTVVideoPlugin/index.js +3 -2
  52. package/libs/ModelViewPlugin/Plugin.js +20 -19
  53. package/libs/ModelViewPlugin/index.js +1 -0
  54. package/libs/Object3DHelperPlugin/Controller.js +3 -2
  55. package/libs/Object3DHelperPlugin/index.js +6 -5
  56. package/libs/PanoCompassPlugin/Controller.js +3 -2
  57. package/libs/PanoCompassPlugin/index.js +4 -3
  58. package/libs/PanoDoorLabelPlugin/Controller.js +24 -23
  59. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  60. package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
  61. package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
  62. package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
  63. package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
  64. package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
  65. package/libs/PanoMeasurePlugin/Model/area.js +3 -2
  66. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
  67. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +16 -15
  68. package/libs/PanoMeasurePlugin/index.js +14 -13
  69. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
  70. package/libs/PanoRulerProPlugin/Controller.js +3 -2
  71. package/libs/PanoRulerProPlugin/RulerItems.js +42 -41
  72. package/libs/PanoRulerProPlugin/index.js +4 -3
  73. package/libs/PanoSpatialTagPlugin/Plugin.js +34 -33
  74. package/libs/PanoSpatialTagPlugin/index.js +1 -0
  75. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +3 -2
  76. package/libs/PanoTagPlugin/Components/Common/TagPopover/PopoverContent.js +3 -2
  77. package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopoverToolBar.js +3 -2
  78. package/libs/PanoTagPlugin/Components/Common/TagPopover/index.js +3 -2
  79. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
  80. package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
  81. package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
  82. package/libs/PanoTagPlugin/Components/TagItem.js +125 -124
  83. package/libs/PanoTagPlugin/controller/Tag/BaseTag.d.ts +5 -1
  84. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +321 -289
  85. package/libs/PanoTagPlugin/controller/Tag/BoxTag.d.ts +119 -0
  86. package/libs/PanoTagPlugin/controller/Tag/BoxTag.js +516 -0
  87. package/libs/PanoTagPlugin/controller/Tag/MaskTag.d.ts +257 -0
  88. package/libs/PanoTagPlugin/controller/Tag/MaskTag.js +816 -0
  89. package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +10 -0
  90. package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.js +94 -0
  91. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
  92. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
  93. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
  94. package/libs/PanoTagPlugin/controller/Tag/PolygonTag.d.ts +112 -0
  95. package/libs/PanoTagPlugin/controller/Tag/PolygonTag.js +479 -0
  96. package/libs/PanoTagPlugin/controller/TagRender.d.ts +1 -1
  97. package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
  98. package/libs/PanoTagPlugin/controller/TagUtil.js +22 -19
  99. package/libs/PanoTagPlugin/controller/index.d.ts +55 -2
  100. package/libs/PanoTagPlugin/controller/index.js +243 -129
  101. package/libs/PanoTagPlugin/index.js +17 -11
  102. package/libs/PanoTagPlugin/typings/controller.d.ts +10 -0
  103. package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +8 -3
  104. package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +50 -1
  105. package/libs/PanoTagPlugin/utils/addDebugPoints.js +27 -13
  106. package/libs/PanoTagPlugin/utils/index.js +29 -26
  107. package/libs/PanoTagPlugin/utils/sculptDataToBoxPosition.d.ts +6 -0
  108. package/libs/PanoTagPlugin/utils/sculptDataToBoxPosition.js +18 -0
  109. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
  110. package/libs/PanoTagPlugin/utils/tag/format.js +3 -2
  111. package/libs/PanoTagPlugin/utils/tag/tagCheck.d.ts +6 -0
  112. package/libs/PanoTagPlugin/utils/tag/tagCheck.js +26 -14
  113. package/libs/PanoTagPlugin/utils/tagPosition.d.ts +12 -3
  114. package/libs/PanoTagPlugin/utils/tagPosition.js +49 -16
  115. package/libs/PanoVideoPlugin/Controller.js +9 -8
  116. package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
  117. package/libs/PanoVideoPlugin/index.js +6 -5
  118. package/libs/PipelinePlugin/Controller.js +3 -2
  119. package/libs/PipelinePlugin/index.js +4 -3
  120. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
  121. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
  122. package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
  123. package/libs/Sculpt/Meshes/Line.d.ts +4 -0
  124. package/libs/Sculpt/Meshes/Line.js +85 -76
  125. package/libs/Sculpt/Meshes/Point.js +28 -28
  126. package/libs/Sculpt/Meshes/Polygon.js +43 -43
  127. package/libs/Sculpt/index.js +1 -1
  128. package/libs/Sculpt/utils/Modules/Cursor.js +7 -7
  129. package/libs/base/BasePlugin.js +1 -1
  130. package/libs/floorplan/FloorplanGuidePlugin/Controller.js +3 -2
  131. package/libs/floorplan/FloorplanGuidePlugin/index.js +4 -3
  132. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
  133. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
  134. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -2
  135. package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -3
  136. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -2
  137. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
  138. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -2
  139. package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
  140. package/libs/index.js +164 -158
  141. package/libs/shared-utils/five/getFiveFromParentChain.d.ts +7 -0
  142. package/libs/shared-utils/five/getFiveFromParentChain.js +15 -0
  143. package/libs/shared-utils/logger.js +1 -1
  144. package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +1 -0
  145. package/package.json +1 -1
@@ -1,68 +1,71 @@
1
- var E = Object.defineProperty, U = Object.defineProperties;
1
+ var w = Object.defineProperty, F = Object.defineProperties;
2
2
  var _ = Object.getOwnPropertyDescriptors;
3
- var b = Object.getOwnPropertySymbols;
4
- var F = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
5
- var g = (h, p, e) => p in h ? E(h, p, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[p] = e, f = (h, p) => {
3
+ var S = Object.getOwnPropertySymbols;
4
+ var L = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
5
+ var b = (l, p, e) => p in l ? w(l, p, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[p] = e, g = (l, p) => {
6
6
  for (var e in p || (p = {}))
7
- F.call(p, e) && g(h, e, p[e]);
8
- if (b)
9
- for (var e of b(p))
10
- w.call(p, e) && g(h, e, p[e]);
11
- return h;
12
- }, c = (h, p) => U(h, _(p));
13
- var m = (h, p, e) => (g(h, typeof p != "symbol" ? p + "" : p, e), e);
14
- var d = (h, p, e) => new Promise((t, i) => {
15
- var o = (r) => {
7
+ L.call(p, e) && b(l, e, p[e]);
8
+ if (S)
9
+ for (var e of S(p))
10
+ B.call(p, e) && b(l, e, p[e]);
11
+ return l;
12
+ }, C = (l, p) => F(l, _(p));
13
+ var m = (l, p, e) => (b(l, typeof p != "symbol" ? p + "" : p, e), e);
14
+ var d = (l, p, e) => new Promise((t, i) => {
15
+ var o = (s) => {
16
16
  try {
17
- s(e.next(r));
18
- } catch (a) {
19
- i(a);
17
+ a(e.next(s));
18
+ } catch (r) {
19
+ i(r);
20
20
  }
21
- }, n = (r) => {
21
+ }, n = (s) => {
22
22
  try {
23
- s(e.throw(r));
24
- } catch (a) {
25
- i(a);
23
+ a(e.throw(s));
24
+ } catch (r) {
25
+ i(r);
26
26
  }
27
- }, s = (r) => r.done ? t(r.value) : Promise.resolve(r.value).then(o, n);
28
- s((e = e.apply(h, p)).next());
27
+ }, a = (s) => s.done ? t(s.value) : Promise.resolve(s.value).then(o, n);
28
+ a((e = e.apply(l, p)).next());
29
29
  });
30
- import * as u from "three";
31
- import { objectAssignDeepExports as l } from "../../vendor/object-assign-deep/objectAssignDeep.js";
32
- import { arrayPositionToVector3 as v } from "../../shared-utils/positionToVector3.js";
33
- import { isModelTag as k, isMediaModelTag as L } from "../utils/tag/tagCheck.js";
34
- import { debounce as y } from "../utils/debounce.js";
35
- import { throttle as I } from "../utils/throttle.js";
36
- import M, { getTagStickType as B } from "../utils/tag/format.js";
37
- import { generateBlankAudio as G, AudioNamespace as O } from "../../shared-utils/audio.js";
38
- import { resizeObserver as T } from "../../shared-utils/dom/resizeObserver.js";
39
- import { TagRender as R } from "./TagRender.js";
30
+ import * as P from "three";
31
+ import { objectAssignDeepExports as v } from "../../vendor/object-assign-deep/objectAssignDeep.js";
32
+ import { arrayPositionToVector3 as k } from "../../shared-utils/positionToVector3.js";
33
+ import { isModelTag as R, isMediaModelTag as G } from "../utils/tag/tagCheck.js";
34
+ import { debounce as D } from "../utils/debounce.js";
35
+ import { throttle as O } from "../utils/throttle.js";
36
+ import x, { getTagStickType as N } from "../utils/tag/format.js";
37
+ import { generateBlankAudio as V, AudioNamespace as z } from "../../shared-utils/audio.js";
38
+ import { resizeObserver as M } from "../../shared-utils/dom/resizeObserver.js";
39
+ import { TagRender as $ } from "./TagRender.js";
40
40
  import "../../shared-utils/tag.js";
41
- import { isModelLike as C } from "../../shared-utils/five/mode.js";
41
+ import { isModelLike as A } from "../../shared-utils/five/mode.js";
42
42
  import "../../vendor/hammerjs/hammer.js";
43
43
  import "../../shared-utils/three/PointSelector/index.js";
44
44
  import "../../shared-utils/three/CSS3DRenderer/index.js";
45
- import { waitFiveModelLoaded as N } from "../../shared-utils/five/fiveModelLoad.js";
45
+ import { waitFiveModelLoaded as j } from "../../shared-utils/five/fiveModelLoad.js";
46
46
  import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
47
47
  import "@realsee/five/line";
48
48
  import "../../shared-utils/three/core/Five_LineMaterial2.js";
49
49
  import "../../shared-utils/three/core/Sphere.js";
50
50
  import "../../shared-utils/three/blink.js";
51
- import { getFiveModel as V } from "../../shared-utils/five/getFiveModel.js";
51
+ import { getFiveModel as Q } from "../../shared-utils/five/getFiveModel.js";
52
52
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
53
53
  import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
54
54
  import "../../vendor/earcut/src/earcut.js";
55
- import { nextFrame as z } from "../../shared-utils/animationFrame/index.js";
55
+ import { nextFrame as H } from "../../shared-utils/animationFrame/index.js";
56
56
  import "../../shared-utils/five/FivePuppet.js";
57
- import { DebugUtil as j } from "../utils/DebugUtil.js";
58
- import { safeObj as S } from "../../shared-utils/safeObj.js";
59
- import { PointTag as Q } from "./Tag/PointTag.js";
60
- import { ModelTag as $ } from "./Tag/ModelTag.js";
61
- import { PlaneTag as H } from "./Tag/PlaneTag.js";
62
- import x from "../Components/TagContainer.js";
63
- import { fiveEveryReadyListener as W } from "../../shared-utils/five/fiveEveryReadyListener.js";
64
- import { vector3ToArray as P } from "../../shared-utils/three/vector3ToArray.js";
65
- import { tweenProgress as q } from "../../shared-utils/animationFrame/BetterTween.js";
57
+ import { DebugUtil as W } from "../utils/DebugUtil.js";
58
+ import { safeObj as E } from "../../shared-utils/safeObj.js";
59
+ import { PointTag as q } from "./Tag/PointTag.js";
60
+ import { ModelTag as J } from "./Tag/ModelTag.js";
61
+ import { PlaneTag as Z } from "./Tag/PlaneTag.js";
62
+ import { BoxTag as Y } from "./Tag/BoxTag.js";
63
+ import { PolygonTag as K } from "./Tag/PolygonTag.js";
64
+ import { MaskTag as c } from "./Tag/MaskTag.js";
65
+ import X from "../Components/TagContainer.js";
66
+ import { fiveEveryReadyListener as ee } from "../../shared-utils/five/fiveEveryReadyListener.js";
67
+ import { vector3ToArray as U } from "../../shared-utils/three/vector3ToArray.js";
68
+ import { tweenProgress as te } from "../../shared-utils/animationFrame/BetterTween.js";
66
69
  import "../../shared-utils/url/defaultUrls.js";
67
70
  import "./TagUtil.js";
68
71
  import "../typings/tag/TagConfig.js";
@@ -118,6 +121,7 @@ import "../../shared-utils/three/IObject3D.js";
118
121
  import "../../Sculpt/utils/Meshes/getLengthHTML.js";
119
122
  import "../../shared-utils/three/applyObjectMatrixWorld.js";
120
123
  import "../../shared-utils/util.js";
124
+ import "../../shared-utils/five/getFiveFromParentChain.js";
121
125
  import "../../shared-utils/three/core/LineGeometry.js";
122
126
  import "../../shared-utils/three/core/LineMaterial.js";
123
127
  import "../../shared-utils/three/core/Line2.js";
@@ -313,6 +317,8 @@ import "../../Sculpt/Meshes/Box.js";
313
317
  import "../../shared-utils/forReverseEach.js";
314
318
  import "../../Sculpt/Objects/Line/index.js";
315
319
  import "../../shared-utils/five/getFloorMesh.js";
320
+ import "../utils/sculptDataToBoxPosition.js";
321
+ import "./Tag/MaskTag.shaders.js";
316
322
  import "../Components/TagItem.js";
317
323
  import "../Components/Common/TagPoint.js";
318
324
  import "../Components/Tag/AudioTag/AudioPoint.js";
@@ -329,21 +335,21 @@ import "../Components/Common/TagPopover/TagPopoverToolBar.js";
329
335
  import "../Components/Common/TagPopover/ArrowRightIcon.js";
330
336
  import "../Components/Common/TagPopover/ShareIcon.js";
331
337
  import "../utils/popoverContainer.js";
332
- const D = "Dnalogel-PanoTagPlugin", _s = (h) => `${D}--${h}`;
333
- class Fs extends R {
338
+ const I = "Dnalogel-PanoTagPlugin", Vs = (l) => `${I}--${l}`;
339
+ class zs extends $ {
334
340
  constructor(e, t) {
335
341
  super(e);
336
342
  /** state */
337
343
  m(this, "state", { enabled: !0, visible: !0 });
338
344
  /** debug */
339
345
  m(this, "debug");
340
- m(this, "debugUtil", new j(this));
346
+ m(this, "debugUtil", new W(this));
341
347
  /** 全局 hover 启用状态,默认 true */
342
348
  m(this, "globalHoverEnabled", !0);
343
349
  /** 更改 tag 模型 */
344
350
  m(this, "changeTagModel", (e, t) => d(this, null, function* () {
345
351
  var i;
346
- e.data = l({}, e.data, t), yield (i = e.loadModel) == null ? void 0 : i.call(e);
352
+ e.data = v({}, e.data, t), yield (i = e.loadModel) == null ? void 0 : i.call(e);
347
353
  }));
348
354
  m(this, "handleFiveModeChange", (e) => {
349
355
  const t = () => {
@@ -351,7 +357,9 @@ class Fs extends R {
351
357
  i.state.visible = !1, i.applyVisible();
352
358
  }), this.five.ready().then(() => {
353
359
  this.tagsDo(this.tags, (i) => {
354
- i.updateVisible(), L(i) && e !== "Panorama" && this.changeTagMode(i, "behind");
360
+ i.updateVisible(), G(i) && e !== "Panorama" && this.changeTagMode(i, "behind");
361
+ }), e === "Panorama" ? this.updateMaskTagsForCurrentPano() : this.filterMaskTag.forEach((i) => {
362
+ i.state.visible = !1, i.applyVisible();
355
363
  });
356
364
  });
357
365
  };
@@ -382,38 +390,38 @@ class Fs extends R {
382
390
  e.state.visible = !1, e.applyVisible();
383
391
  }), this.tagsDo(this.tags, (e) => {
384
392
  e.updateVisible();
385
- }), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }), yield this.setUnfolded(), this.tags.filter(k).filter((e) => {
393
+ }), this.updateMaskTagsForCurrentPano(), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }), yield this.setUnfolded(), this.tags.filter(R).filter((e) => {
386
394
  var t;
387
395
  return (t = e.getConfig().modelConfig) == null ? void 0 : t.autoLookAtEnabled;
388
396
  }).forEach((e) => {
389
- var a;
390
- const t = new u.Mesh(new u.BoxGeometry(), new u.MeshBasicMaterial()), i = (a = e.model) == null ? void 0 : a.object;
397
+ var r;
398
+ const t = new P.Mesh(new P.BoxGeometry(), new P.MeshBasicMaterial()), i = (r = e.model) == null ? void 0 : r.object;
391
399
  if (!i)
392
400
  return;
393
401
  t.position.copy(i.position), t.quaternion.copy(i.quaternion);
394
402
  const o = this.five.camera.position;
395
403
  t.lookAt(o.clone().setY(t.position.y));
396
- const n = i.quaternion.clone(), s = t.quaternion.clone(), r = q();
397
- r.onUpdate(({ progress: A }) => {
398
- i.quaternion.copy(n.clone().slerp(s, A));
399
- }), r.play();
404
+ const n = i.quaternion.clone(), a = t.quaternion.clone(), s = te();
405
+ s.onUpdate(({ progress: h }) => {
406
+ i.quaternion.copy(n.clone().slerp(a, h));
407
+ }), s.play();
400
408
  });
401
409
  }));
402
410
  /** 楼层切换时,需要更新标签可见性 */
403
411
  m(this, "handleFiveModelShownFloorChange", () => {
404
412
  this.tagsDo(this.tags, (e) => e.updateVisible());
405
413
  });
406
- m(this, "onFiveRefined", y(() => {
407
- C(this.five.getCurrentState().mode) ? this.setUnfoldedByCamera() : this.tags.forEach((e) => e.cache.clear()), this.tagsDo(this.tags, (e) => e.updateVisible());
414
+ m(this, "onFiveRefined", D(() => {
415
+ A(this.five.getCurrentState().mode) ? this.setUnfoldedByCamera() : this.tags.forEach((e) => e.cache.clear()), this.tagsDo(this.tags, (e) => e.updateVisible());
408
416
  }));
409
417
  m(this, "onFiveEveryReady", () => {
410
- this.setUnfoldedByCamera(), C(this.five.getCurrentState().mode) && this.tagsDo(this.tags, (e) => e.updateVisible());
418
+ this.setUnfoldedByCamera(), A(this.five.getCurrentState().mode) && this.tagsDo(this.tags, (e) => e.updateVisible());
411
419
  });
412
420
  m(this, "render", () => {
413
421
  this.renderQueue.forEach((e, t) => {
414
422
  const { keys: i } = e;
415
423
  if (t === "TagContainerSvelte") {
416
- const n = this.filterPointTag.filter((r) => r.screenPosition), s = {
424
+ const n = this.filterPointTag.filter((s) => s.screenPosition), a = {
417
425
  hooks: this.hooks,
418
426
  tags: n,
419
427
  state: this.state,
@@ -424,30 +432,30 @@ class Fs extends R {
424
432
  zIndex: this.params.containerZIndex
425
433
  };
426
434
  if (this.TagContainerSvelte) {
427
- let r = {};
435
+ let s = {};
428
436
  if (i.length === 0)
429
- r = s;
437
+ s = a;
430
438
  else
431
- for (const a of i)
432
- r[a] = s[a];
433
- this.TagContainerSvelte.$set(r);
439
+ for (const r of i)
440
+ s[r] = a[r];
441
+ this.TagContainerSvelte.$set(s);
434
442
  } else {
435
443
  if (!this.container)
436
444
  return console.error("updateRenderPlaneTag: tag2DContainer not found");
437
- this.TagContainerSvelte = new x({
445
+ this.TagContainerSvelte = new X({
438
446
  target: this.container,
439
- props: c(f({}, s), { state: c(f({}, this.state), { enabled: !1 }) })
440
- }), z(() => {
441
- var r;
442
- (r = this.TagContainerSvelte) == null || r.$set({ state: this.state });
447
+ props: C(g({}, a), { state: C(g({}, this.state), { enabled: !1 }) })
448
+ }), H(() => {
449
+ var s;
450
+ (s = this.TagContainerSvelte) == null || s.$set({ state: this.state });
443
451
  });
444
452
  }
445
453
  }
446
454
  }), this.renderQueue.clear();
447
455
  });
448
- this.params = l({}, { debug: !1, config: this.config }, f({}, t)), this.debug = this.params.debug, this.config = this.params.config, this.debug && this.debugUtil.bindLog(), G(1, { namespace: O.PlayAudio });
456
+ this.params = v({}, { debug: !1, config: this.config }, g({}, t)), this.debug = this.params.debug, this.config = this.params.config, this.debug && this.debugUtil.bindLog(), V(1, { namespace: z.PlayAudio });
449
457
  try {
450
- Array.isArray(window.__PANOTAGPLUGIN_DEBUG_LIST__) || (window.__PANOTAGPLUGIN_DEBUG_LIST__ = []), this.NAME = D + "-" + window.__PANOTAGPLUGIN_DEBUG_LIST__.length, window.__PANOTAGPLUGIN_DEBUG_LIST__.push(this), window.__PANOTAGPLUGIN_DEBUG__ || Object.defineProperty(window, "__PANOTAGPLUGIN_DEBUG__", {
458
+ Array.isArray(window.__PANOTAGPLUGIN_DEBUG_LIST__) || (window.__PANOTAGPLUGIN_DEBUG_LIST__ = []), this.NAME = I + "-" + window.__PANOTAGPLUGIN_DEBUG_LIST__.length, window.__PANOTAGPLUGIN_DEBUG_LIST__.push(this), window.__PANOTAGPLUGIN_DEBUG__ || Object.defineProperty(window, "__PANOTAGPLUGIN_DEBUG__", {
451
459
  get: function() {
452
460
  return window.__PANOTAGPLUGIN_DEBUG_LIST__.sort((i, o) => o.tags.length - i.tags.length)[0];
453
461
  }
@@ -467,51 +475,58 @@ class Fs extends R {
467
475
  load(e) {
468
476
  return d(this, null, function* () {
469
477
  var o, n;
470
- this.clearTags();
478
+ c.clearSharedMeshRegistry(), this.clearTags();
471
479
  try {
472
480
  console.debug(this.NAME, " load:", { data: JSON.parse(JSON.stringify(e)) });
473
- } catch (s) {
481
+ } catch (a) {
474
482
  }
475
- const t = V(this.five);
476
- e.tagList.forEach((s) => {
477
- if (s.enu_position && this.isValidArrayPosition(s.enu_position))
483
+ const t = Q(this.five);
484
+ e.tagList.forEach((a) => {
485
+ if (a.enu_position && this.isValidArrayPosition(a.enu_position))
478
486
  try {
479
- const r = v(s.enu_position), a = t.viewLayers[0].scene.enuToWorld(r);
480
- s.position = P(a);
481
- } catch (r) {
487
+ const s = k(a.enu_position), r = t.viewLayers[0].scene.enuToWorld(s);
488
+ a.position = U(r);
489
+ } catch (s) {
482
490
  }
483
- if (s.enu_normal && this.isValidArrayPosition(s.enu_normal))
491
+ if (a.enu_normal && this.isValidArrayPosition(a.enu_normal))
484
492
  try {
485
- const r = v(s.enu_normal), a = t.viewLayers[0].scene.enuToWorld(r);
486
- s.normal = P(a);
487
- } catch (r) {
493
+ const s = k(a.enu_normal), r = t.viewLayers[0].scene.enuToWorld(s);
494
+ a.normal = U(r);
495
+ } catch (s) {
488
496
  }
489
- }), this.config = l({}, this.config, {
497
+ }), this.config = v({}, this.config, {
490
498
  globalConfig: (o = e.globalConfig) != null ? o : {},
491
499
  contentTypeConfig: (n = e.contentTypeConfig) != null ? n : {}
492
500
  });
493
501
  const i = yield this.addTag(e.tagList);
494
- return this.hooks.emit("loaded"), i;
502
+ return this.five.state.mode === "Panorama" && this.updateMaskTagsForCurrentPano(), this.hooks.emit("loaded"), i;
495
503
  });
496
504
  }
497
505
  /**
498
506
  * @description 添加标签
507
+ * @param tag 标签或标签数组
508
+ * @param options 可选配置
509
+ * @param options.updateMaskUrl 是否更新 mask。若为 true 且该 panoIndex 已有 Mask 标签,仅更新其 maskUrl(不变 color、style),并添加新标签
499
510
  */
500
- addTag(e) {
511
+ addTag(e, t) {
501
512
  return d(this, null, function* () {
502
- const i = (Array.isArray(e) ? e : [e]).filter((o) => o.position).map((o) => {
503
- const n = B(o);
504
- if (n === "2DPoint" || n === "3DPoint")
505
- return new Q(this, o);
506
- if (n === "Model")
507
- return new $(this, o);
508
- if (n === "Plane")
509
- return new H(this, o);
513
+ var a, s;
514
+ const o = (Array.isArray(e) ? e : [e]).filter((r) => r.stickType === "3DBox" || r.stickType === "Mask" || r.position);
515
+ if (t != null && t.updateMaskUrl && o.length === 1 && o[0].stickType === "Mask") {
516
+ const r = o[0], h = (a = r.maskUrl) != null ? a : r.mask, f = (s = r.fiveState) == null ? void 0 : s.panoIndex;
517
+ h && typeof f == "number" && this.tags.filter((u) => {
518
+ var T;
519
+ return u instanceof c && ((T = u.fiveState) == null ? void 0 : T.panoIndex) === f;
520
+ }).forEach((u) => u.set({ mask: h }));
521
+ }
522
+ const n = o.map((r) => {
523
+ const h = N(r);
524
+ return h === "2DPoint" || h === "3DPoint" ? new q(this, r) : h === "Model" ? new J(this, r) : h === "Plane" ? new Z(this, r) : h === "3DBox" ? new Y(this, r) : h === "Polygon" ? new K(this, r) : h === "Mask" ? new c(this, r) : null;
510
525
  });
511
- return i.forEach((o) => M(o)), this.tags.push(...i), this.tagsLengthWillUpdate = !0, N(this.five).then(() => d(this, null, function* () {
512
- var o, n;
513
- this.store.eventListenerDisposer && ((n = (o = this.store).eventListenerDisposer) == null || n.call(o)), this.state.enabled && this.handleEnable(), this.addResizeListener(), this.clearUnusedPanelTag(), this.tagsDo(i, (s) => {
514
- this.tags.includes(s) && (s.updateVisible(), s.updateZIndex());
526
+ return n.forEach((r) => x(r)), this.tags.push(...n), this.tagsLengthWillUpdate = !0, j(this.five).then(() => d(this, null, function* () {
527
+ var r, h;
528
+ this.store.eventListenerDisposer && ((h = (r = this.store).eventListenerDisposer) == null || h.call(r)), this.state.enabled && this.handleEnable(), this.addResizeListener(), this.clearUnusedPanelTag(), this.tagsDo(n, (f) => {
529
+ this.tags.includes(f) && (f.updateVisible(), f.updateZIndex());
515
530
  }), this.setUnfolded(), this.addRenderQueue({ type: "TagContainerSvelte" }), this.hooks.emit("tagsLengthChange");
516
531
  }));
517
532
  });
@@ -520,7 +535,7 @@ class Fs extends R {
520
535
  * @description 改变配置
521
536
  */
522
537
  changeConfig(e, t = !0) {
523
- t ? this.config = l({}, this.config, e) : this.config = e, this.tags.forEach((i) => {
538
+ t ? this.config = v({}, this.config, e) : this.config = e, this.tags.forEach((i) => {
524
539
  i.updateConfig();
525
540
  }), this.tagsDo(this.tags, (i) => i.updateVisible());
526
541
  }
@@ -528,7 +543,7 @@ class Fs extends R {
528
543
  * @description 改变全局配置
529
544
  */
530
545
  changeGlobalConfig(e, t = !0) {
531
- t ? this.config.globalConfig = l({}, this.config.globalConfig, e) : this.config.globalConfig = e, this.tags.forEach((i) => {
546
+ t ? this.config.globalConfig = v({}, this.config.globalConfig, e) : this.config.globalConfig = e, this.tags.forEach((i) => {
532
547
  i.updateConfig();
533
548
  }), this.tagsDo(this.tags, (i) => {
534
549
  i.updateVisible();
@@ -538,7 +553,7 @@ class Fs extends R {
538
553
  * @description 改变类型配置
539
554
  */
540
555
  changeContentTypeConfig(e, t, i = !0) {
541
- this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), i ? this.config.contentTypeConfig[e] = l({}, this.config.contentTypeConfig[e], t) : this.config.contentTypeConfig[e] = t, this.tags.forEach((o) => {
556
+ this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), i ? this.config.contentTypeConfig[e] = v({}, this.config.contentTypeConfig[e], t) : this.config.contentTypeConfig[e] = t, this.tags.forEach((o) => {
542
557
  o.updateConfig();
543
558
  }), this.tagsDo(this.tags, (o) => {
544
559
  o.updateVisible();
@@ -575,21 +590,21 @@ class Fs extends R {
575
590
  setState(e, t) {
576
591
  if (this.checkDisposed())
577
592
  return;
578
- const { userAction: i = !0 } = t != null ? t : {}, o = f({}, this.state);
593
+ const { userAction: i = !0 } = t != null ? t : {}, o = g({}, this.state);
579
594
  this.state = Object.assign(this.state, e), o.visible !== this.state.visible && (e.visible ? this.handleShow() : this.handleHide()), o.enabled !== this.state.enabled && (e.enabled ? this.handleEnable() : this.handleDisable()), this.hooks.emit("stateChange", { state: this.state, prevState: o, userAction: i });
580
595
  }
581
596
  /**
582
597
  * @description 销毁
583
598
  */
584
599
  dispose() {
585
- var e, t, i, o, n, s;
586
- this.pauseCurrentMedia(), this.disposeAllCSS3DContainer(), (e = this.TagContainerSvelte) == null || e.$destroy(), this.filterCSS3DTag.forEach((r) => {
587
- var a;
588
- return (a = r.tag3DContentSvelte) == null ? void 0 : a.svelteApp.$destroy();
589
- }), this.tags.forEach((r) => {
590
- var a;
591
- (a = r.rectanglePlane) == null || a.editor.disable(), r.cache.clear();
592
- }), this.tags = [], this.tagsLengthWillUpdate = !0, this.hooks.emit("tagsLengthChange"), (t = this.store.disposers) == null || t.forEach((r) => r == null ? void 0 : r()), this.store.disposers = [], (o = (i = this.store).eventListenerDisposer) == null || o.call(i), this.store.eventListenerDisposer = void 0, (s = (n = this.store).resizeObserverDisposer) == null || s.call(n), this.store.resizeObserverDisposer = void 0, this.store.resizeObserverDisposerAdding = !1, this.five.scene.remove(this.group), this.group.remove(...this.group.children), this.gltfObjectGroup.remove(...this.gltfObjectGroup.children), this.imagePlaneGroup.remove(...this.imagePlaneGroup.children), this.five.needsRender = !0, this.store.disposed = !0, this.hooks.emit("dispose");
600
+ var e, t, i, o, n, a;
601
+ this.pauseCurrentMedia(), this.disposeAllCSS3DContainer(), (e = this.TagContainerSvelte) == null || e.$destroy(), this.filterCSS3DTag.forEach((s) => {
602
+ var r;
603
+ return (r = s.tag3DContentSvelte) == null ? void 0 : r.svelteApp.$destroy();
604
+ }), this.tags.forEach((s) => {
605
+ var r;
606
+ (r = s.rectanglePlane) == null || r.editor.disable(), s.cache.clear();
607
+ }), this.tags = [], this.tagsLengthWillUpdate = !0, this.hooks.emit("tagsLengthChange"), (t = this.store.disposers) == null || t.forEach((s) => s == null ? void 0 : s()), this.store.disposers = [], (o = (i = this.store).eventListenerDisposer) == null || o.call(i), this.store.eventListenerDisposer = void 0, (a = (n = this.store).resizeObserverDisposer) == null || a.call(n), this.store.resizeObserverDisposer = void 0, this.store.resizeObserverDisposerAdding = !1, this.five.scene.remove(this.group), this.group.remove(...this.group.children), this.gltfObjectGroup.remove(...this.gltfObjectGroup.children), this.imagePlaneGroup.remove(...this.imagePlaneGroup.children), this.five.needsRender = !0, this.store.disposed = !0, this.hooks.emit("dispose");
593
608
  }
594
609
  /**
595
610
  * @description 闪烁标签
@@ -628,7 +643,7 @@ class Fs extends R {
628
643
  */
629
644
  changeTagNormalById(e, t) {
630
645
  const i = this.getTagById(e);
631
- i && i.tag3DContentSvelte && (i.tag3DContentSvelte.currentNormal = v(t));
646
+ i && i.tag3DContentSvelte && (i.tag3DContentSvelte.currentNormal = k(t));
632
647
  }
633
648
  /**
634
649
  * @description 改变data
@@ -655,7 +670,53 @@ class Fs extends R {
655
670
  */
656
671
  changeTagById(e, t, i = !0) {
657
672
  const o = this.getTagById(e);
658
- o && (o.set(t), o.updateVisible(), this.clearUnusedPanelTag(), o.hooks.emit("dataChanged", o.data));
673
+ if (o) {
674
+ if (t.stickType && t.stickType !== o.stickType) {
675
+ console.log(`[PanoTagPlugin] stickType changed from ${o.stickType} to ${t.stickType}, recreating tag`);
676
+ const n = g({}, o);
677
+ this.destroyTagById(e), this.five.ready().then(() => {
678
+ this.addTag(g(g({}, n), t));
679
+ });
680
+ return;
681
+ }
682
+ o.set(t), o instanceof c && o.updateMaskStyle(), o.updateVisible(), this.clearUnusedPanelTag(), o.hooks.emit("dataChanged", o.data);
683
+ }
684
+ }
685
+ /**
686
+ * @description 批量更新指定点位的 Mask 图
687
+ * @param maskUpdates 包含点位索引和对应 mask 的数组
688
+ * @example
689
+ * changeMask([
690
+ * { index: 0, mask: 'https://example.com/mask1.png' },
691
+ * { index: 1, mask: canvasElement }
692
+ * ])
693
+ */
694
+ changeMask(e) {
695
+ if (!Array.isArray(e) || e.length === 0) {
696
+ console.warn("[PanoTagPlugin] changeMask: invalid or empty maskUpdates");
697
+ return;
698
+ }
699
+ e.forEach(({ index: t, mask: i }) => {
700
+ if (typeof t != "number") {
701
+ console.warn("[PanoTagPlugin] changeMask: invalid index", t);
702
+ return;
703
+ }
704
+ if (!i) {
705
+ console.warn("[PanoTagPlugin] changeMask: invalid mask for index", t);
706
+ return;
707
+ }
708
+ const o = this.tags.filter((n) => {
709
+ var a;
710
+ return n instanceof c && ((a = n.fiveState) == null ? void 0 : a.panoIndex) === t;
711
+ });
712
+ if (o.length === 0) {
713
+ console.debug(`[PanoTagPlugin] changeMask: no MaskTag found at panoIndex ${t}`);
714
+ return;
715
+ }
716
+ o.forEach((n) => {
717
+ n.set({ mask: i }), console.log(`[PanoTagPlugin] Updated mask for tag ${n.id} at panoIndex ${t}`);
718
+ });
719
+ }), this.five.needsRender = !0;
659
720
  }
660
721
  /**
661
722
  * @description 销毁tag
@@ -678,8 +739,8 @@ class Fs extends R {
678
739
  clearTags() {
679
740
  var e;
680
741
  this.tags.length && (this.tags.forEach((t) => {
681
- var i, o, n, s, r, a;
682
- (i = t.tag3DContentSvelte) == null || i.dispose(), (n = (o = t.mediaPlane) == null ? void 0 : o.parent) == null || n.remove(t.mediaPlane), (a = (r = (s = t.model) == null ? void 0 : s.object) == null ? void 0 : r.parent) == null || a.remove(t.model.object), t != null && t.tagNormalLine && (t == null || t.removeTagNormalLine());
742
+ var i, o, n, a, s, r, h, f, y, u, T;
743
+ (i = t.tag3DContentSvelte) == null || i.dispose(), (n = (o = t.mediaPlane) == null ? void 0 : o.parent) == null || n.remove(t.mediaPlane), (r = (s = (a = t.model) == null ? void 0 : a.object) == null ? void 0 : s.parent) == null || r.remove(t.model.object), (f = (h = t.rectanglePlane) == null ? void 0 : h.parent) == null || f.remove(t.rectanglePlane), (y = t.boxShape) != null && y.parent && t.boxShape.parent.remove(t.boxShape), (T = (u = t.polygonShape) == null ? void 0 : u.parent) == null || T.remove(t.polygonShape), t != null && t.tagNormalLine && (t == null || t.removeTagNormalLine()), t instanceof c && t.dispose();
683
744
  }), this.tags = [], this.tagsLengthWillUpdate = !0, this.hooks.emit("tagsLengthChange"), (e = this.TagContainerSvelte) == null || e.$destroy(), this.TagContainerSvelte = void 0, this.disposeAllCSS3DContainer()), this.enabledModelTagSet.clear(), this.cache.clear();
684
745
  }
685
746
  /**
@@ -722,20 +783,20 @@ class Fs extends R {
722
783
  if (this.store.disposed)
723
784
  return;
724
785
  const e = this.five.getElement(), t = () => {
725
- this.state.enabled && (this.filterPointTag.forEach((a) => a.updateScreenPosition({ force: !0 })), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }));
786
+ this.state.enabled && (this.filterPointTag.forEach((r) => r.updateScreenPosition({ force: !0 })), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }));
726
787
  }, i = () => {
727
788
  this.state.enabled && (this.temporaryState.visible = !1, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }));
728
- }, { observe: o, unobserve: n } = T(
729
- I(() => {
789
+ }, { observe: o, unobserve: n } = M(
790
+ O(() => {
730
791
  this.store.resizeObserverDisposer && i();
731
792
  }, 500),
732
793
  e
733
- ), { observe: s, unobserve: r } = T(
734
- y(() => t(), 400),
794
+ ), { observe: a, unobserve: s } = M(
795
+ D(() => t(), 400),
735
796
  e
736
797
  );
737
- return o(), s(), () => {
738
- n(), r();
798
+ return o(), a(), () => {
799
+ n(), s();
739
800
  };
740
801
  }
741
802
  setUnfoldedByCamera() {
@@ -745,13 +806,13 @@ class Fs extends R {
745
806
  if (t.state && i !== void 0) {
746
807
  if (i === !0 && t.screenPosition) {
747
808
  const o = t.getConfig().unfoldedConfig;
748
- S(o).keep !== "unfolded" && (e = !0);
809
+ E(o).keep !== "unfolded" && (e = !0);
749
810
  }
750
811
  t.state.unfolded = i;
751
812
  }
752
813
  }), e && this.filterPointTag.forEach((t) => {
753
814
  const i = t.getConfig().unfoldedConfig;
754
- typeof i == "object" && (i.autoUnfold || i.autoUnfold === !1 || S(i.autoUnfold).enable === !1 || i.keep) || t.state && (t.state.unfolded = !1);
815
+ typeof i == "object" && (i.autoUnfold || i.autoUnfold === !1 || E(i.autoUnfold).enable === !1 || i.keep) || t.state && (t.state.unfolded = !1);
755
816
  });
756
817
  }
757
818
  changeTagMode(e, t) {
@@ -762,7 +823,7 @@ class Fs extends R {
762
823
  * @description 添加 cameraUpdate, panoArrived 等事件监听
763
824
  */
764
825
  addEventListener() {
765
- const { five: e, hooks: t } = this, i = W(this.five, this.onFiveEveryReady);
826
+ const { five: e, hooks: t } = this, i = ee(this.five, this.onFiveEveryReady);
766
827
  return this.handleFivePanoArrived(), e.on("wantsMoveToPano", this.handleFiveWantsMoveToPano), e.on("models.refined", this.onFiveRefined), e.on("modeChange", this.handleFiveModeChange), e.on("modelShownFloorChange", this.handleFiveModelShownFloorChange), e.on("cameraUpdate", this.handleFiveCameraUpdate), e.on("cameraFovUpdate", this.handleFiveCameraFovUpdate), e.on("panoArrived", this.handleFivePanoArrived), e.on("panoArrived", this.loadVideoFirstFrame), e.on("render.prepare", this.render), t.on("click", this.clickhandler), () => {
767
828
  i(), e.off("wantsMoveToPano", this.handleFiveWantsMoveToPano), e.off("models.refined", this.onFiveRefined), e.off("modeChange", this.handleFiveModeChange), e.off("modelShownFloorChange", this.handleFiveModelShownFloorChange), e.off("cameraUpdate", this.handleFiveCameraUpdate), e.off("cameraFovUpdate", this.handleFiveCameraFovUpdate), e.off("panoArrived", this.handleFivePanoArrived), e.off("panoArrived", this.loadVideoFirstFrame), e.off("render.prepare", this.render), t.off("click", this.clickhandler), this.store.eventListenerDisposer = void 0;
768
829
  };
@@ -801,9 +862,62 @@ class Fs extends R {
801
862
  isValidArrayPosition(e) {
802
863
  return !Array.isArray(e) || e.length !== 3 ? !1 : e.every((t) => typeof t == "number" && !isNaN(t) && isFinite(t));
803
864
  }
865
+ /**
866
+ * 更新当前点位的 Mask 标签
867
+ * Mask 标签仅在当前点位可见
868
+ */
869
+ updateMaskTagsForCurrentPano() {
870
+ const e = this.five.getCurrentState().panoIndex;
871
+ console.log(
872
+ "[PanoTagPlugin] updateMaskTagsForCurrentPano, current panoIndex:",
873
+ e,
874
+ "mask tags count:",
875
+ this.filterMaskTag.length
876
+ ), this.filterMaskTag.forEach((t) => {
877
+ var o;
878
+ const i = (o = t.fiveState) == null ? void 0 : o.panoIndex;
879
+ console.log(
880
+ "[PanoTagPlugin] Processing mask tag:",
881
+ t.id,
882
+ "tagPanoIndex:",
883
+ i,
884
+ "matches current:",
885
+ i === e
886
+ ), i === e ? (console.log("[PanoTagPlugin] Tag matches current pano, updating visibility..."), t.updateVisible(), t.applyVisible()) : t.visible && (console.log("[PanoTagPlugin] Tag is from different pano, hiding..."), t.state.visible = !1, t.applyVisible());
887
+ });
888
+ }
889
+ /**
890
+ * 获取所有 Mask 类型的标签
891
+ */
892
+ get filterMaskTag() {
893
+ return this.tags.filter((e) => e.stickType === "Mask");
894
+ }
895
+ /**
896
+ * 获取 MaskTag 性能统计信息(用于性能监控和调试)
897
+ * @returns 性能统计信息
898
+ */
899
+ getMaskTagPerformanceStats() {
900
+ const e = c.getCacheStats(), t = this.filterMaskTag.length, i = this.filterMaskTag.filter((o) => o.visible).length;
901
+ return {
902
+ // 标签统计
903
+ totalMaskTags: t,
904
+ visibleMaskTags: i,
905
+ // 纹理缓存统计
906
+ textureCache: e,
907
+ // 当前点位
908
+ currentPanoIndex: this.five.state.panoIndex
909
+ };
910
+ }
911
+ /**
912
+ * 清理所有 MaskTag 纹理缓存(用于内存管理)
913
+ * 注意:这会释放所有纹理缓存,谨慎使用
914
+ */
915
+ clearMaskTagCache() {
916
+ c.clearAllCache();
917
+ }
804
918
  }
805
919
  export {
806
- Fs as PanoTagPluginController,
807
- Fs as default,
808
- _s as pluginFlag
920
+ zs as PanoTagPluginController,
921
+ zs as default,
922
+ Vs as pluginFlag
809
923
  };