leiting-bim 2.1.48 → 2.1.52

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 (410) hide show
  1. package/package.json +16 -2
  2. package/plugins/cesium-core/dist/cesium-core.mjs +587 -535
  3. package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -0
  4. package/plugins/cesium-core/dist/cesium-core.umd.js +19 -18
  5. package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -0
  6. package/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +76 -73
  7. package/plugins/cesium-vue/dist/_commonjsHelpers-DaMA6jEr.js +1 -0
  8. package/plugins/cesium-vue/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  9. package/plugins/cesium-vue/dist/components/basic-audio.js +3 -2
  10. package/plugins/cesium-vue/dist/components/basic-audio.js.map +1 -0
  11. package/plugins/cesium-vue/dist/components/basic-video.js +3 -2
  12. package/plugins/cesium-vue/dist/components/basic-video.js.map +1 -0
  13. package/plugins/cesium-vue/dist/components/card-carousel.js +2 -1
  14. package/plugins/cesium-vue/dist/components/card-carousel.js.map +1 -0
  15. package/plugins/cesium-vue/dist/components/card-content.js +13 -12
  16. package/plugins/cesium-vue/dist/components/card-content.js.map +1 -0
  17. package/plugins/cesium-vue/dist/components/card-page.js +2 -1
  18. package/plugins/cesium-vue/dist/components/card-page.js.map +1 -0
  19. package/plugins/cesium-vue/dist/components/carousel-img.js +6 -5
  20. package/plugins/cesium-vue/dist/components/carousel-img.js.map +1 -0
  21. package/plugins/cesium-vue/dist/components/echarts-pro.js +2 -1
  22. package/plugins/cesium-vue/dist/components/echarts-pro.js.map +1 -0
  23. package/plugins/cesium-vue/dist/components/marker-bubble.js +5 -4
  24. package/plugins/cesium-vue/dist/components/marker-bubble.js.map +1 -0
  25. package/plugins/cesium-vue/dist/components/marker-default.js +6 -5
  26. package/plugins/cesium-vue/dist/components/marker-default.js.map +1 -0
  27. package/plugins/cesium-vue/dist/components/marker-html.js +6 -5
  28. package/plugins/cesium-vue/dist/components/marker-html.js.map +1 -0
  29. package/plugins/cesium-vue/dist/components/marker-manage.js +112 -94
  30. package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -0
  31. package/plugins/cesium-vue/dist/components/marker-text.js +6 -5
  32. package/plugins/cesium-vue/dist/components/marker-text.js.map +1 -0
  33. package/plugins/cesium-vue/dist/components/measurement.js +4 -3
  34. package/plugins/cesium-vue/dist/components/measurement.js.map +1 -0
  35. package/plugins/cesium-vue/dist/components/position-picker/index.d.ts +58 -0
  36. package/plugins/cesium-vue/dist/components/position-picker.d.ts +6 -0
  37. package/plugins/cesium-vue/dist/components/position-picker.js +243 -0
  38. package/plugins/cesium-vue/dist/components/position-picker.js.map +1 -0
  39. package/plugins/cesium-vue/dist/create-DynflqE1.js +1 -0
  40. package/plugins/cesium-vue/dist/create-DynflqE1.js.map +1 -0
  41. package/plugins/cesium-vue/dist/{index-B03tSn8_.js → index-C0pspk3x.js} +3 -2
  42. package/plugins/cesium-vue/dist/index-C0pspk3x.js.map +1 -0
  43. package/plugins/cesium-vue/dist/index-CUs_hd1V.js +1 -0
  44. package/plugins/cesium-vue/dist/index-CUs_hd1V.js.map +1 -0
  45. package/plugins/cesium-vue/dist/index.d.ts +3 -1
  46. package/plugins/cesium-vue/dist/index.js +31 -27
  47. package/plugins/cesium-vue/dist/index.js.map +1 -0
  48. package/plugins/cesium-vue/package.json +4 -0
  49. package/plugins/theme-chalk/dist/debug.log +1 -0
  50. package/plugins/.gitmodules +0 -4
  51. package/plugins/README.md +0 -2
  52. package/plugins/build.cjs +0 -63
  53. package/plugins/cesium-core/pnpm-lock.yaml +0 -872
  54. package/plugins/cesium-core/src/components/BufferedHierarchicalAggregator.ts +0 -546
  55. package/plugins/cesium-core/src/components/HtmlOverlayLabelPool.ts +0 -489
  56. package/plugins/cesium-core/src/components/MarkerEvent.ts +0 -92
  57. package/plugins/cesium-core/src/components/Material/MaterialManager.ts +0 -129
  58. package/plugins/cesium-core/src/components/Material/help/PolylineFlowMaterialProperty.ts +0 -116
  59. package/plugins/cesium-core/src/components/Material/help/dynamicImgMaterial.ts +0 -236
  60. package/plugins/cesium-core/src/components/Material/index.ts +0 -3
  61. package/plugins/cesium-core/src/components/TooltipManager.ts +0 -52
  62. package/plugins/cesium-core/src/components/draw/DrawTool.ts +0 -55
  63. package/plugins/cesium-core/src/components/draw/handlers/CircleDrawer.ts +0 -159
  64. package/plugins/cesium-core/src/components/draw/handlers/LineDrawer.ts +0 -113
  65. package/plugins/cesium-core/src/components/draw/handlers/PointDrawer.ts +0 -70
  66. package/plugins/cesium-core/src/components/draw/handlers/PolygonDrawer.ts +0 -112
  67. package/plugins/cesium-core/src/components/draw/handlers/RectangleDrawer.ts +0 -115
  68. package/plugins/cesium-core/src/components/draw/types.ts +0 -28
  69. package/plugins/cesium-core/src/components/entity/EntityLayer.ts +0 -453
  70. package/plugins/cesium-core/src/components/gltf/GLTFManage.ts +0 -799
  71. package/plugins/cesium-core/src/components/gltf/index.ts +0 -1
  72. package/plugins/cesium-core/src/components/measurement/MeasurementTool.ts +0 -416
  73. package/plugins/cesium-core/src/components/measurement/handlers/AreaMeasure.ts +0 -552
  74. package/plugins/cesium-core/src/components/measurement/handlers/CircleMeasure.ts +0 -289
  75. package/plugins/cesium-core/src/components/measurement/handlers/CoordinateMeasure.ts +0 -139
  76. package/plugins/cesium-core/src/components/measurement/handlers/HorizontalMeasure.ts +0 -427
  77. package/plugins/cesium-core/src/components/measurement/handlers/PolylineDistanceMeasure.ts +0 -356
  78. package/plugins/cesium-core/src/components/measurement/handlers/RectangleMeasure.ts +0 -516
  79. package/plugins/cesium-core/src/components/measurement/handlers/RegularPolygonMeasure.ts +0 -472
  80. package/plugins/cesium-core/src/components/measurement/handlers/SpaceMeasure.ts +0 -250
  81. package/plugins/cesium-core/src/components/measurement/handlers/TerrainHeightMeasure.ts +0 -185
  82. package/plugins/cesium-core/src/components/measurement/handlers/TriangleMeasure.ts +0 -561
  83. package/plugins/cesium-core/src/components/measurement/handlers/VerticalMeasure.ts +0 -361
  84. package/plugins/cesium-core/src/components/measurement/index.ts +0 -13
  85. package/plugins/cesium-core/src/components/measurement/types.ts +0 -57
  86. package/plugins/cesium-core/src/components/primitive/PrimitiveManager.ts +0 -556
  87. package/plugins/cesium-core/src/components/roaming/CameraRoamTool.ts +0 -286
  88. package/plugins/cesium-core/src/components/roaming/PathRoamTool.ts +0 -174
  89. package/plugins/cesium-core/src/components/roaming/index.ts +0 -3
  90. package/plugins/cesium-core/src/components/roaming/types.ts +0 -71
  91. package/plugins/cesium-core/src/components/utils/convertGeoJsonToEntityData.ts +0 -98
  92. package/plugins/cesium-core/src/components/utils/uuid.ts +0 -7
  93. package/plugins/cesium-core/src/index.ts +0 -17
  94. package/plugins/cesium-core/src/test/measurement/index.html +0 -166
  95. package/plugins/cesium-core/src/test/roaming/c.gltf +0 -1
  96. package/plugins/cesium-core/src/test/roaming/f87cc3ea918a4b76bff2c88a3655eb1f.bin +0 -0
  97. package/plugins/cesium-core/src/test/roaming/index.html +0 -51
  98. package/plugins/cesium-core/src/test/roaming/path.html +0 -448
  99. package/plugins/cesium-core/src/test/roaming/view.html +0 -520
  100. package/plugins/cesium-core/stats.html +0 -4949
  101. package/plugins/cesium-core/tsconfig.json +0 -14
  102. package/plugins/cesium-core/vite.config.ts +0 -35
  103. package/plugins/cesium-vue/src/assets/icons/icon-001.png +0 -0
  104. package/plugins/cesium-vue/src/assets/icons/icon-002.png +0 -0
  105. package/plugins/cesium-vue/src/assets/icons/icon-003.png +0 -0
  106. package/plugins/cesium-vue/src/assets/icons/icon-004.png +0 -0
  107. package/plugins/cesium-vue/src/assets/icons/icon-005.png +0 -0
  108. package/plugins/cesium-vue/src/assets/icons/icon-006.png +0 -0
  109. package/plugins/cesium-vue/src/assets/icons/icon-007.png +0 -0
  110. package/plugins/cesium-vue/src/assets/icons/icon-008.png +0 -0
  111. package/plugins/cesium-vue/src/assets/icons/icon-009.png +0 -0
  112. package/plugins/cesium-vue/src/assets/icons/icon-010.png +0 -0
  113. package/plugins/cesium-vue/src/assets/icons/icon-011.png +0 -0
  114. package/plugins/cesium-vue/src/assets/icons/icon-012.png +0 -0
  115. package/plugins/cesium-vue/src/assets/img/Card3-BG.png +0 -0
  116. package/plugins/cesium-vue/src/assets/img/card_bg3.png +0 -0
  117. package/plugins/cesium-vue/src/components/basic-audio/index.ts +0 -6
  118. package/plugins/cesium-vue/src/components/basic-audio/src/BasicAudio.vue +0 -119
  119. package/plugins/cesium-vue/src/components/basic-audio/src/basicAudio.ts +0 -6
  120. package/plugins/cesium-vue/src/components/basic-video/index.ts +0 -7
  121. package/plugins/cesium-vue/src/components/basic-video/src/BasicVideo.vue +0 -58
  122. package/plugins/cesium-vue/src/components/basic-video/src/basicVideo.ts +0 -14
  123. package/plugins/cesium-vue/src/components/card-carousel/index.ts +0 -7
  124. package/plugins/cesium-vue/src/components/card-carousel/src/CardCarousel.vue +0 -124
  125. package/plugins/cesium-vue/src/components/card-carousel/src/cardCarousel.ts +0 -60
  126. package/plugins/cesium-vue/src/components/card-content/index.ts +0 -7
  127. package/plugins/cesium-vue/src/components/card-content/src/CardContent.vue +0 -41
  128. package/plugins/cesium-vue/src/components/card-content/src/cardContent.ts +0 -22
  129. package/plugins/cesium-vue/src/components/card-page/index.ts +0 -7
  130. package/plugins/cesium-vue/src/components/card-page/src/CardPage.vue +0 -102
  131. package/plugins/cesium-vue/src/components/card-page/src/cardPage.ts +0 -37
  132. package/plugins/cesium-vue/src/components/carousel-img/index.ts +0 -7
  133. package/plugins/cesium-vue/src/components/carousel-img/src/CarouselImg.vue +0 -84
  134. package/plugins/cesium-vue/src/components/carousel-img/src/carouselImg.ts +0 -8
  135. package/plugins/cesium-vue/src/components/echarts-pro/index.ts +0 -7
  136. package/plugins/cesium-vue/src/components/echarts-pro/src/EchartsPro.vue +0 -107
  137. package/plugins/cesium-vue/src/components/echarts-pro/src/echartsPro.ts +0 -12
  138. package/plugins/cesium-vue/src/components/echarts-pro/src/hook/useECharts.ts +0 -55
  139. package/plugins/cesium-vue/src/components/marker-bubble/index.ts +0 -7
  140. package/plugins/cesium-vue/src/components/marker-bubble/src/MarkerBubble.vue +0 -235
  141. package/plugins/cesium-vue/src/components/marker-bubble/src/markerBubble.ts +0 -35
  142. package/plugins/cesium-vue/src/components/marker-default/index.ts +0 -7
  143. package/plugins/cesium-vue/src/components/marker-default/src/MarkerDefault.vue +0 -19
  144. package/plugins/cesium-vue/src/components/marker-default/src/markerDefault.ts +0 -12
  145. package/plugins/cesium-vue/src/components/marker-html/index.ts +0 -7
  146. package/plugins/cesium-vue/src/components/marker-html/src/MarkerHtml.vue +0 -21
  147. package/plugins/cesium-vue/src/components/marker-html/src/markerHtml.ts +0 -12
  148. package/plugins/cesium-vue/src/components/marker-manage/index.ts +0 -9
  149. package/plugins/cesium-vue/src/components/marker-manage/src/components/MarkerManage.vue +0 -106
  150. package/plugins/cesium-vue/src/components/marker-manage/src/config/theme.ts +0 -8
  151. package/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManage.ts +0 -466
  152. package/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManagerCore.ts +0 -148
  153. package/plugins/cesium-vue/src/components/marker-manage/src/hook/useMarkerManage.ts +0 -45
  154. package/plugins/cesium-vue/src/components/marker-manage/src/type/markerManage.ts +0 -75
  155. package/plugins/cesium-vue/src/components/marker-manage/src/utils/themeTool.ts +0 -154
  156. package/plugins/cesium-vue/src/components/marker-text/index.ts +0 -7
  157. package/plugins/cesium-vue/src/components/marker-text/src/MarkerText.vue +0 -14
  158. package/plugins/cesium-vue/src/components/marker-text/src/markerText.ts +0 -10
  159. package/plugins/cesium-vue/src/components/measurement/index.ts +0 -7
  160. package/plugins/cesium-vue/src/components/measurement/src/Measurement.vue +0 -183
  161. package/plugins/cesium-vue/src/components/measurement/src/measurement.ts +0 -20
  162. package/plugins/cesium-vue/src/index.ts +0 -89
  163. package/plugins/cesium-vue/stats.html +0 -4949
  164. package/plugins/cesium-vue/tsconfig.json +0 -18
  165. package/plugins/cesium-vue/vite.config.ts +0 -62
  166. package/plugins/plugins/README.md +0 -2
  167. package/plugins/plugins/build.cjs +0 -63
  168. package/plugins/plugins/cesium-core/dist/cesium-core.mjs +0 -5881
  169. package/plugins/plugins/cesium-core/dist/cesium-core.mjs.map +0 -1
  170. package/plugins/plugins/cesium-core/dist/cesium-core.umd.js +0 -77
  171. package/plugins/plugins/cesium-core/dist/cesium-core.umd.js.map +0 -1
  172. package/plugins/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +0 -73
  173. package/plugins/plugins/cesium-core/dist/components/HtmlOverlayLabelPool.d.ts +0 -152
  174. package/plugins/plugins/cesium-core/dist/components/MarkerEvent.d.ts +0 -38
  175. package/plugins/plugins/cesium-core/dist/components/Material/MaterialManager.d.ts +0 -49
  176. package/plugins/plugins/cesium-core/dist/components/Material/help/PolylineFlowMaterialProperty.d.ts +0 -10
  177. package/plugins/plugins/cesium-core/dist/components/Material/help/dynamicImgMaterial.d.ts +0 -16
  178. package/plugins/plugins/cesium-core/dist/components/Material/index.d.ts +0 -3
  179. package/plugins/plugins/cesium-core/dist/components/TooltipManager.d.ts +0 -11
  180. package/plugins/plugins/cesium-core/dist/components/draw/DrawTool.d.ts +0 -10
  181. package/plugins/plugins/cesium-core/dist/components/draw/handlers/CircleDrawer.d.ts +0 -16
  182. package/plugins/plugins/cesium-core/dist/components/draw/handlers/LineDrawer.d.ts +0 -14
  183. package/plugins/plugins/cesium-core/dist/components/draw/handlers/PointDrawer.d.ts +0 -12
  184. package/plugins/plugins/cesium-core/dist/components/draw/handlers/PolygonDrawer.d.ts +0 -14
  185. package/plugins/plugins/cesium-core/dist/components/draw/handlers/RectangleDrawer.d.ts +0 -13
  186. package/plugins/plugins/cesium-core/dist/components/draw/types.d.ts +0 -29
  187. package/plugins/plugins/cesium-core/dist/components/entity/EntityLayer.d.ts +0 -65
  188. package/plugins/plugins/cesium-core/dist/components/gltf/GLTFManage.d.ts +0 -141
  189. package/plugins/plugins/cesium-core/dist/components/gltf/index.d.ts +0 -1
  190. package/plugins/plugins/cesium-core/dist/components/measurement/MeasurementTool.d.ts +0 -34
  191. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/AreaMeasure.d.ts +0 -23
  192. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/CircleMeasure.d.ts +0 -21
  193. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/CoordinateMeasure.d.ts +0 -16
  194. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/HorizontalMeasure.d.ts +0 -25
  195. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/PolylineDistanceMeasure.d.ts +0 -24
  196. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/RectangleMeasure.d.ts +0 -22
  197. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/RegularPolygonMeasure.d.ts +0 -23
  198. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/SpaceMeasure.d.ts +0 -20
  199. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/TerrainHeightMeasure.d.ts +0 -18
  200. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/TriangleMeasure.d.ts +0 -24
  201. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/VerticalMeasure.d.ts +0 -23
  202. package/plugins/plugins/cesium-core/dist/components/measurement/index.d.ts +0 -13
  203. package/plugins/plugins/cesium-core/dist/components/measurement/types.d.ts +0 -42
  204. package/plugins/plugins/cesium-core/dist/components/primitive/PrimitiveManager.d.ts +0 -50
  205. package/plugins/plugins/cesium-core/dist/components/roaming/CameraRoamTool.d.ts +0 -27
  206. package/plugins/plugins/cesium-core/dist/components/roaming/PathRoamTool.d.ts +0 -23
  207. package/plugins/plugins/cesium-core/dist/components/roaming/index.d.ts +0 -3
  208. package/plugins/plugins/cesium-core/dist/components/roaming/types.d.ts +0 -66
  209. package/plugins/plugins/cesium-core/dist/components/utils/convertGeoJsonToEntityData.d.ts +0 -1
  210. package/plugins/plugins/cesium-core/dist/components/utils/uuid.d.ts +0 -1
  211. package/plugins/plugins/cesium-core/dist/index.d.ts +0 -12
  212. package/plugins/plugins/cesium-core/package.json +0 -26
  213. package/plugins/plugins/cesium-core/pnpm-lock.yaml +0 -872
  214. package/plugins/plugins/cesium-core/src/components/BufferedHierarchicalAggregator.ts +0 -546
  215. package/plugins/plugins/cesium-core/src/components/HtmlOverlayLabelPool.ts +0 -489
  216. package/plugins/plugins/cesium-core/src/components/MarkerEvent.ts +0 -92
  217. package/plugins/plugins/cesium-core/src/components/Material/MaterialManager.ts +0 -129
  218. package/plugins/plugins/cesium-core/src/components/Material/help/PolylineFlowMaterialProperty.ts +0 -116
  219. package/plugins/plugins/cesium-core/src/components/Material/help/dynamicImgMaterial.ts +0 -236
  220. package/plugins/plugins/cesium-core/src/components/Material/index.ts +0 -3
  221. package/plugins/plugins/cesium-core/src/components/TooltipManager.ts +0 -52
  222. package/plugins/plugins/cesium-core/src/components/draw/DrawTool.ts +0 -55
  223. package/plugins/plugins/cesium-core/src/components/draw/handlers/CircleDrawer.ts +0 -159
  224. package/plugins/plugins/cesium-core/src/components/draw/handlers/LineDrawer.ts +0 -113
  225. package/plugins/plugins/cesium-core/src/components/draw/handlers/PointDrawer.ts +0 -70
  226. package/plugins/plugins/cesium-core/src/components/draw/handlers/PolygonDrawer.ts +0 -112
  227. package/plugins/plugins/cesium-core/src/components/draw/handlers/RectangleDrawer.ts +0 -115
  228. package/plugins/plugins/cesium-core/src/components/draw/types.ts +0 -28
  229. package/plugins/plugins/cesium-core/src/components/entity/EntityLayer.ts +0 -453
  230. package/plugins/plugins/cesium-core/src/components/gltf/GLTFManage.ts +0 -799
  231. package/plugins/plugins/cesium-core/src/components/gltf/index.ts +0 -1
  232. package/plugins/plugins/cesium-core/src/components/measurement/MeasurementTool.ts +0 -416
  233. package/plugins/plugins/cesium-core/src/components/measurement/handlers/AreaMeasure.ts +0 -451
  234. package/plugins/plugins/cesium-core/src/components/measurement/handlers/CircleMeasure.ts +0 -267
  235. package/plugins/plugins/cesium-core/src/components/measurement/handlers/CoordinateMeasure.ts +0 -139
  236. package/plugins/plugins/cesium-core/src/components/measurement/handlers/HorizontalMeasure.ts +0 -418
  237. package/plugins/plugins/cesium-core/src/components/measurement/handlers/PolylineDistanceMeasure.ts +0 -352
  238. package/plugins/plugins/cesium-core/src/components/measurement/handlers/RectangleMeasure.ts +0 -388
  239. package/plugins/plugins/cesium-core/src/components/measurement/handlers/RegularPolygonMeasure.ts +0 -379
  240. package/plugins/plugins/cesium-core/src/components/measurement/handlers/SpaceMeasure.ts +0 -246
  241. package/plugins/plugins/cesium-core/src/components/measurement/handlers/TerrainHeightMeasure.ts +0 -185
  242. package/plugins/plugins/cesium-core/src/components/measurement/handlers/TriangleMeasure.ts +0 -541
  243. package/plugins/plugins/cesium-core/src/components/measurement/handlers/VerticalMeasure.ts +0 -360
  244. package/plugins/plugins/cesium-core/src/components/measurement/index.ts +0 -13
  245. package/plugins/plugins/cesium-core/src/components/measurement/types.ts +0 -57
  246. package/plugins/plugins/cesium-core/src/components/primitive/PrimitiveManager.ts +0 -556
  247. package/plugins/plugins/cesium-core/src/components/roaming/CameraRoamTool.ts +0 -286
  248. package/plugins/plugins/cesium-core/src/components/roaming/PathRoamTool.ts +0 -174
  249. package/plugins/plugins/cesium-core/src/components/roaming/index.ts +0 -3
  250. package/plugins/plugins/cesium-core/src/components/roaming/types.ts +0 -71
  251. package/plugins/plugins/cesium-core/src/components/utils/convertGeoJsonToEntityData.ts +0 -98
  252. package/plugins/plugins/cesium-core/src/components/utils/uuid.ts +0 -7
  253. package/plugins/plugins/cesium-core/src/index.ts +0 -17
  254. package/plugins/plugins/cesium-core/src/test/measurement/index.html +0 -166
  255. package/plugins/plugins/cesium-core/src/test/roaming/c.gltf +0 -1
  256. package/plugins/plugins/cesium-core/src/test/roaming/f87cc3ea918a4b76bff2c88a3655eb1f.bin +0 -0
  257. package/plugins/plugins/cesium-core/src/test/roaming/index.html +0 -51
  258. package/plugins/plugins/cesium-core/src/test/roaming/path.html +0 -448
  259. package/plugins/plugins/cesium-core/src/test/roaming/view.html +0 -520
  260. package/plugins/plugins/cesium-core/stats.html +0 -4949
  261. package/plugins/plugins/cesium-core/tsconfig.json +0 -14
  262. package/plugins/plugins/cesium-core/vite.config.ts +0 -35
  263. package/plugins/plugins/cesium-vue/dist/components/basic-audio/index.d.ts +0 -18
  264. package/plugins/plugins/cesium-vue/dist/components/basic-audio/index.d.ts.map +0 -1
  265. package/plugins/plugins/cesium-vue/dist/components/basic-video/index.d.ts +0 -92
  266. package/plugins/plugins/cesium-vue/dist/components/basic-video/index.d.ts.map +0 -1
  267. package/plugins/plugins/cesium-vue/dist/components/camera-roam/index.d.ts +0 -82
  268. package/plugins/plugins/cesium-vue/dist/components/camera-roam/index.d.ts.map +0 -1
  269. package/plugins/plugins/cesium-vue/dist/components/card-carousel/index.d.ts +0 -152
  270. package/plugins/plugins/cesium-vue/dist/components/card-carousel/index.d.ts.map +0 -1
  271. package/plugins/plugins/cesium-vue/dist/components/card-content/index.d.ts +0 -21
  272. package/plugins/plugins/cesium-vue/dist/components/card-content/index.d.ts.map +0 -1
  273. package/plugins/plugins/cesium-vue/dist/components/card-page/index.d.ts +0 -69
  274. package/plugins/plugins/cesium-vue/dist/components/card-page/index.d.ts.map +0 -1
  275. package/plugins/plugins/cesium-vue/dist/components/carousel-img/index.d.ts +0 -21
  276. package/plugins/plugins/cesium-vue/dist/components/carousel-img/index.d.ts.map +0 -1
  277. package/plugins/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts +0 -68
  278. package/plugins/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts.map +0 -1
  279. package/plugins/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts +0 -78
  280. package/plugins/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts.map +0 -1
  281. package/plugins/plugins/cesium-vue/dist/components/marker-default/index.d.ts +0 -48
  282. package/plugins/plugins/cesium-vue/dist/components/marker-default/index.d.ts.map +0 -1
  283. package/plugins/plugins/cesium-vue/dist/components/marker-html/index.d.ts +0 -48
  284. package/plugins/plugins/cesium-vue/dist/components/marker-html/index.d.ts.map +0 -1
  285. package/plugins/plugins/cesium-vue/dist/components/marker-manage/index.d.ts +0 -164
  286. package/plugins/plugins/cesium-vue/dist/components/marker-manage/index.d.ts.map +0 -1
  287. package/plugins/plugins/cesium-vue/dist/components/marker-text/index.d.ts +0 -30
  288. package/plugins/plugins/cesium-vue/dist/components/marker-text/index.d.ts.map +0 -1
  289. package/plugins/plugins/cesium-vue/dist/components/measurement/index.d.ts +0 -78
  290. package/plugins/plugins/cesium-vue/dist/components/measurement/index.d.ts.map +0 -1
  291. package/plugins/plugins/cesium-vue/dist/components/path-roam/index.d.ts +0 -82
  292. package/plugins/plugins/cesium-vue/dist/components/path-roam/index.d.ts.map +0 -1
  293. package/plugins/plugins/cesium-vue/dist/components/test/index.d.ts +0 -67
  294. package/plugins/plugins/cesium-vue/dist/components/test/index.d.ts.map +0 -1
  295. package/plugins/plugins/cesium-vue/dist/index.css +0 -1
  296. package/plugins/plugins/cesium-vue/dist/index.d.ts +0 -30
  297. package/plugins/plugins/cesium-vue/dist/index.d.ts.map +0 -1
  298. package/plugins/plugins/cesium-vue/dist/index.js +0 -10087
  299. package/plugins/plugins/cesium-vue/dist/index.js.map +0 -1
  300. package/plugins/plugins/cesium-vue/dist/index.umd.cjs +0 -46
  301. package/plugins/plugins/cesium-vue/dist/index.umd.cjs.map +0 -1
  302. package/plugins/plugins/cesium-vue/package.json +0 -48
  303. package/plugins/plugins/cesium-vue/src/assets/icons/icon-001.png +0 -0
  304. package/plugins/plugins/cesium-vue/src/assets/icons/icon-002.png +0 -0
  305. package/plugins/plugins/cesium-vue/src/assets/icons/icon-003.png +0 -0
  306. package/plugins/plugins/cesium-vue/src/assets/icons/icon-004.png +0 -0
  307. package/plugins/plugins/cesium-vue/src/assets/icons/icon-005.png +0 -0
  308. package/plugins/plugins/cesium-vue/src/assets/icons/icon-006.png +0 -0
  309. package/plugins/plugins/cesium-vue/src/assets/icons/icon-007.png +0 -0
  310. package/plugins/plugins/cesium-vue/src/assets/icons/icon-008.png +0 -0
  311. package/plugins/plugins/cesium-vue/src/assets/icons/icon-009.png +0 -0
  312. package/plugins/plugins/cesium-vue/src/assets/icons/icon-010.png +0 -0
  313. package/plugins/plugins/cesium-vue/src/assets/icons/icon-011.png +0 -0
  314. package/plugins/plugins/cesium-vue/src/assets/icons/icon-012.png +0 -0
  315. package/plugins/plugins/cesium-vue/src/assets/img/Card3-BG.png +0 -0
  316. package/plugins/plugins/cesium-vue/src/assets/img/card_bg3.png +0 -0
  317. package/plugins/plugins/cesium-vue/src/components/basic-audio/index.ts +0 -11
  318. package/plugins/plugins/cesium-vue/src/components/basic-audio/src/BasicAudio.vue +0 -110
  319. package/plugins/plugins/cesium-vue/src/components/basic-audio/src/basicAudio.ts +0 -6
  320. package/plugins/plugins/cesium-vue/src/components/basic-video/index.ts +0 -12
  321. package/plugins/plugins/cesium-vue/src/components/basic-video/src/BasicVideo.vue +0 -99
  322. package/plugins/plugins/cesium-vue/src/components/basic-video/src/basicVideo.ts +0 -13
  323. package/plugins/plugins/cesium-vue/src/components/camera-roam/index.ts +0 -4
  324. package/plugins/plugins/cesium-vue/src/components/camera-roam/src/CameraRoam.vue +0 -434
  325. package/plugins/plugins/cesium-vue/src/components/camera-roam/src/cameraRoam.ts +0 -28
  326. package/plugins/plugins/cesium-vue/src/components/card-carousel/index.ts +0 -12
  327. package/plugins/plugins/cesium-vue/src/components/card-carousel/src/CardCarousel.vue +0 -124
  328. package/plugins/plugins/cesium-vue/src/components/card-carousel/src/cardCarousel.ts +0 -60
  329. package/plugins/plugins/cesium-vue/src/components/card-content/index.ts +0 -12
  330. package/plugins/plugins/cesium-vue/src/components/card-content/src/CardContent.vue +0 -41
  331. package/plugins/plugins/cesium-vue/src/components/card-content/src/cardContent.ts +0 -22
  332. package/plugins/plugins/cesium-vue/src/components/card-page/index.ts +0 -12
  333. package/plugins/plugins/cesium-vue/src/components/card-page/src/CardPage.vue +0 -102
  334. package/plugins/plugins/cesium-vue/src/components/card-page/src/cardPage.ts +0 -37
  335. package/plugins/plugins/cesium-vue/src/components/carousel-img/index.ts +0 -12
  336. package/plugins/plugins/cesium-vue/src/components/carousel-img/src/CarouselImg.vue +0 -15
  337. package/plugins/plugins/cesium-vue/src/components/carousel-img/src/carouselImg.ts +0 -6
  338. package/plugins/plugins/cesium-vue/src/components/echarts-pro/index.ts +0 -12
  339. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/EchartsPro.vue +0 -107
  340. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/echartsPro.ts +0 -12
  341. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/hook/useECharts.ts +0 -55
  342. package/plugins/plugins/cesium-vue/src/components/marker-bubble/index.ts +0 -12
  343. package/plugins/plugins/cesium-vue/src/components/marker-bubble/src/MarkerBubble.vue +0 -235
  344. package/plugins/plugins/cesium-vue/src/components/marker-bubble/src/markerBubble.ts +0 -35
  345. package/plugins/plugins/cesium-vue/src/components/marker-default/index.ts +0 -12
  346. package/plugins/plugins/cesium-vue/src/components/marker-default/src/MarkerDefault.vue +0 -19
  347. package/plugins/plugins/cesium-vue/src/components/marker-default/src/markerDefault.ts +0 -12
  348. package/plugins/plugins/cesium-vue/src/components/marker-html/index.ts +0 -12
  349. package/plugins/plugins/cesium-vue/src/components/marker-html/src/MarkerHtml.vue +0 -21
  350. package/plugins/plugins/cesium-vue/src/components/marker-html/src/markerHtml.ts +0 -12
  351. package/plugins/plugins/cesium-vue/src/components/marker-manage/index.ts +0 -14
  352. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/components/MarkerManage.vue +0 -106
  353. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/config/theme.ts +0 -8
  354. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManage.ts +0 -466
  355. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManagerCore.ts +0 -148
  356. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/hook/useMarkerManage.ts +0 -45
  357. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/type/markerManage.ts +0 -75
  358. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/utils/themeTool.ts +0 -154
  359. package/plugins/plugins/cesium-vue/src/components/marker-text/index.ts +0 -12
  360. package/plugins/plugins/cesium-vue/src/components/marker-text/src/MarkerText.vue +0 -14
  361. package/plugins/plugins/cesium-vue/src/components/marker-text/src/markerText.ts +0 -10
  362. package/plugins/plugins/cesium-vue/src/components/measurement/index.ts +0 -12
  363. package/plugins/plugins/cesium-vue/src/components/measurement/src/Measurement.vue +0 -183
  364. package/plugins/plugins/cesium-vue/src/components/measurement/src/measurement.ts +0 -20
  365. package/plugins/plugins/cesium-vue/src/components/path-roam/index.ts +0 -4
  366. package/plugins/plugins/cesium-vue/src/components/path-roam/src/PathRoam.vue +0 -429
  367. package/plugins/plugins/cesium-vue/src/components/path-roam/src/pathRoam.ts +0 -28
  368. package/plugins/plugins/cesium-vue/src/components/test/CardMarker.vue +0 -150
  369. package/plugins/plugins/cesium-vue/src/components/test/CesiumMarker.vue +0 -34
  370. package/plugins/plugins/cesium-vue/src/components/test/CesiumViewer.vue +0 -77
  371. package/plugins/plugins/cesium-vue/src/components/test/MyLabel.vue +0 -25
  372. package/plugins/plugins/cesium-vue/src/components/test/index.ts +0 -28
  373. package/plugins/plugins/cesium-vue/src/index.ts +0 -83
  374. package/plugins/plugins/cesium-vue/stats.html +0 -4949
  375. package/plugins/plugins/cesium-vue/tsconfig.json +0 -18
  376. package/plugins/plugins/cesium-vue/vite.config.ts +0 -56
  377. package/plugins/plugins/theme-chalk/dist/theme-chalk.css +0 -819
  378. package/plugins/plugins/theme-chalk/index.less +0 -11
  379. package/plugins/plugins/theme-chalk/package.json +0 -27
  380. package/plugins/plugins/theme-chalk/src/basicAudio.less +0 -41
  381. package/plugins/plugins/theme-chalk/src/basicVideo.less +0 -17
  382. package/plugins/plugins/theme-chalk/src/cameraRoam.less +0 -239
  383. package/plugins/plugins/theme-chalk/src/cardCarousel.less +0 -71
  384. package/plugins/plugins/theme-chalk/src/cardContent.less +0 -73
  385. package/plugins/plugins/theme-chalk/src/cardPage.less +0 -61
  386. package/plugins/plugins/theme-chalk/src/carouselImg.less +0 -34
  387. package/plugins/plugins/theme-chalk/src/marker.less +0 -107
  388. package/plugins/plugins/theme-chalk/src/markerManage.less +0 -25
  389. package/plugins/plugins/theme-chalk/src/measurement.less +0 -106
  390. package/plugins/plugins/theme-chalk/src/mixins/config.less +0 -4
  391. package/plugins/plugins/theme-chalk/src/mixins/mixins.less +0 -64
  392. package/plugins/plugins/theme-chalk/src/pathRoam.less +0 -198
  393. package/plugins/plugins/utils/create.ts +0 -45
  394. package/plugins/plugins/utils/package.json +0 -12
  395. package/plugins/plugins/utils/uuid.ts +0 -43
  396. package/plugins/plugins/utils/with-install.ts +0 -10
  397. package/plugins/theme-chalk/index.less +0 -11
  398. package/plugins/theme-chalk/src/basicAudio.less +0 -44
  399. package/plugins/theme-chalk/src/basicVideo.less +0 -17
  400. package/plugins/theme-chalk/src/cameraRoam.less +0 -239
  401. package/plugins/theme-chalk/src/cardCarousel.less +0 -71
  402. package/plugins/theme-chalk/src/cardContent.less +0 -73
  403. package/plugins/theme-chalk/src/cardPage.less +0 -61
  404. package/plugins/theme-chalk/src/carouselImg.less +0 -66
  405. package/plugins/theme-chalk/src/marker.less +0 -107
  406. package/plugins/theme-chalk/src/markerManage.less +0 -25
  407. package/plugins/theme-chalk/src/measurement.less +0 -106
  408. package/plugins/theme-chalk/src/mixins/config.less +0 -4
  409. package/plugins/theme-chalk/src/mixins/mixins.less +0 -64
  410. package/plugins/theme-chalk/src/pathRoam.less +0 -198
