@realsee/dnalogel 2.1.2-alpha.0 → 2.1.2-alpha.2

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 (521) hide show
  1. package/README.md +3 -12
  2. package/docs/classes/CruisePluginController.html +24 -24
  3. package/docs/classes/Magnifier.html +16 -16
  4. package/docs/classes/ModelRoomLabelController.html +11 -11
  5. package/docs/classes/Object3DHelperController.html +24 -24
  6. package/docs/classes/PaintBrush.html +15 -15
  7. package/docs/classes/PanoTagPluginController.html +39 -39
  8. package/docs/classes/Util.BetterTween.html +8 -8
  9. package/docs/classes/Util.FivePointSelector.html +12 -12
  10. package/docs/classes/Util.Interval.html +12 -12
  11. package/docs/classes/Util.Magnifier.html +17 -17
  12. package/docs/classes/Util.PointDomHelper.html +11 -11
  13. package/docs/classes/Util.PointHelper.html +11 -11
  14. package/docs/classes/Util.Rectangle.html +13 -13
  15. package/docs/enums/CameraMovementEffect.html +7 -7
  16. package/docs/enums/ContentType.html +12 -12
  17. package/docs/enums/DIRECTION.html +9 -9
  18. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  19. package/docs/enums/DimensionType.html +7 -7
  20. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  21. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  22. package/docs/enums/LinkType.html +7 -7
  23. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  24. package/docs/enums/PointType.html +7 -7
  25. package/docs/enums/Rotation.html +8 -8
  26. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  27. package/docs/functions/CameraMovementPlugin.html +4 -4
  28. package/docs/functions/CruisePlugin.html +4 -4
  29. package/docs/functions/GuideLinePlugin.html +5 -5
  30. package/docs/functions/ItemLabelPlugin.html +4 -4
  31. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  32. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  33. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  34. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  35. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  36. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  37. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  38. package/docs/functions/ModelViewPlugin.html +4 -4
  39. package/docs/functions/Object3DHelperPlugin.html +4 -4
  40. package/docs/functions/PanoCompassPlugin.html +4 -4
  41. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  42. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  43. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  44. package/docs/functions/PanoMeasurePlugin.html +4 -4
  45. package/docs/functions/PanoRulerPlugin.html +4 -4
  46. package/docs/functions/PanoRulerProPlugin.html +4 -4
  47. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  48. package/docs/functions/PanoTagPlugin.html +4 -4
  49. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  50. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  51. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  52. package/docs/functions/Util.getFrameTime.html +5 -5
  53. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  54. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  55. package/docs/functions/Util.isNil.html +5 -5
  56. package/docs/functions/Util.nextFrame.html +5 -5
  57. package/docs/functions/Util.notNil.html +5 -5
  58. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  59. package/docs/functions/Util.tweenProgress.html +5 -5
  60. package/docs/functions/pluginFlag.html +5 -5
  61. package/docs/index.html +6 -11
  62. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  63. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  64. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  65. package/docs/interfaces/ContentTypeMap.html +12 -12
  66. package/docs/interfaces/FloorplanBounding.html +8 -8
  67. package/docs/interfaces/FloorplanData.html +10 -10
  68. package/docs/interfaces/FloorplanEntrance.html +11 -11
  69. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  70. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  71. package/docs/interfaces/FloorplanFloorData.html +9 -9
  72. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  73. package/docs/interfaces/FloorplanObserver.html +9 -9
  74. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  75. package/docs/interfaces/FloorplanPosition.html +7 -7
  76. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  77. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  78. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  79. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  80. package/docs/interfaces/FloorplanServerData.html +7 -7
  81. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  82. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  83. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  84. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  85. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  86. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  87. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  88. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  89. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  90. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  91. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  92. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  93. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  94. package/docs/interfaces/LineJson.html +7 -7
  95. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  96. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  97. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  98. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  99. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  100. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  101. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  102. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  103. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  104. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  105. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  106. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  107. package/docs/interfaces/ModelViewPluginExportType.html +8 -8
  108. package/docs/interfaces/Object3DHelperState.html +8 -8
  109. package/docs/interfaces/OpenParameter.html +7 -7
  110. package/docs/interfaces/PaintBrushAction.html +12 -12
  111. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  112. package/docs/interfaces/PaintBrushState.html +10 -10
  113. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  114. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  115. package/docs/interfaces/PanoMeasureParameterType.html +11 -11
  116. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  117. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  118. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  119. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  120. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  121. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  122. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  123. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  124. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  125. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  126. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  127. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  128. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  129. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  130. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  131. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  132. package/docs/interfaces/Point.html +8 -8
  133. package/docs/interfaces/PointJson.html +8 -8
  134. package/docs/interfaces/Room.html +9 -9
  135. package/docs/interfaces/RoomInfo.html +7 -7
  136. package/docs/interfaces/RoomLabel.html +14 -14
  137. package/docs/interfaces/RoomRules.html +5 -5
  138. package/docs/interfaces/Rooms.html +5 -5
  139. package/docs/interfaces/Scissor.html +9 -9
  140. package/docs/interfaces/TagConfig.html +10 -10
  141. package/docs/interfaces/Tags.html +9 -9
  142. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  143. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  144. package/docs/modules/Util.html +5 -5
  145. package/docs/modules.html +4 -4
  146. package/docs/types/ArrayPosition.html +5 -5
  147. package/docs/types/CSS3DRenderExportType.html +5 -5
  148. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  149. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  150. package/docs/types/Color.html +5 -5
  151. package/docs/types/ContentTypeConfigKey.html +5 -5
  152. package/docs/types/ContentTypeConfigKeyArray.html +5 -5
  153. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  154. package/docs/types/Create3DElementReturnType.html +5 -5
  155. package/docs/types/CruisePluginExportType.html +5 -5
  156. package/docs/types/Direction-1.html +5 -5
  157. package/docs/types/Direction4.html +5 -5
  158. package/docs/types/FloorplanRuleLabels.html +5 -5
  159. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  160. package/docs/types/GuideLinePluginExportType.html +5 -5
  161. package/docs/types/HelperEventMap.html +5 -5
  162. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  163. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  164. package/docs/types/MediaData.html +5 -5
  165. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  166. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  167. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  168. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  169. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  170. package/docs/types/MoveArgs.html +5 -5
  171. package/docs/types/MoveOpts.html +5 -5
  172. package/docs/types/Object3DHelperEventMap.html +5 -5
  173. package/docs/types/ObjectFit.html +5 -5
  174. package/docs/types/PaintBrushEventMap.html +5 -5
  175. package/docs/types/PanoCompassPluginData.html +5 -5
  176. package/docs/types/PanoCompassPluginExportType.html +5 -5
  177. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  178. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  179. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  180. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  181. package/docs/types/PanoMeasureReturnType.html +5 -5
  182. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  183. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  184. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  185. package/docs/types/PlaneTag.html +5 -5
  186. package/docs/types/PointTag.html +5 -5
  187. package/docs/types/Position.html +5 -5
  188. package/docs/types/RotateArgs.html +5 -5
  189. package/docs/types/RotateOpts.html +5 -5
  190. package/docs/types/RuleLabelsKey.html +5 -5
  191. package/docs/types/RuleLabelsValue.html +5 -5
  192. package/docs/types/Tag.html +5 -5
  193. package/docs/types/Tag2D.html +5 -5
  194. package/docs/types/Tag3D.html +5 -5
  195. package/docs/types/TagId.html +5 -5
  196. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  197. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  198. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  199. package/docs/variables/PLUGIN.html +5 -5
  200. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  201. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  202. package/docs/variables/VERSION.html +5 -5
  203. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  204. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  205. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  206. package/libs/CSS3DRenderPlugin/CSS3DRender.js +1 -331
  207. package/libs/CSS3DRenderPlugin/Controller.js +1 -84
  208. package/libs/CSS3DRenderPlugin/index.js +1 -6
  209. package/libs/CSS3DRenderPlugin/typing.js +1 -0
  210. package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +1 -67
  211. package/libs/CSS3DRenderPlugin/utils/centerPoint.js +1 -10
  212. package/libs/CSS3DRenderPlugin/utils/evenNumber.js +1 -7
  213. package/libs/CSS3DRenderPlugin/utils/index.js +1 -0
  214. package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +1 -7
  215. package/libs/CSS3DRenderPlugin/utils/random.js +1 -0
  216. package/libs/CameraMovementPlugin/CameraMovementPlugin.js +1 -88
  217. package/libs/CameraMovementPlugin/index.js +1 -0
  218. package/libs/CameraMovementPlugin/typing.js +1 -5
  219. package/libs/CruisePlugin/Controller.js +1 -484
  220. package/libs/CruisePlugin/index.js +1 -8
  221. package/libs/CruisePlugin/utils/coordinatesAngle.js +1 -8
  222. package/libs/CruisePlugin/utils/coordinatesToVector.js +1 -12
  223. package/libs/CruisePlugin/utils/formatRad.js +1 -7
  224. package/libs/CruisePlugin/utils/linerValue.js +1 -7
  225. package/libs/CruisePlugin/utils/safeCall.js +1 -28
  226. package/libs/CruisePlugin/utils/sleep.js +1 -10
  227. package/libs/CruisePlugin/utils/vectorToCoordinates.js +1 -10
  228. package/libs/GuideLinePlugin/Controller.js +1 -144
  229. package/libs/GuideLinePlugin/index.js +1 -6
  230. package/libs/GuideLinePlugin/utils/getArrowMaterial.js +1 -13
  231. package/libs/GuideLinePlugin/utils/getLineGeometries.js +1 -64
  232. package/libs/ItemLabelPlugin/ItemLabelComponent.js +1 -271
  233. package/libs/ItemLabelPlugin/ItemLabelItem.js +2 -133
  234. package/libs/ItemLabelPlugin/Plugin.js +2 -76
  235. package/libs/ItemLabelPlugin/index.js +1 -12
  236. package/libs/ItemLabelPlugin/typings.js +1 -4
  237. package/libs/ItemLabelPlugin/utils/getLabelTransform.js +1 -4
  238. package/libs/ItemLabelPlugin/utils/getStrokeLength.js +1 -16
  239. package/libs/ItemLabelPlugin/utils/isImpacted.js +1 -10
  240. package/libs/ItemLabelPlugin/utils/parseData.js +1 -21
  241. package/libs/ItemLabelPlugin/utils/transform2RenderData.js +1 -21
  242. package/libs/ModelChassisCompassPlugin/Plugin.js +1 -71
  243. package/libs/ModelChassisCompassPlugin/index.js +1 -0
  244. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +1 -78
  245. package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
  246. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +1 -212
  247. package/libs/ModelItemLabelPlugin/ItemLabelItem.js +2 -42
  248. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +2 -74
  249. package/libs/ModelItemLabelPlugin/events.type.js +1 -0
  250. package/libs/ModelItemLabelPlugin/index.js +1 -12
  251. package/libs/ModelItemLabelPlugin/typings.js +1 -4
  252. package/libs/ModelItemLabelPlugin/utils/parseData.js +1 -19
  253. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -4
  254. package/libs/ModelRoomLabelPlugin/Controller.js +1 -60
  255. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +1 -45
  256. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +1 -162
  257. package/libs/ModelRoomLabelPlugin/index.js +1 -10
  258. package/libs/ModelRoomLabelPlugin/utils/parseData.js +1 -16
  259. package/libs/ModelTVVideoPlugin/Plugin.js +1 -164
  260. package/libs/ModelTVVideoPlugin/index.js +1 -0
  261. package/libs/ModelTVVideoPlugin/typings.js +1 -4
  262. package/libs/ModelTVVideoPlugin/utils/parseData.js +1 -20
  263. package/libs/ModelViewPlugin/Plugin.js +1 -107
  264. package/libs/ModelViewPlugin/index.js +1 -0
  265. package/libs/Object3DHelperPlugin/Controller.js +1 -145
  266. package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +1 -32
  267. package/libs/Object3DHelperPlugin/index.js +1 -10
  268. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -4
  269. package/libs/PanoCompassPlugin/Controller.js +1 -224
  270. package/libs/PanoCompassPlugin/getRoomInfoInstance.js +1 -24
  271. package/libs/PanoCompassPlugin/index.js +1 -6
  272. package/libs/PanoCursorRaycasterPlugin/index.js +1 -59
  273. package/libs/PanoDoorLabelPlugin/BaseController.js +1 -59
  274. package/libs/PanoDoorLabelPlugin/Controller.js +1 -219
  275. package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +1 -65
  276. package/libs/PanoDoorLabelPlugin/index.js +1 -6
  277. package/libs/PanoDoorLabelPlugin/utils.js +1 -23
  278. package/libs/PanoMeasurePlugin/Controller/BaseController.js +1 -53
  279. package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -102
  280. package/libs/PanoMeasurePlugin/Controller/MixedController.js +1 -125
  281. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +1 -33
  282. package/libs/PanoMeasurePlugin/Controller/ViewController.js +1 -90
  283. package/libs/PanoMeasurePlugin/Controller/WatchController.js +1 -154
  284. package/libs/PanoMeasurePlugin/Controller/index.js +1 -140
  285. package/libs/PanoMeasurePlugin/Model/index.js +1 -92
  286. package/libs/PanoMeasurePlugin/Model/line.js +1 -56
  287. package/libs/PanoMeasurePlugin/Model/point.js +1 -30
  288. package/libs/PanoMeasurePlugin/Model/polyline.js +1 -47
  289. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +2 -5
  290. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -4
  291. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -4
  292. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +3 -67
  293. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +1 -28
  294. package/libs/PanoMeasurePlugin/Modules/GuideController.js +1 -41
  295. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -103
  296. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +8 -12
  297. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +1 -50
  298. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +1 -36
  299. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +1 -48
  300. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +3 -8
  301. package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +1 -39
  302. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +1 -62
  303. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +2 -7
  304. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -130
  305. package/libs/PanoMeasurePlugin/index.js +1 -11
  306. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +1 -12
  307. package/libs/PanoMeasurePlugin/utils/constants.js +1 -36
  308. package/libs/PanoMeasurePlugin/utils/distanceDom.js +1 -62
  309. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +1 -13
  310. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +1 -15
  311. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +1 -9
  312. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +1 -8
  313. package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -4
  314. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +1 -7
  315. package/libs/PanoMeasurePlugin/utils/line.js +1 -18
  316. package/libs/PanoMeasurePlugin/utils/math.js +1 -13
  317. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +3 -33
  318. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +1 -8
  319. package/libs/PanoRulerPlugin/Plugin.js +2 -263
  320. package/libs/PanoRulerPlugin/index.js +1 -0
  321. package/libs/PanoRulerPlugin/style.js +2 -5
  322. package/libs/PanoRulerProPlugin/Controller.js +1 -93
  323. package/libs/PanoRulerProPlugin/RulerItem.js +1 -128
  324. package/libs/PanoRulerProPlugin/RulerItems.js +1 -180
  325. package/libs/PanoRulerProPlugin/index.js +1 -6
  326. package/libs/PanoSpatialTagPlugin/Components/origins.js +1 -81
  327. package/libs/PanoSpatialTagPlugin/Components/tag.js +1 -124
  328. package/libs/PanoSpatialTagPlugin/Plugin.js +1 -247
  329. package/libs/PanoSpatialTagPlugin/index.js +1 -0
  330. package/libs/PanoSpatialTagPlugin/store.js +1 -5
  331. package/libs/PanoSpatialTagPlugin/style.js +1 -11
  332. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  333. package/libs/PanoTagPlugin/Assets/Icon.js +1 -6
  334. package/libs/PanoTagPlugin/Components/Common/Arrow.js +1 -103
  335. package/libs/PanoTagPlugin/Components/Common/Audio.js +1 -166
  336. package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +1 -93
  337. package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +1 -90
  338. package/libs/PanoTagPlugin/Components/Common/Media.js +1 -393
  339. package/libs/PanoTagPlugin/Components/Common/MediaItem.js +1 -139
  340. package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +1 -170
  341. package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +1 -51
  342. package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +1 -51
  343. package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +1 -166
  344. package/libs/PanoTagPlugin/Components/Common/Shadow.js +15 -124
  345. package/libs/PanoTagPlugin/Components/Common/Text.js +1 -131
  346. package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +1 -134
  347. package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +1 -73
  348. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +1 -192
  349. package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +1 -126
  350. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -258
  351. package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +1 -87
  352. package/libs/PanoTagPlugin/Components/Tag/TextTag.js +1 -122
  353. package/libs/PanoTagPlugin/Components/Tag/index.js +2 -289
  354. package/libs/PanoTagPlugin/Components/TagContainer.js +1 -156
  355. package/libs/PanoTagPlugin/Components/TagWrapper.js +1 -153
  356. package/libs/PanoTagPlugin/controller/TagCacheController.js +1 -31
  357. package/libs/PanoTagPlugin/controller/TagComputer.js +1 -264
  358. package/libs/PanoTagPlugin/controller/index.js +1 -377
  359. package/libs/PanoTagPlugin/index.js +1 -9
  360. package/libs/PanoTagPlugin/tag.config.js +1 -44
  361. package/libs/PanoTagPlugin/typings/controller.js +1 -0
  362. package/libs/PanoTagPlugin/typings/index.js +1 -0
  363. package/libs/PanoTagPlugin/typings/tag.js +1 -7
  364. package/libs/PanoTagPlugin/utils/actionAfterFiveModelLoad.js +1 -6
  365. package/libs/PanoTagPlugin/utils/addDebugPoints.js +1 -27
  366. package/libs/PanoTagPlugin/utils/checkRange.js +1 -10
  367. package/libs/PanoTagPlugin/utils/constants.js +1 -8
  368. package/libs/PanoTagPlugin/utils/debounce.js +1 -12
  369. package/libs/PanoTagPlugin/utils/doUtil.js +1 -12
  370. package/libs/PanoTagPlugin/utils/index.js +1 -0
  371. package/libs/PanoTagPlugin/utils/noTypecheck.js +1 -4
  372. package/libs/PanoTagPlugin/utils/normalPositionToPositions.js +1 -13
  373. package/libs/PanoTagPlugin/utils/planeNormal.js +1 -11
  374. package/libs/PanoTagPlugin/utils/resizeObserver.js +1 -17
  375. package/libs/PanoTagPlugin/utils/search.js +1 -15
  376. package/libs/PanoTagPlugin/utils/tagPosition.js +1 -13
  377. package/libs/PanoTagPlugin/utils/throttle.js +1 -11
  378. package/libs/base/BasePlugin.js +1 -18
  379. package/libs/base/BasePluginWithData.js +1 -6
  380. package/libs/components/PaintBrush/Controller.js +1 -308
  381. package/libs/components/PaintBrush/Subscribe.js +1 -47
  382. package/libs/components/PaintBrush/index.js +1 -45
  383. package/libs/components/PaintBrush/style.js +2 -5
  384. package/libs/components/PaintBrush/tween.js +1 -11
  385. package/libs/components/PaintBrush/typings.js +1 -4
  386. package/libs/components/PaintBrush/utils.js +1 -45
  387. package/libs/components/index.js +1 -0
  388. package/libs/floorplan/Assets/camera.js +1 -4
  389. package/libs/floorplan/Assets/compass.js +1 -4
  390. package/libs/floorplan/Assets/floorplanExtraObject.js +1 -4
  391. package/libs/floorplan/Components/BaseImage.js +1 -103
  392. package/libs/floorplan/Components/Camera.js +1 -62
  393. package/libs/floorplan/Components/Compass.js +1 -60
  394. package/libs/floorplan/Components/CurrentFloor.js +1 -246
  395. package/libs/floorplan/Components/Main.js +1 -264
  396. package/libs/floorplan/Components/Normalmage.js +1 -37
  397. package/libs/floorplan/Components/RoomHighlight/Room.js +1 -61
  398. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +1 -121
  399. package/libs/floorplan/Components/RoomLabels/RoomLabel.js +1 -153
  400. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +1 -174
  401. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +1 -196
  402. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +1 -37
  403. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +1 -39
  404. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +1 -37
  405. package/libs/floorplan/Components/RuleLabels/RuleItem.js +1 -134
  406. package/libs/floorplan/Components/RuleLabels/RuleLabels.js +1 -139
  407. package/libs/floorplan/Components/SvgImage.js +2 -39
  408. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -321
  409. package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -6
  410. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -316
  411. package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -6
  412. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +1 -85
  413. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +1 -129
  414. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +1 -72
  415. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +1 -183
  416. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -164
  417. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -6
  418. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -273
  419. package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -6
  420. package/libs/floorplan/constant.js +1 -4
  421. package/libs/floorplan/index.js +1 -0
  422. package/libs/floorplan/typings/floorplanData.js +1 -0
  423. package/libs/floorplan/typings/floorplanServerData.js +1 -101
  424. package/libs/floorplan/utils/constant.js +1 -7
  425. package/libs/floorplan/utils/correctFiveState.js +1 -54
  426. package/libs/floorplan/utils/formatData.js +1 -104
  427. package/libs/floorplan/utils/formatPosition.js +1 -35
  428. package/libs/index.js +1 -92
  429. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -152
  430. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +1 -53
  431. package/libs/shared-utils/Object3DHelper/Constants/color.js +1 -21
  432. package/libs/shared-utils/Object3DHelper/Controller/CSS3DScaleController.js +1 -18
  433. package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -66
  434. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +1 -109
  435. package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +1 -134
  436. package/libs/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js +1 -79
  437. package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +1 -41
  438. package/libs/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js +1 -14
  439. package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +1 -30
  440. package/libs/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js +1 -35
  441. package/libs/shared-utils/Object3DHelper/Helper/OutlineHelper.js +1 -2
  442. package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +1 -137
  443. package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +1 -136
  444. package/libs/shared-utils/Object3DHelper/Helper/index.js +1 -0
  445. package/libs/shared-utils/Object3DHelper/index.js +1 -169
  446. package/libs/shared-utils/Object3DHelper/typings/Direction.js +1 -0
  447. package/libs/shared-utils/Object3DHelper/typings/Hooks.js +1 -0
  448. package/libs/shared-utils/Object3DHelper/typings/Scissor.js +1 -0
  449. package/libs/shared-utils/Object3DHelper/typings/index.js +1 -0
  450. package/libs/shared-utils/Object3DHelper/utils/calculateThreeMouse.js +1 -11
  451. package/libs/shared-utils/Object3DHelper/utils/direction.js +1 -22
  452. package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +1 -0
  453. package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.js +1 -14
  454. package/libs/shared-utils/Object3DHelper/utils/getPoint.js +1 -0
  455. package/libs/shared-utils/Object3DHelper/utils/index.js +1 -0
  456. package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +1 -0
  457. package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +1 -0
  458. package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -191
  459. package/libs/shared-utils/Object3DHelper/utils/vectorIsEqual.js +1 -6
  460. package/libs/shared-utils/Subscribe.js +1 -50
  461. package/libs/shared-utils/animationFrame/BetterTween.js +1 -26
  462. package/libs/shared-utils/animationFrame/calculateProgress.js +1 -6
  463. package/libs/shared-utils/animationFrame/formatRad.js +1 -11
  464. package/libs/shared-utils/animationFrame/index.js +1 -31
  465. package/libs/shared-utils/animationFrame/tween.js +1 -30
  466. package/libs/shared-utils/changeModelCanvasOpacity.js +1 -12
  467. package/libs/shared-utils/createCanvasTextTexture.js +1 -11
  468. package/libs/shared-utils/createLine/index.js +1 -9
  469. package/libs/shared-utils/debounce.js +1 -11
  470. package/libs/shared-utils/equal.js +1 -54
  471. package/libs/shared-utils/filter.js +1 -10
  472. package/libs/shared-utils/five/changeMode.js +1 -39
  473. package/libs/shared-utils/getPxmm.js +1 -21
  474. package/libs/shared-utils/index.js +1 -31
  475. package/libs/shared-utils/isNil.js +1 -10
  476. package/libs/shared-utils/isTruelyObject.js +1 -6
  477. package/libs/shared-utils/math/Interval.js +1 -23
  478. package/libs/shared-utils/math/Rectangle.js +1 -23
  479. package/libs/shared-utils/math/index.js +1 -0
  480. package/libs/shared-utils/math/planimetry.js +1 -48
  481. package/libs/shared-utils/math/rad2Deg.js +1 -6
  482. package/libs/shared-utils/nearlyEqual.js +1 -6
  483. package/libs/shared-utils/nextFrame.js +1 -6
  484. package/libs/shared-utils/noop.js +1 -5
  485. package/libs/shared-utils/object3d2LocalMatrix.js +1 -19
  486. package/libs/shared-utils/removeArrayItem.js +1 -8
  487. package/libs/shared-utils/tap.js +1 -6
  488. package/libs/shared-utils/three/Assets/index.js +1 -4
  489. package/libs/shared-utils/three/FivePointSelector.js +1 -49
  490. package/libs/shared-utils/three/Magnifier.js +1 -104
  491. package/libs/shared-utils/three/PointDomHelper.js +1 -60
  492. package/libs/shared-utils/three/PointHelper.js +3 -60
  493. package/libs/shared-utils/three/getCoords.js +1 -13
  494. package/libs/shared-utils/three/getIntersect.js +1 -8
  495. package/libs/shared-utils/three/getRaycaster.js +1 -12
  496. package/libs/shared-utils/three/index.js +1 -0
  497. package/libs/shared-utils/three/loadTexture.js +1 -28
  498. package/libs/shared-utils/three/transformPositionToVector3.js +1 -5
  499. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +1 -24
  500. package/libs/shared-utils/throttle.js +1 -11
  501. package/libs/shared-utils/tinyEJSrender.js +14 -138
  502. package/libs/shared-utils/to.js +1 -29
  503. package/libs/shared-utils/uuid.js +1 -10
  504. package/libs/vendor/swiper/components-shared/get-changed-params.js +1 -0
  505. package/libs/vendor/swiper/components-shared/get-params.js +1 -0
  506. package/libs/vendor/swiper/components-shared/mount-swiper.js +1 -0
  507. package/libs/vendor/swiper/components-shared/params-list.js +1 -0
  508. package/libs/vendor/swiper/components-shared/update-swiper.js +1 -0
  509. package/libs/vendor/swiper/components-shared/utils.js +1 -0
  510. package/libs/vendor/swiper/svelte/swiper-slide.js +1 -0
  511. package/libs/vendor/swiper/svelte/swiper-svelte.js +1 -0
  512. package/libs/vendor/swiper/svelte/swiper.js +1 -0
  513. package/package.json +187 -17
  514. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/get-changed-params.js +0 -29
  515. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/get-params.js +0 -23
  516. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/mount-swiper.js +0 -14
  517. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/params-list.js +0 -120
  518. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/update-swiper.js +0 -36
  519. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/utils.js +0 -32
  520. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/svelte/swiper-slide.js +0 -182
  521. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/svelte/swiper.js +0 -254
