@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
@@ -0,0 +1,157 @@
1
+ import { SvelteComponent as $, init as j, safe_not_equal as q, append_styles as B, element as p, create_component as y, space as w, attr as v, toggle_class as S, insert as D, append as i, mount_component as A, listen as P, transition_in as T, transition_out as E, detach as W, destroy_component as K, run_all as F, onMount as G, onDestroy as H } from "../../vendor/svelte/internal/index.js";
2
+ import I from "./Common/Switcher1.js";
3
+ import J from "./Common/CircleButton.js";
4
+ import "../Modules/UIController/mobileHTML.js";
5
+ function L(o) {
6
+ B(o, "svelte-12klgza", ".Measure-Controller.svelte-12klgza.svelte-12klgza{pointer-events:none;color:white}.Measure-Controller.svelte-12klgza .mode-switcher.svelte-12klgza{margin-top:2.25rem}.Measure-Controller.svelte-12klgza .bottom.svelte-12klgza{position:absolute;width:100%;bottom:2.5rem}.Measure-Controller.svelte-12klgza .bottom .center.svelte-12klgza{display:flex;flex-direction:column;align-items:center}.Measure-Controller.svelte-12klgza .controller.svelte-12klgza{pointer-events:all;display:flex;align-items:center}.Measure-Controller.svelte-12klgza .controller .button.svelte-12klgza{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;padding-left:1rem;padding-right:1rem;border-radius:624.9375rem;font-size:0.875rem;background-color:rgba(0, 0, 0, 0.2)}.Measure-Controller.svelte-12klgza .controller .main-button.svelte-12klgza{margin-left:1.75rem;margin-right:1.75rem}.Measure-Controller.svelte-12klgza .controller .main-button.forbid.svelte-12klgza{pointer-events:none;opacity:0.5}");
7
+ }
8
+ function N(o) {
9
+ let d, n, e, k, u, z, r, a, h, c, g, M, m, f, C, _;
10
+ return u = new I({
11
+ props: {
12
+ options: [{ key: "line", value: "测距离" }, { key: "area", value: "测面积" }],
13
+ defaultKey: (
14
+ /*measureController*/
15
+ o[0].currentMeasureType
16
+ ),
17
+ onChange: (
18
+ /*func*/
19
+ o[10]
20
+ )
21
+ }
22
+ }), g = new J({
23
+ props: {
24
+ onClick: (
25
+ /*func_1*/
26
+ o[12]
27
+ ),
28
+ text: (
29
+ /*buttonTextMap*/
30
+ o[3][
31
+ /*buttonState*/
32
+ o[2]
33
+ ]
34
+ ),
35
+ color: (
36
+ /*buttonColorMap*/
37
+ o[4][
38
+ /*buttonState*/
39
+ o[2]
40
+ ]
41
+ )
42
+ }
43
+ }), {
44
+ c() {
45
+ d = p("div"), n = p("div"), e = p("div"), k = p("div"), y(u.$$.fragment), z = w(), r = p("div"), a = p("div"), a.textContent = "撤销", h = w(), c = p("div"), y(g.$$.fragment), M = w(), m = p("div"), m.textContent = "结束", v(k, "class", "mode-switcher svelte-12klgza"), v(a, "class", "button svelte-12klgza"), v(c, "class", "main-button svelte-12klgza"), S(c, "forbid", !/*allowAddPoint*/
46
+ o[1]), v(m, "class", "button svelte-12klgza"), v(r, "class", "controller svelte-12klgza"), v(e, "class", "center svelte-12klgza"), v(n, "class", "bottom svelte-12klgza"), v(d, "class", "Measure-Controller svelte-12klgza");
47
+ },
48
+ m(t, s) {
49
+ D(t, d, s), i(d, n), i(n, e), i(e, k), A(u, k, null), i(e, z), i(e, r), i(r, a), i(r, h), i(r, c), A(g, c, null), i(r, M), i(r, m), f = !0, C || (_ = [
50
+ P(
51
+ a,
52
+ "click",
53
+ /*click_handler*/
54
+ o[11]
55
+ ),
56
+ P(
57
+ m,
58
+ "click",
59
+ /*click_handler_1*/
60
+ o[13]
61
+ )
62
+ ], C = !0);
63
+ },
64
+ p(t, [s]) {
65
+ const b = {};
66
+ s & /*measureController*/
67
+ 1 && (b.defaultKey = /*measureController*/
68
+ t[0].currentMeasureType), s & /*measureController*/
69
+ 1 && (b.onChange = /*func*/
70
+ t[10]), u.$set(b);
71
+ const l = {};
72
+ s & /*buttonState*/
73
+ 4 && (l.onClick = /*func_1*/
74
+ t[12]), s & /*buttonState*/
75
+ 4 && (l.text = /*buttonTextMap*/
76
+ t[3][
77
+ /*buttonState*/
78
+ t[2]
79
+ ]), s & /*buttonState*/
80
+ 4 && (l.color = /*buttonColorMap*/
81
+ t[4][
82
+ /*buttonState*/
83
+ t[2]
84
+ ]), g.$set(l), (!f || s & /*allowAddPoint*/
85
+ 2) && S(c, "forbid", !/*allowAddPoint*/
86
+ t[1]);
87
+ },
88
+ i(t) {
89
+ f || (T(u.$$.fragment, t), T(g.$$.fragment, t), f = !0);
90
+ },
91
+ o(t) {
92
+ E(u.$$.fragment, t), E(g.$$.fragment, t), f = !1;
93
+ },
94
+ d(t) {
95
+ t && W(d), K(u), K(g), C = !1, F(_);
96
+ }
97
+ };
98
+ }
99
+ function O(o, d, n) {
100
+ let { measureController: e } = d;
101
+ const k = { start: "开始", add: "添加", end: "结束" }, u = {
102
+ start: "white",
103
+ add: "white",
104
+ end: "blue"
105
+ };
106
+ let z = !0, r = !1, a = "editing", h = "start";
107
+ const c = () => {
108
+ n(8, r = !0), e.getCurrentMode() !== "Edit" && e.changeMode("Edit");
109
+ }, g = () => {
110
+ }, M = () => {
111
+ }, m = (l) => {
112
+ l === "Edit" ? n(9, a = "editing") : n(9, a = null);
113
+ }, f = () => {
114
+ n(9, a = "readyComplete");
115
+ }, C = (l) => {
116
+ n(1, z = l === "allow");
117
+ };
118
+ G(() => {
119
+ e.hook.on("modeChange", m), e.hook.on("allowAddPointStateChange", C), e.hook.on("readyComplete", f);
120
+ }), H(() => {
121
+ e.hook.off("modeChange", m), e.hook.off("allowAddPointStateChange", C), e.hook.off("readyComplete", f);
122
+ });
123
+ const _ = (l) => {
124
+ e.changeMeasureType(l);
125
+ }, t = () => e.revoke(), s = () => {
126
+ h === "start" && c();
127
+ }, b = () => e.save({ mode: "Watch" });
128
+ return o.$$set = (l) => {
129
+ "measureController" in l && n(0, e = l.measureController);
130
+ }, o.$$.update = () => {
131
+ o.$$.dirty & /*started, state*/
132
+ 768 && n(2, h = (() => r ? a === "editing" ? "add" : a === "readyComplete" ? "end" : "start" : "start")());
133
+ }, [
134
+ e,
135
+ z,
136
+ h,
137
+ k,
138
+ u,
139
+ c,
140
+ g,
141
+ M,
142
+ r,
143
+ a,
144
+ _,
145
+ t,
146
+ s,
147
+ b
148
+ ];
149
+ }
150
+ class X extends $ {
151
+ constructor(d) {
152
+ super(), j(this, d, O, N, q, { measureController: 0 }, L);
153
+ }
154
+ }
155
+ export {
156
+ X as default
157
+ };
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -1,13 +1,13 @@
1
- import type Magnifier from '../Modules/Magnifier';
2
1
  import type FiveHelper from '../Modules/FiveHelper';