@@ -1,799 +0,0 @@
1
- import { isArray } from 'lodash-es';
2
-
3
- export enum EditMode {
4
- Rotate = 'rotate',
5
- Move = 'move',
6
- Scale = 'scale',
7
- MoveHeight = 'moveHeight',
8
- Empty = '',
9
- }
10
-
11
- export enum GLTFManageEventKey {
12
- Scale = 'addScale',
13
- Rotate = 'rotate',
14
- Translation = 'translation',
15
- Remove = 'removeById',
16
- Add = 'add',
17
- }
18
- export class GLTFManage {
19
- primitives = new Map<string, any>();
20
- eventListener = new Map<string, Array<Object>>();
21
- Cesium: any;
22
- viewer: any;
23
- handler: any;
24
- rotationRing: any;
25
- translationSquare: any;
26
- heightArrow: any;
27
- editMode: EditMode = EditMode.Empty; // 默认是移动模式
28
- dragEndCallbackMap = new Map<string, any>();
29
-
30
- constructor(options: { Cesium: any; viewer: any }) {
31
- this.Cesium = options.Cesium;
32
- this.viewer = options.viewer;
33
- this.handler = new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
34
- }
35
-
36
- /**
37
- * @description: 初始化模型
38
- * @param {Array<any>} models 模型数据列表
39
- * @return {*}
40
- */
41
- init(models: Array<any>, show = false) {
42
- const viewer = this.viewer;
43
- // 移除现有的所有模型
44
- this.primitives.forEach((gltf) => {
45
- viewer.scene.primitives.remove(gltf);
46
- });
47
-
48
- // 遍历传入的模型数据并添加到场景中
49
- models.forEach((model: any) => {
50
- if (!this.primitives.has(model.id)) {
51
- this.add(model, show); // 调用 add 方法添加模型
52
- }
53
- });
54
- }
55
- get(id: string) {
56
- return this.primitives.get(id);
57
- }
58
-
59
- /**
60
- * @description: 添加模型
61
- * @param {*} info 模型信息
62
- * @return {*}
63
- */
64
- add(info: any, show = true) {
65
- const viewer = this.viewer;
66
- const Cesium = this.Cesium;
67
- // 转换 Heading, Pitch, Roll 为弧度
68
- const newHeading = Cesium.Math.toRadians(info.headingPitchRoll?.heading || 0);
69
- const newPitch = Cesium.Math.toRadians(info.headingPitchRoll?.pitch || 0);
70
- const newRoll = Cesium.Math.toRadians(info.headingPitchRoll?.roll || 0);
71
- const headingPitchRoll = new Cesium.HeadingPitchRoll(newHeading, newPitch, newRoll);
72
-
73
- // 计算模型的模型矩阵
74
- const modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(
75
- info.position,
76
- headingPitchRoll,
77
- viewer.scene.globe.ellipsoid,
78
- Cesium.Transforms.eastNorthUpToFixedFrame,
79
- new Cesium.Matrix4(),
80
- );
81
-
82
- // 创建模型并添加到场景
83
- let gltf = viewer.scene.primitives.add(
84
- Cesium.Model.fromGltf({
85
- id: info.id,
86
- ...info.model, // 模型的地址
87
- modelMatrix,
88
- }),
89
- );
90
- gltf.scale = info.scale || 1; // 设置缩放
91
- this.primitives.set(info.id, gltf); // 存储在 primitives 中
92
- gltf.show = show;
93
- // 触发 add 事件监听
94
- this.runEventListener(GLTFManageEventKey.Add, { info: info, gltf: gltf });
95
- }
96
-
97
- flyTo(id: string) {
98
- const viewer = this.viewer;
99
- const Cesium = this.Cesium;
100
- let model = this.primitives.get(id);
101
- const boundingSphere = model.boundingSphere;
102
-
103
- // 如果模型有模型矩阵,转换到世界坐标
104
- const center = Cesium.Matrix4.multiplyByPoint(
105
- model.modelMatrix,
106
- boundingSphere.center,
107
- new Cesium.Cartesian3(),
108
- );
109
-
110
- // 创建世界坐标下的包围球
111
- const worldBoundingSphere = new Cesium.BoundingSphere(center, boundingSphere.radius);
112
-
113
- // 摄像机飞到模型位置
114
- viewer.camera.flyToBoundingSphere(worldBoundingSphere, {
115
- duration: 1.5, // 飞行时间
116
- offset: new Cesium.HeadingPitchRange(0, -0.5, boundingSphere.radius * 2.0), // 调整视角
117
- });
118
- }
119
-
120
- /**
121
- * @description: 根据模型的 ID 移除模型
122
- * @param {string} id 模型的 ID
123
- * @return {*}
124
- */
125
- removeById(id: string) {
126
- const viewer = this.viewer;
127
- let g = this.primitives.get(id); // 获取对应 ID 的模型
128
-
129
- if (!g) {
130
- console.error(`No model found with id: ${id}`);
131
- return;
132
- }
133
-
134
- // 从场景中移除模型
135
- viewer.scene.primitives.remove(g);
136
- this.primitives.delete(id); // 从 primitives 中删除模型
137
- if (!this.rotationRing?._instanceIds.includes(`rotationRing_${id}`) || !this.rotationRing) {
138
- this.removeTool();
139
- }
140
- // 触发 removeById 事件监听
141
- this.runEventListener(GLTFManageEventKey.Remove, { id: id, gltf: g });
142
- }
143
-
144
- // 显示模型
145
- show(id: string) {
146
- let g = this.primitives.get(id); // 获取对应 ID 的模型
147
- if (g) g.show = true;
148
- }
149
- // 隐藏模型
150
- hide(id: string) {
151
- let g = this.primitives.get(id); // 获取对应 ID 的模型
152
- if (g) g.show = false;
153
- }
154
-
155
- /**
156
- * @description: 修改模型的缩放因子
157
- * @param {*} info 模型信息
158
- * @param {number} num 缩放因子
159
- * @return {*}
160
- */
161
- addScale(info: any, num = 0.1) {
162
- let curModel = this.primitives.get(info.id); // 获取对应 ID 的模型
163
-
164
- if (curModel) {
165
- curModel.scale = curModel.scale + num; // 增加或减少模型的缩放因子
166
- this.updatedTool(curModel.modelMatrix);
167
- this.runEventListener(GLTFManageEventKey.Scale, { id: info.id, scale: curModel.scale }); // 触发 addScale 事件监听
168
- }
169
- }
170
- /**
171
- * @description: 修改模型的缩放因子
172
- * @param {*} info 模型信息
173
- * @param {number} num 缩放因子
174
- * @return {*}
175
- */
176
- setScale(id: any, scale = 0.1) {
177
- let curModel = this.primitives.get(id); // 获取对应 ID 的模型
178
- if (curModel) {
179
- curModel.scale = scale; // 增加或减少模型的缩放因子
180
- this.updatedTool(curModel.modelMatrix);
181
- this.runEventListener(GLTFManageEventKey.Scale, { id: id, scale: curModel.scale }); // 触发 addScale 事件监听
182
- }
183
- }
184
-
185
- setEditMode(mode: EditMode) {
186
- this.editMode = mode;
187
- }
188
- // 公共锁定/解锁视角函数
189
- lockCamera() {
190
- const cameraController = this.viewer.scene.screenSpaceCameraController;
191
- cameraController.enableRotate = false;
192
- cameraController.enableTranslate = false;
193
- cameraController.enableZoom = false;
194
- }
195
-
196
- unlockCamera() {
197
- const cameraController = this.viewer.scene.screenSpaceCameraController;
198
- cameraController.enableRotate = true;
199
- cameraController.enableTranslate = true;
200
- cameraController.enableZoom = true;
201
- }
202
-
203
- // 公共函数:将世界坐标转换为经纬度(忽略高度)
204
- toCartographic(cartesian: any) {
205
- const cartographic = this.Cesium.Cartographic.fromCartesian(cartesian);
206
- return { longitude: cartographic.longitude, latitude: cartographic.latitude };
207
- }
208
-
209
- // 公共函数:计算两点之间的方向角
210
- calculateHeading(from: any, to: any): number {
211
- const deltaLongitude = to.longitude - from.longitude;
212
- const deltaLatitude = to.latitude - from.latitude;
213
- return Math.atan2(deltaLatitude, deltaLongitude);
214
- }
215
-
216
- /**
217
- * @description: 获取模型的 Heading, Pitch, Roll
218
- * @param {any} modelMatrix 模型的变换矩阵
219
- * @return {*}
220
- */
221
- getModelHeadingPitchRoll(modelMatrix: any) {
222
- const Cesium = this.Cesium;
223
- const viewer = this.viewer;
224
-
225
- const m1 = Cesium.Transforms.eastNorthUpToFixedFrame(
226
- Cesium.Matrix4.getTranslation(modelMatrix, new Cesium.Cartesian3()),
227
- viewer.scene.globe.ellipsoid,
228
- new Cesium.Matrix4(),
229
- );
230
-
231
- const m2 = Cesium.Matrix4.multiply(
232
- Cesium.Matrix4.inverse(m1, new Cesium.Matrix4()),
233
- modelMatrix,
234
- new Cesium.Matrix4(),
235
- );
236
-
237
- const mat3 = Cesium.Matrix4.getRotation(m2, new Cesium.Matrix3());
238
- const q = Cesium.Quaternion.fromRotationMatrix(mat3);
239
- return Cesium.HeadingPitchRoll.fromQuaternion(q); // 返回 HeadingPitchRoll
240
- }
241
-
242
- /**
243
- * @description: 添加事件监听
244
- * @param {string} key
245
- * @param {Function} f
246
- * @param {any} options
247
- * @return {*}
248
- */
249
- addEventListener(key: string, f: Function, options?: any): { f: Function; options: any } {
250
- let instantiation = { f: f, options: options };
251
- if (this.eventListener.get(key)) {
252
- (this.eventListener.get(key) || []).push(instantiation);
253
- } else {
254
- this.eventListener.set(key, [instantiation]);
255
- }
256
- return instantiation;
257
- }
258
-
259
- /**
260
- * @description: 移除事件监听
261
- * @param {string} key
262
- * @param {any} instantiation
263
- * @return {*}
264
- */
265
- removeEventListener(key: string, instantiation: any) {
266
- let list = this.eventListener.get(key);
267
- if (!list) return console.error('key不存在');
268
- let index = list.findIndex((n) => n == instantiation);
269
- if (index >= 0) {
270
- list.splice(index, 1);
271
- } else {
272
- console.error('instantiation不存在');
273
- }
274
- }
275
-
276
- /**
277
- * @description: 执行监听
278
- * @param {*} key
279
- * @param {any} parameter
280
- * @return {*}
281
- */
282
- runEventListener(key: string, parameter: any): boolean {
283
- let list = this.eventListener.get(key);
284
- if (!list) return false;
285
- list.forEach((item: any) => {
286
- if (typeof item.f === 'function') {
287
- item.f(parameter);
288
- }
289
- });
290
- return true; // 返回事件是否成功执行
291
- }
292
-
293
- // ... (Add, remove, scale functions here remain the same)
294
-
295
- /**
296
- * @description: 初始化拖拽模型编辑功能(平移)
297
- * @return {*}
298
- */
299
- initEditBox(getEditState: Function) {
300
- const Cesium = this.Cesium;
301
- const viewer = this.viewer;
302
- const scene = viewer.scene;
303
-
304
- let draggedModel: any = null;
305
- let startModelMatrix: any = null;
306
- let startModelCartographic: any = null;
307
- let startMouseCartographic: any = null;
308
- let startMousePosition: any = null;
309
-
310
- // 清除拖拽状态
311
- const clearStatus = () => {
312
- draggedModel = null;
313
- startModelMatrix = null;
314
- startModelCartographic = null;
315
- startMousePosition = null;
316
- startMouseCartographic = null;
317
- this.setEditMode(EditMode.Empty);
318
- this.unlockCamera();
319
- };
320
-
321
- //初始化拖拽状态
322
- const initDragged = (modelId: any, movement: any) => {
323
- draggedModel = this.primitives.get(modelId);
324
- if (draggedModel) {
325
- startModelMatrix = Cesium.Matrix4.clone(draggedModel.modelMatrix);
326
- const modelPosition = Cesium.Matrix4.getTranslation(
327
- startModelMatrix,
328
- new Cesium.Cartesian3(),
329
- );
330
- startModelCartographic = this.toCartographic(modelPosition);
331
- startMousePosition = movement.position;
332
- const rayHit: any = scene.globe.pick(viewer.camera.getPickRay(movement.position), scene);
333
- startMouseCartographic = this.toCartographic(rayHit);
334
-
335
- this.lockCamera();
336
- }
337
- };
338
-
339
- // 点击事件处理,获取被点击的模型对象
340
- this.handler.setInputAction((movement: any) => {
341
- let isEdit = getEditState();
342
- if (!isEdit) return;
343
- const hit: any = scene.pick(movement.position);
344
- if (hit && hit.id && hit.id?.includes('rotationRing')) {
345
- let modelId = hit.id.split('rotationRing_')[1];
346
- this.setEditMode(EditMode.Rotate);
347
- initDragged(modelId, movement);
348
- } else if (hit && hit.id && hit.id?.includes('translationSquare_')) {
349
- let modelId = hit.id.split('translationSquare_')[1];
350
- this.setEditMode(EditMode.Move);
351
- initDragged(modelId, movement);
352
- } else if (hit && hit.id && hit.id?.includes('heightArrow-line_')) {
353
- let modelId = hit.id.split('heightArrow-line_')[1];
354
- this.setEditMode(EditMode.MoveHeight);
355
- initDragged(modelId, movement);
356
- } else if (hit && hit.id && hit.id?.includes('heightArrow-arrow_')) {
357
- let modelId = hit.id.split('heightArrow-arrow_')[1];
358
- this.setEditMode(EditMode.MoveHeight);
359
- initDragged(modelId, movement);
360
- } else if (hit && hit.id) {
361
- draggedModel = this.primitives.get(hit.id);
362
- if (!draggedModel) return;
363
- // 创建旋转环
364
- if (
365
- !this.rotationRing ||
366
- !this.rotationRing?._instanceIds?.includes(`rotationRing_${draggedModel.id}`)
367
- ) {
368
- this.createRotationRing(draggedModel);
369
- }
370
- //创建平移方块
371
- if (
372
- !this.translationSquare ||
373
- !this.translationSquare?._instanceIds?.includes(`translationSquare_${draggedModel.id}`)
374
- ) {
375
- this.createTranslationSquare(draggedModel);
376
- }
377
- //创建平移方块
378
- if (
379
- !this.heightArrow ||
380
- !this.heightArrow?._instanceIds?.includes(`heightArrow_${draggedModel.id}`)
381
- ) {
382
- this.createHeightArrow(draggedModel);
383
- }
384
- } else {
385
- clearStatus();
386
- }
387
- }, Cesium.ScreenSpaceEventType.LEFT_DOWN);
388
-
389
- // 拖拽过程中更新模型位置或旋转
390
- this.handler.setInputAction((movement: any) => {
391
- let isEdit = getEditState();
392
- if (!isEdit) return;
393
- if (this.editMode != EditMode.Empty && draggedModel) {
394
- const rayHit: any = scene.globe.pick(viewer.camera.getPickRay(movement.endPosition), scene);
395
- const currentMouseCartographic = this.toCartographic(rayHit);
396
- let angleDelta = 0;
397
-
398
- // 更新模型的位置或者旋转
399
- if (this.editMode === EditMode.Rotate) {
400
- let currAngle = this.calculateHeading(startModelCartographic, currentMouseCartographic);
401
- let startAngle = this.calculateHeading(startModelCartographic, startMouseCartographic);
402
- angleDelta = startAngle - currAngle;
403
- this.rotateModel(draggedModel, startModelMatrix, angleDelta);
404
- } else if (this.editMode === EditMode.Move) {
405
- this.moveModel(draggedModel, startModelMatrix, movement);
406
- } else if (this.editMode === EditMode.MoveHeight) {
407
- this.moveModelHeight(draggedModel, startModelMatrix, movement, startMousePosition);
408
- }
409
- }
410
- }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
411
-
412
- // 拖拽结束
413
- this.handler.setInputAction(() => {
414
- let isEdit = getEditState();
415
- if (!isEdit) return;
416
- let map = this.dragEndCallbackMap.get(draggedModel?.id);
417
- if (map && (this.editMode === EditMode.Move || this.editMode === EditMode.MoveHeight)) {
418
- let callbackInfo = map.get(GLTFManageEventKey.Translation);
419
- if (callbackInfo) {
420
- this.runEventListener(GLTFManageEventKey.Translation, callbackInfo);
421
- map.delete(GLTFManageEventKey.Translation);
422
- }
423
- } else if (map && this.editMode === EditMode.Rotate) {
424
- let callbackInfo = map.get(GLTFManageEventKey.Rotate);
425
- if (callbackInfo) {
426
- this.runEventListener(GLTFManageEventKey.Rotate, callbackInfo);
427
- map.delete(GLTFManageEventKey.Rotate);
428
- }
429
- }
430
- clearStatus();
431
- }, Cesium.ScreenSpaceEventType.LEFT_UP);
432
- this.handler.setInputAction(() => {
433
- this.removeTool();
434
- }, Cesium.ScreenSpaceEventType.RIGHT_UP);
435
- }
436
-
437
- // 创建圆环表示旋转区域
438
- createRotationRing(model: any) {
439
- const Cesium = this.Cesium;
440
- const viewer = this.viewer;
441
- if (this.rotationRing) {
442
- viewer.scene.primitives.remove(this.rotationRing); // 如果已存在,先移除
443
- }
444
- //创建圆
445
- const position = [] as any;
446
- for (let i = 0; i <= 360; i += 3) {
447
- const sin = Math.sin(Cesium.Math.toRadians(i));
448
- const cos = Math.cos(Cesium.Math.toRadians(i));
449
- const x = model.boundingSphere.radius * cos;
450
- const y = model.boundingSphere.radius * sin;
451
- position.push(new Cesium.Cartesian3(x, y, 0));
452
- }
453
- const geometry = new Cesium.PolylineGeometry({
454
- positions: position,
455
- width: Math.max(model.boundingSphere.radius * 0.05, 1),
456
- });
457
- const instnce = new Cesium.GeometryInstance({
458
- id: `rotationRing_${model.id}`,
459
- geometry: geometry,
460
- attributes: {
461
- color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED),
462
- },
463
- });
464
- this.rotationRing = new Cesium.Primitive({
465
- geometryInstances: instnce,
466
- appearance: new Cesium.PolylineColorAppearance({
467
- translucent: true,
468
- }),
469
- depthFailAppearance: new Cesium.PolylineMaterialAppearance({
470
- material: Cesium.Material.fromType('Color', {
471
- color: Cesium.Color.RED.withAlpha(0.3),
472
- }),
473
- translucent: true,
474
- }),
475
- modelMatrix: model.modelMatrix,
476
- cull: false,
477
- });
478
- viewer.scene.primitives.add(this.rotationRing);
479
- }
480
-
481
- // 创建平移方块
482
- createTranslationSquare(model: any) {
483
- const Cesium = this.Cesium;
484
- const viewer = this.viewer;
485
- if (this.translationSquare) {
486
- viewer.scene.primitives.remove(this.translationSquare); // 如果已存在,先移除
487
- }
488
-
489
- // 创建正方形
490
- const sideLength = Math.max(model.boundingSphere.radius * 0.2, 1); // 正方形的边长,根据模型的半径确定
491
- const halfSide = sideLength / 2;
492
- // 创建正方体的几何体
493
- const boxGeometry = new Cesium.BoxGeometry({
494
- maximum: new Cesium.Cartesian3(halfSide, halfSide, halfSide),
495
- minimum: new Cesium.Cartesian3(-halfSide, -halfSide, -halfSide),
496
- });
497
-
498
- const instnce = new Cesium.GeometryInstance({
499
- id: `translationSquare_${model.id}`,
500
- geometry: boxGeometry,
501
- attributes: {
502
- color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.BLUE),
503
- },
504
- });
505
-
506
- this.translationSquare = new Cesium.Primitive({
507
- geometryInstances: instnce,
508
- appearance: new Cesium.PolylineColorAppearance({
509
- translucent: true,
510
- }),
511
- depthFailAppearance: new Cesium.PolylineMaterialAppearance({
512
- material: Cesium.Material.fromType('Color', {
513
- color: Cesium.Color.BLUE.withAlpha(0.3),
514
- }),
515
- translucent: true,
516
- }),
517
- cull: false,
518
- modelMatrix: model.modelMatrix,
519
- });
520
-
521
- viewer.scene.primitives.add(this.translationSquare);
522
- }
523
-
524
- // 创建高度调整箭头
525
- createHeightArrow(model: any) {
526
- const Cesium = this.Cesium;
527
- const viewer = this.viewer;
528
-
529
- if (this.heightArrow) {
530
- viewer.scene.primitives.remove(this.heightArrow); // 如果已存在,先移除
531
- }
532
- let color = Cesium.Color.GREEN;
533
- let width = Math.max(model.boundingSphere.radius * 0.025, 1);
534
- let headWidth = 2 * width;
535
- let length = model.boundingSphere.radius + 50;
536
- let headLength = length * 0.1;
537
- const sideLength = Math.max(model.boundingSphere.radius * 0.2, 1);
538
- let inverse = false;
539
-
540
- //这里用的是圆锥几何对象,当topRadius和bottomRadius相同时,它就是一个圆柱
541
- const line = Cesium.CylinderGeometry.createGeometry(
542
- new Cesium.CylinderGeometry({
543
- length: length,
544
- topRadius: width,
545
- bottomRadius: width,
546
- }),
547
- );
548
- const arrow = Cesium.CylinderGeometry.createGeometry(
549
- new Cesium.CylinderGeometry({
550
- length: headLength,
551
- topRadius: 0,
552
- bottomRadius: headWidth,
553
- }),
554
- );
555
- let arrowOffset = length + sideLength;
556
- let lineOffset = (length + sideLength) / 2;
557
- if (inverse) {
558
- lineOffset = -lineOffset;
559
- arrowOffset = -arrowOffset;
560
- }
561
-
562
- this.translate(line, [0, 0, lineOffset]);
563
- this.translate(arrow, [0, 0, arrowOffset]);
564
-
565
- // 创建箭头的组合(圆柱 + 圆锥)
566
- this.heightArrow = new Cesium.Primitive({
567
- modelMatrix: model.modelMatrix,
568
- geometryInstances: [
569
- new Cesium.GeometryInstance({
570
- id: `heightArrow-line_${model.id}`,
571
- geometry: line,
572
- }),
573
- new Cesium.GeometryInstance({
574
- id: `heightArrow-arrow_${model.id}`,
575
- geometry: arrow,
576
- }),
577
- ],
578
- appearance: new Cesium.PolylineMaterialAppearance({
579
- material: Cesium.Material.fromType('Color', { color: color }),
580
- translucent: true,
581
- }),
582
- depthFailAppearance: new Cesium.PolylineMaterialAppearance({
583
- material: Cesium.Material.fromType('Color', {
584
- color: color.withAlpha(0.3),
585
- }),
586
- translucent: true,
587
- }),
588
- cull: false,
589
- });
590
-
591
- viewer.scene.primitives.add(this.heightArrow);
592
- }
593
-
594
- translate(geometry: any, offset: any) {
595
- let Cesium = this.Cesium;
596
- const scratchOffset = new Cesium.Cartesian3();
597
- if (isArray(offset)) {
598
- scratchOffset.x = offset[0];
599
- scratchOffset.y = offset[1];
600
- scratchOffset.z = offset[2];
601
- } else {
602
- Cesium.Cartesian3.clone(offset, scratchOffset);
603
- }
604
-
605
- for (let i = 0; i < geometry.attributes.position.values.length; i += 3) {
606
- geometry.attributes.position.values[i] += scratchOffset.x;
607
- geometry.attributes.position.values[i + 1] += scratchOffset.y;
608
- geometry.attributes.position.values[i + 2] += scratchOffset.z;
609
- }
610
- }
611
-
612
- //移除工具
613
- removeTool() {
614
- if (this.rotationRing) {
615
- this.viewer.scene.primitives.remove(this.rotationRing);
616
- }
617
- if (this.translationSquare) {
618
- this.viewer.scene.primitives.remove(this.translationSquare);
619
- }
620
- if (this.heightArrow) {
621
- this.viewer.scene.primitives.remove(this.heightArrow);
622
- }
623
- }
624
-
625
- //更新工具矩阵
626
- updatedTool(newModelMatrix: any) {
627
- if (this.rotationRing) {
628
- this.rotationRing.modelMatrix = newModelMatrix;
629
- }
630
- if (this.translationSquare) {
631
- this.translationSquare.modelMatrix = newModelMatrix;
632
- }
633
- if (this.heightArrow) {
634
- this.heightArrow.modelMatrix = newModelMatrix;
635
- }
636
- }
637
- /**
638
- * @description: 平移模型
639
- * @param {*} draggedModel
640
- * @param {*} startModelMatrix
641
- * @param {*} movement
642
- * @return {*}
643
- */
644
- moveModel(draggedModel: any, startModelMatrix: any, movement: any) {
645
- const Cesium = this.Cesium;
646
- const viewer = this.viewer;
647
- const scene = viewer.scene;
648
- const rayHit: any = scene.globe.pick(viewer.camera.getPickRay(movement.endPosition), scene);
649
-
650
- if (rayHit) {
651
- const startPosition: any = Cesium.Matrix4.getTranslation(
652
- startModelMatrix,
653
- new Cesium.Cartesian3(),
654
- );
655
- const startCartographic = Cesium.Cartographic.fromCartesian(startPosition);
656
- const cartographic = Cesium.Cartographic.fromCartesian(rayHit);
657
-
658
- const newCartographic = new Cesium.Cartographic(
659
- cartographic.longitude,
660
- cartographic.latitude,
661
- startCartographic.height,
662
- );
663
-
664
- const newPosition = Cesium.Cartographic.toCartesian(newCartographic);
665
- const rotationMatrix = Cesium.Matrix4.getRotation(startModelMatrix, new Cesium.Matrix3());
666
- const newModelMatrix = Cesium.Matrix4.fromRotationTranslation(rotationMatrix, newPosition);
667
-
668
- draggedModel.modelMatrix = newModelMatrix;
669
-
670
- this.updatedTool(newModelMatrix);
671
- let position = new Cesium.Cartesian3(
672
- newModelMatrix[12],
673
- newModelMatrix[13],
674
- newModelMatrix[14],
675
- );
676
- let dragEndCallback = this.dragEndCallbackMap.get(draggedModel.id);
677
- if (!dragEndCallback) {
678
- dragEndCallback = new Map();
679
- this.dragEndCallbackMap.set(draggedModel.id, dragEndCallback);
680
- }
681
- dragEndCallback.set(GLTFManageEventKey.Translation, {
682
- id: draggedModel.id,
683
- position: position,
684
- });
685
- }
686
- }
687
-
688
- /**
689
- * @description: 平移模型高度
690
- * @param {*} draggedModel
691
- * @param {*} startModelMatrix
692
- * @param {*} movement
693
- * @return {*}
694
- */
695
- moveModelHeight(
696
- draggedModel: any,
697
- startModelMatrix: any,
698
- movement: any,
699
- startMousePosition: any,
700
- ) {
701
- const Cesium = this.Cesium;
702
- const viewer = this.viewer;
703
- const scene = viewer.scene;
704
- const deltaY = startMousePosition.y - movement.endPosition.y; // 竖直方向的移动量
705
-
706
- const rayHit: any = scene.globe.pick(viewer.camera.getPickRay(movement.endPosition), scene);
707
-
708
- if (rayHit) {
709
- const startPosition: any = Cesium.Matrix4.getTranslation(
710
- startModelMatrix,
711
- new Cesium.Cartesian3(),
712
- );
713
- const startCartographic = Cesium.Cartographic.fromCartesian(startPosition);
714
-
715
- const newCartographic = new Cesium.Cartographic(
716
- startCartographic.longitude,
717
- startCartographic.latitude,
718
- startCartographic.height +
719
- deltaY * 0.001 * Math.max(viewer.camera.positionCartographic.height, 1),
720
- );
721
-
722
- const newPosition = Cesium.Cartographic.toCartesian(newCartographic);
723
- const rotationMatrix = Cesium.Matrix4.getRotation(startModelMatrix, new Cesium.Matrix3());
724
- const newModelMatrix = Cesium.Matrix4.fromRotationTranslation(rotationMatrix, newPosition);
725
-
726
- draggedModel.modelMatrix = newModelMatrix;
727
-
728
- this.updatedTool(newModelMatrix);
729
- let position = new Cesium.Cartesian3(
730
- newModelMatrix[12],
731
- newModelMatrix[13],
732
- newModelMatrix[14],
733
- );
734
- let dragEndCallback = this.dragEndCallbackMap.get(draggedModel.id);
735
- if (!dragEndCallback) {
736
- dragEndCallback = new Map();
737
- this.dragEndCallbackMap.set(draggedModel.id, dragEndCallback);
738
- }
739
- dragEndCallback.set(GLTFManageEventKey.Translation, {
740
- id: draggedModel.id,
741
- position: position,
742
- });
743
- // this.runEventListener(GLTFManageEventKey.Translation, {
744
- // id: draggedModel.id,
745
- // position: position,
746
- // });
747
- }
748
- }
749
-
750
- /**
751
- * @description: 旋转模型
752
- * @param {*} draggedModel
753
- * @param {*} startModelMatrix
754
- * @param {*} angleDelta
755
- * @return {*}
756
- */
757
- rotateModel(draggedModel: any, startModelMatrix: any, angleDelta: number) {
758
- const Cesium = this.Cesium;
759
- const viewer = this.viewer;
760
- const modelHeadingPitchRoll = this.getModelHeadingPitchRoll(startModelMatrix);
761
- const newHeading = modelHeadingPitchRoll.heading + angleDelta;
762
-
763
- const headingPitchRoll = new Cesium.HeadingPitchRoll(
764
- newHeading,
765
- modelHeadingPitchRoll.pitch,
766
- modelHeadingPitchRoll.roll,
767
- );
768
-
769
- const modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(
770
- Cesium.Matrix4.getTranslation(draggedModel.modelMatrix, new Cesium.Cartesian3()),
771
- headingPitchRoll,
772
- viewer.scene.globe.ellipsoid,
773
- Cesium.Transforms.eastNorthUpToFixedFrame,
774
- new Cesium.Matrix4(),
775
- );
776
-
777
- draggedModel.modelMatrix = modelMatrix;
778
- let dragEndCallback = this.dragEndCallbackMap.get(draggedModel.id);
779
- if (!dragEndCallback) {
780
- dragEndCallback = new Map();
781
- this.dragEndCallbackMap.set(draggedModel.id, dragEndCallback);
782
- }
783
- dragEndCallback.set(GLTFManageEventKey.Rotate, {
784
- id: draggedModel.id,
785
- headingPitchRoll: {
786
- heading: Cesium.Math.toDegrees(newHeading),
787
- pitch: Cesium.Math.toDegrees(modelHeadingPitchRoll.pitch),
788
- roll: Cesium.Math.toDegrees(modelHeadingPitchRoll.roll),
789
- },
790
- });
791
- }
792
-
793
- cleanup() {
794
- if (this.handler) {
795
- this.handler.destroy();
796
- this.handler = null;
797
- }
798
- }
799
- }