@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
@@ -1,13 +1,12 @@
1
1
  var b = Object.defineProperty;
2
- var k = (a, i, t) => i in a ? b(a, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[i] = t;
3
- var e = (a, i, t) => (k(a, typeof i != "symbol" ? i + "" : i, t), t);
4
- import * as r from "three";
2
+ var k = (n, e, t) => e in n ? b(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var i = (n, e, t) => (k(n, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import * as a from "three";
5
5
  import "hammerjs";
6
6
  import { Subscribe as y } from "../../shared-utils/Subscribe.js";
7
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
8
  import "@realsee/five/line";
9
9
  import "../../shared-utils/tag.js";
10
- import "../../Sculpt/utils/Modules/Global.js";
11
10
  import { Object3D as T } from "../../shared-utils/three/core/Object3D.js";
12
11
  import { LineSegments as C } from "../../shared-utils/three/objects/LineSegments.js";
13
12
  import "../../shared-utils/three/THREESphere.js";
@@ -24,153 +23,80 @@ import "../../shared-utils/Utils/FiveUtil.js";
24
23
  import "../../shared-utils/Utils/BaseUtil.js";
25
24
  import "../../shared-utils/Utils/WorkUtil.js";
26
25
  import "../../shared-utils/five/transformPosition.js";
27
- import "../../Sculpt/utils/Modules/Cursor.js";
28
- import "../../Object3DHelperPlugin/Controller.js";
29
- import "../../base/BasePlugin.js";
30
- import "../../shared-utils/url/absoluteUrl.js";
31
26
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
32
- import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
33
- import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
34
- import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
35
- import "../../shared-utils/three/IObject3D.js";
36
- import "../../shared-utils/three/boundingBox.js";
37
- import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
38
- import "../../shared-utils/Object3DHelper/utils/direction.js";
39
- import "../../shared-utils/Object3DHelper/Constants/color.js";
40
- import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
41
- import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
42
- import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
43
- import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
44
- import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
45
- import "../../CSS3DRenderPlugin/utils/even.js";
46
- import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
47
- import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
48
- import "../../shared-utils/three/centerPoint.js";
49
- import "../../shared-utils/three/getObjectVisible.js";
50
- import "../../shared-utils/isNil.js";
51
- import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
52
- import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
53
- import "../../shared-utils/util.js";
54
- import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
55
- import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
56
- import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
57
- import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
58
- import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
59
- import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
60
- import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
61
- import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
62
- import "../../shared-utils/Object3DHelper/Base/BaseController.js";
63
- import "../../shared-utils/threex/domevents/index.js";
64
- import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
65
- import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
66
- import "../../Sculpt/utils/three/rayOnLine.js";
67
- import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
68
- import "../../shared-utils/Object3DHelper/index.js";
69
- import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
70
- import "../../shared-utils/math/rad2Deg.js";
71
- import "../../shared-utils/math/deg2Rad.js";
72
- import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
73
- import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
74
- import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
75
- import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
76
- import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
77
- import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
78
- import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
79
- import "../../shared-utils/five/fiveModelLoad.js";
80
- import "../../shared-utils/five/FiveDomEvents.js";
81
- import "../../shared-utils/five/calculateThreeMouse.js";
82
- import "../../shared-utils/three/THREERaycaster.js";
83
- import "../../shared-utils/three/PointSelector/index.js";
84
- import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
85
- import "../../shared-utils/three/Magnifier.js";
86
- import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
87
- import "../../shared-utils/three/Assets/index.js";
88
- import "../../shared-utils/three/PointSelector/utils/html.js";
89
- import "../../shared-utils/five/initialCSS3DRender.js";
90
- import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
91
- import "../../Sculpt/Meshes/Line.js";
92
- import "../../Sculpt/typings/style.js";
93
- import "../../shared-utils/five/FiveLine.js";
94
- import "../../Sculpt/utils/removeAllTag.js";
95
- import "../../Sculpt/utils/Meshes/getLengthHTML.js";
96
- import "../../shared-utils/three/applyObjectMatrixWorld.js";
97
- import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
98
- import "../../shared-utils/isTouchDevice.js";
99
- import "../../shared-utils/five/getPosition.js";
100
- import "../../shared-utils/five/getRaycasterByNdcPosition.js";
101
27
  import "../../shared-utils/animationFrame/index.js";
102
28
  import "../../vendor/svelte/internal/index.js";
103
29
  import "../../components/AreaLabel/Assets/roomLabelBg.js";
104
30
  class P extends T {
105
31
  constructor(t) {
106
32
  super();
107
- e(this, "areaMakerItem");
33
+ i(this, "areaMakerItem");
108
34
  this.areaMakerItem = t;
109
35
  }
110
- raycast(t, o) {
111
- this.areaMakerItem.makerObject.raycast(t, o);
36
+ raycast(t, s) {
37
+ this.areaMakerItem.makerObject.raycast(t, s);
112
38
  }
113
39
  }
114
- class Ti {
115
- constructor(i, t) {
116
- e(this, "id");
40
+ class tt {
41
+ constructor(e, t) {
42
+ i(this, "id");
117
43
  /** 标注名称 */
118
- e(this, "name", "");
44
+ i(this, "name", "");
119
45
  /** 标注几何体 */
120
- e(this, "makerObject");
46
+ i(this, "makerObject");
121
47
  /** 标注几何体的边框 */
122
- e(this, "outline");
48
+ i(this, "outline");
123
49
  /** 标注底面 Y 坐标 */
124
- e(this, "bottomY");
50
+ i(this, "bottomY");
125
51
  /** 标注透明度 */
126
- e(this, "opacity");
52
+ i(this, "opacity");
127
53
  /** 标注高度 */
128
- e(this, "height");
54
+ i(this, "height");
129
55
  /** 标注所在楼层 */
130
- e(this, "floorIndex");
56
+ i(this, "floorIndex");
131
57
  /** 标注底面形状 */
132
- e(this, "shape");
58
+ i(this, "shape");
133
59
  /** 是否被挂载 */
134
- e(this, "mounted", !1);
60
+ i(this, "mounted", !1);
135
61
  /** 查询问题使用的调试对象 */
136
- e(this, "checkMsg", {
62
+ i(this, "checkMsg", {
137
63
  /** 当标注没有展示时,可以通过这个字段查看原因 */
138
64
  checkVisibleMsg: "",
139
65
  /** 当标注标签没有展示时,可以通过这个字段查看原因 */
140
66
  checkTagVisibleMsg: ""
141
67
  });
142
68
  /** 模型容器 */
143
- e(this, "modelGroup");
69
+ i(this, "modelGroup");
144
70
  /** 标注是否可见 */
145
- e(this, "visible", !0);
71
+ i(this, "visible", !0);
146
72
  // ==================== 标签相关 ====================
147
73
  /** 标注标签实例 */
148
- e(this, "tagApp");
74
+ i(this, "tagApp");
149
75
  /** 标注标签是否可见 */
150
- e(this, "tagVisible", null);
76
+ i(this, "tagVisible", null);
151
77
  /** 标注标签的世界坐标 */
152
- e(this, "tagPosition", new r.Vector3());
78
+ i(this, "tagPosition", new a.Vector3());
153
79
  /** 标注标签的 NDC 坐标 */
154
- e(this, "tagNDCPosition", new r.Vector3());
80
+ i(this, "tagNDCPosition", new a.Vector3());
155
81
  /** 标注标签的 transform */
156
- e(this, "tagTransform", { left: 0, top: 0 });
82
+ i(this, "tagTransform", { left: 0, top: 0 });
157
83
  /** 标注标签的显示层级 */
158
- e(this, "tagZIndex", 0);
84
+ i(this, "tagZIndex", 0);
159
85
  /** 标注实例的事件处理器 */
160
- e(this, "hooks", new y());
86
+ i(this, "hooks", new y());
161
87
  /** 自定义 Dom */
162
- e(this, "itemRenderer");
88
+ i(this, "itemRenderer");
163
89
  /** 数据 */
164
- e(this, "data");
90
+ i(this, "data");
165
91
  /** Plugin 实例 */
166
- e(this, "plugin");
92
+ i(this, "plugin");
167
93
  /** 标注透明度动画 */
168
- e(this, "opacityAnime");
94
+ i(this, "opacityAnime");
169
95
  /** 是否在容器 resize 动画中 */
170
- e(this, "isInContainerResizeAnimation", !1);
96
+ i(this, "isInContainerResizeAnimation", !1);
171
97
  /** 监听容器 resize 的计时器 id,用于判断 resize 过程是否结束 */
172
- e(this, "containerResizeTimeoutID", null);
173
- e(this, "resizeObserver");
98
+ i(this, "containerResizeTimeoutID", null);
99
+ i(this, "resizeObserver");
174
100
  /** 显示标注 */
175
101
  // public show() {
176
102
  // return this.doOpacityAnime({
@@ -190,111 +116,111 @@ class Ti {
190
116
  // })
191
117
  // }
192
118
  /** 透明度动画 */
193
- e(this, "doOpacityAnime", (i) => {
194
- var p;
195
- (p = this.opacityAnime) == null || p.dispose();
196
- const t = i.duration, [o, s] = i.makerObjectOpacity, [m, n] = i.outlineOpacity;
119
+ i(this, "doOpacityAnime", (e) => {
120
+ var l;
121
+ (l = this.opacityAnime) == null || l.dispose();
122
+ const t = e.duration, [s, o] = e.makerObjectOpacity, [h, r] = e.outlineOpacity;
197
123
  if (t === 0) {
198
- this.makerObject.material.opacity = s, this.outline.material.opacity = n;
124
+ this.makerObject.material.opacity = o, this.outline.material.opacity = r;
199
125
  return;
200
126
  }
201
- return new Promise((h) => {
202
- this.opacityAnime = new O({ makerObjectOpacity: o, outlineOpacity: m }).to({
203
- makerObjectOpacity: s,
204
- outlineOpacity: n
205
- }).onUpdate(({ makerObjectOpacity: l, outlineOpacity: c }) => {
206
- this.makerObject.material.opacity = l, this.outline.material.opacity = c, this.plugin.five.needsRender = !0;
207
- }).onComplete(() => h(!0)).onDispose(() => {
208
- this.makerObject.material.opacity = s, this.outline.material.opacity = n, this.plugin.five.needsRender = !0, h(!1);
127
+ return new Promise((m) => {
128
+ this.opacityAnime = new O({ makerObjectOpacity: s, outlineOpacity: h }).to({
129
+ makerObjectOpacity: o,
130
+ outlineOpacity: r
131
+ }).onUpdate(({ makerObjectOpacity: p, outlineOpacity: c }) => {
132
+ this.makerObject.material.opacity = p, this.outline.material.opacity = c, this.plugin.five.needsRender = !0;
133
+ }).onComplete(() => m(!0)).onDispose(() => {
134
+ this.makerObject.material.opacity = o, this.outline.material.opacity = r, this.plugin.five.needsRender = !0, m(!1);
209
135
  }).play();
210
136
  });
211
137
  });
212
138
  /** 插件 Config 变化时更新自身 depthTest */
213
- e(this, "onPluginConfigChange", (i) => {
214
- this.makerObject.material.depthTest = i.config.modelDepthTest, this.outline.material.depthTest = i.config.modelDepthTest, this.plugin.five.needsRender = !0;
139
+ i(this, "onPluginConfigChange", (e) => {
140
+ this.makerObject.material.depthTest = e.config.modelDepthTest, this.outline.material.depthTest = e.config.modelDepthTest, this.plugin.five.needsRender = !0;
215
141
  });
216
142
  /** 插件整体可见性变化时,需要更新自身可见性 */
217
- e(this, "onPluginStateChange", () => {
143
+ i(this, "onPluginStateChange", () => {
218
144
  this.updateVisible(), this.updateTagVisible();
219
145
  });
220
146
  /** 更新标注可见性 */
221
- e(this, "updateVisible", () => {
222
- var s;
223
- const { result: i, msg: t } = this.checkVisible();
224
- if (this.checkMsg.checkVisibleMsg = t, this.visible === i)
147
+ i(this, "updateVisible", () => {
148
+ var o;
149
+ const { result: e, msg: t } = this.checkVisible();
150
+ if (this.checkMsg.checkVisibleMsg = t, this.visible === e)
225
151
  return;
226
- this.visible = i;
227
- const o = (s = this.data.object_data.visible) != null ? s : !0;
228
- this.modelGroup.visible = i && o, this.plugin.five.needsRender = !0;
152
+ this.visible = e;
153
+ const s = (o = this.data.object_data.visible) != null ? o : !0;
154
+ this.modelGroup.visible = e && s, this.plugin.five.needsRender = !0;
229
155
  });
230
156
  /** 检测标注是否可见 */
231
- e(this, "checkVisible", () => {
157
+ i(this, "checkVisible", () => {
232
158
  if (!this.plugin.state.visible)
233
159
  return { result: !1, msg: "插件不可见" };
234
160
  const t = this.plugin.fiveUtil.model.shownFloor;
235
161
  return t === null || t === this.floorIndex ? { result: !0, msg: "" } : { result: !1, msg: `模型高亮楼层不符合展示条件, 当前高亮楼层为:${t}` };
236
162
  });
237
163
  /** 更新标注标签 */
238
- e(this, "updateTag", () => {
164
+ i(this, "updateTag", () => {
239
165
  this.tagApp && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
240
166
  });
241
167
  /** 更新标注标签的 NDC Position */
242
- e(this, "updateTagNDCPosition", () => {
168
+ i(this, "updateTagNDCPosition", () => {
243
169
  const t = this.tagPosition.clone().project(this.plugin.five.camera);
244
170
  this.tagNDCPosition.copy(t);
245
171
  });
246
172
  /** 更新标注标签的 transform */
247
- e(this, "updateTagDomTransform", () => {
248
- var s;
249
- const i = this.tagNDCPosition, t = Math.round((i.x + 1) / 2 * this.plugin.tagDomContainer.clientWidth), o = Math.round((-i.y + 1) / 2 * this.plugin.tagDomContainer.clientHeight);
250
- this.tagTransform.left === t && this.tagTransform.top === o || (this.tagTransform = { left: t, top: o }, (s = this.tagApp) == null || s.$set({ transform: `translate(${t}px, ${o}px)` }));
173
+ i(this, "updateTagDomTransform", () => {
174
+ var o;
175
+ const e = this.tagNDCPosition, t = Math.round((e.x + 1) / 2 * this.plugin.tagDomContainer.clientWidth), s = Math.round((-e.y + 1) / 2 * this.plugin.tagDomContainer.clientHeight);
176
+ this.tagTransform.left === t && this.tagTransform.top === s || (this.tagTransform = { left: t, top: s }, (o = this.tagApp) == null || o.$set({ transform: `translate(${t}px, ${s}px)` }));
251
177
  });
252
178
  /** 更新标注标签可见性 */
253
- e(this, "updateTagVisible", () => {
254
- var o;
255
- const { result: i, msg: t } = this.checkTagVisible();
256
- this.checkMsg.checkTagVisibleMsg = t, this.tagVisible !== i && (this.tagVisible = i, this.tagApp && (this.tagVisible ? this.hooks.emit("tagShow") : this.hooks.emit("tagHide"), (o = this.tagApp) == null || o.$set({ visible: i })));
179
+ i(this, "updateTagVisible", () => {
180
+ var s;
181
+ const { result: e, msg: t } = this.checkTagVisible();
182
+ this.checkMsg.checkTagVisibleMsg = t, this.tagVisible !== e && (this.tagVisible = e, this.tagApp && (this.tagVisible ? this.hooks.emit("tagShow") : this.hooks.emit("tagHide"), (s = this.tagApp) == null || s.$set({ visible: e })));
257
183
  });
258
184
  /** 检测标注标签是否可见 */
259
- e(this, "checkTagVisible", () => {
185
+ i(this, "checkTagVisible", () => {
260
186
  if (!this.visible)
261
187
  return { result: !1, msg: "标注整体不可见" };
262
188
  if (this.isInContainerResizeAnimation)
263
189
  return { result: !1, msg: "处于容器 resize 动画中" };
264
- const t = this.plugin.five, o = t.camera.position.clone();
265
- d.set(o.clone(), this.tagPosition.clone().sub(o).normalize());
266
- const [s] = this.plugin.fiveUtil.model.intersectRaycaster(d), m = this.tagPosition.distanceTo(t.camera.position);
267
- if (s && s.distance + 0.1 < m)
190
+ const t = this.plugin.five, s = t.camera.position.clone();
191
+ d.set(s.clone(), this.tagPosition.clone().sub(s).normalize());
192
+ const [o] = this.plugin.fiveUtil.model.intersectRaycaster(d), h = this.tagPosition.distanceTo(t.camera.position);
193
+ if (o && o.distance + 0.1 < h)
268
194
  return { result: !1, msg: "标注标签被 Five 模型遮挡" };
269
- const n = this.tagNDCPosition;
270
- return Math.abs(n.x) > 1.2 || Math.abs(n.y) > 1.2 || Math.abs(n.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
195
+ const r = this.tagNDCPosition;
196
+ return Math.abs(r.x) > 1.2 || Math.abs(r.y) > 1.2 || Math.abs(r.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
271
197
  });
272
198
  /** 相机位姿发生变化时,更新标签 */
273
- e(this, "onFiveCameraUpdate", () => {
199
+ i(this, "onFiveCameraUpdate", () => {
274
200
  this.tagApp && this.visible && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
275
201
  });
276
202
  /** tag container DOM 发生 resize */
277
- e(this, "onContainerResize", () => {
203
+ i(this, "onContainerResize", () => {
278
204
  this.isInContainerResizeAnimation === !1 && (this.isInContainerResizeAnimation = !0, this.updateTag());
279
205
  const t = () => {
280
206
  this.isInContainerResizeAnimation = !1, this.containerResizeTimeoutID = null, this.updateTag();
281
207
  };
282
208
  this.containerResizeTimeoutID && clearTimeout(this.containerResizeTimeoutID), this.containerResizeTimeoutID = setTimeout(t, 100);
283
209
  });
284
- var h, l, c, g;
285
- const o = t.object_data, s = o.bottom_y, m = o.height, n = new r.Color((h = o.color) != null ? h : "#FFFFFF"), p = (l = o.opacity) != null ? l : 0.4;
286
- this.data = t, this.id = t.id, this.name = (c = t.name) != null ? c : "", this.plugin = i, this.height = m, this.bottomY = s, this.opacity = p, this.shape = new r.Shape().fromJSON(o.shape), this.floorIndex = t.floor_index, this.makerObject = new r.Mesh(f(this.shape, m), j(n, p)), u(this.makerObject, s), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new C(
287
- new r.EdgesGeometry(this.makerObject.geometry),
288
- new r.LineBasicMaterial({ color: n, transparent: !0 })
289
- ), u(this.outline, s), this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.setHeight(m), this.modelGroup = new P(this), this.modelGroup.visible = (g = o.visible) != null ? g : !0;
210
+ var m, p, c, g;
211
+ const s = t.object_data, o = s.bottom_y, h = s.height, r = new a.Color((m = s.color) != null ? m : "#FFFFFF"), l = (p = s.opacity) != null ? p : 0.4;
212
+ this.data = t, this.id = t.id, this.name = (c = t.name) != null ? c : "", this.plugin = e, this.height = h, this.bottomY = o, this.opacity = l, this.shape = new a.Shape().fromJSON(s.shape), this.floorIndex = t.floor_index, this.makerObject = new a.Mesh(f(this.shape, h), j(r, l)), u(this.makerObject, o), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new C(
213
+ new a.EdgesGeometry(this.makerObject.geometry),
214
+ new a.LineBasicMaterial({ color: r, transparent: !0 })
215
+ ), u(this.outline, o), this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.setHeight(h), this.modelGroup = new P(this), this.modelGroup.visible = (g = s.visible) != null ? g : !0;
290
216
  }
291
217
  /** 挂载标注 */
292
218
  mount() {
293
219
  if (this.mounted)
294
220
  return;
295
221
  this.mounted = !0, this.updateVisible(), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.modelGroup.add(this.makerObject, this.outline);
296
- const i = !!this.name, t = this.plugin.tagDomContainer;
297
- i && (this.tagApp = new v({
222
+ const e = !!this.name, t = this.plugin.tagDomContainer;
223
+ e && (this.tagApp = new v({
298
224
  target: t,
299
225
  props: {
300
226
  rendererData: this.data,
@@ -302,39 +228,39 @@ class Ti {
302
228
  visible: this.tagVisible,
303
229
  rendererIfNeed: this.itemRenderer,
304
230
  transform: `translate(${this.tagTransform.left}px, ${this.tagTransform.top}px)`,
305
- onClick: (o) => this.hooks.emit("tagClick", { target: this, nativeEvent: o })
231
+ onClick: (s) => this.hooks.emit("tagClick", { target: this, nativeEvent: s })
306
232
  }
307
233
  }), this.updateTag()), this.plugin.five.needsRender = !0, this.plugin.hooks.on("stateChange", this.onPluginStateChange), this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate), this.resizeObserver = V(this.onContainerResize, t), this.resizeObserver.observe();
308
234
  }
309
235
  /** 卸载标注 */
310
236
  unmount() {
311
- var i, t;
312
- this.mounted && (this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (i = this.tagApp) == null || i.$destroy(), this.tagApp = null, this.plugin.hooks.off("stateChange", this.onPluginStateChange), this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate), (t = this.resizeObserver) == null || t.unobserve());
237
+ var e, t;
238
+ this.mounted && (this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (e = this.tagApp) == null || e.$destroy(), this.tagApp = null, this.plugin.hooks.off("stateChange", this.onPluginStateChange), this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate), (t = this.resizeObserver) == null || t.unobserve());
313
239
  }
314
240
  /** 更改标注透明度
315
241
  * @param opacity 标注透明度,范围:0-1
316
242
  */
317
- setOpacity(i) {
243
+ setOpacity(e) {
318
244
  var t;
319
- this.opacity = i, (t = this.opacityAnime) == null || t.dispose(), this.makerObject.material.opacity = i, this.plugin.five.needsRender = !0;
245
+ this.opacity = e, (t = this.opacityAnime) == null || t.dispose(), this.makerObject.material.opacity = e, this.plugin.five.needsRender = !0;
320
246
  }
321
247
  /** 更改标注颜色
322
248
  * @param color 标注颜色,支持 hex
323
249
  * @example setColor('#FF0000')
324
250
  */
325
- setColor(i) {
326
- const t = new r.Color(i);
251
+ setColor(e) {
252
+ const t = new a.Color(e);
327
253
  this.makerObject.material.color = t, this.outline.material.color = t, this.plugin.five.needsRender = !0;
328
254
  }
329
255
  /** 更改标注高度
330
256
  * @param height 标注高度,单位:米
331
257
  */
332
- setHeight(i) {
333
- if (i <= 0)
258
+ setHeight(e) {
259
+ if (e <= 0)
334
260
  throw new Error("高度必须大于 0");
335
- this.height = i, this.makerObject.geometry = f(this.shape, i), this.outline.geometry = new r.EdgesGeometry(this.makerObject.geometry);
336
- const t = this.shape.extractPoints(10).shape.slice(0, -1), o = M(t), s = new r.Vector3(o.x, o.y, i);
337
- u(s, this.bottomY), this.tagPosition.copy(s), this.updateTag(), this.plugin.five.needsRender = !0;
261
+ this.height = e, this.makerObject.geometry = f(this.shape, e), this.outline.geometry = new a.EdgesGeometry(this.makerObject.geometry);
262
+ const t = this.shape.extractPoints(10).shape.slice(0, -1), s = M(t), o = new a.Vector3(s.x, s.y, e);
263
+ u(o, this.bottomY), this.tagPosition.copy(o), this.updateTag(), this.plugin.five.needsRender = !0;
338
264
  }
339
265
  /** 更改标注标签的显示层级
340
266
  * @description 为什么需要这个方法
@@ -344,28 +270,28 @@ class Ti {
344
270
  * - 标签 A <- 标签 B <- 相机: 标签 A 在标签 B 的后面
345
271
  * 但是当前元素是无法感知到这种变化的,所以需要通过父元素调用这个方法来更新标签的层级。
346
272
  */
347
- setTagZIndex(i) {
273
+ setTagZIndex(e) {
348
274
  var t;
349
- this.tagZIndex !== i && ((t = this.tagApp) == null || t.$set({ zIndex: i }));
275
+ this.tagZIndex !== e && ((t = this.tagApp) == null || t.$set({ zIndex: e }));
350
276
  }
351
277
  }
352
- function f(a, i) {
353
- return new r.ExtrudeBufferGeometry(a, {
354
- depth: i,
278
+ function f(n, e) {
279
+ return new a.ExtrudeBufferGeometry(n, {
280
+ depth: e,
355
281
  bevelEnabled: !1
356
282
  });
357
283
  }
358
- function j(a, i) {
359
- return new r.MeshBasicMaterial({
360
- color: a,
361
- opacity: i,
284
+ function j(n, e) {
285
+ return new a.MeshBasicMaterial({
286
+ color: n,
287
+ opacity: e,
362
288
  transparent: !0
363
289
  });
364
290
  }
365
- function u(a, i) {
366
- const t = new r.Matrix4(), o = new r.Matrix4().makeRotationX(Math.PI / 2), s = new r.Matrix4().makeTranslation(0, 0, -i), m = new r.Matrix4().makeScale(1, 1, -1);
367
- t.multiply(o), t.multiply(s), t.multiply(m), a.applyMatrix4(t);
291
+ function u(n, e) {
292
+ const t = new a.Matrix4(), s = new a.Matrix4().makeRotationX(Math.PI / 2), o = new a.Matrix4().makeTranslation(0, 0, -e), h = new a.Matrix4().makeScale(1, 1, -1);
293
+ t.multiply(s), t.multiply(o), t.multiply(h), n.applyMatrix4(t);
368
294
  }
369
295
  export {
370
- Ti as AreaMakerItem
296
+ tt as AreaMakerItem
371
297
  };
@@ -2,15 +2,15 @@ var R = Object.defineProperty, F = Object.defineProperties;
2
2
  var C = Object.getOwnPropertyDescriptors;
3
3
  var f = Object.getOwnPropertySymbols;
4
4
  var O = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
5
- var d = (o, i, e) => i in o ? R(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e, a = (o, i) => {
5
+ var a = (s, i, e) => i in s ? R(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e, p = (s, i) => {
6
6
  for (var e in i || (i = {}))
7
- O.call(i, e) && d(o, e, i[e]);
7
+ O.call(i, e) && a(s, e, i[e]);
8
8
  if (f)
9
9
  for (var e of f(i))
10
- S.call(i, e) && d(o, e, i[e]);
11
- return o;
12
- }, l = (o, i) => F(o, C(i));
13
- var m = (o, i, e) => (d(o, typeof i != "symbol" ? i + "" : i, e), e);
10
+ S.call(i, e) && a(s, e, i[e]);
11
+ return s;
12
+ }, l = (s, i) => F(s, C(i));
13
+ var n = (s, i, e) => (a(s, typeof i != "symbol" ? i + "" : i, e), e);
14
14
  import { CSS3DRender as j } from "./utils/three/CSS3DRender.js";
15
15
  import x from "./utils/generateBehindFiveElement.js";
16
16
  import "three";
@@ -18,7 +18,6 @@ import "hammerjs";
18
18
  import "three/examples/jsm/renderers/CSS3DRenderer";
19
19
  import "@realsee/five/line";
20
20
  import "../shared-utils/tag.js";
21
- import "../Sculpt/utils/Modules/Global.js";
22
21
  import "../shared-utils/three/THREESphere.js";
23
22
  import "animejs";
24
23
  import { absoluteUrl as P } from "../shared-utils/url/absoluteUrl.js";
@@ -46,72 +45,16 @@ import "../shared-utils/Utils/BaseUtil.js";
46
45
  import "../shared-utils/Utils/WorkUtil.js";
47
46
  import "../shared-utils/five/transformPosition.js";
48
47
  import "../shared-utils/three/temp.js";
49
- import "../Sculpt/utils/Modules/Cursor.js";
50
- import "../Object3DHelperPlugin/Controller.js";
51
- import "../base/BasePlugin.js";
52
- import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
53
- import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
54
- import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
55
- import "../shared-utils/three/IObject3D.js";
56
- import "../shared-utils/three/boundingBox.js";
57
- import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
58
- import "../shared-utils/Object3DHelper/utils/direction.js";
59
- import "../shared-utils/Object3DHelper/Constants/color.js";
60
- import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
61
- import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
62
- import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
63
- import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
64
- import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
65
- import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
66
- import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
67
- import "../shared-utils/Object3DHelper/Controller/MoveController.js";
68
- import "../shared-utils/Object3DHelper/Base/BaseController.js";
69
- import "../shared-utils/threex/domevents/index.js";
70
- import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
71
- import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
72
- import "../Sculpt/utils/three/rayOnLine.js";
73
- import "../Object3DHelperPlugin/FiveControllerWrapper.js";
74
- import "../shared-utils/Object3DHelper/index.js";
75
- import "../shared-utils/Object3DHelper/Controller/RotateController.js";
76
- import "../shared-utils/math/rad2Deg.js";
77
- import "../shared-utils/math/deg2Rad.js";
78
- import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
79
- import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
80
- import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
81
- import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
82
- import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
83
- import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
84
- import "../shared-utils/five/FiveDomEvents.js";
85
- import "../shared-utils/five/calculateThreeMouse.js";
86
- import "../shared-utils/three/THREERaycaster.js";
87
- import "../shared-utils/three/PointSelector/index.js";
88
- import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
89
- import "../shared-utils/three/Magnifier.js";
90
- import "../shared-utils/three/PointSelector/utils/PointHelper.js";
91
- import "../shared-utils/three/Assets/index.js";
92
- import "../shared-utils/three/PointSelector/utils/html.js";
93
- import "../shared-utils/five/initialCSS3DRender.js";
94
- import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
95
- import "../Sculpt/Meshes/Line.js";
96
- import "../Sculpt/typings/style.js";
97
- import "../shared-utils/five/FiveLine.js";
98
- import "../Sculpt/utils/removeAllTag.js";
99
- import "../Sculpt/utils/Meshes/getLengthHTML.js";
100
- import "../shared-utils/three/applyObjectMatrixWorld.js";
101
- import "./utils/three/CSS3DSprite.js";
102
- import "../shared-utils/isTouchDevice.js";
103
- import "../shared-utils/five/getPosition.js";
104
- import "../shared-utils/five/getRaycasterByNdcPosition.js";
105
48
  const b = "v2.0.1", E = `CSS3DRenderPlugin@${b}`;
106
- class ct extends j {
49
+ class pe extends j {
107
50
  constructor(e) {
108
51
  super();
109
- m(this, "five");
110
- m(this, "behindFiveContainer");
111
- m(this, "frontFiveContainer");
112
- m(this, "VERSION", b);
113
- m(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
114
- m(this, "created3DElementResults", []);
52
+ n(this, "five");
53
+ n(this, "behindFiveContainer");
54
+ n(this, "frontFiveContainer");
55
+ n(this, "VERSION", b);
56
+ n(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
57
+ n(this, "created3DElementResults", []);
115
58
  /**
116
59
  * @description 根据传入的四个点位创建一个 3d dom容器,可以通过ReactDom.render()的方式将react组件放到容器中
117
60
  * @param { Vector3Position[] } points 矩形四个点坐标
@@ -147,37 +90,37 @@ class ct extends j {
147
90
  * } | void
148
91
  * ```
149
92
  */
150
- m(this, "create3DDomContainer", (e, t) => {
93
+ n(this, "create3DDomContainer", (e, t) => {
151
94
  if (this.state.disposed)
152
95
  return;
153
- const p = (() => {
154
- var n;
96
+ const o = (() => {
97
+ var m;
155
98
  (t == null ? void 0 : t.dpr) !== void 0 && console.warn(`${E}: please use "config.devicePixelRatio" replace "config.dpr"`);
156
- const s = {
99
+ const d = {
157
100
  ratio: 216e-5,
158
- devicePixelRatio: (n = t == null ? void 0 : t.dpr) != null ? n : 1,
101
+ devicePixelRatio: (m = t == null ? void 0 : t.dpr) != null ? m : 1,
159
102
  mode: "front",
160
103
  autoRender: !0,
161
104
  wrapperStyle: {}
162
105
  };
163
- return Object.assign(s, t, (t == null ? void 0 : t.mode) === "behind" ? { scene: this.five.scene } : void 0);
164
- })(), { autoRender: h } = p;
165
- p.mode === "behind" && p.behindFiveContainer && (this.behindFiveContainer = p.behindFiveContainer);
166
- const r = this.create3DElement(this.five.camera, e, l(a({}, p), { autoRender: !1 }));
106
+ return Object.assign(d, t, (t == null ? void 0 : t.mode) === "behind" ? { scene: this.five.scene } : void 0);
107
+ })(), { autoRender: h } = o;
108
+ o.mode === "behind" && o.behindFiveContainer && (this.behindFiveContainer = o.behindFiveContainer);
109
+ const r = this.create3DElement(this.five.camera, e, l(p({}, o), { autoRender: !1 }));
167
110
  if (!r)
168
111
  return;
169
112
  const D = r.dispose;
170
113
  r.dispose = () => (this.created3DElementResults.includes(r) && this.created3DElementResults.splice(this.created3DElementResults.indexOf(r), 1), D());
171
114
  const c = () => {
172
- var n, v;
173
- const s = r.css3DObject.mode === "front" ? (v = this.frontFiveContainer) != null ? v : (n = this.five.getElement()) == null ? void 0 : n.parentElement : this.getBehindFiveElement();
174
- if (!s)
175
- return console.error(`${E}: wrapper is ${s}; mode is ${r.css3DObject.mode}`);
176
- r.appendToElement(s), r.render(), this.created3DElementResults.push(r);
115
+ var m, v;
116
+ const d = r.css3DObject.mode === "front" ? (v = this.frontFiveContainer) != null ? v : (m = this.five.getElement()) == null ? void 0 : m.parentElement : this.getBehindFiveElement();
117
+ if (!d)
118
+ return console.error(`${E}: wrapper is ${d}; mode is ${r.css3DObject.mode}`);
119
+ r.appendToElement(d), r.render(), this.created3DElementResults.push(r);
177
120
  }, u = () => {
178
121
  r.css3DObject.mode === "front" && c(), r.css3DObject.mode === "behind" && w(this.five).then(() => c());
179
122
  };
180
- return h && u(), l(a({}, r), { render: h ? void 0 : u });
123
+ return h && u(), l(p({}, r), { render: h ? void 0 : u });
181
124
  });
182
125
  this.five = e;
183
126
  }
@@ -216,5 +159,5 @@ class ct extends j {
216
159
  }
217
160
  export {
218
161
  E as PLUGIN_NAME,
219
- ct as default
162
+ pe as default
220
163
  };