@realsee/dnalogel 3.45.0 → 3.46.0

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