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