@realsee/dnalogel 0.1.3 → 0.1.7-alpha.10

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 (301) hide show
  1. package/components/ARVideoFigure/ARVideoFigureMesh.js +56 -32
  2. package/components/ARVideoFigure/ARVideoFigureScene.js +30 -19
  3. package/components/ARVideoFigure/ImgBgTransparent.js +22 -6
  4. package/components/ARVideoFigure/ImgBgTransparentMesh.js +40 -30
  5. package/components/ARVideoFigure/fragmentShader.js +2 -0
  6. package/components/ARVideoFigure/index.js +22 -6
  7. package/components/ARVideoFigure/vertexShader.js +2 -0
  8. package/components/GLTFView/index.d.ts +123 -0
  9. package/components/GLTFView/index.js +204 -0
  10. package/components/GlassFilters/index.js +25 -1
  11. package/components/ModelView/ModelViewController.js +39 -29
  12. package/components/ModelView/index.js +4 -2
  13. package/components/PaintBrush/index.js +15 -1
  14. package/components/PanoTag/index.js +2 -0
  15. package/data/1aGKl9JmrlXMXx8d.js +2 -0
  16. package/data/54djM0oR6ky3Ey8e.d.ts +55 -0
  17. package/data/54djM0oR6ky3Ey8e.js +350 -0
  18. package/data/6gyq3v1verxD7JO1.js +2 -0
  19. package/data/8054djM0oR6ky3Ey8e.d.ts +55 -0
  20. package/data/8054djM0oR6ky3Ey8e.js +350 -0
  21. package/data/81zxMaeVKLQU93OZMG.d.ts +49 -0
  22. package/data/81zxMaeVKLQU93OZMG.js +633 -0
  23. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +2 -0
  24. package/data/PrXel3aqGbp34JQn.js +141 -1
  25. package/data/XJ6NMLWnkAY3Rdx8.js +2 -0
  26. package/data/YdoNP9K4rwQDwjJr.js +2 -0
  27. package/data/ZLvK29zj4L29Jowd.d.ts +55 -0
  28. package/data/ZLvK29zj4L29Jowd.js +372 -0
  29. package/data/_vLykj3NWrllMrG06.d.ts +95 -0
  30. package/data/_vLykj3NWrllMrG06.js +1 -0
  31. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +2 -0
  32. package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +5 -0
  33. package/data/extrude-walls/ZLvK29zj4L29Jowd.js +14 -0
  34. package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +5 -0
  35. package/data/extrude-walls/lo024DEgzanMj5BE.js +14 -0
  36. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +2 -0
  37. package/data/lo024DEgzanMj5BE.d.ts +55 -0
  38. package/data/lo024DEgzanMj5BE.js +966 -0
  39. package/data/oPzy3ApbjjpD8YdR.js +2 -0
  40. package/data/qjAxMG4XbPn96wKG.js +2 -0
  41. package/data/rXel3aPQRRBD4JQn.js +2 -0
  42. package/data/vLykj3NWrllMrG06.js +337 -71
  43. package/data/wz0QV9KA4ugyo9ME.js +2 -0
  44. package/data/zxMawr9raSg8LYjG.js +2 -0
  45. package/examples/FiveStateController/index.js +9 -15
  46. package/examples/VRHouse/Mobile.js +15 -1
  47. package/examples/VRHouse/PC.js +15 -1
  48. package/examples/VRHouse/index.js +15 -1
  49. package/index.js +4 -2
  50. package/libs/gltf-viewer/Subscribe.d.ts +76 -0
  51. package/libs/gltf-viewer/Subscribe.js +231 -0
  52. package/libs/gltf-viewer/coordsMoveByOffset.d.ts +13 -0
  53. package/libs/gltf-viewer/coordsMoveByOffset.js +22 -0
  54. package/libs/gltf-viewer/coordsToDirection.d.ts +5 -0
  55. package/{components/PBRView/index.js → libs/gltf-viewer/coordsToDirection.js} +29 -19
  56. package/libs/gltf-viewer/formatRad.d.ts +1 -0
  57. package/libs/gltf-viewer/formatRad.js +13 -0
  58. package/libs/gltf-viewer/getFrameTime.d.ts +1 -0
  59. package/libs/gltf-viewer/getFrameTime.js +28 -0
  60. package/libs/gltf-viewer/index.d.ts +79 -0
  61. package/libs/gltf-viewer/index.js +765 -0
  62. package/libs/gltf-viewer/mouseWheel.d.ts +2 -0
  63. package/libs/gltf-viewer/mouseWheel.js +59 -0
  64. package/libs/gltf-viewer/requestAnimationFrame.d.ts +1 -0
  65. package/libs/gltf-viewer/requestAnimationFrame.js +18 -0
  66. package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +1 -0
  67. package/libs/gltf-viewer/requestAnimationFrameInterval.js +31 -0
  68. package/libs/gltf-viewer/uuid.d.ts +4 -0
  69. package/libs/gltf-viewer/uuid.js +28 -0
  70. package/package.json +8 -4
  71. package/plugins/AutoPreloadPlugin/index.js +26 -0
  72. package/plugins/CSS3DRenderPlugin/components/Marker/index.js +24 -16
  73. package/plugins/CSS3DRenderPlugin/index.js +45 -12
  74. package/plugins/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  75. package/plugins/CSS3DRenderPlugin/utils/createResizeObserver.js +34 -0
  76. package/plugins/CameraMovementPlugin/index.js +33 -9
  77. package/plugins/CameraMovementPlugin/typing.js +2 -0
  78. package/plugins/ModelChassisCompassPlugin/index.d.ts +1 -1
  79. package/plugins/ModelChassisCompassPlugin/index.js +25 -10
  80. package/plugins/ModelEntryDoorGuidePlugin/index.d.ts +6 -2
  81. package/plugins/ModelEntryDoorGuidePlugin/index.js +55 -28
  82. package/plugins/ModelExtrudeWallsPlugin/index.d.ts +16 -0
  83. package/plugins/ModelExtrudeWallsPlugin/index.js +252 -0
  84. package/plugins/ModelRoomLabelPlugin/Controller.js +30 -23
  85. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +26 -8
  86. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +35 -25
  87. package/plugins/ModelRoomLabelPlugin/index.d.ts +4 -0
  88. package/plugins/ModelRoomLabelPlugin/index.js +9 -2
  89. package/plugins/ModelRoomLabelPlugin/typings.js +2 -0
  90. package/plugins/ModelRoomLabelPlugin/utils/parseData.js +6 -0
  91. package/plugins/ModelTVVideoPlugin/index.js +100 -16
  92. package/plugins/ModelViewPlugin/index.js +25 -1
  93. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +29 -25
  94. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +15 -1
  95. package/plugins/PanoCursorRaycasterPlugin/index.js +13 -6
  96. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +4 -2
  97. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +15 -1
  98. package/plugins/PanoDoorLabelPlugin/index.js +2 -0
  99. package/plugins/PanoIRobotPlugin/index.js +2 -0
  100. package/plugins/PanoMaskSelectorPlugin/compare.js +2 -0
  101. package/plugins/PanoMaskSelectorPlugin/createBox.js +22 -1
  102. package/plugins/PanoMaskSelectorPlugin/createTextures.js +17 -1
  103. package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +2 -0
  104. package/plugins/PanoMaskSelectorPlugin/index.js +106 -18
  105. package/plugins/PanoMaskSelectorPlugin/vertexShader.js +2 -0
  106. package/plugins/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
  107. package/plugins/PanoMeasurePlugin/Controller/BaseController.js +103 -0
  108. package/plugins/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  109. package/plugins/PanoMeasurePlugin/Controller/EditController.js +341 -0
  110. package/plugins/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  111. package/plugins/PanoMeasurePlugin/Controller/ShortcutKeyController.js +69 -0
  112. package/plugins/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
  113. package/plugins/PanoMeasurePlugin/Controller/WatchController.js +371 -0
  114. package/plugins/PanoMeasurePlugin/Controller/index.d.ts +61 -0
  115. package/plugins/PanoMeasurePlugin/Controller/index.js +230 -0
  116. package/plugins/PanoMeasurePlugin/Model/index.d.ts +38 -0
  117. package/plugins/PanoMeasurePlugin/Model/index.js +235 -0
  118. package/plugins/PanoMeasurePlugin/Model/line.d.ts +30 -0
  119. package/plugins/PanoMeasurePlugin/Model/line.js +121 -0
  120. package/plugins/PanoMeasurePlugin/Model/point.d.ts +16 -0
  121. package/plugins/PanoMeasurePlugin/Model/point.js +68 -0
  122. package/plugins/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  123. package/plugins/PanoMeasurePlugin/Model/polyline.js +109 -0
  124. package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  125. package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +11 -0
  126. package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  127. package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +11 -0
  128. package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  129. package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +11 -0
  130. package/plugins/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
  131. package/plugins/PanoMeasurePlugin/Modules/DeleteDom/index.js +182 -0
  132. package/plugins/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  133. package/plugins/PanoMeasurePlugin/Modules/FiveHelper.js +66 -0
  134. package/plugins/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  135. package/plugins/PanoMeasurePlugin/Modules/GuideController.js +107 -0
  136. package/plugins/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
  137. package/plugins/PanoMeasurePlugin/Modules/Magnifier.js +139 -0
  138. package/plugins/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
  139. package/plugins/PanoMeasurePlugin/Modules/UIController/HTML.js +26 -0
  140. package/plugins/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
  141. package/plugins/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +169 -0
  142. package/plugins/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
  143. package/plugins/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +59 -0
  144. package/plugins/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
  145. package/plugins/PanoMeasurePlugin/Modules/UIController/index.js +123 -0
  146. package/plugins/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
  147. package/plugins/PanoMeasurePlugin/Modules/UIController/style.js +103 -0
  148. package/plugins/PanoMeasurePlugin/index.d.ts +7 -0
  149. package/plugins/PanoMeasurePlugin/index.js +20 -0
  150. package/plugins/PanoMeasurePlugin/typings/data.d.ts +28 -0
  151. package/plugins/PanoMeasurePlugin/typings/data.js +7 -0
  152. package/plugins/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
  153. package/plugins/PanoMeasurePlugin/typings/event.type.js +7 -0
  154. package/plugins/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  155. package/plugins/PanoMeasurePlugin/typings/utils.type.js +7 -0
  156. package/plugins/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  157. package/plugins/PanoMeasurePlugin/utils/clearGroup.js +16 -0
  158. package/plugins/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  159. package/plugins/PanoMeasurePlugin/utils/constants.js +47 -0
  160. package/plugins/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  161. package/plugins/PanoMeasurePlugin/utils/distanceDom.js +147 -0
  162. package/plugins/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  163. package/plugins/PanoMeasurePlugin/utils/findAssociatedLines.js +37 -0
  164. package/plugins/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  165. package/plugins/PanoMeasurePlugin/utils/findClosestPoint.js +49 -0
  166. package/plugins/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  167. package/plugins/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +20 -0
  168. package/plugins/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  169. package/plugins/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +33 -0
  170. package/plugins/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  171. package/plugins/PanoMeasurePlugin/utils/ironbox.js +14 -0
  172. package/plugins/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  173. package/plugins/PanoMeasurePlugin/utils/isNDCPointInScreen.js +16 -0
  174. package/plugins/PanoMeasurePlugin/utils/line.d.ts +17 -0
  175. package/plugins/PanoMeasurePlugin/utils/line.js +61 -0
  176. package/plugins/PanoMeasurePlugin/utils/math.d.ts +17 -0
  177. package/plugins/PanoMeasurePlugin/utils/math.js +57 -0
  178. package/plugins/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
  179. package/plugins/PanoMeasurePlugin/utils/mouseGroup.js +42 -0
  180. package/plugins/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  181. package/plugins/PanoMeasurePlugin/utils/ndc2Screen.js +16 -0
  182. package/plugins/PanoRulerPlugin/data/roomInfo.js +2 -0
  183. package/plugins/PanoRulerPlugin/data/roomRules.js +2 -0
  184. package/plugins/PanoRulerPlugin/index.d.ts +4 -0
  185. package/plugins/PanoRulerPlugin/index.js +74 -21
  186. package/plugins/PanoRulerPlugin/typings.js +2 -0
  187. package/plugins/PanoTVVideoPlugin/index.d.ts +2 -0
  188. package/plugins/PanoTVVideoPlugin/index.js +108 -26
  189. package/plugins/TreasurePlugin/Controller.js +58 -52
  190. package/plugins/TreasurePlugin/TreasureFaceAnime.js +36 -21
  191. package/plugins/TreasurePlugin/TreasureObject.js +60 -56
  192. package/plugins/TreasurePlugin/TreasureOpenAnime.js +38 -19
  193. package/plugins/TreasurePlugin/constants.js +2 -0
  194. package/plugins/TreasurePlugin/index.js +2 -0
  195. package/plugins/TreasurePlugin/typings.js +2 -0
  196. package/plugins/floorplan/Assets/floorplanExtraObject.d.ts +1 -1
  197. package/plugins/floorplan/Assets/floorplanExtraObject.js +5 -3
  198. package/plugins/floorplan/ModelFloorplanPlugin/Controller.d.ts +5 -2
  199. package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +93 -99
  200. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +25 -7
  201. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +22 -8
  202. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +28 -4
  203. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +25 -5
  204. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomMaterial.d.ts +11 -0
  205. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomMaterial.js +174 -0
  206. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RuleLabels.d.ts +8 -0
  207. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RuleLabels.js +178 -0
  208. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +2 -0
  209. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +32 -6
  210. package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +3 -0
  211. package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +30 -8
  212. package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +2 -0
  213. package/plugins/floorplan/ModelFloorplanPlugin/index.js +4 -2
  214. package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +2 -0
  215. package/plugins/floorplan/ModelFloorplanPlugin/typings/utility.d.ts +2 -0
  216. package/plugins/floorplan/ModelFloorplanPlugin/typings/utility.js +7 -0
  217. package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
  218. package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +3 -1
  219. package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +14 -22
  220. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +26 -3
  221. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +10 -6
  222. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +21 -5
  223. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +28 -4
  224. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +22 -6
  225. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +29 -19
  226. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +2 -0
  227. package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +1 -1
  228. package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +47 -50
  229. package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +4 -2
  230. package/plugins/floorplan/TopviewFloorplanPlugin/Controller.d.ts +3 -0
  231. package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +66 -61
  232. package/plugins/floorplan/TopviewFloorplanPlugin/index.js +2 -0
  233. package/plugins/floorplan/TopviewFloorplanPlugin/style.js +2 -0
  234. package/plugins/floorplan/components/FloorplanImage.js +15 -1
  235. package/plugins/floorplan/index.d.ts +4 -0
  236. package/plugins/floorplan/index.js +13 -0
  237. package/plugins/floorplan/typings/floorplanData.d.ts +2 -0
  238. package/plugins/floorplan/typings/floorplanData.js +2 -0
  239. package/plugins/floorplan/typings/floorplanServerData.d.ts +3 -1
  240. package/plugins/floorplan/typings/floorplanServerData.js +5 -3
  241. package/plugins/floorplan/utils/formatData.js +31 -12
  242. package/plugins/floorplan/utils/formatPosition.js +10 -8
  243. package/shared-utils/Preloader.js +6 -0
  244. package/shared-utils/Subscribe.js +36 -16
  245. package/shared-utils/animationFrame/BetterTween.js +28 -27
  246. package/shared-utils/animationFrame/calculateProgress.js +2 -0
  247. package/shared-utils/animationFrame/formatRad.js +2 -0
  248. package/shared-utils/animationFrame/index.js +12 -0
  249. package/shared-utils/animationFrame/tween.js +17 -1
  250. package/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  251. package/shared-utils/{changeModelCanvansOpacity.js → changeModelCanvasOpacity.js} +16 -2
  252. package/shared-utils/createCanvasTextTexture.js +2 -0
  253. package/shared-utils/createFiveContainer.js +23 -17
  254. package/shared-utils/createLine/index.js +15 -1
  255. package/shared-utils/debounce.js +4 -0
  256. package/shared-utils/equal.js +15 -4
  257. package/shared-utils/filter.js +36 -2
  258. package/shared-utils/five/changeMode.js +13 -17
  259. package/shared-utils/five/useFivePlugin.js +2 -0
  260. package/shared-utils/formatRad.js +2 -0
  261. package/shared-utils/getPxmm.js +15 -1
  262. package/shared-utils/getRandomColor.js +10 -0
  263. package/shared-utils/isNil.js +2 -0
  264. package/shared-utils/isTruelyObject.js +4 -0
  265. package/shared-utils/math/evenNumber.d.ts +3 -1
  266. package/shared-utils/math/evenNumber.js +6 -2
  267. package/shared-utils/math/planimetry.js +10 -0
  268. package/shared-utils/math/rad2Deg.js +2 -0
  269. package/shared-utils/nearlyEqual.js +2 -0
  270. package/shared-utils/nextFrame.js +2 -0
  271. package/shared-utils/noop.js +2 -0
  272. package/shared-utils/object3d2LocalMatrix.js +20 -14
  273. package/shared-utils/px2rem.js +10 -0
  274. package/shared-utils/removeArrayItem.d.ts +7 -0
  275. package/shared-utils/removeArrayItem.js +22 -0
  276. package/shared-utils/tap.js +2 -0
  277. package/shared-utils/three/centerPoint.js +2 -0
  278. package/shared-utils/three/getExtraModelLoader.js +14 -0
  279. package/shared-utils/three/getNormal.js +4 -0
  280. package/shared-utils/three/getTextureLoader.js +16 -0
  281. package/shared-utils/three/loadFbxObj.js +13 -5
  282. package/shared-utils/three/loadTexture.d.ts +2 -2
  283. package/shared-utils/three/loadTexture.js +33 -6
  284. package/shared-utils/three/transformPositionToVector3.js +2 -0
  285. package/shared-utils/three/transfromToMeshBasicMaterial.js +6 -0
  286. package/shared-utils/throttle.js +4 -0
  287. package/shared-utils/to.js +8 -4
  288. package/shared-utils/useDebounce.js +6 -0
  289. package/shared-utils/useThrottle.js +6 -0
  290. package/shared-utils/uuid.js +8 -0
  291. package/shared-utils/vectorTocoordinates.js +2 -0
  292. package/typedoc/components.js +2 -0
  293. package/typedoc/libs.d.ts +1 -0
  294. package/typedoc/libs.js +7 -0
  295. package/typedoc/plugins.js +2 -0
  296. package/typedoc/shared-utils.js +2 -0
  297. package/typedoc/typings.js +2 -0
  298. package/typings/math.type.js +2 -0
  299. package/typings/utils.type.js +2 -0
  300. package/components/PBRView/index.d.ts +0 -14
  301. package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.MAIN_NORMAL_PATH = exports.MAIN_MOUSE_LEAVE_FILL = exports.MAIN_MOUSE_ENTER_FILL = exports.MAIN_DONE_PATH = void 0;
