@realsee/dnalogel 3.5.0-tag-dev.2 → 3.6.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/dist/CruisePlugin/BaseController.d.ts +159 -0
  2. package/dist/CruisePlugin/Move.d.ts +40 -0
  3. package/dist/CruisePlugin/Work.d.ts +120 -0
  4. package/dist/CruisePlugin/index.d.ts +4 -3
  5. package/dist/CruisePlugin/typing.d.ts +2 -2
  6. package/dist/CruisePlugin/utils/getFiveStateOnCurve.d.ts +11 -0
  7. package/dist/GuideLinePlugin/Controller.d.ts +1 -6
  8. package/dist/PanoTagPlugin/controller/TagRender.d.ts +2 -2
  9. package/dist/index.cjs.js +52 -52
  10. package/dist/index.js +3249 -3160
  11. package/dist/index.umd.js +54 -54
  12. package/dist/shared-utils/five/fiveLoaded.d.ts +2 -0
  13. package/docs/assets/search.js +1 -1
  14. package/docs/classes/AreaMakerPluginType.AreaMakerController.html +33 -31
  15. package/docs/classes/AreaMakerPluginType.AreaMakerItem.html +34 -32
  16. package/docs/classes/CSS3DRender.html +33 -31
  17. package/docs/classes/GuideLineItem.GuideLineItem.html +21 -19
  18. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +43 -41
  19. package/docs/classes/Magnifier.html +22 -20
  20. package/docs/classes/ModelRoomLabelController.html +13 -11
  21. package/docs/classes/MoveController.html +652 -0
  22. package/docs/classes/Object3DHelperController.html +27 -25
  23. package/docs/classes/PaintBrush.html +17 -15
  24. package/docs/classes/PanoMeasurePluginLine.html +29 -27
  25. package/docs/classes/PanoMeasurePluginModel.html +29 -27
  26. package/docs/classes/PanoMeasurePluginPoint.html +13 -11
  27. package/docs/classes/PanoMeasurePluginPolyline.html +29 -27
  28. package/docs/classes/PanoTagPluginController.html +66 -48
  29. package/docs/classes/Util.BetterTween.html +11 -9
  30. package/docs/classes/Util.Interval.html +14 -12
  31. package/docs/classes/Util.LineSegments.html +10 -8
  32. package/docs/classes/Util.Magnifier.html +22 -20
  33. package/docs/classes/Util.Object3D.html +10 -8
  34. package/docs/classes/Util.PointDomHelper.html +13 -11
  35. package/docs/classes/Util.PointHelper.html +13 -11
  36. package/docs/classes/Util.PointSelectorHelper.html +18 -16
  37. package/docs/classes/Util.Rectangle.html +15 -13
  38. package/docs/classes/{CruisePluginController.html → WalkController.html} +97 -99
  39. package/docs/enums/CameraMovementEffect.html +9 -7
  40. package/docs/enums/ContentType.html +23 -21
  41. package/docs/enums/DIRECTION.html +11 -9
  42. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +11 -9
  43. package/docs/enums/DimensionType.html +9 -7
  44. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +10 -8
  45. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +11 -9
  46. package/docs/enums/PaintBrushTypeEnum.html +10 -8
  47. package/docs/enums/PointType.html +9 -7
  48. package/docs/enums/Rotation.html +10 -8
  49. package/docs/functions/AreaMakerPlugin.html +7 -5
  50. package/docs/functions/CSS3DRenderPlugin.html +6 -4
  51. package/docs/functions/CameraMovementPlugin.html +6 -4
  52. package/docs/functions/CruisePlugin.html +8 -6
  53. package/docs/functions/CurrentPanoImagePlugin.html +6 -4
  54. package/docs/functions/GuideLinePlugin.html +7 -5
  55. package/docs/functions/ItemLabelPlugin.html +6 -4
  56. package/docs/functions/MapviewFloorplanPlugin.html +6 -4
  57. package/docs/functions/ModelChassisCompassPlugin.html +6 -4
  58. package/docs/functions/ModelEntryDoorGuidePlugin.html +6 -4
  59. package/docs/functions/ModelFloorplanPlugin.html +6 -4
  60. package/docs/functions/ModelItemLabelPlugin.html +6 -4
  61. package/docs/functions/ModelRoomLabelPlugin.html +6 -4
  62. package/docs/functions/ModelTVVideoPlugin.html +6 -4
  63. package/docs/functions/ModelViewPlugin.html +6 -4
  64. package/docs/functions/Object3DHelperPlugin.html +6 -4
  65. package/docs/functions/PanoCompassPlugin.html +6 -4
  66. package/docs/functions/PanoCursorRaycasterPlugin.html +6 -4
  67. package/docs/functions/PanoDoorLabelPlugin.html +6 -4
  68. package/docs/functions/PanoFloorplanRadarPlugin.html +6 -4
  69. package/docs/functions/PanoMeasurePlugin.html +6 -4
  70. package/docs/functions/PanoRulerPlugin.html +6 -4
  71. package/docs/functions/PanoRulerProPlugin.html +6 -4
  72. package/docs/functions/PanoSpatialTagPlugin.html +6 -4
  73. package/docs/functions/PanoTagPlugin.html +6 -4
  74. package/docs/functions/PanoVideoPlugin.html +6 -4
  75. package/docs/functions/PipelinePlugin.html +6 -4
  76. package/docs/functions/TopviewFloorplanPlugin.html +6 -4
  77. package/docs/functions/Util.absoluteUrl.html +7 -5
  78. package/docs/functions/Util.checkFiveModelLoaded.html +7 -5
  79. package/docs/functions/Util.equal.html +7 -5
  80. package/docs/functions/Util.getCoordsFromClient.html +7 -5
  81. package/docs/functions/Util.getCoordsFromElement.html +7 -5
  82. package/docs/functions/Util.getFrameTime.html +7 -5
  83. package/docs/functions/Util.getIntersectFromRelativePosition.html +7 -5
  84. package/docs/functions/Util.getRaycasterFromFivePointer.html +7 -5
  85. package/docs/functions/Util.isAbsoluteURL.html +7 -5
  86. package/docs/functions/Util.isModelLike.html +7 -5
  87. package/docs/functions/Util.isNil.html +7 -5
  88. package/docs/functions/Util.isPanoramaLike.html +7 -5
  89. package/docs/functions/Util.nextFrame.html +7 -5
  90. package/docs/functions/Util.notNil.html +7 -5
  91. package/docs/functions/Util.requestAnimationFrameInterval.html +7 -5
  92. package/docs/functions/Util.tweenProgress.html +7 -5
  93. package/docs/functions/Util.uuid.html +7 -5
  94. package/docs/functions/pluginFlag.html +7 -5
  95. package/docs/index.html +7 -5
  96. package/docs/interfaces/AddTagConfig.html +8 -6
  97. package/docs/interfaces/AreaMakerPluginType.AnimeOptions.html +8 -6
  98. package/docs/interfaces/AreaMakerPluginType.Config.html +8 -6
  99. package/docs/interfaces/AreaMakerPluginType.EventMap.html +17 -15
  100. package/docs/interfaces/AreaMakerPluginType.Params.html +9 -7
  101. package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItem.html +11 -9
  102. package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItemV1.html +10 -8
  103. package/docs/interfaces/AreaMakerPluginType.ServerDataV1.html +8 -6
  104. package/docs/interfaces/AreaMakerPluginType.ServerDataV2.html +8 -6
  105. package/docs/interfaces/AreaMakerPluginType.ShowHideOptions.html +8 -6
  106. package/docs/interfaces/AreaMakerPluginType.State.html +10 -8
  107. package/docs/interfaces/CSS3DRenderPluginEventMap.html +13 -11
  108. package/docs/interfaces/CSS3DRenderPluginState.html +10 -8
  109. package/docs/interfaces/CameraMovementPluginExportType.html +9 -7
  110. package/docs/interfaces/CruisePluginTypes.Config.html +11 -9
  111. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +15 -13
  112. package/docs/interfaces/CruisePluginTypes.EventMap.html +23 -21
  113. package/docs/interfaces/CruisePluginTypes.MoveAction.html +15 -13
  114. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +17 -15
  115. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +17 -15
  116. package/docs/interfaces/CruisePluginTypes.PluginData.html +12 -10
  117. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +9 -7
  118. package/docs/interfaces/CruisePluginTypes.PluginState.html +17 -36
  119. package/docs/interfaces/CurrentPanoImagePluginType.Config.html +13 -11
  120. package/docs/interfaces/CurrentPanoImagePluginType.EventMap.html +14 -12
  121. package/docs/interfaces/CurrentPanoImagePluginType.Params.html +9 -7
  122. package/docs/interfaces/CurrentPanoImagePluginType.ShowHideOptions.html +8 -6
  123. package/docs/interfaces/CurrentPanoImagePluginType.State.html +10 -8
  124. package/docs/interfaces/EventMap.html +17 -15
  125. package/docs/interfaces/FloorplanBounding.html +10 -8
  126. package/docs/interfaces/FloorplanData.html +12 -10
  127. package/docs/interfaces/FloorplanEntrance.html +13 -11
  128. package/docs/interfaces/FloorplanExtraObject.html +12 -10
  129. package/docs/interfaces/FloorplanExtraObject3D.html +10 -8
  130. package/docs/interfaces/FloorplanFloorData.html +11 -9
  131. package/docs/interfaces/FloorplanImagePosition.html +9 -7
  132. package/docs/interfaces/FloorplanObserver.html +11 -9
  133. package/docs/interfaces/FloorplanOutlineItem.html +11 -9
  134. package/docs/interfaces/FloorplanPosition.html +9 -7
  135. package/docs/interfaces/FloorplanRoomItem.html +15 -13
  136. package/docs/interfaces/FloorplanRoomLabelItem.html +9 -7
  137. package/docs/interfaces/FloorplanServerBounding.html +10 -8
  138. package/docs/interfaces/FloorplanServerComputedData.html +12 -10
  139. package/docs/interfaces/FloorplanServerData.html +9 -7
  140. package/docs/interfaces/FloorplanServerDoorItem.html +12 -10
  141. package/docs/interfaces/FloorplanServerDoorPosition.html +10 -8
  142. package/docs/interfaces/FloorplanServerEntrance.html +13 -11
  143. package/docs/interfaces/FloorplanServerFloorData.html +11 -9
  144. package/docs/interfaces/FloorplanServerImagePosition.html +9 -7
  145. package/docs/interfaces/FloorplanServerObserver.html +11 -9
  146. package/docs/interfaces/FloorplanServerOutlineItem.html +11 -9
  147. package/docs/interfaces/FloorplanServerPosition.html +9 -7
  148. package/docs/interfaces/FloorplanServerRoomItem.html +16 -14
  149. package/docs/interfaces/FloorplanServerRoomLabelItem.html +9 -7
  150. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +10 -8
  151. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +13 -11
  152. package/docs/interfaces/GuideLinePluginType.EventMap.html +16 -14
  153. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +11 -9
  154. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +9 -7
  155. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +16 -14
  156. package/docs/interfaces/GuideLinePluginType.GuideLineMeshStyle.html +9 -7
  157. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +11 -9
  158. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +22 -20
  159. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +10 -8
  160. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +22 -20
  161. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +8 -6
  162. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +9 -7
  163. package/docs/interfaces/GuideLinePluginType.PluginState.html +11 -9
  164. package/docs/interfaces/GuideLinePluginType.Route.html +14 -12
  165. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +12 -10
  166. package/docs/interfaces/HelperOffset.html +10 -8
  167. package/docs/interfaces/ImagePlaneGroup.html +8 -6
  168. package/docs/interfaces/ItemLabelPluginData.html +8 -6
  169. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +13 -11
  170. package/docs/interfaces/ItemLabelPluginParametersType.html +11 -9
  171. package/docs/interfaces/MinMax.html +9 -7
  172. package/docs/interfaces/ModelChassisCompassPluginData.html +9 -7
  173. package/docs/interfaces/ModelChassisCompassPluginExportType.html +10 -8
  174. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +9 -7
  175. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +10 -8
  176. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +10 -8
  177. package/docs/interfaces/ModelItemLabelPluginData.html +8 -6
  178. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +13 -11
  179. package/docs/interfaces/ModelItemLabelPluginParametersType.html +9 -7
  180. package/docs/interfaces/ModelRoomLabelPluginData.html +8 -6
  181. package/docs/interfaces/ModelTVVideoPluginData.html +11 -9
  182. package/docs/interfaces/ModelTVVideoPluginExportType.html +10 -8
  183. package/docs/interfaces/ModelTVVideoPluginParameterType.html +8 -6
  184. package/docs/interfaces/ModelViewPluginExportType.html +13 -11
  185. package/docs/interfaces/Object3DHelperState.html +10 -8
  186. package/docs/interfaces/ObjectHelperControllers.html +11 -9
  187. package/docs/interfaces/PaintBrushAction.html +14 -12
  188. package/docs/interfaces/PaintBrushConfigs.html +14 -12
  189. package/docs/interfaces/PaintBrushState.html +12 -10
  190. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +12 -10
  191. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +7 -5
  192. package/docs/interfaces/PanoMeasureParameterType.html +18 -16
  193. package/docs/interfaces/PanoMeasurePluginLineJson.html +10 -8
  194. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +9 -7
  195. package/docs/interfaces/PanoMeasurePluginPointJson.html +9 -7
  196. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +10 -8
  197. package/docs/interfaces/PanoRulerPluginExportType.html +12 -10
  198. package/docs/interfaces/PanoRulerPluginOptions.html +9 -7
  199. package/docs/interfaces/PanoRulerPluginParameterType.html +10 -8
  200. package/docs/interfaces/PanoRulerProPluginExportType.html +11 -9
  201. package/docs/interfaces/PanoRulerProPluginOptions.html +9 -7
  202. package/docs/interfaces/PanoRulerProPluginParameterType.html +9 -7
  203. package/docs/interfaces/PanoRulerProPluginState.html +10 -8
  204. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +7 -5
  205. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +7 -5
  206. package/docs/interfaces/PanoSpatialTagPluginData.html +13 -11
  207. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +12 -10
  208. package/docs/interfaces/PanoSpatialTagPluginExportType.html +15 -13
  209. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +12 -10
  210. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +15 -13
  211. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +13 -11
  212. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +12 -10
  213. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +8 -6
  214. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +10 -8
  215. package/docs/interfaces/PanoVideoPluginType.PluginData.html +8 -6
  216. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +11 -9
  217. package/docs/interfaces/PanoVideoPluginType.PluginState.html +8 -6
  218. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +10 -8
  219. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +12 -10
  220. package/docs/interfaces/Point.html +10 -8
  221. package/docs/interfaces/Room.html +11 -9
  222. package/docs/interfaces/RoomInfo.html +9 -7
  223. package/docs/interfaces/RoomLabel.html +16 -14
  224. package/docs/interfaces/RoomRules.html +7 -5
  225. package/docs/interfaces/Rooms.html +7 -5
  226. package/docs/interfaces/Scissor.html +11 -9
  227. package/docs/interfaces/State.html +10 -8
  228. package/docs/interfaces/TagCacheInterface.html +14 -12
  229. package/docs/interfaces/TagConfig.html +16 -14
  230. package/docs/interfaces/TagGLTFObjectGroup.html +8 -6
  231. package/docs/interfaces/TagIconUrl.html +14 -12
  232. package/docs/interfaces/TagObjectGroup.html +8 -6
  233. package/docs/interfaces/TagStyle.html +8 -6
  234. package/docs/interfaces/Tags.html +11 -9
  235. package/docs/interfaces/TemporaryState.html +8 -6
  236. package/docs/interfaces/Util.MagnifierParameter.html +13 -11
  237. package/docs/interfaces/Util.MouseGroupParameter.html +10 -8
  238. package/docs/interfaces/Util.PointIntersection.html +10 -8
  239. package/docs/modules/AreaMakerPluginType.html +7 -5
  240. package/docs/modules/CruisePluginTypes.html +7 -5
  241. package/docs/modules/CurrentPanoImagePluginType.html +7 -5
  242. package/docs/modules/GuideLineItem.html +7 -5
  243. package/docs/modules/GuideLineModeItem.html +7 -5
  244. package/docs/modules/GuideLinePluginType.html +7 -5
  245. package/docs/modules/PanoVideoPluginType.html +7 -5
  246. package/docs/modules/Util.html +7 -5
  247. package/docs/modules.html +27 -9
  248. package/docs/types/AreaMakerPluginType.AreaMakerItemEventMap.html +7 -5
  249. package/docs/types/AreaMakerPluginType.PluginData.html +7 -5
  250. package/docs/types/AreaMakerPluginType.ServerData.html +7 -5
  251. package/docs/types/ArrayPosition.html +7 -5
  252. package/docs/types/AudioAppearance.html +7 -5
  253. package/docs/types/AudioTagTypeConfigKey.html +7 -5
  254. package/docs/types/CSS3DRenderExportType.html +7 -5
  255. package/docs/types/CSS3DRenderPluginExportType.html +7 -5
  256. package/docs/types/CSS3DRenderPluginParameterType.html +7 -5
  257. package/docs/types/ClassFunctionParameters.html +7 -5
  258. package/docs/types/Color.html +7 -5
  259. package/docs/types/ContentTypeConfigKey.html +7 -5
  260. package/docs/types/ContentTypeConfigKeySplit.html +7 -5
  261. package/docs/types/ContentTypeMap.html +7 -5
  262. package/docs/types/Create3DDomContainerReturnType.html +7 -5
  263. package/docs/types/Create3DElementReturnType.html +7 -5
  264. package/docs/types/CruisePluginExportType.html +7 -5
  265. package/docs/types/CruisePluginTypes.CruiseData.html +8 -6
  266. package/docs/types/CruisePluginTypes.MoveEffect.html +8 -6
  267. package/docs/types/CurrentPanoImagePluginExportType.html +7 -5
  268. package/docs/types/DeprecatedMediaPlaneProperty.html +7 -5
  269. package/docs/types/DeprecatedTagProperty.html +7 -5
  270. package/docs/types/Direction-1.html +7 -5
  271. package/docs/types/Direction4.html +7 -5
  272. package/docs/types/ElementRenderer.html +7 -5
  273. package/docs/types/FloorplanRuleLabels.html +7 -5
  274. package/docs/types/FloorplanServerRuleLabels.html +7 -5
  275. package/docs/types/GuideLinePluginExportType.html +7 -5
  276. package/docs/types/GuideLinePluginType.GuideLineItem.html +8 -6
  277. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +8 -6
  278. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +8 -6
  279. package/docs/types/GuideLinePluginType.GuideLineStyle.html +8 -6
  280. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +8 -6
  281. package/docs/types/GuideLinePluginType.PathItem.html +8 -6
  282. package/docs/types/GuideLinePluginType.PluginData.html +8 -6
  283. package/docs/types/HelperEventMap.html +7 -5
  284. package/docs/types/LoadTagConfig.html +7 -5
  285. package/docs/types/MapviewFloorplanPluginParameterType.html +7 -5
  286. package/docs/types/MapviewFloorplanPluginReturnType.html +7 -5
  287. package/docs/types/MediaData.html +7 -5
  288. package/docs/types/MediaStore.html +7 -5
  289. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +7 -5
  290. package/docs/types/ModelFloorplanPluginParameterType.html +7 -5
  291. package/docs/types/ModelFloorplanPluginReturnType.html +7 -5
  292. package/docs/types/ModelId.html +7 -5
  293. package/docs/types/ModelRoomLabelPluginParameters.html +7 -5
  294. package/docs/types/ModelRoomLabelPluginReturnType.html +7 -5
  295. package/docs/types/MoveArgs.html +7 -5
  296. package/docs/types/MoveOpts.html +7 -5
  297. package/docs/types/Object3DHelperEventMap.html +7 -5
  298. package/docs/types/ObjectFit.html +7 -5
  299. package/docs/types/PaintBrushEventMap.html +7 -5
  300. package/docs/types/PanoCompassPluginData.html +7 -5
  301. package/docs/types/PanoCompassPluginExportType.html +7 -5
  302. package/docs/types/PanoCompassPluginParameterType.html +7 -5
  303. package/docs/types/PanoFloorplanRadarPluginParameterType.html +7 -5
  304. package/docs/types/PanoFloorplanRadarPluginReturnType.html +7 -5
  305. package/docs/types/PanoIndex.html +7 -5
  306. package/docs/types/PanoMeasurePluginEvent.html +7 -5
  307. package/docs/types/PanoMeasureReturnType.html +7 -5
  308. package/docs/types/PanoSpatialTagPluginId.html +7 -5
  309. package/docs/types/PanoTagPluginExportInterface.html +7 -5
  310. package/docs/types/PanoTagPluginParamsInterface.html +7 -5
  311. package/docs/types/PanoVideoPluginParameterType.html +7 -5
  312. package/docs/types/PanoVideoPluginReturnType.html +7 -5
  313. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +7 -5
  314. package/docs/types/PipelinePluginParameterType.html +7 -5
  315. package/docs/types/PipelinePluginReturnType.html +7 -5
  316. package/docs/types/PlaneTag.html +7 -5
  317. package/docs/types/Point2DTag.html +7 -5
  318. package/docs/types/Point3DTag.html +7 -5
  319. package/docs/types/PointTag.html +7 -5
  320. package/docs/types/PointTagInstance.html +7 -5
  321. package/docs/types/Position.html +7 -5
  322. package/docs/types/RotateArgs.html +7 -5
  323. package/docs/types/RotateOpts.html +7 -5
  324. package/docs/types/RuleLabelsKey.html +7 -5
  325. package/docs/types/RuleLabelsValue.html +7 -5
  326. package/docs/types/StickType.html +7 -5
  327. package/docs/types/Tag.html +7 -5
  328. package/docs/types/Tag2D.html +7 -5
  329. package/docs/types/Tag3D.html +7 -5
  330. package/docs/types/TagConfigByKey.html +7 -5
  331. package/docs/types/TagContentType.html +7 -5
  332. package/docs/types/TagContentTypeMapping.html +7 -5
  333. package/docs/types/TagDimensionType.html +7 -5
  334. package/docs/types/TagElement.html +7 -5
  335. package/docs/types/TagEvents.html +7 -5
  336. package/docs/types/TagGLTFObject.html +7 -5
  337. package/docs/types/TagHooks.html +7 -5
  338. package/docs/types/TagId.html +7 -5
  339. package/docs/types/TagInstance.html +7 -5
  340. package/docs/types/TagPointType.html +7 -5
  341. package/docs/types/TagRendererMap.html +7 -5
  342. package/docs/types/TopviewFloorplanPluginParameterType.html +7 -5
  343. package/docs/types/TopviewFloorplanPluginReturnType.html +7 -5
  344. package/docs/types/WorkCode.html +7 -5
  345. package/docs/variables/FLOOR_TYPE_MAP.html +7 -5
  346. package/docs/variables/PLUGIN.html +7 -5
  347. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +7 -5
  348. package/docs/variables/ROOM_TYPE_MAP.html +7 -5
  349. package/docs/variables/defaultGlobalConfig.html +7 -5
  350. package/docs/variables/itemLabelPluginServerParams.html +7 -5
  351. package/docs/variables/modelItemLabelPluginServerParams.html +7 -5
  352. package/docs/variables/modelRoomLabelPluginServerParams.html +7 -5
  353. package/libs/CruisePlugin/BaseController.d.ts +159 -0
  354. package/libs/CruisePlugin/BaseController.js +231 -0
  355. package/libs/CruisePlugin/Move.d.ts +40 -0
  356. package/libs/CruisePlugin/Move.js +120 -0
  357. package/libs/CruisePlugin/Work.d.ts +120 -0
  358. package/libs/CruisePlugin/Work.js +597 -0
  359. package/libs/CruisePlugin/index.d.ts +4 -3
  360. package/libs/CruisePlugin/index.js +17 -12
  361. package/libs/CruisePlugin/typing.d.ts +2 -2
  362. package/libs/CruisePlugin/utils/getFiveStateOnCurve.d.ts +11 -0
  363. package/libs/CruisePlugin/utils/getFiveStateOnCurve.js +11 -0
  364. package/libs/GuideLinePlugin/Controller.d.ts +1 -6
  365. package/libs/GuideLinePlugin/Controller.js +48 -62
  366. package/libs/GuideLinePlugin/GuideLineItem/index.js +53 -43
  367. package/libs/GuideLinePlugin/GuideLineItem.js +13 -10
  368. package/libs/GuideLinePlugin/index.js +20 -17
  369. package/libs/PanoTagPlugin/controller/TagRender.d.ts +2 -2
  370. package/libs/PanoTagPlugin/controller/TagRender.js +1 -1
  371. package/libs/base/BasePlugin.js +1 -1
  372. package/libs/index.js +124 -119
  373. package/libs/shared-utils/five/fiveLoaded.d.ts +2 -0
  374. package/libs/shared-utils/five/fiveLoaded.js +30 -0
  375. package/libs/shared-utils/formatRad.d.ts +7 -0
  376. package/libs/shared-utils/formatRad.js +7 -0
  377. package/libs/shared-utils/logger.js +1 -1
  378. package/package.json +2 -2
  379. package/dist/CruisePlugin/Controller.d.ts +0 -171
  380. package/dist/CruisePlugin/utils/linerValue.d.ts +0 -1
  381. package/libs/CruisePlugin/Controller.d.ts +0 -171
  382. package/libs/CruisePlugin/Controller.js +0 -760
  383. /package/dist/{CruisePlugin/utils → shared-utils}/formatRad.d.ts +0 -0
  384. /package/dist/{CruisePlugin/utils/vectorToCoordinates.d.ts → shared-utils/vectorToCoordinate.d.ts} +0 -0
  385. /package/libs/{CruisePlugin/utils/vectorToCoordinates.d.ts → shared-utils/vectorToCoordinate.d.ts} +0 -0
  386. /package/libs/{CruisePlugin/utils/vectorToCoordinates.js → shared-utils/vectorToCoordinate.js} +0 -0
