@realsee/dnalogel 2.0.0-alpha.4 → 2.0.0-alpha.40

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 (643) hide show
  1. package/README.md +93 -4
  2. package/components/index.js +1450 -0
  3. package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
  4. package/dist/CSS3DRenderPlugin/index.d.ts +4 -0
  5. package/dist/CSS3DRenderPlugin/index.js +234 -0
  6. package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  7. package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
  8. package/dist/CameraMovementPlugin/index.d.ts +5 -0
  9. package/dist/CameraMovementPlugin/index.js +302 -0
  10. package/dist/CameraMovementPlugin/typing.d.ts +68 -0
  11. package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
  12. package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
  13. package/dist/ItemLabelPlugin/index.d.ts +9 -0
  14. package/dist/ItemLabelPlugin/index.js +943 -0
  15. package/dist/ItemLabelPlugin/typings.d.ts +63 -0
  16. package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  17. package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  18. package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
  19. package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
  20. package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  21. package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
  22. package/dist/ModelChassisCompassPlugin/index.d.ts +4 -0
  23. package/dist/ModelChassisCompassPlugin/index.js +145 -0
  24. package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
  25. package/dist/ModelEntryDoorGuidePlugin/index.d.ts +4 -0
  26. package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
  27. package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
  28. package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
  29. package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
  30. package/dist/ModelItemLabelPlugin/index.js +654 -0
  31. package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
  32. package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  33. package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  34. package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
  35. package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
  36. package/dist/ModelRoomLabelPlugin/index.js +541 -0
  37. package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
  38. package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
  39. package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
  40. package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
  41. package/dist/ModelTVVideoPlugin/index.js +301 -0
  42. package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
  43. package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  44. package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
  45. package/dist/ModelViewPlugin/index.d.ts +4 -0
  46. package/dist/ModelViewPlugin/index.js +186 -0
  47. package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  48. package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
  49. package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  50. package/dist/PanoCompassPlugin/index.d.ts +8 -0
  51. package/dist/PanoCompassPlugin/index.js +636 -0
  52. package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
  53. package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
  54. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
  55. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  56. package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
  57. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  58. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
  59. package/dist/PanoMeasurePlugin/Controller/index.d.ts +70 -0
  60. package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
  61. package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
  62. package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
  63. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  64. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  65. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  66. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  67. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
  68. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  69. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  70. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
  71. package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
  72. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
  73. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  74. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
  75. package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
  76. package/dist/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
  77. package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
  78. package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
  79. package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
  80. package/dist/PanoMeasurePlugin/index.d.ts +10 -0
  81. package/dist/PanoMeasurePlugin/index.js +3963 -0
  82. package/dist/PanoMeasurePlugin/typings/data.d.ts +37 -0
  83. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
  84. package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  85. package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
  86. package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  87. package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  88. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  89. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  90. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  91. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  92. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  93. package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  94. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  95. package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
  96. package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
  97. package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
  98. package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  99. package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
  100. package/dist/PanoRulerPlugin/index.d.ts +5 -0
  101. package/dist/PanoRulerPlugin/index.js +610 -0
  102. package/dist/PanoRulerPlugin/style.d.ts +2 -0
  103. package/dist/PanoRulerPlugin/typings.d.ts +21 -0
  104. package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
  105. package/dist/PanoRulerProPlugin/index.d.ts +8 -0
  106. package/dist/PanoRulerProPlugin/index.js +1006 -0
  107. package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
  108. package/dist/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
  109. package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
  110. package/dist/PanoSpatialTagPlugin/index.js +1307 -0
  111. package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
  112. package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
  113. package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
  114. package/dist/base/BasePlugin.d.ts +100 -0
  115. package/dist/base/BasePluginWithData.d.ts +34 -0
  116. package/dist/components/PaintBrush/Controller.d.ts +43 -0
  117. package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
  118. package/dist/components/PaintBrush/index.d.ts +27 -0
  119. package/dist/components/PaintBrush/style.d.ts +2 -0
  120. package/dist/components/PaintBrush/tween.d.ts +62 -0
  121. package/dist/components/PaintBrush/typings.d.ts +58 -0
  122. package/dist/components/PaintBrush/utils.d.ts +26 -0
  123. package/dist/components/index.d.ts +2 -0
  124. package/dist/floorplan/Assets/camera.d.ts +1 -0
  125. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/Assets/compass.d.ts +0 -0
  126. package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  127. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +98 -0
  128. package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +7 -0
  129. package/dist/floorplan/ModelFloorplanPlugin/index.js +4533 -0
  130. package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
  131. package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +36 -0
  132. package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +7 -0
  133. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +2008 -0
  134. package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  135. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +67 -0
  136. package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +7 -0
  137. package/dist/floorplan/TopviewFloorplanPlugin/index.js +4236 -0
  138. package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  139. package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
  140. package/dist/floorplan/constant.d.ts +5 -0
  141. package/dist/floorplan/index.d.ts +6 -0
  142. package/dist/floorplan/typings/floorplanData.d.ts +137 -0
  143. package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
  144. package/dist/floorplan/typings/utility.d.ts +2 -0
  145. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/constant.d.ts +10 -3
  146. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/correctFiveState.d.ts +2 -1
  147. package/dist/floorplan/utils/formatData.d.ts +5 -0
  148. package/dist/floorplan/utils/formatPosition.d.ts +36 -0
  149. package/dist/index.d.ts +17 -0
  150. package/dist/index.es.js +16212 -0
  151. package/dist/index.js +16266 -0
  152. package/dist/index.umd.js +16258 -0
  153. package/dist/shared-utils/Preloader.d.ts +6 -0
  154. package/dist/shared-utils/Subscribe.d.ts +45 -0
  155. package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
  156. package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
  157. package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
  158. package/dist/shared-utils/animationFrame/index.d.ts +15 -0
  159. package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
  160. package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  161. package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
  162. package/dist/shared-utils/createLine/index.d.ts +3 -0
  163. package/dist/shared-utils/debounce.d.ts +6 -0
  164. package/dist/shared-utils/equal.d.ts +11 -0
  165. package/dist/shared-utils/filter.d.ts +27 -0
  166. package/dist/shared-utils/five/changeMode.d.ts +5 -0
  167. package/dist/shared-utils/formatRad.d.ts +7 -0
  168. package/dist/shared-utils/getPxmm.d.ts +19 -0
  169. package/dist/shared-utils/getRandomColor.d.ts +1 -0
  170. package/dist/shared-utils/index.d.ts +1 -0
  171. package/dist/shared-utils/isNil.d.ts +10 -0
  172. package/dist/shared-utils/isTruelyObject.d.ts +18 -0
  173. package/dist/shared-utils/logger.d.ts +16 -0
  174. package/dist/shared-utils/math/Interval.d.ts +13 -0
  175. package/dist/shared-utils/math/Rectangle.d.ts +27 -0
  176. package/dist/shared-utils/math/evenNumber.d.ts +3 -0
  177. package/dist/shared-utils/math/index.d.ts +2 -0
  178. package/dist/shared-utils/math/planimetry.d.ts +116 -0
  179. package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
  180. package/dist/shared-utils/nearlyEqual.d.ts +7 -0
  181. package/dist/shared-utils/nextFrame.d.ts +1 -0
  182. package/dist/shared-utils/noop.d.ts +5 -0
  183. package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
  184. package/dist/shared-utils/px2rem.d.ts +1 -0
  185. package/dist/shared-utils/removeArrayItem.d.ts +7 -0
  186. package/dist/shared-utils/tap.d.ts +8 -0
  187. package/dist/shared-utils/three/centerPoint.d.ts +2 -0
  188. package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
  189. package/dist/shared-utils/three/getNormal.d.ts +2 -0
  190. package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
  191. package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
  192. package/dist/shared-utils/three/loadTexture.d.ts +2 -0
  193. package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
  194. package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
  195. package/dist/shared-utils/throttle.d.ts +7 -0
  196. package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
  197. package/dist/shared-utils/to.d.ts +8 -0
  198. package/dist/shared-utils/uuid.d.ts +5 -0
  199. package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
  200. package/dist/typings/math.type.d.ts +44 -0
  201. package/dist/typings/utils.type.d.ts +2 -0
  202. package/docs/.nojekyll +1 -0
  203. package/docs/assets/highlight.css +78 -0
  204. package/docs/assets/icons.css +1043 -0
  205. package/docs/assets/icons.png +0 -0
  206. package/docs/assets/icons@2x.png +0 -0
  207. package/docs/assets/main.js +52 -0
  208. package/docs/assets/search.js +1 -0
  209. package/docs/assets/style.css +1413 -0
  210. package/docs/assets/widgets.png +0 -0
  211. package/docs/assets/widgets@2x.png +0 -0
  212. package/docs/classes/Magnifier.html +9 -0
  213. package/docs/classes/ModelRoomLabelController.html +17 -0
  214. package/docs/enums/CameraMovementEffect.html +3 -0
  215. package/docs/enums/DIRECTION.html +1 -0
  216. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
  217. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
  218. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
  219. package/docs/enums/Rotation.html +3 -0
  220. package/docs/index.html +88 -0
  221. package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
  222. package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
  223. package/docs/interfaces/FloorplanBounding.html +10 -0
  224. package/docs/interfaces/FloorplanData.html +3 -0
  225. package/docs/interfaces/FloorplanEntrance.html +15 -0
  226. package/docs/interfaces/FloorplanExtraObject.html +7 -0
  227. package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
  228. package/docs/interfaces/FloorplanFloorData.html +3 -0
  229. package/docs/interfaces/FloorplanImagePosition.html +3 -0
  230. package/docs/interfaces/FloorplanObserver.html +5 -0
  231. package/docs/interfaces/FloorplanOutlineItem.html +3 -0
  232. package/docs/interfaces/FloorplanPosition.html +3 -0
  233. package/docs/interfaces/FloorplanRoomItem.html +17 -0
  234. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
  235. package/docs/interfaces/FloorplanServerBounding.html +10 -0
  236. package/docs/interfaces/FloorplanServerComputedData.html +1 -0
  237. package/docs/interfaces/FloorplanServerData.html +3 -0
  238. package/docs/interfaces/FloorplanServerEntrance.html +15 -0
  239. package/docs/interfaces/FloorplanServerFloorData.html +3 -0
  240. package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
  241. package/docs/interfaces/FloorplanServerObserver.html +5 -0
  242. package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
  243. package/docs/interfaces/FloorplanServerPosition.html +3 -0
  244. package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
  245. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
  246. package/docs/interfaces/ItemLabelPluginData.html +1 -0
  247. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
  248. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
  249. package/docs/interfaces/LineJson.html +1 -0
  250. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
  251. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
  252. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
  253. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
  254. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
  255. package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
  256. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
  257. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
  258. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
  259. package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
  260. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
  261. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
  262. package/docs/interfaces/ModelViewPluginExportType.html +1 -0
  263. package/docs/interfaces/OpenParameter.html +3 -0
  264. package/docs/interfaces/PanoCompassPluginData.html +1 -0
  265. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
  266. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
  267. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
  268. package/docs/interfaces/PanoMeasureParameterType.html +1 -0
  269. package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
  270. package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
  271. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
  272. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -0
  273. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
  274. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
  275. package/docs/interfaces/PanoRulerProPluginState.html +1 -0
  276. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
  277. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
  278. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
  279. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
  280. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
  281. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
  282. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
  283. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
  284. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
  285. package/docs/interfaces/Point.html +1 -0
  286. package/docs/interfaces/PointJson.html +1 -0
  287. package/docs/interfaces/Room.html +1 -0
  288. package/docs/interfaces/RoomInfo.html +1 -0
  289. package/docs/interfaces/RoomLabel.html +13 -0
  290. package/docs/interfaces/RoomRules.html +1 -0
  291. package/docs/interfaces/Rooms.html +1 -0
  292. package/docs/modules.html +36 -0
  293. package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
  294. package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
  295. package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
  296. package/libs/CSS3DRenderPlugin/index.js +2 -180
  297. package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
  298. package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
  299. package/libs/CameraMovementPlugin/index.d.ts +4 -6
  300. package/libs/CameraMovementPlugin/index.js +3 -158
  301. package/libs/CameraMovementPlugin/typing.d.ts +1 -1
  302. package/libs/ItemLabelPlugin/ItemLabelComponent.js +568 -0
  303. package/libs/ItemLabelPlugin/ItemLabelItem.js +227 -0
  304. package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
  305. package/libs/ItemLabelPlugin/Plugin.js +126 -0
  306. package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
  307. package/libs/{floorplan/ModelFloorplanPlugin/typings → ItemLabelPlugin}/events.type.js +0 -0
  308. package/libs/ItemLabelPlugin/index.d.ts +9 -0
  309. package/libs/ItemLabelPlugin/index.js +8 -0
  310. package/libs/ItemLabelPlugin/typings.d.ts +63 -0
  311. package/libs/ItemLabelPlugin/typings.js +7 -0
  312. package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  313. package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
  314. package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  315. package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
  316. package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
  317. package/libs/ItemLabelPlugin/utils/isImpacted.js +13 -0
  318. package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
  319. package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
  320. package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  321. package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
  322. package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
  323. package/libs/ModelChassisCompassPlugin/Plugin.js +77 -0
  324. package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
  325. package/libs/ModelChassisCompassPlugin/index.js +2 -74
  326. package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
  327. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
  328. package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
  329. package/libs/ModelEntryDoorGuidePlugin/index.js +2 -135
  330. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +389 -0
  331. package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
  332. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
  333. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
  334. package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
  335. package/libs/ModelItemLabelPlugin/events.type.js +1 -0
  336. package/libs/ModelItemLabelPlugin/index.d.ts +9 -0
  337. package/libs/ModelItemLabelPlugin/index.js +8 -0
  338. package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
  339. package/libs/ModelItemLabelPlugin/typings.js +7 -0
  340. package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  341. package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
  342. package/libs/ModelRoomLabelPlugin/Controller.js +67 -25
  343. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
  344. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +291 -0
  345. package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
  346. package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
  347. package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
  348. package/libs/ModelTVVideoPlugin/index.d.ts +5 -0
  349. package/libs/ModelTVVideoPlugin/index.js +4 -0
  350. package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
  351. package/libs/ModelTVVideoPlugin/typings.js +8 -0
  352. package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  353. package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
  354. package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
  355. package/libs/ModelViewPlugin/Plugin.js +159 -0
  356. package/libs/ModelViewPlugin/index.d.ts +3 -16
  357. package/libs/ModelViewPlugin/index.js +2 -159
  358. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  359. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
  360. package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
  361. package/libs/PanoCompassPlugin/Plugin.js +249 -0
  362. package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  363. package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
  364. package/libs/PanoCompassPlugin/index.d.ts +7 -24
  365. package/libs/PanoCompassPlugin/index.js +6 -88
  366. package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
  367. package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
  368. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
  369. package/libs/PanoMeasurePlugin/Controller/BaseController.js +132 -0
  370. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  371. package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -0
  372. package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
  373. package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
  374. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  375. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +64 -0
  376. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
  377. package/libs/PanoMeasurePlugin/Controller/WatchController.js +316 -0
  378. package/libs/PanoMeasurePlugin/Controller/index.d.ts +70 -0
  379. package/libs/PanoMeasurePlugin/Controller/index.js +306 -0
  380. package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
  381. package/libs/PanoMeasurePlugin/Model/index.js +139 -0
  382. package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
  383. package/libs/PanoMeasurePlugin/Model/line.js +114 -0
  384. package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
  385. package/libs/PanoMeasurePlugin/Model/point.js +48 -0
  386. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  387. package/libs/PanoMeasurePlugin/Model/polyline.js +65 -0
  388. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  389. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +12 -0
  390. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  391. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
  392. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  393. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
  394. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
  395. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +190 -0
  396. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  397. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +48 -0
  398. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  399. package/libs/PanoMeasurePlugin/Modules/GuideController.js +110 -0
  400. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
  401. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +278 -0
  402. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
  403. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +128 -0
  404. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
  405. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +126 -0
  406. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  407. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +73 -0
  408. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
  409. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +117 -0
  410. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
  411. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
  412. package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
  413. package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +98 -0
  414. package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
  415. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +71 -0
  416. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
  417. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
  418. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
  419. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +264 -0
  420. package/libs/PanoMeasurePlugin/index.d.ts +10 -0
  421. package/libs/PanoMeasurePlugin/index.js +7 -0
  422. package/libs/PanoMeasurePlugin/typings/data.d.ts +37 -0
  423. package/libs/PanoMeasurePlugin/typings/data.js +1 -0
  424. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
  425. package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
  426. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  427. package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
  428. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
  429. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
  430. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  431. package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
  432. package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  433. package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
  434. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  435. package/libs/PanoMeasurePlugin/utils/distanceDom.js +120 -0
  436. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  437. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
  438. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  439. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
  440. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  441. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
  442. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  443. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
  444. package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  445. package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
  446. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  447. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
  448. package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
  449. package/libs/PanoMeasurePlugin/utils/line.js +33 -0
  450. package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
  451. package/libs/PanoMeasurePlugin/utils/math.js +44 -0
  452. package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
  453. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +69 -0
  454. package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  455. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
  456. package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
  457. package/libs/PanoRulerPlugin/Plugin.js +403 -0
  458. package/libs/PanoRulerPlugin/index.d.ts +4 -30
  459. package/libs/PanoRulerPlugin/index.js +2 -396
  460. package/libs/PanoRulerPlugin/style.d.ts +1 -1
  461. package/libs/PanoRulerPlugin/style.js +1 -0
  462. package/libs/PanoRulerProPlugin/Controller.d.ts +15 -0
  463. package/libs/PanoRulerProPlugin/Controller.js +110 -0
  464. package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
  465. package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
  466. package/libs/PanoRulerProPlugin/index.d.ts +8 -0
  467. package/libs/PanoRulerProPlugin/index.js +8 -0
  468. package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
  469. package/libs/PanoRulerProPlugin/typings.js +1 -0
  470. package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
  471. package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
  472. package/libs/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
  473. package/libs/PanoSpatialTagPlugin/Plugin.js +426 -0
  474. package/libs/PanoSpatialTagPlugin/index.d.ts +5 -0
  475. package/libs/PanoSpatialTagPlugin/index.js +5 -0
  476. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
  477. package/libs/PanoSpatialTagPlugin/store.js +2 -0
  478. package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
  479. package/libs/PanoSpatialTagPlugin/style.js +8 -0
  480. package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
  481. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  482. package/libs/base/BasePlugin.d.ts +100 -0
  483. package/libs/base/BasePlugin.js +31 -0
  484. package/libs/base/BasePluginWithData.d.ts +34 -0
  485. package/libs/base/BasePluginWithData.js +4 -0
  486. package/libs/components/PaintBrush/Controller.d.ts +43 -0
  487. package/libs/components/PaintBrush/Controller.js +575 -0
  488. package/libs/components/PaintBrush/Subscribe.d.ts +76 -0
  489. package/libs/components/PaintBrush/Subscribe.js +121 -0
  490. package/libs/components/PaintBrush/index.d.ts +27 -0
  491. package/libs/components/PaintBrush/index.js +57 -0
  492. package/libs/components/PaintBrush/style.d.ts +2 -0
  493. package/libs/components/PaintBrush/style.js +102 -0
  494. package/libs/components/PaintBrush/tween.d.ts +62 -0
  495. package/libs/components/PaintBrush/tween.js +15 -0
  496. package/libs/components/PaintBrush/typings.d.ts +58 -0
  497. package/libs/components/PaintBrush/typings.js +6 -0
  498. package/libs/components/PaintBrush/utils.d.ts +26 -0
  499. package/libs/components/PaintBrush/utils.js +51 -0
  500. package/libs/components/index.d.ts +2 -0
  501. package/libs/components/index.js +3 -0
  502. package/libs/floorplan/Assets/compass.d.ts +1 -0
  503. package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
  504. package/libs/floorplan/Components/BaseImage.js +222 -0
  505. package/libs/floorplan/Components/Camera.js +120 -0
  506. package/libs/floorplan/Components/Compass.js +120 -0
  507. package/libs/floorplan/Components/CurrentFloor.js +469 -0
  508. package/libs/floorplan/Components/Main.js +470 -0
  509. package/libs/floorplan/Components/Normalmage.js +63 -0
  510. package/libs/floorplan/Components/RoomHighlight/Room.js +107 -0
  511. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +216 -0
  512. package/libs/floorplan/Components/RoomLabels/RoomLabel.js +322 -0
  513. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +309 -0
  514. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +331 -0
  515. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
  516. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +104 -0
  517. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +142 -0
  518. package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
  519. package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
  520. package/libs/floorplan/Components/SvgImage.js +83 -0
  521. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +71 -75
  522. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +666 -322
  523. package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
  524. package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
  525. package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
  526. package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
  527. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +168 -0
  528. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
  529. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
  530. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +373 -0
  531. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
  532. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +195 -43
  533. package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
  534. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
  535. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  536. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
  537. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -45
  538. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +451 -154
  539. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
  540. package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
  541. package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
  542. package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
  543. package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
  544. package/libs/floorplan/constant.d.ts +5 -0
  545. package/libs/floorplan/constant.js +6 -0
  546. package/libs/floorplan/index.d.ts +6 -0
  547. package/libs/floorplan/index.js +7 -0
  548. package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
  549. package/libs/floorplan/utils/constant.d.ts +22 -0
  550. package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/constant.js +9 -2
  551. package/libs/floorplan/utils/correctFiveState.d.ts +15 -0
  552. package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/correctFiveState.js +16 -16
  553. package/libs/floorplan/utils/formatPosition.d.ts +1 -1
  554. package/libs/floorplan/utils/formatPosition.js +3 -3
  555. package/libs/index.d.ts +17 -21
  556. package/libs/index.js +29 -12
  557. package/libs/shared-utils/Subscribe.js +8 -1
  558. package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
  559. package/libs/shared-utils/createCanvasTextTexture.js +6 -5
  560. package/libs/shared-utils/five/changeMode.d.ts +4 -1
  561. package/libs/shared-utils/five/changeMode.js +34 -13
  562. package/libs/shared-utils/getPxmm.d.ts +14 -1
  563. package/libs/shared-utils/getPxmm.js +31 -12
  564. package/libs/shared-utils/index.d.ts +1 -0
  565. package/libs/shared-utils/index.js +1 -0
  566. package/libs/shared-utils/logger.d.ts +16 -0
  567. package/libs/shared-utils/logger.js +47 -0
  568. package/libs/shared-utils/math/Interval.d.ts +13 -0
  569. package/libs/shared-utils/math/Interval.js +40 -0
  570. package/libs/shared-utils/math/Rectangle.d.ts +27 -0
  571. package/libs/shared-utils/math/Rectangle.js +50 -0
  572. package/libs/shared-utils/math/evenNumber.js +1 -1
  573. package/libs/shared-utils/math/index.d.ts +2 -0
  574. package/libs/shared-utils/math/index.js +2 -0
  575. package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
  576. package/libs/shared-utils/three/getNormal.d.ts +1 -1
  577. package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
  578. package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
  579. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
  580. package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
  581. package/libs/shared-utils/tinyEJSrender.js +210 -0
  582. package/libs/shared-utils/uuid.d.ts +1 -0
  583. package/libs/shared-utils/uuid.js +1 -0
  584. package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
  585. package/package.json +30 -14
  586. package/CHANGELOG.md +0 -7
  587. package/dist/dnalogel.cjs.js +0 -2
  588. package/dist/dnalogel.es.js +0 -37796
  589. package/dist/dnalogel.umd.js +0 -2
  590. package/dist/style.css +0 -1
  591. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
  592. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
  593. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
  594. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
  595. package/libs/floorplan/Components/BaseImage.svelte +0 -25
  596. package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
  597. package/libs/floorplan/Components/Normalmage.svelte +0 -11
  598. package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
  599. package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
  600. package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
  601. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
  602. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
  603. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
  604. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
  605. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
  606. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
  607. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
  608. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
  609. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
  610. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
  611. package/libs/floorplan/Components/SvgImage.svelte +0 -25
  612. package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
  613. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
  614. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
  615. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
  616. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
  617. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
  618. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
  619. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
  620. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
  621. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
  622. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
  623. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
  624. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
  625. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
  626. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
  627. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
  628. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
  629. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -23
  630. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
  631. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
  632. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
  633. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
  634. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
  635. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
  636. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
  637. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
  638. package/libs/shared-utils/five/useFivePlugin.d.ts +0 -1
  639. package/libs/shared-utils/five/useFivePlugin.js +0 -8
  640. package/libs/shared-utils/useDebounce.d.ts +0 -8
  641. package/libs/shared-utils/useDebounce.js +0 -22
  642. package/libs/shared-utils/useThrottle.d.ts +0 -8
  643. package/libs/shared-utils/useThrottle.js +0 -25
