@realsee/dnalogel 3.77.5 → 3.77.7

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 (145) hide show
  1. package/CHANGELOG.md +17 -11
  2. package/dist/PanoTagPlugin/controller/Tag/BaseTag.d.ts +5 -1
  3. package/dist/PanoTagPlugin/controller/Tag/BoxTag.d.ts +119 -0
  4. package/dist/PanoTagPlugin/controller/Tag/MaskTag.d.ts +257 -0
  5. package/dist/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +10 -0
  6. package/dist/PanoTagPlugin/controller/Tag/PolygonTag.d.ts +112 -0
  7. package/dist/PanoTagPlugin/controller/TagRender.d.ts +1 -1
  8. package/dist/PanoTagPlugin/controller/index.d.ts +55 -2
  9. package/dist/PanoTagPlugin/typings/controller.d.ts +10 -0
  10. package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +8 -3
  11. package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +50 -1
  12. package/dist/PanoTagPlugin/utils/sculptDataToBoxPosition.d.ts +6 -0
  13. package/dist/PanoTagPlugin/utils/tag/tagCheck.d.ts +6 -0
  14. package/dist/PanoTagPlugin/utils/tagPosition.d.ts +12 -3
  15. package/dist/Sculpt/Meshes/Line.d.ts +4 -0
  16. package/dist/index.cjs.js +178 -95
  17. package/dist/index.js +11378 -9801
  18. package/dist/index.umd.js +173 -90
  19. package/dist/shared-utils/five/getFiveFromParentChain.d.ts +7 -0
  20. package/libs/AreaMakerPlugin/Controller.js +3 -2
  21. package/libs/AreaMakerPlugin/index.js +3 -2
  22. package/libs/AreaMakerPlugin/utils/Item.js +3 -2
  23. package/libs/CSS3DRenderPlugin/Controller.js +3 -2
  24. package/libs/CSS3DRenderPlugin/index.js +6 -5
  25. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +39 -38
  26. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +10 -9
  27. package/libs/CruisePlugin/BaseController.js +5 -4
  28. package/libs/CruisePlugin/Move.js +8 -2
  29. package/libs/CruisePlugin/Work.js +8 -2
  30. package/libs/CruisePlugin/index.js +12 -6
  31. package/libs/CurrentPanoImagePlugin/Controller.js +15 -14
  32. package/libs/CurrentPanoImagePlugin/index.js +4 -3
  33. package/libs/GuideLinePlugin/Controller.js +10 -4
  34. package/libs/GuideLinePlugin/GuideLineItem.js +8 -2
  35. package/libs/GuideLinePlugin/GuideLineModeItem.js +8 -2
  36. package/libs/GuideLinePlugin/index.js +12 -6
  37. package/libs/MeasurePlugin/Controller.js +11 -10
  38. package/libs/MeasurePlugin/index.js +5 -4
  39. package/libs/MeasurePlugin/utils/MeasureMesh.js +3 -2
  40. package/libs/ModelChassisCompassPlugin/Plugin.js +4 -3
  41. package/libs/ModelChassisCompassPlugin/index.js +1 -0
  42. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +6 -5
  43. package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
  44. package/libs/ModelMakerPlugin/Controller.js +3 -2
  45. package/libs/ModelMakerPlugin/index.js +3 -2
  46. package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
  47. package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
  48. package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
  49. package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
  50. package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
  51. package/libs/ModelTVVideoPlugin/index.js +3 -2
  52. package/libs/ModelViewPlugin/Plugin.js +20 -19
  53. package/libs/ModelViewPlugin/index.js +1 -0
  54. package/libs/Object3DHelperPlugin/Controller.js +3 -2
  55. package/libs/Object3DHelperPlugin/index.js +6 -5
  56. package/libs/PanoCompassPlugin/Controller.js +3 -2
  57. package/libs/PanoCompassPlugin/index.js +4 -3
  58. package/libs/PanoDoorLabelPlugin/Controller.js +24 -23
  59. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  60. package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
  61. package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
  62. package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
  63. package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
  64. package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
  65. package/libs/PanoMeasurePlugin/Model/area.js +3 -2
  66. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
  67. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +16 -15
  68. package/libs/PanoMeasurePlugin/index.js +14 -13
  69. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
  70. package/libs/PanoRulerProPlugin/Controller.js +3 -2
  71. package/libs/PanoRulerProPlugin/RulerItems.js +42 -41
  72. package/libs/PanoRulerProPlugin/index.js +4 -3
  73. package/libs/PanoSpatialTagPlugin/Plugin.js +34 -33
  74. package/libs/PanoSpatialTagPlugin/index.js +1 -0
  75. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +3 -2
  76. package/libs/PanoTagPlugin/Components/Common/TagPopover/PopoverContent.js +3 -2
  77. package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopoverToolBar.js +3 -2
  78. package/libs/PanoTagPlugin/Components/Common/TagPopover/index.js +3 -2
  79. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
  80. package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
  81. package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
  82. package/libs/PanoTagPlugin/Components/TagItem.js +125 -124
  83. package/libs/PanoTagPlugin/controller/Tag/BaseTag.d.ts +5 -1
  84. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +321 -289
  85. package/libs/PanoTagPlugin/controller/Tag/BoxTag.d.ts +119 -0
  86. package/libs/PanoTagPlugin/controller/Tag/BoxTag.js +516 -0
  87. package/libs/PanoTagPlugin/controller/Tag/MaskTag.d.ts +257 -0
  88. package/libs/PanoTagPlugin/controller/Tag/MaskTag.js +816 -0
  89. package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +10 -0
  90. package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.js +94 -0
  91. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
  92. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
  93. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
  94. package/libs/PanoTagPlugin/controller/Tag/PolygonTag.d.ts +112 -0
  95. package/libs/PanoTagPlugin/controller/Tag/PolygonTag.js +479 -0
  96. package/libs/PanoTagPlugin/controller/TagRender.d.ts +1 -1
  97. package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
  98. package/libs/PanoTagPlugin/controller/TagUtil.js +22 -19
  99. package/libs/PanoTagPlugin/controller/index.d.ts +55 -2
  100. package/libs/PanoTagPlugin/controller/index.js +243 -129
  101. package/libs/PanoTagPlugin/index.js +17 -11
  102. package/libs/PanoTagPlugin/typings/controller.d.ts +10 -0
  103. package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +8 -3
  104. package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +50 -1
  105. package/libs/PanoTagPlugin/utils/addDebugPoints.js +27 -13
  106. package/libs/PanoTagPlugin/utils/index.js +29 -26
  107. package/libs/PanoTagPlugin/utils/sculptDataToBoxPosition.d.ts +6 -0
  108. package/libs/PanoTagPlugin/utils/sculptDataToBoxPosition.js +18 -0
  109. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
  110. package/libs/PanoTagPlugin/utils/tag/format.js +3 -2
  111. package/libs/PanoTagPlugin/utils/tag/tagCheck.d.ts +6 -0
  112. package/libs/PanoTagPlugin/utils/tag/tagCheck.js +26 -14
  113. package/libs/PanoTagPlugin/utils/tagPosition.d.ts +12 -3
  114. package/libs/PanoTagPlugin/utils/tagPosition.js +49 -16
  115. package/libs/PanoVideoPlugin/Controller.js +9 -8
  116. package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
  117. package/libs/PanoVideoPlugin/index.js +6 -5
  118. package/libs/PipelinePlugin/Controller.js +3 -2
  119. package/libs/PipelinePlugin/index.js +4 -3
  120. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
  121. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
  122. package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
  123. package/libs/Sculpt/Meshes/Line.d.ts +4 -0
  124. package/libs/Sculpt/Meshes/Line.js +85 -76
  125. package/libs/Sculpt/Meshes/Point.js +28 -28
  126. package/libs/Sculpt/Meshes/Polygon.js +43 -43
  127. package/libs/Sculpt/index.js +1 -1
  128. package/libs/Sculpt/utils/Modules/Cursor.js +7 -7
  129. package/libs/base/BasePlugin.js +1 -1
  130. package/libs/floorplan/FloorplanGuidePlugin/Controller.js +3 -2
  131. package/libs/floorplan/FloorplanGuidePlugin/index.js +4 -3
  132. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
  133. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
  134. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -2
  135. package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -3
  136. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -2
  137. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
  138. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -2
  139. package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
  140. package/libs/index.js +164 -158
  141. package/libs/shared-utils/five/getFiveFromParentChain.d.ts +7 -0
  142. package/libs/shared-utils/five/getFiveFromParentChain.js +15 -0
  143. package/libs/shared-utils/logger.js +1 -1
  144. package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +1 -0
  145. package/package.json +1 -1
