@realsee/dnalogel 3.47.13 → 3.47.15

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 (101) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/PanoTagPlugin/utils/requestIdleCallback.d.ts +1 -1
  3. package/dist/Sculpt/Meshes/Line.d.ts +1 -0
  4. package/dist/Sculpt/Meshes/Polygon.d.ts +2 -1
  5. package/dist/index.cjs.js +53 -53
  6. package/dist/index.js +18650 -18640
  7. package/dist/index.umd.js +47 -47
  8. package/libs/AreaMakerPlugin/Controller.js +78 -150
  9. package/libs/AreaMakerPlugin/index.js +3 -75
  10. package/libs/AreaMakerPlugin/utils/Item.js +111 -185
  11. package/libs/CSS3DRenderPlugin/Controller.js +29 -86
  12. package/libs/CSS3DRenderPlugin/index.js +12 -69
  13. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +58 -127
  14. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +113 -174
  15. package/libs/CruisePlugin/BaseController.js +50 -122
  16. package/libs/CruisePlugin/Move.js +21 -74
  17. package/libs/CruisePlugin/Work.js +46 -99
  18. package/libs/CruisePlugin/index.js +26 -79
  19. package/libs/CurrentPanoImagePlugin/Controller.js +104 -176
  20. package/libs/CurrentPanoImagePlugin/index.js +4 -76
  21. package/libs/GuideLinePlugin/Controller.js +26 -79
  22. package/libs/GuideLinePlugin/GuideLineItem.js +24 -77
  23. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +2 -3
  24. package/libs/GuideLinePlugin/GuideLineModeItem.js +22 -75
  25. package/libs/GuideLinePlugin/index.js +26 -79
  26. package/libs/ModelMakerPlugin/Controller.js +83 -139
  27. package/libs/ModelMakerPlugin/index.js +16 -72
  28. package/libs/ModelTVVideoPlugin/Plugin.js +48 -105
  29. package/libs/ModelTVVideoPlugin/index.js +7 -64
  30. package/libs/Object3DHelperPlugin/Controller.js +32 -56
  31. package/libs/Object3DHelperPlugin/index.js +12 -35
  32. package/libs/PanoCompassPlugin/Controller.js +37 -93
  33. package/libs/PanoCompassPlugin/index.js +11 -67
  34. package/libs/PanoDoorLabelPlugin/BaseController.js +25 -97
  35. package/libs/PanoDoorLabelPlugin/Controller.js +115 -187
  36. package/libs/PanoDoorLabelPlugin/index.js +4 -76
  37. package/libs/PanoMeasurePlugin/Components/Controller0.js +83 -128
  38. package/libs/PanoMeasurePlugin/Components/Controller1.js +96 -141
  39. package/libs/PanoMeasurePlugin/Controller/EditController.js +66 -111
  40. package/libs/PanoMeasurePlugin/Controller/WatchController.js +51 -121
  41. package/libs/PanoMeasurePlugin/Controller/index.js +59 -101
  42. package/libs/PanoMeasurePlugin/Model/area.js +21 -91
  43. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +0 -73
  44. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +27 -72
  45. package/libs/PanoMeasurePlugin/index.js +25 -67
  46. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +17 -89
  47. package/libs/PanoSpatialTagPlugin/Plugin.js +106 -163
  48. package/libs/PanoSpatialTagPlugin/index.js +5 -62
  49. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +67 -141
  50. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +208 -281
  51. package/libs/PanoTagPlugin/Components/Tag/index.js +180 -251
  52. package/libs/PanoTagPlugin/Components/TagContainer.js +80 -151
  53. package/libs/PanoTagPlugin/Components/TagItem.js +67 -138
  54. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +61 -132
  55. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +28 -99
  56. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +30 -101
  57. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +36 -107
  58. package/libs/PanoTagPlugin/controller/TagRender.js +68 -121
  59. package/libs/PanoTagPlugin/controller/TagUtil.js +79 -132
  60. package/libs/PanoTagPlugin/controller/index.js +55 -108
  61. package/libs/PanoTagPlugin/index.js +31 -84
  62. package/libs/PanoTagPlugin/utils/requestIdleCallback.d.ts +1 -1
  63. package/libs/PanoTagPlugin/utils/requestIdleCallback.js +5 -13
  64. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +30 -104
  65. package/libs/PanoVideoPlugin/Controller.js +64 -136
  66. package/libs/PanoVideoPlugin/VideoMeshController.js +74 -148
  67. package/libs/PanoVideoPlugin/index.js +8 -80
  68. package/libs/PipelinePlugin/Controller.js +128 -199
  69. package/libs/PipelinePlugin/index.js +5 -76
  70. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +17 -91
  71. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +14 -88
  72. package/libs/PipelinePlugin/utils/Objects/Pipe.js +56 -130
  73. package/libs/Sculpt/Meshes/Box.js +5 -6
  74. package/libs/Sculpt/Meshes/Cylinder.js +2 -3
  75. package/libs/Sculpt/Meshes/Line.d.ts +1 -0
  76. package/libs/Sculpt/Meshes/Line.js +50 -41
  77. package/libs/Sculpt/Meshes/Point.js +9 -10
  78. package/libs/Sculpt/Meshes/Polygon.d.ts +2 -1
  79. package/libs/Sculpt/Meshes/Polygon.js +47 -37
  80. package/libs/Sculpt/Meshes/Polyline.js +18 -16
  81. package/libs/Sculpt/Meshes/Rectangle.js +3 -4
  82. package/libs/Sculpt/Objects/Line/Editor.js +2 -3
  83. package/libs/Sculpt/Objects/Rectangle/index.js +1 -1
  84. package/libs/Sculpt/utils/removeAllTag.js +4 -4
  85. package/libs/Sculpt/utils/three/ColoredMesh.js +3 -4
  86. package/libs/base/BasePlugin.js +3 -4
  87. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +59 -128
  88. package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -75
  89. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +59 -129
  90. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -75
  91. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +62 -134
  92. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -76
  93. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +81 -151
  94. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -75
  95. package/libs/floorplan/index.js +0 -1
  96. package/libs/index.js +62 -62
  97. package/libs/shared-utils/five/index.js +2 -3
  98. package/libs/shared-utils/five/lookObject.js +17 -18
  99. package/libs/shared-utils/logger.js +1 -1
  100. package/libs/shared-utils/three/index.js +0 -1
  101. package/package.json +1 -1
