@realsee/dnalogel 2.20.5 → 2.21.0-dev.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 (426) hide show
  1. package/dist/GuideLinePlugin/Controller.d.ts +3 -5
  2. package/dist/GuideLinePlugin/GuideLineItem.d.ts +1 -1
  3. package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +0 -17
  4. package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -7
  5. package/dist/PanoMeasurePlugin/Components/Common/CircleButton.svelte.d.ts +1 -0
  6. package/dist/PanoMeasurePlugin/Components/Common/Switcher1.svelte.d.ts +1 -0
  7. package/dist/PanoMeasurePlugin/Components/Controller1.svelte.d.ts +1 -0
  8. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +10 -4
  9. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +10 -0
  10. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +9 -2
  11. package/dist/PanoMeasurePlugin/Controller/index.d.ts +21 -8
  12. package/dist/PanoMeasurePlugin/Model/area.d.ts +62 -0
  13. package/dist/PanoMeasurePlugin/Model/index.d.ts +9 -0
  14. package/dist/PanoMeasurePlugin/Model/line.d.ts +4 -1
  15. package/dist/PanoMeasurePlugin/Model/polygon.d.ts +10 -0
  16. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +4 -0
  17. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +1 -1
  18. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +2 -1
  19. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
  20. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -0
  21. package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +1 -1
  22. package/dist/PanoMeasurePlugin/typings/data.d.ts +18 -0
  23. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +10 -3
  24. package/dist/PanoMeasurePlugin/typings/index.d.ts +1 -1
  25. package/dist/PanoMeasurePlugin/utils/dom/areaDom.d.ts +22 -0
  26. package/dist/PanoMeasurePlugin/utils/dom/base.d.ts +25 -0
  27. package/dist/PanoMeasurePlugin/utils/dom/distanceItem.d.ts +27 -0
  28. package/dist/PanoMeasurePlugin/utils/generatePolygonGeometry.d.ts +6 -0
  29. package/dist/PanoMeasurePlugin/utils/geometryUtil.d.ts +7 -0
  30. package/dist/PanoMeasurePlugin/utils/isIntersecting.d.ts +15 -0
  31. package/dist/PanoMeasurePlugin/utils/line.d.ts +2 -1
  32. package/dist/index.cjs.js +64 -64
  33. package/dist/index.js +7976 -7345
  34. package/dist/index.umd.js +57 -57
  35. package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +3 -7
  36. package/dist/shared-utils/safeObj.d.ts +1 -0
  37. package/dist/shared-utils/three/IObject3D.d.ts +7 -0
  38. package/dist/shared-utils/three/Magnifier.d.ts +3 -0
  39. package/docs/assets/search.js +1 -1
  40. package/docs/classes/CSS3DRender.html +30 -30
  41. package/docs/classes/CruisePluginController.html +25 -25
  42. package/docs/classes/GuideLineItem.GuideLineItem.html +19 -19
  43. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +31 -86
  44. package/docs/classes/Magnifier.html +19 -19
  45. package/docs/classes/ModelRoomLabelController.html +10 -10
  46. package/docs/classes/Object3DHelperController.html +24 -24
  47. package/docs/classes/PaintBrush.html +14 -14
  48. package/docs/classes/PanoMeasurePluginLine.html +50 -105
  49. package/docs/classes/PanoMeasurePluginModel.html +65 -23
  50. package/docs/classes/PanoMeasurePluginPoint.html +13 -13
  51. package/docs/classes/PanoMeasurePluginPolyline.html +37 -25
  52. package/docs/classes/PanoTagPluginController.html +46 -46
  53. package/docs/classes/Util.BetterTween.html +8 -8
  54. package/docs/classes/Util.FivePointSelector.html +11 -11
  55. package/docs/classes/Util.Interval.html +11 -11
  56. package/docs/classes/Util.Magnifier.html +29 -16
  57. package/docs/classes/Util.PointDomHelper.html +10 -10
  58. package/docs/classes/Util.PointHelper.html +10 -10
  59. package/docs/classes/Util.Rectangle.html +12 -12
  60. package/docs/enums/CameraMovementEffect.html +6 -6
  61. package/docs/enums/ContentType.html +19 -19
  62. package/docs/enums/DIRECTION.html +8 -8
  63. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +8 -8
  64. package/docs/enums/DimensionType.html +6 -6
  65. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +7 -7
  66. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +8 -8
  67. package/docs/enums/PaintBrushTypeEnum.html +7 -7
  68. package/docs/enums/PointType.html +6 -6
  69. package/docs/enums/Rotation.html +7 -7
  70. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  71. package/docs/functions/CameraMovementPlugin.html +4 -4
  72. package/docs/functions/CruisePlugin.html +4 -4
  73. package/docs/functions/GuideLinePlugin.html +4 -4
  74. package/docs/functions/ItemLabelPlugin.html +4 -4
  75. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  76. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  77. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  78. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  79. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  80. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  81. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  82. package/docs/functions/ModelViewPlugin.html +4 -4
  83. package/docs/functions/Object3DHelperPlugin.html +4 -4
  84. package/docs/functions/PanoCompassPlugin.html +4 -4
  85. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  86. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  87. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  88. package/docs/functions/PanoMeasurePlugin.html +4 -4
  89. package/docs/functions/PanoRulerPlugin.html +4 -4
  90. package/docs/functions/PanoRulerProPlugin.html +4 -4
  91. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  92. package/docs/functions/PanoTagPlugin.html +4 -4
  93. package/docs/functions/PanoVideoPlugin.html +4 -4
  94. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  95. package/docs/functions/Util.getCoordsFromClient.html +4 -4
  96. package/docs/functions/Util.getCoordsFromElement.html +4 -4
  97. package/docs/functions/Util.getFrameTime.html +4 -4
  98. package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
  99. package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
  100. package/docs/functions/Util.isAbsoluteURL.html +4 -4
  101. package/docs/functions/Util.isModelLike.html +4 -4
  102. package/docs/functions/Util.isNil.html +4 -4
  103. package/docs/functions/Util.isPanoramaLike.html +4 -4
  104. package/docs/functions/Util.nextFrame.html +4 -4
  105. package/docs/functions/Util.notNil.html +4 -4
  106. package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
  107. package/docs/functions/Util.tweenProgress.html +4 -4
  108. package/docs/functions/Util.uuid.html +4 -4
  109. package/docs/functions/pluginFlag.html +4 -4
  110. package/docs/index.html +4 -4
  111. package/docs/interfaces/AddTagConfig.html +5 -5
  112. package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -10
  113. package/docs/interfaces/CSS3DRenderPluginState.html +7 -7
  114. package/docs/interfaces/CameraMovementPluginExportType.html +6 -6
  115. package/docs/interfaces/CruisePluginTypes.Config.html +7 -7
  116. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +11 -11
  117. package/docs/interfaces/CruisePluginTypes.EventMap.html +19 -19
  118. package/docs/interfaces/CruisePluginTypes.MoveAction.html +11 -11
  119. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +13 -13
  120. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +13 -13
  121. package/docs/interfaces/CruisePluginTypes.PluginData.html +8 -8
  122. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +6 -6
  123. package/docs/interfaces/CruisePluginTypes.PluginState.html +10 -10
  124. package/docs/interfaces/EventMap.html +14 -14
  125. package/docs/interfaces/FloorplanBounding.html +7 -7
  126. package/docs/interfaces/FloorplanData.html +9 -9
  127. package/docs/interfaces/FloorplanEntrance.html +10 -10
  128. package/docs/interfaces/FloorplanExtraObject.html +9 -9
  129. package/docs/interfaces/FloorplanExtraObject3D.html +7 -7
  130. package/docs/interfaces/FloorplanFloorData.html +8 -8
  131. package/docs/interfaces/FloorplanImagePosition.html +6 -6
  132. package/docs/interfaces/FloorplanObserver.html +8 -8
  133. package/docs/interfaces/FloorplanOutlineItem.html +8 -8
  134. package/docs/interfaces/FloorplanPosition.html +6 -6
  135. package/docs/interfaces/FloorplanRoomItem.html +12 -12
  136. package/docs/interfaces/FloorplanRoomLabelItem.html +6 -6
  137. package/docs/interfaces/FloorplanServerBounding.html +7 -7
  138. package/docs/interfaces/FloorplanServerComputedData.html +9 -9
  139. package/docs/interfaces/FloorplanServerData.html +6 -6
  140. package/docs/interfaces/FloorplanServerDoorItem.html +9 -9
  141. package/docs/interfaces/FloorplanServerDoorPosition.html +7 -7
  142. package/docs/interfaces/FloorplanServerEntrance.html +10 -10
  143. package/docs/interfaces/FloorplanServerFloorData.html +8 -8
  144. package/docs/interfaces/FloorplanServerImagePosition.html +6 -6
  145. package/docs/interfaces/FloorplanServerObserver.html +8 -8
  146. package/docs/interfaces/FloorplanServerOutlineItem.html +8 -8
  147. package/docs/interfaces/FloorplanServerPosition.html +6 -6
  148. package/docs/interfaces/FloorplanServerRoomItem.html +13 -13
  149. package/docs/interfaces/FloorplanServerRoomLabelItem.html +6 -6
  150. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +7 -7
  151. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -9
  152. package/docs/interfaces/GuideLinePluginType.EventMap.html +12 -12
  153. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +7 -7
  154. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +5 -5
  155. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +12 -12
  156. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +7 -7
  157. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +17 -17
  158. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +6 -6
  159. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +17 -17
  160. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +4 -4
  161. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +6 -6
  162. package/docs/interfaces/GuideLinePluginType.PluginState.html +7 -7
  163. package/docs/interfaces/GuideLinePluginType.Route.html +10 -10
  164. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +8 -8
  165. package/docs/interfaces/HelperOffset.html +7 -7
  166. package/docs/interfaces/ImagePlaneGroup.html +5 -5
  167. package/docs/interfaces/ItemLabelPluginData.html +5 -5
  168. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -10
  169. package/docs/interfaces/ItemLabelPluginParametersType.html +8 -8
  170. package/docs/interfaces/MinMax.html +6 -6
  171. package/docs/interfaces/ModelChassisCompassPluginData.html +6 -6
  172. package/docs/interfaces/ModelChassisCompassPluginExportType.html +7 -7
  173. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +6 -6
  174. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +7 -7
  175. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +7 -7
  176. package/docs/interfaces/ModelItemLabelPluginData.html +5 -5
  177. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -10
  178. package/docs/interfaces/ModelItemLabelPluginParametersType.html +6 -6
  179. package/docs/interfaces/ModelRoomLabelPluginData.html +5 -5
  180. package/docs/interfaces/ModelTVVideoPluginData.html +8 -8
  181. package/docs/interfaces/ModelTVVideoPluginExportType.html +7 -7
  182. package/docs/interfaces/ModelTVVideoPluginParameterType.html +5 -5
  183. package/docs/interfaces/ModelViewPluginExportType.html +10 -10
  184. package/docs/interfaces/Object3DHelperState.html +7 -7
  185. package/docs/interfaces/ObjectHelperControllers.html +8 -8
  186. package/docs/interfaces/PaintBrushAction.html +11 -11
  187. package/docs/interfaces/PaintBrushConfigs.html +11 -11
  188. package/docs/interfaces/PaintBrushState.html +9 -9
  189. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +9 -9
  190. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -4
  191. package/docs/interfaces/PanoMeasureParameterType.html +21 -14
  192. package/docs/interfaces/PanoMeasurePluginLineJson.html +7 -7
  193. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +6 -6
  194. package/docs/interfaces/PanoMeasurePluginPointJson.html +6 -6
  195. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +7 -7
  196. package/docs/interfaces/PanoRulerPluginExportType.html +9 -9
  197. package/docs/interfaces/PanoRulerPluginOptions.html +6 -6
  198. package/docs/interfaces/PanoRulerPluginParameterType.html +7 -7
  199. package/docs/interfaces/PanoRulerProPluginExportType.html +8 -8
  200. package/docs/interfaces/PanoRulerProPluginOptions.html +6 -6
  201. package/docs/interfaces/PanoRulerProPluginParameterType.html +6 -6
  202. package/docs/interfaces/PanoRulerProPluginState.html +7 -7
  203. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -4
  204. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
  205. package/docs/interfaces/PanoSpatialTagPluginData.html +10 -10
  206. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +9 -9
  207. package/docs/interfaces/PanoSpatialTagPluginExportType.html +12 -12
  208. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +9 -9
  209. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +12 -12
  210. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -10
  211. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +9 -9
  212. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +5 -5
  213. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +7 -7
  214. package/docs/interfaces/PanoVideoPluginType.PluginData.html +5 -5
  215. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +8 -8
  216. package/docs/interfaces/PanoVideoPluginType.PluginState.html +5 -5
  217. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +7 -7
  218. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +9 -9
  219. package/docs/interfaces/Point.html +7 -7
  220. package/docs/interfaces/Room.html +8 -8
  221. package/docs/interfaces/RoomInfo.html +6 -6
  222. package/docs/interfaces/RoomLabel.html +13 -13
  223. package/docs/interfaces/RoomRules.html +4 -4
  224. package/docs/interfaces/Rooms.html +4 -4
  225. package/docs/interfaces/Scissor.html +8 -8
  226. package/docs/interfaces/State.html +7 -7
  227. package/docs/interfaces/TagCacheInterface.html +11 -11
  228. package/docs/interfaces/TagConfig.html +12 -12
  229. package/docs/interfaces/TagGLTFObjectGroup.html +5 -5
  230. package/docs/interfaces/TagIconUrl.html +11 -11
  231. package/docs/interfaces/TagObjectGroup.html +5 -5
  232. package/docs/interfaces/TagStyle.html +5 -5
  233. package/docs/interfaces/Tags.html +8 -8
  234. package/docs/interfaces/TemporaryState.html +5 -5
  235. package/docs/interfaces/Util.MagnifierParameter.html +10 -10
  236. package/docs/interfaces/Util.MouseGroupParameter.html +7 -7
  237. package/docs/modules/CruisePluginTypes.html +4 -4
  238. package/docs/modules/GuideLineItem.html +4 -4
  239. package/docs/modules/GuideLineModeItem.html +4 -4
  240. package/docs/modules/GuideLinePluginType.html +4 -4
  241. package/docs/modules/PanoVideoPluginType.html +4 -4
  242. package/docs/modules/Util.html +4 -4
  243. package/docs/modules.html +4 -4
  244. package/docs/types/ArrayPosition.html +4 -4
  245. package/docs/types/AudioAppearance.html +4 -4
  246. package/docs/types/AudioTagTypeConfigKey.html +4 -4
  247. package/docs/types/CSS3DRenderExportType.html +4 -4
  248. package/docs/types/CSS3DRenderPluginExportType.html +4 -4
  249. package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
  250. package/docs/types/ClassFunctionParameters.html +4 -4
  251. package/docs/types/Color.html +4 -4
  252. package/docs/types/ContentTypeConfigKey.html +4 -4
  253. package/docs/types/ContentTypeConfigKeySplit.html +4 -4
  254. package/docs/types/ContentTypeMap.html +4 -4
  255. package/docs/types/Create3DDomContainerReturnType.html +4 -4
  256. package/docs/types/Create3DElementReturnType.html +4 -4
  257. package/docs/types/CruisePluginExportType.html +4 -4
  258. package/docs/types/CruisePluginTypes.CruiseData.html +4 -4
  259. package/docs/types/CruisePluginTypes.MoveEffect.html +4 -4
  260. package/docs/types/DeprecatedMediaPlaneProperty.html +4 -4
  261. package/docs/types/DeprecatedTagProperty.html +4 -4
  262. package/docs/types/Direction-1.html +4 -4
  263. package/docs/types/Direction4.html +4 -4
  264. package/docs/types/ElementRenderer.html +4 -4
  265. package/docs/types/FloorplanRuleLabels.html +4 -4
  266. package/docs/types/FloorplanServerRuleLabels.html +4 -4
  267. package/docs/types/GuideLinePluginExportType.html +4 -4
  268. package/docs/types/GuideLinePluginType.GuideLineItem.html +4 -4
  269. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +4 -4
  270. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +4 -4
  271. package/docs/types/GuideLinePluginType.GuideLineStyle.html +4 -4
  272. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +4 -4
  273. package/docs/types/GuideLinePluginType.PathItem.html +4 -4
  274. package/docs/types/GuideLinePluginType.PluginData.html +4 -4
  275. package/docs/types/HelperEventMap.html +4 -4
  276. package/docs/types/LoadTagConfig.html +4 -4
  277. package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
  278. package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
  279. package/docs/types/MediaData.html +4 -4
  280. package/docs/types/MediaStore.html +4 -4
  281. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
  282. package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
  283. package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
  284. package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
  285. package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
  286. package/docs/types/MoveArgs.html +4 -4
  287. package/docs/types/MoveOpts.html +4 -4
  288. package/docs/types/Object3DHelperEventMap.html +4 -4
  289. package/docs/types/ObjectFit.html +4 -4
  290. package/docs/types/PaintBrushEventMap.html +4 -4
  291. package/docs/types/PanoCompassPluginData.html +4 -4
  292. package/docs/types/PanoCompassPluginExportType.html +4 -4
  293. package/docs/types/PanoCompassPluginParameterType.html +4 -4
  294. package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
  295. package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
  296. package/docs/types/PanoIndex.html +4 -4
  297. package/docs/types/PanoMeasurePluginEvent.html +4 -4
  298. package/docs/types/PanoMeasureReturnType.html +4 -4
  299. package/docs/types/PanoSpatialTagPluginId.html +4 -4
  300. package/docs/types/PanoTagPluginExportInterface.html +4 -4
  301. package/docs/types/PanoTagPluginParamsInterface.html +4 -4
  302. package/docs/types/PanoVideoPluginParameterType.html +4 -4
  303. package/docs/types/PanoVideoPluginReturnType.html +4 -4
  304. package/docs/types/PartialObjectDeep.html +4 -4
  305. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +4 -4
  306. package/docs/types/PlaneTag.html +4 -4
  307. package/docs/types/Point2DTag.html +4 -4
  308. package/docs/types/Point3DTag.html +4 -4
  309. package/docs/types/PointTag.html +4 -4
  310. package/docs/types/PointTagInstance.html +4 -4
  311. package/docs/types/Position.html +4 -4
  312. package/docs/types/RotateArgs.html +4 -4
  313. package/docs/types/RotateOpts.html +4 -4
  314. package/docs/types/RuleLabelsKey.html +4 -4
  315. package/docs/types/RuleLabelsValue.html +4 -4
  316. package/docs/types/StickType.html +4 -4
  317. package/docs/types/Tag.html +4 -4
  318. package/docs/types/Tag2D.html +4 -4
  319. package/docs/types/Tag3D.html +4 -4
  320. package/docs/types/TagContentType.html +4 -4
  321. package/docs/types/TagDimensionType.html +4 -4
  322. package/docs/types/TagElement.html +4 -4
  323. package/docs/types/TagEvents.html +4 -4
  324. package/docs/types/TagGLTFObject.html +4 -4
  325. package/docs/types/TagHooks.html +4 -4
  326. package/docs/types/TagId.html +4 -4
  327. package/docs/types/TagInstance.html +4 -4
  328. package/docs/types/TagPointType.html +4 -4
  329. package/docs/types/TagRendererMap.html +4 -4
  330. package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
  331. package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
  332. package/docs/types/WorkCode.html +4 -4
  333. package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
  334. package/docs/variables/PLUGIN.html +4 -4
  335. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
  336. package/docs/variables/ROOM_TYPE_MAP.html +4 -4
  337. package/docs/variables/itemLabelPluginServerParams.html +4 -4
  338. package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
  339. package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
  340. package/libs/GuideLinePlugin/Components/Tag.js +41 -134
  341. package/libs/GuideLinePlugin/Controller.d.ts +3 -5
  342. package/libs/GuideLinePlugin/Controller.js +44 -48
  343. package/libs/GuideLinePlugin/GuideLineItem/index.js +1 -1
  344. package/libs/GuideLinePlugin/GuideLineItem.d.ts +1 -1
  345. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +113 -150
  346. package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +0 -17
  347. package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -7
  348. package/libs/GuideLinePlugin/utils/createLineGeometry.js +17 -19
  349. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +77 -77
  350. package/libs/Object3DHelperPlugin/Controller.js +3 -2
  351. package/libs/Object3DHelperPlugin/index.js +6 -5
  352. package/libs/PanoMeasurePlugin/Components/Common/CircleButton.js +57 -0
  353. package/libs/PanoMeasurePlugin/Components/Common/CircleButton.svelte.d.ts +1 -0
  354. package/libs/PanoMeasurePlugin/Components/Common/Switcher0.js +250 -0
  355. package/libs/PanoMeasurePlugin/Components/Common/Switcher0.svelte.d.ts +1 -0
  356. package/libs/PanoMeasurePlugin/Components/Common/Switcher1.js +211 -0
  357. package/libs/PanoMeasurePlugin/Components/Common/Switcher1.svelte.d.ts +1 -0
  358. package/libs/PanoMeasurePlugin/Components/Controller0.js +117 -0
  359. package/libs/PanoMeasurePlugin/Components/Controller0.svelte.d.ts +1 -0
  360. package/libs/PanoMeasurePlugin/Components/Controller1.js +157 -0
  361. package/libs/PanoMeasurePlugin/Components/Controller1.svelte.d.ts +1 -0
  362. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +10 -4
  363. package/libs/PanoMeasurePlugin/Controller/BaseController.js +27 -21
  364. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +10 -0
  365. package/libs/PanoMeasurePlugin/Controller/EditController.js +154 -74
  366. package/libs/PanoMeasurePlugin/Controller/MixedController.js +26 -25
  367. package/libs/PanoMeasurePlugin/Controller/ViewController.js +5 -4
  368. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +9 -2
  369. package/libs/PanoMeasurePlugin/Controller/WatchController.js +99 -53
  370. package/libs/PanoMeasurePlugin/Controller/index.d.ts +21 -8
  371. package/libs/PanoMeasurePlugin/Controller/index.js +111 -73
  372. package/libs/PanoMeasurePlugin/Model/area.d.ts +62 -0
  373. package/libs/PanoMeasurePlugin/Model/area.js +98 -0
  374. package/libs/PanoMeasurePlugin/Model/index.d.ts +9 -0
  375. package/libs/PanoMeasurePlugin/Model/index.js +27 -12
  376. package/libs/PanoMeasurePlugin/Model/line.d.ts +4 -1
  377. package/libs/PanoMeasurePlugin/Model/line.js +15 -8
  378. package/libs/PanoMeasurePlugin/Model/polygon.d.ts +10 -0
  379. package/libs/PanoMeasurePlugin/Model/polygon.js +38 -0
  380. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +4 -0
  381. package/libs/PanoMeasurePlugin/Model/polyline.js +15 -8
  382. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +1 -1
  383. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +27 -25
  384. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +2 -1
  385. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +3 -3
  386. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
  387. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -0
  388. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +34 -25
  389. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +1 -1
  390. package/libs/PanoMeasurePlugin/index.js +43 -14
  391. package/libs/PanoMeasurePlugin/typings/data.d.ts +18 -0
  392. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +10 -3
  393. package/libs/PanoMeasurePlugin/typings/index.d.ts +1 -1
  394. package/libs/PanoMeasurePlugin/utils/dom/areaDom.d.ts +22 -0
  395. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +29 -0
  396. package/libs/PanoMeasurePlugin/utils/dom/base.d.ts +25 -0
  397. package/libs/PanoMeasurePlugin/utils/dom/base.js +72 -0
  398. package/libs/PanoMeasurePlugin/utils/dom/distanceItem.d.ts +27 -0
  399. package/libs/PanoMeasurePlugin/utils/dom/distanceItem.js +47 -0
  400. package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.d.ts +6 -0
  401. package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.js +13 -0
  402. package/libs/PanoMeasurePlugin/utils/geometryUtil.d.ts +7 -0
  403. package/libs/PanoMeasurePlugin/utils/geometryUtil.js +37 -0
  404. package/libs/PanoMeasurePlugin/utils/isIntersecting.d.ts +15 -0
  405. package/libs/PanoMeasurePlugin/utils/isIntersecting.js +25 -0
  406. package/libs/PanoMeasurePlugin/utils/line.d.ts +2 -1
  407. package/libs/PanoTagPlugin/controller/TagRender.js +1 -1
  408. package/libs/base/BasePlugin.js +1 -1
  409. package/libs/floorplan/Components/RoomHighlight/Room.js +54 -54
  410. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +8 -8
  411. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +28 -30
  412. package/libs/index.js +123 -110
  413. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +3 -7
  414. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +29 -49
  415. package/libs/shared-utils/logger.js +2 -2
  416. package/libs/shared-utils/safeObj.d.ts +1 -0
  417. package/libs/shared-utils/safeObj.js +6 -0
  418. package/libs/shared-utils/three/IObject3D.d.ts +7 -0
  419. package/libs/shared-utils/three/IObject3D.js +25 -0
  420. package/libs/shared-utils/three/Magnifier.d.ts +3 -0
  421. package/libs/shared-utils/three/Magnifier.js +11 -9
  422. package/libs/shared-utils/three/centerPoint.js +1 -3
  423. package/package.json +4 -2
  424. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +0 -30
  425. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +0 -30
  426. package/libs/PanoMeasurePlugin/utils/distanceDom.js +0 -83