@@ -0,0 +1,479 @@
1
+ var f = Object.defineProperty;
2
+ var y = Object.getOwnPropertySymbols;
3
+ var S = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
4
+ var g = (s, r, t) => r in s ? f(s, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[r] = t, d = (s, r) => {
5
+ for (var t in r || (r = {}))
6
+ S.call(r, t) && g(s, t, r[t]);
7
+ if (y)
8
+ for (var t of y(r))
9
+ P.call(r, t) && g(s, t, r[t]);
10
+ return s;
11
+ };
12
+ var h = (s, r, t) => (g(s, typeof r != "symbol" ? r + "" : r, t), t);
13
+ var u = (s, r, t) => new Promise((o, i) => {
14
+ var e = (l) => {
15
+ try {
16
+ n(t.next(l));
17
+ } catch (c) {
18
+ i(c);
19
+ }
20
+ }, p = (l) => {
21
+ try {
22
+ n(t.throw(l));
23
+ } catch (c) {
24
+ i(c);
25
+ }
26
+ }, n = (l) => l.done ? o(l.value) : Promise.resolve(l.value).then(e, p);
27
+ n((t = t.apply(s, r)).next());
28
+ });
29
+ import { BaseTag as v } from "./BaseTag.js";
30
+ import * as a from "three";
31
+ import { Sculpt as b } from "../../../Sculpt/index.js";
32
+ import { Polygon as k } from "../../../Sculpt/Objects/Polygon/index.js";
33
+ import "../../../shared-utils/tag.js";
34
+ import "../../../vendor/hammerjs/hammer.js";
35
+ import "../../../shared-utils/three/PointSelector/index.js";
36
+ import "../../../shared-utils/three/CSS3DRenderer/index.js";
37
+ import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
38
+ import { anyPositionToVector3 as m } from "../../../shared-utils/positionToVector3.js";
39
+ import "@realsee/five/line";
40
+ import "../../../shared-utils/three/core/Five_LineMaterial2.js";
41
+ import "../../../shared-utils/three/core/Sphere.js";
42
+ import "../../../shared-utils/three/blink.js";
43
+ import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
44
+ import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
45
+ import "../../../vendor/earcut/src/earcut.js";
46
+ import { uuid as C } from "../../../shared-utils/uuid.js";
47
+ import "../../../shared-utils/five/FivePuppet.js";
48
+ import "../../../shared-utils/Subscribe.js";
49
+ import "../../utils/tag/calculateTagConfig.js";
50
+ import "../../../vendor/object-assign-deep/objectAssignDeep.js";
51
+ import "../../../shared-utils/typescript/entries.js";
52
+ import "../../utils/tag/adaptConfig.js";
53
+ import "../../typings/tag/TagConfig.js";
54
+ import "@realsee/five";
55
+ import "../../../shared-utils/five/mode.js";
56
+ import "../../utils/tag/format.js";
57
+ import "../../../shared-utils/url/defaultUrls.js";
58
+ import "../../../shared-utils/three/centerPoint.js";
59
+ import "../../../shared-utils/util.js";
60
+ import "../../../shared-utils/isNil.js";
61
+ import "../../../shared-utils/vectorToCoordinate.js";
62
+ import "../../../shared-utils/formatRad.js";
63
+ import "../../../shared-utils/five/transformPosition.js";
64
+ import "../../../shared-utils/five/lookPoint.js";
65
+ import "../../../shared-utils/Utils/FiveUtil.js";
66
+ import "../../../shared-utils/Utils/BaseUtil.js";
67
+ import "../../../shared-utils/Utils/WorkUtil.js";
68
+ import "../../../shared-utils/five/getFiveModel.js";
69
+ import "../../utils/tagPosition.js";
70
+ import "../../utils/tag/tagCheck.js";
71
+ import "../../utils/checkRange.js";
72
+ import "../../../shared-utils/url/getUrl.js";
73
+ import "../../../shared-utils/five/getFloorIndex.js";
74
+ import "../../../shared-utils/safeObj.js";
75
+ import "../../utils/Cache.js";
76
+ import "../../../shared-utils/three/temp.js";
77
+ import "../../../shared-utils/three/core/Raycaster.js";
78
+ import "../../../shared-utils/promise/withResolvers.js";
79
+ import "../../../shared-utils/five/vector3ToScreen.js";
80
+ import "../../../shared-utils/dom/resizeObserver.js";
81
+ import "../../../shared-utils/five/fiveEveryReadyListener.js";
82
+ import "../../../shared-utils/throttle.js";
83
+ import "../../../shared-utils/five/fiveModelLoad.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 "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
89
+ import "../../../shared-utils/even.js";
90
+ import "../../../shared-utils/CSS3DRender/OpacityMesh.js";
91
+ import "../../../shared-utils/three/getObjectVisible.js";
92
+ import "../../../shared-utils/three/PointSelector/utils/html.js";
93
+ import "../../../shared-utils/CSS3DRender/index.js";
94
+ import "../../../shared-utils/CSS3DRender/CSS3DRenderer.js";
95
+ import "../../../shared-utils/createResizeObserver.js";
96
+ import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
97
+ import "../../../Sculpt/Meshes/Line.js";
98
+ import "../../../Sculpt/typings/style.js";
99
+ import "../../../shared-utils/three/IObject3D.js";
100
+ import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
101
+ import "../../../shared-utils/three/applyObjectMatrixWorld.js";
102
+ import "../../../shared-utils/five/getFiveFromParentChain.js";
103
+ import "../../../shared-utils/three/core/LineGeometry.js";
104
+ import "../../../shared-utils/three/core/LineMaterial.js";
105
+ import "../../../shared-utils/three/core/Line2.js";
106
+ import "../../../shared-utils/three/core/LineMaterial2.js";
107
+ import "../../../Sculpt/utils/unit.js";
108
+ import "../../../Sculpt/utils/renderDom.js";
109
+ import "../../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
110
+ import "../../../shared-utils/isTouchDevice.js";
111
+ import "../../../shared-utils/five/getPosition.js";
112
+ import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
113
+ import "../../../shared-utils/three/PointSelector/utils/contents.js";
114
+ import "../../../Sculpt/utils/three/rayOnLine.js";
115
+ import "../../../vendor/animejs/lib/anime.es.js";
116
+ import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
117
+ import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
118
+ import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
119
+ import "../../../Sculpt/utils/Modules/Global.js";
120
+ import "../../../Sculpt/utils/Modules/Cursor.js";
121
+ import "../../../Sculpt/utils/Modules/DeleteButtonBgBorder.js";
122
+ import "../../../Sculpt/utils/Modules/DeleteIconSVG.js";
123
+ import "../../../Object3DHelperPlugin/Controller.js";
124
+ import "../../../base/BasePlugin.js";
125
+ import "../../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
126
+ import "../../../shared-utils/Object3DHelper/Base/BaseHelper.js";
127
+ import "../../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
128
+ import "../../../shared-utils/three/boundingBox.js";
129
+ import "../../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
130
+ import "../../../shared-utils/Object3DHelper/utils/direction.js";
131
+ import "../../../shared-utils/Object3DHelper/Constants/RenderOrder.js";
132
+ import "../../../shared-utils/Object3DHelper/Helper/Objects/CenterHandle.js";
133
+ import "../../../shared-utils/Object3DHelper/Constants/color.js";
134
+ import "../../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
135
+ import "../../../shared-utils/Object3DHelper/utils/getPoseFromCamera.js";
136
+ import "../../../shared-utils/clamp.js";
137
+ import "../../../shared-utils/Object3DHelper/utils/getOrthographicCameraDirection.js";
138
+ import "../../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
139
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
140
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
141
+ import "../../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
142
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
143
+ import "../../../shared-utils/Object3DHelper/utils/cameraHooks.js";
144
+ import "../../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
145
+ import "../../../shared-utils/Object3DHelper/Controller/MoveController.js";
146
+ import "../../../shared-utils/Object3DHelper/Base/BaseController.js";
147
+ import "../../../shared-utils/Object3DHelper/utils/solidGuide.js";
148
+ import "../../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
149
+ import "../../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
150
+ import "../../../Object3DHelperPlugin/FiveControllerWrapper.js";
151
+ import "../../../shared-utils/Object3DHelper/index.js";
152
+ import "../../../shared-utils/Object3DHelper/Controller/RotateController.js";
153
+ import "../../../shared-utils/math/rad2Deg.js";
154
+ import "../../../shared-utils/math/deg2Rad.js";
155
+ import "../../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
156
+ import "../../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
157
+ import "../../../shared-utils/three/vectorIsEqual.js";
158
+ import "../../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
159
+ import "../../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
160
+ import "../../../shared-utils/Object3DHelper/Controller/ScaleController.js";
161
+ import "../../../shared-utils/three/getNormal.js";
162
+ import "../../../shared-utils/threex/domevents/index.js";
163
+ import "../../../shared-utils/five/FiveDomEvents.js";
164
+ import "../../../shared-utils/five/calculateThreeMouse.js";
165
+ import "../../../shared-utils/three/recurveFindObject.js";
166
+ import "../../../Sculpt/Objects/Polyline/index.js";
167
+ import "../../../Sculpt/Meshes/Polyline.js";
168
+ import "../../../Sculpt/Meshes/LineWithDots.js";
169
+ import "../../../Sculpt/Meshes/Point.js";
170
+ import "../../../shared-utils/three/closeVectors.js";
171
+ import "../../../Sculpt/Objects/Base/index.js";
172
+ import "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
173
+ import "../../../Sculpt/Objects/Polyline/Editor.js";
174
+ import "../../../Sculpt/Objects/Line/Editor.js";
175
+ import "../../../Sculpt/Objects/Base/Editor.js";
176
+ import "../../../shared-utils/three/vector3ToArray.js";
177
+ import "../../../Sculpt/Objects/Point/index.js";
178
+ import "../../../Sculpt/Objects/Point/Editor.js";
179
+ import "../../../Sculpt/Objects/Prism/index.js";
180
+ import "../../../Sculpt/Meshes/Prism.js";
181
+ import "../../../Sculpt/utils/three/ColoredMesh.js";
182
+ import "../../../shared-utils/three/core/PrismGeometry.js";
183
+ import "../../../shared-utils/three/core/polygonVertex.js";
184
+ import "../../../shared-utils/three/earcut3D.js";
185
+ import "../../../shared-utils/three/core/PrismAnimationGeometry.js";
186
+ import "../../../shared-utils/three/geometryUtil.js";
187
+ import "../../../Sculpt/Editors/PrismMeshEditor.js";
188
+ import "../../../Sculpt/Meshes/Area.js";
189
+ import "../../../Sculpt/Meshes/PolygonWithEdge.js";
190
+ import "../../../Sculpt/Meshes/Polygon.js";
191
+ import "../../../shared-utils/three/generatePolygonGeometry.js";
192
+ import "../../../PanoMeasurePlugin/utils/isIntersecting.js";
193
+ import "../../../Sculpt/Objects/Rectangle/index.js";
194
+ import "../../../Sculpt/Editors/RectangleMeshEditor.js";
195
+ import "../../../Sculpt/Meshes/Rectangle.js";
196
+ import "../../../Sculpt/utils/three/RectangleGeometry.js";
197
+ import "../../../Sculpt/Meshes/RectangleWithEdge.js";
198
+ import "../../../Sculpt/utils/sortPositionsByCameraPosition.js";
199
+ import "../../../Sculpt/Objects/Circle/index.js";
200
+ import "../../../Sculpt/Editors/CircleMeshEditor.js";
201
+ import "../../../Sculpt/Meshes/CircleWithEdge.js";
202
+ import "../../../Sculpt/Meshes/Circle.js";
203
+ import "../../../Sculpt/utils/radiusToSegments.js";
204
+ import "../../../Sculpt/Objects/Cylinder/index.js";
205
+ import "../../../Sculpt/Meshes/Cylinder.js";
206
+ import "../../../Sculpt/Editors/CylinderMeshEditor.js";
207
+ import "../../../Sculpt/Objects/Box/index.js";
208
+ import "../../../Sculpt/Editors/BoxMeshEditor.js";
209
+ import "../../../Sculpt/Meshes/Box.js";
210
+ import "../../../shared-utils/forReverseEach.js";
211
+ import "../../../Sculpt/Objects/Line/index.js";
212
+ import "../../../Sculpt/Objects/Polygon/Editor.js";
213
+ class Ji extends v {
214
+ constructor(t, o) {
215
+ super(t, o);
216
+ h(this, "tagStyle");
217
+ h(this, "clickEventDispose");
218
+ h(this, "domClickDispose");
219
+ h(this, "screenPosition", null);
220
+ this.tagStyle = o.style, this.initializeSculptPolygon(), this.updateVisible();
221
+ }
222
+ /**
223
+ * 获取 Polygon 样式配置(合并用户配置和默认值)
224
+ */
225
+ getPolygonStyle() {
226
+ var o, i, e, p, n, l;
227
+ const t = ((o = this.tagStyle) == null ? void 0 : o.boxOrPolygon) || {};
228
+ return {
229
+ color: (i = t.color) != null ? i : 16777215,
230
+ opacity: (e = t.opacity) != null ? e : 0.4,
231
+ lineColor: (n = (p = t.lineColor) != null ? p : t.color) != null ? n : 16777215,
232
+ lineWidth: (l = t.lineWidth) != null ? l : 1
233
+ };
234
+ }
235
+ /**
236
+ * 更新 Polygon 样式
237
+ */
238
+ updatePolygonStyle() {
239
+ if (!this.polygonShape || !this.polygonShape.areaMesh)
240
+ return;
241
+ const t = this.getPolygonStyle();
242
+ this.polygonShape.areaMesh.setStyle(t);
243
+ }
244
+ /**
245
+ * 更新标签数据
246
+ */
247
+ set(t, o = !0) {
248
+ super.set(t, o), t.style && (this.tagStyle = d(d({}, this.tagStyle), t.style)), t.position && (this.polygonShape ? this.updateSculptPolygon() : this.initializeSculptPolygon()), t.style && this.polygonShape && this.updatePolygonStyle();
249
+ }
250
+ /**
251
+ * 获取多边形的所有角点(世界坐标)
252
+ */
253
+ getCorners() {
254
+ return this.polygonShape ? this.polygonShape.areaMesh.points.map((t) => t.clone()) : [];
255
+ }
256
+ getCenter() {
257
+ const t = this.originPosition;
258
+ if (!t || t.length === 0)
259
+ return [0, 0, 0];
260
+ const o = new a.Vector3();
261
+ return t.forEach((i) => {
262
+ o.add(m(i));
263
+ }), o.divideScalar(t.length), o.toArray();
264
+ }
265
+ /**
266
+ * 计算多边形的法向量
267
+ * 使用前三个点来计算平面的法向量
268
+ */
269
+ computeNormal() {
270
+ const t = this.position;
271
+ if (!t || t.length < 3)
272
+ return new a.Vector3(0, 1, 0);
273
+ const o = m(t[0]), i = m(t[1]), e = m(t[2]), p = new a.Vector3().subVectors(i, o), n = new a.Vector3().subVectors(e, o);
274
+ return new a.Vector3().crossVectors(p, n).normalize();
275
+ }
276
+ /**
277
+ * 初始化 Sculpt Polygon
278
+ */
279
+ initializeSculptPolygon() {
280
+ if (this.polygonShape)
281
+ return;
282
+ const t = this.position;
283
+ if (!t || t.length < 3)
284
+ return;
285
+ const o = new b(this.five, void 0, {
286
+ magnifier: null
287
+ });
288
+ o.clear(), o.group.removeFromParent();
289
+ const i = t.map((n) => m(n)), e = this.getPolygonStyle(), p = new k(
290
+ {
291
+ id: C(),
292
+ type: "Polygon",
293
+ points: i,
294
+ style: e
295
+ },
296
+ {
297
+ defaultAction: !1,
298
+ occlusionVisibility: !0,
299
+ occlusionMode: "depthTest"
300
+ }
301
+ );
302
+ p.visible = this.visible, this.plugin.imagePlaneGroup.add(p), this.polygonShape = p, p.editor.hooks.on("objectUpdate", () => {
303
+ this.syncPolygonPositionFromSculpt();
304
+ }), p.editor.disable(), this.setupClickEvents();
305
+ }
306
+ /**
307
+ * 设置点击事件
308
+ */
309
+ setupClickEvents() {
310
+ if (!this.polygonShape || this.config.clickable === !1) {
311
+ console.warn(
312
+ `[PolygonTag ${this.id}] Cannot setup click events: polygonShape=${!!this.polygonShape}, clickable=${this.config.clickable}`
313
+ );
314
+ return;
315
+ }
316
+ this.cleanupClickEvents();
317
+ const t = (o) => {
318
+ this.plugin.hooks.emit("click", { event: o, target: "TagPolygonModel", tag: this });
319
+ };
320
+ requestAnimationFrame(() => {
321
+ if (!this.polygonShape || !this.plugin.domEvents) {
322
+ console.warn(`[PolygonTag ${this.id}] Cannot bind click events: polygonShape or domEvents not available`);
323
+ return;
324
+ }
325
+ this.clickEventDispose = this.addObjectClickHandler(this, this.polygonShape, t);
326
+ });
327
+ }
328
+ /**
329
+ * 清理点击事件
330
+ */
331
+ cleanupClickEvents() {
332
+ this.clickEventDispose && (this.clickEventDispose(), this.clickEventDispose = void 0);
333
+ }
334
+ /**
335
+ * 更新 Sculpt Polygon 的数据
336
+ */
337
+ updateSculptPolygon() {
338
+ if (!this.polygonShape)
339
+ return;
340
+ const t = this.position;
341
+ if (!t || t.length < 3)
342
+ return;
343
+ const o = t.map((i) => m(i));
344
+ this.polygonShape.setData({
345
+ points: o.map((i) => i.toArray()),
346
+ style: this.getPolygonStyle()
347
+ }), this.setupClickEvents();
348
+ }
349
+ /**
350
+ * 启用编辑器
351
+ * 用于编辑已存在的 Polygon
352
+ */
353
+ editorEnable() {
354
+ return u(this, null, function* () {
355
+ if (!this.position) {
356
+ console.warn("[PolygonTag] Cannot enable editor without position. Call startDrawing() first.");
357
+ return;
358
+ }
359
+ this.polygonShape || this.initializeSculptPolygon(), this.polygonShape && (this.polygonShape.visible = !0, this.polygonShape.editor.enable());
360
+ });
361
+ }
362
+ /**
363
+ * 禁用编辑器
364
+ */
365
+ editorDisable() {
366
+ this.polygonShape && this.polygonShape.editor.disable();
367
+ }
368
+ /**
369
+ * 同步 Sculpt Polygon 的数据到 PolygonPosition
370
+ */
371
+ syncPolygonPositionFromSculpt() {
372
+ if (!this.polygonShape)
373
+ return;
374
+ const i = this.polygonShape.data.points.map((e) => m(e)).map((e) => e.toArray());
375
+ this.position = i, this.hooks.emit("positionChanged", i);
376
+ }
377
+ /**
378
+ * @description 点击事件处理
379
+ */
380
+ onClick(t) {
381
+ t.target === "TagPolygonModel" && this.unfoldAndFoldOthers();
382
+ }
383
+ /**
384
+ * @description 展开自己,收起其他标签
385
+ */
386
+ unfoldAndFoldOthers() {
387
+ if (this.isPopoverConfigEnabled())
388
+ return;
389
+ const t = this.can("fold"), o = this.can("unfold");
390
+ t && o && (this.state.unfolded = !this.state.unfolded, this.manuallyOperated = !0, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }), this.state.unfolded && this.plugin.tags.forEach((i) => {
391
+ i.id !== this.id && i.fold();
392
+ }));
393
+ }
394
+ /**
395
+ * 展开标签详情
396
+ */
397
+ unfold() {
398
+ this.isPopoverConfigEnabled() || this.setUnfold(!0);
399
+ }
400
+ /**
401
+ * 折叠标签详情
402
+ */
403
+ fold() {
404
+ this.isPopoverConfigEnabled() || this.setUnfold(!1);
405
+ }
406
+ /**
407
+ * 设置展开/折叠状态
408
+ */
409
+ setUnfold(t) {
410
+ if (this.isPopoverConfigEnabled())
411
+ return;
412
+ const o = this.can("fold"), i = this.can("unfold");
413
+ o && i && (this.state.unfolded = t, this.hooks.emit(t ? "unfolded" : "folded"), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }));
414
+ }
415
+ /**
416
+ * 获取多边形的中心点
417
+ */
418
+ getPolygonCenter() {
419
+ const t = this.position;
420
+ if (!t || t.length === 0)
421
+ return new a.Vector3();
422
+ const o = new a.Vector3();
423
+ return t.forEach((i) => {
424
+ const e = m(i);
425
+ o.add(e);
426
+ }), o.divideScalar(t.length), o;
427
+ }
428
+ /**
429
+ * 更新屏幕位置(用于在 2D UI 中显示内容)
430
+ * 显示在 Polygon 最右侧的顶点位置
431
+ */
432
+ updateScreenPosition() {
433
+ if (!this.currentVisible) {
434
+ this.screenPosition = null, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
435
+ return;
436
+ }
437
+ const o = this.position;
438
+ if (!o || o.length === 0) {
439
+ this.screenPosition = null, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
440
+ return;
441
+ }
442
+ let i = m(o[0]);
443
+ o.forEach((p) => {
444
+ const n = m(p);
445
+ n.x > i.x && (i = n);
446
+ });
447
+ const e = i.clone().project(this.five.camera);
448
+ if (e.x < -1 || e.x > 1 || e.y < -1 || e.y > 1 || e.z < 0 || e.z > 1)
449
+ this.screenPosition = null;
450
+ else if (this.five.renderer) {
451
+ const p = this.five.renderer.getSize(new a.Vector2());
452
+ this.screenPosition = {
453
+ leftPx: (e.x + 1) / 2 * p.x,
454
+ topPx: (-e.y + 1) / 2 * p.y,
455
+ scale: 1
456
+ };
457
+ }
458
+ this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
459
+ }
460
+ /**
461
+ * 应用可见性变化
462
+ */
463
+ applyVisible() {
464
+ var t;
465
+ this.polygonShape && (this.plugin.imagePlaneGroup.children.includes(this.polygonShape) || (console.warn(`[PolygonTag ${this.id}] applyVisible: polygonShape not in imagePlaneGroup, re-adding...`, {
466
+ polygonShapeParent: ((t = this.polygonShape.parent) == null ? void 0 : t.name) || "null",
467
+ imagePlaneGroupChildren: this.plugin.imagePlaneGroup.children.length
468
+ }), this.polygonShape.parent && this.polygonShape.parent.remove(this.polygonShape), this.plugin.imagePlaneGroup.add(this.polygonShape)), this.polygonShape.visible = this.visible), this.updateScreenPosition();
469
+ }
470
+ /**
471
+ * 销毁标签
472
+ */
473
+ dispose() {
474
+ this.cleanupClickEvents(), this.domClickDispose && (this.domClickDispose(), this.domClickDispose = void 0), this.polygonShape && (this.polygonShape.removeFromParent(), this.polygonShape = void 0);
475
+ }
476
+ }
477
+ export {
478
+ Ji as PolygonTag
479
+ };
@@ -1,6 +1,6 @@
1
1
  import type { TagObjectGroup, TagGLTFObjectGroup, ImagePlaneGroup, TagContentType, ElementRenderer, TagRendererMap, TagContentTypeMapping } from '../typings';