@@ -2,15 +2,15 @@ var $ = Object.defineProperty, B = Object.defineProperties;
2
2
  var U = Object.getOwnPropertyDescriptors;
3
3
  var C = Object.getOwnPropertySymbols;
4
4
  var G = Object.prototype.hasOwnProperty, N = Object.prototype.propertyIsEnumerable;
5
- var T = (d, a, i) => a in d ? $(d, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : d[a] = i, H = (d, a) => {
6
- for (var i in a || (a = {}))
7
- G.call(a, i) && T(d, i, a[i]);
5
+ var T = (p, a, e) => a in p ? $(p, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[a] = e, H = (p, a) => {
6
+ for (var e in a || (a = {}))
7
+ G.call(a, e) && T(p, e, a[e]);
8
8
  if (C)
9
- for (var i of C(a))
10
- N.call(a, i) && T(d, i, a[i]);
11
- return d;
12
- }, W = (d, a) => B(d, U(a));
13
- var n = (d, a, i) => (T(d, typeof a != "symbol" ? a + "" : a, i), i);
9
+ for (var e of C(a))
10
+ N.call(a, e) && T(p, e, a[e]);
11
+ return p;
12
+ }, W = (p, a) => B(p, U(a));
13
+ var r = (p, a, e) => (T(p, typeof a != "symbol" ? a + "" : a, e), e);
14
14
  import { Raycaster as Q, Vector3 as V, Quaternion as j, Euler as z } from "three";
15
15
  import { BasePanoPluginController as q } from "./BaseController.js";
16
16
  import X from "./DoorLabelItem.js";
@@ -30,170 +30,98 @@ import "../shared-utils/Utils/BaseUtil.js";
30
30
  import "../shared-utils/Utils/WorkUtil.js";
31
31
  import "../shared-utils/five/transformPosition.js";
32
32
  import "../shared-utils/three/temp.js";
33
- import "../Sculpt/utils/Modules/Global.js";
34
- import "../Sculpt/utils/Modules/Cursor.js";
35
- import "../Object3DHelperPlugin/Controller.js";
36
33
  import "../shared-utils/three/THREESphere.js";
37
- import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
38
- import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
39
- import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
40
- import "../shared-utils/three/IObject3D.js";
41
- import "../shared-utils/three/boundingBox.js";
42
- import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
43
- import "../shared-utils/Object3DHelper/utils/direction.js";
44
- import "../shared-utils/Object3DHelper/Constants/color.js";
45
- import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
46
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
47
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
48
- import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
49
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
50
- import "../CSS3DRenderPlugin/utils/even.js";
51
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
52
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
53
- import "../shared-utils/three/centerPoint.js";
54
- import "../shared-utils/three/getObjectVisible.js";
55
34
  import "animejs";
56
- import "../shared-utils/isNil.js";
57
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
58
35
  import "../shared-utils/url/absoluteUrl.js";
59
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
60
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
61
- import "../shared-utils/util.js";
62
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
63
- import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
64
- import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
65
- import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
66
- import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
67
- import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
68
- import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
69
- import "../shared-utils/Object3DHelper/Controller/MoveController.js";
70
- import "../shared-utils/Object3DHelper/Base/BaseController.js";
71
- import "../shared-utils/threex/domevents/index.js";
72
- import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
73
- import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
74
- import "../Sculpt/utils/three/rayOnLine.js";
75
- import "../Object3DHelperPlugin/FiveControllerWrapper.js";
76
- import "../shared-utils/Object3DHelper/index.js";
77
- import "../shared-utils/Object3DHelper/Controller/RotateController.js";
78
- import "../shared-utils/math/rad2Deg.js";
79
- import "../shared-utils/math/deg2Rad.js";
80
- import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
81
- import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
82
- import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
83
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
84
- import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
85
- import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
86
- import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
87
- import "../shared-utils/five/fiveModelLoad.js";
88
- import "../shared-utils/five/FiveDomEvents.js";
89
- import "../shared-utils/five/calculateThreeMouse.js";
90
- import "../shared-utils/three/THREERaycaster.js";
91
- import "../shared-utils/three/PointSelector/index.js";
92
- import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
93
- import "../shared-utils/three/Magnifier.js";
94
- import "../shared-utils/three/PointSelector/utils/PointHelper.js";
95
- import "../shared-utils/three/Assets/index.js";
96
- import "../shared-utils/three/PointSelector/utils/html.js";
97
- import "../shared-utils/five/initialCSS3DRender.js";
98
- import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
99
- import "../Sculpt/Meshes/Line.js";
100
- import "../Sculpt/typings/style.js";
101
- import "../shared-utils/five/FiveLine.js";
102
- import "../Sculpt/utils/removeAllTag.js";
103
- import "../Sculpt/utils/Meshes/getLengthHTML.js";
104
- import "../shared-utils/three/applyObjectMatrixWorld.js";
105
- import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
106
- import "../shared-utils/isTouchDevice.js";
107
- import "../shared-utils/five/getPosition.js";
108
- import "../shared-utils/five/getRaycasterByNdcPosition.js";
36
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
109
37
  import "../vendor/svelte/internal/index.js";
110
38
  import "../vendor/classnames/index.js";
111
- const ii = { userAction: !0 };
112
- class Nt extends q {
113
- constructor(i) {
114
- super(i);
115
- n(this, "MinVisibledistance", 1.8);
116
- n(this, "MaxVisibledistance", 5);
117
- n(this, "OffsetHeight", -1.3);
39
+ const ee = { userAction: !0 };
40
+ class Me extends q {
41
+ constructor(e) {
42
+ super(e);
43
+ r(this, "MinVisibledistance", 1.8);
44
+ r(this, "MaxVisibledistance", 5);
45
+ r(this, "OffsetHeight", -1.3);
118
46
  // 标签页面高度偏移值
119
- n(this, "rooms");
120
- n(this, "floorplanServerData");
47
+ r(this, "rooms");
48
+ r(this, "floorplanServerData");
121
49
  /** 标签项 */
122
- n(this, "doorLabelItems");
50
+ r(this, "doorLabelItems");
123
51
  /** 每个点位 visible 标签的缓存 */
124
- n(this, "visibleLabelMap", /* @__PURE__ */ new Map());
52
+ r(this, "visibleLabelMap", /* @__PURE__ */ new Map());
125
53
  /** 标签项Prop值 */
126
- n(this, "labelItems", []);
54
+ r(this, "labelItems", []);
127
55
  /** 数据 */
128
- n(this, "doorLabels");
129
- n(this, "roomObservers");
130
- n(this, "loadData", (i, r) => {
131
- r && (this.MaxVisibledistance = r.MaxVisibledistance, this.MinVisibledistance = r.MinVisibledistance, this.OffsetHeight = r.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((c) => {
132
- c.$destroy();
133
- }), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = i, typeof this.five.ready == "function" ? this.five.ready().then(() => this.initData()) : this.five.once("panoArrived", () => {
56
+ r(this, "doorLabels");
57
+ r(this, "roomObservers");
58
+ r(this, "loadData", (e, n) => {
59
+ n && (this.MaxVisibledistance = n.MaxVisibledistance, this.MinVisibledistance = n.MinVisibledistance, this.OffsetHeight = n.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((d) => {
60
+ d.$destroy();
61
+ }), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = e, typeof this.five.ready == "function" ? this.five.ready().then(() => this.initData()) : this.five.once("panoArrived", () => {
134
62
  this.initData();
135
63
  });
136
64
  });
137
- n(this, "initRoomObservers", () => {
138
- var l, m;
139
- const i = this.floorplanServerData.computed_data.floor_datas || [], c = (((m = (l = this.five) == null ? void 0 : l.work) == null ? void 0 : m.observers) || []).map((e) => {
140
- const s = e.panoIndex, p = e.floorIndex, t = i == null ? void 0 : i.find((o) => o.floor_index === p);
141
- if (t) {
142
- const o = t.rooms.find((h) => h.observer_indexs.includes(s));
143
- if (o)
144
- return { panoIndex: s, floorIndex: p, name: o.name };
65
+ r(this, "initRoomObservers", () => {
66
+ var l, h;
67
+ const e = this.floorplanServerData.computed_data.floor_datas || [], d = (((h = (l = this.five) == null ? void 0 : l.work) == null ? void 0 : h.observers) || []).map((o) => {
68
+ const s = o.panoIndex, f = o.floorIndex, i = e == null ? void 0 : e.find((t) => t.floor_index === f);
69
+ if (i) {
70
+ const t = i.rooms.find((c) => c.observer_indexs.includes(s));
71
+ if (t)
72
+ return { panoIndex: s, floorIndex: f, name: t.name };
145
73
  }
146
74
  }).filter(Boolean);
147
- this.roomObservers = c;
75
+ this.roomObservers = d;
148
76
  });
149
- n(this, "hideAllLabels", () => {
150
- this.labelItems.forEach((i) => {
151
- i.visible = !1, i.inSight = !1;
77
+ r(this, "hideAllLabels", () => {
78
+ this.labelItems.forEach((e) => {
79
+ e.visible = !1, e.inSight = !1;
152
80
  }), this.render();
153
81
  });
154
- n(this, "fixDoorVisibleAndPosition", () => {
82
+ r(this, "fixDoorVisibleAndPosition", () => {
155
83
  this.initRoomObservers();
156
- const { panoIndex: i } = this.five;
157
- if (!this.visible || this.five.model.empty || i === null || !this.roomObservers.find((e) => e.panoIndex === i))
84
+ const { panoIndex: e } = this.five;
85
+ if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((o) => o.panoIndex === e))
158
86
  return;
159
- const r = this.roomObservers.find((e) => e.panoIndex === i), l = this.five.work.observers.find((e) => e.panoIndex === i).position.clone(), m = (() => {
160
- if (this.visibleLabelMap.has(i))
161
- return this.visibleLabelMap.get(i);
87
+ const n = this.roomObservers.find((o) => o.panoIndex === e), l = this.five.work.observers.find((o) => o.panoIndex === e).position.clone(), h = (() => {
88
+ if (this.visibleLabelMap.has(e))
89
+ return this.visibleLabelMap.get(e);
162
90
  {
163
- const e = [];
164
- return this.doorLabels.forEach((s, p) => {
165
- if (s.roomName === r.name)
91
+ const o = [];
92
+ return this.doorLabels.forEach((s, f) => {
93
+ if (s.roomName === n.name)
166
94
  return;
167
- const t = s.position.clone(), o = t.distanceTo(l);
168
- if (o < this.MinVisibledistance || o > this.MaxVisibledistance)
95
+ const i = s.position.clone(), t = i.distanceTo(l);
96
+ if (t < this.MinVisibledistance || t > this.MaxVisibledistance)
169
97
  return;
170
- const h = new Q(), v = t.clone().sub(l).normalize();
171
- h.set(l, v);
172
- const [b] = this.five.model.intersectRaycaster(h);
173
- b && b.distance + 0.1 < o || e.push(p);
174
- }), this.visibleLabelMap.set(i, e), e;
98
+ const c = new Q(), v = i.clone().sub(l).normalize();
99
+ c.set(l, v);
100
+ const [b] = this.five.model.intersectRaycaster(c);
101
+ b && b.distance + 0.1 < t || o.push(f);
102
+ }), this.visibleLabelMap.set(e, o), o;
175
103
  }
176
104
  })();
177
- this.labelItems.forEach((e, s) => {
178
- e.visible = m.includes(s);
105
+ this.labelItems.forEach((o, s) => {
106
+ o.visible = h.includes(s);
179
107
  }), this.fixDoorPosition();
180
108
  });
181
- n(this, "fixDoorPosition", () => {
182
- var t, o, h, v, b, y, g, w, L, E, _, S;
183
- const { panoIndex: i, camera: r } = this.five;
184
- if (i === null)
109
+ r(this, "fixDoorPosition", () => {
110
+ var i, t, c, v, b, y, g, w, L, E, _, S;
111
+ const { panoIndex: e, camera: n } = this.five;
112
+ if (e === null)
185
113
  return;
186
114
  if (this.five.currentMode !== "Panorama")
187
115
  return this.hideAllLabels();
188
- const c = this.five.getElement(), l = c.clientWidth, m = c.clientHeight, e = r.getWorldDirection(new V()), s = [], p = [...this.labelItems];
189
- if (p.forEach((f, u) => {
190
- if (f.visible) {
191
- const x = r.position.distanceTo(f.position), M = f.position.clone().add(new V(0, this.OffsetHeight, 0)), A = M.clone().sub(r.position).normalize().angleTo(e), O = M.clone().project(r), P = (O.x + 1) / 2.2 * 100, I = (-O.y + 1) / 2.2 * 100, D = P >= 0 && P <= 100 && I >= 0 && I <= 100 && x > this.MinVisibledistance && x <= this.MaxVisibledistance;
192
- f.left = P, f.top = I, f.inSight = D && A < Math.PI / 2, f.cameraToward = Y(this.five), D ? s.push({ disFromCameraToLabel: x, left: P, top: I, index: u }) : f.transform = "translate(-50%, -50%)";
116
+ const d = this.five.getElement(), l = d.clientWidth, h = d.clientHeight, o = n.getWorldDirection(new V()), s = [], f = [...this.labelItems];
117
+ if (f.forEach((m, u) => {
118
+ if (m.visible) {
119
+ const x = n.position.distanceTo(m.position), M = m.position.clone().add(new V(0, this.OffsetHeight, 0)), A = M.clone().sub(n.position).normalize().angleTo(o), O = M.clone().project(n), P = (O.x + 1) / 2.2 * 100, I = (-O.y + 1) / 2.2 * 100, D = P >= 0 && P <= 100 && I >= 0 && I <= 100 && x > this.MinVisibledistance && x <= this.MaxVisibledistance;
120
+ m.left = P, m.top = I, m.inSight = D && A < Math.PI / 2, m.cameraToward = Y(this.five), D ? s.push({ disFromCameraToLabel: x, left: P, top: I, index: u }) : m.transform = "translate(-50%, -50%)";
193
121
  } else
194
- f.inSight = !1;
122
+ m.inSight = !1;
195
123
  }), s.length > 1) {
196
- let f = 0;
124
+ let m = 0;
197
125
  s.sort((u, x) => x.disFromCameraToLabel - u.disFromCameraToLabel);
198
126
  for (let u = 1; u < s.length; u++) {
199
127
  const { index: x, left: M, top: k } = s[u - 1], { index: A, left: O, top: P } = s[u], I = this.container.children[x], D = this.container.children[A];
@@ -201,68 +129,68 @@ class Nt extends q {
201
129
  return;
202
130
  const R = {
203
131
  left: l * M / 100,
204
- top: m * k / 100,
205
- width: (h = (o = (t = I.children) == null ? void 0 : t[0]) == null ? void 0 : o.clientWidth) != null ? h : 0,
132
+ top: h * k / 100,
133
+ width: (c = (t = (i = I.children) == null ? void 0 : i[0]) == null ? void 0 : t.clientWidth) != null ? c : 0,
206
134
  height: (y = (b = (v = I.children) == null ? void 0 : v[0]) == null ? void 0 : b.clientHeight) != null ? y : 0
207
135
  }, F = {
208
136
  left: l * O / 100,
209
- top: m * P / 100,
137
+ top: h * P / 100,
210
138
  width: (L = (w = (g = D.children) == null ? void 0 : g[0]) == null ? void 0 : w.clientWidth) != null ? L : 0,
211
139
  height: (S = (_ = (E = D.children) == null ? void 0 : E[0]) == null ? void 0 : _.clientHeight) != null ? S : 0
212
140
  };
213
- Z(R, F) && (f++, p[x].transform = `translate(-50%, ${(f - 1) * 100 - 50}%)`, p[A].transform = `translate(-50%, ${f * 100 - 50}%)`);
141
+ Z(R, F) && (m++, f[x].transform = `translate(-50%, ${(m - 1) * 100 - 50}%)`, f[A].transform = `translate(-50%, ${m * 100 - 50}%)`);
214
142
  }
215
143
  }
216
- this.labelItems = p, this.render();
144
+ this.labelItems = f, this.render();
217
145
  });
218
- n(this, "onClick", (i, r) => {
146
+ r(this, "onClick", (e, n) => {
219
147
  if (!this.roomObservers)
220
148
  return;
221
- const { work: c } = this.five;
222
- let l, m, e = 1 / 0;
223
- for (const s of c.observers)
224
- if (this.roomObservers.find((t) => t.panoIndex === s.panoIndex && t.name === i)) {
225
- const t = s.standingPosition, o = r.distanceTo(t);
226
- o < e && (l = s.panoIndex, m = t.clone().sub(r).normalize(), e = o);
149
+ const { work: d } = this.five;
150
+ let l, h, o = 1 / 0;
151
+ for (const s of d.observers)
152
+ if (this.roomObservers.find((i) => i.panoIndex === s.panoIndex && i.name === e)) {
153
+ const i = s.standingPosition, t = n.distanceTo(i);
154
+ t < o && (l = s.panoIndex, h = i.clone().sub(n).normalize(), o = t);
227
155
  }
228
- if (m !== null && l !== null) {
156
+ if (h !== null && l !== null) {
229
157
  const s = {};
230
- if (e > 0) {
231
- const t = new V(0, 0, -1), o = m.clone(), h = new j();
232
- h.setFromUnitVectors(t, o);
158
+ if (o > 0) {
159
+ const i = new V(0, 0, -1), t = h.clone(), c = new j();
160
+ c.setFromUnitVectors(i, t);
233
161
  const v = new z();
234
- v.setFromQuaternion(h, "YXZ"), s.longitude = v.y;
162
+ v.setFromQuaternion(c, "YXZ"), s.longitude = v.y;
235
163
  }
236
164
  this.five.emit("wantsToMoveToPano", l, {}, !0) || this.five.moveToPano(l, { longitude: s.longitude });
237
165
  }
238
166
  });
239
- n(this, "initData", () => {
167
+ r(this, "initData", () => {
240
168
  var l;
241
169
  this.doorLabels = [];
242
- const i = this.five.panoIndex, r = this.floorplanServerData.computed_data.observers[i].floor_index, c = r !== void 0 && ((l = this.floorplanServerData.computed_data.floor_datas[r]) == null ? void 0 : l.rooms);
243
- this.rooms = c, this.rooms && this.rooms.length > 0 && this.rooms.forEach((m) => {
244
- var p;
245
- const e = (p = this.floorplanServerData.computed_data.doors) == null ? void 0 : p.filter((t) => !!(t && t.name === m.name)), s = this.five.work.observers.filter((t, o) => !!m.observer_indexs.find((h) => h === o));
246
- e && e.forEach((t) => {
247
- const o = t.position;
248
- let h = 1 / 0, v;
170
+ const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, d = n !== void 0 && ((l = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : l.rooms);
171
+ this.rooms = d, this.rooms && this.rooms.length > 0 && this.rooms.forEach((h) => {
172
+ var f;
173
+ const o = (f = this.floorplanServerData.computed_data.doors) == null ? void 0 : f.filter((i) => !!(i && i.name === h.name)), s = this.five.work.observers.filter((i, t) => !!h.observer_indexs.find((c) => c === t));
174
+ o && o.forEach((i) => {
175
+ const t = i.position;
176
+ let c = 1 / 0, v;
249
177
  s.forEach((y) => {
250
178
  const g = y.standingPosition, w = {
251
179
  x: g.x,
252
180
  y: g.y,
253
181
  z: g.z
254
- }, L = J(o, w);
255
- L < h && (h = L, v = w);
256
- }), v && (o.y = v.y + 0.01);
257
- const b = new V(o.x, o.y, o.z);
258
- b.add(new V(-0.2, 1.8, 0).applyEuler(new z(0, t.rad, 0))), this.doorLabels.push({
259
- roomName: m.name,
260
- name: t.name,
182
+ }, L = J(t, w);
183
+ L < c && (c = L, v = w);
184
+ }), v && (t.y = v.y + 0.01);
185
+ const b = new V(t.x, t.y, t.z);
186
+ b.add(new V(-0.2, 1.8, 0).applyEuler(new z(0, i.rad, 0))), this.doorLabels.push({
187
+ roomName: h.name,
188
+ name: i.name,
261
189
  position: b,
262
- toward: K(t.rad)
190
+ toward: K(i.rad)
263
191
  });
264
192
  });
265
- }), this.labelItems = this.doorLabels.map((m) => W(H({}, m), {
193
+ }), this.labelItems = this.doorLabels.map((h) => W(H({}, h), {
266
194
  left: 0,
267
195
  top: 0,
268
196
  visible: !1,
@@ -272,33 +200,33 @@ class Nt extends q {
272
200
  })), this.five.on("wantsToMoveToPano", this.hideAllLabels), this.five.on("modelLoaded", this.fixDoorVisibleAndPosition), this.five.on("panoArrived", this.fixDoorVisibleAndPosition), this.five.on("initAnimationEnded", this.fixDoorPosition), this.five.on("cameraUpdate", this.fixDoorPosition), this.five.on("mouseWheel", this.fixDoorPosition), this.five.on("pinchGesture", this.fixDoorPosition), this.fixDoorVisibleAndPosition();
273
201
  });
274
202
  }
275
- stateChangedCallback(i, r) {
203
+ stateChangedCallback(e, n) {
276
204
  if (this.hooks.hasListener("stateChange")) {
277
- const c = {
205
+ const d = {
278
206
  state: this.state,
279
- prevState: i,
280
- userAction: r ? r.userAction : ii.userAction
207
+ prevState: e,
208
+ userAction: n ? n.userAction : ee.userAction
281
209
  };
282
- this.hooks.emit("stateChange", c);
210
+ this.hooks.emit("stateChange", d);
283
211
  }
284
212
  }
285
213
  render() {
286
214
  if (!this.enabled) {
287
- this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((i) => {
288
- i == null || i.$destroy();
215
+ this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((e) => {
216
+ e == null || e.$destroy();
289
217
  }), this.doorLabels = void 0;
290
218
  return;
291
219
  }
292
- this.doorLabelItems && this.doorLabelItems.forEach((i) => {
293
- i.$destroy();
294
- }), this.doorLabelItems = [], this.labelItems.forEach((i) => {
220
+ this.doorLabelItems && this.doorLabelItems.forEach((e) => {
221
+ e.$destroy();
222
+ }), this.doorLabelItems = [], this.labelItems.forEach((e) => {
295
223
  this.doorLabelItems.push(
296
224
  new X({
297
225
  target: this.container,
298
226
  props: {
299
- props: i,
227
+ props: e,
300
228
  onClick: () => {
301
- this.onClick(i.name, i.position);
229
+ this.onClick(e.name, e.position);
302
230
  }
303
231
  }
304
232
  })
@@ -313,5 +241,5 @@ class Nt extends q {
313
241
  }
314
242
  }
315
243
  export {
316
- Nt as PanoDoorLabelPluginController
244
+ Me as PanoDoorLabelPluginController
317
245
  };
@@ -16,88 +16,16 @@ import "../shared-utils/Utils/BaseUtil.js";
16
16
  import "../shared-utils/Utils/WorkUtil.js";
17
17
  import "../shared-utils/five/transformPosition.js";
18
18
  import "../shared-utils/three/temp.js";
19
- import "../Sculpt/utils/Modules/Global.js";
20
- import "../Sculpt/utils/Modules/Cursor.js";
21
- import "../Object3DHelperPlugin/Controller.js";
22
19
  import "../shared-utils/three/THREESphere.js";
23
- import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
24
- import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
25
- import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
26
- import "../shared-utils/three/IObject3D.js";
27
- import "../shared-utils/three/boundingBox.js";
28
- import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
29
- import "../shared-utils/Object3DHelper/utils/direction.js";
30
- import "../shared-utils/Object3DHelper/Constants/color.js";
31
- import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
32
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
33
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
34
- import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
35
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
36
- import "../CSS3DRenderPlugin/utils/even.js";
37
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
38
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
39
- import "../shared-utils/three/centerPoint.js";
40
- import "../shared-utils/three/getObjectVisible.js";
41
20
  import "animejs";
42
- import "../shared-utils/isNil.js";
43
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
44
21
  import "../shared-utils/url/absoluteUrl.js";
45
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
46
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
47
- import "../shared-utils/util.js";
48
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
49
- import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
50
- import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
51
- import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
52
- import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
53
- import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
54
- import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
55
- import "../shared-utils/Object3DHelper/Controller/MoveController.js";
56
- import "../shared-utils/Object3DHelper/Base/BaseController.js";
57
- import "../shared-utils/threex/domevents/index.js";
58
- import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
59
- import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
60
- import "../Sculpt/utils/three/rayOnLine.js";
61
- import "../Object3DHelperPlugin/FiveControllerWrapper.js";
62
- import "../shared-utils/Object3DHelper/index.js";
63
- import "../shared-utils/Object3DHelper/Controller/RotateController.js";
64
- import "../shared-utils/math/rad2Deg.js";
65
- import "../shared-utils/math/deg2Rad.js";
66
- import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
67
- import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
68
- import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
69
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
70
- import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
71
- import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
72
- import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
73
- import "../shared-utils/five/fiveModelLoad.js";
74
- import "../shared-utils/five/FiveDomEvents.js";
75
- import "../shared-utils/five/calculateThreeMouse.js";
76
- import "../shared-utils/three/THREERaycaster.js";
77
- import "../shared-utils/three/PointSelector/index.js";
78
- import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
79
- import "../shared-utils/three/Magnifier.js";
80
- import "../shared-utils/three/PointSelector/utils/PointHelper.js";
81
- import "../shared-utils/three/Assets/index.js";
82
- import "../shared-utils/three/PointSelector/utils/html.js";
83
- import "../shared-utils/five/initialCSS3DRender.js";
84
- import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
85
- import "../Sculpt/Meshes/Line.js";
86
- import "../Sculpt/typings/style.js";
87
- import "../shared-utils/five/FiveLine.js";
88
- import "../Sculpt/utils/removeAllTag.js";
89
- import "../Sculpt/utils/Meshes/getLengthHTML.js";
90
- import "../shared-utils/three/applyObjectMatrixWorld.js";
91
- import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
92
- import "../shared-utils/isTouchDevice.js";
93
- import "../shared-utils/five/getPosition.js";
94
- import "../shared-utils/five/getRaycasterByNdcPosition.js";
22
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
95
23
  import "./DoorLabelItem.js";
96
24
  import "../vendor/svelte/internal/index.js";
97
25
  import "../vendor/classnames/index.js";
98
26
  import "./utils.js";
99
- const Vo = (o) => new r(o);
27
+ const y = (o) => new r(o);
100
28
  export {
101
- Vo as PanoDoorLabelPlugin,
102
- Vo as default
29
+ y as PanoDoorLabelPlugin,
30
+ y as default
103
31
  };