@@ -1,36 +1,41 @@
1
- var y = Object.defineProperty;
2
- var d = Object.getOwnPropertySymbols;
3
- var M = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
4
- var p = (s, e, t) => e in s ? y(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, n = (s, e) => {
1
+ var v = Object.defineProperty;
2
+ var y = Object.getOwnPropertySymbols;
3
+ var I = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
4
+ var c = (s, e, t) => e in s ? v(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, h = (s, e) => {
5
5
  for (var t in e || (e = {}))
6
- M.call(e, t) && p(s, t, e[t]);
7
- if (d)
8
- for (var t of d(e))
9
- P.call(e, t) && p(s, t, e[t]);
6
+ I.call(e, t) && c(s, t, e[t]);
7
+ if (y)
8
+ for (var t of y(e))
9
+ b.call(e, t) && c(s, t, e[t]);
10
10
  return s;
11
11
  };
12
- var i = (s, e, t) => (p(s, typeof e != "symbol" ? e + "" : e, t), t);
13
- import v from "../Modules/Magnifier.js";
14
- import w from "../Modules/FiveHelper.js";
15
- import a from "./EditController.js";
16
- import f from "./ViewController.js";
17
- import g from "./WatchController.js";
18
- import l from "./MixedController.js";
19
- import { omit as I } from "../../shared-utils/filter.js";
20
- import { Group as b } from "three";
21
- import { Model as U } from "../Model/index.js";
22
- import { Subscribe as E } from "@realsee/five";
23
- import { getMouseGroup as k } from "../utils/mouseGroup.js";
24
- import { UIController as C } from "../Modules/UIController/index.js";
25
- import { GuideController as D } from "../Modules/GuideController.js";
26
- import { ShortcutKeyController as G } from "./ShortcutKeyController.js";
12
+ var i = (s, e, t) => (c(s, typeof e != "symbol" ? e + "" : e, t), t);
13
+ import U from "../Modules/FiveHelper.js";
14
+ import m from "./EditController.js";
15
+ import C from "./ViewController.js";
16
+ import M from "./WatchController.js";
17
+ import a from "./MixedController.js";
18
+ import { omit as T } from "../../shared-utils/filter.js";
19
+ import { Group as E } from "three";
20
+ import { Model as k } from "../Model/index.js";
21
+ import { Subscribe as D } from "@realsee/five";
22
+ import { getMouseGroup as G } from "../utils/mouseGroup.js";
23
+ import { UIController as w } from "../Modules/UIController/index.js";
24
+ import { GuideController as x } from "../Modules/GuideController.js";
25
+ import { ShortcutKeyController as H } from "./ShortcutKeyController.js";
26
+ import { safeObj as P } from "../../shared-utils/safeObj.js";
27
+ import { Magnifier as L } from "../../shared-utils/three/Magnifier.js";
28
+ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
29
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
30
+ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
27
31
  import "hammerjs";
28
32
  import "../Model/line.js";
29
33
  import "../../shared-utils/uuid.js";
30
34
  import "../utils/line.js";
31
35
  import "@realsee/five/line";
32
36
  import "../utils/constants.js";
33
- import "../utils/distanceDom.js";
37
+ import "../utils/dom/distanceItem.js";
38
+ import "../utils/dom/base.js";
34
39
  import "../utils/isNDCPointInScreen.js";
35
40
  import "../Model/point.js";
36
41
  import "../../shared-utils/removeArrayItem.js";
@@ -40,6 +45,15 @@ import "../utils/ironbox.js";
40
45
  import "../utils/getIntersectionFromEvent.js";
41
46
  import "../utils/getPointFromHammerEvent.js";
42
47
  import "../Model/polyline.js";
48
+ import "../Model/area.js";
49
+ import "../Model/polygon.js";
50
+ import "../../shared-utils/three/IObject3D.js";
51
+ import "../utils/generatePolygonGeometry.js";
52
+ import "earcut";
53
+ import "../utils/dom/areaDom.js";
54
+ import "../utils/geometryUtil.js";
55
+ import "../../shared-utils/three/centerPoint.js";
56
+ import "../utils/isIntersecting.js";
43
57
  import "../Modules/DeleteDom/index.js";
44
58
  import "../Modules/DeleteDom/_Assets/delete.svg.js";
45
59
  import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
@@ -49,7 +63,6 @@ import "../utils/findClosestPoint.js";
49
63
  import "../utils/ndc2Screen.js";
50
64
  import "../utils/findAssociatedLines.js";
51
65
  import "../Modules/rangePiece/index.js";
52
- import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
53
66
  import "../Modules/rangePiece/html.js";
54
67
  import "../../shared-utils/animationFrame/index.js";
55
68
  import "../../shared-utils/noop.js";
@@ -61,15 +74,35 @@ import "../Modules/UIController/style.js";
61
74
  import "../Modules/UIController/MainBtnController.js";
62
75
  import "../Modules/UIController/mobileMainBtnController.js";
63
76
  import "../Modules/UIController/Revoke/index.js";
64
- class De {
77
+ import "../Components/Controller1.js";
78
+ import "../../vendor/svelte/internal/index.js";
79
+ import "../Components/Common/Switcher1.js";
80
+ import "../Components/Common/CircleButton.js";
81
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
82
+ import "three/examples/jsm/renderers/CSS3DRenderer";
83
+ import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
84
+ import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
85
+ import "../../CSS3DRenderPlugin/utils/even.js";
86
+ import "../../shared-utils/Subscribe.js";
87
+ import "../../CSS3DRenderPlugin/utils/positionToVector3.js";
88
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
89
+ import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
90
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
91
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
92
+ class nt {
65
93
  constructor(e, t) {
66
94
  i(this, "hasOpen", !1);
67
- i(this, "hook", new E());
95
+ i(this, "hook", new D());
68
96
  i(this, "magnifier");
97
+ i(this, "controller", null);
98
+ /** 当前的测量类型 */
99
+ i(this, "currentMeasureType");
69
100
  i(this, "five");
70
101
  i(this, "model");
71
102
  i(this, "group");
72
103
  i(this, "config");
104
+ /** 允许的测量类型 */
105
+ i(this, "allowMeasureType");
73
106
  i(this, "isMobile");
74
107
  i(this, "fiveHelper");
75
108
  i(this, "useUIController");
@@ -77,42 +110,42 @@ class De {
77
110
  i(this, "useGuideController");
78
111
  i(this, "container", document.createElement("div"));
79
112
  i(this, "shortcutKeyController");
80
- i(this, "controller", null);
81
- i(this, "getCurrentMode", () => this.controller instanceof a ? "Edit" : this.controller instanceof g ? "Watch" : this.controller instanceof l ? "Mixed" : this.controller instanceof f ? "View" : null);
113
+ i(this, "getCurrentMode", () => this.controller instanceof m ? "Edit" : this.controller instanceof M ? "Watch" : this.controller instanceof a ? "Mixed" : this.controller instanceof C ? "View" : null);
82
114
  /** 变更场景
83
115
  * @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
84
116
  */
85
117
  i(this, "changeMode", (e) => {
86
- var o;
118
+ var r;
87
119
  if (!this.hasOpen || this.getCurrentMode() === e)
88
120
  return;
89
- (o = this.controller) == null || o.dispose();
121
+ (r = this.controller) == null || r.dispose();
90
122
  const t = {
91
- View: f,
92
- Watch: g,
93
- Edit: a,
94
- Mixed: l
123
+ View: C,
124
+ Watch: M,
125
+ Edit: m,
126
+ Mixed: a
95
127
  };
96
128
  if (!t[e])
97
129
  throw new Error("不存在的 Mode");
98
- const r = this.createControllerParams();
99
- this.controller = new t[e](r), this.hook.emit("modeChange", e);
130
+ const o = this.createControllerParams();
131
+ this.controller = new t[e](o), this.hook.emit("modeChange", e);
100
132
  });
101
- var o, h, c, u;
102
- this.five = e, this.params = t, this.config = I(t, ["openParams", "magnifierParams"]), this.model = new U(this.config), this.fiveHelper = new w(e), this.isMobile = (h = (o = t == null ? void 0 : t.openParams) == null ? void 0 : o.isMobile) != null ? h : !1, this.magnifier = new v(e, (c = t.magnifierParams) != null ? c : { width: 190, height: 190, scale: 2 }), this.group = new b(), this.group.name = "plugin-measure-group", this.container.classList.add("five-plugin-measure-container"), this.container.style.position = "absolute", this.container.style.left = "0", this.container.style.top = "0", this.container.style.pointerEvents = "none", this.container.style.width = "100%", this.container.style.height = "100%", this.container.style.opacity = "0";
103
- const r = (u = this.params.openParams) != null ? u : {};
133
+ /**
134
+ * @description: 切换测量的类型
135
+ */
136
+ i(this, "changeMeasureType", (e) => {
137
+ this.currentMeasureType = e, this.hook.emit("measureTypeChange", e);
138
+ });
139
+ var r, l, n, u, d, f, g;
140
+ this.five = e, this.params = t, this.config = T(t, ["openParams", "magnifierParams"]), this.model = new k(this.config), this.fiveHelper = new U(e), this.isMobile = (l = (r = t == null ? void 0 : t.openParams) == null ? void 0 : r.isMobile) != null ? l : !1, this.magnifier = new L(e, (n = t.magnifierParams) != null ? n : { width: 190, height: 190, scale: 2 }), this.allowMeasureType = Array.from(new Set((d = (u = t.editParams) == null ? void 0 : u.allowMeasureType) != null ? d : ["line"])), this.currentMeasureType = (f = this.allowMeasureType[0]) != null ? f : "line", this.group = new E(), this.group.name = "plugin-measure-group", this.container.classList.add("five-plugin-measure-container"), this.container.style.position = "absolute", this.container.style.left = "0", this.container.style.top = "0", this.container.style.pointerEvents = "none", this.container.style.width = "100%", this.container.style.height = "100%", this.container.style.opacity = "0";
141
+ const o = (g = this.params.openParams) != null ? g : {};
104
142
  if (this.params.useUIController !== !1) {
105
- const m = n({
106
- container: this.container,
107
- openParams: r
108
- }, typeof this.params.useUIController == "object" ? this.params.useUIController : {});
109
- this.useUIController = new C(this, m);
143
+ const p = h({ container: this.container, openParams: o }, P(this.params.useUIController));
144
+ this.useUIController = new w(this, p);
110
145
  }
111
146
  if (this.params.useGuideController !== !1) {
112
- const m = n({
113
- container: this.container
114
- }, typeof this.params.useGuideController == "object" ? this.params.useGuideController : {});
115
- this.useGuideController = new D(this, m);
147
+ const p = h({ container: this.container }, P(this.params.useGuideController));
148
+ this.useGuideController = new x(this, p);
116
149
  }
117
150
  }
118
151
  appendTo(e) {
@@ -135,24 +168,25 @@ class De {
135
168
  */
136
169
  enable(e) {
137
170
  var t;
138
- this.hasOpen || (this.hasOpen = !0, this.five.scene.add(this.group), this.container.style.opacity = "1", e != null && e.mode ? this.changeMode(e.mode) : this.isMobile ? this.changeMode("Mixed") : this.changeMode("Watch"), (t = this.useUIController) == null || t.show(), this.shortcutKeyController = new G(this, this.five), this.hook.emit("enable", !0));
171
+ this.hasOpen || (this.hasOpen = !0, this.five.scene.add(this.group), this.container.style.opacity = "1", e != null && e.mode ? this.changeMode(e.mode) : this.isMobile ? this.changeMode("Mixed") : this.changeMode("Watch"), (t = this.useUIController) == null || t.show(), this.shortcutKeyController = new H(this, this.five), this.hook.emit("enable", !0));
139
172
  }
140
173
  /** 关闭插件功能
141
174
  * @description 清除标尺线条
142
175
  * @description 还原点位展示和默认鼠标 UI
143
176
  */
144
177
  disable() {
145
- var e, t, r, o;
146
- this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.useUIController) == null || t.hide(), (r = this.useGuideController) == null || r.hide(), (o = this.shortcutKeyController) == null || o.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
178
+ var e, t, o, r;
179
+ this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.useUIController) == null || t.hide(), (o = this.useGuideController) == null || o.hide(), (r = this.shortcutKeyController) == null || r.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
147
180
  }
148
181
  /** 进入编辑模式 */
149
- edit() {
150
- const e = this.isMobile ? "Mixed" : "Edit";
151
- this.changeMode(e);
182
+ edit(e) {
183
+ e && this.changeMeasureType(e);
184
+ const t = this.isMobile ? "Mixed" : "Edit";
185
+ this.changeMode(t);
152
186
  }
153
187
  /** 撤销编辑 */
154
188
  revoke() {
155
- this.controller instanceof a && this.controller.revoke();
189
+ this.controller instanceof m && this.controller.revoke();
156
190
  }
157
191
  removePolyline(e) {
158
192
  this.model.removePolyline(e);
@@ -182,21 +216,23 @@ class De {
182
216
  * @description 以下情况可能报错
183
217
  */
184
218
  save(e) {
185
- var o;
186
- if (!(this.controller instanceof a) && !(this.controller instanceof l))
219
+ var l;
220
+ if (!(this.controller instanceof m) && !(this.controller instanceof a))
187
221
  return this;
188
- const t = (o = e == null ? void 0 : e.mode) != null ? o : "View";
189
- return this.controller.model.polylines.forEach((h) => {
190
- this.model.addPolyline(h);
222
+ const t = (l = e == null ? void 0 : e.mode) != null ? l : "View", o = this.controller.model.polylines, r = this.controller.model.areas;
223
+ return o.forEach((n) => {
224
+ this.model.addPolyline(n);
225
+ }), r.forEach((n) => {
226
+ n.polygon.updatePoints(n.points), n.showArea(), this.model.addArea(n);
191
227
  }), this.changeMode(t), this;
192
228
  }
193
229
  /** Mixed 模式才有用,添加起点 */
194
230
  addStartPoint() {
195
- this.controller instanceof l && this.hook.emit("willChangeState", "watching", "editing");
231
+ this.controller instanceof a && this.hook.emit("willChangeState", "watching", "editing");
196
232
  }
197
233
  /** Mixed 模式才有用,添加终点 */
198
234
  addEndPoint() {
199
- this.controller instanceof l && this.hook.emit("willChangeState", "editing", "watching");
235
+ this.controller instanceof a && this.hook.emit("willChangeState", "editing", "watching");
200
236
  }
201
237
  /** 导出数据 */
202
238
  toJson() {
@@ -210,11 +246,11 @@ class De {
210
246
  var t;
211
247
  if (this.isMobile = e, this.params.useUIController !== !1) {
212
248
  (t = this.useUIController) == null || t.dispose();
213
- const r = n({
249
+ const o = h({
214
250
  container: this.container,
215
251
  mode: this.isMobile ? "mobile" : "pc"
216
252
  }, typeof this.params.useUIController == "object" ? this.params.useUIController : {});
217
- this.useUIController = new C(this, r);
253
+ this.useUIController = new w(this, o);
218
254
  }
219
255
  }
220
256
  changeConfigs(e) {
@@ -223,15 +259,15 @@ class De {
223
259
  }
224
260
  /** 设置线段的文本 */
225
261
  setCustomText(e, t) {
226
- var o;
227
- const r = this.model.getLineByID(e);
228
- if (!r)
262
+ var r;
263
+ const o = this.model.getLineByID(e);
264
+ if (!o)
229
265
  throw new Error("不存在的线段");
230
- r.setText(t), (o = this.controller) == null || o.updateDistanceUI();
266
+ o.setText(t), (r = this.controller) == null || r.updateDistanceUI();
231
267
  }
232
268
  createControllerParams() {
233
- var t;
234
- const e = (t = this.params.openParams) != null ? t : {};
269
+ var o, r;
270
+ const e = (o = this.params.openParams) != null ? o : {}, t = (r = this.params.editParams) != null ? r : {};
235
271
  return e.isMobile = this.isMobile, {
236
272
  five: this.five,
237
273
  hook: this.hook,
@@ -242,11 +278,13 @@ class De {
242
278
  container: this.container,
243
279
  fiveHelper: this.fiveHelper,
244
280
  openParams: e,
245
- mouseGroup: k(n({}, e.crossHairParameter)),
281
+ editParams: t,
282
+ getMeasureType: () => this.currentMeasureType,
283
+ mouseGroup: G(h({}, e.crossHairParameter)),
246
284
  userDistanceItemCreator: this.params.userDistanceItemCreator
247
285
  };
248
286
  }
249
287
  }
250
288
  export {
251
- De as default
289
+ nt as default
252
290
  };
@@ -0,0 +1,62 @@
1
+ import * as THREE from 'three';
2
+ import type { Line as FiveLine } from '@realsee/five/line';
3
+ import { Subscribe, type Five, type SubscribeEventMap } from '@realsee/five';
4
+ import PolygonMesh from './polygon';
5
+ import { Polyline } from './polyline';
6
+ import type { Model } from '.';
7
+ import { AreaItem } from '../utils/dom/areaDom';
8
+ export interface AreaHook extends SubscribeEventMap {
9
+ selected: (area: Area, position: {
10
+ left: string;
11
+ top: string;
12
+ }) => void;
13
+ }
14
+ /**
15
+ * @description: 多边形类
16
+ */
17
+ export default class Area {
18
+ id: string;
19
+ selected: boolean;
20
+ text?: string;
21
+ readonly lightMesh: FiveLine;
22
+ readonly areaItem: AreaItem;
23
+ readonly hook: Subscribe<AreaHook>;
24
+ /** 多边形mesh */
25
+ polygon: PolygonMesh;
26
+ /** 多边形顶点 */
27
+ points: THREE.Vector3[];
28
+ /** 多边形前三个点组成的平面,用来使得后面加的点也落在这个平面上 */
29
+ planeHelper: THREE.Plane | null;
30
+ /** 多边形边框 */
31
+ polyline: Polyline;
32
+ /** 多边形mesh容器 */
33
+ private meshContainer;
34
+ /** 多边形dom容器 */
35
+ private domContainer;
36
+ private five;
37
+ private model?;
38
+ constructor(points: THREE.Vector3[] | undefined, config: {
39
+ /** @todo: 这个model整的真的太恶心了 */
40
+ model: Model;
41
+ meshContainer?: THREE.Object3D;
42
+ domContainer?: Element;
43
+ five?: Five;
44
+ });
45
+ addPoints(point: THREE.Vector3): void;
46
+ refresh(): void;
47
+ hideArea(): void;
48
+ showArea(): void;
49
+ /**
50
+ * @description: five camera update 时,更新Dom的位置
51
+ */
52
+ updateDom: () => void;
53
+ /**
54
+ * @description: 获取一个点投影在当前平面上的点
55
+ */
56
+ projectPoint(point: THREE.Vector3): THREE.Vector3;
57
+ remove(): void;
58
+ /**
59
+ * @todo: 没写完
60
+ */
61
+ dispose(): void;
62
+ }
@@ -0,0 +1,98 @@
1
+ var m = Object.defineProperty;
2
+ var d = (o, e, i) => e in o ? m(o, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[e] = i;
3
+ var t = (o, e, i) => (d(o, typeof e != "symbol" ? e + "" : e, i), i);
4
+ import * as r from "three";
5
+ import { uuid as f } from "../../shared-utils/uuid.js";
6
+ import { Subscribe as c } from "@realsee/five";
7
+ import u from "./line.js";
8
+ import v from "./polygon.js";
9
+ import { Polyline as y } from "./polyline.js";
10
+ import h from "./point.js";
11
+ import { AreaItem as C } from "../utils/dom/areaDom.js";
12
+ import "../utils/line.js";
13
+ import "@realsee/five/line";
14
+ import "../utils/constants.js";
15
+ import "../utils/dom/distanceItem.js";
16
+ import "../utils/dom/base.js";
17
+ import "../utils/isNDCPointInScreen.js";
18
+ import "../../shared-utils/three/IObject3D.js";
19
+ import "../utils/generatePolygonGeometry.js";
20
+ import "earcut";
21
+ import "../../shared-utils/removeArrayItem.js";
22
+ import "../utils/geometryUtil.js";
23
+ import "../../shared-utils/three/centerPoint.js";
24
+ class V {
25
+ constructor(e, i) {
26
+ t(this, "id", f());
27
+ t(this, "selected", !1);
28
+ t(this, "text");
29
+ t(this, "lightMesh");
30
+ t(this, "areaItem");
31
+ t(this, "hook", new c());
32
+ /** 多边形mesh */
33
+ t(this, "polygon");
34
+ /** 多边形顶点 */
35
+ t(this, "points", []);
36
+ /** 多边形前三个点组成的平面,用来使得后面加的点也落在这个平面上 */
37
+ t(this, "planeHelper");
38
+ /** 多边形边框 */
39
+ t(this, "polyline");
40
+ /** 多边形mesh容器 */
41
+ t(this, "meshContainer");
42
+ /** 多边形dom容器 */
43
+ t(this, "domContainer");
44
+ t(this, "five");
45
+ t(this, "model");
46
+ /**
47
+ * @description: five camera update 时,更新Dom的位置
48
+ */
49
+ t(this, "updateDom", () => {
50
+ this.five && (this.polyline.lines.forEach((e) => e.distanceItem.update(this.five)), this.areaItem.updateDomPosition(this.five));
51
+ });
52
+ var n;
53
+ e && (this.points = e), this.model = i.model, this.polygon = new v(e), this.polyline = new y({ model: i.model }), this.areaItem = new C({
54
+ area: this,
55
+ clickCallback: (a, s) => {
56
+ const l = a.clientX + "px", p = a.clientY + "px";
57
+ this.hook.emit("selected", this, { left: l, top: p });
58
+ }
59
+ }), this.domContainer = i.domContainer || null, this.meshContainer = i.meshContainer || null, this.five = i.five || null, this.areaItem.appendTo(this.domContainer), (n = this.five) == null || n.on("cameraUpdate", this.updateDom);
60
+ }
61
+ addPoints(e) {
62
+ var a;
63
+ this.points = this.points.concat(e);
64
+ const i = this.points.at(-2), n = this.points.at(-1);
65
+ if (i && n) {
66
+ const s = new u(new h(i), new h(n), this.polyline.model);
67
+ this.polyline.addLine(s), this.meshContainer.add(s.mesh), this.five && (s.distanceItem.setCanSelect(!1), s.distanceItem.appendTo(this.domContainer), s.distanceItem.update(this.five));
68
+ }
69
+ (a = this.meshContainer) != null && a.children.includes(this.polygon) || this.meshContainer.add(this.polygon), this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five), this.points.length === 3 ? this.planeHelper = new r.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.points.length < 3 && (this.planeHelper = null);
70
+ }
71
+ refresh() {
72
+ this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five);
73
+ }
74
+ hideArea() {
75
+ this.polygon.visible = !1, this.areaItem.hide();
76
+ }
77
+ showArea() {
78
+ this.polygon.visible = !0, this.areaItem.show();
79
+ }
80
+ /**
81
+ * @description: 获取一个点投影在当前平面上的点
82
+ */
83
+ projectPoint(e) {
84
+ return this.planeHelper ? this.planeHelper.projectPoint(e, new r.Vector3()) : e;
85
+ }
86
+ remove() {
87
+ this.polygon.removeFromParent(), this.areaItem.remove(), this.polyline.lines.forEach((e) => e.remove());
88
+ }
89
+ /**
90
+ * @todo: 没写完
91
+ */
92
+ dispose() {
93
+ this.remove(), this.model.areas.splice(this.model.areas.indexOf(this), 1), this.planeHelper = null, this.five.off("cameraUpdate", this.updateDom), this.five.needsRender = !0;
94
+ }
95
+ }
96
+ export {
97
+ V as default
98
+ };
@@ -1,5 +1,6 @@
1
1
  import type { Config } from '../typings';
2
2
  import type { PluginData } from '../typings/data';
3
+ import type Area from './area';
3
4
  import type Line from './line';
4
5
  import { Polyline } from './polyline';
5
6
  import { Subscribe } from '@realsee/five';
@@ -8,6 +9,10 @@ type IModelEvent = {
8
9
  * @param line 被创建的线条
9
10
  */
10
11
  polylineAdded: (line: Polyline) => void;
12
+ /** 新增面积
13
+ * @param area 被创建的面积
14
+ */
15
+ areaAdded: (area: Area) => void;
11
16
  /** 删除线条
12
17
  * @param lines 被删除的线条数组
13
18
  */
@@ -16,18 +21,22 @@ type IModelEvent = {
16
21
  export declare class Model {
17
22
  readonly config?: Config;
18
23
  readonly polylines: Polyline[];
24
+ readonly areas: Area[];
19
25
  readonly hook: Subscribe<IModelEvent>;
20
26
  constructor(config?: Config);
21
27
  addPolyline(polyline: Polyline): void;
28
+ addArea(area: Area): void;
22
29
  replacePolylineByID(id: string, polyline: Polyline): void;
23
30
  removePolyline(polyline: Polyline): void;
24
31
  getPolylineByID(id: string): Polyline;
25
32
  getPolylineByLine(line: Line): Polyline;
26
33
  getLineByID(id: string): Line;
27
34
  getAllLines(): Line[];
35
+ getAllAreas(): Area[];
28
36
  getAllPoints(): import("./point").default[];
29
37
  includes(item: Polyline): boolean;
30
38
  clear(): void;
39
+ dispose(): void;
31
40
  getClosestPoint(): void;
32
41
  parse(data: PluginData): void;
33
42
  toJson(): PluginData;
@@ -1,7 +1,7 @@
1
- var n = Object.defineProperty;
2
- var s = (o, i, e) => i in o ? n(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e;
3
- var t = (o, i, e) => (s(o, typeof i != "symbol" ? i + "" : i, e), e);
4
- import { Polyline as r } from "./polyline.js";
1
+ var l = Object.defineProperty;
2
+ var r = (o, i, e) => i in o ? l(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e;
3
+ var t = (o, i, e) => (r(o, typeof i != "symbol" ? i + "" : i, e), e);
4
+ import { Polyline as n } from "./polyline.js";
5
5
  import { Subscribe as p } from "@realsee/five";
6
6
  import "./line.js";
7
7
  import "../../shared-utils/uuid.js";
@@ -9,14 +9,16 @@ import "../utils/line.js";
9
9
  import "@realsee/five/line";
10
10
  import "../utils/constants.js";
11
11
  import "three";
12
- import "../utils/distanceDom.js";
12
+ import "../utils/dom/distanceItem.js";
13
+ import "../utils/dom/base.js";
13
14
  import "../utils/isNDCPointInScreen.js";
14
15
  import "./point.js";
15
16
  import "../../shared-utils/removeArrayItem.js";
16
- class I {
17
+ class B {
17
18
  constructor(i) {
18
19
  t(this, "config");
19
20
  t(this, "polylines", []);
21
+ t(this, "areas", []);
20
22
  t(this, "hook", new p());
21
23
  this.config = i;
22
24
  }
@@ -27,12 +29,19 @@ class I {
27
29
  }
28
30
  this.polylines.push(i), this.hook.emit("polylineAdded", i);
29
31
  }
32
+ addArea(i) {
33
+ if (this.areas.find(({ id: e }) => e === i.id) !== void 0) {
34
+ console.error(new Error("不能重复添加 area"));
35
+ return;
36
+ }
37
+ this.areas.push(i), this.hook.emit("areaAdded", i);
38
+ }
30
39
  replacePolylineByID(i, e) {
31
- const l = this.getPolylineByID(i);
32
- l == null || l.replace(e);
40
+ const s = this.getPolylineByID(i);
41
+ s == null || s.replace(e);
33
42
  }
34
43
  removePolyline(i) {
35
- const e = this.polylines.findIndex(({ id: l }) => l === i.id);
44
+ const e = this.polylines.findIndex(({ id: s }) => s === i.id);
36
45
  if (e === -1) {
37
46
  console.error(new Error("polyline 不存在"));
38
47
  return;
@@ -51,6 +60,9 @@ class I {
51
60
  getAllLines() {
52
61
  return this.polylines.map((i) => i.lines).flat(1);
53
62
  }
63
+ getAllAreas() {
64
+ return this.areas;
65
+ }
54
66
  getAllPoints() {
55
67
  return this.polylines.map((i) => i.points).flat(1);
56
68
  }
@@ -58,12 +70,15 @@ class I {
58
70
  return this.polylines.find(({ id: e }) => e === i.id) !== void 0;
59
71
  }
60
72
  clear() {
61
- this.polylines.forEach((i) => this.hook.emit("polylineRemoved", i)), this.polylines.splice(0, this.polylines.length);
73
+ this.polylines.forEach((i) => this.hook.emit("polylineRemoved", i)), this.areas.forEach((i) => i.dispose()), this.polylines.splice(0, this.polylines.length), this.areas.splice(0, this.areas.length);
74
+ }
75
+ dispose() {
76
+ this.clear();
62
77
  }
63
78
  getClosestPoint() {
64
79
  }
65
80
  parse(i) {
66
- this.clear(), this.polylines.push(...i.polylines.map((e) => new r({ model: this }).fromJson(e))), this.polylines.forEach((e) => this.hook.emit("polylineAdded", e));
81
+ this.clear(), this.polylines.push(...i.polylines.map((e) => new n({ model: this }).fromJson(e))), this.polylines.forEach((e) => this.hook.emit("polylineAdded", e));
67
82
  }
68
83
  toJson() {
69
84
  return {
@@ -72,5 +87,5 @@ class I {
72
87
  }
73
88
  }
74
89
  export {
75
- I as Model
90
+ B as Model
76
91
  };
@@ -4,7 +4,8 @@ import type { LineJson } from '../typings/data';
4
4
  import type { Line as FiveLine } from '@realsee/five/line';
5
5
  import type { Polyline } from './polyline';
6
6
  import { Subscribe, type SubscribeEventMap } from '@realsee/five';
7
- import { type DistanceItem } from '../utils/distanceDom';
7
+ import { DistanceItem } from '../utils/dom/distanceItem';
8
+ import type * as THREE from 'three';
8
9
  export interface ILineHook extends SubscribeEventMap {
9
10
  selected: (line: Line) => void;
10
11
  textChanged: (text: string | undefined) => void;
@@ -22,6 +23,8 @@ export default class Line {
22
23
  readonly distanceItem: DistanceItem;
23
24
  private polyline?;
24
25
  constructor(point: Point, anotherPoint: Point, model: Model);
26
+ setPoints(startPoint: THREE.Vector3, endPoint: THREE.Vector3): void;
27
+ remove(): void;
25
28
  clear(): void;
26
29
  isEmpty(): boolean;
27
30
  getPolyline(): Polyline;