@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
@@ -1,7 +1,7 @@
1
1
  var x = Object.defineProperty;
2
2
  var I = Object.getOwnPropertySymbols;
3
3
  var D = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
4
- var c = (n, s, t) => s in n ? x(n, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[s] = t, m = (n, s) => {
4
+ var c = (n, s, t) => s in n ? x(n, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[s] = t, h = (n, s) => {
5
5
  for (var t in s || (s = {}))
6
6
  D.call(s, t) && c(n, t, s[t]);
7
7
  if (I)
@@ -10,10 +10,10 @@ var c = (n, s, t) => s in n ? x(n, s, { enumerable: !0, configurable: !0, writab
10
10
  return n;
11
11
  };
12
12
  var r = (n, s, t) => (c(n, typeof s != "symbol" ? s + "" : s, t), t);
13
- import h from "./EditController.js";
13
+ import m from "./EditController.js";
14
14
  import k from "./ViewController.js";
15
15
  import T from "./WatchController.js";
16
- import a from "./MixedController.js";
16
+ import p from "./MixedController.js";
17
17
  import { omit as G } from "../../shared-utils/filter.js";
18
18
  import { Group as S } from "three";
19
19
  import { Model as L } from "../Model/index.js";
@@ -25,6 +25,7 @@ import { safeObj as U } from "../../shared-utils/safeObj.js";
25
25
  import { Magnifier as V } from "../../shared-utils/three/Magnifier.js";
26
26
  import "three/examples/jsm/renderers/CSS3DRenderer";
27
27
  import "@realsee/five/line";
28
+ import "../../Sculpt/utils/Modules/Global.js";
28
29
  import "../../shared-utils/three/THREESphere.js";
29
30
  import "animejs";
30
31
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
@@ -66,19 +67,70 @@ import "../../CSS3DRenderPlugin/utils/even.js";
66
67
  import "../../shared-utils/Subscribe.js";
67
68
  import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
68
69
  import "../../shared-utils/three/getObjectVisible.js";
69
- import "../../shared-utils/three/PointSelector/utils/html.js";
70
- import "../../shared-utils/five/initialCSS3DRender.js";
70
+ import "../../Sculpt/utils/Modules/Cursor.js";
71
+ import "../../Object3DHelperPlugin/Controller.js";
72
+ import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
73
+ import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
74
+ import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
75
+ import "../../shared-utils/three/boundingBox.js";
76
+ import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
77
+ import "../../shared-utils/Object3DHelper/utils/direction.js";
78
+ import "../../shared-utils/Object3DHelper/Constants/color.js";
79
+ import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
80
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
81
+ import "../../shared-utils/positionToVector3.js";
71
82
  import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
72
83
  import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
73
84
  import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
85
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
86
+ import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
87
+ import "../../shared-utils/util.js";
88
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
89
+ import "../../shared-utils/Utils/FiveUtil.js";
90
+ import "../../shared-utils/Utils/BaseUtil.js";
91
+ import "../../shared-utils/Utils/WorkUtil.js";
92
+ import "../../shared-utils/five/transformPosition.js";
93
+ import "../../shared-utils/five/getFiveModel.js";
94
+ import "../../shared-utils/url/absoluteUrl.js";
95
+ import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
96
+ import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
97
+ import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
98
+ import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
99
+ import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
100
+ import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
101
+ import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
102
+ import "../../shared-utils/Object3DHelper/Base/BaseController.js";
103
+ import "../../shared-utils/threex/domevents/index.js";
104
+ import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
105
+ import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
106
+ import "../../Sculpt/utils/three/rayOnLine.js";
107
+ import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
108
+ import "../../shared-utils/Object3DHelper/index.js";
109
+ import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
110
+ import "../../shared-utils/math/rad2Deg.js";
111
+ import "../../shared-utils/math/deg2Rad.js";
112
+ import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
113
+ import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
114
+ import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
115
+ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
116
+ import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
117
+ import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
118
+ import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
119
+ import "../../shared-utils/five/fiveModelLoad.js";
120
+ import "../../shared-utils/five/FiveDomEvents.js";
121
+ import "../../shared-utils/five/calculateThreeMouse.js";
122
+ import "../../shared-utils/three/THREERaycaster.js";
123
+ import "../../shared-utils/three/PointSelector/utils/html.js";
124
+ import "../../shared-utils/five/initialCSS3DRender.js";
74
125
  import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
75
126
  import "../../Sculpt/Meshes/Line.js";
76
127
  import "../../Sculpt/typings/style.js";
77
- import "../../shared-utils/positionToVector3.js";
128
+ import "../../shared-utils/tag.js";
129
+ import "../../shared-utils/five/vector3ToScreen.js";
130
+ import "../../Sculpt/utils/removeAllTag.js";
78
131
  import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
79
132
  import "../../shared-utils/five/getPosition.js";
80
133
  import "../../shared-utils/five/getRaycasterByNdcPosition.js";
81
- import "../../shared-utils/five/getFiveModel.js";
82
134
  import "../Modules/DeleteDom/index.js";
83
135
  import "../Modules/DeleteDom/_Assets/delete.svg.js";
84
136
  import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
@@ -90,7 +142,6 @@ import "../../shared-utils/getPointFromHammerEvent.js";
90
142
  import "../Modules/rangePiece/index.js";
91
143
  import "../../shared-utils/animationFrame/index.js";
92
144
  import "../../shared-utils/noop.js";
93
- import "../../shared-utils/five/calculateThreeMouse.js";
94
145
  import "../../shared-utils/tap.js";
95
146
  import "../Modules/UIController/HTML.js";
96
147
  import "../Modules/UIController/mobileHTML.js";
@@ -110,13 +161,8 @@ import "../../vendor/svelte/transition/index.js";
110
161
  import "../../vendor/svelte/easing/index.js";
111
162
  import "../../vendor/object-assign-deep/objectAssignDeep.js";
112
163
  import "../Components/Tip.js";
113
- import "../../shared-utils/Utils/FiveUtil.js";
114
- import "../../shared-utils/Utils/BaseUtil.js";
115
- import "../../shared-utils/Utils/WorkUtil.js";
116
- import "../../shared-utils/five/transformPosition.js";
117
- import "../../shared-utils/url/absoluteUrl.js";
118
- class Ke extends H {
119
- constructor(t, e) {
164
+ class Ge extends H {
165
+ constructor(t, i) {
120
166
  var l, u, d, f, g, y, C, M, w, P, b, v;
121
167
  super(t);
122
168
  r(this, "state", { enabled: !0 });
@@ -143,10 +189,10 @@ class Ke extends H {
143
189
  * @description 还原点位展示和默认鼠标 UI
144
190
  */
145
191
  r(this, "disable", () => {
146
- var t, e, i, o;
147
- this.hasOpen = !1, this.state.enabled = !1, this.container.style.visibility = "hidden", this.container.style.opacity = "0", (t = this.controller) == null || t.dispose(), (e = this.useUIController) == null || e.hide(), (i = this.useGuideController) == null || i.hide(), (o = this.shortcutKeyController) == null || o.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
192
+ var t, i, e, o;
193
+ this.hasOpen = !1, this.state.enabled = !1, this.container.style.visibility = "hidden", this.container.style.opacity = "0", (t = this.controller) == null || t.dispose(), (i = this.useUIController) == null || i.hide(), (e = this.useGuideController) == null || e.hide(), (o = this.shortcutKeyController) == null || o.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
148
194
  });
149
- r(this, "getCurrentMode", () => this.controller instanceof h ? "Edit" : this.controller instanceof T ? "Watch" : this.controller instanceof a ? "Mixed" : this.controller instanceof k ? "View" : null);
195
+ r(this, "getCurrentMode", () => this.controller instanceof m ? "Edit" : this.controller instanceof T ? "Watch" : this.controller instanceof p ? "Mixed" : this.controller instanceof k ? "View" : null);
150
196
  /** 变更场景
151
197
  * @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
152
198
  */
@@ -155,16 +201,16 @@ class Ke extends H {
155
201
  if (!this.hasOpen || this.getCurrentMode() === t)
156
202
  return;
157
203
  (o = this.controller) == null || o.dispose();
158
- const e = {
204
+ const i = {
159
205
  View: k,
160
206
  Watch: T,
161
- Edit: h,
162
- Mixed: a
207
+ Edit: m,
208
+ Mixed: p
163
209
  };
164
- if (!e[t])
210
+ if (!i[t])
165
211
  throw new Error("不存在的 Mode");
166
- const i = this.createControllerParams();
167
- this.controller = new e[t](i), this.hook.emit("modeChange", t);
212
+ const e = this.createControllerParams();
213
+ this.controller = new i[t](e), this.hook.emit("modeChange", t);
168
214
  });
169
215
  /**
170
216
  * @description: 切换测量的类型
@@ -172,28 +218,28 @@ class Ke extends H {
172
218
  r(this, "changeMeasureType", (t) => {
173
219
  this.currentMeasureType = t, this.hook.emit("measureTypeChange", t);
174
220
  });
175
- this.five = t, this.hook = this.hooks, this.params = e, this.config = G(e, ["openParams", "magnifierParams"]), this.model = new L(this.config), this.isMobile = (u = (l = e == null ? void 0 : e.openParams) == null ? void 0 : l.isMobile) != null ? u : !1, this.magnifier = new V(
221
+ this.five = t, this.hook = this.hooks, this.params = i, this.config = G(i, ["openParams", "magnifierParams"]), this.model = new L(this.config), this.isMobile = (u = (l = i == null ? void 0 : i.openParams) == null ? void 0 : l.isMobile) != null ? u : !1, this.magnifier = new V(
176
222
  t,
177
- (y = (g = e.magnifierParams) != null ? g : (f = (d = e.pointSelectorConfig) == null ? void 0 : d.helper) == null ? void 0 : f.magnifierParams) != null ? y : { width: 190, height: 190, scale: 2 }
178
- ), this.allowMeasureType = Array.from(new Set((M = (C = e.editParams) == null ? void 0 : C.allowMeasureType) != null ? M : ["line"])), this.currentMeasureType = (w = this.allowMeasureType[0]) != null ? w : "line", this.group = new S(), this.group.name = "plugin-measure-group", this.container.classList.add("five-plugin-measure-container"), this.container.style.position = "absolute", this.container.style.left = "0", this.container.style.top = "0", this.container.style.visibility = "hidden", this.container.style.width = "100%", this.container.style.height = "100%", this.container.style.opacity = "0";
179
- const i = (b = (P = e.editParams) == null ? void 0 : P.pointSelectorMode) != null ? b : K ? "fixed" : "cursor", o = (v = this.params.openParams) != null ? v : {};
223
+ (y = (g = i.magnifierParams) != null ? g : (f = (d = i.pointSelectorConfig) == null ? void 0 : d.helper) == null ? void 0 : f.magnifierParams) != null ? y : { width: 190, height: 190, scale: 2 }
224
+ ), this.allowMeasureType = Array.from(new Set((M = (C = i.editParams) == null ? void 0 : C.allowMeasureType) != null ? M : ["line"])), this.currentMeasureType = (w = this.allowMeasureType[0]) != null ? w : "line", this.group = new S(), this.group.name = "plugin-measure-group", this.container.classList.add("five-plugin-measure-container"), this.container.style.position = "absolute", this.container.style.left = "0", this.container.style.top = "0", this.container.style.visibility = "hidden", this.container.style.width = "100%", this.container.style.height = "100%", this.container.style.opacity = "0";
225
+ const e = (b = (P = i.editParams) == null ? void 0 : P.pointSelectorMode) != null ? b : K ? "fixed" : "cursor", o = (v = this.params.openParams) != null ? v : {};
180
226
  if (this.params.useUIController !== !1) {
181
- const p = m({
227
+ const a = h({
182
228
  container: this.container,
183
229
  openParams: o,
184
- i18n: e.i18n,
185
- pointSelectorMode: i,
230
+ i18n: i.i18n,
231
+ pointSelectorMode: e,
186
232
  useNewUI: this.allowMeasureType.length > 1
187
233
  }, U(this.params.useUIController));
188
- this.useUIController = new W(this, p);
234
+ this.useUIController = new W(this, a);
189
235
  }
190
236
  if (this.params.useGuideController !== !1) {
191
- const p = m({
237
+ const a = h({
192
238
  container: this.container,
193
- pointSelectorMode: i,
194
- i18n: e.i18n
239
+ pointSelectorMode: e,
240
+ i18n: i.i18n
195
241
  }, U(this.params.useGuideController));
196
- this.useGuideController = new A(this, p);
242
+ this.useGuideController = new A(this, a);
197
243
  }
198
244
  }
199
245
  appendTo(t) {
@@ -203,8 +249,8 @@ class Ke extends H {
203
249
  this.model.clear();
204
250
  }
205
251
  dispose() {
206
- var t, e;
207
- this.disable(), this.clear(), (t = this.useUIController) == null || t.dispose(), (e = this.magnifier) == null || e.dispose(), this.five.needsRender = !0;
252
+ var t, i;
253
+ this.disable(), this.clear(), (t = this.useUIController) == null || t.dispose(), (i = this.magnifier) == null || i.dispose(), this.five.needsRender = !0;
208
254
  }
209
255
  /** 加载数据
210
256
  * @description 数据加载时会覆盖当前已保存的数据
@@ -218,18 +264,18 @@ class Ke extends H {
218
264
  * @description 会隐藏当前 VR 内的点位展示
219
265
  */
220
266
  enable(t) {
221
- var e, i;
222
- this.hasOpen || (this.state.enabled = !0, this.hasOpen = !0, this.group.matrix.copy(this.workUtil.transform), this.group.matrix.decompose(this.group.position, this.group.quaternion, this.group.scale), this.group.updateMatrixWorld(), this.five.scene.add(this.group), this.container.style.visibility = "visible", this.container.style.opacity = "1", t != null && t.mode ? this.changeMode(t.mode) : this.isMobile ? this.changeMode("Mixed") : this.changeMode("Watch"), (e = this.useUIController) == null || e.show(), (i = this.useGuideController) == null || i.show(), this.shortcutKeyController = new B(this, this.five), this.hook.emit("enable", !0));
267
+ var i, e;
268
+ this.hasOpen || (this.state.enabled = !0, this.hasOpen = !0, this.group.matrix.copy(this.workUtil.transform), this.group.matrix.decompose(this.group.position, this.group.quaternion, this.group.scale), this.group.updateMatrixWorld(), this.five.scene.add(this.group), this.container.style.visibility = "visible", this.container.style.opacity = "1", t != null && t.mode ? this.changeMode(t.mode) : this.isMobile ? this.changeMode("Mixed") : this.changeMode("Watch"), (i = this.useUIController) == null || i.show(), (e = this.useGuideController) == null || e.show(), this.shortcutKeyController = new B(this, this.five), this.hook.emit("enable", !0));
223
269
  }
224
270
  /** 进入编辑模式 */
225
271
  edit(t) {
226
272
  t && this.changeMeasureType(t);
227
- const e = this.isMobile ? "Mixed" : "Edit";
228
- this.changeMode(e);
273
+ const i = this.isMobile ? "Mixed" : "Edit";
274
+ this.changeMode(i);
229
275
  }
230
276
  /** 撤销编辑 */
231
277
  revoke() {
232
- this.controller instanceof h && this.controller.revoke();
278
+ this.controller instanceof m && this.controller.revoke();
233
279
  }
234
280
  removePolyline(t) {
235
281
  this.model.removePolyline(t);
@@ -238,8 +284,8 @@ class Ke extends H {
238
284
  this.model.removeArea(t);
239
285
  }
240
286
  removePolylineByID(t) {
241
- const e = this.model.getPolylineByID(t);
242
- e && this.model.removePolyline(e);
287
+ const i = this.model.getPolylineByID(t);
288
+ i && this.model.removePolyline(i);
243
289
  }
244
290
  getPolylineByID(t) {
245
291
  return this.model.getPolylineByID(t);
@@ -252,8 +298,8 @@ class Ke extends H {
252
298
  highlightLine(t) {
253
299
  if (this.getCurrentMode() !== "Watch")
254
300
  return !1;
255
- const e = this.model.getLineByID(t);
256
- return e ? (this.controller.highlightLine(e), !0) : !1;
301
+ const i = this.model.getLineByID(t);
302
+ return i ? (this.controller.highlightLine(i), !0) : !1;
257
303
  }
258
304
  clearHighlightLines() {
259
305
  return this.getCurrentMode() !== "Watch" ? !1 : (this.controller.clearHighlightLines(), !0);
@@ -263,20 +309,20 @@ class Ke extends H {
263
309
  */
264
310
  save(t) {
265
311
  var o;
266
- if (!(this.controller instanceof h) && !(this.controller instanceof a))
312
+ if (!(this.controller instanceof m) && !(this.controller instanceof p))
267
313
  return this;
268
- const e = (o = t == null ? void 0 : t.mode) != null ? o : "View", i = this.controller.model.areas;
269
- return this.controller instanceof h ? this.controller.complete() : i.forEach((l) => {
314
+ const i = (o = t == null ? void 0 : t.mode) != null ? o : "View", e = this.controller.model.areas;
315
+ return this.controller instanceof m ? this.controller.complete() : e.forEach((l) => {
270
316
  l.showArea(), this.model.addArea(l);
271
- }), this.changeMode(e), this;
317
+ }), this.changeMode(i), this;
272
318
  }
273
319
  /** Mixed 模式才有用,添加起点 */
274
320
  addStartPoint() {
275
- this.controller instanceof a && this.hook.emit("willChangeState", "watching", "editing");
321
+ this.controller instanceof p && this.hook.emit("willChangeState", "watching", "editing");
276
322
  }
277
323
  /** Mixed 模式才有用,添加终点 */
278
324
  addEndPoint() {
279
- this.controller instanceof a && this.hook.emit("willChangeState", "editing", "watching");
325
+ this.controller instanceof p && this.hook.emit("willChangeState", "editing", "watching");
280
326
  }
281
327
  /** 导出数据 */
282
328
  toJson() {
@@ -290,20 +336,20 @@ class Ke extends H {
290
336
  changeIsMobile(t) {
291
337
  }
292
338
  changeConfigs(t) {
293
- var e, i;
294
- Object.assign(this.config, t), (e = this.controller) == null || e.updateDistanceUI(), (i = this.controller) == null || i.updateAreaUI();
339
+ var i, e;
340
+ Object.assign(this.config, t), (i = this.controller) == null || i.updateDistanceUI(), (e = this.controller) == null || e.updateAreaUI();
295
341
  }
296
342
  /** 设置线段的文本 */
297
- setCustomText(t, e) {
343
+ setCustomText(t, i) {
298
344
  var o;
299
- const i = this.model.getLineByID(t);
300
- if (!i)
345
+ const e = this.model.getLineByID(t);
346
+ if (!e)
301
347
  throw new Error("不存在的线段");
302
- i.setText(e), (o = this.controller) == null || o.updateDistanceUI();
348
+ e.setText(i), (o = this.controller) == null || o.updateDistanceUI();
303
349
  }
304
350
  createControllerParams() {
305
- var i, o;
306
- const t = (i = this.params.openParams) != null ? i : {}, e = (o = this.params.editParams) != null ? o : {};
351
+ var e, o;
352
+ const t = (e = this.params.openParams) != null ? e : {}, i = (o = this.params.editParams) != null ? o : {};
307
353
  return t.isMobile = this.isMobile, {
308
354
  five: this.five,
309
355
  hook: this.hook,
@@ -314,15 +360,15 @@ class Ke extends H {
314
360
  container: this.container,
315
361
  workUtil: this.workUtil,
316
362
  openParams: t,
317
- editParams: e,
363
+ editParams: i,
318
364
  pointSelectorConfig: this.params.pointSelectorConfig,
319
365
  magnifierParams: this.params.magnifierParams,
320
366
  getMeasureType: () => this.currentMeasureType,
321
- mouseGroup: O(m({}, t.crossHairParameter)),
367
+ mouseGroup: O(h({}, t.crossHairParameter)),
322
368
  userDistanceItemCreator: this.params.userDistanceItemCreator
323
369
  };
324
370
  }
325
371
  }
326
372
  export {
327
- Ke as default
373
+ Ge as default
328
374
  };
@@ -1,13 +1,13 @@
1
- var m = Object.defineProperty;
2
- var d = (o, t, i) => t in o ? m(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
3
- var e = (o, t, i) => (d(o, typeof t != "symbol" ? t + "" : t, i), i);
4
- import * as r from "three";
1
+ var l = Object.defineProperty;
2
+ var d = (e, t, o) => t in e ? l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
+ var i = (e, t, o) => (d(e, typeof t != "symbol" ? t + "" : t, o), o);
4
+ import * as s from "three";
5
5
  import { uuid as f } from "../../shared-utils/uuid.js";
6
6
  import { Subscribe as c } from "@realsee/five";
7
7
  import u from "./line.js";
8
8
  import v from "./polygon.js";
9
9
  import { Polyline as y } from "./polyline.js";
10
- import a from "./point.js";
10
+ import n from "./point.js";
11
11
  import { AreaItem as C } from "../utils/dom/areaDom.js";
12
12
  import "../utils/line.js";
13
13
  import "../../shared-utils/five/FiveLine.js";
@@ -25,47 +25,124 @@ import "../../shared-utils/three/getNormal.js";
25
25
  import "../../shared-utils/three/geometryUtil.js";
26
26
  import "hammerjs";
27
27
  import "three/examples/jsm/renderers/CSS3DRenderer";
28
+ import "../../Sculpt/utils/Modules/Global.js";
29
+ import "../../Sculpt/utils/Modules/Cursor.js";
30
+ import "../../Object3DHelperPlugin/Controller.js";
31
+ import "../../base/BasePlugin.js";
32
+ import "../../shared-utils/Subscribe.js";
28
33
  import "../../shared-utils/three/THREESphere.js";
29
34
  import "animejs";
30
- import "../../shared-utils/isNil.js";
35
+ import "../../shared-utils/Utils/FiveUtil.js";
36
+ import "../../shared-utils/Utils/BaseUtil.js";
37
+ import "../../shared-utils/Utils/WorkUtil.js";
38
+ import "../../shared-utils/five/transformPosition.js";
39
+ import "../../shared-utils/five/getFiveModel.js";
40
+ import "../../shared-utils/url/absoluteUrl.js";
31
41
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
32
- class G {
33
- constructor(t, i) {
34
- e(this, "id", f());
35
- e(this, "selected", !1);
36
- e(this, "text");
37
- e(this, "type", "area");
38
- e(this, "lightMesh");
39
- e(this, "areaItem");
40
- e(this, "hook", new c());
41
- e(this, "model");
42
+ import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
43
+ import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
44
+ import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
45
+ import "../../shared-utils/three/boundingBox.js";
46
+ import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
47
+ import "../../shared-utils/Object3DHelper/utils/direction.js";
48
+ import "../../shared-utils/Object3DHelper/Constants/color.js";
49
+ import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
50
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
51
+ import "../../shared-utils/positionToVector3.js";
52
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
53
+ import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
54
+ import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
55
+ import "../../CSS3DRenderPlugin/utils/even.js";
56
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
57
+ import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
58
+ import "../../shared-utils/three/getObjectVisible.js";
59
+ import "../../shared-utils/isNil.js";
60
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
61
+ import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
62
+ import "../../shared-utils/util.js";
63
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
64
+ import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
65
+ import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
66
+ import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
67
+ import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
68
+ import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
69
+ import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
70
+ import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
71
+ import "../../shared-utils/Object3DHelper/Base/BaseController.js";
72
+ import "../../shared-utils/threex/domevents/index.js";
73
+ import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
74
+ import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
75
+ import "../../Sculpt/utils/three/rayOnLine.js";
76
+ import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
77
+ import "../../shared-utils/Object3DHelper/index.js";
78
+ import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
79
+ import "../../shared-utils/math/rad2Deg.js";
80
+ import "../../shared-utils/math/deg2Rad.js";
81
+ import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
82
+ import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
83
+ import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
84
+ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
85
+ import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
86
+ import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
87
+ import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
88
+ import "../../shared-utils/five/fiveModelLoad.js";
89
+ import "../../shared-utils/five/FiveDomEvents.js";
90
+ import "../../shared-utils/five/calculateThreeMouse.js";
91
+ import "../../shared-utils/three/THREERaycaster.js";
92
+ import "../../shared-utils/three/PointSelector/index.js";
93
+ import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
94
+ import "../../shared-utils/three/Magnifier.js";
95
+ import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
96
+ import "../../shared-utils/three/Assets/index.js";
97
+ import "../../shared-utils/three/PointSelector/utils/html.js";
98
+ import "../../shared-utils/five/initialCSS3DRender.js";
99
+ import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
100
+ import "../../Sculpt/Meshes/Line.js";
101
+ import "../../Sculpt/typings/style.js";
102
+ import "../../shared-utils/tag.js";
103
+ import "../../shared-utils/five/vector3ToScreen.js";
104
+ import "../../Sculpt/utils/removeAllTag.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";
109
+ class vi {
110
+ constructor(t, o) {
111
+ i(this, "id", f());
112
+ i(this, "selected", !1);
113
+ i(this, "text");
114
+ i(this, "type", "area");
115
+ i(this, "lightMesh");
116
+ i(this, "areaItem");
117
+ i(this, "hook", new c());
118
+ i(this, "model");
42
119
  /** 多边形mesh */
43
- e(this, "polygon");
120
+ i(this, "polygon");
44
121
  /** 多边形顶点 */
45
- e(this, "points", []);
122
+ i(this, "points", []);
46
123
  /** 多边形前三个点组成的平面,用来使得后面加的点也落在这个平面上 */
47
- e(this, "planeHelper");
124
+ i(this, "planeHelper");
48
125
  /** 多边形边框 */
49
- e(this, "polyline");
126
+ i(this, "polyline");
50
127
  /** 多边形mesh容器 */
51
- e(this, "meshContainer");
128
+ i(this, "meshContainer");
52
129
  /** 多边形dom容器 */
53
- e(this, "domContainer");
54
- e(this, "five");
130
+ i(this, "domContainer");
131
+ i(this, "five");
55
132
  /**
56
133
  * @description: five camera update 时,更新Dom的位置
57
134
  */
58
- e(this, "updateDom", () => {
135
+ i(this, "updateDom", () => {
59
136
  this.five && (this.polyline.lines.forEach((t) => t.distanceItem.update(this.five)), this.areaItem.updateDomPosition(this.five));
60
137
  });
61
- var n;
62
- t && (this.points = t), this.model = i.model, this.polygon = new v(t), this.polyline = new y({ model: i.model }), this.areaItem = new C({
138
+ var r;
139
+ t && (this.points = t), this.model = o.model, this.polygon = new v(t), this.polyline = new y({ model: o.model }), this.areaItem = new C({
63
140
  area: this,
64
- clickCallback: (p, s) => {
65
- const h = p.clientX + "px", l = p.clientY + "px";
66
- this.hook.emit("selected", this, { left: h, top: l });
141
+ clickCallback: (m, p) => {
142
+ const a = m.clientX + "px", h = m.clientY + "px";
143
+ this.hook.emit("selected", this, { left: a, top: h });
67
144
  }
68
- }), this.domContainer = i.domContainer || null, this.meshContainer = i.meshContainer || null, this.five = i.five || null, this.areaItem.appendTo(this.domContainer), (n = this.five) == null || n.on("cameraUpdate", this.updateDom);
145
+ }), this.domContainer = o.domContainer || null, this.meshContainer = o.meshContainer || null, this.five = o.five || null, this.areaItem.appendTo(this.domContainer), (r = this.five) == null || r.on("cameraUpdate", this.updateDom);
69
146
  }
70
147
  /**
71
148
  * @description: 多边形的端点是否闭合
@@ -75,14 +152,14 @@ class G {
75
152
  return this.points.length >= 4 && ((t = this.points.at(0)) == null ? void 0 : t.equals(this.points.at(-1)));
76
153
  }
77
154
  addPoints(t) {
78
- var p;
155
+ var m;
79
156
  this.points = this.points.concat(t);
80
- const i = this.points.at(-2), n = this.points.at(-1);
81
- if (i && n) {
82
- const s = new u(new a(i), new a(n), this.polyline.model);
83
- this.polyline.addLine(s), this.meshContainer.add(s.mesh), this.five && (s.distanceItem.setCanSelect(!1), s.distanceItem.appendTo(this.domContainer), s.distanceItem.update(this.five));
157
+ const o = this.points.at(-2), r = this.points.at(-1);
158
+ if (o && r) {
159
+ const p = new u(new n(o), new n(r), this.polyline.model);
160
+ this.polyline.addLine(p), this.meshContainer.add(p.mesh), this.five && (p.distanceItem.setCanSelect(!1), p.distanceItem.appendTo(this.domContainer), p.distanceItem.update(this.five));
84
161
  }
85
- (p = this.meshContainer) != null && p.children.includes(this.polygon) || this.meshContainer.add(this.polygon), this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five), this.points.length === 3 ? this.planeHelper = new r.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.points.length < 3 && (this.planeHelper = null);
162
+ (m = this.meshContainer) != null && m.children.includes(this.polygon) || this.meshContainer.add(this.polygon), this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five), this.points.length === 3 ? this.planeHelper = new s.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.points.length < 3 && (this.planeHelper = null);
86
163
  }
87
164
  /**
88
165
  * @description: 移除最后一个添加的点
@@ -108,7 +185,7 @@ class G {
108
185
  * @description: 获取一个点投影在当前平面上的点
109
186
  */
110
187
  projectPoint(t) {
111
- return t && (this.planeHelper ? this.planeHelper.projectPoint(t, new r.Vector3()) : t);
188
+ return t && (this.planeHelper ? this.planeHelper.projectPoint(t, new s.Vector3()) : t);
112
189
  }
113
190
  remove() {
114
191
  this.polygon.removeFromParent(), this.areaItem.remove(), this.polyline.lines.forEach((t) => t.remove());
@@ -128,5 +205,5 @@ class G {
128
205
  }
129
206
  }
130
207
  export {
131
- G as default
208
+ vi as default
132
209
  };