@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,88 +1 @@
1
- var b = (e, o, n) => new Promise((m, p) => {
2
- var t = (d) => {
3
- try {
4
- a(n.next(d));
5
- } catch (f) {
6
- p(f);
7
- }
8
- }, i = (d) => {
9
- try {
10
- a(n.throw(d));
11
- } catch (f) {
12
- p(f);
13
- }
14
- }, a = (d) => d.done ? m(d.value) : Promise.resolve(d.value).then(t, i);
15
- a((n = n.apply(e, o)).next());
16
- });
17
- import { Five as y } from "@realsee/five";
18
- import * as h from "@tweenjs/tween.js";
19
- import { tweenProgress as T } from "../shared-utils/animationFrame/tween.js";
20
- import { Rotation as r } from "./typing.js";
21
- import { formatLatitude as P, formatLongitude as v } from "../shared-utils/animationFrame/formatRad.js";
22
- import { progressNumber as I } from "../shared-utils/animationFrame/calculateProgress.js";
23
- const w = (e, o, n) => {
24
- const m = Math.PI, p = m * 2;
25
- return e = v(e), o = v(o), n === r.Anticlockwise && e < o && (e += p), n === r.Clockwise && o < e && (o += p), n === r.Loop && o - e > m ? w(e, o, r.Anticlockwise) : n === r.Loop && e - o > m ? w(e, o, r.Clockwise) : { from: e, to: o };
26
- }, R = (e) => {
27
- const o = {}, n = (d, f, ...L) => b(void 0, [d, f, ...L], function* (t, i, a = { preload: !0 }) {
28
- return o.interruptCallback && o.interruptCallback(!1), a.asyncStartCallback && (yield a.asyncStartCallback()), t.mode && t.mode !== e.currentMode && (yield e.changeMode(t.mode)), a.preload && t.panoIndex !== void 0 && t.panoIndex !== e.panoIndex && (yield e.preloadPano(t.panoIndex)), a.asyncEndCallback && (yield a.asyncEndCallback()), t.panoIndex === void 0 && t.fov === void 0 && t.latitude === void 0 && t.longitude === void 0 ? !0 : yield new Promise((u, l) => {
29
- const c = t.panoIndex !== void 0 ? t.panoIndex : e.panoIndex;
30
- c !== void 0 ? e.moveToPano(
31
- c,
32
- Object.assign(
33
- {
34
- duration: i,
35
- moveEndCallback: () => u(!0),
36
- moveCancelCallback: () => l(!1)
37
- },
38
- t
39
- )
40
- ) : l(!1);
41
- });
42
- }), m = (t) => {
43
- const i = e.state, a = P(i.latitude), d = P(t.latitude), { from: f, to: L } = w(
44
- i.longitude,
45
- t.longitude,
46
- t.rotation || r.Loop
47
- ), u = i.fov, l = t.fov;
48
- return {
49
- from: { latitude: a, longitude: f, fov: u },
50
- to: { latitude: d, longitude: L, fov: l }
51
- };
52
- };
53
- return {
54
- move: n,
55
- rotate: (d, f, ...L) => b(void 0, [d, f, ...L], function* (t, i, a = {}) {
56
- o.interruptCallback && o.interruptCallback(!1), a.asyncStartCallback && (yield a.asyncStartCallback()), e.currentMode !== y.Mode.Panorama && (yield e.changeMode(y.Mode.Panorama)), t.panoIndex !== void 0 && t.panoIndex !== e.panoIndex && (a.preload && (yield e.preloadPano(t.panoIndex)), yield new Promise((c, k) => {
57
- if (!t.panoIndex) {
58
- c(!0);
59
- return;
60
- }
61
- e.moveToPano(t.panoIndex, {
62
- moveEndCallback: () => c(!0),
63
- moveCancelCallback: () => k(!1)
64
- });
65
- })), a.asyncEndCallback && (yield a.asyncEndCallback());
66
- const { from: u, to: l } = m(t);
67
- return yield new Promise((c) => {
68
- const k = ({ progress: s }) => {
69
- const C = {};
70
- C.longitude = I(u.longitude, l.longitude, s), C.latitude = I(u.latitude, l.latitude, s), C.fov = I(u.fov, l.fov, s), e.setState(C, !0);
71
- }, M = () => {
72
- c(!0);
73
- }, E = () => {
74
- c(!1);
75
- }, S = t.rotateSpeed ? Math.ceil(Math.abs(l.longitude - u.longitude) / t.rotateSpeed * 1e3) : i, x = T(S, h.Easing.Linear.None).onUpdate(k).onComplete(M).onDestroy(E);
76
- t.rotation === r.Loop && x.repeat(1 / 0).yoyo(!0), o.interruptCallback = (s = !0) => {
77
- x.destroy(), o.interruptCallback = void 0, o.timeoutId && (clearTimeout(o.timeoutId), o.timeoutId = void 0), c(s);
78
- }, o.timeoutId = setTimeout(() => {
79
- o.interruptCallback && o.interruptCallback(!0);
80
- }, i);
81
- });
82
- })
83
- };
84
- };
85
- export {
86
- R as CameraMovementPlugin,
87
- R as default
88
- };
1
+ "use strict";var w=(t,a,o)=>new Promise((i,m)=>{var e=l=>{try{n(o.next(l))}catch(f){m(f)}},r=l=>{try{n(o.throw(l))}catch(f){m(f)}},n=l=>l.done?i(l.value):Promise.resolve(l.value).then(e,r);n((o=o.apply(t,a)).next())});const y=require("@realsee/five"),g=require("@tweenjs/tween.js"),h=require("../shared-utils/animationFrame/tween.js"),s=require("./typing.js"),C=require("../shared-utils/animationFrame/formatRad.js"),I=require("../shared-utils/animationFrame/calculateProgress.js");function E(t){if(t&&t.__esModule)return t;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(a,o,i.get?i:{enumerable:!0,get:()=>t[o]})}}return a.default=t,Object.freeze(a)}const F=E(g),P=(t,a,o)=>{const i=Math.PI,m=i*2;return t=C.formatLongitude(t),a=C.formatLongitude(a),o===s.Rotation.Anticlockwise&&t<a&&(t+=m),o===s.Rotation.Clockwise&&a<t&&(a+=m),o===s.Rotation.Loop&&a-t>i?P(t,a,s.Rotation.Anticlockwise):o===s.Rotation.Loop&&t-a>i?P(t,a,s.Rotation.Clockwise):{from:t,to:a}},j=t=>{const a={},o=(l,f,...L)=>w(exports,[l,f,...L],function*(e,r,n={preload:!0}){return a.interruptCallback&&a.interruptCallback(!1),n.asyncStartCallback&&(yield n.asyncStartCallback()),e.mode&&e.mode!==t.currentMode&&(yield t.changeMode(e.mode)),n.preload&&e.panoIndex!==void 0&&e.panoIndex!==t.panoIndex&&(yield t.preloadPano(e.panoIndex)),n.asyncEndCallback&&(yield n.asyncEndCallback()),e.panoIndex===void 0&&e.fov===void 0&&e.latitude===void 0&&e.longitude===void 0?!0:yield new Promise((c,d)=>{const u=e.panoIndex!==void 0?e.panoIndex:t.panoIndex;u!==void 0?t.moveToPano(u,Object.assign({duration:r,moveEndCallback:()=>c(!0),moveCancelCallback:()=>d(!1)},e)):d(!1)})}),i=e=>{const r=t.state,n=C.formatLatitude(r.latitude),l=C.formatLatitude(e.latitude),{from:f,to:L}=P(r.longitude,e.longitude,e.rotation||s.Rotation.Loop),c=r.fov,d=e.fov;return{from:{latitude:n,longitude:f,fov:c},to:{latitude:l,longitude:L,fov:d}}};return{move:o,rotate:(l,f,...L)=>w(exports,[l,f,...L],function*(e,r,n={}){a.interruptCallback&&a.interruptCallback(!1),n.asyncStartCallback&&(yield n.asyncStartCallback()),t.currentMode!==y.Five.Mode.Panorama&&(yield t.changeMode(y.Five.Mode.Panorama)),e.panoIndex!==void 0&&e.panoIndex!==t.panoIndex&&(n.preload&&(yield t.preloadPano(e.panoIndex)),yield new Promise((u,k)=>{if(!e.panoIndex){u(!0);return}t.moveToPano(e.panoIndex,{moveEndCallback:()=>u(!0),moveCancelCallback:()=>k(!1)})})),n.asyncEndCallback&&(yield n.asyncEndCallback());const{from:c,to:d}=i(e);return yield new Promise(u=>{const k=({progress:p})=>{const b={};b.longitude=I.progressNumber(c.longitude,d.longitude,p),b.latitude=I.progressNumber(c.latitude,d.latitude,p),b.fov=I.progressNumber(c.fov,d.fov,p),t.setState(b,!0)},M=()=>{u(!0)},x=()=>{u(!1)},_=e.rotateSpeed?Math.ceil(Math.abs(d.longitude-c.longitude)/e.rotateSpeed*1e3):r,v=h.tweenProgress(_,F.Easing.Linear.None).onUpdate(k).onComplete(M).onDestroy(x);e.rotation===s.Rotation.Loop&&v.repeat(1/0).yoyo(!0),a.interruptCallback=(p=!0)=>{v.destroy(),a.interruptCallback=void 0,a.timeoutId&&(clearTimeout(a.timeoutId),a.timeoutId=void 0),u(p)},a.timeoutId=setTimeout(()=>{a.interruptCallback&&a.interruptCallback(!0)},r)})})}};exports.CameraMovementPlugin=j;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./CameraMovementPlugin.js"),a=require("./typing.js");require("@realsee/five");require("@tweenjs/tween.js");require("../shared-utils/animationFrame/tween.js");require("../shared-utils/animationFrame/index.js");require("../shared-utils/animationFrame/BetterTween.js");require("../shared-utils/animationFrame/formatRad.js");require("../shared-utils/animationFrame/calculateProgress.js");exports.CameraMovementPlugin=e.CameraMovementPlugin;exports.default=e.CameraMovementPlugin;exports.CameraMovementEffect=a.CameraMovementEffect;exports.Rotation=a.Rotation;
@@ -1,5 +1 @@
1
- var e = /* @__PURE__ */ ((o) => (o.Move = "Move", o.Rotate = "Rotate", o))(e || {}), r = /* @__PURE__ */ ((o) => (o.Clockwise = "Clockwise", o.Anticlockwise = "Anticlockwise", o.Loop = "Loop", o))(r || {});
2
- export {
3
- e as CameraMovementEffect,
4
- r as Rotation
5
- };
1
+ "use strict";var o=(e=>(e.Move="Move",e.Rotate="Rotate",e))(o||{}),t=(e=>(e.Clockwise="Clockwise",e.Anticlockwise="Anticlockwise",e.Loop="Loop",e))(t||{});exports.CameraMovementEffect=o;exports.Rotation=t;
@@ -1,484 +1 @@
1
- var G = Object.defineProperty, K = Object.defineProperties;
2
- var U = Object.getOwnPropertyDescriptors;
3
- var E = Object.getOwnPropertySymbols;
4
- var T = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
5
- var x = (g, c, e) => c in g ? G(g, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[c] = e, S = (g, c) => {
6
- for (var e in c || (c = {}))
7
- T.call(c, e) && x(g, e, c[e]);
8
- if (E)
9
- for (var e of E(c))
10
- A.call(c, e) && x(g, e, c[e]);
11
- return g;
12
- }, L = (g, c) => K(g, U(c));
13
- var P = (g, c, e) => (x(g, typeof c != "symbol" ? c + "" : c, e), e);
14
- var y = (g, c, e) => new Promise((t, i) => {
15
- var a = (s) => {
16
- try {
17
- n(e.next(s));
18
- } catch (r) {
19
- i(r);
20
- }
21
- }, o = (s) => {
22
- try {
23
- n(e.throw(s));
24
- } catch (r) {
25
- i(r);
26
- }
27
- }, n = (s) => s.done ? t(s.value) : Promise.resolve(s.value).then(a, o);
28
- n((e = e.apply(g, c)).next());
29
- });
30
- import { Controller as O } from "../base/BasePluginWithData.js";
31
- import { GuideLinePlugin as V } from "../GuideLinePlugin/index.js";
32
- import k from "../shared-utils/uuid.js";
33
- import { coordinatesAngle as Q } from "./utils/coordinatesAngle.js";
34
- import { safeCall as _ } from "./utils/safeCall.js";
35
- import $ from "../shared-utils/equal.js";
36
- import { vectorToCoordinates as R } from "./utils/vectorToCoordinates.js";
37
- import * as N from "three";
38
- import j from "./utils/linerValue.js";
39
- import { sleep as H } from "./utils/sleep.js";
40
- const M = "v1.0.6", D = "CruisePlugin", w = `${D}@${M}`, F = () => {
41
- console.error(`${w} is disposed`);
42
- }, J = () => {
43
- console.warn(`${w} is disabled`);
44
- }, q = () => {
45
- console.error(`${w} is disabled`);
46
- }, C = /* @__PURE__ */ new Map();
47
- class B extends O {
48
- constructor(e, t) {
49
- super(e, t);
50
- P(this, "state", {
51
- visible: !0,
52
- enabled: !0,
53
- disposed: !1,
54
- playing: !1,
55
- speed: 1,
56
- config: {
57
- speedConfig: {
58
- rotateSpeed: 1e-3,
59
- rotateSpeedUnit: "rad/ms",
60
- moveSpeed: 2e-3,
61
- moveSpeedUnit: "m/ms"
62
- }
63
- }
64
- });
65
- P(this, "data");
66
- P(this, "config");
67
- P(this, "privateState", {
68
- playing: !1,
69
- currentPlayQueue: [],
70
- currentPlayKeyframe: null,
71
- broke: !1,
72
- disposers: [],
73
- modeChanging: !1
74
- });
75
- P(this, "GuideLine");
76
- this.config = t, Object.assign(window, { [`__${D}_DEBUG__`]: this });
77
- const i = this.setFiveLinearUpdateCamera.bind(this), a = this.setFiveOriginUpdateCamera.bind(this);
78
- this.hooks.on("play", i), this.hooks.on("broke", a), this.hooks.on("end", a), this.hooks.on("pause", a), this.privateState.disposers.push(() => {
79
- this.hooks.off("play", i), this.hooks.off("broke", a), this.hooks.off("end", a), this.hooks.off("pause", a);
80
- });
81
- }
82
- load(e, t, i) {
83
- return y(this, null, function* () {
84
- var d, v, f, l, u;
85
- if (this.state.disposed)
86
- return F();
87
- this.privateState.fiveOriginGetProgress || (v = (d = this.five.controller) == null ? void 0 : d.cameraMotion) != null && v.getProgress || (yield this.waitFiveLoaded(), this.privateState.fiveOriginGetProgress = (l = (f = this.five.controller) == null ? void 0 : f.cameraMotion) == null ? void 0 : l.getProgress), this.clear();
88
- const a = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, o = yield this.formatData(e);
89
- this.data = o, this.hooks.emit("dataChange", o, a);
90
- let n = [], s;
91
- const r = this.data.keyframes.filter((h) => h.data.panoIndex !== void 0);
92
- r.filter((h, m) => {
93
- var p;
94
- return h.data.panoIndex !== ((p = r[m - 1]) == null ? void 0 : p.data.panoIndex);
95
- }).map((h) => h.data.panoIndex).forEach((h) => {
96
- var p, b;
97
- const m = (p = this.five.work.observers[h]) == null ? void 0 : p.floorIndex;
98
- if (m !== void 0)
99
- if (s === m) {
100
- const I = n.length - 1;
101
- n[I] = [...(b = n[I]) != null ? b : [], h];
102
- } else {
103
- s = m;
104
- const I = n.length;
105
- n[I] = [h];
106
- }
107
- }), this.GuideLine || (this.GuideLine = V(this.five, this.config)), (u = this.GuideLine) == null || u.load({ routes: n.map((h) => ({ panoIndexList: h })) }), this.setState({ playing: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing), this.changeSpeed(this.state.speed), t && this.setState(t, { userAction: i }), console.log(`${w} loaded`, o), this.hooks.emit("dataLoaded", o);
108
- });
109
- }
110
- play(e) {
111
- this.setState({ playing: !0 }, e);
112
- }
113
- playFrom(e) {
114
- const { index: t, id: i, userAction: a } = e;
115
- this.state.playing && this.setState({ playing: !1 }, { userAction: a }), this.setState({ playing: !0 }, { userAction: a, playFromIndex: t, playFromId: i });
116
- }
117
- playFromStart(e) {
118
- return this.playFrom(L(S({}, e), { index: 0 }));
119
- }
120
- pause(e) {
121
- this.setState({ playing: !1 }, e);
122
- }
123
- show(e) {
124
- return y(this, null, function* () {
125
- this.setState({ visible: !0 }, e);
126
- });
127
- }
128
- hide(e) {
129
- return y(this, null, function* () {
130
- this.setState({ visible: !1 }, e);
131
- });
132
- }
133
- enable(e) {
134
- this.setState({ enabled: !0 }, e);
135
- }
136
- disable(e) {
137
- this.setState({ enabled: !1 }, e);
138
- }
139
- dispose() {
140
- this.setState({ disposed: !0 });
141
- }
142
- setState(e, t) {
143
- var a;
144
- if (this.state.disposed)
145
- return F();
146
- if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
147
- return q();
148
- const i = S({}, this.state);
149
- this.state = S(S({}, this.state), e), e.disposed !== void 0 && e.disposed !== i.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== i.visible && this.handleVisible(e.visible, t == null ? void 0 : t.userAction), e.enabled !== void 0 && e.enabled !== i.enabled && this.handleEnable(e.enabled, t == null ? void 0 : t.userAction), e.playing !== void 0 && e.playing !== i.playing && this.changePlayState(e.playing, t), e.speed !== void 0 && e.speed !== i.speed && this.changeSpeed(e.speed, t == null ? void 0 : t.userAction), $(i, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: (a = t == null ? void 0 : t.userAction) != null ? a : !0 });
150
- }
151
- formatData(e) {
152
- return y(this, null, function* () {
153
- this.five.work || (yield this.waitFiveLoaded());
154
- const t = this.five.work.observers, i = (() => {
155
- const a = e;
156
- return typeof a == "object" && a !== null && a.version && a.data ? a.data : a;
157
- })();
158
- if (i.keyframes)
159
- return {
160
- keyframesId: k(),
161
- keyframes: i.keyframes.map((a, o) => {
162
- var r;
163
- const n = i.keyframes[o + 1], s = (() => !n || n.start === void 0 || a.end === void 0 ? 0 : n.start - a.end)();
164
- return S({ id: (r = a.uuid) != null ? r : k(), moveIndex: o, stay: s, index: o }, a);
165
- })
166
- };
167
- if (i.panoIndexList) {
168
- let a = [];
169
- const { moveEffect: o, moveToFirstPanoEffect: n } = i;
170
- return this.privateState.moveToFirstPanoEffect = n, i.panoIndexList.forEach((s, r) => {
171
- const d = (() => {
172
- var h, m, p, b;
173
- const v = i.panoIndexList.slice(r).find((I) => I !== s);
174
- if (v === void 0)
175
- return;
176
- const f = (h = t[s]) == null ? void 0 : h.position, l = (m = t[v]) == null ? void 0 : m.position;
177
- if (!l || !f || ((p = t[s]) == null ? void 0 : p.floorIndex) !== ((b = t[v]) == null ? void 0 : b.floorIndex))
178
- return;
179
- const u = new N.Vector3().subVectors(l, f);
180
- return R(u);
181
- })();
182
- i.moveType === void 0 || i.moveType === "justMove" ? a.push({
183
- moveIndex: r,
184
- stay: i.stay,
185
- data: S({ effect: "Move", panoIndex: s, moveEffect: o }, d != null ? d : {})
186
- }) : i.moveType === "moveAndRotate" && (a.push({ moveIndex: r, stay: i.stay, data: { effect: "Move", panoIndex: s, moveEffect: o } }), d && a.push({ moveIndex: r, stay: i.stay, data: S({ effect: "Rotate", panoIndex: s }, d) }));
187
- }), { keyframesId: k(), keyframes: a.map((s, r) => S({ id: k(), index: r }, s)) };
188
- } else
189
- throw new Error("format error: data no keyframes or no panoIndexList");
190
- });
191
- }
192
- handleEnable(e, t = !0) {
193
- var i, a;
194
- e ? ((i = this.GuideLine) == null || i.enable(), this.hooks.emit("enable", { userAction: t })) : ((a = this.GuideLine) == null || a.disable(), this.changePlayState(!1, { userAction: t }), this.hooks.emit("disable", { userAction: t })), this.state.enabled = e;
195
- }
196
- handleVisible(e, t = !0) {
197
- var i, a;
198
- e ? ((i = this.GuideLine) == null || i.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: t }))) : ((a = this.GuideLine) == null || a.hide(), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: t }))), this.state.visible = e;
199
- }
200
- changePlayState(e, t) {
201
- this.actionIfStateIsEnabled(
202
- () => {
203
- var i;
204
- return this.hooks.emit("playStateChange", e ? "playing" : "pause", { userAction: (i = t == null ? void 0 : t.userAction) != null ? i : !0 });
205
- }
206
- ), e ? this.handlePlay(t) : this.handlePause(t), this.state.playing = e;
207
- }
208
- handlePlay(e) {
209
- return y(this, null, function* () {
210
- var l;
211
- const { data: t, state: i, privateState: a, hooks: o } = this;
212
- if (a.playing || !(t != null && t.keyframes) || (t == null ? void 0 : t.keyframes.length) === 0)
213
- return;
214
- const n = k();
215
- a.playId = n, a.playing = !0, a.broke = !1;
216
- const s = t.keyframes, r = this.getPauseData();
217
- (e == null ? void 0 : e.notEmitEvent) !== !0 && o.emit("play", { userAction: (l = e == null ? void 0 : e.userAction) != null ? l : !0 });
218
- let d = !1;
219
- const f = yield (() => y(this, null, function* () {
220
- var u, h;
221
- if ((e == null ? void 0 : e.playFromIndex) !== void 0)
222
- return e.playFromIndex;
223
- if ((e == null ? void 0 : e.playFromId) !== void 0)
224
- return (u = this.data) == null ? void 0 : u.keyframes.findIndex((m) => m.id === e.playFromId);
225
- if (r != null && r.keyframeId) {
226
- const m = (h = this.data) == null ? void 0 : h.keyframes.find((p) => p.id === r.keyframeId);
227
- if (r != null && r.fiveState && (yield this.move(r.fiveState, { moveEffect: a.moveToFirstPanoEffect })), m) {
228
- if (m.data.effect === "Move")
229
- return m.index;
230
- if (m.data.effect === "Rotate") {
231
- const p = r.duration !== void 0 ? r.duration * (1 - r.playedProgress) : void 0;
232
- return yield this.playKeyframe(m, { duration: p }), d = !0, m.index + 1;
233
- }
234
- }
235
- }
236
- }))();
237
- this.clearPauseData();
238
- for (const u of s) {
239
- if (a.broke || !i.playing || !a.playing || n !== a.playId)
240
- return;
241
- if (!(f !== void 0 && u.index < f))
242
- try {
243
- o.emit("playIndexChange", u.index, u), yield this.playKeyframe(u, {
244
- moveEffect: d === !1 ? a.moveToFirstPanoEffect : void 0,
245
- duration: 800
246
- }), u.stay && (yield H(u.stay)), d === !1 && (d = !0);
247
- } catch (h) {
248
- return Promise.resolve("broke");
249
- }
250
- }
251
- i.playing && n === a.playId && (this.setState({ playing: !1 }, { userAction: !1 }), o.emit("end"), this.clearPauseData());
252
- });
253
- }
254
- handlePause(e) {
255
- var o;
256
- const { state: t, privateState: i, hooks: a } = this;
257
- t.playing = !1, i.playing !== !1 && (i.playing = !1, this.setPauseData(), i.broke || this.forceInteruptUpdateCamera(), (e == null ? void 0 : e.notEmitEvent) !== !0 && a.emit("pause", { userAction: (o = e == null ? void 0 : e.userAction) != null ? o : !0 }));
258
- }
259
- playKeyframe(e, t) {
260
- return y(this, null, function* () {
261
- var a;
262
- const { privateState: i } = this;
263
- return ((a = this.privateState.currentPlayKeyframe) == null ? void 0 : a.keyframe.id) !== e.id && (this.privateState.currentPlayKeyframe = { keyframe: e }), i.currentPlayQueue.push(this.getPlayPromise(e, t)), this.actionPromiseQueue();
264
- });
265
- }
266
- addInterruptListener(e) {
267
- const t = () => {
268
- this.privateState.modeChanging || e();
269
- }, i = e;
270
- return this.five.once("gesture", i), this.five.once("wantsChangeMode", t), () => {
271
- this.five.off("gesture", i), this.five.once("wantsChangeMode", t);
272
- };
273
- }
274
- getPlayPromise(e, t) {
275
- return y(this, null, function* () {
276
- var a;
277
- const i = e.data;
278
- if ((a = t == null ? void 0 : t.duration) != null || e.start !== void 0 && e.end !== void 0 && e.end - e.start, !!i)
279
- return new Promise((o, n) => {
280
- let s = !1;
281
- this.addInterruptListener(() => {
282
- if (!s)
283
- return this.hooks.emit("broke"), this.privateState.broke = !0, this.setState({ playing: !1 }), s = !0, n(new Error("play is interupted"));
284
- });
285
- try {
286
- if (s)
287
- return;
288
- const r = () => {
289
- o(), s = !0;
290
- };
291
- switch (i.effect) {
292
- case "Move":
293
- this.move(i, t).then(r);
294
- break;
295
- case "Rotate":
296
- this.rotate(i, t).then(r);
297
- break;
298
- default:
299
- this.rotate(i, t).then(r);
300
- }
301
- } catch (r) {
302
- }
303
- });
304
- });
305
- }
306
- actionPromiseQueue() {
307
- return y(this, null, function* () {
308
- const { privateState: e } = this;
309
- return new Promise((t, i) => {
310
- if (e.currentPlayQueue.length === 0) {
311
- t();
312
- return;
313
- }
314
- const a = e.currentPlayQueue.shift();
315
- if (!a) {
316
- t();
317
- return;
318
- }
319
- a.then(t, i);
320
- }).then(() => e.currentPlayQueue.length === 0 ? Promise.resolve() : this.actionPromiseQueue());
321
- });
322
- }
323
- move(e, t) {
324
- return y(this, null, function* () {
325
- if (e.mode && e.mode !== this.five.currentMode)
326
- yield this.changeMode(e);
327
- else if (e.panoIndex !== this.five.panoIndex)
328
- yield this.changePano(e, t);
329
- else
330
- return Promise.resolve();
331
- });
332
- }
333
- rotate(e, t) {
334
- return y(this, null, function* () {
335
- if (e.mode && e.mode !== this.five.currentMode)
336
- yield this.changeMode({ mode: e.mode, panoIndex: e.panoIndex });
337
- else if (e.panoIndex && e.panoIndex !== this.five.panoIndex)
338
- return yield this.changePano(e, t);
339
- yield this.updateCamera(e, t == null ? void 0 : t.duration);
340
- });
341
- }
342
- updateCamera(e, t = 800) {
343
- return y(this, null, function* () {
344
- const { five: i, privateState: a, state: o } = this;
345
- let n = t;
346
- const s = (() => {
347
- var f, l;
348
- const d = (f = o.config) == null ? void 0 : f.speedConfig, v = (l = e.rotateSpeed) != null ? l : d == null ? void 0 : d.rotateSpeed;
349
- if ((d == null ? void 0 : d.rotateSpeedUnit) === void 0)
350
- return v;
351
- if (v !== void 0)
352
- return d.rotateSpeedUnit === "rad/ms" ? v : v / 1e3;
353
- })();
354
- if (s) {
355
- const d = this.five.getCurrentState();
356
- n = Q(d, e) / s;
357
- }
358
- a.currentPlayKeyframe && (a.currentPlayKeyframe.originDuration = n);
359
- const r = this.getSpeededDuration(n);
360
- return new Promise((d) => {
361
- _(() => i.updateCamera(e, r)), setTimeout(() => d(), r);
362
- });
363
- });
364
- }
365
- changePano(e, t) {
366
- return y(this, null, function* () {
367
- var v;
368
- const { five: i, privateState: a, state: o } = this;
369
- if (typeof e.panoIndex != "number" || e.panoIndex === i.panoIndex)
370
- return;
371
- i.getCurrentState().mode;
372
- const n = i.getCurrentState().mode !== "Panorama";
373
- n && (this.privateState.modeChanging = !0);
374
- let s = (v = t == null ? void 0 : t.duration) != null ? v : 800;
375
- const r = (() => {
376
- var u, h;
377
- const f = (u = o.config) == null ? void 0 : u.speedConfig, l = (h = e.moveSpeed) != null ? h : f == null ? void 0 : f.moveSpeed;
378
- if ((f == null ? void 0 : f.moveSpeedUnit) === void 0)
379
- return l;
380
- if (l !== void 0)
381
- return f.moveSpeedUnit === "m/ms" ? l : l / 1e3;
382
- })();
383
- if (r && typeof i.panoIndex == "number" && typeof e.panoIndex == "number") {
384
- const f = i.work.observers[i.panoIndex].position, l = i.work.observers[e.panoIndex].position;
385
- s = f.distanceTo(l) / r;
386
- }
387
- a.currentPlayKeyframe && (a.currentPlayKeyframe.originDuration = s);
388
- const d = this.getSpeededDuration(s);
389
- yield new Promise((f) => {
390
- var l, u, h;
391
- i.moveToPano(e.panoIndex, {
392
- latitude: e.latitude,
393
- longitude: e.longitude,
394
- fov: e.fov,
395
- duration: d,
396
- effect: (h = (u = t == null ? void 0 : t.moveEffect) != null ? u : (l = this.state.config) == null ? void 0 : l.moveEffect) != null ? h : e.moveEffect,
397
- moveCancelCallback: () => f(),
398
- moveEndCallback: () => f()
399
- }), n && i.once("panoArrived", () => f());
400
- }), n && (this.privateState.modeChanging = !1);
401
- });
402
- }
403
- changeSpeed(e, t = !0) {
404
- const { state: i, privateState: a, hooks: o } = this, { currentPlayKeyframe: n } = a;
405
- if (o.emit("speedChange", e, { userAction: t }), i.playing && n)
406
- try {
407
- const s = n.originDuration !== void 0 ? n.originDuration * (1 - this.getProgress()) : void 0, r = this.playKeyframe(n.keyframe, { duration: s });
408
- a.currentPlayQueue.push(r);
409
- } catch (s) {
410
- }
411
- }
412
- getSpeededDuration(e) {
413
- return e / this.state.speed;
414
- }
415
- getProgress() {
416
- return this.five.controller.cameraMotion.progress;
417
- }
418
- changeMode(e, t) {
419
- return y(this, null, function* () {
420
- e.mode && e.mode !== this.five.currentMode && (this.privateState.modeChanging = !0, console.log("this.privateState.modeChanging", this.privateState.modeChanging), yield this.five.changeMode(e.mode, e, t), this.privateState.modeChanging = !1);
421
- });
422
- }
423
- forceInteruptUpdateCamera() {
424
- this.five.updateCamera({}, 0);
425
- }
426
- getPauseData() {
427
- var e, t;
428
- if ((e = this.data) != null && e.keyframesId)
429
- return C.get((t = this.data) == null ? void 0 : t.keyframesId);
430
- }
431
- setPauseData() {
432
- var e, t, i, a;
433
- if ((e = this.data) != null && e.keyframesId)
434
- return C.set((t = this.data) == null ? void 0 : t.keyframesId, {
435
- keyframeId: (i = this.privateState.currentPlayKeyframe) == null ? void 0 : i.keyframe.id,
436
- fiveState: this.five.getCurrentState(),
437
- duration: (a = this.privateState.currentPlayKeyframe) == null ? void 0 : a.originDuration,
438
- playedProgress: this.getProgress()
439
- });
440
- }
441
- clearPauseData() {
442
- var e, t;
443
- if ((e = this.data) != null && e.keyframesId)
444
- return C.delete((t = this.data) == null ? void 0 : t.keyframesId);
445
- }
446
- clear() {
447
- this.clearPauseData(), this.privateState.currentPlayKeyframe = null;
448
- }
449
- handleDispose() {
450
- var e, t;
451
- this.setState({ playing: !1 }), this.clearPauseData(), this.clear(), (e = this.GuideLine) == null || e.dispose(), this.GuideLine = void 0, (t = this.privateState.disposers) == null || t.forEach((i) => i == null ? void 0 : i());
452
- }
453
- actionIfStateIsEnabled(e, t) {
454
- if (this.state.enabled)
455
- return e();
456
- t != null && t.warnLog && J();
457
- }
458
- waitFiveLoaded() {
459
- return y(this, null, function* () {
460
- return new Promise((e) => {
461
- if (this.five.work) {
462
- e();
463
- return;
464
- }
465
- this.five.once("loaded", () => {
466
- e();
467
- });
468
- });
469
- });
470
- }
471
- setFiveLinearUpdateCamera() {
472
- !this.privateState.fiveOriginGetProgress || (this.five.controller.cameraMotion.getProgress = (e) => {
473
- const t = this.five.controller.cameraMotion, i = e - t.startTime;
474
- return i < 0 ? 0 : i >= t.duration ? 1 : 1 - j(1, t.startVelocity, t.duration, i);
475
- });
476
- }
477
- setFiveOriginUpdateCamera() {
478
- !this.privateState.fiveOriginGetProgress || (this.five.controller.cameraMotion.getProgress = this.privateState.fiveOriginGetProgress);
479
- }
480
- }
481
- P(B, "PluginVersion", M);
482
- export {
483
- B as default
484
- };
1
+ "use strict";var G=Object.defineProperty,K=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var w=(h,f,e)=>f in h?G(h,f,{enumerable:!0,configurable:!0,writable:!0,value:e}):h[f]=e,P=(h,f)=>{for(var e in f||(f={}))U.call(f,e)&&w(h,e,f[e]);if(E)for(var e of E(f))j.call(f,e)&&w(h,e,f[e]);return h},L=(h,f)=>K(h,T(f));var S=(h,f,e)=>(w(h,typeof f!="symbol"?f+"":f,e),e);var m=(h,f,e)=>new Promise((t,i)=>{var a=r=>{try{n(e.next(r))}catch(s){i(s)}},o=r=>{try{n(e.throw(r))}catch(s){i(s)}},n=r=>r.done?t(r.value):Promise.resolve(r.value).then(a,o);n((e=e.apply(h,f)).next())});const O=require("../base/BasePluginWithData.js"),A=require("../GuideLinePlugin/index.js"),k=require("../shared-utils/uuid.js"),q=require("./utils/coordinatesAngle.js"),V=require("./utils/safeCall.js"),Q=require("../shared-utils/equal.js"),R=require("./utils/vectorToCoordinates.js"),$=require("three"),N=require("./utils/linerValue.js"),H=require("./utils/sleep.js");function B(h){if(h&&h.__esModule)return h;const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const e in h)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(h,e);Object.defineProperty(f,e,t.get?t:{enumerable:!0,get:()=>h[e]})}}return f.default=h,Object.freeze(f)}const W=B($),M="v1.0.6",_="CruisePlugin",C=`${_}@${M}`,F=()=>{console.error(`${C} is disposed`)},J=()=>{console.warn(`${C} is disabled`)},z=()=>{console.error(`${C} is disabled`)},x=new Map;class D extends O.Controller{constructor(e,t){super(e,t);S(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});S(this,"data");S(this,"config");S(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});S(this,"GuideLine");this.config=t,Object.assign(window,{[`__${_}_DEBUG__`]:this});const i=this.setFiveLinearUpdateCamera.bind(this),a=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",i),this.hooks.on("broke",a),this.hooks.on("end",a),this.hooks.on("pause",a),this.privateState.disposers.push(()=>{this.hooks.off("play",i),this.hooks.off("broke",a),this.hooks.off("end",a),this.hooks.off("pause",a)})}load(e,t,i){return m(this,null,function*(){var d,g,u,c,v;if(this.state.disposed)return F();this.privateState.fiveOriginGetProgress||(g=(d=this.five.controller)==null?void 0:d.cameraMotion)!=null&&g.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(c=(u=this.five.controller)==null?void 0:u.cameraMotion)==null?void 0:c.getProgress),this.clear();const a=this.data?JSON.parse(JSON.stringify(this.data)):void 0,o=yield this.formatData(e);this.data=o,this.hooks.emit("dataChange",o,a);let n=[],r;const s=this.data.keyframes.filter(l=>l.data.panoIndex!==void 0);s.filter((l,y)=>{var p;return l.data.panoIndex!==((p=s[y-1])==null?void 0:p.data.panoIndex)}).map(l=>l.data.panoIndex).forEach(l=>{var p,I;const y=(p=this.five.work.observers[l])==null?void 0:p.floorIndex;if(y!==void 0)if(r===y){const b=n.length-1;n[b]=[...(I=n[b])!=null?I:[],l]}else{r=y;const b=n.length;n[b]=[l]}}),this.GuideLine||(this.GuideLine=A.GuideLinePlugin(this.five,this.config)),(v=this.GuideLine)==null||v.load({routes:n.map(l=>({panoIndexList:l}))}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),t&&this.setState(t,{userAction:i}),console.log(`${C} loaded`,o),this.hooks.emit("dataLoaded",o)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:t,id:i,userAction:a}=e;this.state.playing&&this.setState({playing:!1},{userAction:a}),this.setState({playing:!0},{userAction:a,playFromIndex:t,playFromId:i})}playFromStart(e){return this.playFrom(L(P({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return m(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return m(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,t){var a;if(this.state.disposed)return F();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return z();const i=P({},this.state);this.state=P(P({},this.state),e),e.disposed!==void 0&&e.disposed!==i.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==i.visible&&this.handleVisible(e.visible,t==null?void 0:t.userAction),e.enabled!==void 0&&e.enabled!==i.enabled&&this.handleEnable(e.enabled,t==null?void 0:t.userAction),e.playing!==void 0&&e.playing!==i.playing&&this.changePlayState(e.playing,t),e.speed!==void 0&&e.speed!==i.speed&&this.changeSpeed(e.speed,t==null?void 0:t.userAction),Q.equal(i,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:i,userAction:(a=t==null?void 0:t.userAction)!=null?a:!0})}formatData(e){return m(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const t=this.five.work.observers,i=(()=>{const a=e;return typeof a=="object"&&a!==null&&a.version&&a.data?a.data:a})();if(i.keyframes)return{keyframesId:k.uuid(),keyframes:i.keyframes.map((a,o)=>{var s;const n=i.keyframes[o+1],r=(()=>!n||n.start===void 0||a.end===void 0?0:n.start-a.end)();return P({id:(s=a.uuid)!=null?s:k.uuid(),moveIndex:o,stay:r,index:o},a)})};if(i.panoIndexList){let a=[];const{moveEffect:o,moveToFirstPanoEffect:n}=i;return this.privateState.moveToFirstPanoEffect=n,i.panoIndexList.forEach((r,s)=>{const d=(()=>{var l,y,p,I;const g=i.panoIndexList.slice(s).find(b=>b!==r);if(g===void 0)return;const u=(l=t[r])==null?void 0:l.position,c=(y=t[g])==null?void 0:y.position;if(!c||!u||((p=t[r])==null?void 0:p.floorIndex)!==((I=t[g])==null?void 0:I.floorIndex))return;const v=new W.Vector3().subVectors(c,u);return R.vectorToCoordinates(v)})();i.moveType===void 0||i.moveType==="justMove"?a.push({moveIndex:s,stay:i.stay,data:P({effect:"Move",panoIndex:r,moveEffect:o},d!=null?d:{})}):i.moveType==="moveAndRotate"&&(a.push({moveIndex:s,stay:i.stay,data:{effect:"Move",panoIndex:r,moveEffect:o}}),d&&a.push({moveIndex:s,stay:i.stay,data:P({effect:"Rotate",panoIndex:r},d)}))}),{keyframesId:k.uuid(),keyframes:a.map((r,s)=>P({id:k.uuid(),index:s},r))}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,t=!0){var i,a;e?((i=this.GuideLine)==null||i.enable(),this.hooks.emit("enable",{userAction:t})):((a=this.GuideLine)==null||a.disable(),this.changePlayState(!1,{userAction:t}),this.hooks.emit("disable",{userAction:t})),this.state.enabled=e}handleVisible(e,t=!0){var i,a;e?((i=this.GuideLine)==null||i.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:t}))):((a=this.GuideLine)==null||a.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:t}))),this.state.visible=e}changePlayState(e,t){this.actionIfStateIsEnabled(()=>{var i;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(i=t==null?void 0:t.userAction)!=null?i:!0})}),e?this.handlePlay(t):this.handlePause(t),this.state.playing=e}handlePlay(e){return m(this,null,function*(){var c;const{data:t,state:i,privateState:a,hooks:o}=this;if(a.playing||!(t!=null&&t.keyframes)||(t==null?void 0:t.keyframes.length)===0)return;const n=k.uuid();a.playId=n,a.playing=!0,a.broke=!1;const r=t.keyframes,s=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&o.emit("play",{userAction:(c=e==null?void 0:e.userAction)!=null?c:!0});let d=!1;const u=yield(()=>m(this,null,function*(){var v,l;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(v=this.data)==null?void 0:v.keyframes.findIndex(y=>y.id===e.playFromId);if(s!=null&&s.keyframeId){const y=(l=this.data)==null?void 0:l.keyframes.find(p=>p.id===s.keyframeId);if(s!=null&&s.fiveState&&(yield this.move(s.fiveState,{moveEffect:a.moveToFirstPanoEffect})),y){if(y.data.effect==="Move")return y.index;if(y.data.effect==="Rotate"){const p=s.duration!==void 0?s.duration*(1-s.playedProgress):void 0;return yield this.playKeyframe(y,{duration:p}),d=!0,y.index+1}}}}))();this.clearPauseData();for(const v of r){if(a.broke||!i.playing||!a.playing||n!==a.playId)return;if(!(u!==void 0&&v.index<u))try{o.emit("playIndexChange",v.index,v),yield this.playKeyframe(v,{moveEffect:d===!1?a.moveToFirstPanoEffect:void 0,duration:800}),v.stay&&(yield H.sleep(v.stay)),d===!1&&(d=!0)}catch(l){return Promise.resolve("broke")}}i.playing&&n===a.playId&&(this.setState({playing:!1},{userAction:!1}),o.emit("end"),this.clearPauseData())})}handlePause(e){var o;const{state:t,privateState:i,hooks:a}=this;t.playing=!1,i.playing!==!1&&(i.playing=!1,this.setPauseData(),i.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&a.emit("pause",{userAction:(o=e==null?void 0:e.userAction)!=null?o:!0}))}playKeyframe(e,t){return m(this,null,function*(){var a;const{privateState:i}=this;return((a=this.privateState.currentPlayKeyframe)==null?void 0:a.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),i.currentPlayQueue.push(this.getPlayPromise(e,t)),this.actionPromiseQueue()})}addInterruptListener(e){const t=()=>{this.privateState.modeChanging||e()},i=e;return this.five.once("gesture",i),this.five.once("wantsChangeMode",t),()=>{this.five.off("gesture",i),this.five.once("wantsChangeMode",t)}}getPlayPromise(e,t){return m(this,null,function*(){var a;const i=e.data;if((a=t==null?void 0:t.duration)!=null||e.start!==void 0&&e.end!==void 0&&e.end-e.start,!!i)return new Promise((o,n)=>{let r=!1;this.addInterruptListener(()=>{if(!r)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),r=!0,n(new Error("play is interupted"))});try{if(r)return;const s=()=>{o(),r=!0};switch(i.effect){case"Move":this.move(i,t).then(s);break;case"Rotate":this.rotate(i,t).then(s);break;default:this.rotate(i,t).then(s)}}catch(s){}})})}actionPromiseQueue(){return m(this,null,function*(){const{privateState:e}=this;return new Promise((t,i)=>{if(e.currentPlayQueue.length===0){t();return}const a=e.currentPlayQueue.shift();if(!a){t();return}a.then(t,i)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,t){return m(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,t);else return Promise.resolve()})}rotate(e,t){return m(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,t);yield this.updateCamera(e,t==null?void 0:t.duration)})}updateCamera(e,t=800){return m(this,null,function*(){const{five:i,privateState:a,state:o}=this;let n=t;const r=(()=>{var u,c;const d=(u=o.config)==null?void 0:u.speedConfig,g=(c=e.rotateSpeed)!=null?c:d==null?void 0:d.rotateSpeed;if((d==null?void 0:d.rotateSpeedUnit)===void 0)return g;if(g!==void 0)return d.rotateSpeedUnit==="rad/ms"?g:g/1e3})();if(r){const d=this.five.getCurrentState(),g=e;n=q.coordinatesAngle(d,g)/r}a.currentPlayKeyframe&&(a.currentPlayKeyframe.originDuration=n);const s=this.getSpeededDuration(n);return new Promise(d=>{V.safeCall(()=>i.updateCamera(e,s)),setTimeout(()=>d(),s)})})}changePano(e,t){return m(this,null,function*(){var g;const{five:i,privateState:a,state:o}=this;if(typeof e.panoIndex!="number"||e.panoIndex===i.panoIndex)return;i.getCurrentState().mode;const n=i.getCurrentState().mode!=="Panorama";n&&(this.privateState.modeChanging=!0);let r=(g=t==null?void 0:t.duration)!=null?g:800;const s=(()=>{var v,l;const u=(v=o.config)==null?void 0:v.speedConfig,c=(l=e.moveSpeed)!=null?l:u==null?void 0:u.moveSpeed;if((u==null?void 0:u.moveSpeedUnit)===void 0)return c;if(c!==void 0)return u.moveSpeedUnit==="m/ms"?c:c/1e3})();if(s&&typeof i.panoIndex=="number"&&typeof e.panoIndex=="number"){const u=i.work.observers[i.panoIndex].position,c=i.work.observers[e.panoIndex].position;r=u.distanceTo(c)/s}a.currentPlayKeyframe&&(a.currentPlayKeyframe.originDuration=r);const d=this.getSpeededDuration(r);yield new Promise(u=>{var c,v,l;i.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:d,effect:(l=(v=t==null?void 0:t.moveEffect)!=null?v:(c=this.state.config)==null?void 0:c.moveEffect)!=null?l:e.moveEffect,moveCancelCallback:()=>u(),moveEndCallback:()=>u()}),n&&i.once("panoArrived",()=>u())}),n&&(this.privateState.modeChanging=!1)})}changeSpeed(e,t=!0){const{state:i,privateState:a,hooks:o}=this,{currentPlayKeyframe:n}=a;if(o.emit("speedChange",e,{userAction:t}),i.playing&&n)try{const r=n.originDuration!==void 0?n.originDuration*(1-this.getProgress()):void 0,s=this.playKeyframe(n.keyframe,{duration:r});a.currentPlayQueue.push(s)}catch(r){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,t){return m(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,console.log("this.privateState.modeChanging",this.privateState.modeChanging),yield this.five.changeMode(e.mode,e,t),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,t;if((e=this.data)!=null&&e.keyframesId)return x.get((t=this.data)==null?void 0:t.keyframesId)}setPauseData(){var e,t,i,a;if((e=this.data)!=null&&e.keyframesId)return x.set((t=this.data)==null?void 0:t.keyframesId,{keyframeId:(i=this.privateState.currentPlayKeyframe)==null?void 0:i.keyframe.id,fiveState:this.five.getCurrentState(),duration:(a=this.privateState.currentPlayKeyframe)==null?void 0:a.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,t;if((e=this.data)!=null&&e.keyframesId)return x.delete((t=this.data)==null?void 0:t.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,t;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(t=this.privateState.disposers)==null||t.forEach(i=>i==null?void 0:i())}actionIfStateIsEnabled(e,t){if(this.state.enabled)return e();t!=null&&t.warnLog&&J()}waitFiveLoaded(){return m(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=e=>{const t=this.five.controller.cameraMotion,i=e-t.startTime;return i<0?0:i>=t.duration?1:1-N.linerValue(1,t.startVelocity,t.duration,i)})}setFiveOriginUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}S(D,"PluginVersion",M);exports.CruisePluginController=D;
@@ -1,8 +1 @@
1
- import e from "./Controller.js";
2
- import { default as i } from "./Controller.js";
3
- const l = (r) => new e(r);
4
- export {
5
- l as CruisePlugin,
6
- i as CruisePluginController,
7
- l as default
8
- };
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Controller.js");require("../base/BasePluginWithData.js");require("../base/BasePlugin.js");require("../shared-utils/Subscribe.js");require("../GuideLinePlugin/index.js");require("../GuideLinePlugin/Controller.js");require("three");require("../GuideLinePlugin/utils/getLineGeometries.js");require("polyline-normals");require("../GuideLinePlugin/utils/getArrowMaterial.js");require("../shared-utils/isNil.js");require("../shared-utils/equal.js");require("../shared-utils/isTruelyObject.js");require("../shared-utils/uuid.js");require("./utils/coordinatesAngle.js");require("./utils/coordinatesToVector.js");require("./utils/safeCall.js");require("./utils/vectorToCoordinates.js");require("./utils/formatRad.js");require("./utils/linerValue.js");require("./utils/sleep.js");const r=i=>new e.CruisePluginController(i);exports.CruisePluginController=e.CruisePluginController;exports.CruisePlugin=r;exports.default=r;
@@ -1,8 +1 @@
1
- import { coordinatesToVector as o } from "./coordinatesToVector.js";
2
- function s(n, t) {
3
- const e = o(n), r = o(t);
4
- return e.angleTo(r);
5
- }
6
- export {
7
- s as coordinatesAngle
8
- };
1
+ "use strict";const o=require("./coordinatesToVector.js");function r(e,t){const n=o.coordinatesToVector(e),c=o.coordinatesToVector(t);return n.angleTo(c)}exports.coordinatesAngle=r;
@@ -1,12 +1 @@
1
- import * as e from "three";
2
- function n(t) {
3
- const a = Math.abs(Math.cos(t.latitude));
4
- return new e.Vector3(
5
- -Math.sin(t.longitude) * a,
6
- -Math.sin(t.latitude),
7
- -Math.cos(t.longitude) * a
8
- );
9
- }
10
- export {
11
- n as coordinatesToVector
12
- };
1
+ "use strict";const o=require("three");function c(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const u=c(o);function a(t){const e=Math.abs(Math.cos(t.latitude));return new u.Vector3(-Math.sin(t.longitude)*e,-Math.sin(t.latitude),-Math.cos(t.longitude)*e)}exports.coordinatesToVector=a;