@@ -1,219 +1 @@
1
- var y = Object.defineProperty, E = Object.defineProperties;
2
- var O = Object.getOwnPropertyDescriptors;
3
- var w = Object.getOwnPropertySymbols;
4
- var _ = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
5
- var D = (b, l, e) => l in b ? y(b, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : b[l] = e, L = (b, l) => {
6
- for (var e in l || (l = {}))
7
- _.call(l, e) && D(b, e, l[e]);
8
- if (w)
9
- for (var e of w(l))
10
- S.call(l, e) && D(b, e, l[e]);
11
- return b;
12
- }, V = (b, l) => E(b, O(l));
13
- var a = (b, l, e) => (D(b, typeof l != "symbol" ? l + "" : l, e), e);
14
- import { Raycaster as k, Vector3 as P, Quaternion as C, Euler as A } from "three";
15
- import { BasePanoPluginController as H } from "./BaseController.js";
16
- import W from "./DoorLabelItem.js";
17
- import { getCameraToward as z, isTwoRectOverlaped as R, getDistance as F, getToward as $ } from "./utils.js";
18
- const B = { userAction: !0 };
19
- class q extends H {
20
- constructor(e) {
21
- super(e);
22
- a(this, "MinVisibledistance", 1.8);
23
- a(this, "MaxVisibledistance", 5);
24
- a(this, "OffsetHeight", -1.3);
25
- a(this, "rooms");
26
- a(this, "floorplanServerData");
27
- a(this, "doorLabelItems");
28
- a(this, "visibleLabelMap", /* @__PURE__ */ new Map());
29
- a(this, "labelItems", []);
30
- a(this, "doorLabels");
31
- a(this, "roomObservers");
32
- a(this, "loadData", (e, n) => {
33
- n && (this.MaxVisibledistance = n.MaxVisibledistance, this.MinVisibledistance = n.MinVisibledistance, this.OffsetHeight = n.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((f) => {
34
- f.$destroy();
35
- }), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = e, this.five.once("panoArrived", () => {
36
- console.log("doorplugin", "panoArrived"), this.initData();
37
- });
38
- });
39
- a(this, "initRoomObservers", () => {
40
- var h, c;
41
- const e = this.floorplanServerData.computed_data.floor_datas || [], f = (((c = (h = this.five) == null ? void 0 : h.work) == null ? void 0 : c.observers) || []).map((s) => {
42
- const o = s.panoIndex, d = s.floorIndex, i = e == null ? void 0 : e.find((t) => t.floor_index === d);
43
- if (i) {
44
- const t = i.rooms.find((r) => r.observer_indexs.includes(o));
45
- if (t)
46
- return { panoIndex: o, floorIndex: d, name: t.name };
47
- }
48
- }).filter(Boolean);
49
- this.roomObservers = f;
50
- });
51
- a(this, "hideAllLabels", () => {
52
- this.labelItems.forEach((e) => {
53
- e.visible = !1, e.inSight = !1;
54
- }), this.render();
55
- });
56
- a(this, "fixDoorVisibleAndPosition", () => {
57
- this.initRoomObservers();
58
- const { panoIndex: e } = this.five;
59
- if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((s) => s.panoIndex === e))
60
- return;
61
- const n = this.roomObservers.find((s) => s.panoIndex === e), h = this.five.work.observers.find((s) => s.panoIndex === e).position.clone(), c = (() => {
62
- if (this.visibleLabelMap.has(e))
63
- return this.visibleLabelMap.get(e);
64
- {
65
- const s = [];
66
- return this.doorLabels.forEach((o, d) => {
67
- if (o.roomName === n.name)
68
- return;
69
- const i = o.position.clone(), t = i.distanceTo(h);
70
- if (t < this.MinVisibledistance || t > this.MaxVisibledistance)
71
- return;
72
- const r = new k(), m = i.clone().sub(h).normalize();
73
- r.set(h, m);
74
- const [u] = this.five.model.intersectRaycaster(r);
75
- u && u.distance + 0.1 < t || s.push(d);
76
- }), this.visibleLabelMap.set(e, s), s;
77
- }
78
- })();
79
- this.labelItems.forEach((s, o) => {
80
- s.visible = c.includes(o);
81
- }), this.fixDoorPosition();
82
- });
83
- a(this, "fixDoorPosition", () => {
84
- const { panoIndex: e, camera: n } = this.five;
85
- if (e === null)
86
- return;
87
- if (this.five.currentMode !== "Panorama")
88
- return this.hideAllLabels();
89
- const f = this.five.getElement(), h = f.clientWidth, c = f.clientHeight, s = n.getWorldDirection(new P()), o = [], d = [...this.labelItems];
90
- if (d.forEach((i, t) => {
91
- if (i.visible) {
92
- const r = n.position.distanceTo(i.position), m = i.position.clone().add(new P(0, this.OffsetHeight, 0)), g = m.clone().sub(n.position).normalize().angleTo(s), x = m.clone().project(n), p = (x.x + 1) / 2.2 * 100, v = (-x.y + 1) / 2.2 * 100, I = p >= 0 && p <= 100 && v >= 0 && v <= 100 && r > this.MinVisibledistance && r <= this.MaxVisibledistance;
93
- i.left = p, i.top = v, i.inSight = I && g < Math.PI / 2, i.cameraToward = z(this.five), I ? o.push({ disFromCameraToLabel: r, left: p, top: v, index: t }) : i.transform = "translate(-50%, -50%)";
94
- } else
95
- i.inSight = !1;
96
- }), o.length > 1) {
97
- let i = 0;
98
- o.sort((t, r) => r.disFromCameraToLabel - t.disFromCameraToLabel);
99
- for (let t = 1; t < o.length; t++) {
100
- const { index: r, left: m, top: u } = o[t - 1], { index: g, left: x, top: p } = o[t], v = this.container.children[r], I = this.container.children[g];
101
- if (!v || !I)
102
- return;
103
- const M = {
104
- left: h * m / 100,
105
- top: c * u / 100,
106
- width: v.children[0].clientWidth,
107
- height: v.children[0].clientHeight
108
- }, T = {
109
- left: h * x / 100,
110
- top: c * p / 100,
111
- width: I.children[0].clientWidth,
112
- height: I.children[0].clientHeight
113
- };
114
- R(M, T) && (i++, d[r].transform = `translate(-50%, ${(i - 1) * 100 - 50}%)`, d[g].transform = `translate(-50%, ${i * 100 - 50}%)`);
115
- }
116
- }
117
- this.labelItems = d, this.render();
118
- });
119
- a(this, "onClick", (e, n) => {
120
- if (!this.roomObservers)
121
- return;
122
- const { work: f } = this.five;
123
- let h, c, s = 1 / 0;
124
- for (let o = 0; o < f.observers.length; o++) {
125
- if (this.roomObservers[o].name !== e)
126
- continue;
127
- const i = f.observers[o].standingPosition, t = n.distanceTo(i);
128
- t < s && (h = o, c = i.clone().sub(n).normalize(), s = t);
129
- }
130
- if (c !== null && h !== null) {
131
- const o = {};
132
- if (s > 0) {
133
- const i = new P(0, 0, -1), t = c.clone(), r = new C();
134
- r.setFromUnitVectors(i, t);
135
- const m = new A();
136
- m.setFromQuaternion(r, "YXZ"), o.longitude = m.y;
137
- }
138
- this.five.emit("wantsToMoveToPano", h, {}, !0) || this.five.moveToPano(h, { longitude: o.longitude });
139
- }
140
- });
141
- a(this, "initData", () => {
142
- var h;
143
- this.doorLabels = [];
144
- const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, f = n !== void 0 && ((h = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : h.rooms);
145
- this.rooms = f, this.rooms && this.rooms.length > 0 && this.rooms.forEach((c) => {
146
- var d;
147
- const s = (d = this.floorplanServerData.computed_data.doors) == null ? void 0 : d.filter((i) => !!(i && i.name === c.name)), o = this.five.work.observers.filter((i, t) => !!c.observer_indexs.find((r) => r === t));
148
- s && s.forEach((i) => {
149
- const t = i.position;
150
- let r = 1 / 0, m;
151
- o.forEach((g) => {
152
- const x = g.standingPosition, p = {
153
- x: x.x,
154
- y: x.y,
155
- z: x.z
156
- }, v = F(t, p);
157
- v < r && (r = v, m = p);
158
- }), m && (t.y = m.y + 0.01);
159
- const u = new P(t.x, t.y, t.z);
160
- u.add(new P(-0.2, 1.8, 0).applyEuler(new A(0, i.rad, 0))), this.doorLabels.push({
161
- roomName: c.name,
162
- name: i.name,
163
- position: u,
164
- toward: $(i.rad)
165
- });
166
- });
167
- }), this.labelItems = this.doorLabels.map((c) => V(L({}, c), {
168
- left: 0,
169
- top: 0,
170
- visible: !1,
171
- inSight: !1,
172
- transform: "",
173
- cameraToward: ""
174
- })), console.log("doorplugin", "labelItems", this.labelItems), this.five.on("wantsToMoveToPano", this.hideAllLabels), this.five.on("modelLoaded", this.fixDoorVisibleAndPosition), this.five.on("panoArrived", this.fixDoorVisibleAndPosition), this.five.on("initAnimationEnded", this.fixDoorPosition), this.five.on("cameraUpdate", this.fixDoorPosition), this.five.on("mouseWheel", this.fixDoorPosition), this.five.on("pinchGesture", this.fixDoorPosition), this.fixDoorVisibleAndPosition();
175
- });
176
- }
177
- stateChangedCallback(e, n) {
178
- if (this.hooks.hasListener("stateChange")) {
179
- const f = {
180
- state: this.state,
181
- prevState: e,
182
- userAction: n ? n.userAction : B.userAction
183
- };
184
- this.hooks.emit("stateChange", f);
185
- }
186
- }
187
- render() {
188
- if (!this.enabled) {
189
- this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((e) => {
190
- e == null || e.$destroy();
191
- }), this.doorLabels = void 0;
192
- return;
193
- }
194
- this.doorLabelItems && this.doorLabelItems.forEach((e) => {
195
- e.$destroy();
196
- }), this.doorLabelItems = [], this.labelItems.forEach((e) => {
197
- this.doorLabelItems.push(
198
- new W({
199
- target: this.container,
200
- props: {
201
- props: e,
202
- onClick: () => {
203
- this.onClick(e.name, e.position);
204
- }
205
- }
206
- })
207
- );
208
- });
209
- }
210
- initState() {
211
- return { enabled: !0, visible: !0 };
212
- }
213
- dispose() {
214
- this.five && (this.five.off("wantsToMoveToPano", this.hideAllLabels), this.five.off("modelLoaded", this.fixDoorVisibleAndPosition), this.five.off("panoArrived", this.fixDoorVisibleAndPosition), this.five.off("initAnimationEnded", this.fixDoorPosition), this.five.off("cameraUpdate", this.fixDoorPosition), this.five.off("mouseWheel", this.fixDoorPosition), this.five.off("pinchGesture", this.fixDoorPosition), super.dispose());
215
- }
216
- }
217
- export {
218
- q as PanoDoorLabelPluginController
219
- };
1
+ "use strict";var T=Object.defineProperty,y=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var L=(m,l,e)=>l in m?T(m,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[l]=e,V=(m,l)=>{for(var e in l||(l={}))_.call(l,e)&&L(m,e,l[e]);if(w)for(var e of w(l))C.call(l,e)&&L(m,e,l[e]);return m},A=(m,l)=>y(m,O(l));var a=(m,l,e)=>(L(m,typeof l!="symbol"?l+"":l,e),e);const p=require("three"),S=require("./BaseController.js"),k=require("./DoorLabelItem.js"),D=require("./utils.js"),H={userAction:!0};class R extends S.BasePanoPluginController{constructor(e){super(e);a(this,"MinVisibledistance",1.8);a(this,"MaxVisibledistance",5);a(this,"OffsetHeight",-1.3);a(this,"rooms");a(this,"floorplanServerData");a(this,"doorLabelItems");a(this,"visibleLabelMap",new Map);a(this,"labelItems",[]);a(this,"doorLabels");a(this,"roomObservers");a(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(f=>{f.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,this.five.once("panoArrived",()=>{console.log("doorplugin","panoArrived"),this.initData()})});a(this,"initRoomObservers",()=>{var c,h;const e=this.floorplanServerData.computed_data.floor_datas||[],f=(((h=(c=this.five)==null?void 0:c.work)==null?void 0:h.observers)||[]).map(s=>{const o=s.panoIndex,d=s.floorIndex,i=e==null?void 0:e.find(t=>t.floor_index===d);if(i){const t=i.rooms.find(r=>r.observer_indexs.includes(o));if(t)return{panoIndex:o,floorIndex:d,name:t.name}}}).filter(Boolean);this.roomObservers=f});a(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});a(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(s=>s.panoIndex===e))return;const n=this.roomObservers.find(s=>s.panoIndex===e),c=this.five.work.observers.find(s=>s.panoIndex===e).position.clone(),h=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const s=[];return this.doorLabels.forEach((o,d)=>{if(o.roomName===n.name)return;const i=o.position.clone(),t=i.distanceTo(c);if(t<this.MinVisibledistance||t>this.MaxVisibledistance)return;const r=new p.Raycaster,b=i.clone().sub(c).normalize();r.set(c,b);const[x]=this.five.model.intersectRaycaster(r);x&&x.distance+.1<t||s.push(d)}),this.visibleLabelMap.set(e,s),s}})();this.labelItems.forEach((s,o)=>{s.visible=h.includes(o)}),this.fixDoorPosition()});a(this,"fixDoorPosition",()=>{const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const f=this.five.getElement(),c=f.clientWidth,h=f.clientHeight,s=n.getWorldDirection(new p.Vector3),o=[],d=[...this.labelItems];if(d.forEach((i,t)=>{if(i.visible){const r=n.position.distanceTo(i.position),b=i.position.clone().add(new p.Vector3(0,this.OffsetHeight,0)),P=b.clone().sub(n.position).normalize().angleTo(s),g=b.clone().project(n),u=(g.x+1)/2.2*100,v=(-g.y+1)/2.2*100,I=u>=0&&u<=100&&v>=0&&v<=100&&r>this.MinVisibledistance&&r<=this.MaxVisibledistance;i.left=u,i.top=v,i.inSight=I&&P<Math.PI/2,i.cameraToward=D.getCameraToward(this.five),I?o.push({disFromCameraToLabel:r,left:u,top:v,index:t}):i.transform="translate(-50%, -50%)"}else i.inSight=!1}),o.length>1){let i=0;o.sort((t,r)=>r.disFromCameraToLabel-t.disFromCameraToLabel);for(let t=1;t<o.length;t++){const{index:r,left:b,top:x}=o[t-1],{index:P,left:g,top:u}=o[t],v=this.container.children[r],I=this.container.children[P];if(!v||!I)return;const E={left:c*b/100,top:h*x/100,width:v.children[0].clientWidth,height:v.children[0].clientHeight},M={left:c*g/100,top:h*u/100,width:I.children[0].clientWidth,height:I.children[0].clientHeight};D.isTwoRectOverlaped(E,M)&&(i++,d[r].transform=`translate(-50%, ${(i-1)*100-50}%)`,d[P].transform=`translate(-50%, ${i*100-50}%)`)}}this.labelItems=d,this.render()});a(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:f}=this.five;let c,h,s=1/0;for(let o=0;o<f.observers.length;o++){if(this.roomObservers[o].name!==e)continue;const i=f.observers[o].standingPosition,t=n.distanceTo(i);t<s&&(c=o,h=i.clone().sub(n).normalize(),s=t)}if(h!==null&&c!==null){const o={};if(s>0){const i=new p.Vector3(0,0,-1),t=h.clone(),r=new p.Quaternion;r.setFromUnitVectors(i,t);const b=new p.Euler;b.setFromQuaternion(r,"YXZ"),o.longitude=b.y}this.five.emit("wantsToMoveToPano",c,{},!0)||this.five.moveToPano(c,{longitude:o.longitude})}});a(this,"initData",()=>{var c;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,f=n!==void 0&&((c=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:c.rooms);this.rooms=f,this.rooms&&this.rooms.length>0&&this.rooms.forEach(h=>{var d;const s=(d=this.floorplanServerData.computed_data.doors)==null?void 0:d.filter(i=>!!(i&&i.name===h.name)),o=this.five.work.observers.filter((i,t)=>!!h.observer_indexs.find(r=>r===t));s&&s.forEach(i=>{const t=i.position;let r=1/0,b;o.forEach(P=>{const g=P.standingPosition,u={x:g.x,y:g.y,z:g.z},v=D.getDistance(t,u);v<r&&(r=v,b=u)}),b&&(t.y=b.y+.01);const x=new p.Vector3(t.x,t.y,t.z);x.add(new p.Vector3(-.2,1.8,0).applyEuler(new p.Euler(0,i.rad,0))),this.doorLabels.push({roomName:h.name,name:i.name,position:x,toward:D.getToward(i.rad)})})}),this.labelItems=this.doorLabels.map(h=>A(V({},h),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),console.log("doorplugin","labelItems",this.labelItems),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const f={state:this.state,prevState:e,userAction:n?n.userAction:H.userAction};this.hooks.emit("stateChange",f)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new k.DoorLabelItem({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}exports.PanoDoorLabelPluginController=R;
@@ -1,65 +1 @@
1
- import { SvelteComponent as k, init as _, safe_not_equal as C, append_styles as I, element as d, space as j, attr as p, null_to_empty as v, insert as B, append as b, listen as x, noop as f, detach as H, binding_callbacks as S } from "svelte/internal";
2
- import y from "classnames";
3
- function W(e) {
4
- I(e, "svelte-wpy7pz", '.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}');
5
- }
6
- function q(e) {
7
- let l, t, a, s, o, n, i, c;
8
- return {
9
- c() {
10
- l = d("div"), t = d("div"), a = d("span"), a.textContent = `${e[8]}`, s = j(), o = d("i"), p(a, "class", "plugin-DoorLabelPlugin-txt svelte-wpy7pz"), p(o, "class", "plugin-DoorLabelPlugin-icon svelte-wpy7pz"), p(t, "class", n = v(y("plugin-DoorLabelPlugin-cnt", e[0].toward)) + " svelte-wpy7pz"), p(t, "style", `transform: ${e[6] || "initial"};pointer-events: ${e[5] ? "auto" : "none"};opacity: ${e[5] ? 1 : 0}`), p(t, "data-camera-toward", e[7]), p(l, "style", `left: ${e[3] || 0}%;top: ${e[4] || 0}%;opacity: ${e[5] ? 1 : 0}`), p(l, "class", "plugin-DoorLabelPlugin-item svelte-wpy7pz");
11
- },
12
- m(g, u) {
13
- B(g, l, u), b(l, t), b(t, a), b(t, s), b(t, o), e[10](l), i || (c = x(t, "click", e[9]), i = !0);
14
- },
15
- p(g, [u]) {
16
- u & 1 && n !== (n = v(y("plugin-DoorLabelPlugin-cnt", g[0].toward)) + " svelte-wpy7pz") && p(t, "class", n);
17
- },
18
- i: f,
19
- o: f,
20
- d(g) {
21
- g && H(l), e[10](null), i = !1, c();
22
- }
23
- };
24
- }
25
- function E(e, l, t) {
26
- let { props: a } = l, { onClick: s } = l, o, { left: n, top: i, inSight: c, transform: g, panoIndex: u, cameraToward: z, name: P } = a, m = 0;
27
- const D = () => {
28
- if (!n || !i || !c || !o)
29
- return;
30
- const r = o.current.clientWidth / window.innerWidth * 100, w = o.current.clientHeight / window.innerHeight * 100;
31
- if (n <= r / 2 || n >= 100 - r / 2 || i <= w / 2 || i >= 100 - w / 2)
32
- return;
33
- u !== m && (console.log("panoDoorLabelPlugin", u, "\u89E6\u53D1\u57CB\u70B9"), m = u);
34
- }, L = (r) => {
35
- s && s();
36
- };
37
- function h(r) {
38
- S[r ? "unshift" : "push"](() => {
39
- o = r, t(2, o);
40
- });
41
- }
42
- return e.$$set = (r) => {
43
- "props" in r && t(0, a = r.props), "onClick" in r && t(1, s = r.onClick);
44
- }, D(), [
45
- a,
46
- s,
47
- o,
48
- n,
49
- i,
50
- c,
51
- g,
52
- z,
53
- P,
54
- L,
55
- h
56
- ];
57
- }
58
- class A extends k {
59
- constructor(l) {
60
- super(), _(this, l, E, q, C, { props: 0, onClick: 1 }, W);
61
- }
62
- }
63
- export {
64
- A as default
65
- };
1
+ "use strict";const e=require("svelte/internal"),D=require("classnames"),L=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},m=L(D);function P(t){e.append_styles(t,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function h(t){let n,l,i,s,a,o,p,c;return{c(){n=e.element("div"),l=e.element("div"),i=e.element("span"),i.textContent=`${t[8]}`,s=e.space(),a=e.element("i"),e.attr(i,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),e.attr(a,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),e.attr(l,"class",o=e.null_to_empty(m.default("plugin-DoorLabelPlugin-cnt",t[0].toward))+" svelte-wpy7pz"),e.attr(l,"style",`transform: ${t[6]||"initial"};pointer-events: ${t[5]?"auto":"none"};opacity: ${t[5]?1:0}`),e.attr(l,"data-camera-toward",t[7]),e.attr(n,"style",`left: ${t[3]||0}%;top: ${t[4]||0}%;opacity: ${t[5]?1:0}`),e.attr(n,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(g,u){e.insert(g,n,u),e.append(n,l),e.append(l,i),e.append(l,s),e.append(l,a),t[10](n),p||(c=e.listen(l,"click",t[9]),p=!0)},p(g,[u]){u&1&&o!==(o=e.null_to_empty(m.default("plugin-DoorLabelPlugin-cnt",g[0].toward))+" svelte-wpy7pz")&&e.attr(l,"class",o)},i:e.noop,o:e.noop,d(g){g&&e.detach(n),t[10](null),p=!1,c()}}}function k(t,n,l){let{props:i}=n,{onClick:s}=n,a,{left:o,top:p,inSight:c,transform:g,panoIndex:u,cameraToward:w,name:v}=i,d=0;const f=()=>{if(!o||!p||!c||!a)return;const r=a.current.clientWidth/window.innerWidth*100,b=a.current.clientHeight/window.innerHeight*100;if(o<=r/2||o>=100-r/2||p<=b/2||p>=100-b/2)return;u!==d&&(console.log("panoDoorLabelPlugin",u,"\u89E6\u53D1\u57CB\u70B9"),d=u)},y=r=>{s&&s()};function z(r){e.binding_callbacks[r?"unshift":"push"](()=>{a=r,l(2,a)})}return t.$$set=r=>{"props"in r&&l(0,i=r.props),"onClick"in r&&l(1,s=r.onClick)},f(),[i,s,a,o,p,c,g,w,v,y,z]}class _ extends e.SvelteComponent{constructor(n){super(),e.init(this,n,k,h,e.safe_not_equal,{props:0,onClick:1},P)}}exports.DoorLabelItem=_;
@@ -1,6 +1 @@
1
- import { PanoDoorLabelPluginController as r } from "./Controller.js";
2
- const e = (o) => new r(o);
3
- export {
4
- e as PanoDoorLabelPlugin,
5
- e as default
6
- };
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./Controller.js");require("three");require("./BaseController.js");require("@realsee/five");require("../base/BasePlugin.js");require("../shared-utils/Subscribe.js");require("./DoorLabelItem.js");require("svelte/internal");require("classnames");require("./utils.js");const e=r=>new l.PanoDoorLabelPluginController(r);exports.PanoDoorLabelPlugin=e;exports.default=e;
@@ -1,23 +1 @@
1
- import { Vector3 as a } from "three";
2
- function f(t, e) {
3
- const n = Math.abs(t.top + t.height / 2 - e.top - e.height / 2), i = Math.abs(t.left + t.width / 2 - e.left - e.width / 2), o = (t.height + e.height) / 2, r = (t.width + e.width) / 2;
4
- return !(n > o && i > r);
5
- }
6
- function s(t) {
7
- const { camera: e } = t, n = e.getWorldDirection(new a());
8
- let i = Math.atan(n.z / n.x) * 180 / Math.PI, o = "";
9
- return n.x < 0 && (i += 180), i < 0 && (i += 360), i > 315 || i <= 45 ? o = "right" : i > 45 && i <= 135 ? o = "back" : i > 135 && i <= 225 ? o = "left" : i > 225 && i <= 315 && (o = "forward"), o;
10
- }
11
- function l(t, e) {
12
- return Math.sqrt(Math.pow(t.z - e.z, 2) + Math.pow(t.x - e.x, 2));
13
- }
14
- function c(t) {
15
- const e = Math.PI / 4;
16
- return t > -e && t <= e ? "left" : t > e * 3 || t <= -e * 3 ? "right" : t > -e * 3 && t <= -e ? "forward" : t > e && t <= e * 3 ? "back" : "";
17
- }
18
- export {
19
- s as getCameraToward,
20
- l as getDistance,
21
- c as getToward,
22
- f as isTwoRectOverlaped
23
- };
1
+ "use strict";const r=require("three");function h(t,e){const o=Math.abs(t.top+t.height/2-e.top-e.height/2),i=Math.abs(t.left+t.width/2-e.left-e.width/2),n=(t.height+e.height)/2,a=(t.width+e.width)/2;return!(o>n&&i>a)}function s(t){const{camera:e}=t,o=e.getWorldDirection(new r.Vector3);let i=Math.atan(o.z/o.x)*180/Math.PI,n="";return o.x<0&&(i+=180),i<0&&(i+=360),i>315||i<=45?n="right":i>45&&i<=135?n="back":i>135&&i<=225?n="left":i>225&&i<=315&&(n="forward"),n}function l(t,e){return Math.sqrt(Math.pow(t.z-e.z,2)+Math.pow(t.x-e.x,2))}function f(t){const e=Math.PI/4;return t>-e&&t<=e?"left":t>e*3||t<=-e*3?"right":t>-e*3&&t<=-e?"forward":t>e&&t<=e*3?"back":""}exports.getCameraToward=s;exports.getDistance=l;exports.getToward=f;exports.isTwoRectOverlaped=h;
@@ -1,53 +1 @@
1
- var m = Object.defineProperty;
2
- var a = (i, e, o) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : i[e] = o;
3
- var t = (i, e, o) => (a(i, typeof e != "symbol" ? e + "" : e, o), o);
4
- import l from "../Model/line.js";
5
- import d from "../Model/point.js";
6
- import { preventDefault as r } from "../utils/ironbox.js";
7
- class G {
8
- constructor(e) {
9
- t(this, "model");
10
- t(this, "five");
11
- t(this, "group");
12
- t(this, "config");
13
- t(this, "dashed");
14
- t(this, "disposed", !1);
15
- t(this, "isMobile");
16
- t(this, "mouseGroup");
17
- t(this, "container");
18
- t(this, "fiveHelper");
19
- t(this, "hook");
20
- t(this, "magnifier");
21
- t(this, "userDistanceItemCreator");
22
- t(this, "updateDistanceUI", () => {
23
- this.dashed.distanceItem.update(this.five), this.model.lines.forEach((e) => e.distanceItem.update(this.five));
24
- });
25
- var s, n;
26
- 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 l(new d([0, 0, 0]), new d([0, 0, 0]), this.model), this.dashed.mesh.setMaterial({ dashed: !0, dashScale: 100 }), this.dashed.mesh.name = "dashLine";
27
- const o = this.five.getElement();
28
- o && (o.addEventListener("touchstart", r), o.addEventListener("contextmenu", r));
29
- }
30
- removeLine(e) {
31
- this.group.remove(e.mesh, e.lightMesh), e.distanceItem.remove(), this.five.needsRender = !0;
32
- }
33
- updateMouseGroup(e, o) {
34
- if (!e)
35
- return this.mouseGroup;
36
- const s = this.fiveHelper.getAdsorbentPoint(e), n = s || e.point;
37
- if (this.mouseGroup.position.copy(n), o)
38
- this.mouseGroup.quaternion.copy(o.quaternion);
39
- else if (e.face) {
40
- const h = e.face.normal.clone().multiplyScalar(0.05), u = e.point.clone().add(h).clone().add(h);
41
- this.mouseGroup.lookAt(u);
42
- }
43
- return this.mouseGroup;
44
- }
45
- dispose() {
46
- this.disposed = !0, this.magnifier.remove(), this.model.lines.forEach((o) => this.removeLine(o));
47
- const e = this.five.getElement();
48
- e && (e.removeEventListener("touchstart", r), e.removeEventListener("contextmenu", r));
49
- }
50
- }
51
- export {
52
- G as default
53
- };
1
+ "use strict";var a=Object.defineProperty;var d=(i,e,o)=>e in i?a(i,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[e]=o;var t=(i,e,o)=>(d(i,typeof e!="symbol"?e+"":e,o),o);const c=require("../Model/line.js"),l=require("../Model/point.js"),r=require("../utils/ironbox.js");class f{constructor(e){t(this,"model");t(this,"five");t(this,"group");t(this,"config");t(this,"dashed");t(this,"disposed",!1);t(this,"isMobile");t(this,"mouseGroup");t(this,"container");t(this,"fiveHelper");t(this,"hook");t(this,"magnifier");t(this,"userDistanceItemCreator");t(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.lines.forEach(e=>e.distanceItem.update(this.five))});var s,n;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 c.Line(new l.Point([0,0,0]),new l.Point([0,0,0]),this.model),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const o=this.five.getElement();o&&(o.addEventListener("touchstart",r.preventDefault),o.addEventListener("contextmenu",r.preventDefault))}removeLine(e){this.group.remove(e.mesh,e.lightMesh),e.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(e,o){if(!e)return this.mouseGroup;const s=this.fiveHelper.getAdsorbentPoint(e),n=s||e.point;if(this.mouseGroup.position.copy(n),o)this.mouseGroup.quaternion.copy(o.quaternion);else if(e.face){const u=e.face.normal.clone().multiplyScalar(.05),h=e.point.clone().add(u).clone().add(u);this.mouseGroup.lookAt(h)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.remove(),this.model.lines.forEach(o=>this.removeLine(o));const e=this.five.getElement();e&&(e.removeEventListener("touchstart",r.preventDefault),e.removeEventListener("contextmenu",r.preventDefault))}}exports.BaseController=f;
@@ -1,102 +1 @@
1
- var p = Object.defineProperty;
2
- var m = (h, n, e) => n in h ? p(h, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[n] = e;
3
- var s = (h, n, e) => (m(h, typeof n != "symbol" ? n + "" : n, e), e);
4
- import u from "hammerjs";
5
- import { Model as f } from "../Model/index.js";
6
- import l from "../Model/line.js";
7
- import d from "../Model/point.js";
8
- import v from "../../shared-utils/throttle.js";
9
- import c from "./BaseController.js";
10
- import { getIntersectionFromEvent as r } from "../utils/getIntersectionFromEvent.js";
11
- class A extends c {
12
- constructor(e) {
13
- var i;
14
- super(e);
15
- s(this, "type", "edit");
16
- s(this, "pressPoint");
17
- s(this, "hasAppendDashed", !1);
18
- s(this, "hasAppendMouseGroup", !1);
19
- s(this, "fiveElement");
20
- s(this, "lastPoint", null);
21
- s(this, "hammer");
22
- s(this, "onIntersectionUpdate", v((e, t) => {
23
- var o;
24
- this.hasAppendMouseGroup === !1 && (this.group.add(this.mouseGroup), this.magnifier.appendTo(this.container), this.hasAppendMouseGroup = !0);
25
- const i = this.updateMouseGroup(e, t).position;
26
- (o = this.pressPoint) == null || o.position.copy(i), this.updateDashed(), requestAnimationFrame(() => this.magnifier.renderWithPoint(this.mouseGroup.position)), this.five.needsRender = !0;
27
- }, 20));
28
- s(this, "revoke", () => {
29
- if (this.model.lines.length === 0 && this.lastPoint) {
30
- this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.distanceItem.remove(), this.group.remove(this.dashed.mesh), this.hook.emit("anchorChange", null), this.five.needsRender = !0;
31
- return;
32
- }
33
- if (this.model.lines.length === 0 && !this.lastPoint || !this.lastPoint)
34
- return;
35
- const e = this.model.lines[this.model.lines.length - 1], t = e.findAnotherPoint(this.lastPoint);
36
- !t || (this.lastPoint = t, this.hook.emit("anchorChange", t.position), this.group.remove(e.mesh), this.model.removeLine(e), this.hasAppendMouseGroup = !1, this.mouseGroup.position.copy(this.lastPoint.position), this.group.remove(this.mouseGroup), e.distanceItem.remove(), this.updateDashed(), this.magnifier.remove(), this.five.needsRender = !0);
37
- });
38
- s(this, "onMouseLeave", () => {
39
- this.magnifier.remove(), this.group.remove(this.mouseGroup), this.hasAppendMouseGroup = !1, this.lastPoint && (this.mouseGroup.position.copy(this.lastPoint.position), this.updateDashed());
40
- });
41
- s(this, "onLineChanged", () => {
42
- this.hook.emit(
43
- "editedLineChange",
44
- this.model.lines.map((e) => e.toCompletelyJson())
45
- );
46
- });
47
- s(this, "onPress", (e) => {
48
- const [t] = r(this.five, e);
49
- if (!t || !t.face)
50
- return;
51
- const i = new d(t.point);
52
- this.pressPoint = i, this.onIntersectionUpdate(t);
53
- });
54
- s(this, "onPan", (e) => {
55
- if (!this.pressPoint)
56
- return;
57
- const [t] = r(this.five, e);
58
- !t || !t.face || this.onIntersectionUpdate(t);
59
- });
60
- s(this, "onPanEnd", (e) => {
61
- !this.pressPoint || this.onTap(e);
62
- });
63
- s(this, "onTap", (e) => {
64
- this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh)), this.hasAppendDashed = !0;
65
- const [t] = r(this.five, e);
66
- this.updateMouseGroup(t);
67
- const i = new d(this.mouseGroup.position), o = this.lastPoint;
68
- if (i && (this.lastPoint = i), i && o) {
69
- const a = new l(o, i, this.model);
70
- a.distanceItem.appendTo(this.container), this.model.addLine(a), this.group.add(a.mesh), a.distanceItem.update(this.five);
71
- }
72
- this.pressPoint = void 0, this.hasAppendMouseGroup = !1, this.magnifier.remove(), this.group.remove(this.mouseGroup), this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", i.position);
73
- });
74
- s(this, "onWantsTapGesture", () => !1);
75
- s(this, "onWantsToMoveToPano", () => !1);
76
- s(this, "onWantsPanGesture", () => this.pressPoint ? !1 : void 0);
77
- s(this, "onCameraUpdate", () => {
78
- this.updateDistanceUI(), this.dashed.distanceItem.update(this.five);
79
- });
80
- s(this, "updateDashed", () => {
81
- !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));
82
- });
83
- this.model = new f(this.config), 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.model.hook.on("lineAdded", this.onLineChanged), this.model.hook.on("lineRemoved", this.onLineChanged);
84
- const t = this.five.getElement();
85
- if (t) {
86
- this.fiveElement = t;
87
- const o = new u(t);
88
- this.hammer = o, o.on("tap", this.onTap), o.on("pan", this.onPan), o.on("press", this.onPress), o.on("panend", this.onPanEnd);
89
- }
90
- (i = this.fiveElement) == null || i.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.five.refresh();
91
- }
92
- dispose() {
93
- var e, t;
94
- super.dispose(), 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.model.hook.off("lineAdded", this.onLineChanged), this.model.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;
95
- }
96
- getEditingLines() {
97
- return this.model.lines;
98
- }
99
- }
100
- export {
101
- A as default
102
- };
1
+ "use strict";var p=Object.defineProperty;var u=(i,h,e)=>h in i?p(i,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[h]=e;var s=(i,h,e)=>(u(i,typeof h!="symbol"?h+"":h,e),e);const l=require("hammerjs"),m=require("../Model/index.js"),f=require("../Model/line.js"),d=require("../Model/point.js"),c=require("../../shared-utils/throttle.js"),v=require("./BaseController.js"),r=require("../utils/getIntersectionFromEvent.js"),P=i=>i&&typeof i=="object"&&"default"in i?i:{default:i},g=P(l);class M extends v.BaseController{constructor(e){var o;super(e);s(this,"type","edit");s(this,"pressPoint");s(this,"hasAppendDashed",!1);s(this,"hasAppendMouseGroup",!1);s(this,"fiveElement");s(this,"lastPoint",null);s(this,"hammer");s(this,"onIntersectionUpdate",c.throttle((e,t)=>{var n;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.hasAppendMouseGroup=!0);const o=this.updateMouseGroup(e,t).position;(n=this.pressPoint)==null||n.position.copy(o),this.updateDashed(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(this.mouseGroup.position)),this.five.needsRender=!0},20));s(this,"revoke",()=>{if(this.model.lines.length===0&&this.lastPoint){this.lastPoint=null,this.hasAppendDashed=!1,this.dashed.distanceItem.remove(),this.group.remove(this.dashed.mesh),this.hook.emit("anchorChange",null),this.five.needsRender=!0;return}if(this.model.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.model.lines[this.model.lines.length-1],t=e.findAnotherPoint(this.lastPoint);!t||(this.lastPoint=t,this.hook.emit("anchorChange",t.position),this.group.remove(e.mesh),this.model.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.remove(),this.five.needsRender=!0)});s(this,"onMouseLeave",()=>{this.magnifier.remove(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});s(this,"onLineChanged",()=>{this.hook.emit("editedLineChange",this.model.lines.map(e=>e.toCompletelyJson()))});s(this,"onPress",e=>{const[t]=r.getIntersectionFromEvent(this.five,e);if(!t||!t.face)return;const o=new d.Point(t.point);this.pressPoint=o,this.onIntersectionUpdate(t)});s(this,"onPan",e=>{if(!this.pressPoint)return;const[t]=r.getIntersectionFromEvent(this.five,e);!t||!t.face||this.onIntersectionUpdate(t)});s(this,"onPanEnd",e=>{!this.pressPoint||this.onTap(e)});s(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[t]=r.getIntersectionFromEvent(this.five,e);this.updateMouseGroup(t);const o=new d.Point(this.mouseGroup.position),n=this.lastPoint;if(o&&(this.lastPoint=o),o&&n){const a=new f.Line(n,o,this.model);a.distanceItem.appendTo(this.container),this.model.addLine(a),this.group.add(a.mesh),a.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.remove(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});s(this,"onWantsTapGesture",()=>!1);s(this,"onWantsToMoveToPano",()=>!1);s(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);s(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});s(this,"updateDashed",()=>{!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.model=new m.Model(this.config),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.model.hook.on("lineAdded",this.onLineChanged),this.model.hook.on("lineRemoved",this.onLineChanged);const t=this.five.getElement();if(t){this.fiveElement=t;const n=new g.default(t);this.hammer=n,n.on("tap",this.onTap),n.on("pan",this.onPan),n.on("press",this.onPress),n.on("panend",this.onPanEnd)}(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.five.refresh()}dispose(){var e,t;super.dispose(),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.model.hook.off("lineAdded",this.onLineChanged),this.model.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}getEditingLines(){return this.model.lines}}exports.EditController=M;