@realsee/dnalogel 3.45.0 → 3.46.1

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 (100) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Sculpt/Meshes/Line.d.ts +6 -1
  3. package/dist/Sculpt/utils/removeAllTag.d.ts +2 -0
  4. package/dist/index.cjs.js +53 -53
  5. package/dist/index.js +29600 -29557
  6. package/dist/index.umd.js +49 -49
  7. package/dist/shared-utils/tag.d.ts +6 -3
  8. package/libs/AreaMakerPlugin/Controller.js +151 -78
  9. package/libs/AreaMakerPlugin/index.js +77 -4
  10. package/libs/AreaMakerPlugin/utils/Item.js +191 -111
  11. package/libs/CSS3DRenderPlugin/Controller.js +90 -29
  12. package/libs/CSS3DRenderPlugin/index.js +76 -15
  13. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +133 -58
  14. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +182 -116
  15. package/libs/CruisePlugin/BaseController.js +122 -49
  16. package/libs/CruisePlugin/Move.js +74 -21
  17. package/libs/CruisePlugin/Work.js +99 -46
  18. package/libs/CruisePlugin/index.js +80 -27
  19. package/libs/CurrentPanoImagePlugin/Controller.js +177 -104
  20. package/libs/CurrentPanoImagePlugin/index.js +77 -4
  21. package/libs/GuideLinePlugin/Controller.js +79 -26
  22. package/libs/GuideLinePlugin/GuideLineItem.js +83 -30
  23. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
  24. package/libs/GuideLinePlugin/GuideLineModeItem.js +82 -29
  25. package/libs/GuideLinePlugin/index.js +80 -27
  26. package/libs/ModelMakerPlugin/Controller.js +140 -82
  27. package/libs/ModelMakerPlugin/index.js +76 -18
  28. package/libs/ModelTVVideoPlugin/Plugin.js +118 -57
  29. package/libs/ModelTVVideoPlugin/index.js +69 -8
  30. package/libs/Object3DHelperPlugin/Controller.js +67 -43
  31. package/libs/Object3DHelperPlugin/index.js +36 -13
  32. package/libs/PanoCompassPlugin/Controller.js +98 -42
  33. package/libs/PanoCompassPlugin/index.js +72 -16
  34. package/libs/PanoDoorLabelPlugin/BaseController.js +99 -26
  35. package/libs/PanoDoorLabelPlugin/Controller.js +188 -115
  36. package/libs/PanoDoorLabelPlugin/index.js +77 -4
  37. package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -88
  38. package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -126
  39. package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -72
  40. package/libs/PanoMeasurePlugin/Controller/WatchController.js +168 -92
  41. package/libs/PanoMeasurePlugin/Controller/index.js +110 -64
  42. package/libs/PanoMeasurePlugin/Model/area.js +115 -38
  43. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +79 -0
  44. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -45
  45. package/libs/PanoMeasurePlugin/index.js +77 -31
  46. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +99 -20
  47. package/libs/PanoSpatialTagPlugin/Plugin.js +211 -150
  48. package/libs/PanoSpatialTagPlugin/index.js +67 -6
  49. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +149 -68
  50. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +296 -216
  51. package/libs/PanoTagPlugin/Components/Tag/index.js +258 -187
  52. package/libs/PanoTagPlugin/Components/TagContainer.js +158 -87
  53. package/libs/PanoTagPlugin/Components/TagItem.js +145 -74
  54. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +133 -62
  55. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +110 -39
  56. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +106 -35
  57. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +114 -43
  58. package/libs/PanoTagPlugin/controller/TagRender.js +133 -80
  59. package/libs/PanoTagPlugin/controller/TagUtil.js +137 -84
  60. package/libs/PanoTagPlugin/controller/index.js +114 -61
  61. package/libs/PanoTagPlugin/index.js +90 -37
  62. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +122 -41
  63. package/libs/PanoVideoPlugin/Controller.js +138 -65
  64. package/libs/PanoVideoPlugin/VideoMeshController.js +150 -69
  65. package/libs/PanoVideoPlugin/index.js +83 -10
  66. package/libs/PipelinePlugin/Controller.js +200 -128
  67. package/libs/PipelinePlugin/index.js +77 -5
  68. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +103 -22
  69. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +96 -15
  70. package/libs/PipelinePlugin/utils/Objects/Pipe.js +137 -56
  71. package/libs/Sculpt/Meshes/Box.js +6 -5
  72. package/libs/Sculpt/Meshes/Cylinder.js +7 -6
  73. package/libs/Sculpt/Meshes/Line.d.ts +6 -1
  74. package/libs/Sculpt/Meshes/Line.js +80 -57
  75. package/libs/Sculpt/Meshes/Point.js +6 -5
  76. package/libs/Sculpt/Meshes/Polyline.js +5 -4
  77. package/libs/Sculpt/Meshes/Rectangle.js +3 -2
  78. package/libs/Sculpt/Objects/Base/index.js +20 -17
  79. package/libs/Sculpt/Objects/Line/Editor.js +11 -10
  80. package/libs/Sculpt/utils/removeAllTag.d.ts +2 -0
  81. package/libs/Sculpt/utils/removeAllTag.js +10 -0
  82. package/libs/Sculpt/utils/three/ColoredMesh.js +14 -13
  83. package/libs/base/BasePlugin.js +14 -13
  84. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +129 -59
  85. package/libs/floorplan/MapviewFloorplanPlugin/index.js +76 -6
  86. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +130 -59
  87. package/libs/floorplan/ModelFloorplanPlugin/index.js +76 -5
  88. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +159 -86
  89. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +77 -4
  90. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +152 -81
  91. package/libs/floorplan/TopviewFloorplanPlugin/index.js +76 -5
  92. package/libs/floorplan/index.js +1 -0
  93. package/libs/index.js +193 -192
  94. package/libs/shared-utils/five/index.js +3 -2
  95. package/libs/shared-utils/five/lookObject.js +3 -2
  96. package/libs/shared-utils/logger.js +1 -1
  97. package/libs/shared-utils/tag.d.ts +6 -3
  98. package/libs/shared-utils/tag.js +38 -24
  99. package/libs/shared-utils/three/index.js +1 -0
  100. package/package.json +1 -1
