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