2
2
  import type { TemporaryState } from '../typings';
3
- import TagContainerSvelte from '../Components/TagContainer.svelte';
3
+ import type TagContainerSvelte from '../Components/TagContainer.svelte';
4
4
  import type { Five } from '@realsee/five';
5
5
  import { TagUtil } from './TagUtil';
6
6
  export declare abstract class TagRender extends TagUtil {
@@ -71,6 +71,7 @@ import "../../Sculpt/typings/style.js";
71
71
  import "../../shared-utils/three/IObject3D.js";
72
72
  import "../../Sculpt/utils/Meshes/getLengthHTML.js";
73
73
  import "../../shared-utils/three/applyObjectMatrixWorld.js";
74
+ import "../../shared-utils/five/getFiveFromParentChain.js";
74
75
  import "../../shared-utils/three/core/LineGeometry.js";
75
76
  import "../../shared-utils/three/core/LineMaterial.js";
76
77
  import "../../shared-utils/three/core/Line2.js";
@@ -94,7 +95,7 @@ import "../../shared-utils/url/defaultUrls.js";
94
95
  import "../../vendor/object-assign-deep/objectAssignDeep.js";
95
96
  import "../../shared-utils/typescript/entries.js";
96
97
  import "../utils/tag/adaptConfig.js";
97
- class Zt extends l {
98
+ class _t extends l {
98
99
  constructor(t) {
99
100
  super(t);
100
101
  o(this, "rendererMap", /* @__PURE__ */ new Map());
@@ -145,5 +146,5 @@ class Zt extends l {
145
146
  }
146
147
  }
147
148
  export {
148
- Zt as TagRender
149
+ _t as TagRender
149
150
  };
@@ -2,19 +2,19 @@ var $ = Object.defineProperty, q = Object.defineProperties;
2
2
  var z = Object.getOwnPropertyDescriptors;
3
3
  var S = Object.getOwnPropertySymbols;
4
4
  var G = Object.prototype.hasOwnProperty, X = Object.prototype.propertyIsEnumerable;
5
- var D = (a, n, e) => n in a ? $(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, W = (a, n) => {
5
+ var C = (a, n, e) => n in a ? $(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, W = (a, n) => {
6
6
  for (var e in n || (n = {}))
7
- G.call(n, e) && D(a, e, n[e]);
7
+ G.call(n, e) && C(a, e, n[e]);
8
8
  if (S)
9
9
  for (var e of S(n))
10
- X.call(n, e) && D(a, e, n[e]);
10
+ X.call(n, e) && C(a, e, n[e]);
11
11
  return a;
12
12
  }, Q = (a, n) => q(a, z(n));
13
- var s = (a, n, e) => (D(a, typeof n != "symbol" ? n + "" : n, e), e);
13
+ var s = (a, n, e) => (C(a, typeof n != "symbol" ? n + "" : n, e), e);
14
14
  import { defaultGlobalConfig as J } from "../typings/tag/TagConfig.js";
15
15
  import { DefaultConfig as K } from "../tag.config.js";
16
16
  import "three";
17
- import { anyPositionToVector3 as V } from "../../shared-utils/positionToVector3.js";
17
+ import { anyPositionToVector3 as x } from "../../shared-utils/positionToVector3.js";
18
18
  import { isPlaneTag as N, isMediaModelTag as U, isPoint3DTag as Y } from "../utils/tag/tagCheck.js";
19
19
  import { normalPositionToPositions as Z } from "../utils/normalPositionToPositions.js";
20
20
  import { writable as ee } from "../../vendor/svelte/store/index.js";
@@ -34,7 +34,7 @@ import "../../shared-utils/three/blink.js";
34
34
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
35
35
  import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
36
36
  import "../../vendor/earcut/src/earcut.js";
37
- import { FiveDomEvents as x } from "../../shared-utils/five/FiveDomEvents.js";
37
+ import { FiveDomEvents as V } from "../../shared-utils/five/FiveDomEvents.js";
38
38
  import "../../shared-utils/five/FivePuppet.js";
39
39
  import { Cache as se } from "../utils/Cache.js";
40
40
  import { Controller as ce } from "../../base/BasePlugin.js";
@@ -85,6 +85,7 @@ import "../../shared-utils/three/IObject3D.js";
85
85
  import "../../Sculpt/utils/Meshes/getLengthHTML.js";
86
86
  import "../../shared-utils/three/applyObjectMatrixWorld.js";
87
87
  import "../../shared-utils/util.js";
88
+ import "../../shared-utils/five/getFiveFromParentChain.js";
88
89
  import "../../shared-utils/three/core/LineGeometry.js";
89
90
  import "../../shared-utils/three/core/LineMaterial.js";
90
91
  import "../../shared-utils/three/core/Line2.js";
@@ -103,7 +104,7 @@ import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
103
104
  import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
104
105
  import "../../shared-utils/five/calculateThreeMouse.js";
105
106
  import "../../shared-utils/url/defaultUrls.js";
106
- class Xt extends ce {
107
+ class Jt extends ce {
107
108
  constructor(e) {
108
109
  super(e);
109
110
  s(this, "tags", []);
@@ -123,7 +124,7 @@ class Xt extends ce {
123
124
  css3DRenderDisposer: /* @__PURE__ */ new Map()
124
125
  });
125
126
  // eslint-disable-next-line @typescript-eslint/member-ordering
126
- s(this, "domEvents", new x(this.five));
127
+ s(this, "domEvents", new V(this.five));
127
128
  s(this, "_cache_pointTag");
128
129
  s(this, "_cache_2DPointTag");
129
130
  s(this, "_cache_css3DTag");
@@ -180,7 +181,9 @@ class Xt extends ce {
180
181
  }
181
182
  // eslint-disable-next-line accessor-pairs
182
183
  set tagsLengthWillUpdate(e) {
183
- e && (this._cache_pointTag = this.tags.filter((t) => t.stickType === "2DPoint" || t.stickType === "3DPoint").filter((t) => t.position), this._cache_2DPointTag = this.tags.filter((t) => t.stickType === "2DPoint").filter((t) => t.position), this._cache_css3DTag = this.tags.filter(
184
+ e && (this._cache_pointTag = this.tags.filter(
185
+ (t) => t.stickType === "2DPoint" || t.stickType === "3DPoint" || t.stickType === "3DBox" || t.stickType === "Polygon" || t.stickType === "Mask"
186
+ ).filter((t) => t.position), this._cache_2DPointTag = this.tags.filter((t) => t.stickType === "2DPoint").filter((t) => t.position), this._cache_css3DTag = this.tags.filter(
184
187
  (t) => t.stickType === "3DPoint" || t.stickType === "Plane" || t.stickType === "Model" && t.contentType === "MediaModel"
185
188
  ).filter((t) => {
186
189
  const i = t.computeRenderType();
@@ -200,7 +203,7 @@ class Xt extends ce {
200
203
  return (e = this._cache_css3DTag) != null ? e : [];
201
204
  }
202
205
  updateFive(e) {
203
- super.updateFive(e), this.domEvents.dispose(), this.domEvents = new x(e);
206
+ super.updateFive(e), this.domEvents.dispose(), this.domEvents = new V(e);
204
207
  }
205
208
  addRenderQueue(e) {
206
209
  var c, p;
@@ -236,7 +239,7 @@ class Xt extends ce {
236
239
  if (U(e))
237
240
  return e.data.mediaPosition;
238
241
  if (Y(e))
239
- return Z(this.five.camera.position, V(e.position), V(e.normal));
242
+ return Z(this.five.camera.position, x(e.position), x(e.normal));
240
243
  }
241
244
  addObjectClickHandler(e, t, i) {
242
245
  if (!t || !this.domEvents)
@@ -276,19 +279,19 @@ class Xt extends ce {
276
279
  const o = {}, c = {}, p = {};
277
280
  this.config.contentTypeConfig && Object.entries(this.config.contentTypeConfig).forEach(([u, h]) => {
278
281
  var w, L;
279
- const m = u, C = m.split("-"), j = u.startsWith("["), v = j ? C[0].slice(1, -1) : void 0, y = j ? C.slice(1) : C, M = v ? ["PanoramaLike", "ModelLike"].includes(v) ? (w = c[v]) != null ? w : c[v] = {} : (L = p[v]) != null ? L : p[v] = {} : o;
282
+ const m = u, D = m.split("-"), j = u.startsWith("["), v = j ? D[0].slice(1, -1) : void 0, y = j ? D.slice(1) : D, M = v ? ["PanoramaLike", "ModelLike"].includes(v) ? (w = c[v]) != null ? w : c[v] = {} : (L = p[v]) != null ? L : p[v] = {} : o;
280
283
  if (!M[m]) {
281
284
  if (y.length === 0 && (M[m] = h), y.length === 1) {
282
285
  const [g] = y;
283
286
  (e.contentType === g || g === "Any") && (M[m] = h);
284
287
  }
285
288
  if (y.length === 2) {
286
- const [g = "Any", _ = "Any"] = y;
287
- g === "Mixin" && e.contentType === _ && (M[m] = h), (e.stickType === g || g === "Any") && (e.contentType === _ || _ === "Any") && (M[m] = h);
289
+ const [g = "Any", k = "Any"] = y;
290
+ g === "Mixin" && e.contentType === k && (M[m] = h), (e.stickType === g || g === "Any") && (e.contentType === k || k === "Any") && (M[m] = h);
288
291
  }
289
292
  if (y.length === 3) {
290
- const [g = "Any", _, R] = y;
291
- if (_ === "Audio" && e.contentType === "Audio") {
293
+ const [g = "Any", k, R] = y;
294
+ if (k === "Audio" && e.contentType === "Audio") {
292
295
  const O = e;
293
296
  (O.stickType === g || g === "Any") && O.data.appearance === R && (M[m] = h);
294
297
  }
@@ -304,10 +307,10 @@ class Xt extends ce {
304
307
  const m = T[u];
305
308
  T[u] = P({}, r, m, ...Object.values(h), l, { _isMerged: !0 });
306
309
  });
307
- const k = Q(W({}, f), { configWithFiveMode: T });
308
- return H(k), Object.values(T).forEach((u) => H(u)), k._isMerged = !0, k;
310
+ const _ = Q(W({}, f), { configWithFiveMode: T });
311
+ return H(_), Object.values(T).forEach((u) => H(u)), _._isMerged = !0, _;
309
312
  }
310
313
  }
311
314
  export {
312
- Xt as TagUtil
315
+ Jt as TagUtil
313
316
  };