3
- import type { Group } from 'three';
2
+ import { type Group } from 'three';
4
3
  import type { Model } from '../Model';
5
4
  import type { Config } from '../typings';
6
5
  import type { PanoMeasurePluginEvent } from '../typings/event.type';
7
- import type { UserDistanceItem } from '../utils/distanceDom';
6
+ import type { UserDistanceItem } from '../utils/dom/distanceItem';
8
7
  import type { Five, Intersection, IntersectMeshInterface, Subscribe } from '@realsee/five';
9
- import type { OpenParameter } from '../typings/data';
8
+ import type { OpenParameter, EditParameter, MeasureType } from '../typings/data';
10
9
  import Line from '../Model/line';
10
+ import type { Magnifier } from '../../shared-utils';
11
11
  export interface ControllerParams {
12
12
  five: Five;
13
13
  group: Group;
@@ -18,6 +18,8 @@ export interface ControllerParams {
18
18
  magnifier: Magnifier;
19
19
  fiveHelper: FiveHelper;
20
20
  openParams: OpenParameter;
21
+ editParams: EditParameter;
22
+ getMeasureType: () => MeasureType;
21
23
  hook: Subscribe<PanoMeasurePluginEvent>;
22
24
  userDistanceItemCreator?: () => UserDistanceItem;
23
25
  }
@@ -27,14 +29,18 @@ export default class BaseController {
27
29
  protected group: Group;
28
30
  protected config: Config;
29
31
  protected dashed: Line;
32
+ protected perpendicularDashed: Line;
30
33
  protected disposed: boolean;
31
34
  protected isMobile: boolean;
32
35
  protected mouseGroup: Group;
33
36
  protected container: Element;
34
37
  protected fiveHelper: FiveHelper;
38
+ protected editParams: EditParameter;
35
39
  protected hook: ControllerParams['hook'];
36
40
  protected magnifier: ControllerParams['magnifier'];
37
41
  protected userDistanceItemCreator: ControllerParams['userDistanceItemCreator'];
42
+ protected get currentMeasureType(): MeasureType;
43
+ private getMeasureType;
38
44
  constructor(params: ControllerParams);
39
45
  updateDistanceUI: () => void;
40
46
  protected removeLine(line: Line): void;
@@ -1,62 +1,68 @@
1
- var a = Object.defineProperty;
2
- var l = (i, e, o) => e in i ? a(i, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : i[e] = o;
3
- var t = (i, e, o) => (l(i, typeof e != "symbol" ? e + "" : e, o), o);
4
- import u from "../Model/line.js";
5
- import m from "../Model/point.js";
6
- import { preventDefault as r } from "../utils/ironbox.js";
1
+ var m = Object.defineProperty;
2
+ var l = (s, e, i) => e in s ? m(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
3
+ var t = (s, e, i) => (l(s, typeof e != "symbol" ? e + "" : e, i), i);
4
+ import { Color as u } from "three";
5
+ import h from "../Model/line.js";
6
+ import r from "../Model/point.js";
7
+ import { preventDefault as n } from "../utils/ironbox.js";
7
8
  import "../../shared-utils/uuid.js";
8
9
  import "../utils/line.js";
9
10
  import "@realsee/five/line";
10
11
  import "../utils/constants.js";
11
- import "three";
12
12
  import "@realsee/five";
13
- import "../utils/distanceDom.js";
13
+ import "../utils/dom/distanceItem.js";
14
+ import "../utils/dom/base.js";
14
15
  import "../utils/isNDCPointInScreen.js";
15
16
  import "../../shared-utils/removeArrayItem.js";
16
- class w {
17
+ class P {
17
18
  constructor(e) {
18
19
  t(this, "model");
19
20
  t(this, "five");
20
21
  t(this, "group");
21
22
  t(this, "config");
22
23
  t(this, "dashed");
24
+ t(this, "perpendicularDashed");
23
25
  t(this, "disposed", !1);
24
26
  t(this, "isMobile");
25
27
  t(this, "mouseGroup");
26
28
  t(this, "container");
27
29
  t(this, "fiveHelper");
30
+ t(this, "editParams");
28
31
  t(this, "hook");
29
32
  t(this, "magnifier");
30
33
  t(this, "userDistanceItemCreator");
34
+ t(this, "getMeasureType");
31
35
  t(this, "updateDistanceUI", () => {
32
36
  this.dashed.distanceItem.update(this.five), this.model.getAllLines().forEach((e) => e.distanceItem.update(this.five));
33
37
  });
34
- var s, n;
35
- this.five = e.five, this.hook = e.hook, this.model = e.model, this.config = e.config, this.magnifier = e.magnifier, this.container = e.container, this.fiveHelper = e.fiveHelper, this.isMobile = (n = (s = e.openParams) == null ? void 0 : s.isMobile) != null ? n : !1, this.userDistanceItemCreator = e.userDistanceItemCreator, this.group = e.group, this.mouseGroup = e.mouseGroup, this.dashed = new u(new m([0, 0, 0]), new m([0, 0, 0]), this.model), this.dashed.distanceItem.setItemSelectable(!1), this.dashed.mesh.setMaterial({ dashed: !0, dashScale: 100 }), this.dashed.mesh.name = "dashLine";
36
- const o = this.five.getElement();
37
- o && (o.addEventListener("touchstart", r), o.addEventListener("contextmenu", r));
38
+ var a, o;
39
+ this.five = e.five, this.hook = e.hook, this.model = e.model, this.getMeasureType = e.getMeasureType, this.config = e.config, this.magnifier = e.magnifier, this.container = e.container, this.fiveHelper = e.fiveHelper, this.editParams = e.editParams, this.isMobile = (o = (a = e.openParams) == null ? void 0 : a.isMobile) != null ? o : !1, this.userDistanceItemCreator = e.userDistanceItemCreator, this.group = e.group, this.mouseGroup = e.mouseGroup, this.dashed = new h(new r([0, 0, 0]), new r([0, 0, 0]), this.model), this.dashed.distanceItem.setCanSelect(!1), this.dashed.mesh.setMaterial({ dashed: !0, dashScale: 100 }), this.dashed.mesh.name = "dashLine", console.log(this.dashed), this.perpendicularDashed = new h(new r([0, 0, 0]), new r([0, 0, 0]), this.model), this.perpendicularDashed.distanceItem.setCanSelect(!1), this.perpendicularDashed.mesh.setMaterial({ dashed: !0, dashScale: 40, color: new u(10218089) }), this.perpendicularDashed.mesh.name = "perpendicularDashLine";
40
+ const i = this.five.getElement();
41
+ i && (i.addEventListener("touchstart", n), i.addEventListener("contextmenu", n));
42
+ }
43
+ get currentMeasureType() {
44
+ return this.getMeasureType();
38
45
  }
39
46
  removeLine(e) {
40
47
  this.group.remove(e.mesh, e.lightMesh), e.distanceItem.remove(), this.five.needsRender = !0;
41
48
  }
42
- updateMouseGroup(e, o) {
49
+ updateMouseGroup(e, i) {
43
50
  if (!e)
44
51
  return this.mouseGroup;
45
- const s = this.fiveHelper.getAdsorbentPoint(e), n = s || e.point;
46
- if (this.mouseGroup.position.copy(n), o)
47
- this.mouseGroup.quaternion.copy(o.quaternion);
52
+ if (this.mouseGroup.position.copy(e.point), i)
53
+ this.mouseGroup.quaternion.copy(i.quaternion);
48
54
  else if (e.face) {
49
- const h = e.face.normal.clone().multiplyScalar(0.05), d = e.point.clone().add(h).clone().add(h);
55
+ const o = e.face.normal.clone().multiplyScalar(0.05), d = e.point.clone().add(o).clone().add(o);
50
56
  this.mouseGroup.lookAt(d);
51
57
  }
52
58
  return this.mouseGroup;
53
59
  }
54
60
  dispose() {
55
- this.disposed = !0, this.magnifier.disable(), this.model.getAllLines().forEach((o) => this.removeLine(o));
61
+ this.disposed = !0, this.magnifier.disable(), this.model.getAllLines().forEach((i) => this.removeLine(i)), this.model.areas.forEach((i) => i.remove());
56
62
  const e = this.five.getElement();
57
- e && (e.removeEventListener("touchstart", r), e.removeEventListener("contextmenu", r));
63
+ e && (e.removeEventListener("touchstart", n), e.removeEventListener("contextmenu", n));
58
64
  }
59
65
  }
60
66
  export {
61
- w as default
67
+ P as default
62
68
  };
@@ -2,9 +2,11 @@ import Line from '../Model/line';
2
2
  import BaseController from './BaseController';
3
3
  import type { ControllerParams } from './BaseController';
4
4
  import { Polyline } from '../Model/polyline';
5
+ import Area from '../Model/area';
5
6
  export default class EditController extends BaseController {
6
7
  type: string;
7
8
  polyline: Polyline;
9
+ area: Area;
8
10
  /** 拖动的控制点 */
9
11
  private pressPoint?;
10
12
  private hasAppendDashed;
@@ -20,6 +22,14 @@ export default class EditController extends BaseController {
20
22
  getEditingLines(): Line[];
21
23
  /** 撤销编辑 */
22
24
  revoke: () => void;
25
+ /**
26
+ * @description: 测面积的撤销功能
27
+ */
28
+ revokeArea: () => void;
29
+ /**
30
+ * @description: 测距的撤销功能
31
+ */
32
+ revokeLine: (_polyline?: Polyline) => void;
23
33
  private onMouseLeave;
24
34
  /** 编辑线条发生改变时通知外部 */
25
35
  private onLineChanged;
@@ -1,130 +1,210 @@
1
- var d = Object.defineProperty;
2
- var l = (h, n, e) => n in h ? d(h, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[n] = e;
3
- var i = (h, n, e) => (l(h, typeof n != "symbol" ? n + "" : n, e), e);
4
- import m from "hammerjs";
5
- import { Model as u } from "../Model/index.js";
6
- import f from "../Model/line.js";
7
- import p from "../Model/point.js";
8
- import { throttle as v } from "../../shared-utils/throttle.js";
9
- import c from "./BaseController.js";
10
- import { getIntersectionFromEvent as r } from "../utils/getIntersectionFromEvent.js";
11
- import { Polyline as P } from "../Model/polyline.js";
12
- import "@realsee/five";
1
+ var y = Object.defineProperty;
2
+ var T = (r, a, i) => a in r ? y(r, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[a] = i;
3
+ var s = (r, a, i) => (T(r, typeof a != "symbol" ? a + "" : a, i), i);
4
+ import C from "hammerjs";
5
+ import G from "../Model/line.js";
6
+ import c from "../Model/point.js";
7
+ import { throttle as A } from "../../shared-utils/throttle.js";
8
+ import M from "./BaseController.js";
9
+ import { getIntersectionFromEvent as f } from "../utils/getIntersectionFromEvent.js";
10
+ import { Polyline as v } from "../Model/polyline.js";
11
+ import P from "../Model/area.js";
12
+ import g from "../utils/isIntersecting.js";
13
13
  import "../../shared-utils/uuid.js";
14
14
  import "../utils/line.js";
15
15
  import "@realsee/five/line";
16
16
  import "../utils/constants.js";
17
17
  import "three";
18
- import "../utils/distanceDom.js";
18
+ import "@realsee/five";
19
+ import "../utils/dom/distanceItem.js";
20
+ import "../utils/dom/base.js";
19
21
  import "../utils/isNDCPointInScreen.js";
20
22
  import "../../shared-utils/removeArrayItem.js";
21
23
  import "../utils/ironbox.js";
22
24
  import "../utils/getPointFromHammerEvent.js";
23
- class V extends c {
24
- constructor(e) {
25
- var s;
26
- super(e);
27
- i(this, "type", "edit");
28
- i(this, "polyline");
25
+ import "../Model/polygon.js";
26
+ import "../../shared-utils/three/IObject3D.js";
27
+ import "../utils/generatePolygonGeometry.js";
28
+ import "earcut";
29
+ import "../utils/dom/areaDom.js";
30
+ import "../utils/geometryUtil.js";
31
+ import "../../shared-utils/three/centerPoint.js";
32
+ class ee extends M {
33
+ constructor(i) {
34
+ var o;
35
+ super(i);
36
+ s(this, "type", "edit");
37
+ s(this, "polyline");
38
+ s(this, "area");
29
39
  /** 拖动的控制点 */
30
- i(this, "pressPoint");
31
- i(this, "hasAppendDashed", !1);
32
- i(this, "hasAppendMouseGroup", !1);
33
- i(this, "fiveElement");
40
+ s(this, "pressPoint");
41
+ s(this, "hasAppendDashed", !1);
42
+ s(this, "hasAppendMouseGroup", !1);
43
+ s(this, "fiveElement");
34
44
  /** 上一个端点位置 */
35
- i(this, "lastPoint", null);
36
- i(this, "hammer");
45
+ s(this, "lastPoint", null);
46
+ s(this, "hammer");
37
47
  /** 根据 intersection 更新放大镜和吸附点 */
38
- i(this, "onIntersectionUpdate", v((e, t) => {
39
- var o;
48
+ s(this, "onIntersectionUpdate", A((i, e) => {
49
+ var t;
40
50
  this.hasAppendMouseGroup === !1 && (this.group.add(this.mouseGroup), this.magnifier.appendTo(this.container), this.magnifier.enable(), this.hasAppendMouseGroup = !0);
41
- const s = this.updateMouseGroup(e, t).position;
42
- (o = this.pressPoint) == null || o.position.copy(s), this.updateDashed(), requestAnimationFrame(() => this.magnifier.renderWithPoint(this.mouseGroup.position)), this.five.needsRender = !0;
51
+ const o = this.updateMouseGroup(i, e).position;
52
+ (t = this.pressPoint) == null || t.position.copy(o), this.updateDashed(), requestAnimationFrame(() => this.magnifier.renderWithPoint(this.mouseGroup.position)), this.five.needsRender = !0;
43
53
  }, 20));
44
54
  /** 撤销编辑 */
45
- i(this, "revoke", () => {
46
- if (this.polyline.lines.length === 0 && this.lastPoint) {
47
- this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.distanceItem.remove(), this.group.remove(this.dashed.mesh), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0;
55
+ s(this, "revoke", () => {
56
+ this.currentMeasureType === "area" ? this.revokeArea() : this.currentMeasureType === "line" && this.revokeLine();
57
+ });
58
+ /**
59
+ * @description: 测面积的撤销功能
60
+ */
61
+ s(this, "revokeArea", () => {
62
+ this.area.points.length !== 0 && (this.revokeLine(this.area.polyline), this.area.points.pop(), this.area.refresh());
63
+ });
64
+ /**
65
+ * @description: 测距的撤销功能
66
+ */
67
+ s(this, "revokeLine", (i) => {
68
+ const e = i || this.polyline;
69
+ if (e.lines.length === 0 && this.lastPoint) {
70
+ this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0;
48
71
  return;
49
72
  }
50
- if (this.polyline.lines.length === 0 && !this.lastPoint || !this.lastPoint)
73
+ if (e.lines.length === 0 && !this.lastPoint || !this.lastPoint)
51
74
  return;
52
- const e = this.polyline.lines[this.polyline.lines.length - 1], t = e.findAnotherPoint(this.lastPoint);
53
- t && (this.lastPoint = t, this.hook.emit("anchorChange", t.position), this.group.remove(e.mesh), this.polyline.removeLine(e), this.hasAppendMouseGroup = !1, this.mouseGroup.position.copy(this.lastPoint.position), this.group.remove(this.mouseGroup), e.distanceItem.remove(), this.updateDashed(), this.magnifier.disable(), this.five.needsRender = !0);
75
+ const o = e.lines[e.lines.length - 1], t = o.findAnotherPoint(this.lastPoint);
76
+ t && (this.lastPoint = t, this.hook.emit("anchorChange", t.position), this.group.remove(o.mesh), e.removeLine(o), this.hasAppendMouseGroup = !1, this.mouseGroup.position.copy(this.lastPoint.position), this.group.remove(this.mouseGroup), o.distanceItem.remove(), this.updateDashed(), this.magnifier.disable(), this.five.needsRender = !0);
54
77
  });
55
- i(this, "onMouseLeave", () => {
56
- this.magnifier.disable(), this.group.remove(this.mouseGroup), this.hasAppendMouseGroup = !1, this.lastPoint && (this.mouseGroup.position.copy(this.lastPoint.position), this.updateDashed());
78
+ s(this, "onMouseLeave", () => {
79
+ this.magnifier.disable(), this.group.remove(this.mouseGroup), this.hasAppendMouseGroup = !1, this.lastPoint && (this.mouseGroup.position.copy(this.lastPoint.position), this.updateDashed()), this.area.hideArea();
57
80
  });
58
81
  /** 编辑线条发生改变时通知外部 */
59
- i(this, "onLineChanged", () => {
82
+ s(this, "onLineChanged", () => {
60
83
  this.hook.emit("editedPolylineChange", this.polyline);
61
84
  });
62
- i(this, "onPress", (e) => {
63
- const [t] = r(this.five, e);
64
- if (!(t != null && t.face))
85
+ s(this, "onPress", (i) => {
86
+ const [e] = f(this.five, i);
87
+ if (!(e != null && e.face))
65
88
  return;
66
- const s = new p(t.point);
67
- this.pressPoint = s, this.onIntersectionUpdate(t);
89
+ const o = new c(e.point);
90
+ this.pressPoint = o, this.onIntersectionUpdate(e);
68
91
  });
69
92
  /**
70
93
  * 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
71
94
  * 2. 如果有长按点,把长按点位置更新为当前位置
72
95
  */
73
- i(this, "onPan", (e) => {
96
+ s(this, "onPan", (i) => {
74
97
  if (!this.pressPoint)
75
98
  return;
76
- const [t] = r(this.five, e);
77
- t != null && t.face && this.onIntersectionUpdate(t);
99
+ const [e] = f(this.five, i);
100
+ e != null && e.face && this.onIntersectionUpdate(e);
78
101
  });
79
- i(this, "onPanEnd", (e) => {
80
- this.pressPoint && this.onTap(e);
102
+ s(this, "onPanEnd", (i) => {
103
+ this.pressPoint && this.onTap(i);
81
104
  });
82
105
  /**
83
106
  * 1. 如果存在上一个点,需要绘制当前点到上一个点的连线
84
107
  * 2. 把上一个点的位置更新为当前点的位置
85
108
  * 3. 清除 mouseGroup 和 magnifier
86
109
  */
87
- i(this, "onTap", (e) => {
88
- this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh)), this.hasAppendDashed = !0;
89
- const [t] = r(this.five, e);
90
- this.updateMouseGroup(t);
91
- const s = new p(this.mouseGroup.position), o = this.lastPoint;
92
- if (s && (this.lastPoint = s), s && o) {
93
- const a = new f(o, s, this.model);
94
- a.distanceItem.setItemSelectable(!1), a.distanceItem.appendTo(this.container), this.polyline.addLine(a), this.group.add(a.mesh), a.distanceItem.update(this.five);
110
+ s(this, "onTap", (i) => {
111
+ var p, l, m, u;
112
+ this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh), this.currentMeasureType === "area" && this.group.add(this.perpendicularDashed.mesh)), this.hasAppendDashed = !0;
113
+ const [e] = f(this.five, i);
114
+ this.updateMouseGroup(e);
115
+ const o = (() => {
116
+ if (this.currentMeasureType === "area")
117
+ return this.area.projectPoint(this.mouseGroup.position);
118
+ if (this.currentMeasureType === "line")
119
+ return this.mouseGroup.position;
120
+ })();
121
+ if (!o)
122
+ return;
123
+ const t = new c(o), h = this.lastPoint;
124
+ if (this.lastPoint = t, this.currentMeasureType === "line") {
125
+ if (t && h) {
126
+ const d = new G(h, t, this.model);
127
+ d.distanceItem.setCanSelect(!1), d.distanceItem.appendTo(this.container), this.polyline.addLine(d), this.group.add(d.mesh), d.distanceItem.update(this.five);
128
+ }
129
+ const n = (l = (p = this.editParams) == null ? void 0 : p.autoEndConfig) == null ? void 0 : l.line;
130
+ typeof n == "number" && (this.polyline.getPointLength() >= n ? (this.hook.emit("complete"), this.polyline = new v({ model: this.model }), this.model.addPolyline(this.polyline), this.lastPoint = void 0) : this.polyline.getPointLength() === n - 1 && this.hook.emit("readyComplete"));
131
+ } else if (this.currentMeasureType === "area") {
132
+ this.area.addPoints(t.position);
133
+ const n = (u = (m = this.editParams) == null ? void 0 : m.autoEndConfig) == null ? void 0 : u.area;
134
+ typeof n == "number" && (this.area.points.length >= n ? (this.hook.emit("complete"), this.area = new P(void 0, {
135
+ five: this.five,
136
+ model: this.model,
137
+ meshContainer: this.group,
138
+ domContainer: this.container
139
+ }), this.model.addArea(this.area), this.lastPoint = void 0) : this.area.points.length === n - 1 && this.hook.emit("readyComplete"));
95
140
  }
96
- this.pressPoint = void 0, this.hasAppendMouseGroup = !1, this.magnifier.disable(), this.group.remove(this.mouseGroup), this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", s.position);
141
+ this.pressPoint = void 0, this.hasAppendMouseGroup = !1, this.magnifier.disable(), this.group.remove(this.mouseGroup), this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", t.position);
97
142
  });
98
- i(this, "onWantsTapGesture", () => !1);
143
+ s(this, "onWantsTapGesture", () => !1);
99
144
  /** 编辑时取消走点 */
100
- i(this, "onWantsToMoveToPano", () => !1);
145
+ s(this, "onWantsToMoveToPano", () => !1);
101
146
  /** 存在长按点时不能移动全景 */
102
- i(this, "onWantsPanGesture", () => this.pressPoint ? !1 : void 0);
147
+ s(this, "onWantsPanGesture", () => this.pressPoint ? !1 : void 0);
103
148
  /** 移动全景时更新 distanceItem 在屏幕上的位置 */
104
- i(this, "onCameraUpdate", () => {
105
- this.updateDistanceUI(), this.dashed.distanceItem.update(this.five);
149
+ s(this, "onCameraUpdate", () => {
150
+ this.updateDistanceUI();
106
151
  });
107
152
  /** 更新虚线 */
108
- i(this, "updateDashed", () => {
109
- this.lastPoint && (this.dashed.points[0].position.copy(this.lastPoint.position), this.dashed.points[1].position.copy(this.mouseGroup.position), this.dashed.mesh.setPoints(this.lastPoint.position, this.mouseGroup.position), this.dashed.distanceItem.update(this.five), this.hook.emit("editedDashedLineChange", this.dashed));
153
+ s(this, "updateDashed", () => {
154
+ if (!this.lastPoint)
155
+ return;
156
+ const i = this.lastPoint.position, e = (() => {
157
+ if (this.currentMeasureType === "area")
158
+ return this.area.projectPoint(this.mouseGroup.position);
159
+ if (this.currentMeasureType === "line")
160
+ return this.mouseGroup.position;
161
+ })();
162
+ if (this.dashed.setPoints(i, e), this.dashed.distanceItem.update(this.five), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area") {
163
+ this.area.areaItem.setCanSelect(!1);
164
+ const o = this.mouseGroup.position;
165
+ if (this.area.points.length >= 2) {
166
+ const p = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), l = g({ start: i, end: e }, p), m = g({ start: e, end: this.area.points[0] }, p);
167
+ if (l || m)
168
+ this.area.hideArea(), this.hook.emit("allowAddPointStateChange", "forbid");
169
+ else {
170
+ this.area.showArea();
171
+ const n = [...this.area.points, e];
172
+ this.area.polygon.updatePoints(n), this.area.areaItem.updateArea(this.five), this.hook.emit("allowAddPointStateChange", "allow");
173
+ }
174
+ } else
175
+ this.area.hideArea();
176
+ const t = o, h = e;
177
+ this.perpendicularDashed.setPoints(t, h), this.perpendicularDashed.distanceItem.update(this.five);
178
+ }
110
179
  });
111
- this.model = new u(this.config), this.polyline = new P({ model: this.model }), this.model.addPolyline(this.polyline), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsPanGesture", this.onWantsPanGesture), this.five.on("wantsTapGesture", this.onWantsTapGesture), this.five.on("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.on("intersectionOnModelUpdate", this.onIntersectionUpdate), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged);
112
- const t = this.five.getElement();
113
- if (t) {
114
- this.fiveElement = t;
115
- const o = new m(t);
116
- this.hammer = o, o.on("tap", this.onTap), o.on("pan", this.onPan), o.on("press", this.onPress), o.on("panend", this.onPanEnd);
180
+ this.polyline = new v({ model: this.model }), this.area = new P(void 0, {
181
+ five: this.five,
182
+ model: this.model,
183
+ meshContainer: this.group,
184
+ domContainer: this.container
185
+ }), this.model.addPolyline(this.polyline), this.model.addArea(this.area), this.model.getAllLines().forEach((t) => {
186
+ t.distanceItem.appendTo(this.container), t.distanceItem.update(this.five), this.group.add(t.mesh);
187
+ }), this.model.getAllAreas().forEach((t) => {
188
+ t.areaItem.appendTo(this.container), t.areaItem.updateDomPosition(this.five), t.areaItem.setCanSelect(!0), this.group.add(t.polygon), t.polyline.lines.forEach((h) => {
189
+ h.distanceItem.appendTo(this.container), h.distanceItem.update(this.five), this.group.add(h.mesh);
190
+ });
191
+ }), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsPanGesture", this.onWantsPanGesture), this.five.on("wantsTapGesture", this.onWantsTapGesture), this.five.on("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.on("intersectionOnModelUpdate", this.onIntersectionUpdate), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged);
192
+ const e = this.five.getElement();
193
+ if (e) {
194
+ this.fiveElement = e;
195
+ const t = new C(e);
196
+ this.hammer = t, t.on("tap", this.onTap), t.on("pan", this.onPan), t.on("press", this.onPress), t.on("panend", this.onPanEnd);
117
197
  }
118
- this.five.helperVisible = !1, (s = this.fiveElement) == null || s.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
198
+ this.five.helperVisible = !1, (o = this.fiveElement) == null || o.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
119
199
  }
120
200
  dispose() {
121
- var e, t;
122
- super.dispose(), this.five.helperVisible = !0, this.group.remove(this.mouseGroup, this.dashed.mesh), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.onWantsPanGesture), this.five.off("wantsTapGesture", this.onWantsTapGesture), this.five.off("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.off("intersectionOnModelUpdate", this.onIntersectionUpdate), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (e = this.hammer) == null || e.destroy(), (t = this.fiveElement) == null || t.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
201
+ var i, e;
202
+ super.dispose(), this.five.helperVisible = !0, this.group.remove(this.mouseGroup), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.onWantsPanGesture), this.five.off("wantsTapGesture", this.onWantsTapGesture), this.five.off("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.off("intersectionOnModelUpdate", this.onIntersectionUpdate), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (i = this.hammer) == null || i.destroy(), (e = this.fiveElement) == null || e.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
123
203
  }
124
204
  getEditingLines() {
125
205
  return this.polyline.lines;
126
206
  }
127
207
  }
128
208
  export {
129
- V as default
209
+ ee as default
130
210
  };