@realsee/dnalogel 2.0.0-alpha.2 → 2.0.0-alpha.22

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 (430) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +93 -4
  3. package/TERMS.txt +56 -0
  4. package/dist/CSS3DRenderPlugin/index.d.ts +49 -0
  5. package/dist/CSS3DRenderPlugin/index.js +234 -0
  6. package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  7. package/dist/CameraMovementPlugin/index.d.ts +7 -0
  8. package/dist/CameraMovementPlugin/index.js +302 -0
  9. package/dist/CameraMovementPlugin/typing.d.ts +68 -0
  10. package/dist/ModelChassisCompassPlugin/index.d.ts +19 -0
  11. package/dist/ModelChassisCompassPlugin/index.js +143 -0
  12. package/dist/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
  13. package/dist/ModelEntryDoorGuidePlugin/index.js +201 -0
  14. package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
  15. package/dist/ModelItemLabelPlugin/index.d.ts +4 -0
  16. package/dist/ModelItemLabelPlugin/index.js +668 -0
  17. package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
  18. package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  19. package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  20. package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
  21. package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
  22. package/dist/ModelRoomLabelPlugin/index.js +505 -0
  23. package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
  24. package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
  25. package/dist/ModelTVVideoPlugin/index.d.ts +4 -0
  26. package/dist/ModelTVVideoPlugin/index.js +301 -0
  27. package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
  28. package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  29. package/dist/ModelViewPlugin/index.d.ts +17 -0
  30. package/dist/ModelViewPlugin/index.js +187 -0
  31. package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  32. package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  33. package/dist/PanoCompassPlugin/index.d.ts +51 -0
  34. package/dist/PanoCompassPlugin/index.js +635 -0
  35. package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
  36. package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
  37. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
  38. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  39. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  40. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
  41. package/dist/PanoMeasurePlugin/Controller/index.d.ts +61 -0
  42. package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
  43. package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
  44. package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
  45. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  46. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  47. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  48. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  49. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
  50. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  51. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  52. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
  53. package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
  54. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
  55. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  56. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
  57. package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
  58. package/dist/PanoMeasurePlugin/index.d.ts +7 -0
  59. package/dist/PanoMeasurePlugin/index.js +5531 -0
  60. package/dist/PanoMeasurePlugin/typings/data.d.ts +28 -0
  61. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
  62. package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  63. package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  64. package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  65. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  66. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  67. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  68. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  69. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  70. package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  71. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  72. package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
  73. package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
  74. package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
  75. package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  76. package/dist/PanoRulerPlugin/index.d.ts +31 -0
  77. package/dist/PanoRulerPlugin/index.js +612 -0
  78. package/dist/PanoRulerPlugin/style.d.ts +2 -0
  79. package/dist/PanoRulerPlugin/typings.d.ts +21 -0
  80. package/dist/PanoSpatialTagPlugin/index.d.ts +33 -0
  81. package/dist/PanoSpatialTagPlugin/index.js +1294 -0
  82. package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
  83. package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
  84. package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
  85. package/dist/floorplan/Assets/camera.d.ts +1 -0
  86. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/Assets/compass.d.ts +0 -0
  87. package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  88. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +105 -0
  89. package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
  90. package/dist/floorplan/ModelFloorplanPlugin/index.js +4034 -0
  91. package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
  92. package/dist/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
  93. package/dist/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
  94. package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
  95. package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
  96. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1642 -0
  97. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +75 -0
  98. package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
  99. package/dist/floorplan/TopviewFloorplanPlugin/index.js +3646 -0
  100. package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  101. package/dist/floorplan/constant.d.ts +5 -0
  102. package/dist/floorplan/typings/floorplanData.d.ts +137 -0
  103. package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
  104. package/dist/floorplan/typings/utility.d.ts +2 -0
  105. package/dist/floorplan/utils/formatData.d.ts +5 -0
  106. package/dist/floorplan/utils/formatPosition.d.ts +36 -0
  107. package/dist/index.d.ts +30 -0
  108. package/dist/index.es.js +15138 -0
  109. package/dist/index.js +15180 -0
  110. package/dist/index.umd.js +15173 -0
  111. package/dist/shared-utils/Preloader.d.ts +6 -0
  112. package/dist/shared-utils/Subscribe.d.ts +45 -0
  113. package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
  114. package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
  115. package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
  116. package/dist/shared-utils/animationFrame/index.d.ts +15 -0
  117. package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
  118. package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  119. package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
  120. package/dist/shared-utils/createLine/index.d.ts +3 -0
  121. package/dist/shared-utils/debounce.d.ts +6 -0
  122. package/dist/shared-utils/equal.d.ts +11 -0
  123. package/dist/shared-utils/filter.d.ts +27 -0
  124. package/dist/shared-utils/five/changeMode.d.ts +2 -0
  125. package/dist/shared-utils/five/useFivePlugin.d.ts +1 -0
  126. package/dist/shared-utils/formatRad.d.ts +7 -0
  127. package/dist/shared-utils/getPxmm.d.ts +11 -0
  128. package/dist/shared-utils/getRandomColor.d.ts +1 -0
  129. package/dist/shared-utils/isNil.d.ts +10 -0
  130. package/dist/shared-utils/isTruelyObject.d.ts +18 -0
  131. package/dist/shared-utils/math/evenNumber.d.ts +3 -0
  132. package/dist/shared-utils/math/planimetry.d.ts +116 -0
  133. package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
  134. package/dist/shared-utils/nearlyEqual.d.ts +7 -0
  135. package/dist/shared-utils/nextFrame.d.ts +1 -0
  136. package/dist/shared-utils/noop.d.ts +5 -0
  137. package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
  138. package/dist/shared-utils/px2rem.d.ts +1 -0
  139. package/dist/shared-utils/removeArrayItem.d.ts +7 -0
  140. package/dist/shared-utils/tap.d.ts +8 -0
  141. package/dist/shared-utils/three/centerPoint.d.ts +2 -0
  142. package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
  143. package/dist/shared-utils/three/getNormal.d.ts +2 -0
  144. package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
  145. package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
  146. package/dist/shared-utils/three/loadTexture.d.ts +2 -0
  147. package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
  148. package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
  149. package/dist/shared-utils/throttle.d.ts +7 -0
  150. package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
  151. package/dist/shared-utils/to.d.ts +8 -0
  152. package/dist/shared-utils/useDebounce.d.ts +8 -0
  153. package/dist/shared-utils/useThrottle.d.ts +8 -0
  154. package/dist/shared-utils/uuid.d.ts +4 -0
  155. package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
  156. package/dist/typings/math.type.d.ts +44 -0
  157. package/dist/typings/utils.type.d.ts +2 -0
  158. package/docs/.nojekyll +1 -0
  159. package/docs/assets/highlight.css +78 -0
  160. package/docs/assets/icons.css +1043 -0
  161. package/docs/assets/icons.png +0 -0
  162. package/docs/assets/icons@2x.png +0 -0
  163. package/docs/assets/main.js +52 -0
  164. package/docs/assets/search.js +1 -0
  165. package/docs/assets/style.css +1413 -0
  166. package/docs/assets/widgets.png +0 -0
  167. package/docs/assets/widgets@2x.png +0 -0
  168. package/docs/classes/ModelRoomLabelController.html +20 -0
  169. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
  170. package/docs/enums/ModelFloorplanErrorType.html +1 -0
  171. package/docs/index.html +88 -0
  172. package/docs/interfaces/LineJson.html +1 -0
  173. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
  174. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
  175. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
  176. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
  177. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
  178. package/docs/interfaces/ModelFloorplanParameterType.html +1 -0
  179. package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
  180. package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
  181. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
  182. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
  183. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
  184. package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
  185. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
  186. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
  187. package/docs/interfaces/PanoCompassPluginData.html +1 -0
  188. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
  189. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
  190. package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
  191. package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
  192. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
  193. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
  194. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
  195. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
  196. package/docs/interfaces/PointJson.html +1 -0
  197. package/docs/interfaces/RoomLabel.html +13 -0
  198. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -0
  199. package/docs/modules.html +28 -0
  200. package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
  201. package/libs/CSS3DRenderPlugin/index.js +27 -26
  202. package/libs/CameraMovementPlugin/typing.d.ts +1 -1
  203. package/libs/ModelChassisCompassPlugin/index.js +2 -2
  204. package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
  205. package/libs/ModelEntryDoorGuidePlugin/index.js +13 -9
  206. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +409 -0
  207. package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
  208. package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
  209. package/libs/ModelItemLabelPlugin/events.type.js +1 -0
  210. package/libs/ModelItemLabelPlugin/index.d.ts +4 -0
  211. package/libs/ModelItemLabelPlugin/index.js +120 -0
  212. package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
  213. package/libs/ModelItemLabelPlugin/typings.js +7 -0
  214. package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  215. package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
  216. package/libs/ModelRoomLabelPlugin/Controller.js +67 -25
  217. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
  218. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +255 -0
  219. package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
  220. package/libs/ModelTVVideoPlugin/index.d.ts +4 -0
  221. package/libs/ModelTVVideoPlugin/index.js +254 -0
  222. package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
  223. package/libs/ModelTVVideoPlugin/typings.js +8 -0
  224. package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  225. package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
  226. package/libs/ModelViewPlugin/index.js +6 -6
  227. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  228. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
  229. package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  230. package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
  231. package/libs/PanoCompassPlugin/index.d.ts +51 -0
  232. package/libs/PanoCompassPlugin/index.js +253 -0
  233. package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
  234. package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
  235. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
  236. package/libs/PanoMeasurePlugin/Controller/BaseController.js +124 -0
  237. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  238. package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -0
  239. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  240. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +64 -0
  241. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
  242. package/libs/PanoMeasurePlugin/Controller/WatchController.js +305 -0
  243. package/libs/PanoMeasurePlugin/Controller/index.d.ts +61 -0
  244. package/libs/PanoMeasurePlugin/Controller/index.js +265 -0
  245. package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
  246. package/libs/PanoMeasurePlugin/Model/index.js +139 -0
  247. package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
  248. package/libs/PanoMeasurePlugin/Model/line.js +114 -0
  249. package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
  250. package/libs/PanoMeasurePlugin/Model/point.js +48 -0
  251. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  252. package/libs/PanoMeasurePlugin/Model/polyline.js +65 -0
  253. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  254. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +15 -0
  255. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  256. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
  257. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  258. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
  259. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
  260. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +153 -0
  261. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  262. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +48 -0
  263. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  264. package/libs/PanoMeasurePlugin/Modules/GuideController.js +110 -0
  265. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
  266. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +153 -0
  267. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
  268. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +117 -0
  269. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
  270. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +148 -0
  271. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  272. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +70 -0
  273. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
  274. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +102 -0
  275. package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
  276. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +79 -0
  277. package/libs/PanoMeasurePlugin/index.d.ts +7 -0
  278. package/libs/PanoMeasurePlugin/index.js +5 -0
  279. package/libs/PanoMeasurePlugin/typings/data.d.ts +28 -0
  280. package/libs/PanoMeasurePlugin/typings/data.js +1 -0
  281. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
  282. package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
  283. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  284. package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
  285. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  286. package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
  287. package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  288. package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
  289. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  290. package/libs/PanoMeasurePlugin/utils/distanceDom.js +115 -0
  291. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  292. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
  293. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  294. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
  295. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  296. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
  297. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  298. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
  299. package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  300. package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
  301. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  302. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
  303. package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
  304. package/libs/PanoMeasurePlugin/utils/line.js +33 -0
  305. package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
  306. package/libs/PanoMeasurePlugin/utils/math.js +44 -0
  307. package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
  308. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +22 -0
  309. package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  310. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
  311. package/libs/PanoRulerPlugin/index.d.ts +31 -0
  312. package/libs/PanoRulerPlugin/index.js +400 -0
  313. package/libs/PanoRulerPlugin/style.d.ts +2 -0
  314. package/libs/PanoRulerPlugin/style.js +88 -0
  315. package/libs/PanoRulerPlugin/typings.d.ts +21 -0
  316. package/libs/PanoRulerPlugin/typings.js +1 -0
  317. package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
  318. package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
  319. package/libs/PanoSpatialTagPlugin/index.d.ts +33 -0
  320. package/libs/PanoSpatialTagPlugin/index.js +413 -0
  321. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
  322. package/libs/PanoSpatialTagPlugin/store.js +2 -0
  323. package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
  324. package/libs/PanoSpatialTagPlugin/style.js +8 -0
  325. package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
  326. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  327. package/libs/floorplan/Assets/compass.d.ts +1 -0
  328. package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
  329. package/libs/floorplan/Components/BaseImage.js +222 -0
  330. package/libs/floorplan/Components/Camera.js +120 -0
  331. package/libs/floorplan/Components/Compass.js +119 -0
  332. package/libs/floorplan/Components/CurrentFloor.js +456 -0
  333. package/libs/floorplan/Components/Main.js +464 -0
  334. package/libs/floorplan/Components/Normalmage.js +63 -0
  335. package/libs/floorplan/Components/RoomHighlight/Room.js +68 -0
  336. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +199 -0
  337. package/libs/floorplan/Components/RoomLabels/RoomLabel.js +173 -0
  338. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +265 -0
  339. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +331 -0
  340. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
  341. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
  342. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
  343. package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
  344. package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
  345. package/libs/floorplan/Components/SvgImage.js +83 -0
  346. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +4 -1
  347. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +455 -279
  348. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -0
  349. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
  350. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
  351. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
  352. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +89 -37
  353. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +30 -14
  354. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +269 -118
  355. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
  356. package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
  357. package/libs/floorplan/constant.d.ts +5 -0
  358. package/libs/floorplan/constant.js +6 -0
  359. package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
  360. package/libs/floorplan/utils/formatPosition.d.ts +1 -1
  361. package/libs/floorplan/utils/formatPosition.js +3 -3
  362. package/libs/index.d.ts +22 -9
  363. package/libs/index.js +11 -3
  364. package/libs/shared-utils/Subscribe.js +8 -1
  365. package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
  366. package/libs/shared-utils/createCanvasTextTexture.js +6 -5
  367. package/libs/shared-utils/getPxmm.d.ts +6 -1
  368. package/libs/shared-utils/getPxmm.js +26 -12
  369. package/libs/shared-utils/math/evenNumber.js +1 -1
  370. package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
  371. package/libs/shared-utils/three/getNormal.d.ts +1 -1
  372. package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
  373. package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
  374. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
  375. package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
  376. package/libs/shared-utils/tinyEJSrender.js +210 -0
  377. package/libs/shared-utils/useDebounce.js +1 -1
  378. package/libs/shared-utils/useThrottle.js +2 -1
  379. package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
  380. package/package.json +26 -13
  381. package/dist/dnalogel.cjs.js +0 -2
  382. package/dist/dnalogel.es.js +0 -37145
  383. package/dist/dnalogel.umd.js +0 -2
  384. package/dist/style.css +0 -1
  385. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
  386. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
  387. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
  388. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
  389. package/libs/floorplan/Components/BaseImage.svelte +0 -25
  390. package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
  391. package/libs/floorplan/Components/Normalmage.svelte +0 -11
  392. package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
  393. package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
  394. package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
  395. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
  396. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
  397. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
  398. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
  399. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
  400. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
  401. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
  402. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
  403. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
  404. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
  405. package/libs/floorplan/Components/SvgImage.svelte +0 -25
  406. package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
  407. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
  408. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
  409. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
  410. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
  411. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
  412. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
  413. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
  414. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
  415. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
  416. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
  417. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
  418. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
  419. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
  420. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
  421. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
  422. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
  423. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
  424. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
  425. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
  426. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
  427. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
  428. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
  429. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
  430. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