@@ -1,760 +0,0 @@
1
- var T = Object.defineProperty, K = Object.defineProperties;
2
- var A = Object.getOwnPropertyDescriptors;
3
- var F = Object.getOwnPropertySymbols;
4
- var O = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
5
- var L = (c, l, e) => l in c ? T(c, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[l] = e, P = (c, l) => {
6
- for (var e in l || (l = {}))
7
- O.call(l, e) && L(c, e, l[e]);
8
- if (F)
9
- for (var e of F(l))
10
- U.call(l, e) && L(c, e, l[e]);
11
- return c;
12
- }, C = (c, l) => K(c, A(l));
13
- var I = (c, l, e) => (L(c, typeof l != "symbol" ? l + "" : l, e), e);
14
- var v = (c, l, e) => new Promise((t, r) => {
15
- var i = (d) => {
16
- try {
17
- s(e.next(d));
18
- } catch (a) {
19
- r(a);
20
- }
21
- }, n = (d) => {
22
- try {
23
- s(e.throw(d));
24
- } catch (a) {
25
- r(a);
26
- }
27
- }, s = (d) => d.done ? t(d.value) : Promise.resolve(d.value).then(i, n);
28
- s((e = e.apply(c, l)).next());
29
- });
30
- import { Controller as V } from "../base/BasePluginWithData.js";
31
- import { GuideLinePlugin as $ } from "../GuideLinePlugin/index.js";
32
- import { uuid as w } from "../shared-utils/uuid.js";
33
- import { coordinatesAngle as Q } from "./utils/coordinatesAngle.js";
34
- import { safeCall as _ } from "./utils/safeCall.js";
35
- import { equal as R } from "../shared-utils/equal.js";
36
- import { vectorToCoordinates as N } from "./utils/vectorToCoordinates.js";
37
- import * as j from "three";
38
- import H from "./utils/linerValue.js";
39
- import { sleep as J } from "./utils/sleep.js";
40
- import "../base/BasePlugin.js";
41
- import "../shared-utils/Subscribe.js";
42
- import "hammerjs";
43
- import "@realsee/five";
44
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
45
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
46
- import "../shared-utils/positionToVector3.js";
47
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
48
- import "three/examples/jsm/renderers/CSS3DRenderer";
49
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
50
- import "../shared-utils/util.js";
51
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
52
- import "../CSS3DRenderPlugin/utils/even.js";
53
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
54
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
55
- import "../shared-utils/three/centerPoint.js";
56
- import "../shared-utils/three/getObjectVisible.js";
57
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
58
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
59
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
60
- import "../shared-utils/url/absoluteUrl.js";
61
- import "../GuideLinePlugin/Controller.js";
62
- import "../GuideLinePlugin/GuideLineItem/index.js";
63
- import "../GuideLinePlugin/GuideLineModeItem/index.js";
64
- import "../shared-utils/log.js";
65
- import "../GuideLinePlugin/utils/createLineGeometry.js";
66
- import "../vendor/polyline-normals/index.js";
67
- import "../vendor/polyline-miter-util/index.js";
68
- import "../vendor/gl-vec2/add.js";
69
- import "../vendor/gl-vec2/set.js";
70
- import "../vendor/gl-vec2/normalize.js";
71
- import "../vendor/gl-vec2/subtract.js";
72
- import "../vendor/gl-vec2/dot.js";
73
- import "../shared-utils/five/mode.js";
74
- import "../shared-utils/animationFrame/BetterTween.js";
75
- import "../shared-utils/animationFrame/index.js";
76
- import "../shared-utils/three/loadTexture.js";
77
- import "../PanoTagPlugin/controller/index.js";
78
- import "../vendor/object-assign-deep/objectAssignDeep.js";
79
- import "../PanoTagPlugin/utils/addDebugPoints.js";
80
- import "../PanoTagPlugin/utils/tag/tagCheck.js";
81
- import "../PanoTagPlugin/utils/debounce.js";
82
- import "../PanoTagPlugin/utils/throttle.js";
83
- import "../PanoTagPlugin/utils/resizeObserver.js";
84
- import "../PanoTagPlugin/utils/tag/format.js";
85
- import "../shared-utils/audio.js";
86
- import "../PanoTagPlugin/controller/TagRender.js";
87
- import "../PanoTagPlugin/controller/TagComputer.js";
88
- import "../PanoTagPlugin/utils/tagPosition.js";
89
- import "../PanoTagPlugin/utils/checkRange.js";
90
- import "../shared-utils/isNil.js";
91
- import "../PanoTagPlugin/controller/TagUtil.js";
92
- import "../PanoTagPlugin/typings/tag/TagConfig.js";
93
- import "../PanoTagPlugin/tag.config.js";
94
- import "../PanoTagPlugin/utils/planeNormal.js";
95
- import "../PanoTagPlugin/utils/normalPositionToPositions.js";
96
- import "../PanoTagPlugin/controller/TagCache.js";
97
- import "../vendor/svelte/store/index.js";
98
- import "../vendor/svelte/internal/index.js";
99
- import "../shared-utils/device.js";
100
- import "../PanoTagPlugin/utils/model/mediaPlane.js";
101
- import "../shared-utils/three/Quadrangle.js";
102
- import "../shared-utils/math/pointIsRectangle.js";
103
- import "../shared-utils/three/loadVideoTexture.js";
104
- import "../PanoTagPlugin/Assets/Icon.js";
105
- import "../shared-utils/three/getPositionsByObjectFit.js";
106
- import "../shared-utils/three/FragmentTransparencyMaterial.js";
107
- import "../shared-utils/three/getNormal.js";
108
- import "../shared-utils/five/FiveDomEvents.js";
109
- import "../shared-utils/five/calculateThreeMouse.js";
110
- import "../PanoTagPlugin/utils/tag/adaptConfig.js";
111
- import "../shared-utils/typescript/entries.js";
112
- import "../shared-utils/url/getUrl.js";
113
- import "../shared-utils/five/transformPosition.js";
114
- import "../shared-utils/five/getFloorIndex.js";
115
- import "../shared-utils/safeObj.js";
116
- import "../PanoTagPlugin/Components/TagContainer.js";
117
- import "../PanoTagPlugin/Components/TagItem.js";
118
- import "../PanoTagPlugin/Components/Tag/index.js";
119
- import "../PanoTagPlugin/Components/Tag/TextTag/index.js";
120
- import "../PanoTagPlugin/Components/Tag/TextTag/TextTag.js";
121
- import "../PanoTagPlugin/Components/Common/Line/Straight.js";
122
- import "../vendor/svelte/transition/index.js";
123
- import "../vendor/svelte/easing/index.js";
124
- import "../PanoTagPlugin/Components/Common/Shadow.js";
125
- import "../PanoTagPlugin/Components/Common/Text/FlyMText.js";
126
- import "../PanoTagPlugin/Components/Common/Text/FlyText.js";
127
- import "animejs";
128
- import "../PanoTagPlugin/utils/search.js";
129
- import "../PanoTagPlugin/utils/constants.js";
130
- import "../PanoTagPlugin/Components/Common/Arrow.js";
131
- import "../PanoTagPlugin/utils/doUtil.js";
132
- import "../shared-utils/svelte/resizeObserver.js";
133
- import "../vendor/resize-observer-polyfill/dist/ResizeObserver.es.js";
134
- import "../PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.js";
135
- import "../PanoTagPlugin/Components/Common/Text/MText.js";
136
- import "../PanoTagPlugin/utils/px2rem.js";
137
- import "../PanoTagPlugin/Components/Tag/ImageTextTag.js";
138
- import "../PanoTagPlugin/Components/Common/Line/Polyline.js";
139
- import "../PanoTagPlugin/Components/Common/Media.js";
140
- import "../vendor/svelte-carousel/src/components/Carousel/Carousel.js";
141
- import "../vendor/svelte-carousel/src/components/Dots/Dots.js";
142
- import "../vendor/svelte-carousel/src/components/Dot/Dot.js";
143
- import "../vendor/svelte-carousel/src/components/Arrow/Arrow.js";
144
- import "../vendor/svelte-carousel/src/direction.js";
145
- import "../vendor/svelte-carousel/src/components/Progress/Progress.js";
146
- import "../vendor/svelte-carousel/src/actions/swipeable/swipeable.js";
147
- import "../vendor/svelte-carousel/src/actions/swipeable/event.js";
148
- import "../vendor/svelte-carousel/src/utils/event.js";
149
- import "../vendor/svelte-carousel/src/units.js";
150
- import "../vendor/svelte-carousel/src/actions/hoverable/hoverable.js";
151
- import "../vendor/svelte-carousel/src/actions/hoverable/event.js";
152
- import "../vendor/svelte-carousel/src/actions/tappable/tappable.js";
153
- import "../vendor/svelte-carousel/src/utils/math.js";
154
- import "../vendor/svelte-carousel/src/actions/tappable/event.js";
155
- import "../vendor/svelte-carousel/src/utils/page.js";
156
- import "../vendor/svelte-carousel/src/utils/clones.js";
157
- import "../vendor/svelte-carousel/src/utils/object.js";
158
- import "../vendor/svelte-carousel/src/components/Carousel/createCarousel.js";
159
- import "../vendor/easy-reactive/src/simply-reactive.js";
160
- import "../vendor/lodash.get/index.js";
161
- import "../_commonjsHelpers.js";
162
- import "../vendor/lodash.clonedeep/index.js";
163
- import "../vendor/easy-reactive/src/utils/subscription.js";
164
- import "../vendor/easy-reactive/src/utils/object.js";
165
- import "../vendor/lodash.isequal/index.js";
166
- import "../vendor/easy-reactive/src/utils/watcher.js";
167
- import "../vendor/svelte-carousel/src/utils/lazy.js";
168
- import "../vendor/svelte-carousel/src/utils/ProgressManager.js";
169
- import "../vendor/svelte-carousel/src/utils/interval.js";
170
- import "../PanoTagPlugin/Components/Common/MediaItem.js";
171
- import "../PanoTagPlugin/Components/Tag/MarketingTag.js";
172
- import "../PanoTagPlugin/utils/noTypecheck.js";
173
- import "../PanoTagPlugin/Components/Tag/AudioTag/index.js";
174
- import "../PanoTagPlugin/Components/Tag/AudioTag/AudioTag.js";
175
- import "../PanoTagPlugin/Components/Common/Audio.js";
176
- import "../PanoTagPlugin/utils/audio/SharedAudio.js";
177
- import "../PanoTagPlugin/Components/Common/Icon/audioIcon.js";
178
- import "../PanoTagPlugin/Components/Tag/AudioTag/AudioPlaneTag.js";
179
- import "../PanoTagPlugin/Components/Tag/MediaPlane.js";
180
- import "../PanoTagPlugin/Components/Tag/LinkTag.js";
181
- import "../PanoTagPlugin/Components/Common/Icon/Icon.js";
182
- import "../PanoTagPlugin/utils/getImageInfo.js";
183
- import "../PanoTagPlugin/Components/Tag/PanoramaTag.js";
184
- import "../PanoTagPlugin/Components/Tag/CustomTag.js";
185
- import "../vendor/classnames/index.js";
186
- import "../PanoTagPlugin/Components/Common/TagPoint.js";
187
- import "../CSS3DRenderPlugin/index.js";
188
- import "../CSS3DRenderPlugin/Controller.js";
189
- import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
190
- import "../shared-utils/three/GLTFLoader.js";
191
- import "@realsee/five/gltf-loader";
192
- import "../shared-utils/five/fiveModelLoad.js";
193
- import "../GuideLinePlugin/Components/Tag.js";
194
- import "../GuideLinePlugin/utils/index.js";
195
- import "./Controller.js";
196
- import "../shared-utils/to.js";
197
- import "../shared-utils/five/changeMode.js";
198
- import "../shared-utils/nearlyEqual.js";
199
- import "./utils/coordinatesToVector.js";
200
- import "../shared-utils/isTruelyObject.js";
201
- import "./utils/formatRad.js";
202
- const M = "v1.0.6", G = "CruisePlugin", x = `${G}@${M}`, sr = (c) => `${x}--${c}`, D = () => {
203
- console.error(`${x} is disposed`);
204
- }, W = () => {
205
- console.warn(`${x} is disabled`);
206
- }, q = () => {
207
- console.error(`${x} is disabled`);
208
- }, E = /* @__PURE__ */ new Map();
209
- class z extends V {
210
- constructor(e, t) {
211
- super(e, t);
212
- I(this, "state", {
213
- visible: !0,
214
- enabled: !0,
215
- disposed: !1,
216
- playing: !1,
217
- speed: 1,
218
- config: {
219
- speedConfig: {
220
- rotateSpeed: 1e-3,
221
- rotateSpeedUnit: "rad/ms",
222
- moveSpeed: 2e-3,
223
- moveSpeedUnit: "m/ms"
224
- }
225
- }
226
- });
227
- I(this, "data");
228
- I(this, "config");
229
- I(this, "privateState", {
230
- playing: !1,
231
- currentPlayQueue: [],
232
- currentPlayKeyframe: null,
233
- broke: !1,
234
- disposers: [],
235
- modeChanging: !1
236
- });
237
- I(this, "GuideLine");
238
- this.config = t, Object.assign(window, { [`__${G}_DEBUG__`]: this });
239
- const r = this.setFiveLinearUpdateCamera.bind(this), i = this.setFiveOriginUpdateCamera.bind(this);
240
- this.hooks.on("play", r), this.hooks.on("broke", i), this.hooks.on("end", i), this.hooks.on("pause", i), this.privateState.disposers.push(() => {
241
- this.hooks.off("play", r), this.hooks.off("broke", i), this.hooks.off("end", i), this.hooks.off("pause", i);
242
- });
243
- }
244
- /**
245
- * @description Load Data and State
246
- */
247
- load(e, t, r) {
248
- return v(this, null, function* () {
249
- var o, m, f, u, h, g;
250
- if (this.state.disposed)
251
- return D();
252
- this.privateState.fiveOriginGetProgress || (m = (o = this.five.controller) == null ? void 0 : o.cameraMotion) != null && m.getProgress || (yield this.waitFiveLoaded(), this.privateState.fiveOriginGetProgress = (u = (f = this.five.controller) == null ? void 0 : f.cameraMotion) == null ? void 0 : u.getProgress), this.clear();
253
- const i = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, n = yield this.formatData(e);
254
- this.data = n, this.hooks.emit("dataChange", n, i);
255
- let s = [], d;
256
- const a = this.data.keyframes.filter((p) => p.data.panoIndex !== void 0);
257
- a.filter((p, y) => {
258
- var S;
259
- return p.data.panoIndex !== ((S = a[y - 1]) == null ? void 0 : S.data.panoIndex);
260
- }).map((p) => p.data.panoIndex).forEach((p) => {
261
- var S, k;
262
- const y = (S = this.five.work.observers[p]) == null ? void 0 : S.floorIndex;
263
- if (y !== void 0)
264
- if (d === y) {
265
- const b = s.length - 1;
266
- s[b] = [...(k = s[b]) != null ? k : [], p];
267
- } else {
268
- d = y;
269
- const b = s.length;
270
- s[b] = [p];
271
- }
272
- }), !this.GuideLine && ((h = this.config) == null ? void 0 : h.useGuideLine) !== !1 && n.useGuildLine !== !1 && (this.GuideLine = $(this.five, this.config)), (g = this.GuideLine) == null || g.load({ routes: s.map((p) => ({ panoIndexList: p })), config: n.guildPluginOptions }), t ? this.setState(t, { userAction: r }) : (this.setState({ playing: !1 }, { userAction: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing, { userAction: !1 }), this.changeSpeed(this.state.speed)), this.clearPauseData(), console.debug(`${x} loaded`, n), this.hooks.emit("dataLoaded", n);
273
- });
274
- }
275
- /**
276
- * @description Play | Continue play. if have been paused, continue play from the pause position; if playing, do nothing
277
- */
278
- play(e) {
279
- this.setState({ playing: !0 }, e);
280
- }
281
- /**
282
- * @description If playing, first pause, then play from keyframes index/id
283
- * @param {number} options.index play from keyframes index
284
- * @param {string} options.id play from keyframes id
285
- */
286
- playFrom(e) {
287
- const { index: t, id: r, userAction: i } = e;
288
- this.state.playing && this.setState({ playing: !1 }, { userAction: i }), this.setState({ playing: !0 }, { userAction: i, playFromIndex: t, playFromId: r });
289
- }
290
- /**
291
- * @description Play from first keyframe
292
- */
293
- playFromStart(e) {
294
- return this.playFrom(C(P({}, e), { index: 0 }));
295
- }
296
- /**
297
- * @description Pause
298
- */
299
- pause(e) {
300
- this.setState({ playing: !1 }, e);
301
- }
302
- /**
303
- * @description Show guide line
304
- */
305
- show(e) {
306
- return v(this, null, function* () {
307
- this.setState({ visible: !0 }, e);
308
- });
309
- }
310
- /**
311
- * @description Hide guide line
312
- */
313
- hide(e) {
314
- return v(this, null, function* () {
315
- this.setState({ visible: !1 }, e);
316
- });
317
- }
318
- /**
319
- * @description Enable
320
- */
321
- enable(e) {
322
- this.setState({ enabled: !0 }, e);
323
- }
324
- /**
325
- * @description Disable
326
- */
327
- disable(e) {
328
- this.setState({ enabled: !1 }, e);
329
- }
330
- /**
331
- * @description Dispose
332
- */
333
- dispose() {
334
- this.setState({ disposed: !0 });
335
- }
336
- /**
337
- * @description Set state
338
- */
339
- setState(e, t) {
340
- var i;
341
- if (this.state.disposed)
342
- return D();
343
- if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
344
- return q();
345
- const r = P({}, this.state);
346
- this.state = P(P({}, this.state), e), e.disposed !== void 0 && e.disposed !== r.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== r.visible && this.handleVisible(e.visible, t == null ? void 0 : t.userAction), e.enabled !== void 0 && e.enabled !== r.enabled && this.handleEnable(e.enabled, t == null ? void 0 : t.userAction), e.playing !== void 0 && e.playing !== r.playing && this.changePlayState(e.playing, t), e.speed !== void 0 && e.speed !== r.speed && this.changeSpeed(e.speed, t == null ? void 0 : t.userAction), R(r, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: r, userAction: (i = t == null ? void 0 : t.userAction) != null ? i : !0 });
347
- }
348
- /**
349
- * @description Format data
350
- */
351
- formatData(e) {
352
- return v(this, null, function* () {
353
- this.five.work || (yield this.waitFiveLoaded());
354
- const t = this.five.work.observers, r = (() => {
355
- const i = e;
356
- return typeof i == "object" && i !== null && i.version && i.data ? i.data : i;
357
- })();
358
- if (r.keyframes)
359
- return {
360
- keyframesId: w(),
361
- keyframes: r.keyframes.map((i, n) => {
362
- var a;
363
- const s = r.keyframes[n + 1], d = (() => !s || s.start === void 0 || i.end === void 0 ? 0 : s.start - i.end)();
364
- return C(P({ id: (a = i.uuid) != null ? a : w(), moveIndex: n, stay: d, index: n }, i), { guildPluginOptions: r.guildPluginOptions });
365
- })
366
- };
367
- if (r.panoIndexList) {
368
- let i = [];
369
- const { moveEffect: n, moveToFirstPanoEffect: s, moveToFirstPanoDuration: d } = r;
370
- return this.privateState.moveToFirstPanoEffect = s, this.privateState.moveToFirstPanoDuration = d, r.panoIndexList.forEach((a, o) => {
371
- const m = (() => {
372
- var p, y, S, k;
373
- const f = r.panoIndexList.slice(o).find((b) => b !== a);
374
- if (f === void 0)
375
- return;
376
- const u = (p = t[a]) == null ? void 0 : p.position, h = (y = t[f]) == null ? void 0 : y.position;
377
- if (!h || !u || ((S = t[a]) == null ? void 0 : S.floorIndex) !== ((k = t[f]) == null ? void 0 : k.floorIndex))
378
- return;
379
- const g = new j.Vector3().subVectors(h, u);
380
- return N(g.normalize());
381
- })();
382
- r.moveType === void 0 || r.moveType === "justMove" ? i.push({
383
- moveIndex: o,
384
- stay: r.stay,
385
- data: P({ effect: "Move", panoIndex: a, moveEffect: n }, m != null ? m : {})
386
- }) : r.moveType === "moveAndRotate" && (i.push({ moveIndex: o, stay: r.stay, data: { effect: "Move", panoIndex: a, moveEffect: n } }), m && i.push({ moveIndex: o, stay: r.stay, data: P({ effect: "Rotate", panoIndex: a }, m) }));
387
- }), {
388
- keyframesId: w(),
389
- keyframes: i.map((a, o) => P({ id: w(), index: o }, a)),
390
- guildPluginOptions: r.guildPluginOptions,
391
- useGuildLine: r.useGuildLine
392
- };
393
- } else
394
- throw new Error("format error: data no keyframes or no panoIndexList");
395
- });
396
- }
397
- handleEnable(e, t = !0) {
398
- var r, i;
399
- e ? ((r = this.GuideLine) == null || r.enable(), this.hooks.emit("enable", { userAction: t })) : ((i = this.GuideLine) == null || i.disable(), this.changePlayState(!1, { userAction: t }), this.hooks.emit("disable", { userAction: t })), this.state.enabled = e;
400
- }
401
- handleVisible(e, t = !0) {
402
- var r, i;
403
- e ? ((r = this.GuideLine) == null || r.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: t }))) : ((i = this.GuideLine) == null || i.hide(), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: t }))), this.state.visible = e;
404
- }
405
- changePlayState(e, t) {
406
- this.actionIfStateIsEnabled(
407
- () => {
408
- var r;
409
- return this.hooks.emit("playStateChange", e ? "playing" : "pause", { userAction: (r = t == null ? void 0 : t.userAction) != null ? r : !0 });
410
- }
411
- ), e ? this.handlePlay(t) : this.handlePause(t), this.state.playing = e;
412
- }
413
- /**
414
- * @description Play | Continue play. if have been paused, continue play from the pause position; if playing, do nothing
415
- * @param {number} options.playFromIndex play from keyframes index
416
- * @param {string} options.playFromId play from keyframes id
417
- */
418
- // eslint-disable-next-line complexity
419
- handlePlay(e) {
420
- return v(this, null, function* () {
421
- var u;
422
- const { data: t, state: r, privateState: i, hooks: n } = this;
423
- if (i.playing || !(t != null && t.keyframes) || (t == null ? void 0 : t.keyframes.length) === 0)
424
- return;
425
- const s = w();
426
- i.playId = s, i.playing = !0, i.broke = !1;
427
- const d = t.keyframes, a = this.getPauseData();
428
- (e == null ? void 0 : e.notEmitEvent) !== !0 && n.emit("play", { userAction: (u = e == null ? void 0 : e.userAction) != null ? u : !0 });
429
- let o = !1;
430
- const f = yield (() => v(this, null, function* () {
431
- var h, g;
432
- if ((e == null ? void 0 : e.playFromIndex) !== void 0)
433
- return e.playFromIndex;
434
- if ((e == null ? void 0 : e.playFromId) !== void 0)
435
- return (h = this.data) == null ? void 0 : h.keyframes.findIndex((p) => p.id === e.playFromId);
436
- if (a != null && a.keyframeId) {
437
- const p = (g = this.data) == null ? void 0 : g.keyframes.find((y) => y.id === a.keyframeId);
438
- if (a != null && a.fiveState && (yield this.move(a.fiveState, {
439
- moveEffect: i.moveToFirstPanoEffect,
440
- duration: i.moveToFirstPanoDuration
441
- })), p) {
442
- if (p.data.effect === "Move")
443
- return p.index;
444
- if (p.data.effect === "Rotate") {
445
- const y = a.duration !== void 0 ? a.duration * (1 - a.playedProgress) : void 0;
446
- return yield this.playKeyframe(p, { duration: y }), o = !0, p.index + 1;
447
- }
448
- }
449
- }
450
- }))();
451
- this.clearPauseData();
452
- for (const h of d) {
453
- if (i.broke || !r.playing || !i.playing || s !== i.playId)
454
- return;
455
- if (!(f !== void 0 && h.index < f))
456
- try {
457
- n.emit("playIndexChange", h.index, h), yield this.playKeyframe(h, {
458
- moveEffect: o === !1 ? i.moveToFirstPanoEffect : void 0,
459
- duration: o === !1 && typeof i.moveToFirstPanoDuration == "number" ? i.moveToFirstPanoDuration : void 0
460
- }), h.stay && (yield J(h.stay)), o === !1 && (o = !0);
461
- } catch (g) {
462
- return console.error(g), Promise.resolve("broke");
463
- }
464
- }
465
- r.playing && s === i.playId && (this.setState({ playing: !1 }, { userAction: !1 }), n.emit("end"), this.clearPauseData());
466
- });
467
- }
468
- /**
469
- * @description: Pause and record pause state
470
- */
471
- handlePause(e) {
472
- var n;
473
- const { state: t, privateState: r, hooks: i } = this;
474
- t.playing = !1, r.playing !== !1 && (r.playing = !1, (e == null ? void 0 : e.userAction) !== !1 && this.setPauseData(), r.broke || this.forceInteruptUpdateCamera(), (e == null ? void 0 : e.notEmitEvent) !== !0 && i.emit("pause", { userAction: (n = e == null ? void 0 : e.userAction) != null ? n : !0 }));
475
- }
476
- /**
477
- * @description Play single keyframe
478
- */
479
- playKeyframe(e, t) {
480
- return v(this, null, function* () {
481
- var i;
482
- const { privateState: r } = this;
483
- return ((i = this.privateState.currentPlayKeyframe) == null ? void 0 : i.keyframe.id) !== e.id && (this.privateState.currentPlayKeyframe = { keyframe: e }), r.currentPlayQueue.push(this.getPlayPromise(e, t)), this.actionPromiseQueue();
484
- });
485
- }
486
- /**
487
- * @description: listen interupted by five gesture
488
- */
489
- addInterruptListener(e) {
490
- const t = () => {
491
- this.privateState.modeChanging || e();
492
- }, r = (i) => {
493
- i !== "mouseMove" && e();
494
- };
495
- return this.five.once("gesture", r), this.five.once("wantsChangeMode", t), () => {
496
- this.five.off("gesture", r), this.five.once("wantsChangeMode", t);
497
- };
498
- }
499
- /**
500
- * @description: getPlayPromise
501
- */
502
- getPlayPromise(r) {
503
- return v(this, arguments, function* (e, t = {}) {
504
- var n;
505
- const i = e.data;
506
- if (t.duration = (n = t.duration) != null ? n : e.start !== void 0 && e.end !== void 0 ? e.end - e.start : void 0, !!i)
507
- return new Promise((s, d) => {
508
- let a = !1;
509
- this.addInterruptListener(() => {
510
- if (!a)
511
- return this.hooks.emit("broke"), this.privateState.broke = !0, this.setState({ playing: !1 }), a = !0, d(new Error("play is interupted"));
512
- });
513
- try {
514
- if (a)
515
- return;
516
- const o = () => {
517
- s(), a = !0;
518
- };
519
- switch (i.effect) {
520
- case "Move":
521
- this.move(i, t).then(o);
522
- break;
523
- case "Rotate":
524
- this.rotate(i, t).then(o);
525
- break;
526
- default:
527
- this.rotate(i, t).then(o);
528
- }
529
- } catch (o) {
530
- }
531
- });
532
- });
533
- }
534
- /**
535
- * @description Action promise queue in sequence
536
- */
537
- actionPromiseQueue() {
538
- return v(this, null, function* () {
539
- const { privateState: e } = this;
540
- return new Promise((t, r) => {
541
- if (e.currentPlayQueue.length === 0) {
542
- t();
543
- return;
544
- }
545
- const i = e.currentPlayQueue.shift();
546
- if (!i) {
547
- t();
548
- return;
549
- }
550
- i.then(t, r);
551
- }).then(() => e.currentPlayQueue.length === 0 ? Promise.resolve() : this.actionPromiseQueue());
552
- });
553
- }
554
- /**
555
- * @description Action move keyframe
556
- */
557
- move(e, t) {
558
- return v(this, null, function* () {
559
- if (e.mode && e.mode !== this.five.currentMode)
560
- yield this.changeMode(e);
561
- else if (e.panoIndex !== this.five.panoIndex)
562
- yield this.changePano(e, t);
563
- else
564
- return Promise.resolve();
565
- });
566
- }
567
- /**
568
- * @description Action rotate keyframe
569
- */
570
- rotate(e, t) {
571
- return v(this, null, function* () {
572
- if (e.mode && e.mode !== this.five.currentMode)
573
- yield this.changeMode({ mode: e.mode, panoIndex: e.panoIndex });
574
- else if (e.panoIndex && e.panoIndex !== this.five.panoIndex)
575
- return yield this.changePano(e, t);
576
- yield this.updateCamera(e, t);
577
- });
578
- }
579
- /**
580
- * @description Update five camera
581
- */
582
- updateCamera(r) {
583
- return v(this, arguments, function* (e, t = {}) {
584
- const { five: i, privateState: n, state: s } = this, d = (() => {
585
- var u, h;
586
- const m = (u = s.config) == null ? void 0 : u.speedConfig, f = (h = e.rotateSpeed) != null ? h : m == null ? void 0 : m.rotateSpeed;
587
- if ((m == null ? void 0 : m.rotateSpeedUnit) === void 0)
588
- return f;
589
- if (f !== void 0)
590
- return m.rotateSpeedUnit === "rad/ms" ? f : f / 1e3;
591
- })(), a = (() => {
592
- if (t.duration)
593
- return t.duration;
594
- if (d) {
595
- const m = this.five.getCurrentState();
596
- return Q(m, e) / d;
597
- }
598
- return 800;
599
- })();
600
- n.currentPlayKeyframe && (n.currentPlayKeyframe.originDuration = a);
601
- const o = this.getSpeededDuration(a);
602
- return new Promise((m) => {
603
- _(() => i.updateCamera(e, o)), setTimeout(() => m(), o);
604
- });
605
- });
606
- }
607
- /**
608
- * @description: Change five pano
609
- */
610
- changePano(e, t) {
611
- return v(this, null, function* () {
612
- const { five: r, privateState: i, state: n } = this;
613
- if (typeof e.panoIndex != "number" || e.panoIndex === r.panoIndex)
614
- return;
615
- const s = r.getCurrentState().mode !== "Panorama";
616
- s && (this.privateState.modeChanging = !0);
617
- const d = (() => {
618
- var f, u;
619
- const o = (f = n.config) == null ? void 0 : f.speedConfig, m = (u = e.moveSpeed) != null ? u : o == null ? void 0 : o.moveSpeed;
620
- if ((o == null ? void 0 : o.moveSpeedUnit) === void 0)
621
- return m;
622
- if (m !== void 0)
623
- return o.moveSpeedUnit === "m/ms" ? m : m / 1e3;
624
- })(), a = (() => {
625
- if (t != null && t.duration)
626
- return t.duration;
627
- if (d && typeof r.panoIndex == "number" && typeof e.panoIndex == "number") {
628
- const o = r.work.observers[r.panoIndex].position, m = r.work.observers[e.panoIndex].position;
629
- return o.distanceTo(m) / d;
630
- }
631
- return 800;
632
- })();
633
- i.currentPlayKeyframe && (i.currentPlayKeyframe.originDuration = a), yield new Promise((o) => {
634
- var m, f, u;
635
- r.moveToPano(e.panoIndex, {
636
- latitude: e.latitude,
637
- longitude: e.longitude,
638
- fov: e.fov,
639
- duration: this.getSpeededDuration(a),
640
- effect: (u = (f = t == null ? void 0 : t.moveEffect) != null ? f : (m = this.state.config) == null ? void 0 : m.moveEffect) != null ? u : e.moveEffect,
641
- moveCancelCallback: () => o(),
642
- moveEndCallback: () => o()
643
- }), s && r.once("panoArrived", () => o());
644
- }), s && (this.privateState.modeChanging = !1);
645
- });
646
- }
647
- /**
648
- * @description: Change play speed
649
- */
650
- changeSpeed(e, t = !0) {
651
- const { state: r, privateState: i, hooks: n } = this, { currentPlayKeyframe: s } = i;
652
- if (n.emit("speedChange", e, { userAction: t }), r.playing && s)
653
- try {
654
- const d = s.originDuration !== void 0 ? s.originDuration * (1 - this.getProgress()) : void 0, a = this.playKeyframe(s.keyframe, { duration: d });
655
- i.currentPlayQueue.push(a);
656
- } catch (d) {
657
- }
658
- }
659
- /**
660
- * @description Get duration by speed
661
- */
662
- getSpeededDuration(e) {
663
- return e / this.state.speed;
664
- }
665
- /**
666
- * @description Get ratate progress
667
- */
668
- getProgress() {
669
- return this.five.controller.cameraMotion.progress;
670
- }
671
- /**
672
- * @description Change five mode
673
- */
674
- changeMode(e, t) {
675
- return v(this, null, function* () {
676
- e.mode && e.mode !== this.five.currentMode && (this.privateState.modeChanging = !0, yield this.five.changeMode(e.mode, e, t), this.privateState.modeChanging = !1);
677
- });
678
- }
679
- /**
680
- * @description Force interupt five updateCamera
681
- */
682
- forceInteruptUpdateCamera() {
683
- this.five.updateCamera({}, 0);
684
- }
685
- getPauseData() {
686
- var e, t;
687
- if ((e = this.data) != null && e.keyframesId)
688
- return E.get((t = this.data) == null ? void 0 : t.keyframesId);
689
- }
690
- /**
691
- * @description Set pause data
692
- */
693
- setPauseData() {
694
- var e, t, r, i;
695
- if ((e = this.data) != null && e.keyframesId)
696
- return E.set((t = this.data) == null ? void 0 : t.keyframesId, {
697
- keyframeId: (r = this.privateState.currentPlayKeyframe) == null ? void 0 : r.keyframe.id,
698
- fiveState: this.five.getCurrentState(),
699
- duration: (i = this.privateState.currentPlayKeyframe) == null ? void 0 : i.originDuration,
700
- playedProgress: this.getProgress()
701
- });
702
- }
703
- /**
704
- * @description Clear pause data
705
- */
706
- clearPauseData() {
707
- var e, t;
708
- if ((e = this.data) != null && e.keyframesId)
709
- return E.delete((t = this.data) == null ? void 0 : t.keyframesId);
710
- }
711
- /**
712
- * @description: Restore state that before loaded
713
- */
714
- clear() {
715
- this.clearPauseData(), this.privateState.currentPlayKeyframe = null;
716
- }
717
- // TODO
718
- handleDispose() {
719
- var e, t;
720
- 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((r) => r == null ? void 0 : r());
721
- }
722
- /**
723
- * @description Action function if plugin is enable
724
- */
725
- actionIfStateIsEnabled(e, t) {
726
- if (this.state.enabled)
727
- return e();
728
- t != null && t.warnLog && W();
729
- }
730
- /**
731
- * @description: Wait for five work ready
732
- */
733
- waitFiveLoaded() {
734
- return v(this, null, function* () {
735
- return new Promise((e) => {
736
- if (this.five.work) {
737
- e();
738
- return;
739
- }
740
- this.five.once("loaded", () => {
741
- e();
742
- });
743
- });
744
- });
745
- }
746
- setFiveLinearUpdateCamera() {
747
- this.privateState.fiveOriginGetProgress && (this.five.controller.cameraMotion.getProgress = (e) => {
748
- const t = this.five.controller.cameraMotion, r = e - t.startTime;
749
- return r < 0 ? 0 : r >= t.duration ? 1 : 1 - H(1, t.startVelocity, t.duration, r);
750
- });
751
- }
752
- setFiveOriginUpdateCamera() {
753
- this.privateState.fiveOriginGetProgress && (this.five.controller.cameraMotion.getProgress = this.privateState.fiveOriginGetProgress);
754
- }
755
- }
756
- I(z, "PluginVersion", M);
757
- export {
758
- z as default,
759
- sr as pluginFlag
760
- };