@@ -0,0 +1,1450 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ function noop() {
8
+ }
9
+ const promise = () => Promise.resolve();
10
+ const state = {
11
+ __queue: Promise.resolve()
12
+ };
13
+ function queue(promiseCallback = promise) {
14
+ state.__queue = state.__queue.then(promiseCallback).catch(promise);
15
+ }
16
+ function transformCoords(coords, cw, ch) {
17
+ const _x = coords.x;
18
+ const _y = coords.y;
19
+ const x = Math.floor(_x / cw * 1e4) / 1e4;
20
+ const y = Math.floor(_y / ch * 1e4) / 1e4;
21
+ return { x, y };
22
+ }
23
+ function unTransformCoords(coords, cw, ch) {
24
+ const { x: _x, y: _y } = coords;
25
+ const x = _x * cw;
26
+ const y = _y * ch;
27
+ return { x, y };
28
+ }
29
+ function getQuadraticCurvePoint(points) {
30
+ if (points.length < 2)
31
+ return {};
32
+ const lastTwo = points.slice(-2);
33
+ const control = lastTwo[0];
34
+ const end = {
35
+ x: (lastTwo[0].x + lastTwo[1].x) / 2,
36
+ y: (lastTwo[0].y + lastTwo[1].y) / 2
37
+ };
38
+ return { control, end };
39
+ }
40
+ function execInterval(i, time, callback = noop) {
41
+ new Promise((resolve) => {
42
+ setTimeout(() => {
43
+ callback();
44
+ resolve(true);
45
+ }, time * i);
46
+ });
47
+ }
48
+ const _window = window;
49
+ const _requestAnimationFrame = window.requestAnimationFrame || _window.webkitRequestAnimationFrame || ((fn) => setTimeout(fn, 16));
50
+ function nextFrame(fn, delay = 0) {
51
+ if (delay <= 0)
52
+ _requestAnimationFrame(fn);
53
+ else
54
+ _requestAnimationFrame(() => nextFrame(fn, delay - 1));
55
+ }
56
+ var Easing$1 = {
57
+ Linear: {
58
+ None: function(amount) {
59
+ return amount;
60
+ }
61
+ },
62
+ Quadratic: {
63
+ In: function(amount) {
64
+ return amount * amount;
65
+ },
66
+ Out: function(amount) {
67
+ return amount * (2 - amount);
68
+ },
69
+ InOut: function(amount) {
70
+ if ((amount *= 2) < 1) {
71
+ return 0.5 * amount * amount;
72
+ }
73
+ return -0.5 * (--amount * (amount - 2) - 1);
74
+ }
75
+ },
76
+ Cubic: {
77
+ In: function(amount) {
78
+ return amount * amount * amount;
79
+ },
80
+ Out: function(amount) {
81
+ return --amount * amount * amount + 1;
82
+ },
83
+ InOut: function(amount) {
84
+ if ((amount *= 2) < 1) {
85
+ return 0.5 * amount * amount * amount;
86
+ }
87
+ return 0.5 * ((amount -= 2) * amount * amount + 2);
88
+ }
89
+ },
90
+ Quartic: {
91
+ In: function(amount) {
92
+ return amount * amount * amount * amount;
93
+ },
94
+ Out: function(amount) {
95
+ return 1 - --amount * amount * amount * amount;
96
+ },
97
+ InOut: function(amount) {
98
+ if ((amount *= 2) < 1) {
99
+ return 0.5 * amount * amount * amount * amount;
100
+ }
101
+ return -0.5 * ((amount -= 2) * amount * amount * amount - 2);
102
+ }
103
+ },
104
+ Quintic: {
105
+ In: function(amount) {
106
+ return amount * amount * amount * amount * amount;
107
+ },
108
+ Out: function(amount) {
109
+ return --amount * amount * amount * amount * amount + 1;
110
+ },
111
+ InOut: function(amount) {
112
+ if ((amount *= 2) < 1) {
113
+ return 0.5 * amount * amount * amount * amount * amount;
114
+ }
115
+ return 0.5 * ((amount -= 2) * amount * amount * amount * amount + 2);
116
+ }
117
+ },
118
+ Sinusoidal: {
119
+ In: function(amount) {
120
+ return 1 - Math.cos(amount * Math.PI / 2);
121
+ },
122
+ Out: function(amount) {
123
+ return Math.sin(amount * Math.PI / 2);
124
+ },
125
+ InOut: function(amount) {
126
+ return 0.5 * (1 - Math.cos(Math.PI * amount));
127
+ }
128
+ },
129
+ Exponential: {
130
+ In: function(amount) {
131
+ return amount === 0 ? 0 : Math.pow(1024, amount - 1);
132
+ },
133
+ Out: function(amount) {
134
+ return amount === 1 ? 1 : 1 - Math.pow(2, -10 * amount);
135
+ },
136
+ InOut: function(amount) {
137
+ if (amount === 0) {
138
+ return 0;
139
+ }
140
+ if (amount === 1) {
141
+ return 1;
142
+ }
143
+ if ((amount *= 2) < 1) {
144
+ return 0.5 * Math.pow(1024, amount - 1);
145
+ }
146
+ return 0.5 * (-Math.pow(2, -10 * (amount - 1)) + 2);
147
+ }
148
+ },
149
+ Circular: {
150
+ In: function(amount) {
151
+ return 1 - Math.sqrt(1 - amount * amount);
152
+ },
153
+ Out: function(amount) {
154
+ return Math.sqrt(1 - --amount * amount);
155
+ },
156
+ InOut: function(amount) {
157
+ if ((amount *= 2) < 1) {
158
+ return -0.5 * (Math.sqrt(1 - amount * amount) - 1);
159
+ }
160
+ return 0.5 * (Math.sqrt(1 - (amount -= 2) * amount) + 1);
161
+ }
162
+ },
163
+ Elastic: {
164
+ In: function(amount) {
165
+ if (amount === 0) {
166
+ return 0;
167
+ }
168
+ if (amount === 1) {
169
+ return 1;
170
+ }
171
+ return -Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);
172
+ },
173
+ Out: function(amount) {
174
+ if (amount === 0) {
175
+ return 0;
176
+ }
177
+ if (amount === 1) {
178
+ return 1;
179
+ }
180
+ return Math.pow(2, -10 * amount) * Math.sin((amount - 0.1) * 5 * Math.PI) + 1;
181
+ },
182
+ InOut: function(amount) {
183
+ if (amount === 0) {
184
+ return 0;
185
+ }
186
+ if (amount === 1) {
187
+ return 1;
188
+ }
189
+ amount *= 2;
190
+ if (amount < 1) {
191
+ return -0.5 * Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);
192
+ }
193
+ return 0.5 * Math.pow(2, -10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI) + 1;
194
+ }
195
+ },
196
+ Back: {
197
+ In: function(amount) {
198
+ var s = 1.70158;
199
+ return amount * amount * ((s + 1) * amount - s);
200
+ },
201
+ Out: function(amount) {
202
+ var s = 1.70158;
203
+ return --amount * amount * ((s + 1) * amount + s) + 1;
204
+ },
205
+ InOut: function(amount) {
206
+ var s = 1.70158 * 1.525;
207
+ if ((amount *= 2) < 1) {
208
+ return 0.5 * (amount * amount * ((s + 1) * amount - s));
209
+ }
210
+ return 0.5 * ((amount -= 2) * amount * ((s + 1) * amount + s) + 2);
211
+ }
212
+ },
213
+ Bounce: {
214
+ In: function(amount) {
215
+ return 1 - Easing$1.Bounce.Out(1 - amount);
216
+ },
217
+ Out: function(amount) {
218
+ if (amount < 1 / 2.75) {
219
+ return 7.5625 * amount * amount;
220
+ } else if (amount < 2 / 2.75) {
221
+ return 7.5625 * (amount -= 1.5 / 2.75) * amount + 0.75;
222
+ } else if (amount < 2.5 / 2.75) {
223
+ return 7.5625 * (amount -= 2.25 / 2.75) * amount + 0.9375;
224
+ } else {
225
+ return 7.5625 * (amount -= 2.625 / 2.75) * amount + 0.984375;
226
+ }
227
+ },
228
+ InOut: function(amount) {
229
+ if (amount < 0.5) {
230
+ return Easing$1.Bounce.In(amount * 2) * 0.5;
231
+ }
232
+ return Easing$1.Bounce.Out(amount * 2 - 1) * 0.5 + 0.5;
233
+ }
234
+ }
235
+ };
236
+ var now;
237
+ if (typeof self === "undefined" && typeof process !== "undefined" && process.hrtime) {
238
+ now = function() {
239
+ var time = process.hrtime();
240
+ return time[0] * 1e3 + time[1] / 1e6;
241
+ };
242
+ } else if (typeof self !== "undefined" && self.performance !== void 0 && self.performance.now !== void 0) {
243
+ now = self.performance.now.bind(self.performance);
244
+ } else if (Date.now !== void 0) {
245
+ now = Date.now;
246
+ } else {
247
+ now = function() {
248
+ return new Date().getTime();
249
+ };
250
+ }
251
+ var now$1 = now;
252
+ var Group = function() {
253
+ function Group2() {
254
+ this._tweens = {};
255
+ this._tweensAddedDuringUpdate = {};
256
+ }
257
+ Group2.prototype.getAll = function() {
258
+ var _this = this;
259
+ return Object.keys(this._tweens).map(function(tweenId) {
260
+ return _this._tweens[tweenId];
261
+ });
262
+ };
263
+ Group2.prototype.removeAll = function() {
264
+ this._tweens = {};
265
+ };
266
+ Group2.prototype.add = function(tween2) {
267
+ this._tweens[tween2.getId()] = tween2;
268
+ this._tweensAddedDuringUpdate[tween2.getId()] = tween2;
269
+ };
270
+ Group2.prototype.remove = function(tween2) {
271
+ delete this._tweens[tween2.getId()];
272
+ delete this._tweensAddedDuringUpdate[tween2.getId()];
273
+ };
274
+ Group2.prototype.update = function(time, preserve) {
275
+ if (time === void 0) {
276
+ time = now$1();
277
+ }
278
+ if (preserve === void 0) {
279
+ preserve = false;
280
+ }
281
+ var tweenIds = Object.keys(this._tweens);
282
+ if (tweenIds.length === 0) {
283
+ return false;
284
+ }
285
+ while (tweenIds.length > 0) {
286
+ this._tweensAddedDuringUpdate = {};
287
+ for (var i = 0; i < tweenIds.length; i++) {
288
+ var tween2 = this._tweens[tweenIds[i]];
289
+ var autoStart = !preserve;
290
+ if (tween2 && tween2.update(time, autoStart) === false && !preserve) {
291
+ delete this._tweens[tweenIds[i]];
292
+ }
293
+ }
294
+ tweenIds = Object.keys(this._tweensAddedDuringUpdate);
295
+ }
296
+ return true;
297
+ };
298
+ return Group2;
299
+ }();
300
+ var Interpolation = {
301
+ Linear: function(v, k) {
302
+ var m = v.length - 1;
303
+ var f = m * k;
304
+ var i = Math.floor(f);
305
+ var fn = Interpolation.Utils.Linear;
306
+ if (k < 0) {
307
+ return fn(v[0], v[1], f);
308
+ }
309
+ if (k > 1) {
310
+ return fn(v[m], v[m - 1], m - f);
311
+ }
312
+ return fn(v[i], v[i + 1 > m ? m : i + 1], f - i);
313
+ },
314
+ Bezier: function(v, k) {
315
+ var b = 0;
316
+ var n = v.length - 1;
317
+ var pw = Math.pow;
318
+ var bn = Interpolation.Utils.Bernstein;
319
+ for (var i = 0; i <= n; i++) {
320
+ b += pw(1 - k, n - i) * pw(k, i) * v[i] * bn(n, i);
321
+ }
322
+ return b;
323
+ },
324
+ CatmullRom: function(v, k) {
325
+ var m = v.length - 1;
326
+ var f = m * k;
327
+ var i = Math.floor(f);
328
+ var fn = Interpolation.Utils.CatmullRom;
329
+ if (v[0] === v[m]) {
330
+ if (k < 0) {
331
+ i = Math.floor(f = m * (1 + k));
332
+ }
333
+ return fn(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i);
334
+ } else {
335
+ if (k < 0) {
336
+ return v[0] - (fn(v[0], v[0], v[1], v[1], -f) - v[0]);
337
+ }
338
+ if (k > 1) {
339
+ return v[m] - (fn(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]);
340
+ }
341
+ return fn(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i);
342
+ }
343
+ },
344
+ Utils: {
345
+ Linear: function(p0, p1, t) {
346
+ return (p1 - p0) * t + p0;
347
+ },
348
+ Bernstein: function(n, i) {
349
+ var fc = Interpolation.Utils.Factorial;
350
+ return fc(n) / fc(i) / fc(n - i);
351
+ },
352
+ Factorial: function() {
353
+ var a = [1];
354
+ return function(n) {
355
+ var s = 1;
356
+ if (a[n]) {
357
+ return a[n];
358
+ }
359
+ for (var i = n; i > 1; i--) {
360
+ s *= i;
361
+ }
362
+ a[n] = s;
363
+ return s;
364
+ };
365
+ }(),
366
+ CatmullRom: function(p0, p1, p2, p3, t) {
367
+ var v0 = (p2 - p0) * 0.5;
368
+ var v1 = (p3 - p1) * 0.5;
369
+ var t2 = t * t;
370
+ var t3 = t * t2;
371
+ return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;
372
+ }
373
+ }
374
+ };
375
+ var Sequence = function() {
376
+ function Sequence2() {
377
+ }
378
+ Sequence2.nextId = function() {
379
+ return Sequence2._nextId++;
380
+ };
381
+ Sequence2._nextId = 0;
382
+ return Sequence2;
383
+ }();
384
+ var mainGroup = new Group();
385
+ var Tween = function() {
386
+ function Tween2(_object, _group) {
387
+ if (_group === void 0) {
388
+ _group = mainGroup;
389
+ }
390
+ this._object = _object;
391
+ this._group = _group;
392
+ this._isPaused = false;
393
+ this._pauseStart = 0;
394
+ this._valuesStart = {};
395
+ this._valuesEnd = {};
396
+ this._valuesStartRepeat = {};
397
+ this._duration = 1e3;
398
+ this._initialRepeat = 0;
399
+ this._repeat = 0;
400
+ this._yoyo = false;
401
+ this._isPlaying = false;
402
+ this._reversed = false;
403
+ this._delayTime = 0;
404
+ this._startTime = 0;
405
+ this._easingFunction = Easing$1.Linear.None;
406
+ this._interpolationFunction = Interpolation.Linear;
407
+ this._chainedTweens = [];
408
+ this._onStartCallbackFired = false;
409
+ this._id = Sequence.nextId();
410
+ this._isChainStopped = false;
411
+ this._goToEnd = false;
412
+ }
413
+ Tween2.prototype.getId = function() {
414
+ return this._id;
415
+ };
416
+ Tween2.prototype.isPlaying = function() {
417
+ return this._isPlaying;
418
+ };
419
+ Tween2.prototype.isPaused = function() {
420
+ return this._isPaused;
421
+ };
422
+ Tween2.prototype.to = function(properties, duration) {
423
+ this._valuesEnd = Object.create(properties);
424
+ if (duration !== void 0) {
425
+ this._duration = duration;
426
+ }
427
+ return this;
428
+ };
429
+ Tween2.prototype.duration = function(d) {
430
+ this._duration = d;
431
+ return this;
432
+ };
433
+ Tween2.prototype.start = function(time) {
434
+ if (this._isPlaying) {
435
+ return this;
436
+ }
437
+ this._group && this._group.add(this);
438
+ this._repeat = this._initialRepeat;
439
+ if (this._reversed) {
440
+ this._reversed = false;
441
+ for (var property in this._valuesStartRepeat) {
442
+ this._swapEndStartRepeatValues(property);
443
+ this._valuesStart[property] = this._valuesStartRepeat[property];
444
+ }
445
+ }
446
+ this._isPlaying = true;
447
+ this._isPaused = false;
448
+ this._onStartCallbackFired = false;
449
+ this._isChainStopped = false;
450
+ this._startTime = time !== void 0 ? typeof time === "string" ? now$1() + parseFloat(time) : time : now$1();
451
+ this._startTime += this._delayTime;
452
+ this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat);
453
+ return this;
454
+ };
455
+ Tween2.prototype._setupProperties = function(_object, _valuesStart, _valuesEnd, _valuesStartRepeat) {
456
+ for (var property in _valuesEnd) {
457
+ var startValue = _object[property];
458
+ var startValueIsArray = Array.isArray(startValue);
459
+ var propType = startValueIsArray ? "array" : typeof startValue;
460
+ var isInterpolationList = !startValueIsArray && Array.isArray(_valuesEnd[property]);
461
+ if (propType === "undefined" || propType === "function") {
462
+ continue;
463
+ }
464
+ if (isInterpolationList) {
465
+ var endValues = _valuesEnd[property];
466
+ if (endValues.length === 0) {
467
+ continue;
468
+ }
469
+ endValues = endValues.map(this._handleRelativeValue.bind(this, startValue));
470
+ _valuesEnd[property] = [startValue].concat(endValues);
471
+ }
472
+ if ((propType === "object" || startValueIsArray) && startValue && !isInterpolationList) {
473
+ _valuesStart[property] = startValueIsArray ? [] : {};
474
+ for (var prop in startValue) {
475
+ _valuesStart[property][prop] = startValue[prop];
476
+ }
477
+ _valuesStartRepeat[property] = startValueIsArray ? [] : {};
478
+ this._setupProperties(startValue, _valuesStart[property], _valuesEnd[property], _valuesStartRepeat[property]);
479
+ } else {
480
+ if (typeof _valuesStart[property] === "undefined") {
481
+ _valuesStart[property] = startValue;
482
+ }
483
+ if (!startValueIsArray) {
484
+ _valuesStart[property] *= 1;
485
+ }
486
+ if (isInterpolationList) {
487
+ _valuesStartRepeat[property] = _valuesEnd[property].slice().reverse();
488
+ } else {
489
+ _valuesStartRepeat[property] = _valuesStart[property] || 0;
490
+ }
491
+ }
492
+ }
493
+ };
494
+ Tween2.prototype.stop = function() {
495
+ if (!this._isChainStopped) {
496
+ this._isChainStopped = true;
497
+ this.stopChainedTweens();
498
+ }
499
+ if (!this._isPlaying) {
500
+ return this;
501
+ }
502
+ this._group && this._group.remove(this);
503
+ this._isPlaying = false;
504
+ this._isPaused = false;
505
+ if (this._onStopCallback) {
506
+ this._onStopCallback(this._object);
507
+ }
508
+ return this;
509
+ };
510
+ Tween2.prototype.end = function() {
511
+ this._goToEnd = true;
512
+ this.update(Infinity);
513
+ return this;
514
+ };
515
+ Tween2.prototype.pause = function(time) {
516
+ if (time === void 0) {
517
+ time = now$1();
518
+ }
519
+ if (this._isPaused || !this._isPlaying) {
520
+ return this;
521
+ }
522
+ this._isPaused = true;
523
+ this._pauseStart = time;
524
+ this._group && this._group.remove(this);
525
+ return this;
526
+ };
527
+ Tween2.prototype.resume = function(time) {
528
+ if (time === void 0) {
529
+ time = now$1();
530
+ }
531
+ if (!this._isPaused || !this._isPlaying) {
532
+ return this;
533
+ }
534
+ this._isPaused = false;
535
+ this._startTime += time - this._pauseStart;
536
+ this._pauseStart = 0;
537
+ this._group && this._group.add(this);
538
+ return this;
539
+ };
540
+ Tween2.prototype.stopChainedTweens = function() {
541
+ for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {
542
+ this._chainedTweens[i].stop();
543
+ }
544
+ return this;
545
+ };
546
+ Tween2.prototype.group = function(group) {
547
+ this._group = group;
548
+ return this;
549
+ };
550
+ Tween2.prototype.delay = function(amount) {
551
+ this._delayTime = amount;
552
+ return this;
553
+ };
554
+ Tween2.prototype.repeat = function(times) {
555
+ this._initialRepeat = times;
556
+ this._repeat = times;
557
+ return this;
558
+ };
559
+ Tween2.prototype.repeatDelay = function(amount) {
560
+ this._repeatDelayTime = amount;
561
+ return this;
562
+ };
563
+ Tween2.prototype.yoyo = function(yoyo) {
564
+ this._yoyo = yoyo;
565
+ return this;
566
+ };
567
+ Tween2.prototype.easing = function(easingFunction) {
568
+ this._easingFunction = easingFunction;
569
+ return this;
570
+ };
571
+ Tween2.prototype.interpolation = function(interpolationFunction) {
572
+ this._interpolationFunction = interpolationFunction;
573
+ return this;
574
+ };
575
+ Tween2.prototype.chain = function() {
576
+ var tweens = [];
577
+ for (var _i = 0; _i < arguments.length; _i++) {
578
+ tweens[_i] = arguments[_i];
579
+ }
580
+ this._chainedTweens = tweens;
581
+ return this;
582
+ };
583
+ Tween2.prototype.onStart = function(callback) {
584
+ this._onStartCallback = callback;
585
+ return this;
586
+ };
587
+ Tween2.prototype.onUpdate = function(callback) {
588
+ this._onUpdateCallback = callback;
589
+ return this;
590
+ };
591
+ Tween2.prototype.onRepeat = function(callback) {
592
+ this._onRepeatCallback = callback;
593
+ return this;
594
+ };
595
+ Tween2.prototype.onComplete = function(callback) {
596
+ this._onCompleteCallback = callback;
597
+ return this;
598
+ };
599
+ Tween2.prototype.onStop = function(callback) {
600
+ this._onStopCallback = callback;
601
+ return this;
602
+ };
603
+ Tween2.prototype.update = function(time, autoStart) {
604
+ if (time === void 0) {
605
+ time = now$1();
606
+ }
607
+ if (autoStart === void 0) {
608
+ autoStart = true;
609
+ }
610
+ if (this._isPaused)
611
+ return true;
612
+ var property;
613
+ var elapsed;
614
+ var endTime = this._startTime + this._duration;
615
+ if (!this._goToEnd && !this._isPlaying) {
616
+ if (time > endTime)
617
+ return false;
618
+ if (autoStart)
619
+ this.start(time);
620
+ }
621
+ this._goToEnd = false;
622
+ if (time < this._startTime) {
623
+ return true;
624
+ }
625
+ if (this._onStartCallbackFired === false) {
626
+ if (this._onStartCallback) {
627
+ this._onStartCallback(this._object);
628
+ }
629
+ this._onStartCallbackFired = true;
630
+ }
631
+ elapsed = (time - this._startTime) / this._duration;
632
+ elapsed = this._duration === 0 || elapsed > 1 ? 1 : elapsed;
633
+ var value = this._easingFunction(elapsed);
634
+ this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value);
635
+ if (this._onUpdateCallback) {
636
+ this._onUpdateCallback(this._object, elapsed);
637
+ }
638
+ if (elapsed === 1) {
639
+ if (this._repeat > 0) {
640
+ if (isFinite(this._repeat)) {
641
+ this._repeat--;
642
+ }
643
+ for (property in this._valuesStartRepeat) {
644
+ if (!this._yoyo && typeof this._valuesEnd[property] === "string") {
645
+ this._valuesStartRepeat[property] = this._valuesStartRepeat[property] + parseFloat(this._valuesEnd[property]);
646
+ }
647
+ if (this._yoyo) {
648
+ this._swapEndStartRepeatValues(property);
649
+ }
650
+ this._valuesStart[property] = this._valuesStartRepeat[property];
651
+ }
652
+ if (this._yoyo) {
653
+ this._reversed = !this._reversed;
654
+ }
655
+ if (this._repeatDelayTime !== void 0) {
656
+ this._startTime = time + this._repeatDelayTime;
657
+ } else {
658
+ this._startTime = time + this._delayTime;
659
+ }
660
+ if (this._onRepeatCallback) {
661
+ this._onRepeatCallback(this._object);
662
+ }
663
+ return true;
664
+ } else {
665
+ if (this._onCompleteCallback) {
666
+ this._onCompleteCallback(this._object);
667
+ }
668
+ for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {
669
+ this._chainedTweens[i].start(this._startTime + this._duration);
670
+ }
671
+ this._isPlaying = false;
672
+ return false;
673
+ }
674
+ }
675
+ return true;
676
+ };
677
+ Tween2.prototype._updateProperties = function(_object, _valuesStart, _valuesEnd, value) {
678
+ for (var property in _valuesEnd) {
679
+ if (_valuesStart[property] === void 0) {
680
+ continue;
681
+ }
682
+ var start = _valuesStart[property] || 0;
683
+ var end = _valuesEnd[property];
684
+ var startIsArray = Array.isArray(_object[property]);
685
+ var endIsArray = Array.isArray(end);
686
+ var isInterpolationList = !startIsArray && endIsArray;
687
+ if (isInterpolationList) {
688
+ _object[property] = this._interpolationFunction(end, value);
689
+ } else if (typeof end === "object" && end) {
690
+ this._updateProperties(_object[property], start, end, value);
691
+ } else {
692
+ end = this._handleRelativeValue(start, end);
693
+ if (typeof end === "number") {
694
+ _object[property] = start + (end - start) * value;
695
+ }
696
+ }
697
+ }
698
+ };
699
+ Tween2.prototype._handleRelativeValue = function(start, end) {
700
+ if (typeof end !== "string") {
701
+ return end;
702
+ }
703
+ if (end.charAt(0) === "+" || end.charAt(0) === "-") {
704
+ return start + parseFloat(end);
705
+ } else {
706
+ return parseFloat(end);
707
+ }
708
+ };
709
+ Tween2.prototype._swapEndStartRepeatValues = function(property) {
710
+ var tmp = this._valuesStartRepeat[property];
711
+ var endValue = this._valuesEnd[property];
712
+ if (typeof endValue === "string") {
713
+ this._valuesStartRepeat[property] = this._valuesStartRepeat[property] + parseFloat(endValue);
714
+ } else {
715
+ this._valuesStartRepeat[property] = this._valuesEnd[property];
716
+ }
717
+ this._valuesEnd[property] = tmp;
718
+ };
719
+ return Tween2;
720
+ }();
721
+ var VERSION = "18.6.4";
722
+ var nextId = Sequence.nextId;
723
+ var TWEEN = mainGroup;
724
+ var getAll = TWEEN.getAll.bind(TWEEN);
725
+ var removeAll = TWEEN.removeAll.bind(TWEEN);
726
+ var add = TWEEN.add.bind(TWEEN);
727
+ var remove = TWEEN.remove.bind(TWEEN);
728
+ var update = TWEEN.update.bind(TWEEN);
729
+ var exports = {
730
+ Easing: Easing$1,
731
+ Group,
732
+ Interpolation,
733
+ now: now$1,
734
+ Sequence,
735
+ nextId,
736
+ Tween,
737
+ VERSION,
738
+ getAll,
739
+ removeAll,
740
+ add,
741
+ remove,
742
+ update
743
+ };
744
+ const Easing = exports.Easing;
745
+ function tween(from, to, duration, easing = Easing.Linear.None) {
746
+ const tweenInstance = new exports.Tween(from).to(to, duration).easing(easing).start();
747
+ function animate(time) {
748
+ if (!tweenInstance.update(time))
749
+ return;
750
+ requestAnimationFrame(animate);
751
+ }
752
+ requestAnimationFrame(animate);
753
+ return tweenInstance;
754
+ }
755
+ var PaintBrushTypeEnum = /* @__PURE__ */ ((PaintBrushTypeEnum2) => {
756
+ PaintBrushTypeEnum2["Drawline"] = "Drawline";
757
+ PaintBrushTypeEnum2["Undo"] = "Undo";
758
+ PaintBrushTypeEnum2["Exit"] = "Exit";
759
+ return PaintBrushTypeEnum2;
760
+ })(PaintBrushTypeEnum || {});
761
+ const EVENT_SYMBOL = Symbol("$$PAINT_BRUSH_EVENT$$");
762
+ function __generateEventIfNotExisted(instance) {
763
+ if (!instance[EVENT_SYMBOL]) {
764
+ instance[EVENT_SYMBOL] = {};
765
+ }
766
+ return instance[EVENT_SYMBOL];
767
+ }
768
+ function __removeEventIfNotExisted(instance) {
769
+ if (!instance[EVENT_SYMBOL]) {
770
+ delete instance[EVENT_SYMBOL];
771
+ }
772
+ }
773
+ class Subscribe {
774
+ hasListener(name) {
775
+ const events = __generateEventIfNotExisted(this);
776
+ return events && events[name] && events[name].length > 0;
777
+ }
778
+ on(name, callback, once) {
779
+ const events = __generateEventIfNotExisted(this);
780
+ if (!events[name])
781
+ events[name] = [];
782
+ events[name].push([callback, once || false]);
783
+ return () => this.off(name, callback);
784
+ }
785
+ once(name, callback) {
786
+ return this.on(name, callback, true);
787
+ }
788
+ off(name, callback) {
789
+ if (name === void 0) {
790
+ __removeEventIfNotExisted(this);
791
+ return;
792
+ }
793
+ const events = __generateEventIfNotExisted(this);
794
+ if (!events[name])
795
+ events[name] = [];
796
+ if (callback === void 0) {
797
+ events[name].length = 0;
798
+ return;
799
+ }
800
+ let index = 0;
801
+ for (; index < events[name].length; index++) {
802
+ if (events[name][index][0] === callback)
803
+ break;
804
+ }
805
+ if (index < events[name].length) {
806
+ events[name].splice(index, 1);
807
+ }
808
+ }
809
+ emit(name, ...data) {
810
+ let canceled = false;
811
+ const events = __generateEventIfNotExisted(this);
812
+ const event = events[name] || [];
813
+ for (let one of event.slice()) {
814
+ const [callback, once = false] = one;
815
+ const result = callback(...data);
816
+ if (once)
817
+ this.off(name, callback);
818
+ if (result === false)
819
+ canceled = true;
820
+ }
821
+ return canceled;
822
+ }
823
+ }
824
+ function S4() {
825
+ return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
826
+ }
827
+ function uuid() {
828
+ return (S4() + S4() + "-" + S4() + "-4" + S4().substr(0, 3) + "-" + S4() + "-" + S4() + S4() + S4()).toLowerCase();
829
+ }
830
+ const PaintBrushStyle = `
831
+ <style type="text/css">
832
+
833
+ #_gl_paintBrush {
834
+ position: fixed;
835
+ top: 0;
836
+ bottom: 0;
837
+ left: 0;
838
+ right: 0;
839
+ transform: translateZ(0);
840
+ z-index: 1997;
841
+ pointer-events: none;
842
+ opacity: 0;
843
+ transition: all 500ms;
844
+ }
845
+
846
+ #_gl_paintBrush.brushing {
847
+ opacity: 1;
848
+ }
849
+
850
+ #_gl_paintBrush ._paintBrush-canvas {
851
+ position: absolute;
852
+ width: 100%;
853
+ height: 100%;
854
+ left: 0;
855
+ top: 0;
856
+ }
857
+
858
+ #_gl_paintBrush ._paintBrush-canvas--sync {
859
+ pointer-events: none;
860
+ z-index: 0;
861
+ position: absolute;
862
+ width: 100%;
863
+ height: 100%;
864
+ left: 0;
865
+ top: 0;
866
+ }
867
+
868
+ #_gl_paintBrush ._paintBrush-canvas {
869
+ pointer-events: none;
870
+ z-index: 1;
871
+ }
872
+
873
+ #_gl_paintBrush.brushing ._paintBrush-canvas {
874
+ pointer-events: auto;
875
+ }
876
+
877
+ #_gl_paintBrush ._paintBrush-ctrl {
878
+ width: 140px;
879
+ height: 52px;
880
+ position: absolute;
881
+ bottom: 28px;
882
+ right: 50%;
883
+ transform: translateX(50%);
884
+ font-size: 10px;
885
+ color: white;
886
+ z-index: 2;
887
+ }
888
+
889
+ #_gl_paintBrush.brushing ._paintBrush-ctrl {
890
+ pointer-events: auto;
891
+ }
892
+
893
+ #_gl_paintBrush ._paintBrush-ctrl ._paintBrush-ctrlinner {
894
+ display: flex;
895
+ justify-content: space-between;
896
+ align-items: center;
897
+ width: 100%;
898
+ height: 100%;
899
+ border-radius: 26px;
900
+ padding: 8px 16px;
901
+ box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
902
+ background-image: linear-gradient(180deg, hsl(0deg 0% 0% / 57%), hsl(0deg 0% 0% / 70%) 117%);
903
+ }
904
+
905
+ ._paintBrush-ctrlitem {
906
+ display: flex;
907
+ flex-direction: column;
908
+ justify-content: center;
909
+ align-items: center;
910
+ width: 38px;
911
+ height: 38px;
912
+ cursor: pointer;
913
+ }
914
+
915
+ ._paintBrush-ctrlitem--undo >.brush-icon{
916
+ background-image: url("//vrlab-static.ljcdn.com/release/web/revoke.ab7694ef.svg");
917
+ background-size: 100%;
918
+ width: 22px;
919
+ height: 22px;
920
+ }
921
+
922
+ ._paintBrush-ctrlitem--close >.brush-icon {
923
+ background-image: url("//vrlab-static.ljcdn.com/release/web/exit_paintbrush.02bc1341.svg");
924
+ background-size: 100%;
925
+ width: 22px;
926
+ height: 22px;
927
+ }
928
+
929
+ </style>
930
+ `;
931
+ class Controller extends Subscribe {
932
+ constructor(configs) {
933
+ super();
934
+ __publicField(this, "configs");
935
+ __publicField(this, "clientWidth");
936
+ __publicField(this, "clientHeight");
937
+ __publicField(this, "ready", false);
938
+ __publicField(this, "uuid", uuid());
939
+ __publicField(this, "tween");
940
+ __publicField(this, "tweening", false);
941
+ __publicField(this, "container");
942
+ __publicField(this, "canvas");
943
+ __publicField(this, "data", {});
944
+ __publicField(this, "tempLine", {});
945
+ this.configs = configs;
946
+ this.clientWidth = document.body.clientWidth;
947
+ this.clientHeight = document.body.clientHeight;
948
+ this.container = this.ifInsertToDOM();
949
+ this.canvas = {};
950
+ this.initCtrl();
951
+ }
952
+ get color() {
953
+ return this.configs.currentColor;
954
+ }
955
+ get state() {
956
+ return this.data;
957
+ }
958
+ get dpr() {
959
+ return this.configs.DPR || 1;
960
+ }
961
+ ifInsertToDOM() {
962
+ if (this.container) {
963
+ return this.container;
964
+ }
965
+ if (this.configs.container) {
966
+ this.configs.container.id = "_gl_paintBrush";
967
+ this.container = this.configs.container;
968
+ } else if (!document.getElementById("_gl_paintBrush")) {
969
+ const container = document.createElement("div");
970
+ container.id = "_gl_paintBrush";
971
+ document.body.appendChild(container);
972
+ this.container = container;
973
+ } else {
974
+ this.container = document.getElementById("_gl_paintBrush");
975
+ }
976
+ this.container.innerHTML = PaintBrushStyle;
977
+ return this.container;
978
+ }
979
+ initCanvas(className) {
980
+ const canvas = document.createElement("canvas");
981
+ canvas.className = className;
982
+ canvas.width = this.clientWidth;
983
+ canvas.height = this.clientHeight;
984
+ const ctx = canvas.getContext("2d");
985
+ if (!ctx)
986
+ return;
987
+ ctx.lineWidth = 5 * this.dpr;
988
+ ctx.lineCap = "round";
989
+ ctx.lineJoin = "round";
990
+ this.container.appendChild(canvas);
991
+ return canvas;
992
+ }
993
+ initCtrl() {
994
+ const ctrl = document.createElement("div");
995
+ ctrl.className = "_paintBrush-ctrl";
996
+ const ctrl_inner = document.createElement("div");
997
+ ctrl_inner.className = "_paintBrush-ctrlinner";
998
+ const a_undo = document.createElement("a");
999
+ a_undo.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--undo";
1000
+ a_undo.addEventListener("click", (e) => {
1001
+ var _a;
1002
+ e.stopPropagation();
1003
+ if (this.configs.onClickUndo) {
1004
+ this.configs.onClickUndo();
1005
+ }
1006
+ if (!this.canvas[this.uuid] || !this.data[this.uuid] || this.data[this.uuid].length === 0) {
1007
+ return;
1008
+ }
1009
+ const popState = this.data[this.uuid].pop();
1010
+ if (popState) {
1011
+ this.emitStateChange({
1012
+ type: PaintBrushTypeEnum.Undo,
1013
+ color: this.color,
1014
+ ready: this.ready,
1015
+ state: popState,
1016
+ uuid: this.uuid
1017
+ });
1018
+ }
1019
+ const $ctx = (_a = this.canvas[this.uuid]) == null ? void 0 : _a.getContext("2d");
1020
+ if (!this.canvas[this.uuid]) {
1021
+ return;
1022
+ }
1023
+ const { width, height } = this.canvas[this.uuid];
1024
+ if ($ctx) {
1025
+ $ctx.clearRect(0, 0, width, height);
1026
+ }
1027
+ this.data[this.uuid].forEach((ld) => this.handleDrawLine(this.uuid, ld, { withUndo: true }));
1028
+ });
1029
+ const a_close = document.createElement("a");
1030
+ a_close.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--close";
1031
+ a_close.addEventListener("click", (e) => {
1032
+ e.stopPropagation();
1033
+ this.closeBrush();
1034
+ if (this.configs.onClickClose) {
1035
+ this.configs.onClickClose();
1036
+ }
1037
+ });
1038
+ const $A = [a_undo, a_close];
1039
+ $A.forEach(($a) => {
1040
+ const $i = document.createElement("i");
1041
+ $i.className = "brush-icon";
1042
+ const $span = document.createElement("span");
1043
+ $span.className = "brush-txt";
1044
+ $span.innerText = $a.className.endsWith("undo") ? this.configs.onUndoText : this.configs.onExitText;
1045
+ $a.appendChild($i);
1046
+ $a.appendChild($span);
1047
+ });
1048
+ ctrl_inner.appendChild(a_undo);
1049
+ ctrl_inner.appendChild(a_close);
1050
+ ctrl.appendChild(ctrl_inner);
1051
+ this.container.appendChild(ctrl);
1052
+ return ctrl;
1053
+ }
1054
+ openBrush() {
1055
+ if (this.ready)
1056
+ return;
1057
+ if (!this.canvas[this.uuid]) {
1058
+ this.canvas[this.uuid] = this.initCanvas("_paintBrush-canvas");
1059
+ }
1060
+ this.container.className = "brushing";
1061
+ const $curCanvas = this.canvas[this.uuid];
1062
+ const $ctx = $curCanvas.getContext("2d");
1063
+ $ctx.clearRect(0, 0, $curCanvas.width, $curCanvas.height);
1064
+ this.openBrushHandle();
1065
+ this.ready = true;
1066
+ this.emit("readyChange", true);
1067
+ }
1068
+ closeBrush() {
1069
+ if (!this.ready)
1070
+ return;
1071
+ this.container.className = "";
1072
+ this.data = {};
1073
+ this.tempLine = {};
1074
+ Object.keys(this.canvas).forEach((key) => {
1075
+ this.canvas[key].ontouchstart = () => false;
1076
+ this.canvas[key].ontouchmove = () => false;
1077
+ this.canvas[key].ontouchend = () => false;
1078
+ this.canvas[key].ontouchcancel = () => false;
1079
+ const $ctx = this.canvas[key].getContext("2d");
1080
+ if ($ctx) {
1081
+ $ctx.clearRect(0, 0, this.canvas[key].width, this.canvas[key].height);
1082
+ }
1083
+ });
1084
+ this.ready = false;
1085
+ this.emit("readyChange", false);
1086
+ this.emitStateChange({
1087
+ type: PaintBrushTypeEnum.Exit,
1088
+ color: this.color,
1089
+ ready: false,
1090
+ uuid: this.uuid
1091
+ });
1092
+ }
1093
+ updateCurrentColor(color) {
1094
+ const currentCanvas = this.canvas[this.uuid];
1095
+ if (!currentCanvas)
1096
+ return;
1097
+ const currentCtx = currentCanvas.getContext("2d");
1098
+ if (!currentCtx)
1099
+ return;
1100
+ this.configs.currentColor = color;
1101
+ currentCtx.strokeStyle = color;
1102
+ }
1103
+ openBrushHandle() {
1104
+ const currentCanvas = this.canvas[this.uuid];
1105
+ if (!currentCanvas)
1106
+ return;
1107
+ const currentCtx = currentCanvas.getContext("2d");
1108
+ if (!currentCtx)
1109
+ return;
1110
+ const color = this.color || "#6D92FF";
1111
+ currentCtx.strokeStyle = color;
1112
+ let begin = null;
1113
+ let points = [];
1114
+ let move;
1115
+ let line = [];
1116
+ let startTime = 0;
1117
+ const draw = (beginPoint, controlPoint, endPoint) => {
1118
+ const color2 = this.color || "#ff0000";
1119
+ currentCtx.strokeStyle = color2;
1120
+ currentCtx.beginPath();
1121
+ currentCtx.moveTo(beginPoint.x, beginPoint.y);
1122
+ currentCtx.quadraticCurveTo(controlPoint.x, controlPoint.y, endPoint.x, endPoint.y);
1123
+ currentCtx.stroke();
1124
+ };
1125
+ currentCanvas.onmousedown = (e) => {
1126
+ e.preventDefault();
1127
+ startTime = Date.now();
1128
+ const x = e.clientX;
1129
+ const y = e.clientY;
1130
+ points = [];
1131
+ points.push({ x, y });
1132
+ begin = { x, y };
1133
+ move = transformCoords({ x, y }, this.clientWidth, this.clientHeight);
1134
+ line = [];
1135
+ };
1136
+ currentCanvas.onmousemove = (e) => {
1137
+ e.preventDefault();
1138
+ if (!begin)
1139
+ return;
1140
+ const x = Number(e.clientX);
1141
+ const y = Number(e.clientY);
1142
+ if (Math.abs(x - begin.x) < 5 && Math.abs(y - begin.y) < 5) {
1143
+ return;
1144
+ }
1145
+ points.push({ x, y });
1146
+ line.push(transformCoords({ x, y }, this.clientWidth, this.clientHeight));
1147
+ if (points.length < 3) {
1148
+ return;
1149
+ }
1150
+ const { control, end } = getQuadraticCurvePoint(points);
1151
+ if (!control || !end) {
1152
+ return;
1153
+ }
1154
+ draw(begin, control, end);
1155
+ begin = end;
1156
+ };
1157
+ currentCanvas.onmouseup = (e) => {
1158
+ e.preventDefault();
1159
+ begin = null;
1160
+ if (points.length < 3)
1161
+ return;
1162
+ if (!this.data[this.uuid]) {
1163
+ this.data[this.uuid] = [];
1164
+ }
1165
+ const duration = Date.now() - startTime;
1166
+ const state2 = {
1167
+ move: Object.assign({}, move),
1168
+ uuid: this.uuid,
1169
+ line: [...line],
1170
+ color: this.color,
1171
+ duration: duration < 1280 ? duration : duration < 2e3 ? 1280 : 0
1172
+ };
1173
+ this.data[this.uuid].push(state2);
1174
+ nextFrame(() => {
1175
+ this.emitStateChange({
1176
+ type: PaintBrushTypeEnum.Drawline,
1177
+ color: this.color,
1178
+ ready: this.ready,
1179
+ state: state2,
1180
+ uuid: this.uuid
1181
+ });
1182
+ });
1183
+ };
1184
+ currentCanvas.ontouchstart = (e) => {
1185
+ e.preventDefault();
1186
+ startTime = Date.now();
1187
+ const x = e.touches[0].clientX;
1188
+ const y = e.touches[0].clientY;
1189
+ points = [];
1190
+ points.push({ x, y });
1191
+ begin = { x, y };
1192
+ console.log("ontouchstart", x, y, begin);
1193
+ move = transformCoords({ x, y }, this.clientWidth, this.clientHeight);
1194
+ line = [];
1195
+ };
1196
+ currentCanvas.ontouchmove = (e) => {
1197
+ e.preventDefault();
1198
+ if (!begin)
1199
+ return;
1200
+ const x = Number(e.touches[0].clientX);
1201
+ const y = Number(e.touches[0].clientY);
1202
+ if (Math.abs(x - begin.x) < 5 && Math.abs(y - begin.y) < 5)
1203
+ return;
1204
+ points.push({ x, y });
1205
+ line.push(transformCoords({ x, y }, this.clientWidth, this.clientHeight));
1206
+ if (points.length < 3)
1207
+ return;
1208
+ const { control, end } = getQuadraticCurvePoint(points);
1209
+ if (!control || !end)
1210
+ return;
1211
+ draw(begin, control, end);
1212
+ begin = end;
1213
+ };
1214
+ currentCanvas.ontouchend = currentCanvas.ontouchcancel = (e) => {
1215
+ e.preventDefault();
1216
+ begin = null;
1217
+ if (points.length < 3)
1218
+ return;
1219
+ if (!this.data[this.uuid]) {
1220
+ this.data[this.uuid] = [];
1221
+ }
1222
+ const duration = Date.now() - startTime;
1223
+ const state2 = {
1224
+ move: Object.assign({}, move),
1225
+ line: [...line],
1226
+ uuid: this.uuid,
1227
+ color: this.color,
1228
+ duration: duration < 1280 ? duration : duration < 2e3 ? 1280 : 0
1229
+ };
1230
+ this.data[this.uuid].push(state2);
1231
+ nextFrame(() => {
1232
+ this.emitStateChange({
1233
+ type: PaintBrushTypeEnum.Drawline,
1234
+ color: this.color,
1235
+ ready: this.ready,
1236
+ state: state2,
1237
+ uuid: this.uuid
1238
+ });
1239
+ });
1240
+ };
1241
+ }
1242
+ emitStateChange(action, userAction = true) {
1243
+ if (action.type !== PaintBrushTypeEnum.Drawline) {
1244
+ this.emit("stateChange", action, userAction);
1245
+ return;
1246
+ }
1247
+ const timestamp = Date.now();
1248
+ const state2 = action.state;
1249
+ if (!state2)
1250
+ return;
1251
+ if (!state2.line)
1252
+ return;
1253
+ const sliceCount = Math.ceil(state2.line.length / 100);
1254
+ for (let i = 0; i < sliceCount; i++) {
1255
+ const localityAction = {
1256
+ uuid: this.uuid,
1257
+ color: this.color,
1258
+ ready: this.ready,
1259
+ type: action.type,
1260
+ state: {
1261
+ uuid: this.uuid,
1262
+ move: state2.move,
1263
+ duration: state2.duration,
1264
+ color: this.color,
1265
+ line: state2.line.slice(i * 100, (i + 1) * 100)
1266
+ },
1267
+ timestamp,
1268
+ end: i === sliceCount - 1
1269
+ };
1270
+ execInterval(i, 20, () => {
1271
+ this.emit("stateChange", localityAction, userAction);
1272
+ });
1273
+ }
1274
+ }
1275
+ action(action) {
1276
+ const { ready, type, uuid: uuid2 } = action;
1277
+ if (!ready && this.ready) {
1278
+ this.closeBrush();
1279
+ return;
1280
+ }
1281
+ if (ready && !this.ready) {
1282
+ this.openBrush();
1283
+ return;
1284
+ }
1285
+ if (!this.ready) {
1286
+ return;
1287
+ }
1288
+ switch (type) {
1289
+ case PaintBrushTypeEnum.Drawline:
1290
+ const { state: state2, timestamp, end } = action;
1291
+ if (!timestamp)
1292
+ return;
1293
+ if (!state2)
1294
+ return;
1295
+ this.tempLine[timestamp] = [].concat(this.tempLine[timestamp] || [], state2.line);
1296
+ if (end) {
1297
+ Object.assign(state2, { line: this.tempLine[timestamp] });
1298
+ this.handleDrawLine(uuid2, state2, {}, () => delete this.tempLine[timestamp]);
1299
+ }
1300
+ break;
1301
+ case PaintBrushTypeEnum.Undo:
1302
+ this.handleUndo(uuid2);
1303
+ break;
1304
+ }
1305
+ }
1306
+ handleDrawLine(_uuid, data, { withUndo = false }, callback = noop) {
1307
+ if (!data || Object.prototype.toString.call(data) != "[object Object]" || Object.keys(data).length === 0) {
1308
+ return;
1309
+ }
1310
+ console.log("handleDrawLine", data, data.line);
1311
+ queue(() => {
1312
+ return new Promise((resolve) => {
1313
+ if (!withUndo) {
1314
+ if (!this.canvas[_uuid]) {
1315
+ this.canvas[_uuid] = this.initCanvas("_paintBrush-canvas--sync");
1316
+ }
1317
+ if (!this.data[_uuid]) {
1318
+ this.data[_uuid] = [];
1319
+ }
1320
+ this.data[_uuid].push(data);
1321
+ }
1322
+ if (!this.canvas[_uuid]) {
1323
+ return;
1324
+ }
1325
+ const $ctx = this.canvas[_uuid].getContext("2d");
1326
+ if (!$ctx)
1327
+ return;
1328
+ const { line = [], color = "black", duration = 0, uuid: uuid2 } = data;
1329
+ const move = unTransformCoords(data.move || {}, this.clientWidth, this.clientHeight);
1330
+ let points = [move];
1331
+ $ctx.strokeStyle = color;
1332
+ $ctx.beginPath();
1333
+ $ctx.moveTo(move.x, move.y);
1334
+ if (duration && !withUndo) {
1335
+ let drawCache = [];
1336
+ const self2 = this;
1337
+ self2.tween = tween({ step: 0 }, { step: line.length - 1 }, duration).onUpdate(({ step }) => {
1338
+ var _a;
1339
+ self2.tweening = true;
1340
+ if (!self2.ready) {
1341
+ $ctx.clearRect(0, 0, self2.canvas[uuid2].width, self2.canvas[uuid2].height);
1342
+ return (_a = self2.tween) == null ? void 0 : _a.stop();
1343
+ }
1344
+ const i = Math.floor(step);
1345
+ if (!drawCache.find((dc) => dc === i)) {
1346
+ drawCache.push(i);
1347
+ console.log("__debug__", line, line[i], i);
1348
+ points.push(unTransformCoords(line[i], self2.clientWidth, self2.clientHeight));
1349
+ if (points.length < 3)
1350
+ return;
1351
+ const { control, end } = getQuadraticCurvePoint(points);
1352
+ if (!control || !end)
1353
+ return;
1354
+ $ctx.quadraticCurveTo(control.x, control.y, end.x, end.y);
1355
+ $ctx.stroke();
1356
+ }
1357
+ }).onComplete((e) => {
1358
+ self2.tween = void 0;
1359
+ self2.tweening = false;
1360
+ drawCache = [];
1361
+ points = [];
1362
+ if (callback)
1363
+ callback();
1364
+ resolve();
1365
+ });
1366
+ } else {
1367
+ for (let i = 0; i < line.length; i++) {
1368
+ points.push(unTransformCoords(line[i], this.clientWidth, this.clientHeight));
1369
+ if (points.length < 3)
1370
+ continue;
1371
+ const { control, end } = getQuadraticCurvePoint(points);
1372
+ if (!control || !end)
1373
+ continue;
1374
+ $ctx.quadraticCurveTo(control.x, control.y, end.x, end.y);
1375
+ }
1376
+ $ctx.stroke();
1377
+ points = [];
1378
+ if (callback)
1379
+ callback();
1380
+ resolve();
1381
+ }
1382
+ });
1383
+ });
1384
+ }
1385
+ handleUndo(uuid2) {
1386
+ console.log("handleUndo", uuid2, this.canvas[uuid2]);
1387
+ if (!this.canvas[uuid2] || !this.data[uuid2] || this.data[uuid2].length === 0) {
1388
+ return;
1389
+ }
1390
+ this.data[uuid2].pop();
1391
+ const handle = () => {
1392
+ var _a;
1393
+ const $ctx = (_a = this.canvas[uuid2]) == null ? void 0 : _a.getContext("2d");
1394
+ if ($ctx) {
1395
+ $ctx.clearRect(0, 0, this.canvas[uuid2].width, this.canvas[uuid2].height);
1396
+ }
1397
+ this.data[uuid2].forEach((ld) => this.handleDrawLine(uuid2, ld, { withUndo: true }));
1398
+ };
1399
+ if (this.tween && this.tweening) {
1400
+ this.tween.stop();
1401
+ nextFrame(handle, 60);
1402
+ return;
1403
+ }
1404
+ handle();
1405
+ }
1406
+ destroyBrush() {
1407
+ this.closeBrush();
1408
+ this.ready = false;
1409
+ this.emit("readyChange", true);
1410
+ }
1411
+ }
1412
+ class PaintBrush {
1413
+ constructor(configs = {}) {
1414
+ __publicField(this, "controller");
1415
+ const _configs = Object.assign({
1416
+ currentColor: "#f44336",
1417
+ onUndoText: "\u56DE\u9000",
1418
+ onExitText: "\u5173\u95ED"
1419
+ }, configs);
1420
+ this.controller = new Controller(_configs);
1421
+ }
1422
+ on(name, callback) {
1423
+ this.controller.on(name, callback);
1424
+ }
1425
+ off(name, callback) {
1426
+ this.controller.off(name, callback);
1427
+ }
1428
+ once(name, callback) {
1429
+ this.controller.once(name, callback);
1430
+ }
1431
+ show() {
1432
+ this.controller.openBrush();
1433
+ }
1434
+ action(action) {
1435
+ this.controller.action(action);
1436
+ }
1437
+ get state() {
1438
+ return this.controller.state;
1439
+ }
1440
+ get configs() {
1441
+ return this.controller.configs;
1442
+ }
1443
+ dispose() {
1444
+ return this.controller.destroyBrush();
1445
+ }
1446
+ setCurrentColor(color) {
1447
+ this.controller.updateCurrentColor(color);
1448
+ }
1449
+ }
1450
+ export { PaintBrush, PaintBrushTypeEnum };