@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,7 +1 @@
1
- const n = Math.PI * 2;
2
- function o(t) {
3
- return t >= 0 && t < n ? t : (t % n + n) % n;
4
- }
5
- export {
6
- o as formatRad
7
- };
1
+ "use strict";const n=Math.PI*2;function f(t){return t>=0&&t<n?t:(t%n+n)%n}exports.formatRad=f;
@@ -1,7 +1 @@
1
- function u(n, r, t, e) {
2
- const a = -n / t, o = n;
3
- return a * e + o;
4
- }
5
- export {
6
- u as default
7
- };
1
+ "use strict";function c(n,i,e,t){const r=-n/e,u=n;return r*t+u}exports.linerValue=c;
@@ -1,28 +1 @@
1
- var l = (a, n, t) => new Promise((o, s) => {
2
- var r = (c) => {
3
- try {
4
- e(t.next(c));
5
- } catch (h) {
6
- s(h);
7
- }
8
- }, y = (c) => {
9
- try {
10
- e(t.throw(c));
11
- } catch (h) {
12
- s(h);
13
- }
14
- }, e = (c) => c.done ? o(c.value) : Promise.resolve(c.value).then(r, y);
15
- e((t = t.apply(a, n)).next());
16
- });
17
- const p = (a) => l(void 0, null, function* () {
18
- try {
19
- a().then(() => {
20
- }, () => {
21
- }).catch(() => {
22
- });
23
- } catch (n) {
24
- }
25
- });
26
- export {
27
- p as safeCall
28
- };
1
+ "use strict";var n=(t,l,c)=>new Promise((f,h)=>{var y=a=>{try{s(c.next(a))}catch(e){h(e)}},C=a=>{try{s(c.throw(a))}catch(e){h(e)}},s=a=>a.done?f(a.value):Promise.resolve(a.value).then(y,C);s((c=c.apply(t,l)).next())});const i=t=>n(exports,null,function*(){try{t().then(()=>{},()=>{}).catch(()=>{})}catch(l){}});exports.safeCall=i;
@@ -1,10 +1 @@
1
- function n(e) {
2
- return new Promise((t) => {
3
- setTimeout(() => {
4
- t();
5
- }, e);
6
- });
7
- }
8
- export {
9
- n as sleep
10
- };
1
+ "use strict";function t(e){return new Promise(s=>{setTimeout(()=>{s()},e)})}exports.sleep=t;
@@ -1,10 +1 @@
1
- import { formatRad as a } from "./formatRad.js";
2
- function n(t) {
3
- return {
4
- longitude: a(-Math.atan2(t.x, -t.z)),
5
- latitude: -Math.asin(t.y / 1)
6
- };
7
- }
8
- export {
9
- n as vectorToCoordinates
10
- };
1
+ "use strict";const a=require("./formatRad.js");function o(t){return{longitude:a.formatRad(-Math.atan2(t.x,-t.z)),latitude:-Math.asin(t.y/1)}}exports.vectorToCoordinates=o;
@@ -1,144 +1 @@
1
- var k = Object.defineProperty;
2
- var G = Object.getOwnPropertySymbols;
3
- var x = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
4
- var b = (n, s, e) => s in n ? k(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e, c = (n, s) => {
5
- for (var e in s || (s = {}))
6
- x.call(s, e) && b(n, e, s[e]);
7
- if (G)
8
- for (var e of G(s))
9
- P.call(s, e) && b(n, e, s[e]);
10
- return n;
11
- };
12
- var d = (n, s, e) => (b(n, typeof s != "symbol" ? s + "" : s, e), e);
13
- var u = (n, s, e) => new Promise((i, t) => {
14
- var a = (r) => {
15
- try {
16
- o(e.next(r));
17
- } catch (l) {
18
- t(l);
19
- }
20
- }, h = (r) => {
21
- try {
22
- o(e.throw(r));
23
- } catch (l) {
24
- t(l);
25
- }
26
- }, o = (r) => r.done ? i(r.value) : Promise.resolve(r.value).then(a, h);
27
- o((e = e.apply(n, s)).next());
28
- });
29
- import { Controller as $ } from "../base/BasePluginWithData.js";
30
- import * as m from "three";
31
- import y from "./utils/getLineGeometries.js";
32
- import { getArrowMaterial as M } from "./utils/getArrowMaterial.js";
33
- import { notNil as w } from "../shared-utils/isNil.js";
34
- import N from "../shared-utils/equal.js";
35
- const L = "v1.0.1", S = "GuideLinePlugin", v = `${S}@${L}`, E = (n) => `${v}--${n}`;
36
- class I extends $ {
37
- constructor(e, i) {
38
- super(e, i);
39
- d(this, "state", {
40
- visible: !1,
41
- enabled: !0,
42
- disposed: !1
43
- });
44
- d(this, "data");
45
- d(this, "linesGroup");
46
- d(this, "disposedErrorLog", () => {
47
- console.error(`${v} is disposed`);
48
- });
49
- d(this, "actionWhenEnabled", (e) => {
50
- if (this.state.enabled)
51
- return e();
52
- });
53
- Object.assign(window, { [`__${S}_DEBUG__`]: this });
54
- }
55
- load(e, i, t = !0) {
56
- return u(this, null, function* () {
57
- const a = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, h = yield this.formatData(e);
58
- this.hooks.emit("dataChange", h, a), this.data = h, this.linesGroup && this.five.scene.remove(this.linesGroup);
59
- const o = this.getLinesGroup(h.routes);
60
- !o || (this.linesGroup = o, yield this.waitFiveModelLoaded(), this.five.scene.add(o), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), i && this.setState(i), this.five.needsRender = !0, this.hooks.emit("dataLoaded", h), console.log(`${v} loaded`, h));
61
- });
62
- }
63
- formatData(e) {
64
- return u(this, null, function* () {
65
- return typeof e == "object" && e !== null && e.version && e.data ? e.data : e;
66
- });
67
- }
68
- show(e) {
69
- return u(this, null, function* () {
70
- this.setState({ visible: !0 }, e);
71
- });
72
- }
73
- hide(e) {
74
- return u(this, null, function* () {
75
- this.setState({ visible: !1 }, e);
76
- });
77
- }
78
- enable(e) {
79
- this.setState({ enabled: !0 }, e);
80
- }
81
- disable(e) {
82
- this.setState({ enabled: !1 }, e);
83
- }
84
- dispose() {
85
- this.setState({ disposed: !0 });
86
- }
87
- setState(e, i) {
88
- var a;
89
- if (this.state.disposed)
90
- return this.disposedErrorLog();
91
- const t = c({}, this.state);
92
- this.state = c(c({}, this.state), e), e.disposed !== void 0 && e.disposed !== t.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== t.visible && this.handleVisible(e.visible, i == null ? void 0 : i.userAction), e.enabled !== void 0 && e.enabled !== t.enabled && this.handleEnable(e.enabled, i == null ? void 0 : i.userAction), N(t, this.state, { deep: !0 }) || (this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: (a = i == null ? void 0 : i.userAction) != null ? a : !0 }), this.five.needsRender = !0);
93
- }
94
- handleEnable(e, i = !0) {
95
- this.linesGroup && (e ? (this.five.scene.add(this.linesGroup), this.actionWhenEnabled(() => this.hooks.emit("enable", { userAction: i }))) : (this.five.scene.remove(this.linesGroup), this.hooks.emit("disable", { userAction: i })));
96
- }
97
- handleVisible(e, i = !0) {
98
- this.linesGroup && (e ? (this.linesGroup.visible = !0, this.actionWhenEnabled(() => this.hooks.emit("show", { userAction: i }))) : (this.linesGroup.visible = !1, this.actionWhenEnabled(() => this.hooks.emit("hide", { userAction: i }))));
99
- }
100
- handleDispose() {
101
- this.linesGroup && this.five.scene.add(this.linesGroup);
102
- }
103
- getLinesGroup(e) {
104
- const i = e.map(this.getLine.bind(this)).filter(w), t = new m.Group();
105
- if (t.name = E("route-group"), i.length !== 0)
106
- return t.add(...i), t;
107
- }
108
- getLine(e) {
109
- var o, r, l, g;
110
- const i = new m.Group(), t = e.panoIndexList.map((p) => {
111
- var f;
112
- return (f = this.five.work.observers[p]) == null ? void 0 : f.standingPosition;
113
- }).filter(w), a = y(t, {
114
- skipPanoIndexMesh: (o = e.skipPanoIndexMesh) != null ? o : !0,
115
- unitWidth: (r = e.unitWidth) != null ? r : 0.6,
116
- unitHeight: (l = e.unitHeight) != null ? l : 0.4
117
- });
118
- if (!a)
119
- return;
120
- const h = M({ textureUrl: (g = e.arrowTextureUrl) != null ? g : this.staticPrefix + "/release/web/arrow6.b6ce0c62.png" });
121
- return a.forEach((p) => {
122
- const f = new m.Mesh(p, h);
123
- f.name = E("route-line-mesh"), i.add(f);
124
- }), i;
125
- }
126
- waitFiveModelLoaded() {
127
- return u(this, null, function* () {
128
- return new Promise((e) => {
129
- if (this.five.model.loaded) {
130
- e();
131
- return;
132
- }
133
- this.five.once("modelLoaded", () => {
134
- e();
135
- });
136
- });
137
- });
138
- }
139
- }
140
- d(I, "lasestVersion", L);
141
- export {
142
- I as default,
143
- E as pluginFlag
144
- };
1
+ "use strict";var S=Object.defineProperty;var G=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var p=(t,s,e)=>s in t?S(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,f=(t,s)=>{for(var e in s||(s={}))j.call(s,e)&&p(t,e,s[e]);if(G)for(var e of G(s))k.call(s,e)&&p(t,e,s[e]);return t};var d=(t,s,e)=>(p(t,typeof s!="symbol"?s+"":s,e),e);var u=(t,s,e)=>new Promise((i,n)=>{var o=a=>{try{r(e.next(a))}catch(h){n(h)}},l=a=>{try{r(e.throw(a))}catch(h){n(h)}},r=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,l);r((e=e.apply(t,s)).next())});const M=require("../base/BasePluginWithData.js"),N=require("three"),y=require("./utils/getLineGeometries.js"),q=require("./utils/getArrowMaterial.js"),w=require("../shared-utils/isNil.js"),O=require("../shared-utils/equal.js");function W(t){if(t&&t.__esModule)return t;const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return s.default=t,Object.freeze(s)}const g=W(N),_="v1.0.1",E="GuideLinePlugin",m=`${E}@${_}`,L=t=>`${m}--${t}`;class P extends M.Controller{constructor(e,i){super(e,i);d(this,"state",{visible:!1,enabled:!0,disposed:!1});d(this,"data");d(this,"linesGroup");d(this,"disposedErrorLog",()=>{console.error(`${m} is disposed`)});d(this,"actionWhenEnabled",e=>{if(this.state.enabled)return e()});Object.assign(window,{[`__${E}_DEBUG__`]:this})}load(e,i,n=!0){return u(this,null,function*(){const o=this.data?JSON.parse(JSON.stringify(this.data)):void 0,l=yield this.formatData(e);this.hooks.emit("dataChange",l,o),this.data=l,this.linesGroup&&this.five.scene.remove(this.linesGroup);const r=this.getLinesGroup(l.routes);!r||(this.linesGroup=r,yield this.waitFiveModelLoaded(),this.five.scene.add(r),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),i&&this.setState(i),this.five.needsRender=!0,this.hooks.emit("dataLoaded",l),console.log(`${m} loaded`,l))})}formatData(e){return u(this,null,function*(){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e})}show(e){return u(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return u(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,i){var o;if(this.state.disposed)return this.disposedErrorLog();const n=f({},this.state);this.state=f(f({},this.state),e),e.disposed!==void 0&&e.disposed!==n.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==n.visible&&this.handleVisible(e.visible,i==null?void 0:i.userAction),e.enabled!==void 0&&e.enabled!==n.enabled&&this.handleEnable(e.enabled,i==null?void 0:i.userAction),O.equal(n,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:(o=i==null?void 0:i.userAction)!=null?o:!0}),this.five.needsRender=!0)}handleEnable(e,i=!0){this.linesGroup&&(e?(this.five.scene.add(this.linesGroup),this.actionWhenEnabled(()=>this.hooks.emit("enable",{userAction:i}))):(this.five.scene.remove(this.linesGroup),this.hooks.emit("disable",{userAction:i})))}handleVisible(e,i=!0){this.linesGroup&&(e?(this.linesGroup.visible=!0,this.actionWhenEnabled(()=>this.hooks.emit("show",{userAction:i}))):(this.linesGroup.visible=!1,this.actionWhenEnabled(()=>this.hooks.emit("hide",{userAction:i}))))}handleDispose(){this.linesGroup&&this.five.scene.add(this.linesGroup)}getLinesGroup(e){const i=e.map(this.getLine.bind(this)).filter(w.notNil),n=new g.Group;if(n.name=L("route-group"),i.length!==0)return n.add(...i),n}getLine(e){var r,a,h,v;const i=new g.Group,n=e.panoIndexList.map(b=>{var c;return(c=this.five.work.observers[b])==null?void 0:c.standingPosition}).filter(w.notNil),o=y.getLineGeometries(n,{skipPanoIndexMesh:(r=e.skipPanoIndexMesh)!=null?r:!0,unitWidth:(a=e.unitWidth)!=null?a:.6,unitHeight:(h=e.unitHeight)!=null?h:.4});if(!o)return;const l=q.getArrowMaterial({textureUrl:(v=e.arrowTextureUrl)!=null?v:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"});return o.forEach(b=>{const c=new g.Mesh(b,l);c.name=L("route-line-mesh"),i.add(c)}),i}waitFiveModelLoaded(){return u(this,null,function*(){return new Promise(e=>{if(this.five.model.loaded){e();return}this.five.once("modelLoaded",()=>{e()})})})}}d(P,"lasestVersion",_);exports.Controller=P;
@@ -1,6 +1 @@
1
- import n from "./Controller.js";
2
- const t = (e, o) => new n(e, o);
3
- export {
4
- t as GuideLinePlugin,
5
- t as default
6
- };
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./Controller.js");require("../base/BasePluginWithData.js");require("../base/BasePlugin.js");require("../shared-utils/Subscribe.js");require("three");require("./utils/getLineGeometries.js");require("polyline-normals");require("./utils/getArrowMaterial.js");require("../shared-utils/isNil.js");require("../shared-utils/equal.js");require("../shared-utils/isTruelyObject.js");const e=(r,i)=>new u.Controller(r,i);exports.GuideLinePlugin=e;exports.default=e;
@@ -1,13 +1 @@
1
- import * as a from "three";
2
- function o(e) {
3
- const r = new a.TextureLoader().load(e.textureUrl);
4
- return r.wrapS = r.wrapT = a.RepeatWrapping, r.encoding = a.sRGBEncoding, new a.MeshBasicMaterial({
5
- color: 16777215,
6
- map: r,
7
- transparent: !0,
8
- opacity: 0.8
9
- });
10
- }
11
- export {
12
- o as getArrowMaterial
13
- };
1
+ "use strict";const o=require("three");function c(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const a=c(o);function i(e){const t=new a.TextureLoader().load(e.textureUrl);return t.wrapS=t.wrapT=a.RepeatWrapping,t.encoding=a.sRGBEncoding,new a.MeshBasicMaterial({color:16777215,map:t,transparent:!0,opacity:.8})}exports.getArrowMaterial=i;
@@ -1,64 +1 @@
1
- import * as T from "three";
2
- import { Vector3 as A } from "three";
3
- import L from "polyline-normals";
4
- const O = 2, U = 3, V = 3, F = 2;
5
- function X(i, r) {
6
- var w, I, _;
7
- if (i.length < 2)
8
- return console.warn("positionList length must be greater than 1"), [];
9
- const p = (w = r == null ? void 0 : r.unitWidth) != null ? w : 0.5, u = (I = r == null ? void 0 : r.unitHeight) != null ? I : 0.5, R = (_ = r == null ? void 0 : r.skipPanoIndexMesh) != null ? _ : !1, f = new T.CatmullRomCurve3(i, !1, "catmullrom", 1);
10
- if (R) {
11
- const E = Math.ceil(f.getLength() / u * 1.5), s = f.getPoints(E), v = [];
12
- let o = 0;
13
- const a = i;
14
- return a.forEach((l, y) => {
15
- let n = 0, t = 99999999;
16
- s.forEach((c, e) => {
17
- const h = c.distanceTo(l);
18
- h < t && (n = e, t = h);
19
- });
20
- const m = s[n + 1], x = m == null ? void 0 : m.distanceTo(l), d = s[n - 1], g = d == null ? void 0 : d.distanceTo(l);
21
- if (n > o && n - o > 1) {
22
- let c = n;
23
- d !== void 0 && g > 0.8 && (c = n + 1), d !== void 0 && g > 0.2 && g < 0.3 ? c = n : t > 0.2 && t < 0.3 && (c = n + 1);
24
- let e = o;
25
- if (m !== void 0 && x > 0.2 && x < 0.3 ? e = o + 1 : t > 0.2 && t < 0.3 && (e = o), s[e] && s[e + 1]) {
26
- const b = a[y - 1];
27
- if (b)
28
- if (b.equals(s[e]))
29
- e += 1;
30
- else {
31
- const P = new A().subVectors(s[e + 1], s[e]), M = new A().subVectors(b, s[e]);
32
- P.angleTo(M) < Math.PI / 2 && (e += 1);
33
- }
34
- }
35
- if (c < e || c - e <= 1)
36
- return;
37
- const h = s.slice(e, c), N = B(h, p, u);
38
- v.push(N), o = n;
39
- }
40
- }), v;
41
- } else {
42
- const E = Math.ceil(f.getLength()), s = f.getPoints(E);
43
- return [B(s, p, u)];
44
- }
45
- }
46
- function B(i, r, p) {
47
- const u = r / 2, R = p / r, f = i.length, w = L(i.map((t) => [t.x, t.z])), _ = (i.length - 1) * O * U, E = 2 * f, s = E * V, v = E * F, o = new Uint32Array(_), a = new Float32Array(s), l = new Float32Array(v);
48
- i.forEach((t, m) => {
49
- });
50
- let y = 0;
51
- for (let t = 0; t < i.length; t++) {
52
- const [m, x] = w[t][0], d = i[t], { x: g, y: c, z: e } = d, h = new A(g + m * u, c + 0.05, e + x * u);
53
- a[t * 6 + 0] = h.x, a[t * 6 + 1] = h.y, a[t * 6 + 2] = h.z;
54
- const N = new A(g - m * u, c + 0.05, e - x * u);
55
- a[t * 6 + 3] = N.x, a[t * 6 + 4] = N.y, a[t * 6 + 5] = N.z, y += t > 0 ? i[t - 1].clone().sub(i[t]).length() : 0;
56
- const b = y / r / R;
57
- l[t * 4 + 0] = 0, l[t * 4 + 1] = b, l[t * 4 + 2] = 1, l[t * 4 + 3] = b, t !== i.length - 1 && (o[t * 6 + 0] = t * 2 + 0, o[t * 6 + 1] = t * 2 + 2, o[t * 6 + 2] = t * 2 + 1, o[t * 6 + 3] = t * 2 + 2, o[t * 6 + 4] = t * 2 + 3, o[t * 6 + 5] = t * 2 + 1);
58
- }
59
- const n = new T.BufferGeometry();
60
- return n.setAttribute("position", new T.BufferAttribute(a, 3)), n.setAttribute("uv", new T.BufferAttribute(l, 2)), n.setIndex(new T.BufferAttribute(o, 1)), n;
61
- }
62
- export {
63
- X as default
64
- };
1
+ "use strict";const T=require("three"),B=require("polyline-normals"),L=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function V(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const u in e)if(u!=="default"){const c=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(o,u,c.get?c:{enumerable:!0,get:()=>e[u]})}}return o.default=e,Object.freeze(o)}const N=V(T),G=L(B),U=2,z=3,F=3,j=2;function C(e,o){var w,O,x;if(e.length<2)return console.warn("positionList length must be greater than 1"),[];const u=(w=o==null?void 0:o.unitWidth)!=null?w:.5,c=(O=o==null?void 0:o.unitHeight)!=null?O:.5,A=(x=o==null?void 0:o.skipPanoIndexMesh)!=null?x:!1,g=new N.CatmullRomCurve3(e,!1,"catmullrom",1);if(A){const b=Math.ceil(g.getLength()/c*1.5),r=g.getPoints(b),p=[];let i=0;const l=e;return l.forEach((d,R)=>{let s=0,t=99999999;r.forEach((a,n)=>{const m=a.distanceTo(d);m<t&&(s=n,t=m)});const f=r[s+1],y=f==null?void 0:f.distanceTo(d),h=r[s-1],E=h==null?void 0:h.distanceTo(d);if(s>i&&s-i>1){let a=s;h!==void 0&&E>.8&&(a=s+1),h!==void 0&&E>.2&&E<.3?a=s:t>.2&&t<.3&&(a=s+1);let n=i;if(f!==void 0&&y>.2&&y<.3?n=i+1:t>.2&&t<.3&&(n=i),r[n]&&r[n+1]){const _=l[R-1];if(_)if(_.equals(r[n]))n+=1;else{const I=new T.Vector3().subVectors(r[n+1],r[n]),M=new T.Vector3().subVectors(_,r[n]);I.angleTo(M)<Math.PI/2&&(n+=1)}}if(a<n||a-n<=1)return;const m=r.slice(n,a),v=P(m,u,c);p.push(v),i=s}}),p}else{const b=Math.ceil(g.getLength()),r=g.getPoints(b);return[P(r,u,c)]}}function P(e,o,u){const c=o/2,A=u/o,g=e.length,w=G.default(e.map(t=>[t.x,t.z])),x=(e.length-1)*U*z,b=2*g,r=b*F,p=b*j,i=new Uint32Array(x),l=new Float32Array(r),d=new Float32Array(p);e.forEach((t,f)=>{});let R=0;for(let t=0;t<e.length;t++){const[f,y]=w[t][0],h=e[t],{x:E,y:a,z:n}=h,m=new T.Vector3(E+f*c,a+.05,n+y*c);l[t*6+0]=m.x,l[t*6+1]=m.y,l[t*6+2]=m.z;const v=new T.Vector3(E-f*c,a+.05,n-y*c);l[t*6+3]=v.x,l[t*6+4]=v.y,l[t*6+5]=v.z,R+=t>0?e[t-1].clone().sub(e[t]).length():0;const _=R/o/A;d[t*4+0]=0,d[t*4+1]=_,d[t*4+2]=1,d[t*4+3]=_,t!==e.length-1&&(i[t*6+0]=t*2+0,i[t*6+1]=t*2+2,i[t*6+2]=t*2+1,i[t*6+3]=t*2+2,i[t*6+4]=t*2+3,i[t*6+5]=t*2+1)}const s=new N.BufferGeometry;return s.setAttribute("position",new N.BufferAttribute(l,3)),s.setAttribute("uv",new N.BufferAttribute(d,2)),s.setIndex(new N.BufferAttribute(i,1)),s}exports.getLineGeometries=C;
@@ -1,271 +1 @@
1
- var ae = Object.defineProperty, ce = Object.defineProperties;
2
- var le = Object.getOwnPropertyDescriptors;
3
- var j = Object.getOwnPropertySymbols;
4
- var de = Object.prototype.hasOwnProperty, me = Object.prototype.propertyIsEnumerable;
5
- var H = (i, t, e) => t in i ? ae(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, k = (i, t) => {
6
- for (var e in t || (t = {}))
7
- de.call(t, e) && H(i, e, t[e]);
8
- if (j)
9
- for (var e of j(t))
10
- me.call(t, e) && H(i, e, t[e]);
11
- return i;
12
- }, y = (i, t) => ce(i, le(t));
13
- import { SvelteComponent as fe, init as ue, safe_not_equal as he, append_styles as pe, element as _e, attr as be, add_render_callback as Ie, set_style as W, insert as v, add_resize_listener as ge, group_outros as Z, update_keyed_each as ke, outro_and_destroy_block as ye, check_outros as G, transition_in as w, transition_out as z, detach as T, empty as A, create_component as Pe, mount_component as we, destroy_component as Le } from "svelte/internal";
14
- import { Five as P } from "@realsee/five";
15
- import { beforeUpdate as Me, onMount as ze, onDestroy as Ce } from "svelte";
16
- import * as Ee from "three";
17
- import Fe from "./ItemLabelItem.js";
18
- import Oe from "../shared-utils/debounce.js";
19
- import { isImpacted as B } from "./utils/isImpacted.js";
20
- import { getStrokeLength as xe } from "./utils/getStrokeLength.js";
21
- import { getLabelTransform as Ve } from "./utils/getLabelTransform.js";
22
- import { transform2RenderData as N } from "./utils/transform2RenderData.js";
23
- function ve(i) {
24
- pe(i, "svelte-gk8s47", ".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}");
25
- }
26
- function q(i, t, e) {
27
- const r = i.slice();
28
- return r[30] = t[e], r;
29
- }
30
- function X(i) {
31
- let t, e;
32
- return t = new Fe({
33
- props: {
34
- itemLabel: i[30],
35
- hooks: i[0],
36
- anchorEnabled: i[2],
37
- onIconClick: i[6]
38
- }
39
- }), {
40
- c() {
41
- Pe(t.$$.fragment);
42
- },
43
- m(r, f) {
44
- we(t, r, f), e = !0;
45
- },
46
- p(r, f) {
47
- const o = {};
48
- f[0] & 2 && (o.itemLabel = r[30]), f[0] & 1 && (o.hooks = r[0]), f[0] & 4 && (o.anchorEnabled = r[2]), t.$set(o);
49
- },
50
- i(r) {
51
- e || (w(t.$$.fragment, r), e = !0);
52
- },
53
- o(r) {
54
- z(t.$$.fragment, r), e = !1;
55
- },
56
- d(r) {
57
- Le(t, r);
58
- }
59
- };
60
- }
61
- function Y(i, t) {
62
- let e, r, f, o = t[30].visible && X(t);
63
- return {
64
- key: i,
65
- first: null,
66
- c() {
67
- e = A(), o && o.c(), r = A(), this.first = e;
68
- },
69
- m(d, p) {
70
- v(d, e, p), o && o.m(d, p), v(d, r, p), f = !0;
71
- },
72
- p(d, p) {
73
- t = d, t[30].visible ? o ? (o.p(t, p), p[0] & 2 && w(o, 1)) : (o = X(t), o.c(), w(o, 1), o.m(r.parentNode, r)) : o && (Z(), z(o, 1, 1, () => {
74
- o = null;
75
- }), G());
76
- },
77
- i(d) {
78
- f || (w(o), f = !0);
79
- },
80
- o(d) {
81
- z(o), f = !1;
82
- },
83
- d(d) {
84
- d && T(e), o && o.d(d), d && T(r);
85
- }
86
- };
87
- }
88
- function Te(i) {
89
- let t, e = [], r = /* @__PURE__ */ new Map(), f, o, d = i[1];
90
- const p = (c) => c[30].id;
91
- for (let c = 0; c < d.length; c += 1) {
92
- let a = q(i, d, c), _ = p(a);
93
- r.set(_, e[c] = Y(_, a));
94
- }
95
- return {
96
- c() {
97
- t = _e("div");
98
- for (let c = 0; c < e.length; c += 1)
99
- e[c].c();
100
- be(t, "class", "item-labels-container svelte-gk8s47"), Ie(() => i[12].call(t)), W(t, "opacity", i[5] ? 1 : 0, !1);
101
- },
102
- m(c, a) {
103
- v(c, t, a);
104
- for (let _ = 0; _ < e.length; _ += 1)
105
- e[_].m(t, null);
106
- f = ge(t, i[12].bind(t)), o = !0;
107
- },
108
- p(c, a) {
109
- a[0] & 71 && (d = c[1], Z(), e = ke(e, a, p, 1, c, d, r, t, ye, Y, null, q), G()), a[0] & 32 && W(t, "opacity", c[5] ? 1 : 0, !1);
110
- },
111
- i(c) {
112
- if (!o) {
113
- for (let a = 0; a < d.length; a += 1)
114
- w(e[a]);
115
- o = !0;
116
- }
117
- },
118
- o(c) {
119
- for (let a = 0; a < e.length; a += 1)
120
- z(e[a]);
121
- o = !1;
122
- },
123
- d(c) {
124
- c && T(t);
125
- for (let a = 0; a < e.length; a += 1)
126
- e[a].d();
127
- f();
128
- }
129
- };
130
- }
131
- let De = 11;
132
- function Ue(i, t, e) {
133
- const { Raycaster: r, Vector3: f } = Ee;
134
- let { five: o } = t, { modelOcclusionEnable: d } = t, { itemLabels: p } = t, { hooks: c } = t, { displayStrategyType: a } = t, { maxVisibleDistance: _ } = t, C = null, g = null, J = (o == null ? void 0 : o.currentMode) === P.Mode.Panorama, E, F, D = [], O = !0;
135
- const K = (s, u) => {
136
- const h = s.camera.position.clone(), m = new f(u.modelPosition[0], u.modelPosition[1], u.modelPosition[2]), n = m.distanceTo(h);
137
- return _ !== void 0 && s.state.mode === P.Mode.Panorama && n > _ ? !1 : B(s, m.clone().sub(h).normalize(), h, n);
138
- }, Q = (s) => {
139
- const { camera: u, model: h } = o, { x: m, y: n, z: l } = s.clone().project(u), I = (m + 1) / 2, b = (2 - (n + 1)) / 2, V = Math.abs(l) < 1 && [I, b].every((S) => S < 1 && S >= 0);
140
- return Boolean(V);
141
- }, $ = (s, u) => {
142
- const h = new f(u.modelPosition[0], u.modelPosition[1], u.modelPosition[2]), m = s.project2d(h), n = m == null ? void 0 : m.x, l = m == null ? void 0 : m.y;
143
- return [n, l];
144
- }, ee = (s, u) => {
145
- const h = u.map((n) => {
146
- if (s.state.panoIndex !== n.panoIndex)
147
- return y(k({}, n), { visible: !1 });
148
- const l = $(s, n);
149
- n.name.length * De;
150
- const I = xe(n.modelPosition[1], a), b = s.currentMode === P.Mode.Panorama ? Q(new f(n.position[0], n.position[1], n.position[2])) : !0, x = d ? K(s, n) : !1, M = b && !x;
151
- if (!M)
152
- return y(k({}, n), { visible: M });
153
- D.push(l);
154
- const V = Ve(l);
155
- return y(k({}, n), {
156
- visible: M,
157
- transform: V,
158
- strokeLength: I
159
- });
160
- }), m = h.filter(({ visible: n }) => n).map((n) => ({
161
- itemLabelItem: n,
162
- distance: new f(n.modelPosition[0], n.modelPosition[1], n.modelPosition[2]).clone().distanceTo(s.camera.position)
163
- })).sort((n, l) => n.distance - l.distance);
164
- return h.map((n) => {
165
- const l = m.findIndex((I) => I.itemLabelItem.id === n.id);
166
- return l !== void 0 ? y(k({}, n), { zIndex: l * 10 }) : n;
167
- });
168
- }, L = () => {
169
- D = [], e(1, g = ee(o, g));
170
- }, U = () => {
171
- e(5, O = !1), te();
172
- }, te = Oe(
173
- () => {
174
- e(5, O = !0), L();
175
- },
176
- 300
177
- ), R = () => {
178
- o.once("renderFrame", L);
179
- }, oe = () => {
180
- window.addEventListener("resize", R, !1);
181
- }, ne = () => {
182
- C !== p && (e(1, g = N(p)), C = p, L());
183
- }, se = (s, u) => {
184
- let h = [];
185
- for (let n = 0; n < u.length; n++) {
186
- const { position: l, panoIndex: I } = u[n], b = s.distanceTo(l);
187
- (_ === void 0 || b <= _ || o.state.mode !== P.Mode.Panorama) && h.push({ panoIndex: I, obVector: l, distance: b });
188
- }
189
- h = h.sort((n, l) => n.distance - l.distance);
190
- let m;
191
- for (let n = 0; n < h.length; n++) {
192
- const { obVector: l, distance: I, panoIndex: b } = h[n];
193
- if (!B(o, s, l, I)) {
194
- m = b;
195
- break;
196
- }
197
- }
198
- return typeof m == "number" ? u[m] : void 0;
199
- }, ie = (s) => {
200
- if (o.state.mode === P.Mode.Panorama)
201
- return;
202
- const u = o.work.observers, h = new f().fromArray(s.position), m = se(h, u);
203
- if (m && (s.observerIndex = m.panoIndex), typeof s.observerIndex == "number") {
204
- const n = u[s.observerIndex], l = h.clone().sub(n.position).normalize(), I = {
205
- longitude: Math.PI + Math.atan2(l.x, l.z),
206
- latitude: Math.acos(l.y / l.length()) - Math.PI / 2
207
- };
208
- o.setState(y(k({}, I), {
209
- mode: P.Mode.Panorama,
210
- panoIndex: s.observerIndex
211
- })), o.once("initAnimationEnded", () => {
212
- e(1, g = g.map((b) => y(k({}, b), {
213
- isFold: b.id !== s.id
214
- }))), o.once("cameraUpdate", () => {
215
- e(1, g = g.map((b) => y(k({}, b), { isFold: !1 })));
216
- });
217
- });
218
- }
219
- };
220
- Me(() => {
221
- ne();
222
- }), ze(() => {
223
- e(1, g = N(p)), C = p, L(), oe(), o.on("cameraUpdate", U);
224
- }), Ce(() => {
225
- o.off("cameraUpdate", U), window.removeEventListener("resize", R, !1);
226
- });
227
- function re() {
228
- E = this.clientWidth, F = this.clientHeight, e(3, E), e(4, F);
229
- }
230
- return i.$$set = (s) => {
231
- "five" in s && e(7, o = s.five), "modelOcclusionEnable" in s && e(8, d = s.modelOcclusionEnable), "itemLabels" in s && e(9, p = s.itemLabels), "hooks" in s && e(0, c = s.hooks), "displayStrategyType" in s && e(10, a = s.displayStrategyType), "maxVisibleDistance" in s && e(11, _ = s.maxVisibleDistance);
232
- }, [
233
- c,
234
- g,
235
- J,
236
- E,
237
- F,
238
- O,
239
- ie,
240
- o,
241
- d,
242
- p,
243
- a,
244
- _,
245
- re
246
- ];
247
- }
248
- class Ye extends fe {
249
- constructor(t) {
250
- super(), ue(
251
- this,
252
- t,
253
- Ue,
254
- Te,
255
- he,
256
- {
257
- five: 7,
258
- modelOcclusionEnable: 8,
259
- itemLabels: 9,
260
- hooks: 0,
261
- displayStrategyType: 10,
262
- maxVisibleDistance: 11
263
- },
264
- ve,
265
- [-1, -1]
266
- );
267
- }
268
- }
269
- export {
270
- Ye as default
271
- };
1
+ "use strict";var te=Object.defineProperty,ne=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable;var V=(s,t,e)=>t in s?te(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,y=(s,t)=>{for(var e in t||(t={}))se.call(t,e)&&V(s,e,t[e]);if(S)for(var e of S(t))ie.call(t,e)&&V(s,e,t[e]);return s},L=(s,t)=>ne(s,oe(t));const r=require("svelte/internal"),P=require("@realsee/five"),z=require("svelte"),re=require("three"),ae=require("./ItemLabelItem.js"),ce=require("../shared-utils/debounce.js"),x=require("./utils/isImpacted.js"),le=require("./utils/getStrokeLength.js"),de=require("./utils/getLabelTransform.js"),U=require("./utils/transform2RenderData.js");function me(s){if(s&&s.__esModule)return s;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const ue=me(re);function fe(s){r.append_styles(s,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function H(s,t,e){const a=s.slice();return a[30]=t[e],a}function N(s){let t,e;return t=new ae.ItemLabelItem({props:{itemLabel:s[30],hooks:s[0],anchorEnabled:s[2],onIconClick:s[6]}}),{c(){r.create_component(t.$$.fragment)},m(a,f){r.mount_component(t,a,f),e=!0},p(a,f){const n={};f[0]&2&&(n.itemLabel=a[30]),f[0]&1&&(n.hooks=a[0]),f[0]&4&&(n.anchorEnabled=a[2]),t.$set(n)},i(a){e||(r.transition_in(t.$$.fragment,a),e=!0)},o(a){r.transition_out(t.$$.fragment,a),e=!1},d(a){r.destroy_component(t,a)}}}function W(s,t){let e,a,f,n=t[30].visible&&N(t);return{key:s,first:null,c(){e=r.empty(),n&&n.c(),a=r.empty(),this.first=e},m(m,h){r.insert(m,e,h),n&&n.m(m,h),r.insert(m,a,h),f=!0},p(m,h){t=m,t[30].visible?n?(n.p(t,h),h[0]&2&&r.transition_in(n,1)):(n=N(t),n.c(),r.transition_in(n,1),n.m(a.parentNode,a)):n&&(r.group_outros(),r.transition_out(n,1,1,()=>{n=null}),r.check_outros())},i(m){f||(r.transition_in(n),f=!0)},o(m){r.transition_out(n),f=!1},d(m){m&&r.detach(e),n&&n.d(m),m&&r.detach(a)}}}function _e(s){let t,e=[],a=new Map,f,n,m=s[1];const h=l=>l[30].id;for(let l=0;l<m.length;l+=1){let c=H(s,m,l),p=h(c);a.set(p,e[l]=W(p,c))}return{c(){t=r.element("div");for(let l=0;l<e.length;l+=1)e[l].c();r.attr(t,"class","item-labels-container svelte-gk8s47"),r.add_render_callback(()=>s[12].call(t)),r.set_style(t,"opacity",s[5]?1:0,!1)},m(l,c){r.insert(l,t,c);for(let p=0;p<e.length;p+=1)e[p].m(t,null);f=r.add_resize_listener(t,s[12].bind(t)),n=!0},p(l,c){c[0]&71&&(m=l[1],r.group_outros(),e=r.update_keyed_each(e,c,h,1,l,m,a,t,r.outro_and_destroy_block,W,null,H),r.check_outros()),c[0]&32&&r.set_style(t,"opacity",l[5]?1:0,!1)},i(l){if(!n){for(let c=0;c<m.length;c+=1)r.transition_in(e[c]);n=!0}},o(l){for(let c=0;c<e.length;c+=1)r.transition_out(e[c]);n=!1},d(l){l&&r.detach(t);for(let c=0;c<e.length;c+=1)e[c].d();f()}}}let be=11;function he(s,t,e){const{Raycaster:a,Vector3:f}=ue;let{five:n}=t,{modelOcclusionEnable:m}=t,{itemLabels:h}=t,{hooks:l}=t,{displayStrategyType:c}=t,{maxVisibleDistance:p}=t,F=null,k=null,A=(n==null?void 0:n.currentMode)===P.Five.Mode.Panorama,M,O,C=[],j=!0;const B=(i,_)=>{const b=i.camera.position.clone(),u=new f(_.modelPosition[0],_.modelPosition[1],_.modelPosition[2]),o=u.distanceTo(b);return p!==void 0&&i.state.mode===P.Five.Mode.Panorama&&o>p?!1:x.isImpacted(i,u.clone().sub(b).normalize(),b,o)},X=i=>{const{camera:_,model:b}=n,{x:u,y:o,z:d}=i.clone().project(_),I=(u+1)/2,g=(2-(o+1))/2,T=Math.abs(d)<1&&[I,g].every(R=>R<1&&R>=0);return Boolean(T)},Y=(i,_)=>{const b=new f(_.modelPosition[0],_.modelPosition[1],_.modelPosition[2]),u=i.project2d(b),o=u==null?void 0:u.x,d=u==null?void 0:u.y;return[o,d]},Z=(i,_)=>{const b=_.map(o=>{if(i.state.panoIndex!==o.panoIndex)return L(y({},o),{visible:!1});const d=Y(i,o);o.name.length*be;const I=le.getStrokeLength(o.modelPosition[1],c),g=i.currentMode===P.Five.Mode.Panorama?X(new f(o.position[0],o.position[1],o.position[2])):!0,E=m?B(i,o):!1,w=g&&!E;if(!w)return L(y({},o),{visible:w});C.push(d);const T=de.getLabelTransform(d);return L(y({},o),{visible:w,transform:T,strokeLength:I})}),u=b.filter(({visible:o})=>o).map(o=>({itemLabelItem:o,distance:new f(o.modelPosition[0],o.modelPosition[1],o.modelPosition[2]).clone().distanceTo(i.camera.position)})).sort((o,d)=>o.distance-d.distance);return b.map(o=>{const d=u.findIndex(I=>I.itemLabelItem.id===o.id);return d!==void 0?L(y({},o),{zIndex:d*10}):o})},v=()=>{C=[],e(1,k=Z(n,k))},D=()=>{e(5,j=!1),G()},G=ce.debounce(()=>{e(5,j=!0),v()},300),q=()=>{n.once("renderFrame",v)},J=()=>{window.addEventListener("resize",q,!1)},K=()=>{F!==h&&(e(1,k=U.transform2RenderData(h)),F=h,v())},Q=(i,_)=>{let b=[];for(let o=0;o<_.length;o++){const{position:d,panoIndex:I}=_[o],g=i.distanceTo(d);(p===void 0||g<=p||n.state.mode!==P.Five.Mode.Panorama)&&b.push({panoIndex:I,obVector:d,distance:g})}b=b.sort((o,d)=>o.distance-d.distance);let u;for(let o=0;o<b.length;o++){const{obVector:d,distance:I,panoIndex:g}=b[o];if(!x.isImpacted(n,i,d,I)){u=g;break}}return typeof u=="number"?_[u]:void 0},$=i=>{if(n.state.mode===P.Five.Mode.Panorama)return;const _=n.work.observers,b=new f().fromArray(i.position),u=Q(b,_);if(u&&(i.observerIndex=u.panoIndex),typeof i.observerIndex=="number"){const o=_[i.observerIndex],d=b.clone().sub(o.position).normalize(),I={longitude:Math.PI+Math.atan2(d.x,d.z),latitude:Math.acos(d.y/d.length())-Math.PI/2};n.setState(L(y({},I),{mode:P.Five.Mode.Panorama,panoIndex:i.observerIndex})),n.once("initAnimationEnded",()=>{e(1,k=k.map(g=>L(y({},g),{isFold:g.id!==i.id}))),n.once("cameraUpdate",()=>{e(1,k=k.map(g=>L(y({},g),{isFold:!1})))})})}};z.beforeUpdate(()=>{K()}),z.onMount(()=>{e(1,k=U.transform2RenderData(h)),F=h,v(),J(),n.on("cameraUpdate",D)}),z.onDestroy(()=>{n.off("cameraUpdate",D),window.removeEventListener("resize",q,!1)});function ee(){M=this.clientWidth,O=this.clientHeight,e(3,M),e(4,O)}return s.$$set=i=>{"five"in i&&e(7,n=i.five),"modelOcclusionEnable"in i&&e(8,m=i.modelOcclusionEnable),"itemLabels"in i&&e(9,h=i.itemLabels),"hooks"in i&&e(0,l=i.hooks),"displayStrategyType"in i&&e(10,c=i.displayStrategyType),"maxVisibleDistance"in i&&e(11,p=i.maxVisibleDistance)},[l,k,A,M,O,j,$,n,m,h,c,p,ee]}class pe extends r.SvelteComponent{constructor(t){super(),r.init(this,t,he,_e,r.safe_not_equal,{five:7,modelOcclusionEnable:8,itemLabels:9,hooks:0,displayStrategyType:10,maxVisibleDistance:11},fe,[-1,-1])}}exports.ItemLabelComponent=pe;