@@ -0,0 +1,153 @@
1
+ import deleteSvg from './_Assets/delete.svg';
2
+ import deleteBg from './_Assets/delete_bg.png';
3
+ import deleteHoverBg from './_Assets/delete_hover_bg.png';
4
+ export default class DeleteDom {
5
+ constructor(five, opts) {
6
+ Object.defineProperty(this, "visible", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: false
11
+ });
12
+ Object.defineProperty(this, "five", {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value: void 0
17
+ });
18
+ Object.defineProperty(this, "lines", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: []
23
+ });
24
+ Object.defineProperty(this, "points", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: []
29
+ });
30
+ Object.defineProperty(this, "onClick", {
31
+ enumerable: true,
32
+ configurable: true,
33
+ writable: true,
34
+ value: void 0
35
+ });
36
+ Object.defineProperty(this, "content", {
37
+ enumerable: true,
38
+ configurable: true,
39
+ writable: true,
40
+ value: document.createElement('div')
41
+ });
42
+ Object.defineProperty(this, "container", {
43
+ enumerable: true,
44
+ configurable: true,
45
+ writable: true,
46
+ value: document.createElement('div')
47
+ });
48
+ Object.defineProperty(this, "onMouseEnter", {
49
+ enumerable: true,
50
+ configurable: true,
51
+ writable: true,
52
+ value: () => {
53
+ this.content.style.backgroundImage = `url(${deleteHoverBg})`;
54
+ }
55
+ });
56
+ Object.defineProperty(this, "onMouseLeave", {
57
+ enumerable: true,
58
+ configurable: true,
59
+ writable: true,
60
+ value: () => {
61
+ this.content.style.backgroundImage = `url(${deleteBg})`;
62
+ }
63
+ });
64
+ this.five = five;
65
+ this.onClick = (opts === null || opts === void 0 ? void 0 : opts.onClick) || (() => void 0);
66
+ // container
67
+ this.container.classList.add('fpm__delete');
68
+ this.container.style.opacity = '0';
69
+ this.container.style.position = 'absolute';
70
+ this.container.style.left = '0';
71
+ this.container.style.top = '0';
72
+ this.container.style.transform = `translate3d(0, 0, 10px)`;
73
+ this.container.style.pointerEvents = `none`;
74
+ // content
75
+ this.content.classList.add('fpm__delete-content');
76
+ this.content.style.width = '67px';
77
+ this.content.style.height = '31px';
78
+ this.content.style.display = 'flex';
79
+ this.content.style.alignItems = 'center';
80
+ this.content.style.justifyContent = 'center';
81
+ this.content.style.transform = 'translate(-50%, -50%)';
82
+ this.content.style.color = '#fff';
83
+ this.content.style.fontSize = '14px';
84
+ this.content.style.lineHeight = '31px';
85
+ this.content.style.borderRadius = '15px';
86
+ this.content.style.backgroundSize = '100% 100%';
87
+ this.content.style.cursor = 'pointer';
88
+ this.content.style.userSelect = 'none';
89
+ this.content.style.backgroundImage = `url(${deleteBg})`;
90
+ this.content.innerHTML = `
91
+ ${deleteSvg}
92
+ <span>删除</span>
93
+ `;
94
+ this.container.append(this.content);
95
+ const deleteSvgDom = this.content.querySelector('.fpm__delete-icon');
96
+ if (deleteSvgDom) {
97
+ deleteSvgDom.style.width = '20px';
98
+ deleteSvgDom.style.height = '20px';
99
+ deleteSvgDom.style.marginRight = '2px';
100
+ }
101
+ this.content.addEventListener('click', this.onClick);
102
+ this.content.addEventListener('mouseenter', this.onMouseEnter);
103
+ this.content.addEventListener('mouseleave', this.onMouseLeave);
104
+ }
105
+ dispose() {
106
+ this.content.removeEventListener('click', this.onClick);
107
+ this.content.removeEventListener('mouseenter', this.onMouseEnter);
108
+ this.content.removeEventListener('mouseleave', this.onMouseLeave);
109
+ this.container.remove();
110
+ }
111
+ appendTo(element) {
112
+ element.append(this.container);
113
+ return this;
114
+ }
115
+ setLines(lines) {
116
+ this.lines = lines;
117
+ this.points = Array.from(new Set(this.lines.map((line) => [line.points[0], line.points[1]]).flat(1)));
118
+ return this;
119
+ }
120
+ updatePosition() {
121
+ if (this.lines.length === 0)
122
+ return this;
123
+ const points = this.points.map((point) => point.position);
124
+ const ndcPoints = points.map((point) => point.clone().project(this.five.camera));
125
+ if (ndcPoints.some((ndcPoint) => Math.abs(ndcPoint.z) > 1))
126
+ return this.hide();
127
+ const xArray = ndcPoints.map((point) => point.x);
128
+ const yArray = ndcPoints.map((point) => point.y);
129
+ const centerX = (Math.min(...xArray) + Math.max(...xArray)) / 2;
130
+ const maxY = Math.max(...yArray);
131
+ const wrapper = this.container.parentElement;
132
+ if (!wrapper)
133
+ return this;
134
+ const centerScreenX = ((centerX + 1) / 2) * wrapper.clientWidth;
135
+ const maxScreenY = (-(maxY - 1) / 2) * wrapper.clientHeight;
136
+ const x = centerScreenX;
137
+ const y = maxScreenY - 34;
138
+ this.container.style.transform = `translate3d(${x}px, ${y}px, 10px)`;
139
+ return this.show();
140
+ }
141
+ hide() {
142
+ this.visible = false;
143
+ this.container.style.opacity = '0';
144
+ this.container.style.pointerEvents = 'none';
145
+ return this;
146
+ }
147
+ show() {
148
+ this.visible = true;
149
+ this.container.style.opacity = '1';
150
+ this.container.style.pointerEvents = 'auto';
151
+ return this;
152
+ }
153
+ }
@@ -0,0 +1,11 @@
1
+ import type { Five, Intersection } from '@realsee/five';
2
+ import { Line3, Vector3 } from 'three';
3
+ export default class FiveHelper {
4
+ edges: Line3[];
5
+ private five;
6
+ constructor(five: Five);
7
+ dispose(): void;
8
+ getAdsorbentPoint(intersection: Intersection): Vector3 | null;
9
+ /** 模型加载后获取折线 */
10
+ private onModelLoaded;
11
+ }
@@ -0,0 +1,48 @@
1
+ import { Vector3 } from 'three';
2
+ export default class FiveHelper {
3
+ constructor(five) {
4
+ Object.defineProperty(this, "edges", {
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true,
8
+ value: []
9
+ });
10
+ Object.defineProperty(this, "five", {
11
+ enumerable: true,
12
+ configurable: true,
13
+ writable: true,
14
+ value: void 0
15
+ });
16
+ /** 模型加载后获取折线 */
17
+ Object.defineProperty(this, "onModelLoaded", {
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true,
21
+ value: () => {
22
+ if (!this.five.model)
23
+ return;
24
+ this.edges = this.five.model.getEdges();
25
+ }
26
+ });
27
+ this.five = five;
28
+ this.five.model.loaded ? this.onModelLoaded() : this.five.on('modelLoaded', this.onModelLoaded);
29
+ }
30
+ dispose() { }
31
+ getAdsorbentPoint(intersection) {
32
+ if (this.edges.length === 0)
33
+ return null;
34
+ let distance = Infinity;
35
+ let closestPoint;
36
+ this.edges.forEach((line) => {
37
+ const _closestPoint = line.closestPointToPoint(intersection.point, true, new Vector3());
38
+ const _distance = _closestPoint.distanceTo(intersection.point);
39
+ if (_distance < distance) {
40
+ closestPoint = _closestPoint;
41
+ distance = _distance;
42
+ }
43
+ });
44
+ if (distance > 0.1)
45
+ return null;
46
+ return closestPoint || null;
47
+ }
48
+ }
@@ -0,0 +1,18 @@
1
+ import type MeasureController from '../Controller';
2
+ export interface GuideControllerParams {
3
+ container: Element;
4
+ }
5
+ export declare class GuideController {
6
+ private measureController;
7
+ private textDom;
8
+ private container;
9
+ private hasAnchor;
10
+ constructor(measureController: MeasureController, params: GuideControllerParams);
11
+ dispose(): void;
12
+ show(): this;
13
+ hide(): this;
14
+ private initDom;
15
+ private onModelChange;
16
+ private anchorChange;
17
+ private onEditedLineChange;
18
+ }
@@ -0,0 +1,110 @@
1
+ export class GuideController {
2
+ constructor(measureController, params) {
3
+ Object.defineProperty(this, "measureController", {
4
+ enumerable: true,
5
+ configurable: true,
6
+ writable: true,
7
+ value: void 0
8
+ });
9
+ Object.defineProperty(this, "textDom", {
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true,
13
+ value: document.createElement('span')
14
+ });
15
+ Object.defineProperty(this, "container", {
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true,
19
+ value: document.createElement('div')
20
+ });
21
+ Object.defineProperty(this, "hasAnchor", {
22
+ enumerable: true,
23
+ configurable: true,
24
+ writable: true,
25
+ value: false
26
+ });
27
+ Object.defineProperty(this, "onModelChange", {
28
+ enumerable: true,
29
+ configurable: true,
30
+ writable: true,
31
+ value: (mode) => {
32
+ if (mode === 'Watch') {
33
+ this.textDom.innerText = ``;
34
+ return;
35
+ }
36
+ this.textDom.innerText = `请选择第一个测量点,Esc或单击鼠标右键可取消选择`;
37
+ }
38
+ });
39
+ Object.defineProperty(this, "anchorChange", {
40
+ enumerable: true,
41
+ configurable: true,
42
+ writable: true,
43
+ value: (anchor) => {
44
+ if (!this.hasAnchor && !!anchor) {
45
+ this.hasAnchor = true;
46
+ this.textDom.innerText = `选择下一个测量点,Esc或单击鼠标右键取消选择`;
47
+ }
48
+ else if (!anchor) {
49
+ this.hasAnchor = false;
50
+ this.textDom.innerText = `请选择第一个测量点,Esc或单击鼠标右键可取消选择`;
51
+ }
52
+ }
53
+ });
54
+ Object.defineProperty(this, "onEditedLineChange", {
55
+ enumerable: true,
56
+ configurable: true,
57
+ writable: true,
58
+ value: (lines) => {
59
+ if (lines.length === 1) {
60
+ this.textDom.innerText = `可以连续选择测量点,或点击下方“完成”结束测量(Esc取消,Command+S保存)`;
61
+ }
62
+ }
63
+ });
64
+ this.initDom();
65
+ params.container.append(this.container);
66
+ this.measureController = measureController;
67
+ measureController.hook.on('modeChange', this.onModelChange);
68
+ measureController.hook.on('anchorChange', this.anchorChange);
69
+ measureController.hook.on('editedLineChange', this.onEditedLineChange);
70
+ }
71
+ dispose() {
72
+ this.hide();
73
+ this.container.remove();
74
+ }
75
+ show() {
76
+ this.container.style.opacity = '1';
77
+ this.container.style.transform = 'translate(0, 0)';
78
+ return this;
79
+ }
80
+ hide() {
81
+ this.container.style.opacity = '0';
82
+ this.container.style.transform = 'translate(0, -10px)';
83
+ this.measureController.hook.off('modeChange', this.onModelChange);
84
+ this.measureController.hook.off('anchorChange', this.anchorChange);
85
+ this.measureController.hook.off('editedLineChange', this.onEditedLineChange);
86
+ return this;
87
+ }
88
+ initDom() {
89
+ const container = this.container;
90
+ const textDom = this.textDom;
91
+ container.classList.add('fpm__guide-container');
92
+ container.style.position = 'absolute';
93
+ container.style.top = '0px';
94
+ container.style.left = '0px';
95
+ container.style.width = '100%';
96
+ container.style.height = '110px';
97
+ container.style.display = 'flex';
98
+ container.style.alignItems = 'center';
99
+ container.style.justifyContent = 'center';
100
+ container.style.transform = 'translate(0, -10px)';
101
+ container.style.background = `linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.00) 100%)`;
102
+ container.style.transition = 'opacity 500ms ease-in-out, transform 500ms ease-in-out';
103
+ container.style.opacity = '0';
104
+ textDom.classList.add('fpm__guide-text');
105
+ textDom.style.color = '#fff';
106
+ textDom.style.fontSize = '20px';
107
+ textDom.innerText = `点击下方“添加”开始测距`;
108
+ container.appendChild(textDom);
109
+ }
110
+ }
@@ -0,0 +1,24 @@
1
+ import type { Five } from '@realsee/five';
2
+ import { Vector3 } from 'three';
3
+ export interface MagnifierOptions {
4
+ width: number;
5
+ height: number;
6
+ scale: number;
7
+ }
8
+ export default class Magnifier {
9
+ private five;
10
+ private scale;
11
+ private width;
12
+ private height;
13
+ private pixelRatio;
14
+ private originWidth;
15
+ private originHeight;
16
+ private context;
17
+ private canvas;
18
+ private container?;
19
+ constructor(five: Five, options: MagnifierOptions);
20
+ dispose(): void;
21
+ clear(): void;
22
+ appendTo(element: Element): void;
23
+ updateWithPoint(point: Vector3): void;
24
+ }
@@ -0,0 +1,153 @@
1
+ import { Vector2 } from 'three';
2
+ /** 交换数组元素 */
3
+ function exchange(array, index1, index2) {
4
+ const value = array[index1];
5
+ array[index1] = array[index2];
6
+ array[index2] = value;
7
+ }
8
+ export default class Magnifier {
9
+ constructor(five, options) {
10
+ Object.defineProperty(this, "five", {
11
+ enumerable: true,
12
+ configurable: true,
13
+ writable: true,
14
+ value: void 0
15
+ });
16
+ Object.defineProperty(this, "scale", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: void 0
21
+ });
22
+ Object.defineProperty(this, "width", {
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true,
26
+ value: void 0
27
+ });
28
+ Object.defineProperty(this, "height", {
29
+ enumerable: true,
30
+ configurable: true,
31
+ writable: true,
32
+ value: void 0
33
+ });
34
+ Object.defineProperty(this, "pixelRatio", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: void 0
39
+ });
40
+ Object.defineProperty(this, "originWidth", {
41
+ enumerable: true,
42
+ configurable: true,
43
+ writable: true,
44
+ value: void 0
45
+ });
46
+ Object.defineProperty(this, "originHeight", {
47
+ enumerable: true,
48
+ configurable: true,
49
+ writable: true,
50
+ value: void 0
51
+ });
52
+ Object.defineProperty(this, "context", {
53
+ enumerable: true,
54
+ configurable: true,
55
+ writable: true,
56
+ value: void 0
57
+ });
58
+ Object.defineProperty(this, "canvas", {
59
+ enumerable: true,
60
+ configurable: true,
61
+ writable: true,
62
+ value: document.createElement('canvas')
63
+ });
64
+ Object.defineProperty(this, "container", {
65
+ enumerable: true,
66
+ configurable: true,
67
+ writable: true,
68
+ value: void 0
69
+ });
70
+ if (!five.renderer)
71
+ throw new Error('Five Render 未初始化');
72
+ this.five = five;
73
+ const scale = options.scale;
74
+ const pixelRatio = five.renderer.getPixelRatio();
75
+ const originWidth = options.width;
76
+ const originHeight = options.height;
77
+ const width = originWidth * pixelRatio;
78
+ const height = originHeight * pixelRatio;
79
+ const magnifier = this.canvas;
80
+ const context = this.canvas.getContext('2d');
81
+ if (!context)
82
+ throw new Error('CANNOT CREATE CONTEXT2D');
83
+ this.scale = scale;
84
+ this.context = context;
85
+ this.width = width;
86
+ this.height = height;
87
+ this.originWidth = originWidth;
88
+ this.originHeight = originHeight;
89
+ this.pixelRatio = pixelRatio;
90
+ magnifier.classList.add('plugin-measure-magnifier');
91
+ magnifier.style.position = 'absolute';
92
+ magnifier.style.pointerEvents = 'none';
93
+ magnifier.style.borderRadius = '50%';
94
+ magnifier.style.left = -width / 2 + 'px';
95
+ magnifier.style.top = -height - 90 + 'px';
96
+ magnifier.setAttribute('width', width.toString());
97
+ magnifier.setAttribute('height', height.toString());
98
+ this.canvas.style.width = originWidth + 'px';
99
+ this.canvas.style.height = originHeight + 'px';
100
+ }
101
+ dispose() {
102
+ this.clear();
103
+ this.canvas.remove();
104
+ }
105
+ clear() {
106
+ this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
107
+ }
108
+ appendTo(element) {
109
+ this.container = element;
110
+ element.append(this.canvas);
111
+ }
112
+ updateWithPoint(point) {
113
+ if (!this.five.renderer || !this.container)
114
+ return;
115
+ const { scale, pixelRatio, context, originWidth, originHeight, width, height } = this;
116
+ const position2d = point.clone().project(this.five.camera);
117
+ const left = ((position2d.x + 1) / 2) * this.container.clientWidth;
118
+ const right = (-(position2d.x - 1) / 2) * this.container.clientWidth;
119
+ const top = (-(position2d.y - 1) / 2) * this.container.clientHeight;
120
+ if (left < 183) {
121
+ this.canvas.style.top = -originHeight / 2 + 'px';
122
+ this.canvas.style.left = 90 + 'px';
123
+ }
124
+ else if (top < 183) {
125
+ this.canvas.style.top = 90 + 'px';
126
+ this.canvas.style.left = -originWidth / 2 + 'px';
127
+ }
128
+ else if (right < 183) {
129
+ this.canvas.style.top = -originHeight / 2 + 'px';
130
+ this.canvas.style.left = -originWidth - 90 + 'px';
131
+ }
132
+ else {
133
+ this.canvas.style.left = -originWidth / 2 + 'px';
134
+ this.canvas.style.top = -originHeight - 90 + 'px';
135
+ }
136
+ this.canvas.style.transform = `translate3d(${left}px, ${top}px, 10px)`;
137
+ const renderSize = this.five.renderer.getSize(new Vector2());
138
+ const x = ((position2d.x + 1) / 2) * renderSize.x;
139
+ const y = ((position2d.y + 1) / 2) * renderSize.y;
140
+ const pixels = this.five.getPixels(x - originWidth / scale / 2, y - originHeight / scale / 2, originWidth / scale, originHeight / scale, pixelRatio * scale);
141
+ const length = (width * height) / 2;
142
+ for (let index = 0; index < length; index++) {
143
+ const targetIndex = (height - Math.floor(index / width) - 1) * width + (index % width);
144
+ exchange(pixels, index * 4 + 0, targetIndex * 4 + 0);
145
+ exchange(pixels, index * 4 + 1, targetIndex * 4 + 1);
146
+ exchange(pixels, index * 4 + 2, targetIndex * 4 + 2);
147
+ exchange(pixels, index * 4 + 3, targetIndex * 4 + 3);
148
+ }
149
+ const imageData = context.createImageData(width, height);
150
+ imageData.data.set(pixels);
151
+ context.putImageData(imageData, 0, 0);
152
+ }
153
+ }
@@ -0,0 +1,6 @@
1
+ export declare const 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";
2
+ export declare const 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";
3
+ export declare const MAIN_MOUSE_ENTER_FILL = "url(#fpm__main-b)";
4
+ export declare const MAIN_MOUSE_LEAVE_FILL = "url(#fpm__main-c)";
5
+ declare const _default: string;
6
+ export default _default;
@@ -0,0 +1,117 @@
1
+ export const 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';
2
+ export const 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';
3
+ export const MAIN_MOUSE_ENTER_FILL = 'url(#fpm__main-b)';
4
+ export const MAIN_MOUSE_LEAVE_FILL = 'url(#fpm__main-c)';
5
+ const revokeSvg = `
6
+ <svg class="fpm__revoke-icon" width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
7
+ <defs>
8
+ <linearGradient x1="47.631%" y1="55.183%" x2="2.967%" y2="86.323%" id="fpm__revoke-a">
9
+ <stop stop-color="#FFF" offset="0%" />
10
+ <stop stop-color="#FFF" stop-opacity=".5" offset="100%" />
11
+ </linearGradient>
12
+ <linearGradient x1="5.297%" y1="43.016%" x2="38.238%" y2="79.932%" id="fpm__revoke-b">
13
+ <stop stop-color="#FFF" offset="0%" />
14
+ <stop stop-color="#FFF" stop-opacity="0" offset="100%" />
15
+ </linearGradient>
16
+ </defs>
17
+ <path
18
+ 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"
19
+ fill="url(#fpm__revoke-a)"
20
+ fill-rule="nonzero"
21
+ stroke="url(#fpm__revoke-b)"
22
+ stroke-width=".5"
23
+ />
24
+ </svg>
25
+ `;
26
+ const exitSvg = `
27
+ <svg class="fpm__exit-icon width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
28
+ <defs>
29
+ <linearGradient x1="36.288%" y1="73.736%" x2="54.242%" y2="97.166%" id="fpm__exit-a">
30
+ <stop stop-color="#FFF" offset="0%" />
31
+ <stop stop-color="#FFF" stop-opacity=".5" offset="100%" />
32
+ </linearGradient>
33
+ <linearGradient x1="100%" y1="47.234%" x2="24.047%" y2="47.234%" id="fpm__exit-b">
34
+ <stop stop-color="#FFF" offset="0%" />
35
+ <stop stop-color="#FFF" stop-opacity=".005" offset="99.535%" />
36
+ <stop stop-color="#FFF" stop-opacity="0" offset="100%" />
37
+ </linearGradient>
38
+ </defs>
39
+ <path
40
+ 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"
41
+ fill="url(#fpm__exit-a)"
42
+ fill-rule="nonzero"
43
+ stroke="url(#fpm__exit-b)"
44
+ stroke-width=".5"
45
+ />
46
+ </svg>
47
+ `;
48
+ const mainSvg = `
49
+ <svg class="fpm__main-icon" width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg">
50
+ <defs>
51
+ <mask id="fpm__main-icon-mask">
52
+ <rect id="fpm__main-icon-mask-black" x="0" y="0" width="30" height="30" fill="black"></rect>
53
+ <rect id="fpm__main-icon-mask-white" x="0" y="0" width="0" height="30" fill="white"></rect>
54
+ </mask>
55
+ <linearGradient id="fpm__main-a" x1="25.371%" y1="0%" x2="109.587%" y2="172.268%">
56
+ <stop stop-color="#FFF" offset="0%" />
57
+ <stop stop-color="#FFF" stop-opacity=".77" offset="44.051%" />
58
+ <stop stop-color="#FFF" stop-opacity=".201" offset="100%" />
59
+ </linearGradient>
60
+ <radialGradient id="fpm__main-b" fx="50%" fy="50%" r="50.864%" gradientTransform="matrix(-.98302 0 0 -1 .992 1)">
61
+ <stop stop-color="#2D7CFF" offset="0%" />
62
+ <stop stop-color="#2D7CFF" stop-opacity=".3" offset="100%" />
63
+ </radialGradient>
64
+ <radialGradient id="fpm__main-c" fx="50%" fy="50%" r="50.864%" gradientTransform="matrix(-.98302 0 0 -1 .992 1)">
65
+ <stop stop-opacity=".4" offset="0%" />
66
+ <stop stop-opacity=".12" offset="100%" />
67
+ </radialGradient>
68
+ </defs>
69
+ <g fill="none" fill-rule="evenodd">
70
+ <circle fill="url(#fpm__main-a)" cx="30" cy="30" r="30" />
71
+ <path
72
+ class="fpm__main-icon-path"
73
+ d="${MAIN_NORMAL_PATH}"
74
+ fill="${MAIN_MOUSE_LEAVE_FILL}"
75
+ fill-rule="nonzero"
76
+ transform="translate(14 14)"
77
+ />
78
+ </g>
79
+ </svg>
80
+ `;
81
+ export default `
82
+ <style>
83
+ .fpm__revoke {
84
+ opacity: 0.3;
85
+ }
86
+
87
+ .fpm__revoke.enabled {
88
+ opacity: 0.7;
89
+ }
90
+
91
+ .fpm__revoke.enabled:hover {
92
+ opacity: 1;
93
+ }
94
+
95
+ .fpm__revoke-icon {
96
+ width: 40px;
97
+ height: 40px;
98
+ margin-top: 10px;
99
+ cursor: pointer;
100
+ }
101
+ </style>
102
+ <div class="fpm_ui-bg"></div>
103
+ <div class="fpm_operating-space">
104
+ <div class="fpm__ui-item fpm__revoke">
105
+ ${revokeSvg}
106
+ <span class="fpm__text fpm__revoke-text">撤销</span>
107
+ </div>
108
+ <div class="fpm__ui-item fpm__main">
109
+ ${mainSvg}
110
+ <span class="fpm__text fpm__main-text">添加</span>
111
+ </div>
112
+ <div class="fpm__ui-item fpm__exit">
113
+ ${exitSvg}
114
+ <span class="fpm__text fpm__exit-text">退出</span>
115
+ </div>
116
+ </div>
117
+ `;
@@ -0,0 +1,18 @@
1
+ import type 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
+ }