@realsee/dnalogel 2.16.0-1 → 2.16.0-11

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 (562) hide show
  1. package/components/index.js +688 -240
  2. package/dist/CruisePlugin/index.d.ts +2 -0
  3. package/dist/CruisePlugin/typing.d.ts +35 -40
  4. package/dist/GuideLinePlugin/Controller.d.ts +6 -3
  5. package/dist/GuideLinePlugin/GuideLineItem.d.ts +6 -0
  6. package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +45 -4
  7. package/dist/GuideLinePlugin/index.d.ts +2 -1
  8. package/dist/GuideLinePlugin/typing.d.ts +36 -5
  9. package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +5 -1
  10. package/dist/GuideLinePlugin/utils/index.d.ts +6 -0
  11. package/dist/PanoTagPlugin/controller/TagComputer.d.ts +1 -0
  12. package/dist/PanoTagPlugin/controller/TagUtil.d.ts +5 -5
  13. package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +3 -1
  14. package/dist/index.cjs.js +119 -87
  15. package/dist/index.js +17164 -10135
  16. package/dist/index.umd.js +112 -80
  17. package/dist/shared-utils/animationFrame/BetterTween.d.ts +3 -2
  18. package/dist/shared-utils/animationFrame/index.d.ts +1 -1
  19. package/dist/shared-utils/animationFrame/tween.d.ts +32 -23
  20. package/dist/shared-utils/five/changeMode.d.ts +2 -4
  21. package/dist/shared-utils/svelte/resizeObserver.d.ts +2 -10
  22. package/dist/shared-utils/svelte/resizeObserverGlobal.d.ts +10 -0
  23. package/docs/assets/search.js +1 -1
  24. package/docs/classes/CSS3DRender.html +33 -31
  25. package/docs/classes/CruisePluginController.html +40 -38
  26. package/docs/classes/GuideLineItem.GuideLineItem.html +57 -23
  27. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +246 -49
  28. package/docs/classes/Magnifier.html +22 -20
  29. package/docs/classes/ModelRoomLabelController.html +13 -11
  30. package/docs/classes/Object3DHelperController.html +27 -25
  31. package/docs/classes/PaintBrush.html +17 -15
  32. package/docs/classes/PanoMeasurePluginLine.html +25 -23
  33. package/docs/classes/PanoMeasurePluginModel.html +24 -22
  34. package/docs/classes/PanoMeasurePluginPoint.html +16 -14
  35. package/docs/classes/PanoMeasurePluginPolyline.html +28 -26
  36. package/docs/classes/PanoTagPluginController.html +49 -47
  37. package/docs/classes/Util.BetterTween.html +31 -18
  38. package/docs/classes/Util.FivePointSelector.html +14 -12
  39. package/docs/classes/Util.Interval.html +14 -12
  40. package/docs/classes/Util.Magnifier.html +19 -17
  41. package/docs/classes/Util.PointDomHelper.html +13 -11
  42. package/docs/classes/Util.PointHelper.html +13 -11
  43. package/docs/classes/Util.Rectangle.html +15 -13
  44. package/docs/enums/CameraMovementEffect.html +9 -7
  45. package/docs/enums/ContentType.html +21 -19
  46. package/docs/enums/DIRECTION.html +11 -9
  47. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +11 -9
  48. package/docs/enums/DimensionType.html +9 -7
  49. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +10 -8
  50. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +11 -9
  51. package/docs/enums/PaintBrushTypeEnum.html +10 -8
  52. package/docs/enums/Rotation.html +10 -8
  53. package/docs/functions/CSS3DRenderPlugin.html +6 -4
  54. package/docs/functions/CameraMovementPlugin.html +6 -4
  55. package/docs/functions/CruisePlugin.html +6 -4
  56. package/docs/functions/GuideLinePlugin.html +7 -5
  57. package/docs/functions/ItemLabelPlugin.html +6 -4
  58. package/docs/functions/MapviewFloorplanPlugin.html +6 -4
  59. package/docs/functions/ModelChassisCompassPlugin.html +6 -4
  60. package/docs/functions/ModelEntryDoorGuidePlugin.html +6 -4
  61. package/docs/functions/ModelFloorplanPlugin.html +6 -4
  62. package/docs/functions/ModelItemLabelPlugin.html +6 -4
  63. package/docs/functions/ModelRoomLabelPlugin.html +6 -4
  64. package/docs/functions/ModelTVVideoPlugin.html +6 -4
  65. package/docs/functions/ModelViewPlugin.html +6 -4
  66. package/docs/functions/Object3DHelperPlugin.html +6 -4
  67. package/docs/functions/PanoCompassPlugin.html +6 -4
  68. package/docs/functions/PanoCursorRaycasterPlugin.html +6 -4
  69. package/docs/functions/PanoDoorLabelPlugin.html +6 -4
  70. package/docs/functions/PanoFloorplanRadarPlugin.html +6 -4
  71. package/docs/functions/PanoMeasurePlugin.html +6 -4
  72. package/docs/functions/PanoRulerPlugin.html +6 -4
  73. package/docs/functions/PanoRulerProPlugin.html +6 -4
  74. package/docs/functions/PanoSpatialTagPlugin.html +6 -4
  75. package/docs/functions/PanoTagPlugin.html +6 -4
  76. package/docs/functions/PanoVideoPlugin.html +6 -4
  77. package/docs/functions/TopviewFloorplanPlugin.html +6 -4
  78. package/docs/functions/Util.getCoordsFromClient.html +7 -5
  79. package/docs/functions/Util.getCoordsFromElement.html +7 -5
  80. package/docs/functions/Util.getFrameTime.html +7 -5
  81. package/docs/functions/Util.getIntersectFromRelativePosition.html +7 -5
  82. package/docs/functions/Util.getRaycasterFromFivePointer.html +7 -5
  83. package/docs/functions/Util.isAbsoluteURL.html +7 -5
  84. package/docs/functions/Util.isModelLike.html +7 -5
  85. package/docs/functions/Util.isNil.html +7 -5
  86. package/docs/functions/Util.isPanoramaLike.html +7 -5
  87. package/docs/functions/Util.nextFrame.html +20 -7
  88. package/docs/functions/Util.notNil.html +7 -5
  89. package/docs/functions/Util.requestAnimationFrameInterval.html +7 -5
  90. package/docs/functions/Util.tweenProgress.html +9 -18
  91. package/docs/functions/Util.uuid.html +7 -5
  92. package/docs/functions/pluginFlag.html +7 -5
  93. package/docs/index.html +6 -4
  94. package/docs/interfaces/AddTagConfig.html +8 -6
  95. package/docs/interfaces/CSS3DRenderPluginEventMap.html +13 -11
  96. package/docs/interfaces/CSS3DRenderPluginState.html +10 -8
  97. package/docs/interfaces/CameraMovementPluginExportType.html +9 -7
  98. package/docs/interfaces/CruisePluginTypes.Config.html +107 -0
  99. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +112 -0
  100. package/docs/interfaces/CruisePluginTypes.EventMap.html +429 -0
  101. package/docs/interfaces/CruisePluginTypes.MoveAction.html +129 -0
  102. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +151 -0
  103. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +153 -0
  104. package/docs/interfaces/CruisePluginTypes.PluginData.html +102 -0
  105. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +83 -0
  106. package/docs/interfaces/CruisePluginTypes.PluginState.html +148 -0
  107. package/docs/interfaces/EventMap.html +17 -15
  108. package/docs/interfaces/FloorplanBounding.html +10 -8
  109. package/docs/interfaces/FloorplanData.html +12 -10
  110. package/docs/interfaces/FloorplanEntrance.html +13 -11
  111. package/docs/interfaces/FloorplanExtraObject.html +12 -10
  112. package/docs/interfaces/FloorplanExtraObject3D.html +10 -8
  113. package/docs/interfaces/FloorplanFloorData.html +11 -9
  114. package/docs/interfaces/FloorplanImagePosition.html +9 -7
  115. package/docs/interfaces/FloorplanObserver.html +11 -9
  116. package/docs/interfaces/FloorplanOutlineItem.html +11 -9
  117. package/docs/interfaces/FloorplanPosition.html +9 -7
  118. package/docs/interfaces/FloorplanRoomItem.html +15 -13
  119. package/docs/interfaces/FloorplanRoomLabelItem.html +9 -7
  120. package/docs/interfaces/FloorplanServerBounding.html +10 -8
  121. package/docs/interfaces/FloorplanServerComputedData.html +12 -10
  122. package/docs/interfaces/FloorplanServerData.html +9 -7
  123. package/docs/interfaces/FloorplanServerDoorItem.html +12 -10
  124. package/docs/interfaces/FloorplanServerDoorPosition.html +10 -8
  125. package/docs/interfaces/FloorplanServerEntrance.html +13 -11
  126. package/docs/interfaces/FloorplanServerFloorData.html +11 -9
  127. package/docs/interfaces/FloorplanServerImagePosition.html +9 -7
  128. package/docs/interfaces/FloorplanServerObserver.html +11 -9
  129. package/docs/interfaces/FloorplanServerOutlineItem.html +11 -9
  130. package/docs/interfaces/FloorplanServerPosition.html +9 -7
  131. package/docs/interfaces/FloorplanServerRoomItem.html +16 -14
  132. package/docs/interfaces/FloorplanServerRoomLabelItem.html +9 -7
  133. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +102 -0
  134. package/docs/interfaces/GuideLinePluginType.EventMap.html +259 -0
  135. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +93 -0
  136. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +88 -0
  137. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +127 -0
  138. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +86 -0
  139. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +179 -0
  140. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTag.html +209 -0
  141. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +293 -0
  142. package/docs/interfaces/GuideLinePluginType.PluginDataV1.html +77 -0
  143. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +72 -0
  144. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +83 -0
  145. package/docs/interfaces/GuideLinePluginType.PluginState.html +93 -0
  146. package/docs/interfaces/GuideLinePluginType.Route.html +104 -0
  147. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +93 -0
  148. package/docs/interfaces/HelperOffset.html +10 -8
  149. package/docs/interfaces/ImagePlaneGroup.html +8 -6
  150. package/docs/interfaces/ItemLabelPluginData.html +8 -6
  151. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +13 -11
  152. package/docs/interfaces/ItemLabelPluginParametersType.html +11 -9
  153. package/docs/interfaces/MinMax.html +9 -7
  154. package/docs/interfaces/ModelChassisCompassPluginData.html +9 -7
  155. package/docs/interfaces/ModelChassisCompassPluginExportType.html +10 -8
  156. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +9 -7
  157. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +10 -8
  158. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +10 -8
  159. package/docs/interfaces/ModelItemLabelPluginData.html +8 -6
  160. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +13 -11
  161. package/docs/interfaces/ModelItemLabelPluginParametersType.html +9 -7
  162. package/docs/interfaces/ModelRoomLabelPluginData.html +8 -6
  163. package/docs/interfaces/ModelTVVideoPluginData.html +11 -9
  164. package/docs/interfaces/ModelTVVideoPluginExportType.html +10 -8
  165. package/docs/interfaces/ModelTVVideoPluginParameterType.html +8 -6
  166. package/docs/interfaces/ModelViewPluginExportType.html +13 -11
  167. package/docs/interfaces/Object3DHelperState.html +10 -8
  168. package/docs/interfaces/ObjectHelperControllers.html +11 -9
  169. package/docs/interfaces/PaintBrushAction.html +14 -12
  170. package/docs/interfaces/PaintBrushConfigs.html +14 -12
  171. package/docs/interfaces/PaintBrushState.html +12 -10
  172. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +12 -10
  173. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +7 -5
  174. package/docs/interfaces/PanoMeasureParameterType.html +16 -14
  175. package/docs/interfaces/PanoMeasurePluginLineJson.html +10 -8
  176. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +9 -7
  177. package/docs/interfaces/PanoMeasurePluginPointJson.html +9 -7
  178. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +10 -8
  179. package/docs/interfaces/PanoRulerPluginExportType.html +12 -10
  180. package/docs/interfaces/PanoRulerPluginOptions.html +9 -7
  181. package/docs/interfaces/PanoRulerPluginParameterType.html +10 -8
  182. package/docs/interfaces/PanoRulerProPluginExportType.html +11 -9
  183. package/docs/interfaces/PanoRulerProPluginOptions.html +9 -7
  184. package/docs/interfaces/PanoRulerProPluginParameterType.html +9 -7
  185. package/docs/interfaces/PanoRulerProPluginState.html +10 -8
  186. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +7 -5
  187. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +7 -5
  188. package/docs/interfaces/PanoSpatialTagPluginData.html +13 -11
  189. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +12 -10
  190. package/docs/interfaces/PanoSpatialTagPluginExportType.html +15 -13
  191. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +12 -10
  192. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +15 -13
  193. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +13 -11
  194. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +12 -10
  195. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +8 -6
  196. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +10 -8
  197. package/docs/interfaces/PanoVideoPluginType.PluginData.html +8 -6
  198. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +17 -15
  199. package/docs/interfaces/PanoVideoPluginType.PluginState.html +8 -6
  200. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +10 -8
  201. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +12 -10
  202. package/docs/interfaces/Point.html +10 -8
  203. package/docs/interfaces/Room.html +11 -9
  204. package/docs/interfaces/RoomInfo.html +9 -7
  205. package/docs/interfaces/RoomLabel.html +16 -14
  206. package/docs/interfaces/RoomRules.html +7 -5
  207. package/docs/interfaces/Rooms.html +7 -5
  208. package/docs/interfaces/Scissor.html +11 -9
  209. package/docs/interfaces/State.html +10 -8
  210. package/docs/interfaces/TagCacheInterface.html +14 -12
  211. package/docs/interfaces/TagConfig.html +13 -11
  212. package/docs/interfaces/TagGLTFObjectGroup.html +8 -6
  213. package/docs/interfaces/TagIconUrl.html +28 -17
  214. package/docs/interfaces/TagObjectGroup.html +8 -6
  215. package/docs/interfaces/TagStyle.html +8 -6
  216. package/docs/interfaces/Tags.html +11 -9
  217. package/docs/interfaces/TemporaryState.html +8 -6
  218. package/docs/interfaces/Util.MagnifierParameter.html +13 -11
  219. package/docs/interfaces/Util.MouseGroupParameter.html +10 -8
  220. package/docs/modules/CruisePluginTypes.html +88 -0
  221. package/docs/modules/GuideLineItem.html +7 -5
  222. package/docs/modules/GuideLineModeItem.html +7 -5
  223. package/docs/modules/GuideLinePluginType.html +108 -0
  224. package/docs/modules/PanoVideoPluginType.html +7 -5
  225. package/docs/modules/Util.html +7 -5
  226. package/docs/modules.html +9 -5
  227. package/docs/types/ArrayPosition.html +7 -5
  228. package/docs/types/AudioAppearance.html +7 -5
  229. package/docs/types/AudioTagTypeConfigKey.html +7 -5
  230. package/docs/types/CSS3DRenderExportType.html +7 -5
  231. package/docs/types/CSS3DRenderPluginExportType.html +7 -5
  232. package/docs/types/CSS3DRenderPluginParameterType.html +7 -5
  233. package/docs/types/ClassFunctionParameters.html +7 -5
  234. package/docs/types/Color.html +7 -5
  235. package/docs/types/ContentTypeConfigKey.html +7 -5
  236. package/docs/types/ContentTypeConfigKeySplit.html +7 -5
  237. package/docs/types/ContentTypeMap.html +7 -5
  238. package/docs/types/Create3DDomContainerReturnType.html +7 -5
  239. package/docs/types/Create3DElementReturnType.html +7 -5
  240. package/docs/types/CruisePluginExportType.html +7 -5
  241. package/docs/types/CruisePluginTypes.CruiseData.html +60 -0
  242. package/docs/types/CruisePluginTypes.MoveEffect.html +60 -0
  243. package/docs/types/Direction-1.html +7 -5
  244. package/docs/types/Direction4.html +7 -5
  245. package/docs/types/FloorplanRuleLabels.html +7 -5
  246. package/docs/types/FloorplanServerRuleLabels.html +7 -5
  247. package/docs/types/GuideLinePluginExportType.html +7 -5
  248. package/docs/types/GuideLinePluginType.GuideLineItem.html +72 -0
  249. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +105 -0
  250. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +70 -0
  251. package/docs/types/GuideLinePluginType.GuideLineStyle.html +72 -0
  252. package/docs/types/GuideLinePluginType.PathItem.html +72 -0
  253. package/docs/types/GuideLinePluginType.PluginData.html +70 -0
  254. package/docs/types/HelperEventMap.html +7 -5
  255. package/docs/types/LoadTagConfig.html +7 -5
  256. package/docs/types/MapviewFloorplanPluginParameterType.html +7 -5
  257. package/docs/types/MapviewFloorplanPluginReturnType.html +7 -5
  258. package/docs/types/MediaData.html +7 -5
  259. package/docs/types/MediaStore.html +7 -5
  260. package/docs/types/ModelElement.html +7 -5
  261. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +7 -5
  262. package/docs/types/ModelFloorplanPluginParameterType.html +7 -5
  263. package/docs/types/ModelFloorplanPluginReturnType.html +7 -5
  264. package/docs/types/ModelRoomLabelPluginParameters.html +7 -5
  265. package/docs/types/ModelRoomLabelPluginReturnType.html +7 -5
  266. package/docs/types/MoveArgs.html +7 -5
  267. package/docs/types/MoveOpts.html +7 -5
  268. package/docs/types/Object3DHelperEventMap.html +7 -5
  269. package/docs/types/ObjectFit.html +7 -5
  270. package/docs/types/PaintBrushEventMap.html +7 -5
  271. package/docs/types/PanoCompassPluginData.html +7 -5
  272. package/docs/types/PanoCompassPluginExportType.html +7 -5
  273. package/docs/types/PanoCompassPluginParameterType.html +7 -5
  274. package/docs/types/PanoFloorplanRadarPluginParameterType.html +7 -5
  275. package/docs/types/PanoFloorplanRadarPluginReturnType.html +7 -5
  276. package/docs/types/PanoIndex.html +7 -5
  277. package/docs/types/PanoMeasurePluginEvent.html +7 -5
  278. package/docs/types/PanoMeasureReturnType.html +7 -5
  279. package/docs/types/PanoSpatialTagPluginId.html +7 -5
  280. package/docs/types/PanoTagPluginExportInterface.html +7 -5
  281. package/docs/types/PanoTagPluginParamsInterface.html +7 -5
  282. package/docs/types/PanoVideoPluginParameterType.html +7 -5
  283. package/docs/types/PanoVideoPluginReturnType.html +7 -5
  284. package/docs/types/PlaneTag.html +7 -5
  285. package/docs/types/PlaneTagElement.html +7 -5
  286. package/docs/types/Point2DElement.html +7 -5
  287. package/docs/types/Point2DTag.html +7 -5
  288. package/docs/types/Point3DElement.html +7 -5
  289. package/docs/types/Point3DTag.html +7 -5
  290. package/docs/types/PointTag.html +7 -5
  291. package/docs/types/PointTagElement.html +7 -5
  292. package/docs/types/Position.html +7 -5
  293. package/docs/types/RotateArgs.html +7 -5
  294. package/docs/types/RotateOpts.html +7 -5
  295. package/docs/types/RuleLabelsKey.html +7 -5
  296. package/docs/types/RuleLabelsValue.html +7 -5
  297. package/docs/types/StickType.html +7 -5
  298. package/docs/types/Tag.html +7 -5
  299. package/docs/types/Tag2D.html +7 -5
  300. package/docs/types/Tag3D.html +7 -5
  301. package/docs/types/TagContentType.html +7 -5
  302. package/docs/types/TagDimensionType.html +7 -5
  303. package/docs/types/TagElement.html +7 -5
  304. package/docs/types/TagEvents.html +7 -5
  305. package/docs/types/TagGLTFObject.html +7 -5
  306. package/docs/types/TagHooks.html +7 -5
  307. package/docs/types/TagIconSize.html +7 -5
  308. package/docs/types/TagId.html +7 -5
  309. package/docs/types/TopviewFloorplanPluginParameterType.html +7 -5
  310. package/docs/types/TopviewFloorplanPluginReturnType.html +7 -5
  311. package/docs/types/WorkCode.html +7 -5
  312. package/docs/variables/FLOOR_TYPE_MAP.html +7 -5
  313. package/docs/variables/PLUGIN.html +7 -5
  314. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +7 -5
  315. package/docs/variables/ROOM_TYPE_MAP.html +7 -5
  316. package/docs/variables/itemLabelPluginServerParams.html +7 -5
  317. package/docs/variables/modelItemLabelPluginServerParams.html +7 -5
  318. package/docs/variables/modelRoomLabelPluginServerParams.html +7 -5
  319. package/libs/CSS3DRenderPlugin/Controller.js +47 -13
  320. package/libs/CSS3DRenderPlugin/index.js +6 -8
  321. package/libs/CSS3DRenderPlugin/utils/even.js +1 -1
  322. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +3 -0
  323. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +37 -2
  324. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.js +1 -1
  325. package/libs/CameraMovementPlugin/CameraMovementPlugin.js +22 -18
  326. package/libs/CameraMovementPlugin/index.js +7 -9
  327. package/libs/CruisePlugin/Controller.js +350 -135
  328. package/libs/CruisePlugin/index.d.ts +2 -0
  329. package/libs/CruisePlugin/index.js +123 -11
  330. package/libs/CruisePlugin/typing/index.js +6 -0
  331. package/libs/CruisePlugin/typing.d.ts +35 -40
  332. package/libs/CruisePlugin/utils/coordinatesToVector.js +3 -0
  333. package/libs/GuideLinePlugin/Components/Tag.js +50 -0
  334. package/libs/GuideLinePlugin/Controller.d.ts +6 -3
  335. package/libs/GuideLinePlugin/Controller.js +237 -103
  336. package/libs/GuideLinePlugin/GuideLineItem/index.js +109 -22
  337. package/libs/GuideLinePlugin/GuideLineItem.d.ts +6 -0
  338. package/libs/GuideLinePlugin/GuideLineItem.js +134 -7
  339. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +192 -69
  340. package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +45 -4
  341. package/libs/GuideLinePlugin/GuideLineModeItem.js +116 -4
  342. package/libs/GuideLinePlugin/index.d.ts +2 -1
  343. package/libs/GuideLinePlugin/index.js +133 -13
  344. package/libs/GuideLinePlugin/typing.d.ts +36 -5
  345. package/libs/GuideLinePlugin/typing.js +32 -1
  346. package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +5 -1
  347. package/libs/GuideLinePlugin/utils/createLineGeometry.js +40 -26
  348. package/libs/GuideLinePlugin/utils/getPoint.js +4 -0
  349. package/libs/GuideLinePlugin/utils/index.d.ts +6 -0
  350. package/libs/GuideLinePlugin/utils/index.js +30 -10
  351. package/libs/ItemLabelPlugin/ItemLabelComponent.js +83 -34
  352. package/libs/ItemLabelPlugin/ItemLabelItem.js +91 -14
  353. package/libs/ItemLabelPlugin/Plugin.js +2 -2
  354. package/libs/ItemLabelPlugin/index.js +8 -9
  355. package/libs/ModelChassisCompassPlugin/Plugin.js +25 -25
  356. package/libs/ModelChassisCompassPlugin/index.js +3 -4
  357. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +14 -14
  358. package/libs/ModelEntryDoorGuidePlugin/index.js +3 -4
  359. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +46 -10
  360. package/libs/ModelItemLabelPlugin/ItemLabelItem.js +60 -7
  361. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +3 -3
  362. package/libs/ModelItemLabelPlugin/index.js +6 -7
  363. package/libs/ModelRoomLabelPlugin/Controller.js +18 -1
  364. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +58 -4
  365. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +50 -20
  366. package/libs/ModelTVVideoPlugin/Plugin.js +6 -8
  367. package/libs/ModelTVVideoPlugin/index.js +6 -9
  368. package/libs/ModelViewPlugin/Plugin.js +3 -3
  369. package/libs/ModelViewPlugin/index.js +3 -4
  370. package/libs/Object3DHelperPlugin/Controller.js +62 -42
  371. package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +2 -1
  372. package/libs/Object3DHelperPlugin/index.js +7 -9
  373. package/libs/PanoCompassPlugin/Controller.js +54 -4
  374. package/libs/PanoCompassPlugin/getRoomInfoInstance.js +1 -1
  375. package/libs/PanoCompassPlugin/index.js +3 -3
  376. package/libs/PanoDoorLabelPlugin/BaseController.js +37 -12
  377. package/libs/PanoDoorLabelPlugin/Controller.js +9 -6
  378. package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +39 -13
  379. package/libs/PanoDoorLabelPlugin/index.js +5 -7
  380. package/libs/PanoMeasurePlugin/Controller/EditController.js +22 -4
  381. package/libs/PanoMeasurePlugin/Controller/MixedController.js +9 -5
  382. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +2 -2
  383. package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -3
  384. package/libs/PanoMeasurePlugin/Controller/WatchController.js +5 -5
  385. package/libs/PanoMeasurePlugin/Controller/index.js +42 -12
  386. package/libs/PanoMeasurePlugin/Model/index.js +4 -4
  387. package/libs/PanoMeasurePlugin/Model/line.js +8 -8
  388. package/libs/PanoMeasurePlugin/Model/polyline.js +25 -24
  389. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +2 -2
  390. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +2 -1
  391. package/libs/PanoMeasurePlugin/Modules/GuideController.js +21 -20
  392. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +14 -10
  393. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +6 -4
  394. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +1 -1
  395. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +1 -1
  396. package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +3 -3
  397. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +15 -12
  398. package/libs/PanoMeasurePlugin/index.js +14 -15
  399. package/libs/PanoMeasurePlugin/typings/index.js +1 -3
  400. package/libs/PanoRulerPlugin/Plugin.js +54 -54
  401. package/libs/PanoRulerPlugin/index.js +3 -4
  402. package/libs/PanoRulerProPlugin/Controller.js +14 -15
  403. package/libs/PanoRulerProPlugin/RulerItem.js +134 -45
  404. package/libs/PanoRulerProPlugin/RulerItems.js +49 -40
  405. package/libs/PanoRulerProPlugin/index.js +4 -5
  406. package/libs/PanoSpatialTagPlugin/Components/origins.js +47 -8
  407. package/libs/PanoSpatialTagPlugin/Components/tag.js +79 -3
  408. package/libs/PanoSpatialTagPlugin/Plugin.js +5 -7
  409. package/libs/PanoSpatialTagPlugin/index.js +4 -7
  410. package/libs/PanoTagPlugin/Components/Common/Arrow.js +45 -20
  411. package/libs/PanoTagPlugin/Components/Common/Audio.js +46 -8
  412. package/libs/PanoTagPlugin/Components/Common/Icon/Icon.js +218 -54
  413. package/libs/PanoTagPlugin/Components/Common/Icon/audioIcon.js +64 -11
  414. package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +50 -27
  415. package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +151 -26
  416. package/libs/PanoTagPlugin/Components/Common/Media.js +222 -89
  417. package/libs/PanoTagPlugin/Components/Common/MediaItem.js +171 -22
  418. package/libs/PanoTagPlugin/Components/Common/Shadow.js +100 -28
  419. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +90 -11
  420. package/libs/PanoTagPlugin/Components/Common/Text/FlyMText.js +66 -13
  421. package/libs/PanoTagPlugin/Components/Common/Text/FlyText.js +69 -27
  422. package/libs/PanoTagPlugin/Components/Common/Text/MText.js +87 -13
  423. package/libs/PanoTagPlugin/Components/Common/TextItem.js +29 -6
  424. package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioPlaneTag.js +99 -14
  425. package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioTag.js +169 -44
  426. package/libs/PanoTagPlugin/Components/Tag/AudioTag/index.js +31 -6
  427. package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +11 -4
  428. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +90 -35
  429. package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +33 -7
  430. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +174 -35
  431. package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +76 -24
  432. package/libs/PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.js +87 -14
  433. package/libs/PanoTagPlugin/Components/Tag/TextTag/TextTag.js +84 -17
  434. package/libs/PanoTagPlugin/Components/Tag/TextTag/index.js +23 -6
  435. package/libs/PanoTagPlugin/Components/Tag/index.js +265 -41
  436. package/libs/PanoTagPlugin/Components/TagContainer.js +111 -58
  437. package/libs/PanoTagPlugin/Components/TagItem.js +247 -71
  438. package/libs/PanoTagPlugin/controller/TagCache.js +21 -19
  439. package/libs/PanoTagPlugin/controller/TagComputer.d.ts +1 -0
  440. package/libs/PanoTagPlugin/controller/TagComputer.js +45 -18
  441. package/libs/PanoTagPlugin/controller/TagRender.js +46 -15
  442. package/libs/PanoTagPlugin/controller/TagUtil.d.ts +5 -5
  443. package/libs/PanoTagPlugin/controller/TagUtil.js +25 -9
  444. package/libs/PanoTagPlugin/controller/index.js +95 -33
  445. package/libs/PanoTagPlugin/index.js +18 -19
  446. package/libs/PanoTagPlugin/tag.config.js +4 -0
  447. package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +3 -1
  448. package/libs/PanoTagPlugin/utils/addDebugPoints.js +4 -0
  449. package/libs/PanoTagPlugin/utils/audio/SharedAudio.js +7 -7
  450. package/libs/PanoTagPlugin/utils/normalPositionToPositions.js +4 -0
  451. package/libs/PanoTagPlugin/utils/tagPosition.js +1 -1
  452. package/libs/PanoVideoPlugin/Controller.js +53 -39
  453. package/libs/PanoVideoPlugin/VideoMeshController.js +89 -43
  454. package/libs/PanoVideoPlugin/index.js +6 -7
  455. package/libs/_commonjsHelpers.js +4 -0
  456. package/libs/base/BasePlugin.js +23 -15
  457. package/libs/base/BasePluginWithData.js +2 -2
  458. package/libs/components/PaintBrush/Controller.js +15 -4
  459. package/libs/components/PaintBrush/Subscribe.js +37 -0
  460. package/libs/components/PaintBrush/index.js +17 -4
  461. package/libs/components/PaintBrush/tween.js +2 -2
  462. package/libs/components/index.js +1 -1
  463. package/libs/floorplan/Components/BaseImage.js +24 -6
  464. package/libs/floorplan/Components/Camera.js +73 -27
  465. package/libs/floorplan/Components/Compass.js +20 -3
  466. package/libs/floorplan/Components/CurrentFloor.js +189 -50
  467. package/libs/floorplan/Components/Main.js +202 -54
  468. package/libs/floorplan/Components/Normalmage.js +5 -2
  469. package/libs/floorplan/Components/RoomHighlight/Room.js +38 -5
  470. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +105 -58
  471. package/libs/floorplan/Components/RoomLabels/RoomLabel.js +91 -18
  472. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +106 -37
  473. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +42 -13
  474. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +15 -3
  475. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +40 -3
  476. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +37 -3
  477. package/libs/floorplan/Components/RuleLabels/RuleItem.js +125 -51
  478. package/libs/floorplan/Components/RuleLabels/RuleLabels.js +80 -15
  479. package/libs/floorplan/Components/SvgImage.js +18 -6
  480. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +117 -75
  481. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -6
  482. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +96 -53
  483. package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -6
  484. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +43 -15
  485. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +83 -22
  486. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +61 -39
  487. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +128 -33
  488. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +39 -36
  489. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -6
  490. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +83 -63
  491. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -6
  492. package/libs/floorplan/index.js +1 -3
  493. package/libs/floorplan/typings/floorplanServerData.js +80 -80
  494. package/libs/index.js +138 -127
  495. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +29 -1
  496. package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +10 -1
  497. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +1 -1
  498. package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +5 -2
  499. package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js +9 -8
  500. package/libs/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js +1 -0
  501. package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +1 -1
  502. package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +4 -1
  503. package/libs/shared-utils/Object3DHelper/index.js +15 -0
  504. package/libs/shared-utils/Subscribe.js +38 -1
  505. package/libs/shared-utils/animationFrame/BetterTween.d.ts +3 -2
  506. package/libs/shared-utils/animationFrame/BetterTween.js +19 -12
  507. package/libs/shared-utils/animationFrame/index.d.ts +1 -1
  508. package/libs/shared-utils/animationFrame/index.js +14 -14
  509. package/libs/shared-utils/animationFrame/tween.d.ts +32 -23
  510. package/libs/shared-utils/animationFrame/tween.js +15 -15
  511. package/libs/shared-utils/audio.js +9 -9
  512. package/libs/shared-utils/changeModelCanvasOpacity.js +1 -1
  513. package/libs/shared-utils/createCanvasTextTexture.js +3 -3
  514. package/libs/shared-utils/five/changeMode.d.ts +2 -4
  515. package/libs/shared-utils/five/changeMode.js +37 -28
  516. package/libs/shared-utils/index.js +15 -15
  517. package/libs/shared-utils/log.js +2 -2
  518. package/libs/shared-utils/math/Interval.js +2 -0
  519. package/libs/shared-utils/math/Rectangle.js +2 -0
  520. package/libs/shared-utils/svelte/resizeObserver.d.ts +2 -10
  521. package/libs/shared-utils/svelte/resizeObserverGlobal.d.ts +10 -0
  522. package/libs/shared-utils/three/FivePointSelector.js +1 -1
  523. package/libs/shared-utils/three/Magnifier.js +10 -7
  524. package/libs/shared-utils/three/PointDomHelper.js +11 -10
  525. package/libs/shared-utils/three/index.js +1 -2
  526. package/libs/shared-utils/three/loadTexture.js +10 -10
  527. package/libs/shared-utils/threex/domevents/index.js +2 -2
  528. package/libs/vendor/@tweenjs/tween/dist/tween.esm.js.js +403 -0
  529. package/libs/vendor/classnames/index.js +47 -0
  530. package/libs/vendor/easy-reactive/main.js +3 -0
  531. package/libs/vendor/{simply-reactive → easy-reactive}/src/simply-reactive.js +8 -8
  532. package/libs/vendor/{simply-reactive → easy-reactive}/src/utils/object.js +1 -1
  533. package/libs/vendor/gl-vec2/add.js +7 -0
  534. package/libs/vendor/gl-vec2/dot.js +7 -0
  535. package/libs/vendor/gl-vec2/normalize.js +8 -0
  536. package/libs/vendor/gl-vec2/set.js +7 -0
  537. package/libs/vendor/gl-vec2/subtract.js +7 -0
  538. package/libs/vendor/lodash.clonedeep/index.js +457 -0
  539. package/libs/vendor/lodash.get/index.js +236 -0
  540. package/libs/vendor/lodash.isequal/index.js +489 -0
  541. package/libs/vendor/object-assign-deep/objectAssignDeep.js +62 -0
  542. package/libs/vendor/polyline-miter-util/index.js +18 -0
  543. package/libs/vendor/polyline-normals/index.js +28 -0
  544. package/libs/vendor/resize-observer-polyfill/dist/ResizeObserver.es.js +155 -134
  545. package/libs/vendor/svelte/easing/index.js +4 -5
  546. package/libs/vendor/svelte/index.js +1 -1
  547. package/libs/vendor/svelte/internal/index.js +412 -388
  548. package/libs/vendor/svelte/store/index.js +6 -6
  549. package/libs/vendor/svelte/transition/index.js +23 -20
  550. package/libs/vendor/svelte-carousel/src/components/Arrow/Arrow.js +41 -3
  551. package/libs/vendor/svelte-carousel/src/components/Carousel/Carousel.js +338 -71
  552. package/libs/vendor/svelte-carousel/src/components/Carousel/createCarousel.js +7 -1
  553. package/libs/vendor/svelte-carousel/src/components/Dot/Dot.js +19 -3
  554. package/libs/vendor/svelte-carousel/src/components/Dots/Dots.js +30 -7
  555. package/libs/vendor/svelte-carousel/src/components/Progress/Progress.js +15 -3
  556. package/libs/vendor/svelte-carousel/src/utils/clones.js +1 -0
  557. package/libs/vendor/svelte-carousel/src/utils/lazy.js +3 -0
  558. package/package.json +11 -13
  559. package/dist/GuideLinePlugin/utils/getArrowMaterial.d.ts +0 -4
  560. package/libs/vendor/simply-reactive/main.js +0 -3
  561. /package/libs/vendor/{simply-reactive → easy-reactive}/src/utils/subscription.js +0 -0
  562. /package/libs/vendor/{simply-reactive → easy-reactive}/src/utils/watcher.js +0 -0