9
+
10
+ require("core-js/modules/es.array.concat.js");
11
+
12
+ var MAIN_NORMAL_PATH = 'M31.379 15.466a1.045 1.045 0 0 1-.92 1.076l-11.276.607a1.6 1.6 0 0 0-1.512 1.511l-.599 11.113a1.045 1.045 0 0 1-.92 1.075l-.164.008a1.183 1.183 0 0 1-1.123-.975l-.016-.164-.221-10.768a1.6 1.6 0 0 0-1.567-1.567l-11.3-.231-.165-.016a1.187 1.187 0 0 1-.964-.996l-.01-.127.007-.164c.061-.496.455-.876.958-.917l.118-.003 11.112-.599a1.6 1.6 0 0 0 1.498-1.37l.014-.142.607-11.276a1.045 1.045 0 0 1 1.076-.92c.573.015 1.055.46 1.13 1.019l.009.121.221 10.766a1.6 1.6 0 0 0 1.567 1.566l11.3.234a1.181 1.181 0 0 1 1.14 1.139z';
13
+ exports.MAIN_NORMAL_PATH = MAIN_NORMAL_PATH;
14
+ var MAIN_DONE_PATH = 'M27.1772552,8.15828895 C27.8664561,7.48070421 28.5574369,7.81156875 28.8336646,8.04968716 C29.1098924,8.28780557 29.3990219,9.110014 28.8256559,9.79263351 L28.7110903,9.9165024 L13.9697229,25.1399531 C13.3288458,25.7700285 12.3239388,25.8070917 11.6402346,25.2511429 L11.5159715,25.1399531 L3.7056151,18.0063788 C3.01641417,17.3287941 3.00699739,16.2207954 3.68458213,15.5315945 C4.32230894,14.8829348 5.3413021,14.8364368 6.03356826,15.3981178 L6.15936649,15.5105615 L12.6856594,21.9049888 L27.1772552,8.15828895 Z';
15
+ exports.MAIN_DONE_PATH = MAIN_DONE_PATH;
16
+ var MAIN_MOUSE_ENTER_FILL = 'url(#fpm__main-b)';
17
+ exports.MAIN_MOUSE_ENTER_FILL = MAIN_MOUSE_ENTER_FILL;
18
+ var MAIN_MOUSE_LEAVE_FILL = 'url(#fpm__main-c)';
19
+ exports.MAIN_MOUSE_LEAVE_FILL = MAIN_MOUSE_LEAVE_FILL;
20
+ var revokeSvg = "\n <svg class=\"fpm__revoke-icon\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <linearGradient x1=\"47.631%\" y1=\"55.183%\" x2=\"2.967%\" y2=\"86.323%\" id=\"fpm__revoke-a\">\n <stop stop-color=\"#FFF\" offset=\"0%\" />\n <stop stop-color=\"#FFF\" stop-opacity=\".5\" offset=\"100%\" />\n </linearGradient>\n <linearGradient x1=\"5.297%\" y1=\"43.016%\" x2=\"38.238%\" y2=\"79.932%\" id=\"fpm__revoke-b\">\n <stop stop-color=\"#FFF\" offset=\"0%\" />\n <stop stop-color=\"#FFF\" stop-opacity=\"0\" offset=\"100%\" />\n </linearGradient>\n </defs>\n <path\n d=\"M13.388 7.108c.552 0 1.005.42 1.06.957l.006.11v1.224c0 .921.745 1.667 1.666 1.667h7.184c5.804 0 10.509 4.616 10.509 10.309 0 5.595-4.544 10.15-10.21 10.305l-.3.004H8.924c-.917 0-1.66-.729-1.66-1.628 0-.846.658-1.541 1.5-1.62l.16-.008h14.38c3.972 0 7.191-3.158 7.191-7.053 0-3.81-3.08-6.916-6.933-7.049l-.257-.004H10.029l-.109-.005H8.212c-.245 0-.482-.085-.67-.237l-.09-.082a1.066 1.066 0 0 1-.065-1.422l.079-.086 5.175-5.077c.2-.195.468-.305.747-.305z\"\n fill=\"url(#fpm__revoke-a)\"\n fill-rule=\"nonzero\"\n stroke=\"url(#fpm__revoke-b)\"\n stroke-width=\".5\"\n />\n </svg>\n";
21
+ var exitSvg = "\n <svg class=\"fpm__exit-icon width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <linearGradient x1=\"36.288%\" y1=\"73.736%\" x2=\"54.242%\" y2=\"97.166%\" id=\"fpm__exit-a\">\n <stop stop-color=\"#FFF\" offset=\"0%\" />\n <stop stop-color=\"#FFF\" stop-opacity=\".5\" offset=\"100%\" />\n </linearGradient>\n <linearGradient x1=\"100%\" y1=\"47.234%\" x2=\"24.047%\" y2=\"47.234%\" id=\"fpm__exit-b\">\n <stop stop-color=\"#FFF\" offset=\"0%\" />\n <stop stop-color=\"#FFF\" stop-opacity=\".005\" offset=\"99.535%\" />\n <stop stop-color=\"#FFF\" stop-opacity=\"0\" offset=\"100%\" />\n </linearGradient>\n </defs>\n <path\n d=\"M22 7a1.5 1.5 0 0 1 .144 2.993L22 10h-9a1.5 1.5 0 0 0-1.493 1.356l-.007.144v17a1.5 1.5 0 0 0 1.356 1.493L13 30h9a1.5 1.5 0 0 1 .144 2.993L22 33h-9a4.5 4.5 0 0 1-4.495-4.288L8.5 28.5v-17a4.5 4.5 0 0 1 4.288-4.495L13 7h9zm6.317 7.755a1 1 0 0 1 .7.286l4.856 4.764a1 1 0 0 1-.7 1.713h-5.856V21.5h-8.032a1.5 1.5 0 1 1 0-3h6.365c.92 0 1.666-.746 1.667-1.667v-1.078a1 1 0 0 1 1-1z\"\n fill=\"url(#fpm__exit-a)\"\n fill-rule=\"nonzero\"\n stroke=\"url(#fpm__exit-b)\"\n stroke-width=\".5\"\n />\n </svg>\n";
22
+ var mainSvg = "\n <svg class=\"fpm__main-icon\" width=\"60\" height=\"60\" viewBox=\"0 0 60 60\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <mask id=\"fpm__main-icon-mask\">\n <rect id=\"fpm__main-icon-mask-black\" x=\"0\" y=\"0\" width=\"30\" height=\"30\" fill=\"black\"></rect>\n <rect id=\"fpm__main-icon-mask-white\" x=\"0\" y=\"0\" width=\"0\" height=\"30\" fill=\"white\"></rect>\n </mask>\n <linearGradient id=\"fpm__main-a\" x1=\"25.371%\" y1=\"0%\" x2=\"109.587%\" y2=\"172.268%\">\n <stop stop-color=\"#FFF\" offset=\"0%\" />\n <stop stop-color=\"#FFF\" stop-opacity=\".77\" offset=\"44.051%\" />\n <stop stop-color=\"#FFF\" stop-opacity=\".201\" offset=\"100%\" />\n </linearGradient>\n <radialGradient id=\"fpm__main-b\" fx=\"50%\" fy=\"50%\" r=\"50.864%\" gradientTransform=\"matrix(-.98302 0 0 -1 .992 1)\">\n <stop stop-color=\"#2D7CFF\" offset=\"0%\" />\n <stop stop-color=\"#2D7CFF\" stop-opacity=\".3\" offset=\"100%\" />\n </radialGradient>\n <radialGradient id=\"fpm__main-c\" fx=\"50%\" fy=\"50%\" r=\"50.864%\" gradientTransform=\"matrix(-.98302 0 0 -1 .992 1)\">\n <stop stop-opacity=\".4\" offset=\"0%\" />\n <stop stop-opacity=\".12\" offset=\"100%\" />\n </radialGradient>\n </defs>\n <g fill=\"none\" fill-rule=\"evenodd\">\n <circle fill=\"url(#fpm__main-a)\" cx=\"30\" cy=\"30\" r=\"30\" />\n <path\n class=\"fpm__main-icon-path\"\n d=\"".concat(MAIN_NORMAL_PATH, "\"\n fill=\"").concat(MAIN_MOUSE_LEAVE_FILL, "\"\n fill-rule=\"nonzero\"\n transform=\"translate(14 14)\"\n />\n </g>\n </svg>\n");
23
+
24
+ var _default = "\n <style>\n .fpm__revoke {\n opacity: 0.3;\n }\n \n .fpm__revoke.enabled {\n opacity: 0.7;\n }\n \n .fpm__revoke.enabled:hover {\n opacity: 1;\n }\n \n .fpm__revoke-icon {\n width: 40px;\n height: 40px;\n margin-top: 10px;\n cursor: pointer;\n } \n </style>\n <div class=\"fpm_ui-bg\"></div>\n <div class=\"fpm_operating-space\">\n <div class=\"fpm__ui-item fpm__revoke\">\n ".concat(revokeSvg, "\n <span class=\"fpm__text fpm__revoke-text\">\u64A4\u9500</span>\n </div>\n <div class=\"fpm__ui-item fpm__main\">\n ").concat(mainSvg, "\n <span class=\"fpm__text fpm__main-text\">\u6DFB\u52A0</span>\n </div>\n <div class=\"fpm__ui-item fpm__exit\">\n ").concat(exitSvg, "\n <span class=\"fpm__text fpm__exit-text\">\u9000\u51FA</span>\n </div>\n </div>\n");
25
+
26
+ exports["default"] = _default;
@@ -0,0 +1,18 @@
1
+ import MeasureController from '../../Controller';
2
+ export declare class MainBtnController {
3
+ private container;
4
+ private measureController;
5
+ private mainIconMaskTween?;
6
+ private mainElement;
7
+ constructor(measureController: MeasureController, container: Element);
8
+ dispose(): void;
9
+ private getMainElement;
10
+ private change2Add;
11
+ private change2Cancel;
12
+ private change2Done;
13
+ private onMouseEnter;
14
+ private onMouseLeave;
15
+ private onClick;
16
+ private editedLineChangeHandler;
17
+ private modeChangeHandler;
18
+ }
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.MainBtnController = void 0;
11
+
12
+ require("core-js/modules/es.object.assign.js");
13
+
14
+ require("core-js/modules/es.date.to-string.js");
15
+
16
+ require("core-js/modules/es.object.to-string.js");
17
+
18
+ require("core-js/modules/es.regexp.to-string.js");
19
+
20
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
21
+
22
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
23
+
24
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
25
+
26
+ var _tween = _interopRequireDefault(require("@tweenjs/tween.js"));
27
+
28
+ var _style = require("./style");
29
+
30
+ var _BetterTween = require("../../../../shared-utils/animationFrame/BetterTween");
31
+
32
+ var _HTML = require("./HTML");
33
+
34
+ var MainBtnController = /*#__PURE__*/function () {
35
+ function MainBtnController(measureController, container) {
36
+ var _this = this;
37
+
38
+ (0, _classCallCheck2["default"])(this, MainBtnController);
39
+ (0, _defineProperty2["default"])(this, "onMouseEnter", function () {
40
+ var _this$mainElement = _this.mainElement,
41
+ mainItem = _this$mainElement.mainItem,
42
+ pathDom = _this$mainElement.pathDom;
43
+ mainItem.style.opacity = '1';
44
+ pathDom.setAttribute('fill', _HTML.MAIN_MOUSE_ENTER_FILL);
45
+ });
46
+ (0, _defineProperty2["default"])(this, "onMouseLeave", function () {
47
+ var _this$mainElement2 = _this.mainElement,
48
+ mainItem = _this$mainElement2.mainItem,
49
+ pathDom = _this$mainElement2.pathDom;
50
+ mainItem.style.opacity = '0.7';
51
+ pathDom.setAttribute('fill', _HTML.MAIN_MOUSE_LEAVE_FILL);
52
+ });
53
+ (0, _defineProperty2["default"])(this, "onClick", function () {
54
+ var mode = _this.measureController.getCurrentMode();
55
+
56
+ mode === 'Watch' ? _this.measureController.changeMode('Edit') : _this.measureController.save().changeMode('Watch');
57
+ });
58
+ (0, _defineProperty2["default"])(this, "editedLineChangeHandler", function (lines) {
59
+ // 线的数量大于 1 时,没有状态的变化
60
+ if (lines.length > 1) return; // 因为撤销导致的状态变更 -> 取消
61
+
62
+ if (lines.length === 0) return _this.change2Cancel(false);
63
+
64
+ _this.change2Done();
65
+ });
66
+ (0, _defineProperty2["default"])(this, "modeChangeHandler", function (mode) {
67
+ mode === 'Watch' ? _this.change2Add() : _this.change2Cancel();
68
+ });
69
+ this.measureController = measureController;
70
+ this.container = container;
71
+ this.mainElement = this.getMainElement();
72
+ Object.assign(this.mainElement.mainIcon.style, _style.mainIconStyle);
73
+ Object.assign(this.mainElement.mainItem.style, _style.mainItemStyle);
74
+ this.change2Add();
75
+ this.measureController.hook.on('modeChange', this.modeChangeHandler);
76
+ this.mainElement.mainIcon.addEventListener('click', this.onClick);
77
+ this.mainElement.mainIcon.addEventListener('mouseenter', this.onMouseEnter);
78
+ this.mainElement.mainIcon.addEventListener('mouseleave', this.onMouseLeave);
79
+ }
80
+
81
+ (0, _createClass2["default"])(MainBtnController, [{
82
+ key: "dispose",
83
+ value: function dispose() {
84
+ this.measureController.hook.off('modeChange', this.modeChangeHandler);
85
+ this.measureController.hook.off('editedLineChange', this.editedLineChangeHandler);
86
+ this.mainElement.mainIcon.removeEventListener('click', this.onClick);
87
+ this.mainElement.mainIcon.removeEventListener('mouseenter', this.onMouseEnter);
88
+ this.mainElement.mainIcon.removeEventListener('mouseleave', this.onMouseLeave);
89
+ }
90
+ }, {
91
+ key: "getMainElement",
92
+ value: function getMainElement() {
93
+ var mainTextDom = this.container.querySelector('.fpm__main-text');
94
+ var mainItem = this.container.querySelector('.fpm__main');
95
+ var mainIcon = this.container.querySelector('.fpm__main-icon');
96
+ var pathDom = mainItem === null || mainItem === void 0 ? void 0 : mainItem.querySelector('.fpm__main-icon-path');
97
+ var maskWhiteRect = mainIcon === null || mainIcon === void 0 ? void 0 : mainIcon.querySelector('#fpm__main-icon-mask-white');
98
+ if (!mainItem || !mainTextDom || !mainIcon || !pathDom || !maskWhiteRect) throw new Error('cannot find dom');
99
+ return {
100
+ mainTextDom: mainTextDom,
101
+ mainItem: mainItem,
102
+ mainIcon: mainIcon,
103
+ pathDom: pathDom,
104
+ maskWhiteRect: maskWhiteRect
105
+ };
106
+ }
107
+ }, {
108
+ key: "change2Add",
109
+ value: function change2Add() {
110
+ this.measureController.hook.off('editedLineChange', this.editedLineChangeHandler);
111
+ var _this$mainElement3 = this.mainElement,
112
+ mainIcon = _this$mainElement3.mainIcon,
113
+ mainTextDom = _this$mainElement3.mainTextDom,
114
+ pathDom = _this$mainElement3.pathDom;
115
+ mainIcon.style.transition = mainTextDom.innerText === '完成' ? 'none' : 'transform 300ms ease-in-out';
116
+ mainIcon.style.transform = 'rotate(0deg)';
117
+ mainTextDom.innerText = '添加';
118
+ pathDom === null || pathDom === void 0 ? void 0 : pathDom.setAttribute('d', _HTML.MAIN_NORMAL_PATH);
119
+ }
120
+ }, {
121
+ key: "change2Cancel",
122
+ value: function change2Cancel() {
123
+ var withAnime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
124
+ var _this$mainElement4 = this.mainElement,
125
+ mainIcon = _this$mainElement4.mainIcon,
126
+ mainTextDom = _this$mainElement4.mainTextDom,
127
+ pathDom = _this$mainElement4.pathDom;
128
+ pathDom.setAttribute('d', _HTML.MAIN_NORMAL_PATH);
129
+ pathDom.setAttribute('mask', '');
130
+ mainIcon.style.transition = withAnime ? 'transform 300ms ease-in-out' : 'none';
131
+ mainIcon.style.transform = 'rotate(45deg)';
132
+ mainTextDom && (mainTextDom.innerText = '取消');
133
+ this.measureController.hook.on('editedLineChange', this.editedLineChangeHandler);
134
+ }
135
+ }, {
136
+ key: "change2Done",
137
+ value: function change2Done() {
138
+ var _this$mainIconMaskTwe,
139
+ _this2 = this;
140
+
141
+ var _this$getMainElement = this.getMainElement(),
142
+ mainTextDom = _this$getMainElement.mainTextDom,
143
+ mainIcon = _this$getMainElement.mainIcon,
144
+ pathDom = _this$getMainElement.pathDom,
145
+ maskWhiteRect = _this$getMainElement.maskWhiteRect;
146
+
147
+ if (mainTextDom.innerText === '完成') return;
148
+ mainIcon.style.transition = 'none';
149
+ mainIcon.style.transform = 'rotate(0deg)';
150
+ mainTextDom.innerText = '完成';
151
+ pathDom.setAttribute('d', _HTML.MAIN_DONE_PATH);
152
+ pathDom.setAttribute('mask', "url(#fpm__main-icon-mask)");
153
+ (_this$mainIconMaskTwe = this.mainIconMaskTween) === null || _this$mainIconMaskTwe === void 0 ? void 0 : _this$mainIconMaskTwe.dispose();
154
+ this.mainIconMaskTween = (0, _BetterTween.tweenProgress)().easing(_tween["default"].Easing.Quartic.InOut).onUpdate(function (_ref) {
155
+ var progress = _ref.progress;
156
+ maskWhiteRect.setAttribute('width', (progress * 30).toString());
157
+ }).onComplete(function () {
158
+ var _this2$mainIconMaskTw;
159
+
160
+ return (_this2$mainIconMaskTw = _this2.mainIconMaskTween) === null || _this2$mainIconMaskTw === void 0 ? void 0 : _this2$mainIconMaskTw.dispose();
161
+ }).play();
162
+ }
163
+ /* 鼠标移入时变成蓝色 */
164
+
165
+ }]);
166
+ return MainBtnController;
167
+ }();
168
+
169
+ exports.MainBtnController = MainBtnController;
@@ -0,0 +1,12 @@
1
+ import MeasureController, { Mode } from '../../../Controller';
2
+ export default class Revoke {
3
+ private container;
4
+ private revokeIcon;
5
+ private revokeItem;
6
+ private measureController;
7
+ constructor(measureController: MeasureController, container: Element);
8
+ dispose(): void;
9
+ onClick: () => void;
10
+ onModeChange: (mode: Mode) => void;
11
+ handleRevoke: () => () => void;
12
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports["default"] = void 0;
11
+
12
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
+
14
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
+
16
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
+
18
+ var Revoke = /*#__PURE__*/function () {
19
+ function Revoke(measureController, container) {
20
+ var _this = this;
21
+
22
+ (0, _classCallCheck2["default"])(this, Revoke);
23
+ (0, _defineProperty2["default"])(this, "onClick", function () {
24
+ _this.measureController.revoke();
25
+ });
26
+ (0, _defineProperty2["default"])(this, "onModeChange", function (mode) {
27
+ if (mode !== 'Edit') {
28
+ _this.revokeItem.classList.remove('enabled');
29
+
30
+ return;
31
+ }
32
+
33
+ _this.revokeItem.classList.add('enabled');
34
+ });
35
+ (0, _defineProperty2["default"])(this, "handleRevoke", function () {
36
+ return function () {};
37
+ });
38
+ this.measureController = measureController;
39
+ this.container = container;
40
+ var revokeIcon = this.container.querySelector('.fpm__revoke-icon');
41
+ var revokeItem = this.container.querySelector('.fpm__revoke');
42
+ if (!revokeIcon || !revokeItem) throw new Error('不正确的选择器');
43
+ this.revokeIcon = revokeIcon;
44
+ this.revokeItem = revokeItem;
45
+ this.revokeIcon.addEventListener('click', this.onClick);
46
+ measureController.hook.on('modeChange', this.onModeChange);
47
+ }
48
+
49
+ (0, _createClass2["default"])(Revoke, [{
50
+ key: "dispose",
51
+ value: function dispose() {
52
+ this.revokeIcon.removeEventListener('click', this.onClick);
53
+ this.measureController.hook.off('modeChange', this.onModeChange);
54
+ }
55
+ }]);
56
+ return Revoke;
57
+ }();
58
+
59
+ exports["default"] = Revoke;
@@ -0,0 +1,16 @@
1
+ import MeasureController from '../../Controller';
2
+ export interface UIControllerParams {
3
+ container: Element;
4
+ }
5
+ export declare class UIController {
6
+ private revoke?;
7
+ private container;
8
+ private mainController?;
9
+ private disposers;
10
+ private measureController;
11
+ constructor(measureController: MeasureController, params: UIControllerParams);
12
+ dispose(): void;
13
+ show(): this;
14
+ hide(): this;
15
+ private handleExit;
16
+ }
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.UIController = void 0;
11
+
12
+ require("core-js/modules/es.object.assign.js");
13
+
14
+ require("core-js/modules/es.array.for-each.js");
15
+
16
+ require("core-js/modules/web.dom-collections.for-each.js");
17
+
18
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
19
+
20
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
21
+
22
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
+
24
+ var _HTML = _interopRequireDefault(require("./HTML"));
25
+
26
+ var _style = require("./style");
27
+
28
+ var _MainBtnController = require("./MainBtnController");
29
+
30
+ var _Revoke = _interopRequireDefault(require("./Revoke"));
31
+
32
+ var UIController = /*#__PURE__*/function () {
33
+ function UIController(measureController, params) {
34
+ var _this = this;
35
+
36
+ (0, _classCallCheck2["default"])(this, UIController);
37
+ (0, _defineProperty2["default"])(this, "disposers", []);
38
+ (0, _defineProperty2["default"])(this, "handleExit", function () {
39
+ var exitIcon = _this.container.querySelector('.fpm__exit-icon');
40
+
41
+ var exitItem = _this.container.querySelector('.fpm__exit');
42
+
43
+ if (!exitItem || !exitIcon) throw new Error('cannot find dom');
44
+ Object.assign(exitItem.style, _style.exitItemStyle);
45
+ Object.assign(exitIcon === null || exitIcon === void 0 ? void 0 : exitIcon.style, _style.exitIconStyle);
46
+
47
+ var onMouseEnter = function onMouseEnter() {
48
+ return exitItem.style.opacity = '1';
49
+ };
50
+
51
+ var onMouseLeave = function onMouseLeave() {
52
+ return exitItem.style.opacity = '0.7';
53
+ };
54
+
55
+ var handleClick = function handleClick() {
56
+ _this.measureController.close();
57
+ };
58
+
59
+ exitIcon.addEventListener('click', handleClick);
60
+ exitIcon.addEventListener('mouseenter', onMouseEnter);
61
+ exitIcon.addEventListener('mouseleave', onMouseLeave);
62
+ return function () {
63
+ exitIcon.removeEventListener('click', handleClick);
64
+ exitIcon.removeEventListener('mouseenter', onMouseEnter);
65
+ exitIcon.removeEventListener('mouseleave', onMouseLeave);
66
+ };
67
+ });
68
+ this.measureController = measureController;
69
+ this.container = document.createElement('div');
70
+ this.container.innerHTML = _HTML["default"];
71
+ this.container.classList.add('fpm__ui-controller');
72
+ params.container.appendChild(this.container);
73
+ var textDoms = this.container.querySelectorAll('.fpm__text');
74
+ var UIItems = this.container.querySelectorAll('.fpm__ui-item');
75
+ var bgDom = this.container.querySelector('.fpm_ui-bg');
76
+ var operatingSpaceDom = this.container.querySelector('.fpm_operating-space');
77
+ Object.assign(bgDom === null || bgDom === void 0 ? void 0 : bgDom.style, _style.controllerBackgroundStyle);
78
+ Object.assign(operatingSpaceDom === null || operatingSpaceDom === void 0 ? void 0 : operatingSpaceDom.style, _style.operatingSpaceStyle);
79
+ Object.assign(this.container.style, _style.uiWrapperStyle);
80
+ UIItems.forEach(function (item) {
81
+ return Object.assign(item.style, _style.buttonGroupStyle);
82
+ });
83
+ textDoms.forEach(function (item) {
84
+ return Object.assign(item.style, _style.textStyle);
85
+ });
86
+ }
87
+
88
+ (0, _createClass2["default"])(UIController, [{
89
+ key: "dispose",
90
+ value: function dispose() {
91
+ this.hide();
92
+ this.container.remove();
93
+ }
94
+ }, {
95
+ key: "show",
96
+ value: function show() {
97
+ this.container.style.opacity = '1';
98
+ this.container.style.transform = 'translate(0, 0)';
99
+ this.revoke = new _Revoke["default"](this.measureController, this.container);
100
+ this.mainController = new _MainBtnController.MainBtnController(this.measureController, this.container);
101
+ this.disposers.push(this.handleExit());
102
+ return this;
103
+ }
104
+ }, {
105
+ key: "hide",
106
+ value: function hide() {
107
+ var _this$revoke, _this$mainController;
108
+
109
+ this.container.style.opacity = '0';
110
+ this.container.style.transform = 'translate(0, 10px)';
111
+ (_this$revoke = this.revoke) === null || _this$revoke === void 0 ? void 0 : _this$revoke.dispose();
112
+ (_this$mainController = this.mainController) === null || _this$mainController === void 0 ? void 0 : _this$mainController.dispose();
113
+ this.disposers.forEach(function (disposer) {
114
+ return disposer();
115
+ });
116
+ this.disposers = [];
117
+ return this;
118
+ }
119
+ }]);
120
+ return UIController;
121
+ }();
122
+
123
+ exports.UIController = UIController;
@@ -0,0 +1,17 @@
1
+ export declare const addHoverImage = "//vrlab-static.ljcdn.com/release/web/measure/add-hover.944fffad.png";
2
+ export declare const addNormalImage = "//vrlab-static.ljcdn.com/release/web/measure/add-normal.39e967e9.png";
3
+ export declare const cancelHoverImage = "//vrlab-static.ljcdn.com/release/web/measure/canale-hover.74b37e24.png";
4
+ export declare const cancelNormalImage = "//vrlab-static.ljcdn.com/release/web/measure/cancle-normal.77bb326c.png";
5
+ export declare const doneHoverImage = "//vrlab-static.ljcdn.com/release/web/measure/done-hover.9e09438b.png";
6
+ export declare const doneNormalImage = "//vrlab-static.ljcdn.com/release/web/measure/done-normal.4fcddd73.png";
7
+ export declare const exitImage = "//vrlab-static.ljcdn.com/release/web/measure/exit.6693ad51.png";
8
+ export declare const revokeImage = "//vrlab-static.ljcdn.com/release/web/measure/revoke.3e424843.png";
9
+ export declare const uiWrapperStyle: Partial<CSSStyleDeclaration>;
10
+ export declare const operatingSpaceStyle: Partial<CSSStyleDeclaration>;
11
+ export declare const buttonGroupStyle: Partial<CSSStyleDeclaration>;
12
+ export declare const controllerBackgroundStyle: Partial<CSSStyleDeclaration>;
13
+ export declare const mainItemStyle: Partial<CSSStyleDeclaration>;
14
+ export declare const exitItemStyle: Partial<CSSStyleDeclaration>;
15
+ export declare const mainIconStyle: Partial<CSSStyleDeclaration>;
16
+ export declare const exitIconStyle: Partial<CSSStyleDeclaration>;
17
+ export declare const textStyle: Partial<CSSStyleDeclaration>;
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.uiWrapperStyle = exports.textStyle = exports.revokeImage = exports.operatingSpaceStyle = exports.mainItemStyle = exports.mainIconStyle = exports.exitItemStyle = exports.exitImage = exports.exitIconStyle = exports.doneNormalImage = exports.doneHoverImage = exports.controllerBackgroundStyle = exports.cancelNormalImage = exports.cancelHoverImage = exports.buttonGroupStyle = exports.addNormalImage = exports.addHoverImage = void 0;
9
+ var addHoverImage = '//vrlab-static.ljcdn.com/release/web/measure/add-hover.944fffad.png';
10
+ exports.addHoverImage = addHoverImage;
11
+ var addNormalImage = '//vrlab-static.ljcdn.com/release/web/measure/add-normal.39e967e9.png';
12
+ exports.addNormalImage = addNormalImage;
13
+ var cancelHoverImage = '//vrlab-static.ljcdn.com/release/web/measure/canale-hover.74b37e24.png';
14
+ exports.cancelHoverImage = cancelHoverImage;
15
+ var cancelNormalImage = '//vrlab-static.ljcdn.com/release/web/measure/cancle-normal.77bb326c.png';
16
+ exports.cancelNormalImage = cancelNormalImage;
17
+ var doneHoverImage = '//vrlab-static.ljcdn.com/release/web/measure/done-hover.9e09438b.png';
18
+ exports.doneHoverImage = doneHoverImage;
19
+ var doneNormalImage = '//vrlab-static.ljcdn.com/release/web/measure/done-normal.4fcddd73.png';
20
+ exports.doneNormalImage = doneNormalImage;
21
+ var exitImage = '//vrlab-static.ljcdn.com/release/web/measure/exit.6693ad51.png';
22
+ exports.exitImage = exitImage;
23
+ var revokeImage = '//vrlab-static.ljcdn.com/release/web/measure/revoke.3e424843.png';
24
+ exports.revokeImage = revokeImage;
25
+ var uiWrapperStyle = {
26
+ position: 'absolute',
27
+ top: '0',
28
+ left: '0',
29
+ width: '100%',
30
+ height: '100%',
31
+ opacity: '0',
32
+ transform: 'translate(0, 10px)',
33
+ transition: 'opacity 500ms ease-in-out, transform 500ms ease-in-out'
34
+ };
35
+ exports.uiWrapperStyle = uiWrapperStyle;
36
+ var operatingSpaceStyle = {
37
+ position: 'absolute',
38
+ left: '50%',
39
+ bottom: '32px',
40
+ transform: 'translateX(-50%)',
41
+ width: '300px',
42
+ height: '89px',
43
+ display: 'flex',
44
+ justifyContent: 'space-between',
45
+ fontSize: '16px',
46
+ pointerEvents: 'all',
47
+ color: '#fff',
48
+ zIndex: '10'
49
+ };
50
+ exports.operatingSpaceStyle = operatingSpaceStyle;
51
+ var buttonGroupStyle = {
52
+ height: '100%',
53
+ width: 'max-content',
54
+ display: 'flex',
55
+ flexDirection: 'column',
56
+ justifyContent: 'space-between',
57
+ alignItems: 'center'
58
+ }; // 操作区下方的背景
59
+
60
+ exports.buttonGroupStyle = buttonGroupStyle;
61
+ var controllerBackgroundStyle = {
62
+ position: 'absolute',
63
+ bottom: '0',
64
+ left: '0',
65
+ opacity: '0.5',
66
+ width: '100%',
67
+ height: '184px',
68
+ background: "linear-gradient(180deg, rgba(0,0,0,0.00) 0%, #000000 100%)",
69
+ zIndex: '0'
70
+ }; // item
71
+
72
+ exports.controllerBackgroundStyle = controllerBackgroundStyle;
73
+ var mainItemStyle = {
74
+ margin: '0 80px',
75
+ opacity: '0.7'
76
+ };
77
+ exports.mainItemStyle = mainItemStyle;
78
+ var exitItemStyle = {
79
+ opacity: '0.7'
80
+ }; // icon
81
+
82
+ exports.exitItemStyle = exitItemStyle;
83
+ var mainIconStyle = {
84
+ width: '60px',
85
+ height: '60px',
86
+ backgroundSize: '100%',
87
+ cursor: 'pointer'
88
+ };
89
+ exports.mainIconStyle = mainIconStyle;
90
+ var exitIconStyle = {
91
+ width: '40px',
92
+ height: '40px',
93
+ marginTop: '10px',
94
+ backgroundSize: '100%',
95
+ cursor: 'pointer'
96
+ }; // text
97
+
98
+ exports.exitIconStyle = exitIconStyle;
99
+ var textStyle = {
100
+ cursor: 'default',
101
+ userSelect: 'none'
102
+ };
103
+ exports.textStyle = textStyle;
@@ -0,0 +1,7 @@
1
+ import { FivePlugin } from '@realsee/five';
2
+ import MeasureController, { MeasurePluginParameter } from './Controller';
3
+ declare const MeasurePlugin: FivePlugin<MeasurePluginParameter, PluginReturns>;
4
+ export default MeasurePlugin;
5
+ export declare type PluginReturns = MeasureController;
6
+ export type { PluginEvent } from './typings/event.type';
7
+ export type { LineJson, PointJson } from './typings/data';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports["default"] = void 0;
11
+
12
+ var _Controller = _interopRequireDefault(require("./Controller"));
13
+
14
+ var MeasurePlugin = function MeasurePlugin(five, params) {
15
+ return new _Controller["default"](five, params);
16
+ };
17
+
18
+ var _default = MeasurePlugin; // 类型导出
19
+
20
+ exports["default"] = _default;
@@ -0,0 +1,28 @@
1
+ export interface LineCompletelyJson {
2
+ id: string;
3
+ points: PointJson[];
4
+ }
5
+ export interface PolylineCompletelyJson {
6
+ id: string;
7
+ points: PointJson[];
8
+ lines: LineCompletelyJson[];
9
+ }
10
+ export interface LineJson {
11
+ id: string;
12
+ points: string[];
13
+ }
14
+ export interface PolylineJson {
15
+ id: string;
16
+ points: string[];
17
+ lines: string[];
18
+ }
19
+ export interface PointJson {
20
+ id: string;
21
+ lines: string[];
22
+ position: number[];
23
+ }
24
+ export interface PluginData {
25
+ lines: LineJson[];
26
+ points: PointJson[];
27
+ polylines: PolylineJson[];
28
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
@@ -0,0 +1,28 @@
1
+ import { SubscribeEventMap } from '@realsee/five';
2
+ import { Vector3 } from 'three';
3
+ import { Mode } from '../Controller';
4
+ import { LineCompletelyJson } from './data';
5
+ interface ControllerEvent extends SubscribeEventMap {
6
+ /**
7
+ * Mode 变更
8
+ */
9
+ modeChange: (mode: Mode) => void;
10
+ }
11
+ interface WatchEvent extends SubscribeEventMap {
12
+ selectedChange: (lines: LineCompletelyJson[]) => void;
13
+ }
14
+ interface EditEvent {
15
+ /**
16
+ * 编辑线条变更
17
+ */
18
+ editedLineChange: (lines: LineCompletelyJson[]) => void;
19
+ anchorChange: (anchor: Vector3 | null) => void;
20
+ }
21
+ interface DragEvent extends SubscribeEventMap {
22
+ wantsDragLine: (event: {
23
+ point: string;
24
+ lines: string[];
25
+ }) => boolean;
26
+ }
27
+ export declare type PluginEvent = ControllerEvent & EditEvent & WatchEvent & DragEvent;
28
+ export {};