@@ -2,15 +2,15 @@ var x = Object.defineProperty, j = Object.defineProperties;
2
2
  var G = Object.getOwnPropertyDescriptors;
3
3
  var D = Object.getOwnPropertySymbols;
4
4
  var B = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
5
- var w = (p, a, e) => a in p ? x(p, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[a] = e, k = (p, a) => {
5
+ var w = (d, a, e) => a in d ? x(d, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[a] = e, k = (d, a) => {
6
6
  for (var e in a || (a = {}))
7
- B.call(a, e) && w(p, e, a[e]);
7
+ B.call(a, e) && w(d, e, a[e]);
8
8
  if (D)
9
9
  for (var e of D(a))
10
- O.call(a, e) && w(p, e, a[e]);
11
- return p;
12
- }, M = (p, a) => j(p, G(a));
13
- var s = (p, a, e) => (w(p, typeof a != "symbol" ? a + "" : a, e), e);
10
+ O.call(a, e) && w(d, e, a[e]);
11
+ return d;
12
+ }, M = (d, a) => j(d, G(a));
13
+ var o = (d, a, e) => (w(d, typeof a != "symbol" ? a + "" : a, e), e);
14
14
  import $ from "../Model/line.js";
15
15
  import I from "../Model/point.js";
16
16
  import { throttle as q } from "../../shared-utils/throttle.js";
@@ -45,28 +45,81 @@ import "../utils/dom/areaDom.js";
45
45
  import "../../shared-utils/three/geometryUtil.js";
46
46
  import "hammerjs";
47
47
  import "three/examples/jsm/renderers/CSS3DRenderer";
48
+ import "../../Sculpt/utils/Modules/Global.js";
49
+ import "../../Sculpt/utils/Modules/Cursor.js";
50
+ import "../../Object3DHelperPlugin/Controller.js";
51
+ import "../../base/BasePlugin.js";
52
+ import "../../shared-utils/Subscribe.js";
48
53
  import "../../shared-utils/three/THREESphere.js";
49
54
  import "animejs";
50
- import "../../shared-utils/isNil.js";
55
+ import "../../shared-utils/Utils/FiveUtil.js";
56
+ import "../../shared-utils/Utils/BaseUtil.js";
57
+ import "../../shared-utils/Utils/WorkUtil.js";
58
+ import "../../shared-utils/five/transformPosition.js";
59
+ import "../../shared-utils/url/absoluteUrl.js";
51
60
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
61
+ import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
62
+ import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
63
+ import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
64
+ import "../../shared-utils/three/boundingBox.js";
65
+ import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
66
+ import "../../shared-utils/Object3DHelper/utils/direction.js";
67
+ import "../../shared-utils/Object3DHelper/Constants/color.js";
68
+ import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
69
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
70
+ import "../../shared-utils/positionToVector3.js";
71
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
72
+ import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
73
+ import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
74
+ import "../../CSS3DRenderPlugin/utils/even.js";
75
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
76
+ import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
77
+ import "../../shared-utils/three/getObjectVisible.js";
78
+ import "../../shared-utils/isNil.js";
79
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
80
+ import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
81
+ import "../../shared-utils/util.js";
82
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
83
+ import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
84
+ import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
85
+ import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
86
+ import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
87
+ import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
88
+ import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
89
+ import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
90
+ import "../../shared-utils/Object3DHelper/Base/BaseController.js";
91
+ import "../../shared-utils/threex/domevents/index.js";
92
+ import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
93
+ import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
94
+ import "../../Sculpt/utils/three/rayOnLine.js";
95
+ import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
96
+ import "../../shared-utils/Object3DHelper/index.js";
97
+ import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
98
+ import "../../shared-utils/math/rad2Deg.js";
99
+ import "../../shared-utils/math/deg2Rad.js";
100
+ import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
101
+ import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
102
+ import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
103
+ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
104
+ import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
105
+ import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
106
+ import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
107
+ import "../../shared-utils/five/fiveModelLoad.js";
108
+ import "../../shared-utils/five/FiveDomEvents.js";
109
+ import "../../shared-utils/five/calculateThreeMouse.js";
110
+ import "../../shared-utils/three/THREERaycaster.js";
52
111
  import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
53
112
  import "../../shared-utils/three/Magnifier.js";
54
- import "../../shared-utils/Subscribe.js";
55
113
  import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
56
114
  import "../../shared-utils/three/Assets/index.js";
57
- import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
58
- import "../../CSS3DRenderPlugin/utils/even.js";
59
- import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
60
- import "../../shared-utils/three/getObjectVisible.js";
61
115
  import "../../shared-utils/three/PointSelector/utils/html.js";
62
116
  import "../../shared-utils/five/initialCSS3DRender.js";
63
- import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
64
- import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
65
- import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
66
117
  import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
67
118
  import "../../Sculpt/Meshes/Line.js";
68
119
  import "../../Sculpt/typings/style.js";
69
- import "../../shared-utils/positionToVector3.js";
120
+ import "../../shared-utils/tag.js";
121
+ import "../../shared-utils/five/vector3ToScreen.js";
122
+ import "../../Sculpt/utils/removeAllTag.js";
70
123
  import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
71
124
  import "../../shared-utils/isTouchDevice.js";
72
125
  import "../../shared-utils/five/getPosition.js";
@@ -75,31 +128,31 @@ import "../Modules/DeleteDom/_Assets/delete.svg.js";
75
128
  import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
76
129
  import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
77
130
  const b = () => !1;
78
- class ot extends z {
131
+ class oi extends z {
79
132
  constructor(e) {
80
133
  super(e);
81
- s(this, "type", "edit");
82
- s(this, "polyline");
83
- s(this, "area");
84
- s(this, "hasAppendDashed", !1);
134
+ o(this, "type", "edit");
135
+ o(this, "polyline");
136
+ o(this, "area");
137
+ o(this, "hasAppendDashed", !1);
85
138
  // private deleteDom: DeleteDom
86
- s(this, "fiveElement");
139
+ o(this, "fiveElement");
87
140
  /** 上一个端点位置 */
88
- s(this, "lastPoint", null);
89
- s(this, "pointSelector");
90
- s(this, "deleteDom");
141
+ o(this, "lastPoint", null);
142
+ o(this, "pointSelector");
143
+ o(this, "deleteDom");
91
144
  /** 根据 intersection 更新放大镜和吸附点 */
92
- s(this, "onIntersectionUpdate", q((e, t) => {
145
+ o(this, "onIntersectionUpdate", q((e, t) => {
93
146
  this.currentMeasureType === "area" && typeof t == "boolean" && (t ? this.hook.emit("readyComplete") : this.hook.emit("notReadyComplete")), this.updateDashed();
94
147
  }, 20));
95
148
  /** 撤销编辑 */
96
- s(this, "revoke", () => {
149
+ o(this, "revoke", () => {
97
150
  this.currentMeasureType === "area" ? this.revokeArea() : this.currentMeasureType === "line" && this.revokeLine();
98
151
  });
99
152
  /**
100
153
  * @description: 测面积的撤销功能
101
154
  */
102
- s(this, "revokeArea", () => {
155
+ o(this, "revokeArea", () => {
103
156
  if (this.area.points.length !== 0) {
104
157
  if (this.area.popPoint(), this.hook.emit("pointsChange", this.area.points), this.area.points.length === 0) {
105
158
  this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.five.needsRender = !0, this.hook.emit("revoke", { isEmpty: !0 });
@@ -112,7 +165,7 @@ class ot extends z {
112
165
  /**
113
166
  * @description: 测距的撤销功能
114
167
  */
115
- s(this, "revokeLine", (e) => {
168
+ o(this, "revokeLine", (e) => {
116
169
  const t = e || this.polyline;
117
170
  if (t.lines.length === 0 && this.lastPoint) {
118
171
  this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0, this.hook.emit("pointsChange", []);
@@ -123,21 +176,21 @@ class ot extends z {
123
176
  const i = t.lines[t.lines.length - 1], n = i.findAnotherPoint(this.lastPoint);
124
177
  n && (this.lastPoint = n, this.hook.emit("anchorChange", n.position), this.group.remove(i.mesh), t.removeLine(i), i.distanceItem.remove(), this.updateDashed(), this.five.needsRender = !0);
125
178
  });
126
- s(this, "checkMouseLeave", (e) => {
179
+ o(this, "checkMouseLeave", (e) => {
127
180
  e || (this.dashed.hide(), this.perpendicularDashed.hide(), this.area.hideArea());
128
181
  });
129
182
  /** 编辑线条发生改变时通知外部 */
130
- s(this, "onLineChanged", () => {
183
+ o(this, "onLineChanged", () => {
131
184
  this.hook.emit("editedPolylineChange", this.polyline);
132
185
  });
133
- s(this, "onWantsSelect", () => {
186
+ o(this, "onWantsSelect", () => {
134
187
  if (this.currentMeasureType === "area") {
135
188
  const e = this.area.polygon.isBlank || this.area.polygon.visible === !1;
136
189
  if (this.area.points.length >= 3 && e)
137
190
  return !1;
138
191
  }
139
192
  });
140
- s(this, "wantsMoveToPano", () => {
193
+ o(this, "wantsMoveToPano", () => {
141
194
  if (this.lastPoint)
142
195
  return !1;
143
196
  });
@@ -146,13 +199,13 @@ class ot extends z {
146
199
  * 2. 把上一个点的位置更新为当前点的位置
147
200
  * 3. 清除 pointSelector
148
201
  */
149
- s(this, "onSelect", () => {
150
- var l, c, u, y;
202
+ o(this, "onSelect", () => {
203
+ var p, c, u, y;
151
204
  this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh), this.currentMeasureType === "area" && this.group.add(this.perpendicularDashed.mesh)), this.hasAppendDashed = !0;
152
205
  const e = (() => {
153
- var o, h;
206
+ var s, h;
154
207
  if (this.currentMeasureType === "area")
155
- return this.area.projectPoint((o = this.pointSelector.position) == null ? void 0 : o.point);
208
+ return this.area.projectPoint((s = this.pointSelector.position) == null ? void 0 : s.point);
156
209
  if (this.currentMeasureType === "line")
157
210
  return (h = this.pointSelector.position) == null ? void 0 : h.point;
158
211
  })();
@@ -162,20 +215,20 @@ class ot extends z {
162
215
  if (i != null && i.position && t.position.equals(i == null ? void 0 : i.position))
163
216
  return;
164
217
  this.lastPoint = t;
165
- const n = (o) => {
218
+ const n = (s) => {
166
219
  if (!this.lastPoint)
167
220
  return [];
168
- const { intersection: h, pointSelectorInstance: L } = o, g = L.pointSelectorHelper.pointHelper, m = new f.Vector3(0, 0, 1).applyQuaternion(g.quaternion);
221
+ const { intersection: h, pointSelectorInstance: L } = s, g = L.pointSelectorHelper.pointHelper, m = new f.Vector3(0, 0, 1).applyQuaternion(g.quaternion);
169
222
  if (m.x > 0.9999 || m.y > 0.9999 || m.z > 0.9999 || m.x < -0.9999 || m.y < -0.9999 || m.z < -0.9999) {
170
223
  const S = h.point, v = this.lastPoint.position.clone().sub(S);
171
224
  L.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 });
172
225
  const r = new f.Line3(
173
226
  g.localToWorld(new f.Vector3(1, 0, 0)).add(v),
174
227
  g.localToWorld(new f.Vector3(-1, 0, 0)).add(v)
175
- ), d = new f.Line3(
228
+ ), l = new f.Line3(
176
229
  g.localToWorld(new f.Vector3(0, 1, 0)).add(v),
177
230
  g.localToWorld(new f.Vector3(0, -1, 0)).add(v)
178
- ), A = r.closestPointToPoint(S, !1, new f.Vector3()), P = d.closestPointToPoint(S, !1, new f.Vector3());
231
+ ), A = r.closestPointToPoint(S, !1, new f.Vector3()), P = l.closestPointToPoint(S, !1, new f.Vector3());
179
232
  return [A, P];
180
233
  }
181
234
  return [];
@@ -185,8 +238,8 @@ class ot extends z {
185
238
  const h = new $(i, t, this.model);
186
239
  h.distanceItem.setCanSelect(!1), h.distanceItem.appendTo(this.container), this.polyline.addLine(h), this.group.add(h.mesh), h.distanceItem.update(this.five);
187
240
  }
188
- const o = (c = (l = this.editParams) == null ? void 0 : l.autoEndConfig) == null ? void 0 : c.line;
189
- typeof o == "number" && (this.polyline.getPointLength() >= o ? this.complete() : this.polyline.getPointLength() === o - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.polyline.points);
241
+ const s = (c = (p = this.editParams) == null ? void 0 : p.autoEndConfig) == null ? void 0 : c.line;
242
+ typeof s == "number" && (this.polyline.getPointLength() >= s ? this.complete() : this.polyline.getPointLength() === s - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.polyline.points);
190
243
  } else if (this.currentMeasureType === "area") {
191
244
  if (this.area.addPoints(t.position), this.area.isClosed) {
192
245
  this.complete();
@@ -196,26 +249,26 @@ class ot extends z {
196
249
  var L;
197
250
  return [this.area.points[0], ...(L = n(...h)) != null ? L : []];
198
251
  });
199
- const o = (y = (u = this.editParams) == null ? void 0 : u.autoEndConfig) == null ? void 0 : y.area;
200
- typeof o == "number" && (this.area.points.length >= o ? this.complete() : this.area.points.length === o - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.area.points);
252
+ const s = (y = (u = this.editParams) == null ? void 0 : u.autoEndConfig) == null ? void 0 : y.area;
253
+ typeof s == "number" && (this.area.points.length >= s ? this.complete() : this.area.points.length === s - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.area.points);
201
254
  }
202
255
  this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", t.position);
203
256
  });
204
257
  /** 移动全景时更新 distanceItem 在屏幕上的位置 */
205
- s(this, "onCameraUpdate", () => {
258
+ o(this, "onCameraUpdate", () => {
206
259
  this.updateDistanceUI();
207
260
  });
208
261
  /** 更新虚线 */
209
- s(this, "updateDashed", () => {
262
+ o(this, "updateDashed", () => {
210
263
  var i;
211
264
  if (!this.lastPoint)
212
265
  return;
213
266
  const e = this.lastPoint.position, t = (() => {
214
- var n, l;
267
+ var n, p;
215
268
  if (this.currentMeasureType === "area")
216
269
  return this.area.projectPoint((n = this.pointSelector.position) == null ? void 0 : n.point);
217
270
  if (this.currentMeasureType === "line")
218
- return (l = this.pointSelector.position) == null ? void 0 : l.point;
271
+ return (p = this.pointSelector.position) == null ? void 0 : p.point;
219
272
  })();
220
273
  if (!t) {
221
274
  this.dashed.hide();
@@ -225,17 +278,17 @@ class ot extends z {
225
278
  if (this.area.areaItem.setCanSelect(!1), this.area.points.length >= 2) {
226
279
  const n = (i = this.pointSelector.position) == null ? void 0 : i.point;
227
280
  if (n) {
228
- const o = n, h = t;
229
- this.perpendicularDashed.setPoints(o, h), this.perpendicularDashed.show();
281
+ const s = n, h = t;
282
+ this.perpendicularDashed.setPoints(s, h), this.perpendicularDashed.show();
230
283
  } else
231
284
  this.perpendicularDashed.hide();
232
- const l = this.area.polyline.lines.map((o) => ({ start: o.points[0].position, end: o.points[1].position })), c = H({ start: e, end: t }, l), u = H({ start: t, end: this.area.points[0] }, l);
285
+ const p = this.area.polyline.lines.map((s) => ({ start: s.points[0].position, end: s.points[1].position })), c = H({ start: e, end: t }, p), u = H({ start: t, end: this.area.points[0] }, p);
233
286
  if (c || u)
234
287
  this.area.hideArea(), this.hook.emit("allowAddPointStateChange", "forbid");
235
288
  else {
236
289
  this.area.showArea();
237
- const o = [...this.area.points, t];
238
- this.area.polygon.updatePoints(o), this.area.areaItem.updateArea(this.five), this.hook.emit("allowAddPointStateChange", "allow");
290
+ const s = [...this.area.points, t];
291
+ this.area.polygon.updatePoints(s), this.area.areaItem.updateArea(this.five), this.hook.emit("allowAddPointStateChange", "allow");
239
292
  }
240
293
  } else
241
294
  this.area.hideArea(), this.perpendicularDashed.hide();
@@ -243,23 +296,23 @@ class ot extends z {
243
296
  });
244
297
  // ====================================================================================================================================
245
298
  // 下面一堆高亮相关
246
- s(this, "wantsTapGesture", (e) => {
299
+ o(this, "wantsTapGesture", (e) => {
247
300
  var S, v;
248
301
  if (this.editParams.pointSelectorMode === "cursor" || this.lastPoint)
249
302
  return !1;
250
- const t = this.model.areas.map((r) => e.intersectObject(r.polygon, !0)[0]).sort((r, d) => r.distance - d.distance), i = (v = (S = t[0]) == null ? void 0 : S.object) == null ? void 0 : v.parent;
303
+ const t = this.model.areas.map((r) => e.intersectObject(r.polygon, !0)[0]).sort((r, l) => r.distance - l.distance), i = (v = (S = t[0]) == null ? void 0 : S.object) == null ? void 0 : v.parent;
251
304
  if (i != null && i.isPolygonMesh) {
252
- const r = this.model.areas.find((d) => d.polygon === i);
305
+ const r = this.model.areas.find((l) => l.polygon === i);
253
306
  if (r) {
254
- const { x: d, y: A } = t[0].point.clone().project(this.five.camera), P = `${(d + 1) / 2 * 100}%`, C = `${(-A + 1) / 2 * 100}%`;
307
+ const { x: l, y: A } = t[0].point.clone().project(this.five.camera), P = `${(l + 1) / 2 * 100}%`, C = `${(-A + 1) / 2 * 100}%`;
255
308
  return this.chooseArea(r, { left: P, top: C }), !1;
256
309
  }
257
310
  }
258
311
  const [n] = X(this.five).intersectRaycaster(e);
259
312
  if (!n)
260
313
  return;
261
- const l = this.five.camera, c = n.point.clone().project(l), u = this.container.clientWidth, y = this.container.clientHeight, o = new T(c.x * u, c.y * y), h = this.model.getAllLines().map((r) => {
262
- const [d, A] = r.points, P = d.position.clone().project(l), C = A.position.clone().project(l);
314
+ const p = this.five.camera, c = n.point.clone().project(p), u = this.container.clientWidth, y = this.container.clientHeight, s = new T(c.x * u, c.y * y), h = this.model.getAllLines().map((r) => {
315
+ const [l, A] = r.points, P = l.position.clone().project(p), C = A.position.clone().project(p);
263
316
  if (!U(P) && !U(C))
264
317
  return null;
265
318
  const V = new T(P.x * u, P.y * y), W = new T(C.x * u, C.y * y);
@@ -268,26 +321,26 @@ class ot extends z {
268
321
  if (h.length === 0)
269
322
  return;
270
323
  const g = h.map((r) => {
271
- const d = Q(o, r.points);
272
- return { id: r.id, distance: d.distanceTo(o) };
273
- }).sort((r, d) => r.distance - d.distance)[0];
324
+ const l = Q(s, r.points);
325
+ return { id: r.id, distance: l.distanceTo(s) };
326
+ }).sort((r, l) => r.distance - l.distance)[0];
274
327
  if (g.distance > 20)
275
328
  return;
276
329
  const m = this.model.getAllLines().find(({ id: r }) => r === g.id);
277
330
  if (m)
278
331
  return this.chooseLine(m), !1;
279
332
  });
280
- s(this, "chooseLine", (e) => {
333
+ o(this, "chooseLine", (e) => {
281
334
  const t = e.getPolyline().lines;
282
335
  this.deleteDom.setTarget(t).setLines(t).updatePosition().show(), this.highlightLines(t), this.hook.emit("selectedChange", t);
283
336
  });
284
- s(this, "chooseArea", (e, t) => {
337
+ o(this, "chooseArea", (e, t) => {
285
338
  this.deleteDom.setTarget(e).updatePosition(t.left, `calc(${t.top} - 1.5rem)`).show(), this.highlightArea(e);
286
339
  });
287
- s(this, "deleteArea", (e) => {
340
+ o(this, "deleteArea", (e) => {
288
341
  this.unHighlightArea(e), e.dispose(), this.deleteDom.hide();
289
342
  });
290
- s(this, "deleteLine", (e) => {
343
+ o(this, "deleteLine", (e) => {
291
344
  const t = e[0], i = this.model.getPolylineByLine(t);
292
345
  i && (this.model.removePolyline(i), i.lines.forEach((n) => this.removeLine(n)), this.deleteDom.setLines([]).hide());
293
346
  });
@@ -295,13 +348,13 @@ class ot extends z {
295
348
  i18n: this.config.i18n,
296
349
  onClick: (t, i) => {
297
350
  var c;
298
- const n = i.type === "area", l = Array.isArray(i) && ((c = i[0]) == null ? void 0 : c.type) === "line";
299
- n && this.deleteArea(i), l && this.deleteLine(i);
351
+ const n = i.type === "area", p = Array.isArray(i) && ((c = i[0]) == null ? void 0 : c.type) === "line";
352
+ n && this.deleteArea(i), p && this.deleteLine(i);
300
353
  },
301
354
  cancel: (t) => {
302
- var l;
355
+ var p;
303
356
  this.deleteDom.hide();
304
- const i = t.type === "area", n = Array.isArray(t) && ((l = t[0]) == null ? void 0 : l.type) === "line";
357
+ const i = t.type === "area", n = Array.isArray(t) && ((p = t[0]) == null ? void 0 : p.type) === "line";
305
358
  i && this.unHighlightArea(t), n && this.unHighlightLines(t);
306
359
  }
307
360
  }).appendTo(this.container), this.pointSelector = new F(this.five, M(k({}, this.pointSelectorConfig), {
@@ -355,5 +408,5 @@ class ot extends z {
355
408
  }
356
409
  }
357
410
  export {
358
- ot as default
411
+ oi as default
359
412
  };