@@ -1,102 +1,526 @@
1
- var M = Object.defineProperty;
2
- var U = (r, n, t) => n in r ? M(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
- var g = (r, n, t) => (U(r, typeof n != "symbol" ? n + "" : n, t), t);
4
- import { Tween as W, Easing as $ } from "@tweenjs/tween.js";
5
- function j() {
1
+ var A = Object.defineProperty;
2
+ var L = (t, e, i) => e in t ? A(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
3
+ var g = (t, e, i) => (L(t, typeof e != "symbol" ? e + "" : e, i), i);
4
+ function F() {
6
5
  }
7
- const L = () => Promise.resolve(), k = {
6
+ const N = () => Promise.resolve(), R = {
8
7
  __queue: Promise.resolve()
9
8
  };
10
- function q(r = L) {
11
- k.__queue = k.__queue.then(r).catch(L);
9
+ function z(t = N) {
10
+ R.__queue = R.__queue.then(t).catch(N);
12
11
  }
13
- function _(r, n, t) {
14
- const e = r.x, s = r.y, i = Math.floor(e / n * 1e4) / 1e4, c = Math.floor(s / t * 1e4) / 1e4;
15
- return { x: i, y: c };
12
+ function M(t, e, i) {
13
+ const n = t.x, s = t.y, r = Math.floor(n / e * 1e4) / 1e4, a = Math.floor(s / i * 1e4) / 1e4;
14
+ return { x: r, y: a };
16
15
  }
17
- function T(r, n, t) {
18
- const { x: e, y: s } = r, i = e * n, c = s * t;
19
- return { x: i, y: c };
16
+ function j(t, e, i) {
17
+ const { x: n, y: s } = t, r = n * e, a = s * i;
18
+ return { x: r, y: a };
20
19
  }
21
- function b(r) {
22
- if (r.length < 2)
20
+ function I(t) {
21
+ if (t.length < 2)
23
22
  return {};
24
- const n = r.slice(-2), t = n[0], e = {
25
- x: (n[0].x + n[1].x) / 2,
26
- y: (n[0].y + n[1].y) / 2
23
+ const e = t.slice(-2), i = e[0], n = {
24
+ x: (e[0].x + e[1].x) / 2,
25
+ y: (e[0].y + e[1].y) / 2
27
26
  };
28
- return { control: t, end: e };
27
+ return { control: i, end: n };
29
28
  }
30
- function O(r, n, t = j) {
31
- new Promise((e) => {
29
+ function q(t, e, i = F) {
30
+ new Promise((n) => {
32
31
  setTimeout(() => {
33
- t(), e(!0);
34
- }, n * r);
32
+ i(), n(!0);
33
+ }, e * t);
35
34
  });
36
35
  }
37
- const I = window, H = window.requestAnimationFrame || I.webkitRequestAnimationFrame || ((r) => setTimeout(r, 16));
38
- function E(r, n = 0) {
39
- n <= 0 ? H(r) : H(() => E(r, n - 1));
36
+ const H = window, U = window.requestAnimationFrame || H.webkitRequestAnimationFrame || ((t) => setTimeout(t, 16));
37
+ function k(t, e = 0) {
38
+ e <= 0 ? U(t) : U(() => k(t, e - 1));
40
39
  }
41
- function A(r, n, t, e = $.Linear.None) {
42
- const s = new W(r).to(n, t).easing(e).start();
43
- function i(c) {
44
- !s.update(c) || requestAnimationFrame(i);
40
+ var S = Object.freeze({
41
+ Linear: Object.freeze({
42
+ None: function(t) {
43
+ return t;
44
+ },
45
+ In: function(t) {
46
+ return this.None(t);
47
+ },
48
+ Out: function(t) {
49
+ return this.None(t);
50
+ },
51
+ InOut: function(t) {
52
+ return this.None(t);
53
+ }
54
+ }),
55
+ Quadratic: Object.freeze({
56
+ In: function(t) {
57
+ return t * t;
58
+ },
59
+ Out: function(t) {
60
+ return t * (2 - t);
61
+ },
62
+ InOut: function(t) {
63
+ return (t *= 2) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1);
64
+ }
65
+ }),
66
+ Cubic: Object.freeze({
67
+ In: function(t) {
68
+ return t * t * t;
69
+ },
70
+ Out: function(t) {
71
+ return --t * t * t + 1;
72
+ },
73
+ InOut: function(t) {
74
+ return (t *= 2) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2);
75
+ }
76
+ }),
77
+ Quartic: Object.freeze({
78
+ In: function(t) {
79
+ return t * t * t * t;
80
+ },
81
+ Out: function(t) {
82
+ return 1 - --t * t * t * t;
83
+ },
84
+ InOut: function(t) {
85
+ return (t *= 2) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2);
86
+ }
87
+ }),
88
+ Quintic: Object.freeze({
89
+ In: function(t) {
90
+ return t * t * t * t * t;
91
+ },
92
+ Out: function(t) {
93
+ return --t * t * t * t * t + 1;
94
+ },
95
+ InOut: function(t) {
96
+ return (t *= 2) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2);
97
+ }
98
+ }),
99
+ Sinusoidal: Object.freeze({
100
+ In: function(t) {
101
+ return 1 - Math.sin((1 - t) * Math.PI / 2);
102
+ },
103
+ Out: function(t) {
104
+ return Math.sin(t * Math.PI / 2);
105
+ },
106
+ InOut: function(t) {
107
+ return 0.5 * (1 - Math.sin(Math.PI * (0.5 - t)));
108
+ }
109
+ }),
110
+ Exponential: Object.freeze({
111
+ In: function(t) {
112
+ return t === 0 ? 0 : Math.pow(1024, t - 1);
113
+ },
114
+ Out: function(t) {
115
+ return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
116
+ },
117
+ InOut: function(t) {
118
+ return t === 0 ? 0 : t === 1 ? 1 : (t *= 2) < 1 ? 0.5 * Math.pow(1024, t - 1) : 0.5 * (-Math.pow(2, -10 * (t - 1)) + 2);
119
+ }
120
+ }),
121
+ Circular: Object.freeze({
122
+ In: function(t) {
123
+ return 1 - Math.sqrt(1 - t * t);
124
+ },
125
+ Out: function(t) {
126
+ return Math.sqrt(1 - --t * t);
127
+ },
128
+ InOut: function(t) {
129
+ return (t *= 2) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
130
+ }
131
+ }),
132
+ Elastic: Object.freeze({
133
+ In: function(t) {
134
+ return t === 0 ? 0 : t === 1 ? 1 : -Math.pow(2, 10 * (t - 1)) * Math.sin((t - 1.1) * 5 * Math.PI);
135
+ },
136
+ Out: function(t) {
137
+ return t === 0 ? 0 : t === 1 ? 1 : Math.pow(2, -10 * t) * Math.sin((t - 0.1) * 5 * Math.PI) + 1;
138
+ },
139
+ InOut: function(t) {
140
+ return t === 0 ? 0 : t === 1 ? 1 : (t *= 2, t < 1 ? -0.5 * Math.pow(2, 10 * (t - 1)) * Math.sin((t - 1.1) * 5 * Math.PI) : 0.5 * Math.pow(2, -10 * (t - 1)) * Math.sin((t - 1.1) * 5 * Math.PI) + 1);
141
+ }
142
+ }),
143
+ Back: Object.freeze({
144
+ In: function(t) {
145
+ var e = 1.70158;
146
+ return t === 1 ? 1 : t * t * ((e + 1) * t - e);
147
+ },
148
+ Out: function(t) {
149
+ var e = 1.70158;
150
+ return t === 0 ? 0 : --t * t * ((e + 1) * t + e) + 1;
151
+ },
152
+ InOut: function(t) {
153
+ var e = 2.5949095;
154
+ return (t *= 2) < 1 ? 0.5 * (t * t * ((e + 1) * t - e)) : 0.5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
155
+ }
156
+ }),
157
+ Bounce: Object.freeze({
158
+ In: function(t) {
159
+ return 1 - S.Bounce.Out(1 - t);
160
+ },
161
+ Out: function(t) {
162
+ return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375 : 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;
163
+ },
164
+ InOut: function(t) {
165
+ return t < 0.5 ? S.Bounce.In(t * 2) * 0.5 : S.Bounce.Out(t * 2 - 1) * 0.5 + 0.5;
166
+ }
167
+ }),
168
+ generatePow: function(t) {
169
+ return t === void 0 && (t = 4), t = t < Number.EPSILON ? Number.EPSILON : t, t = t > 1e4 ? 1e4 : t, {
170
+ In: function(e) {
171
+ return Math.pow(e, t);
172
+ },
173
+ Out: function(e) {
174
+ return 1 - Math.pow(1 - e, t);
175
+ },
176
+ InOut: function(e) {
177
+ return e < 0.5 ? Math.pow(e * 2, t) / 2 : (1 - Math.pow(2 - e * 2, t)) / 2 + 0.5;
178
+ }
179
+ };
45
180
  }
46
- return requestAnimationFrame(i), s;
181
+ }), T = function() {
182
+ return performance.now();
183
+ }, W = (
184
+ /** @class */
185
+ function() {
186
+ function t() {
187
+ this._tweens = {}, this._tweensAddedDuringUpdate = {};
188
+ }
189
+ return t.prototype.getAll = function() {
190
+ var e = this;
191
+ return Object.keys(this._tweens).map(function(i) {
192
+ return e._tweens[i];
193
+ });
194
+ }, t.prototype.removeAll = function() {
195
+ this._tweens = {};
196
+ }, t.prototype.add = function(e) {
197
+ this._tweens[e.getId()] = e, this._tweensAddedDuringUpdate[e.getId()] = e;
198
+ }, t.prototype.remove = function(e) {
199
+ delete this._tweens[e.getId()], delete this._tweensAddedDuringUpdate[e.getId()];
200
+ }, t.prototype.update = function(e, i) {
201
+ e === void 0 && (e = T()), i === void 0 && (i = !1);
202
+ var n = Object.keys(this._tweens);
203
+ if (n.length === 0)
204
+ return !1;
205
+ for (; n.length > 0; ) {
206
+ this._tweensAddedDuringUpdate = {};
207
+ for (var s = 0; s < n.length; s++) {
208
+ var r = this._tweens[n[s]], a = !i;
209
+ r && r.update(e, a) === !1 && !i && delete this._tweens[n[s]];
210
+ }
211
+ n = Object.keys(this._tweensAddedDuringUpdate);
212
+ }
213
+ return !0;
214
+ }, t;
215
+ }()
216
+ ), x = {
217
+ Linear: function(t, e) {
218
+ var i = t.length - 1, n = i * e, s = Math.floor(n), r = x.Utils.Linear;
219
+ return e < 0 ? r(t[0], t[1], n) : e > 1 ? r(t[i], t[i - 1], i - n) : r(t[s], t[s + 1 > i ? i : s + 1], n - s);
220
+ },
221
+ Bezier: function(t, e) {
222
+ for (var i = 0, n = t.length - 1, s = Math.pow, r = x.Utils.Bernstein, a = 0; a <= n; a++)
223
+ i += s(1 - e, n - a) * s(e, a) * t[a] * r(n, a);
224
+ return i;
225
+ },
226
+ CatmullRom: function(t, e) {
227
+ var i = t.length - 1, n = i * e, s = Math.floor(n), r = x.Utils.CatmullRom;
228
+ return t[0] === t[i] ? (e < 0 && (s = Math.floor(n = i * (1 + e))), r(t[(s - 1 + i) % i], t[s], t[(s + 1) % i], t[(s + 2) % i], n - s)) : e < 0 ? t[0] - (r(t[0], t[0], t[1], t[1], -n) - t[0]) : e > 1 ? t[i] - (r(t[i], t[i], t[i - 1], t[i - 1], n - i) - t[i]) : r(t[s ? s - 1 : 0], t[s], t[i < s + 1 ? i : s + 1], t[i < s + 2 ? i : s + 2], n - s);
229
+ },
230
+ Utils: {
231
+ Linear: function(t, e, i) {
232
+ return (e - t) * i + t;
233
+ },
234
+ Bernstein: function(t, e) {
235
+ var i = x.Utils.Factorial;
236
+ return i(t) / i(e) / i(t - e);
237
+ },
238
+ Factorial: function() {
239
+ var t = [1];
240
+ return function(e) {
241
+ var i = 1;
242
+ if (t[e])
243
+ return t[e];
244
+ for (var n = e; n > 1; n--)
245
+ i *= n;
246
+ return t[e] = i, i;
247
+ };
248
+ }(),
249
+ CatmullRom: function(t, e, i, n, s) {
250
+ var r = (i - t) * 0.5, a = (n - e) * 0.5, o = s * s, c = s * o;
251
+ return (2 * e - 2 * i + r + a) * c + (-3 * e + 3 * i - 2 * r - a) * o + r * s + e;
252
+ }
253
+ }
254
+ }, $ = (
255
+ /** @class */
256
+ function() {
257
+ function t() {
258
+ }
259
+ return t.nextId = function() {
260
+ return t._nextId++;
261
+ }, t._nextId = 0, t;
262
+ }()
263
+ ), m = new W(), X = (
264
+ /** @class */
265
+ function() {
266
+ function t(e, i) {
267
+ i === void 0 && (i = m), this._object = e, this._group = i, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = S.Linear.None, this._interpolationFunction = x.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = $.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1;
268
+ }
269
+ return t.prototype.getId = function() {
270
+ return this._id;
271
+ }, t.prototype.isPlaying = function() {
272
+ return this._isPlaying;
273
+ }, t.prototype.isPaused = function() {
274
+ return this._isPaused;
275
+ }, t.prototype.to = function(e, i) {
276
+ if (i === void 0 && (i = 1e3), this._isPlaying)
277
+ throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");
278
+ return this._valuesEnd = e, this._propertiesAreSetUp = !1, this._duration = i, this;
279
+ }, t.prototype.duration = function(e) {
280
+ return e === void 0 && (e = 1e3), this._duration = e, this;
281
+ }, t.prototype.dynamic = function(e) {
282
+ return e === void 0 && (e = !1), this._isDynamic = e, this;
283
+ }, t.prototype.start = function(e, i) {
284
+ if (e === void 0 && (e = T()), i === void 0 && (i = !1), this._isPlaying)
285
+ return this;
286
+ if (this._group && this._group.add(this), this._repeat = this._initialRepeat, this._reversed) {
287
+ this._reversed = !1;
288
+ for (var n in this._valuesStartRepeat)
289
+ this._swapEndStartRepeatValues(n), this._valuesStart[n] = this._valuesStartRepeat[n];
290
+ }
291
+ if (this._isPlaying = !0, this._isPaused = !1, this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._isChainStopped = !1, this._startTime = e, this._startTime += this._delayTime, !this._propertiesAreSetUp || i) {
292
+ if (this._propertiesAreSetUp = !0, !this._isDynamic) {
293
+ var s = {};
294
+ for (var r in this._valuesEnd)
295
+ s[r] = this._valuesEnd[r];
296
+ this._valuesEnd = s;
297
+ }
298
+ this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat, i);
299
+ }
300
+ return this;
301
+ }, t.prototype.startFromCurrentValues = function(e) {
302
+ return this.start(e, !0);
303
+ }, t.prototype._setupProperties = function(e, i, n, s, r) {
304
+ for (var a in n) {
305
+ var o = e[a], c = Array.isArray(o), d = c ? "array" : typeof o, _ = !c && Array.isArray(n[a]);
306
+ if (!(d === "undefined" || d === "function")) {
307
+ if (_) {
308
+ var u = n[a];
309
+ if (u.length === 0)
310
+ continue;
311
+ for (var l = [o], h = 0, p = u.length; h < p; h += 1) {
312
+ var f = this._handleRelativeValue(o, u[h]);
313
+ if (isNaN(f)) {
314
+ _ = !1, console.warn("Found invalid interpolation list. Skipping.");
315
+ break;
316
+ }
317
+ l.push(f);
318
+ }
319
+ _ && (n[a] = l);
320
+ }
321
+ if ((d === "object" || c) && o && !_) {
322
+ i[a] = c ? [] : {};
323
+ var v = o;
324
+ for (var b in v)
325
+ i[a][b] = v[b];
326
+ s[a] = c ? [] : {};
327
+ var u = n[a];
328
+ if (!this._isDynamic) {
329
+ var E = {};
330
+ for (var b in u)
331
+ E[b] = u[b];
332
+ n[a] = u = E;
333
+ }
334
+ this._setupProperties(v, i[a], u, s[a], r);
335
+ } else
336
+ (typeof i[a] == "undefined" || r) && (i[a] = o), c || (i[a] *= 1), _ ? s[a] = n[a].slice().reverse() : s[a] = i[a] || 0;
337
+ }
338
+ }
339
+ }, t.prototype.stop = function() {
340
+ return this._isChainStopped || (this._isChainStopped = !0, this.stopChainedTweens()), this._isPlaying ? (this._group && this._group.remove(this), this._isPlaying = !1, this._isPaused = !1, this._onStopCallback && this._onStopCallback(this._object), this) : this;
341
+ }, t.prototype.end = function() {
342
+ return this._goToEnd = !0, this.update(1 / 0), this;
343
+ }, t.prototype.pause = function(e) {
344
+ return e === void 0 && (e = T()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = e, this._group && this._group.remove(this), this);
345
+ }, t.prototype.resume = function(e) {
346
+ return e === void 0 && (e = T()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this._group && this._group.add(this), this);
347
+ }, t.prototype.stopChainedTweens = function() {
348
+ for (var e = 0, i = this._chainedTweens.length; e < i; e++)
349
+ this._chainedTweens[e].stop();
350
+ return this;
351
+ }, t.prototype.group = function(e) {
352
+ return e === void 0 && (e = m), this._group = e, this;
353
+ }, t.prototype.delay = function(e) {
354
+ return e === void 0 && (e = 0), this._delayTime = e, this;
355
+ }, t.prototype.repeat = function(e) {
356
+ return e === void 0 && (e = 0), this._initialRepeat = e, this._repeat = e, this;
357
+ }, t.prototype.repeatDelay = function(e) {
358
+ return this._repeatDelayTime = e, this;
359
+ }, t.prototype.yoyo = function(e) {
360
+ return e === void 0 && (e = !1), this._yoyo = e, this;
361
+ }, t.prototype.easing = function(e) {
362
+ return e === void 0 && (e = S.Linear.None), this._easingFunction = e, this;
363
+ }, t.prototype.interpolation = function(e) {
364
+ return e === void 0 && (e = x.Linear), this._interpolationFunction = e, this;
365
+ }, t.prototype.chain = function() {
366
+ for (var e = [], i = 0; i < arguments.length; i++)
367
+ e[i] = arguments[i];
368
+ return this._chainedTweens = e, this;
369
+ }, t.prototype.onStart = function(e) {
370
+ return this._onStartCallback = e, this;
371
+ }, t.prototype.onEveryStart = function(e) {
372
+ return this._onEveryStartCallback = e, this;
373
+ }, t.prototype.onUpdate = function(e) {
374
+ return this._onUpdateCallback = e, this;
375
+ }, t.prototype.onRepeat = function(e) {
376
+ return this._onRepeatCallback = e, this;
377
+ }, t.prototype.onComplete = function(e) {
378
+ return this._onCompleteCallback = e, this;
379
+ }, t.prototype.onStop = function(e) {
380
+ return this._onStopCallback = e, this;
381
+ }, t.prototype.update = function(e, i) {
382
+ if (e === void 0 && (e = T()), i === void 0 && (i = !0), this._isPaused)
383
+ return !0;
384
+ var n, s, r = this._startTime + this._duration;
385
+ if (!this._goToEnd && !this._isPlaying) {
386
+ if (e > r)
387
+ return !1;
388
+ i && this.start(e, !0);
389
+ }
390
+ if (this._goToEnd = !1, e < this._startTime)
391
+ return !0;
392
+ this._onStartCallbackFired === !1 && (this._onStartCallback && this._onStartCallback(this._object), this._onStartCallbackFired = !0), this._onEveryStartCallbackFired === !1 && (this._onEveryStartCallback && this._onEveryStartCallback(this._object), this._onEveryStartCallbackFired = !0), s = (e - this._startTime) / this._duration, s = this._duration === 0 || s > 1 ? 1 : s;
393
+ var a = this._easingFunction(s);
394
+ if (this._updateProperties(this._object, this._valuesStart, this._valuesEnd, a), this._onUpdateCallback && this._onUpdateCallback(this._object, s), s === 1)
395
+ if (this._repeat > 0) {
396
+ isFinite(this._repeat) && this._repeat--;
397
+ for (n in this._valuesStartRepeat)
398
+ !this._yoyo && typeof this._valuesEnd[n] == "string" && (this._valuesStartRepeat[n] = // eslint-disable-next-line
399
+ // @ts-ignore FIXME?
400
+ this._valuesStartRepeat[n] + parseFloat(this._valuesEnd[n])), this._yoyo && this._swapEndStartRepeatValues(n), this._valuesStart[n] = this._valuesStartRepeat[n];
401
+ return this._yoyo && (this._reversed = !this._reversed), this._repeatDelayTime !== void 0 ? this._startTime = e + this._repeatDelayTime : this._startTime = e + this._delayTime, this._onRepeatCallback && this._onRepeatCallback(this._object), this._onEveryStartCallbackFired = !1, !0;
402
+ } else {
403
+ this._onCompleteCallback && this._onCompleteCallback(this._object);
404
+ for (var o = 0, c = this._chainedTweens.length; o < c; o++)
405
+ this._chainedTweens[o].start(this._startTime + this._duration, !1);
406
+ return this._isPlaying = !1, !1;
407
+ }
408
+ return !0;
409
+ }, t.prototype._updateProperties = function(e, i, n, s) {
410
+ for (var r in n)
411
+ if (i[r] !== void 0) {
412
+ var a = i[r] || 0, o = n[r], c = Array.isArray(e[r]), d = Array.isArray(o), _ = !c && d;
413
+ _ ? e[r] = this._interpolationFunction(o, s) : typeof o == "object" && o ? this._updateProperties(e[r], a, o, s) : (o = this._handleRelativeValue(a, o), typeof o == "number" && (e[r] = a + (o - a) * s));
414
+ }
415
+ }, t.prototype._handleRelativeValue = function(e, i) {
416
+ return typeof i != "string" ? i : i.charAt(0) === "+" || i.charAt(0) === "-" ? e + parseFloat(i) : parseFloat(i);
417
+ }, t.prototype._swapEndStartRepeatValues = function(e) {
418
+ var i = this._valuesStartRepeat[e], n = this._valuesEnd[e];
419
+ typeof n == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(n) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = i;
420
+ }, t;
421
+ }()
422
+ ), y = m;
423
+ y.getAll.bind(y);
424
+ y.removeAll.bind(y);
425
+ y.add.bind(y);
426
+ y.remove.bind(y);
427
+ y.update.bind(y);
428
+ function Y(t, e, i, n = S.Linear.None) {
429
+ const s = new X(t).to(e, i).easing(n).start();
430
+ function r(a) {
431
+ s.update(a) && requestAnimationFrame(r);
432
+ }
433
+ return requestAnimationFrame(r), s;
47
434
  }
48
- var v = /* @__PURE__ */ ((r) => (r.Drawline = "Drawline", r.Undo = "Undo", r.Exit = "Exit", r))(v || {});
49
- const C = Symbol("$$PAINT_BRUSH_EVENT$$");
50
- function B(r) {
51
- return r[C] || (r[C] = {}), r[C];
435
+ var w = /* @__PURE__ */ ((t) => (t.Drawline = "Drawline", t.Undo = "Undo", t.Exit = "Exit", t))(w || {});
436
+ const O = Symbol("$$PAINT_BRUSH_EVENT$$");
437
+ function P(t) {
438
+ return t[O] || (t[O] = {}), t[O];
52
439
  }
53
- function F(r) {
54
- r[C] || delete r[C];
440
+ function Q(t) {
441
+ t[O] || delete t[O];
55
442
  }
56
- class P {
57
- hasListener(n) {
58
- const t = B(this);
59
- return t && t[n] && t[n].length > 0;
60
- }
61
- on(n, t, e) {
62
- const s = B(this);
63
- return s[n] || (s[n] = []), s[n].push([t, e || !1]), () => this.off(n, t);
64
- }
65
- once(n, t) {
66
- return this.on(n, t, !0);
67
- }
68
- off(n, t) {
69
- if (n === void 0) {
70
- F(this);
443
+ class G {
444
+ /**
445
+ * 判断是否注册了事件
446
+ * @param name 事件类型
447
+ */
448
+ hasListener(e) {
449
+ const i = P(this);
450
+ return i && i[e] && i[e].length > 0;
451
+ }
452
+ /**
453
+ * 注册事件
454
+ * @param name 事件类型
455
+ * @param callback 事件回调函数
456
+ * @param once 是否只执行一次
457
+ * @returns 解除事件
458
+ * @template K 预设的监听事件名称
459
+ * @template C 回调函数函数上下文
460
+ */
461
+ on(e, i, n) {
462
+ const s = P(this);
463
+ return s[e] || (s[e] = []), s[e].push([i, n || !1]), () => this.off(e, i);
464
+ }
465
+ /**
466
+ * 注册事件(是否只执行一次)
467
+ * @param name 事件类型
468
+ * @param callback 事件回调函数
469
+ * @returns 解除事件
470
+ * @template K 预设的监听事件名称
471
+ * @template C 回调函数函数上下文
472
+ */
473
+ once(e, i) {
474
+ return this.on(e, i, !0);
475
+ }
476
+ /**
477
+ * 解除事件
478
+ *
479
+ * 如果 name 不传的话解除对应所有事件
480
+ * 如果 name, callback 不传的话解除所有name的所有事件
481
+ * @param name 事件类型
482
+ * @param callback 事件回调函数
483
+ * @template K 预设的监听事件名称
484
+ */
485
+ off(e, i) {
486
+ if (e === void 0) {
487
+ Q(this);
71
488
  return;
72
489
  }
73
- const e = B(this);
74
- if (e[n] || (e[n] = []), t === void 0) {
75
- e[n].length = 0;
490
+ const n = P(this);
491
+ if (n[e] || (n[e] = []), i === void 0) {
492
+ n[e].length = 0;
76
493
  return;
77
494
  }
78
495
  let s = 0;
79
- for (; s < e[n].length && e[n][s][0] !== t; s++)
496
+ for (; s < n[e].length && n[e][s][0] !== i; s++)
80
497
  ;
81
- s < e[n].length && e[n].splice(s, 1);
82
- }
83
- emit(n, ...t) {
84
- let e = !1;
85
- const i = B(this)[n] || [];
86
- for (let c of i.slice()) {
87
- const [o, l = !1] = c, f = o(...t);
88
- l && this.off(n, o), f === !1 && (e = !0);
498
+ s < n[e].length && n[e].splice(s, 1);
499
+ }
500
+ /**
501
+ * 触发事件
502
+ * @param name 事件类型
503
+ * @param data 触发事件的数据
504
+ * @returns canceled 是否被触发取消
505
+ * @template K 预设的监听事件名称
506
+ */
507
+ emit(e, ...i) {
508
+ let n = !1;
509
+ const r = P(this)[e] || [];
510
+ for (let a of r.slice()) {
511
+ const [o, c = !1] = a, d = o(...i);
512
+ c && this.off(e, o), d === !1 && (n = !0);
89
513
  }
90
- return e;
514
+ return n;
91
515
  }
92
516
  }
93
- function m() {
517
+ function C() {
94
518
  return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
95
519
  }
96
- function R() {
97
- return (m() + m() + "-" + m() + "-4" + m().substr(0, 3) + "-" + m() + "-" + m() + m() + m()).toLowerCase();
520
+ function J() {
521
+ return (C() + C() + "-" + C() + "-4" + C().substr(0, 3) + "-" + C() + "-" + C() + C() + C()).toLowerCase();
98
522
  }
99
- const z = `
523
+ const Z = `
100
524
  <style type="text/css">
101
525
 
102
526
  #_gl_paintBrush {
@@ -197,21 +621,21 @@ transition: all 500ms;
197
621
 
198
622
  </style>
199
623
  `;
200
- class X extends P {
201
- constructor(t) {
624
+ class K extends G {
625
+ constructor(i) {
202
626
  super();
203
627
  g(this, "configs");
204
628
  g(this, "clientWidth");
205
629
  g(this, "clientHeight");
206
630
  g(this, "ready", !1);
207
- g(this, "uuid", R());
631
+ g(this, "uuid", J());
208
632
  g(this, "tween");
209
633
  g(this, "tweening", !1);
210
634
  g(this, "container");
211
635
  g(this, "canvas");
212
636
  g(this, "data", {});
213
637
  g(this, "tempLine", {});
214
- this.configs = t, this.clientWidth = document.body.clientWidth, this.clientHeight = document.body.clientHeight, this.container = this.ifInsertToDOM(), this.canvas = {}, this.initCtrl();
638
+ this.configs = i, this.clientWidth = document.body.clientWidth, this.clientHeight = document.body.clientHeight, this.container = this.ifInsertToDOM(), this.canvas = {}, this.initCtrl();
215
639
  }
216
640
  get color() {
217
641
  return this.configs.currentColor;
@@ -230,308 +654,332 @@ class X extends P {
230
654
  else if (document.getElementById("_gl_paintBrush"))
231
655
  this.container = document.getElementById("_gl_paintBrush");
232
656
  else {
233
- const t = document.createElement("div");
234
- t.id = "_gl_paintBrush", document.body.appendChild(t), this.container = t;
657
+ const i = document.createElement("div");
658
+ i.id = "_gl_paintBrush", document.body.appendChild(i), this.container = i;
235
659
  }
236
- return this.container.innerHTML = z, this.container;
237
- }
238
- initCanvas(t) {
239
- const e = document.createElement("canvas");
240
- e.className = t, e.width = this.clientWidth, e.height = this.clientHeight;
241
- const s = e.getContext("2d");
242
- if (!!s)
243
- return s.lineWidth = 5 * this.dpr, s.lineCap = "round", s.lineJoin = "round", this.container.appendChild(e), e;
244
- }
660
+ return this.container.innerHTML = Z, this.container;
661
+ }
662
+ /**
663
+ *
664
+ * @param className 初始化画板
665
+ * @returns
666
+ */
667
+ initCanvas(i) {
668
+ const n = document.createElement("canvas");
669
+ n.className = i, n.width = this.clientWidth, n.height = this.clientHeight;
670
+ const s = n.getContext("2d");
671
+ if (s)
672
+ return s.lineWidth = 5 * this.dpr, s.lineCap = "round", s.lineJoin = "round", this.container.appendChild(n), n;
673
+ }
674
+ /**
675
+ * 初始化操作面板
676
+ * @returns
677
+ */
245
678
  initCtrl() {
246
- const t = document.createElement("div");
247
- t.className = "_paintBrush-ctrl";
248
- const e = document.createElement("div");
249
- e.className = "_paintBrush-ctrlinner";
679
+ const i = document.createElement("div");
680
+ i.className = "_paintBrush-ctrl";
681
+ const n = document.createElement("div");
682
+ n.className = "_paintBrush-ctrlinner";
250
683
  const s = document.createElement("a");
251
684
  s.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--undo", s.addEventListener("click", (o) => {
252
- var h;
685
+ var l;
253
686
  if (o.stopPropagation(), this.configs.onClickUndo && this.configs.onClickUndo(), !this.canvas[this.uuid] || !this.data[this.uuid] || this.data[this.uuid].length === 0)
254
687
  return;
255
- const l = this.data[this.uuid].pop();
256
- l && this.emitStateChange({
257
- type: v.Undo,
688
+ const c = this.data[this.uuid].pop();
689
+ c && this.emitStateChange({
690
+ type: w.Undo,
258
691
  color: this.color,
259
692
  ready: this.ready,
260
- state: l,
693
+ state: c,
261
694
  uuid: this.uuid
262
695
  });
263
- const f = (h = this.canvas[this.uuid]) == null ? void 0 : h.getContext("2d");
696
+ const d = (l = this.canvas[this.uuid]) == null ? void 0 : l.getContext("2d");
264
697
  if (!this.canvas[this.uuid])
265
698
  return;
266
- const { width: x, height: u } = this.canvas[this.uuid];
267
- f && f.clearRect(0, 0, x, u), this.data[this.uuid].forEach((a) => this.handleDrawLine(this.uuid, a, { withUndo: !0 }));
699
+ const { width: _, height: u } = this.canvas[this.uuid];
700
+ d && d.clearRect(0, 0, _, u), this.data[this.uuid].forEach((h) => this.handleDrawLine(this.uuid, h, { withUndo: !0 }));
268
701
  });
269
- const i = document.createElement("a");
270
- return i.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--close", i.addEventListener("click", (o) => {
702
+ const r = document.createElement("a");
703
+ return r.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--close", r.addEventListener("click", (o) => {
271
704
  o.stopPropagation(), this.closeBrush(), this.configs.onClickClose && this.configs.onClickClose();
272
- }), [s, i].forEach((o) => {
273
- const l = document.createElement("i");
274
- l.className = "brush-icon";
275
- const f = document.createElement("span");
276
- f.className = "brush-txt", f.innerText = o.className.endsWith("undo") ? this.configs.onUndoText : this.configs.onExitText, o.appendChild(l), o.appendChild(f);
277
- }), e.appendChild(s), e.appendChild(i), t.appendChild(e), this.container.appendChild(t), t;
705
+ }), [s, r].forEach((o) => {
706
+ const c = document.createElement("i");
707
+ c.className = "brush-icon";
708
+ const d = document.createElement("span");
709
+ d.className = "brush-txt", d.innerText = o.className.endsWith("undo") ? this.configs.onUndoText : this.configs.onExitText, o.appendChild(c), o.appendChild(d);
710
+ }), n.appendChild(s), n.appendChild(r), i.appendChild(n), this.container.appendChild(i), i;
278
711
  }
279
712
  openBrush() {
280
713
  if (this.ready)
281
714
  return;
282
715
  this.canvas[this.uuid] || (this.canvas[this.uuid] = this.initCanvas("_paintBrush-canvas")), this.container.className = "brushing";
283
- const t = this.canvas[this.uuid];
284
- t.getContext("2d").clearRect(0, 0, t.width, t.height), this.openBrushHandle(), this.ready = !0, this.emit("readyChange", !0);
716
+ const i = this.canvas[this.uuid];
717
+ i.getContext("2d").clearRect(0, 0, i.width, i.height), this.openBrushHandle(), this.ready = !0, this.emit("readyChange", !0);
285
718
  }
286
719
  closeBrush() {
287
- !this.ready || (this.container.className = "", this.data = {}, this.tempLine = {}, Object.keys(this.canvas).forEach((t) => {
288
- this.canvas[t].ontouchstart = () => !1, this.canvas[t].ontouchmove = () => !1, this.canvas[t].ontouchend = () => !1, this.canvas[t].ontouchcancel = () => !1;
289
- const e = this.canvas[t].getContext("2d");
290
- e && e.clearRect(0, 0, this.canvas[t].width, this.canvas[t].height);
720
+ this.ready && (this.container.className = "", this.data = {}, this.tempLine = {}, Object.keys(this.canvas).forEach((i) => {
721
+ this.canvas[i].ontouchstart = () => !1, this.canvas[i].ontouchmove = () => !1, this.canvas[i].ontouchend = () => !1, this.canvas[i].ontouchcancel = () => !1;
722
+ const n = this.canvas[i].getContext("2d");
723
+ n && n.clearRect(0, 0, this.canvas[i].width, this.canvas[i].height);
291
724
  }), this.ready = !1, this.emit("readyChange", !1), this.emitStateChange({
292
- type: v.Exit,
725
+ type: w.Exit,
293
726
  color: this.color,
294
727
  ready: !1,
295
728
  uuid: this.uuid
296
729
  }));
297
730
  }
298
- updateCurrentColor(t) {
299
- const e = this.canvas[this.uuid];
300
- if (!e)
731
+ updateCurrentColor(i) {
732
+ const n = this.canvas[this.uuid];
733
+ if (!n)
301
734
  return;
302
- const s = e.getContext("2d");
303
- !s || (this.configs.currentColor = t, s.strokeStyle = t);
735
+ const s = n.getContext("2d");
736
+ s && (this.configs.currentColor = i, s.strokeStyle = i);
304
737
  }
305
738
  openBrushHandle() {
306
- const t = this.canvas[this.uuid];
307
- if (!t)
739
+ const i = this.canvas[this.uuid];
740
+ if (!i)
308
741
  return;
309
- const e = t.getContext("2d");
310
- if (!e)
742
+ const n = i.getContext("2d");
743
+ if (!n)
311
744
  return;
312
745
  const s = this.color || "#6D92FF";
313
- e.strokeStyle = s;
314
- let i = null, c = [], o, l = [], f = 0;
315
- const x = (u, h, a) => {
746
+ n.strokeStyle = s;
747
+ let r = null, a = [], o, c = [], d = 0;
748
+ const _ = (u, l, h) => {
316
749
  const p = this.color || "#ff0000";
317
- e.strokeStyle = p, e.beginPath(), e.moveTo(u.x, u.y), e.quadraticCurveTo(h.x, h.y, a.x, a.y), e.stroke();
750
+ n.strokeStyle = p, n.beginPath(), n.moveTo(u.x, u.y), n.quadraticCurveTo(l.x, l.y, h.x, h.y), n.stroke();
318
751
  };
319
- t.onmousedown = (u) => {
320
- u.preventDefault(), f = Date.now();
321
- const h = u.clientX, a = u.clientY;
322
- c = [], c.push({ x: h, y: a }), i = { x: h, y: a }, o = _({ x: h, y: a }, this.clientWidth, this.clientHeight), l = [];
323
- }, t.onmousemove = (u) => {
324
- if (u.preventDefault(), !i)
752
+ i.onmousedown = (u) => {
753
+ u.preventDefault(), d = Date.now();
754
+ const l = u.clientX, h = u.clientY;
755
+ a = [], a.push({ x: l, y: h }), r = { x: l, y: h }, o = M({ x: l, y: h }, this.clientWidth, this.clientHeight), c = [];
756
+ }, i.onmousemove = (u) => {
757
+ if (u.preventDefault(), !r)
325
758
  return;
326
- const h = Number(u.clientX), a = Number(u.clientY);
327
- if (Math.abs(h - i.x) < 5 && Math.abs(a - i.y) < 5 || (c.push({ x: h, y: a }), l.push(_({ x: h, y: a }, this.clientWidth, this.clientHeight)), c.length < 3))
759
+ const l = Number(u.clientX), h = Number(u.clientY);
760
+ if (Math.abs(l - r.x) < 5 && Math.abs(h - r.y) < 5 || (a.push({ x: l, y: h }), c.push(M({ x: l, y: h }, this.clientWidth, this.clientHeight)), a.length < 3))
328
761
  return;
329
- const { control: p, end: d } = b(c);
330
- !p || !d || (x(i, p, d), i = d);
331
- }, t.onmouseup = (u) => {
332
- if (u.preventDefault(), i = null, c.length < 3)
762
+ const { control: p, end: f } = I(a);
763
+ !p || !f || (_(r, p, f), r = f);
764
+ }, i.onmouseup = (u) => {
765
+ if (u.preventDefault(), r = null, a.length < 3)
333
766
  return;
334
767
  this.data[this.uuid] || (this.data[this.uuid] = []);
335
- const h = Date.now() - f, a = {
768
+ const l = Date.now() - d, h = {
336
769
  move: Object.assign({}, o),
337
770
  uuid: this.uuid,
338
- line: [...l],
771
+ line: [...c],
339
772
  color: this.color,
340
- duration: h < 1280 ? h : h < 2e3 ? 1280 : 0
773
+ duration: l < 1280 ? l : l < 2e3 ? 1280 : 0
774
+ // 单次笔迹时长超过2000ms不加动画
341
775
  };
342
- this.data[this.uuid].push(a), E(() => {
776
+ this.data[this.uuid].push(h), k(() => {
343
777
  this.emitStateChange({
344
- type: v.Drawline,
778
+ type: w.Drawline,
345
779
  color: this.color,
346
780
  ready: this.ready,
347
- state: a,
781
+ state: h,
348
782
  uuid: this.uuid
349
783
  });
350
784
  });
351
- }, t.ontouchstart = (u) => {
352
- u.preventDefault(), f = Date.now();
353
- const h = u.touches[0].clientX, a = u.touches[0].clientY;
354
- c = [], c.push({ x: h, y: a }), i = { x: h, y: a }, o = _({ x: h, y: a }, this.clientWidth, this.clientHeight), l = [];
355
- }, t.ontouchmove = (u) => {
356
- if (u.preventDefault(), !i)
785
+ }, i.ontouchstart = (u) => {
786
+ u.preventDefault(), d = Date.now();
787
+ const l = u.touches[0].clientX, h = u.touches[0].clientY;
788
+ a = [], a.push({ x: l, y: h }), r = { x: l, y: h }, o = M({ x: l, y: h }, this.clientWidth, this.clientHeight), c = [];
789
+ }, i.ontouchmove = (u) => {
790
+ if (u.preventDefault(), !r)
357
791
  return;
358
- const h = Number(u.touches[0].clientX), a = Number(u.touches[0].clientY);
359
- if (Math.abs(h - i.x) < 5 && Math.abs(a - i.y) < 5 || (c.push({ x: h, y: a }), l.push(_({ x: h, y: a }, this.clientWidth, this.clientHeight)), c.length < 3))
792
+ const l = Number(u.touches[0].clientX), h = Number(u.touches[0].clientY);
793
+ if (Math.abs(l - r.x) < 5 && Math.abs(h - r.y) < 5 || (a.push({ x: l, y: h }), c.push(M({ x: l, y: h }, this.clientWidth, this.clientHeight)), a.length < 3))
360
794
  return;
361
- const { control: p, end: d } = b(c);
362
- !p || !d || (x(i, p, d), i = d);
363
- }, t.ontouchend = t.ontouchcancel = (u) => {
364
- if (u.preventDefault(), i = null, c.length < 3)
795
+ const { control: p, end: f } = I(a);
796
+ !p || !f || (_(r, p, f), r = f);
797
+ }, i.ontouchend = i.ontouchcancel = (u) => {
798
+ if (u.preventDefault(), r = null, a.length < 3)
365
799
  return;
366
800
  this.data[this.uuid] || (this.data[this.uuid] = []);
367
- const h = Date.now() - f, a = {
801
+ const l = Date.now() - d, h = {
368
802
  move: Object.assign({}, o),
369
- line: [...l],
803
+ line: [...c],
370
804
  uuid: this.uuid,
371
805
  color: this.color,
372
- duration: h < 1280 ? h : h < 2e3 ? 1280 : 0
806
+ duration: l < 1280 ? l : l < 2e3 ? 1280 : 0
807
+ // 单次笔迹时长超过2000ms不加动画
373
808
  };
374
- this.data[this.uuid].push(a), E(() => {
809
+ this.data[this.uuid].push(h), k(() => {
375
810
  this.emitStateChange({
376
- type: v.Drawline,
811
+ type: w.Drawline,
377
812
  color: this.color,
378
813
  ready: this.ready,
379
- state: a,
814
+ state: h,
380
815
  uuid: this.uuid
381
816
  });
382
817
  });
383
818
  };
384
819
  }
385
- emitStateChange(t, e = !0) {
386
- if (t.type !== v.Drawline) {
387
- this.emit("stateChange", t, e);
820
+ emitStateChange(i, n = !0) {
821
+ if (i.type !== w.Drawline) {
822
+ this.emit("stateChange", i, n);
388
823
  return;
389
824
  }
390
- const s = Date.now(), i = t.state;
391
- if (!i || !i.line)
825
+ const s = Date.now(), r = i.state;
826
+ if (!r || !r.line)
392
827
  return;
393
- const c = Math.ceil(i.line.length / 100);
394
- for (let o = 0; o < c; o++) {
395
- const l = {
828
+ const a = Math.ceil(r.line.length / 100);
829
+ for (let o = 0; o < a; o++) {
830
+ const c = {
396
831
  uuid: this.uuid,
397
832
  color: this.color,
398
833
  ready: this.ready,
399
- type: t.type,
834
+ type: i.type,
400
835
  state: {
401
836
  uuid: this.uuid,
402
- move: i.move,
403
- duration: i.duration,
837
+ move: r.move,
838
+ duration: r.duration,
404
839
  color: this.color,
405
- line: i.line.slice(o * 100, (o + 1) * 100)
840
+ line: r.line.slice(o * 100, (o + 1) * 100)
406
841
  },
407
842
  timestamp: s,
408
- end: o === c - 1
843
+ end: o === a - 1
409
844
  };
410
- O(o, 20, () => {
411
- this.emit("stateChange", l, e);
845
+ q(o, 20, () => {
846
+ this.emit("stateChange", c, n);
412
847
  });
413
848
  }
414
849
  }
415
- action(t) {
416
- const { ready: e, type: s, uuid: i } = t;
417
- if (!e && this.ready) {
850
+ action(i) {
851
+ const { ready: n, type: s, uuid: r } = i;
852
+ if (!n && this.ready) {
418
853
  this.closeBrush();
419
854
  return;
420
855
  }
421
- if (e && !this.ready) {
856
+ if (n && !this.ready) {
422
857
  this.openBrush();
423
858
  return;
424
859
  }
425
- if (!!this.ready)
860
+ if (this.ready)
426
861
  switch (s) {
427
- case v.Drawline:
428
- const { state: c, timestamp: o, end: l } = t;
429
- if (!o || !c)
862
+ case w.Drawline:
863
+ const { state: a, timestamp: o, end: c } = i;
864
+ if (!o || !a)
430
865
  return;
431
- this.tempLine[o] = [].concat(this.tempLine[o] || [], c.line), l && (Object.assign(c, { line: this.tempLine[o] }), this.handleDrawLine(i, c, {}, () => delete this.tempLine[o]));
866
+ this.tempLine[o] = [].concat(this.tempLine[o] || [], a.line), c && (Object.assign(a, { line: this.tempLine[o] }), this.handleDrawLine(r, a, {}, () => delete this.tempLine[o]));
432
867
  break;
433
- case v.Undo:
434
- this.handleUndo(i);
868
+ case w.Undo:
869
+ this.handleUndo(r);
435
870
  break;
436
871
  }
437
872
  }
438
- handleDrawLine(t, e, { withUndo: s = !1 }, i = j) {
439
- !e || Object.prototype.toString.call(e) != "[object Object]" || Object.keys(e).length === 0 || q(() => new Promise((c) => {
440
- if (s || (this.canvas[t] || (this.canvas[t] = this.initCanvas("_paintBrush-canvas--sync")), this.data[t] || (this.data[t] = []), this.data[t].push(e)), !this.canvas[t])
873
+ handleDrawLine(i, n, { withUndo: s = !1 }, r = F) {
874
+ !n || Object.prototype.toString.call(n) != "[object Object]" || Object.keys(n).length === 0 || z(() => new Promise((a) => {
875
+ if (s || (this.canvas[i] || (this.canvas[i] = this.initCanvas("_paintBrush-canvas--sync")), this.data[i] || (this.data[i] = []), this.data[i].push(n)), !this.canvas[i])
441
876
  return;
442
- const o = this.canvas[t].getContext("2d");
877
+ const o = this.canvas[i].getContext("2d");
443
878
  if (!o)
444
879
  return;
445
- const { line: l = [], color: f = "black", duration: x = 0, uuid: u } = e, h = T(e.move || {}, this.clientWidth, this.clientHeight);
446
- let a = [h];
447
- if (o.strokeStyle = f, o.beginPath(), o.moveTo(h.x, h.y), x && !s) {
880
+ const { line: c = [], color: d = "black", duration: _ = 0, uuid: u } = n, l = j(n.move || {}, this.clientWidth, this.clientHeight);
881
+ let h = [l];
882
+ if (o.strokeStyle = d, o.beginPath(), o.moveTo(l.x, l.y), _ && !s) {
448
883
  let p = [];
449
- const d = this;
450
- d.tween = A({ step: 0 }, { step: l.length - 1 }, x).onUpdate(({ step: y }) => {
451
- var S;
452
- if (d.tweening = !0, !d.ready)
453
- return o.clearRect(0, 0, d.canvas[u].width, d.canvas[u].height), (S = d.tween) == null ? void 0 : S.stop();
454
- const D = Math.floor(y);
455
- if (!p.find((w) => w === D)) {
456
- if (p.push(D), a.push(T(l[D], d.clientWidth, d.clientHeight)), a.length < 3)
884
+ const f = this;
885
+ f.tween = Y({ step: 0 }, { step: c.length - 1 }, _).onUpdate(({ step: v }) => {
886
+ var E;
887
+ if (f.tweening = !0, !f.ready)
888
+ return o.clearRect(0, 0, f.canvas[u].width, f.canvas[u].height), (E = f.tween) == null ? void 0 : E.stop();
889
+ const b = Math.floor(v);
890
+ if (!p.find((B) => B === b)) {
891
+ if (p.push(b), h.push(j(c[b], f.clientWidth, f.clientHeight)), h.length < 3)
457
892
  return;
458
- const { control: w, end: N } = b(a);
459
- if (!w || !N)
893
+ const { control: B, end: D } = I(h);
894
+ if (!B || !D)
460
895
  return;
461
- o.quadraticCurveTo(w.x, w.y, N.x, N.y), o.stroke();
896
+ o.quadraticCurveTo(B.x, B.y, D.x, D.y), o.stroke();
462
897
  }
463
- }).onComplete((y) => {
464
- d.tween = void 0, d.tweening = !1, p = [], a = [], i && i(), c();
898
+ }).onComplete((v) => {
899
+ f.tween = void 0, f.tweening = !1, p = [], h = [], r && r(), a();
465
900
  });
466
901
  } else {
467
- for (let p = 0; p < l.length; p++) {
468
- if (a.push(T(l[p], this.clientWidth, this.clientHeight)), a.length < 3)
902
+ for (let p = 0; p < c.length; p++) {
903
+ if (h.push(j(c[p], this.clientWidth, this.clientHeight)), h.length < 3)
469
904
  continue;
470
- const { control: d, end: y } = b(a);
471
- !d || !y || o.quadraticCurveTo(d.x, d.y, y.x, y.y);
905
+ const { control: f, end: v } = I(h);
906
+ !f || !v || o.quadraticCurveTo(f.x, f.y, v.x, v.y);
472
907
  }
473
- o.stroke(), a = [], i && i(), c();
908
+ o.stroke(), h = [], r && r(), a();
474
909
  }
475
910
  }));
476
911
  }
477
- handleUndo(t) {
478
- if (!this.canvas[t] || !this.data[t] || this.data[t].length === 0)
912
+ handleUndo(i) {
913
+ if (!this.canvas[i] || !this.data[i] || this.data[i].length === 0)
479
914
  return;
480
- this.data[t].pop();
481
- const e = () => {
482
- var i;
483
- const s = (i = this.canvas[t]) == null ? void 0 : i.getContext("2d");
484
- s && s.clearRect(0, 0, this.canvas[t].width, this.canvas[t].height), this.data[t].forEach((c) => this.handleDrawLine(t, c, { withUndo: !0 }));
915
+ this.data[i].pop();
916
+ const n = () => {
917
+ var r;
918
+ const s = (r = this.canvas[i]) == null ? void 0 : r.getContext("2d");
919
+ s && s.clearRect(0, 0, this.canvas[i].width, this.canvas[i].height), this.data[i].forEach((a) => this.handleDrawLine(i, a, { withUndo: !0 }));
485
920
  };
486
921
  if (this.tween && this.tweening) {
487
- this.tween.stop(), E(e, 60);
922
+ this.tween.stop(), k(n, 60);
488
923
  return;
489
924
  }
490
- e();
925
+ n();
491
926
  }
492
927
  destroyBrush() {
493
928
  this.closeBrush(), this.ready = !1, this.emit("readyChange", !0);
494
929
  }
495
930
  }
496
- class J {
497
- constructor(n = {}) {
931
+ class tt {
932
+ constructor(e = {}) {
498
933
  g(this, "controller");
499
- const t = Object.assign({
934
+ const i = Object.assign({
500
935
  currentColor: "#f44336",
501
- onUndoText: "\u56DE\u9000",
502
- onExitText: "\u5173\u95ED"
503
- }, n);
504
- this.controller = new X(t);
936
+ onUndoText: "回退",
937
+ onExitText: "关闭"
938
+ }, e);
939
+ this.controller = new K(i);
505
940
  }
506
- on(n, t) {
507
- this.controller.on(n, t);
941
+ on(e, i) {
942
+ this.controller.on(e, i);
508
943
  }
509
- off(n, t) {
510
- this.controller.off(n, t);
944
+ off(e, i) {
945
+ this.controller.off(e, i);
511
946
  }
512
- once(n, t) {
513
- this.controller.once(n, t);
947
+ once(e, i) {
948
+ this.controller.once(e, i);
514
949
  }
950
+ /**
951
+ * 显示画笔。
952
+ */
515
953
  show() {
516
954
  this.controller.openBrush();
517
955
  }
518
- action(n) {
519
- this.controller.action(n);
956
+ action(e) {
957
+ this.controller.action(e);
520
958
  }
959
+ /**
960
+ * 获取画笔状态。
961
+ */
521
962
  get state() {
522
963
  return this.controller.state;
523
964
  }
524
965
  get configs() {
525
966
  return this.controller.configs;
526
967
  }
968
+ /**
969
+ * 销毁。
970
+ *
971
+ * @deprecated
972
+ *
973
+ * @description 画笔应该维护一个 **全局单例**,重复利用。
974
+ */
527
975
  dispose() {
528
976
  return this.controller.destroyBrush();
529
977
  }
530
- setCurrentColor(n) {
531
- this.controller.updateCurrentColor(n);
978
+ setCurrentColor(e) {
979
+ this.controller.updateCurrentColor(e);
532
980
  }
533
981
  }
534
982
  export {
535
- J as PaintBrush,
536
- v as PaintBrushTypeEnum
983
+ tt as PaintBrush,
984
+ w as PaintBrushTypeEnum
537
985
  };