@sl-utils/cesium 1.0.0 → 1.0.1

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 (552) hide show
  1. package/LICENSE copy +201 -0
  2. package/README.md +5 -0
  3. package/demo/App.vue +26 -0
  4. package/demo/main.ts +5 -0
  5. package/demo/style.css +3 -0
  6. package/index.cjs +12 -0
  7. package/index.html +13 -0
  8. package/package.json +31 -3
  9. package/public/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
  10. package/public/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
  11. package/public/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
  12. package/public/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
  13. package/public/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
  14. package/public/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
  15. package/public/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
  16. package/public/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
  17. package/public/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
  18. package/public/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
  19. package/public/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
  20. package/public/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
  21. package/public/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
  22. package/public/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
  23. package/public/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
  24. package/public/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
  25. package/public/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
  26. package/public/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
  27. package/public/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
  28. package/public/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
  29. package/public/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
  30. package/public/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
  31. package/public/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
  32. package/public/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
  33. package/public/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
  34. package/public/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
  35. package/public/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
  36. package/public/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
  37. package/public/Assets/Images/bing_maps_credit.png +0 -0
  38. package/public/Assets/Images/cesium_credit.png +0 -0
  39. package/public/Assets/Images/google_earth_credit.png +0 -0
  40. package/public/Assets/Images/ion-credit.png +0 -0
  41. package/public/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  42. package/public/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  43. package/public/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  44. package/public/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  45. package/public/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  46. package/public/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  47. package/public/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  48. package/public/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  49. package/public/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  50. package/public/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  51. package/public/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  52. package/public/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  53. package/public/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  54. package/public/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  55. package/public/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  56. package/public/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  57. package/public/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  58. package/public/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  59. package/public/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  60. package/public/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  61. package/public/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  62. package/public/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  63. package/public/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  64. package/public/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  65. package/public/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  66. package/public/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  67. package/public/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  68. package/public/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  69. package/public/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  70. package/public/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  71. package/public/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  72. package/public/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  73. package/public/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  74. package/public/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  75. package/public/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  76. package/public/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  77. package/public/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  78. package/public/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  79. package/public/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  80. package/public/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  81. package/public/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  82. package/public/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  83. package/public/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  84. package/public/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  85. package/public/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
  86. package/public/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  87. package/public/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  88. package/public/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  89. package/public/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  90. package/public/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  91. package/public/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  92. package/public/Assets/Textures/maki/airfield.png +0 -0
  93. package/public/Assets/Textures/maki/airport.png +0 -0
  94. package/public/Assets/Textures/maki/alcohol-shop.png +0 -0
  95. package/public/Assets/Textures/maki/america-football.png +0 -0
  96. package/public/Assets/Textures/maki/art-gallery.png +0 -0
  97. package/public/Assets/Textures/maki/bakery.png +0 -0
  98. package/public/Assets/Textures/maki/bank.png +0 -0
  99. package/public/Assets/Textures/maki/bar.png +0 -0
  100. package/public/Assets/Textures/maki/baseball.png +0 -0
  101. package/public/Assets/Textures/maki/basketball.png +0 -0
  102. package/public/Assets/Textures/maki/beer.png +0 -0
  103. package/public/Assets/Textures/maki/bicycle.png +0 -0
  104. package/public/Assets/Textures/maki/building.png +0 -0
  105. package/public/Assets/Textures/maki/bus.png +0 -0
  106. package/public/Assets/Textures/maki/cafe.png +0 -0
  107. package/public/Assets/Textures/maki/camera.png +0 -0
  108. package/public/Assets/Textures/maki/campsite.png +0 -0
  109. package/public/Assets/Textures/maki/car.png +0 -0
  110. package/public/Assets/Textures/maki/cemetery.png +0 -0
  111. package/public/Assets/Textures/maki/cesium.png +0 -0
  112. package/public/Assets/Textures/maki/chemist.png +0 -0
  113. package/public/Assets/Textures/maki/cinema.png +0 -0
  114. package/public/Assets/Textures/maki/circle-stroked.png +0 -0
  115. package/public/Assets/Textures/maki/circle.png +0 -0
  116. package/public/Assets/Textures/maki/city.png +0 -0
  117. package/public/Assets/Textures/maki/clothing-store.png +0 -0
  118. package/public/Assets/Textures/maki/college.png +0 -0
  119. package/public/Assets/Textures/maki/commercial.png +0 -0
  120. package/public/Assets/Textures/maki/cricket.png +0 -0
  121. package/public/Assets/Textures/maki/cross.png +0 -0
  122. package/public/Assets/Textures/maki/dam.png +0 -0
  123. package/public/Assets/Textures/maki/danger.png +0 -0
  124. package/public/Assets/Textures/maki/disability.png +0 -0
  125. package/public/Assets/Textures/maki/dog-park.png +0 -0
  126. package/public/Assets/Textures/maki/embassy.png +0 -0
  127. package/public/Assets/Textures/maki/emergency-telephone.png +0 -0
  128. package/public/Assets/Textures/maki/entrance.png +0 -0
  129. package/public/Assets/Textures/maki/farm.png +0 -0
  130. package/public/Assets/Textures/maki/fast-food.png +0 -0
  131. package/public/Assets/Textures/maki/ferry.png +0 -0
  132. package/public/Assets/Textures/maki/fire-station.png +0 -0
  133. package/public/Assets/Textures/maki/fuel.png +0 -0
  134. package/public/Assets/Textures/maki/garden.png +0 -0
  135. package/public/Assets/Textures/maki/gift.png +0 -0
  136. package/public/Assets/Textures/maki/golf.png +0 -0
  137. package/public/Assets/Textures/maki/grocery.png +0 -0
  138. package/public/Assets/Textures/maki/hairdresser.png +0 -0
  139. package/public/Assets/Textures/maki/harbor.png +0 -0
  140. package/public/Assets/Textures/maki/heart.png +0 -0
  141. package/public/Assets/Textures/maki/heliport.png +0 -0
  142. package/public/Assets/Textures/maki/hospital.png +0 -0
  143. package/public/Assets/Textures/maki/ice-cream.png +0 -0
  144. package/public/Assets/Textures/maki/industrial.png +0 -0
  145. package/public/Assets/Textures/maki/land-use.png +0 -0
  146. package/public/Assets/Textures/maki/laundry.png +0 -0
  147. package/public/Assets/Textures/maki/library.png +0 -0
  148. package/public/Assets/Textures/maki/lighthouse.png +0 -0
  149. package/public/Assets/Textures/maki/lodging.png +0 -0
  150. package/public/Assets/Textures/maki/logging.png +0 -0
  151. package/public/Assets/Textures/maki/london-underground.png +0 -0
  152. package/public/Assets/Textures/maki/marker-stroked.png +0 -0
  153. package/public/Assets/Textures/maki/marker.png +0 -0
  154. package/public/Assets/Textures/maki/minefield.png +0 -0
  155. package/public/Assets/Textures/maki/mobilephone.png +0 -0
  156. package/public/Assets/Textures/maki/monument.png +0 -0
  157. package/public/Assets/Textures/maki/museum.png +0 -0
  158. package/public/Assets/Textures/maki/music.png +0 -0
  159. package/public/Assets/Textures/maki/oil-well.png +0 -0
  160. package/public/Assets/Textures/maki/park.png +0 -0
  161. package/public/Assets/Textures/maki/park2.png +0 -0
  162. package/public/Assets/Textures/maki/parking-garage.png +0 -0
  163. package/public/Assets/Textures/maki/parking.png +0 -0
  164. package/public/Assets/Textures/maki/pharmacy.png +0 -0
  165. package/public/Assets/Textures/maki/pitch.png +0 -0
  166. package/public/Assets/Textures/maki/place-of-worship.png +0 -0
  167. package/public/Assets/Textures/maki/playground.png +0 -0
  168. package/public/Assets/Textures/maki/police.png +0 -0
  169. package/public/Assets/Textures/maki/polling-place.png +0 -0
  170. package/public/Assets/Textures/maki/post.png +0 -0
  171. package/public/Assets/Textures/maki/prison.png +0 -0
  172. package/public/Assets/Textures/maki/rail-above.png +0 -0
  173. package/public/Assets/Textures/maki/rail-light.png +0 -0
  174. package/public/Assets/Textures/maki/rail-metro.png +0 -0
  175. package/public/Assets/Textures/maki/rail-underground.png +0 -0
  176. package/public/Assets/Textures/maki/rail.png +0 -0
  177. package/public/Assets/Textures/maki/religious-christian.png +0 -0
  178. package/public/Assets/Textures/maki/religious-jewish.png +0 -0
  179. package/public/Assets/Textures/maki/religious-muslim.png +0 -0
  180. package/public/Assets/Textures/maki/restaurant.png +0 -0
  181. package/public/Assets/Textures/maki/roadblock.png +0 -0
  182. package/public/Assets/Textures/maki/rocket.png +0 -0
  183. package/public/Assets/Textures/maki/school.png +0 -0
  184. package/public/Assets/Textures/maki/scooter.png +0 -0
  185. package/public/Assets/Textures/maki/shop.png +0 -0
  186. package/public/Assets/Textures/maki/skiing.png +0 -0
  187. package/public/Assets/Textures/maki/slaughterhouse.png +0 -0
  188. package/public/Assets/Textures/maki/soccer.png +0 -0
  189. package/public/Assets/Textures/maki/square-stroked.png +0 -0
  190. package/public/Assets/Textures/maki/square.png +0 -0
  191. package/public/Assets/Textures/maki/star-stroked.png +0 -0
  192. package/public/Assets/Textures/maki/star.png +0 -0
  193. package/public/Assets/Textures/maki/suitcase.png +0 -0
  194. package/public/Assets/Textures/maki/swimming.png +0 -0
  195. package/public/Assets/Textures/maki/telephone.png +0 -0
  196. package/public/Assets/Textures/maki/tennis.png +0 -0
  197. package/public/Assets/Textures/maki/theatre.png +0 -0
  198. package/public/Assets/Textures/maki/toilets.png +0 -0
  199. package/public/Assets/Textures/maki/town-hall.png +0 -0
  200. package/public/Assets/Textures/maki/town.png +0 -0
  201. package/public/Assets/Textures/maki/triangle-stroked.png +0 -0
  202. package/public/Assets/Textures/maki/triangle.png +0 -0
  203. package/public/Assets/Textures/maki/village.png +0 -0
  204. package/public/Assets/Textures/maki/warehouse.png +0 -0
  205. package/public/Assets/Textures/maki/waste-basket.png +0 -0
  206. package/public/Assets/Textures/maki/water.png +0 -0
  207. package/public/Assets/Textures/maki/wetland.png +0 -0
  208. package/public/Assets/Textures/maki/zoo.png +0 -0
  209. package/public/Assets/Textures/moonSmall.jpg +0 -0
  210. package/public/Assets/Textures/pin.svg +1 -0
  211. package/public/Assets/Textures/waterNormals.jpg +0 -0
  212. package/public/Assets/Textures/waterNormalsSmall.jpg +0 -0
  213. package/public/Assets/approximateTerrainHeights.json +1 -0
  214. package/public/Cesium.js +16587 -0
  215. package/public/ThirdParty/Workers/package.json +1 -0
  216. package/public/ThirdParty/Workers/zip-web-worker.js +1 -0
  217. package/public/ThirdParty/basis_transcoder.wasm +0 -0
  218. package/public/ThirdParty/draco_decoder.wasm +0 -0
  219. package/public/ThirdParty/google-earth-dbroot-parser.js +1 -0
  220. package/public/ThirdParty/wasm_splats_bg.wasm +0 -0
  221. package/public/ThirdParty/zip-module.wasm +0 -0
  222. package/public/Widgets/Animation/Animation.css +127 -0
  223. package/public/Widgets/Animation/lighter.css +70 -0
  224. package/public/Widgets/BaseLayerPicker/BaseLayerPicker.css +108 -0
  225. package/public/Widgets/BaseLayerPicker/lighter.css +22 -0
  226. package/public/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +102 -0
  227. package/public/Widgets/CesiumInspector/CesiumInspector.css +113 -0
  228. package/public/Widgets/CesiumWidget/CesiumWidget.css +119 -0
  229. package/public/Widgets/CesiumWidget/lighter.css +14 -0
  230. package/public/Widgets/FullscreenButton/FullscreenButton.css +8 -0
  231. package/public/Widgets/Geocoder/Geocoder.css +70 -0
  232. package/public/Widgets/Geocoder/lighter.css +17 -0
  233. package/public/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
  234. package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
  235. package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
  236. package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
  237. package/public/Widgets/Images/ImageryProviders/azureAerial.png +0 -0
  238. package/public/Widgets/Images/ImageryProviders/azureRoads.png +0 -0
  239. package/public/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
  240. package/public/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
  241. package/public/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
  242. package/public/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
  243. package/public/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
  244. package/public/Widgets/Images/ImageryProviders/googleContour.png +0 -0
  245. package/public/Widgets/Images/ImageryProviders/googleRoadmap.png +0 -0
  246. package/public/Widgets/Images/ImageryProviders/googleSatellite.png +0 -0
  247. package/public/Widgets/Images/ImageryProviders/googleSatelliteLabels.png +0 -0
  248. package/public/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
  249. package/public/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
  250. package/public/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
  251. package/public/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
  252. package/public/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
  253. package/public/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
  254. package/public/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
  255. package/public/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
  256. package/public/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
  257. package/public/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
  258. package/public/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
  259. package/public/Widgets/Images/NavigationHelp/Mouse.svg +84 -0
  260. package/public/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
  261. package/public/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
  262. package/public/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
  263. package/public/Widgets/Images/NavigationHelp/Touch.svg +120 -0
  264. package/public/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
  265. package/public/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
  266. package/public/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
  267. package/public/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
  268. package/public/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
  269. package/public/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
  270. package/public/Widgets/Images/TimelineIcons.png +0 -0
  271. package/public/Widgets/Images/info-loading.gif +0 -0
  272. package/public/Widgets/InfoBox/InfoBox.css +92 -0
  273. package/public/Widgets/InfoBox/InfoBoxDescription.css +178 -0
  274. package/public/Widgets/NavigationHelpButton/NavigationHelpButton.css +93 -0
  275. package/public/Widgets/NavigationHelpButton/lighter.css +38 -0
  276. package/public/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
  277. package/public/Widgets/ProjectionPicker/ProjectionPicker.css +38 -0
  278. package/public/Widgets/SceneModePicker/SceneModePicker.css +56 -0
  279. package/public/Widgets/SelectionIndicator/SelectionIndicator.css +20 -0
  280. package/public/Widgets/Timeline/Timeline.css +103 -0
  281. package/public/Widgets/Timeline/lighter.css +23 -0
  282. package/public/Widgets/VRButton/VRButton.css +8 -0
  283. package/public/Widgets/Viewer/Viewer.css +107 -0
  284. package/public/Widgets/VoxelInspector/VoxelInspector.css +16 -0
  285. package/public/Widgets/lighter.css +237 -0
  286. package/public/Widgets/lighterShared.css +46 -0
  287. package/public/Widgets/shared.css +103 -0
  288. package/public/Widgets/widgets.css +1342 -0
  289. package/public/Workers/chunk-3DKU5AMY.js +26 -0
  290. package/public/Workers/chunk-3MO6V622.js +26 -0
  291. package/public/Workers/chunk-3ULTL2FZ.js +26 -0
  292. package/public/Workers/chunk-43YDDN2L.js +26 -0
  293. package/public/Workers/chunk-453UE67U.js +26 -0
  294. package/public/Workers/chunk-5JJC62LP.js +26 -0
  295. package/public/Workers/chunk-65WPDQMK.js +26 -0
  296. package/public/Workers/chunk-6J7K26F7.js +26 -0
  297. package/public/Workers/chunk-A3G5ORRJ.js +26 -0
  298. package/public/Workers/chunk-AIXDAWPZ.js +26 -0
  299. package/public/Workers/chunk-ANKVUFZB.js +26 -0
  300. package/public/Workers/chunk-AZ67KQQB.js +26 -0
  301. package/public/Workers/chunk-C5F5JZAC.js +26 -0
  302. package/public/Workers/chunk-CK62LO4L.js +26 -0
  303. package/public/Workers/chunk-DXDIQEOK.js +26 -0
  304. package/public/Workers/chunk-E7ZPYMUI.js +26 -0
  305. package/public/Workers/chunk-GDE4VUE6.js +26 -0
  306. package/public/Workers/chunk-GGYRJCFH.js +29 -0
  307. package/public/Workers/chunk-HBIOVTO5.js +27 -0
  308. package/public/Workers/chunk-HJIURIT6.js +26 -0
  309. package/public/Workers/chunk-IDLM42AV.js +26 -0
  310. package/public/Workers/chunk-IFBNVX3N.js +26 -0
  311. package/public/Workers/chunk-IR47TAV5.js +26 -0
  312. package/public/Workers/chunk-ISGFCDPW.js +26 -0
  313. package/public/Workers/chunk-JJ24SU25.js +26 -0
  314. package/public/Workers/chunk-LAGV6F3C.js +29 -0
  315. package/public/Workers/chunk-LLCMCKFU.js +26 -0
  316. package/public/Workers/chunk-MSR5BKMH.js +26 -0
  317. package/public/Workers/chunk-MWVHSLYS.js +26 -0
  318. package/public/Workers/chunk-MYNU3I3W.js +26 -0
  319. package/public/Workers/chunk-NSDLDP72.js +26 -0
  320. package/public/Workers/chunk-NUY3PECV.js +26 -0
  321. package/public/Workers/chunk-OHMLE6SB.js +26 -0
  322. package/public/Workers/chunk-OJH7UFER.js +28 -0
  323. package/public/Workers/chunk-OUZ34R6R.js +26 -0
  324. package/public/Workers/chunk-OWJWRYGM.js +26 -0
  325. package/public/Workers/chunk-PAML32O3.js +26 -0
  326. package/public/Workers/chunk-PNKG35NX.js +26 -0
  327. package/public/Workers/chunk-Q6F3SO7I.js +26 -0
  328. package/public/Workers/chunk-QROIA2H7.js +26 -0
  329. package/public/Workers/chunk-RH6XN2ZV.js +28 -0
  330. package/public/Workers/chunk-SCMY6ELS.js +26 -0
  331. package/public/Workers/chunk-SP3AH7D2.js +26 -0
  332. package/public/Workers/chunk-SRXN2PE4.js +26 -0
  333. package/public/Workers/chunk-SUBLUDWJ.js +26 -0
  334. package/public/Workers/chunk-T4S74O3D.js +26 -0
  335. package/public/Workers/chunk-TITUTZNR.js +63 -0
  336. package/public/Workers/chunk-UWS7N7FB.js +26 -0
  337. package/public/Workers/chunk-V5C26K4F.js +26 -0
  338. package/public/Workers/chunk-VAPRBQYE.js +26 -0
  339. package/public/Workers/chunk-VBYW5FXW.js +26 -0
  340. package/public/Workers/chunk-VLPLGYXT.js +26 -0
  341. package/public/Workers/chunk-W5T7UWKW.js +26 -0
  342. package/public/Workers/chunk-XLJBHQML.js +26 -0
  343. package/public/Workers/chunk-XWXQVSYW.js +26 -0
  344. package/public/Workers/chunk-YSN2K4FT.js +27 -0
  345. package/public/Workers/chunk-ZTSD53QT.js +26 -0
  346. package/public/Workers/combineGeometry.js +26 -0
  347. package/public/Workers/createBoxGeometry.js +26 -0
  348. package/public/Workers/createBoxOutlineGeometry.js +26 -0
  349. package/public/Workers/createCircleGeometry.js +26 -0
  350. package/public/Workers/createCircleOutlineGeometry.js +26 -0
  351. package/public/Workers/createCoplanarPolygonGeometry.js +26 -0
  352. package/public/Workers/createCoplanarPolygonOutlineGeometry.js +26 -0
  353. package/public/Workers/createCorridorGeometry.js +26 -0
  354. package/public/Workers/createCorridorOutlineGeometry.js +26 -0
  355. package/public/Workers/createCylinderGeometry.js +26 -0
  356. package/public/Workers/createCylinderOutlineGeometry.js +26 -0
  357. package/public/Workers/createEllipseGeometry.js +26 -0
  358. package/public/Workers/createEllipseOutlineGeometry.js +26 -0
  359. package/public/Workers/createEllipsoidGeometry.js +26 -0
  360. package/public/Workers/createEllipsoidOutlineGeometry.js +26 -0
  361. package/public/Workers/createFrustumGeometry.js +26 -0
  362. package/public/Workers/createFrustumOutlineGeometry.js +26 -0
  363. package/public/Workers/createGeometry.js +26 -0
  364. package/public/Workers/createGroundPolylineGeometry.js +26 -0
  365. package/public/Workers/createPlaneGeometry.js +26 -0
  366. package/public/Workers/createPlaneOutlineGeometry.js +26 -0
  367. package/public/Workers/createPolygonGeometry.js +26 -0
  368. package/public/Workers/createPolygonOutlineGeometry.js +26 -0
  369. package/public/Workers/createPolylineGeometry.js +26 -0
  370. package/public/Workers/createPolylineVolumeGeometry.js +26 -0
  371. package/public/Workers/createPolylineVolumeOutlineGeometry.js +26 -0
  372. package/public/Workers/createRectangleGeometry.js +26 -0
  373. package/public/Workers/createRectangleOutlineGeometry.js +26 -0
  374. package/public/Workers/createSimplePolylineGeometry.js +26 -0
  375. package/public/Workers/createSphereGeometry.js +26 -0
  376. package/public/Workers/createSphereOutlineGeometry.js +26 -0
  377. package/public/Workers/createTaskProcessorWorker.js +26 -0
  378. package/public/Workers/createVectorTileClampedPolylines.js +26 -0
  379. package/public/Workers/createVectorTileGeometries.js +26 -0
  380. package/public/Workers/createVectorTilePoints.js +26 -0
  381. package/public/Workers/createVectorTilePolygons.js +26 -0
  382. package/public/Workers/createVectorTilePolylines.js +26 -0
  383. package/public/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -0
  384. package/public/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -0
  385. package/public/Workers/createVerticesFromHeightmap.js +26 -0
  386. package/public/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -0
  387. package/public/Workers/createWallGeometry.js +26 -0
  388. package/public/Workers/createWallOutlineGeometry.js +26 -0
  389. package/public/Workers/decodeDraco.js +26 -0
  390. package/public/Workers/decodeGoogleEarthEnterprisePacket.js +26 -0
  391. package/public/Workers/decodeI3S.js +26 -0
  392. package/public/Workers/gaussianSplatSorter.js +26 -0
  393. package/public/Workers/gaussianSplatTextureGenerator.js +26 -0
  394. package/public/Workers/incrementallyBuildTerrainPicker.js +26 -0
  395. package/public/Workers/transcodeKTX2.js +56 -0
  396. package/public/Workers/transferTypedArrayTest.js +26 -0
  397. package/public/Workers/upsampleQuantizedTerrainMesh.js +26 -0
  398. package/public/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -0
  399. package/public/index.cjs +16587 -0
  400. package/public/index.js +16587 -0
  401. package/src/Assets/geojson/BaiYangDian.geojson +699 -0
  402. package/src/Assets/geojson/HeBei.geojson +97754 -0
  403. package/src/Assets/geojson//344/270/255/345/233/275_/347/234/201.geojson +1 -0
  404. package/src/Assets/images/BYD.png +0 -0
  405. package/src/Assets/images/BYH.png +0 -0
  406. package/src/Assets/images/CZD.png +0 -0
  407. package/src/Assets/images/bouys.png +0 -0
  408. package/src/Assets/images/hebei.ico +0 -0
  409. package/src/Assets/images/jinzhou.ico +0 -0
  410. package/src/Assets/images/map_bg.png +0 -0
  411. package/src/Assets/images/map_bridge.png +0 -0
  412. package/src/Assets/images/map_radar.png +0 -0
  413. package/src/Assets/images/map_vhf.png +0 -0
  414. package/src/Assets/images/shenlan.png +0 -0
  415. package/src/Assets/images/ship.png +0 -0
  416. package/src/Assets/images/ship_1.png +0 -0
  417. package/src/Assets/images/ship_1_e.png +0 -0
  418. package/src/Assets/images/ship_1_tv.png +0 -0
  419. package/src/Assets/images/ship_2.png +0 -0
  420. package/src/Assets/images/ship_2_e.png +0 -0
  421. package/src/Assets/images/ship_2_tv.png +0 -0
  422. package/src/Assets/images/ship_3.png +0 -0
  423. package/src/Assets/images/ship_3_e.png +0 -0
  424. package/src/Assets/images/ship_3_tv.png +0 -0
  425. package/src/Assets/images/ship_4.png +0 -0
  426. package/src/Assets/images/ship_4_e.png +0 -0
  427. package/src/Assets/images/ship_4_tv.png +0 -0
  428. package/src/Assets/images/ship_5.png +0 -0
  429. package/src/Assets/images/ship_5_e.png +0 -0
  430. package/src/Assets/images/ship_5_tv.png +0 -0
  431. package/src/Assets/images/snowflake_particle.png +0 -0
  432. package/src/Assets/models/fengche.gltf +2920 -0
  433. package/src/Assets/resource.ts +32 -0
  434. package/src/const/color.ts +10 -0
  435. package/src/const/config/camera.ts +16 -0
  436. package/src/const/config/index.ts +2 -0
  437. package/src/const/config/viewer.ts +42 -0
  438. package/src/const/index.ts +3 -0
  439. package/src/const/position.ts +34 -0
  440. package/src/core/cdk/compass.ts +24 -0
  441. package/src/core/cdk/index.ts +36 -0
  442. package/src/core/cdk/lnglat.ts +125 -0
  443. package/src/core/cdk/orbit.ts +118 -0
  444. package/src/core/cdk/overlay.ts +90 -0
  445. package/src/core/cdk/slider.ts +54 -0
  446. package/src/core/cdk/svg_compass.svg +33 -0
  447. package/src/core/index.ts +2 -0
  448. package/src/core/layers/baidu-map-layer.ts +117 -0
  449. package/src/core/libs/gui.ts +88 -0
  450. package/src/core/scene/camera.ts +211 -0
  451. package/src/core/scene/globe.ts +33 -0
  452. package/src/core/scene/index.ts +5 -0
  453. package/src/core/scene/layers.ts +240 -0
  454. package/src/core/scene/primitives.ts +55 -0
  455. package/src/core/scene/scene.ts +44 -0
  456. package/src/core/viewer/clock.ts +93 -0
  457. package/src/core/viewer/data.ts +17 -0
  458. package/src/core/viewer/element.ts +146 -0
  459. package/src/core/viewer/entities.ts +74 -0
  460. package/src/core/viewer/event.ts +155 -0
  461. package/src/core/viewer/index.ts +7 -0
  462. package/src/core/viewer/result.ts +7 -0
  463. package/src/core/viewer/terrain.ts +30 -0
  464. package/src/core/viewer/viewer.ts +255 -0
  465. package/src/entities/ellipse.ts +68 -0
  466. package/src/entities/geojson.ts +19 -0
  467. package/src/entities/image.ts +28 -0
  468. package/src/entities/index.ts +42 -0
  469. package/src/entities/label.ts +37 -0
  470. package/src/entities/point.ts +48 -0
  471. package/src/entities/polygon.ts +59 -0
  472. package/src/entities/polyline.ts +55 -0
  473. package/src/entities/radar.ts +18 -0
  474. package/src/entities/rectangle.ts +50 -0
  475. package/src/entities/trailing.ts +22 -0
  476. package/src/index.ts +10 -0
  477. package/src/plugins/bathymetry.ts +107 -0
  478. package/src/plugins/elevation.ts +146 -0
  479. package/src/plugins/index.ts +3 -0
  480. package/src/plugins/post-process-snow.glsl +99 -0
  481. package/src/plugins/post-process-snow.ts +45 -0
  482. package/src/plugins/thunder.glsl +159 -0
  483. package/src/primitives/appearance/demo.ts +27 -0
  484. package/src/primitives/appearance/index.ts +1 -0
  485. package/src/primitives/area.ts +40 -0
  486. package/src/primitives/geometry/geometry.ts +44 -0
  487. package/src/primitives/image-2d.ts +73 -0
  488. package/src/primitives/index.ts +9 -0
  489. package/src/primitives/instance/instance.ts +58 -0
  490. package/src/primitives/material/image2d.ts +25 -0
  491. package/src/primitives/material/index.ts +8 -0
  492. package/src/primitives/material/ship2d.ts +55 -0
  493. package/src/primitives/particle.ts +47 -0
  494. package/src/primitives/shaders/EllipsoidSurfaceAppearanceFS.glsl +31 -0
  495. package/src/primitives/shaders/EllipsoidSurfaceAppearanceVS.glsl +19 -0
  496. package/src/primitives/shaders/imageFS.glsl +22 -0
  497. package/src/primitives/shaders/raedme.md +187 -0
  498. package/src/property/index.ts +1 -0
  499. package/src/property/material/core.ts +52 -0
  500. package/src/property/material/index.ts +5 -0
  501. package/src/property/material/radar.ts +41 -0
  502. package/src/property/material/road.ts +35 -0
  503. package/src/property/material/trailing.ts +31 -0
  504. package/src/property/material/wall.ts +31 -0
  505. package/src/scene/TJG/area.ts +37 -0
  506. package/src/scene/TJG/billboard.ts +89 -0
  507. package/src/scene/TJG/entityies.ts +131 -0
  508. package/src/scene/TJG/lines.ts +14 -0
  509. package/src/scene/TJG/maps.ts +16 -0
  510. package/src/scene/TJG/scene-tjg.ts +212 -0
  511. package/src/scene/TJG/ships.ts +32 -0
  512. package/src/scene/TJG/tileset.ts +144 -0
  513. package/src/scene/TJG/tjg.d.ts +14 -0
  514. package/src/scene/cdk/fog.ts +47 -0
  515. package/src/scene/cdk/index.ts +4 -0
  516. package/src/scene/cdk/measure.ts +108 -0
  517. package/src/scene/cdk/plot.ts +182 -0
  518. package/src/scene/cdk/source.ts +33 -0
  519. package/src/shaders/3d-tileset.ts +41 -0
  520. package/src/shaders/index.ts +1 -0
  521. package/src/shaders/material-property/a-readme.md +2 -0
  522. package/src/shaders/material-property/radarFS.glsl +25 -0
  523. package/src/shaders/material-property/roadFS.glsl +14 -0
  524. package/src/shaders/material-property/trailingFS.glsl +18 -0
  525. package/src/shaders/material-property/wallFS.glsl +31 -0
  526. package/src/shaders/raedme.md +187 -0
  527. package/src/shaders/ship/ShipVS.glsl +19 -0
  528. package/src/sl-utils-cesium.ts +1 -0
  529. package/src/types/cdk.d.ts +20 -0
  530. package/src/types/core.d.ts +6 -0
  531. package/src/types/entity.d.ts +628 -0
  532. package/src/types/event.d.ts +32 -0
  533. package/src/types/extend.Cesium.d.ts +28 -0
  534. package/src/types/geometry.d.ts +55 -0
  535. package/src/types/plugins.d.ts +34 -0
  536. package/src/types/primitive.d.ts +69 -0
  537. package/src/types/scene.d.ts +25 -0
  538. package/src/types/viewer.d.ts +114 -0
  539. package/src/utils/cesium.ts +189 -0
  540. package/src/utils/common.ts +87 -0
  541. package/src/utils/index.ts +5 -0
  542. package/src/utils/map.ts +112 -0
  543. package/src/utils/types.ts +44 -0
  544. package/tsconfig.cjs.json +7 -0
  545. package/tsconfig.json +34 -0
  546. package/types/billboard.d.ts +8 -0
  547. package/types/entities.d.ts +224 -0
  548. package/types/property.d.ts +12 -0
  549. package/types/resource.d.ts +26 -0
  550. package/types/sl-utils-cesium.d.ts +17 -0
  551. package/vite.config.ts +43 -0
  552. package/webpack.config.js +29 -0
@@ -0,0 +1,32 @@
1
+ import F from './models/fengche.gltf'
2
+ import J from './images/jinzhou.ico'
3
+
4
+ import ICONS from './images/bouys.png'
5
+ import BYD_BILLBOARDS from './images/BYD.png'
6
+ import BYH_BILLBOARD from './images/BYH.png'
7
+ import CZD_BILLBOARD from './images/CZD.png'
8
+ import MAP_BG from './images/map_bg.png'
9
+ import MAP_BRIDGE from './images/map_bridge.png'
10
+ import MAP_RADAR from './images/map_radar.png'
11
+ import MAP_VHF from './images/map_vhf.png'
12
+ import U_SNOWTEXTURE from './images/snowflake_particle.png'
13
+ import GEOJSON_HEBEI from './geojson/HeBei.geojson'
14
+
15
+ /**静态资源 */
16
+ export const RESOURCES = {
17
+ /**风机模型 */
18
+ F,
19
+ /**风电场图标 */
20
+ J,
21
+ ICONS,
22
+ BYD_BILLBOARDS,
23
+ BYH_BILLBOARD,
24
+ CZD_BILLBOARD,
25
+ /**地图覆盖层 */
26
+ MAP_BG,
27
+ MAP_BRIDGE,
28
+ MAP_RADAR,
29
+ MAP_VHF,
30
+ U_SNOWTEXTURE,
31
+ GEOJSON_HEBEI
32
+ }
@@ -0,0 +1,10 @@
1
+ import { Color } from "cesium";
2
+
3
+ /**用于线条的颜色 */
4
+ export const COLOR_CONST_LINE = Color.RED.withAlpha(0.8);
5
+ /**轮廓边线的颜色 */
6
+ export const COLOR_CONST_OUTLINE = Color.RED.withAlpha(0.8);
7
+ /**用于填充的颜色 */
8
+ export const COLOR_CONST_FILL = Color.GREEN.withAlpha(0.2);
9
+ /**字体颜色 */
10
+ export const COLOR_CONST_FONT = Color.fromRgba(0xFFB172FF);
@@ -0,0 +1,16 @@
1
+ import { Cartesian3, Rectangle } from "cesium";
2
+
3
+ /**申明CESIUM的默认视角范围 */
4
+ export const CESIUM_CONST_DEFAULT_VIEW_RECTANGLE = Rectangle.fromDegrees(100.9830645, 42.23071025, 128.18493624, 32.38793137);
5
+ /**零值表示相机将刚好查看整个视角范围,大于零会使它远离视角范围,而小于零的值会使它接近视角范围 */
6
+ export const CESIUM_CONST_DEFAULT_VIEW_FACTOR = 0.01;
7
+ /**如果设置,则相机将无法沿任一方向旋转超过该轴 */
8
+ export const CESIUM_CONST_CAMERA_CONSTRAINEDAXIS: Cartesian3 = undefined;
9
+ /**不带参数时旋转相机的默认量提供给外观方法 */
10
+ export const CESIUM_CONST_CAMERA_DEFAULTLOOKAMOUNT: number = Math.PI / 60.0;
11
+ /**不带参数时移动相机的默认数量提供给move方法 */
12
+ export const CESIUM_CONST_CAMERA_DEFAULTMOVEAMOUNT: number = 100000.0;
13
+ /**不带参数时旋转相机的默认量提供给旋转方法 */
14
+ export const CESIUM_CONST_CAMERA_DEFAULTROTATEAMOUNT: number = Math.PI / 3600.0;
15
+ /**不带参数时移动相机的默认数量提供给缩放方法 */
16
+ export const CESIUM_CONST_CAMERA_DEFAULTZOOMAMOUNT: number = 100000.0;
@@ -0,0 +1,2 @@
1
+ export * from './camera';
2
+ export * from './viewer';
@@ -0,0 +1,42 @@
1
+ import { CesiumTerrainProvider } from "cesium";
2
+
3
+ /**申明CESIUM静态资源根路径 */
4
+ export const CESIUM_CONST_BASE_URL = '/';
5
+ /**申明CESIUM资源的token */
6
+ export const CESIUM_CONST_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3MTMzNmU2ZC0zNTM4LTQ4ZTQtYmE3ZC00MjUxODVmOWY4MTgiLCJpZCI6MTQ5NTEyLCJpYXQiOjE3MTc0ODQ0MTF9.lrlIkvQ463L2c5Rp-abkbwAiSP4lRTGF8gZWesJhgvc";
7
+ /**Viewer的默认配置 */
8
+ export const CESIUM_CONST_OPT_VIEWER_DEFAULT: SLCViewerOpt = {
9
+ animation: false,
10
+ timeline: false,
11
+ geocoder: false,
12
+ homeButton: false,
13
+ sceneModePicker: false,
14
+ baseLayer: false,
15
+ baseLayerPicker: false,
16
+ navigationHelpButton: false,
17
+ fullscreenButton: false,
18
+ selectionIndicator: false,
19
+ infoBox: true,
20
+ projectionPicker: false,
21
+ shouldAnimate: true,
22
+ scene3DOnly: true,
23
+ // creditContainer: 'none',
24
+ // 设置地形
25
+ // terrainProvider: Cesium.createWorldTerrainAsync({
26
+ // // //光照效果
27
+ // requestVertexNormals: true,
28
+ // // //水纹贴图
29
+ // requestWaterMask: true,
30
+ // }),
31
+ // terrainProvider:new CesiumTerrainProvider({
32
+ // url: "/Assets/terrain"
33
+ // }),
34
+ //天空盒子
35
+ // skyBox: new SkyBox({
36
+ // sources: {
37
+ // positiveX: '', negativeX: '',
38
+ // positiveY: '', negativeY: '',
39
+ // positiveZ: '', negativeZ: '',
40
+ // }
41
+ // }),
42
+ }
@@ -0,0 +1,3 @@
1
+ export * from './config';
2
+ export * from './color';
3
+ export * from './position';
@@ -0,0 +1,34 @@
1
+ /**经纬度常量 */
2
+
3
+ import { Cartesian3, Cartographic } from "cesium";
4
+ /**北京经纬度 */
5
+ export const BEIJING_CONST_DEGREES = Cartesian3.fromDegrees(116.3, 39.9, 0);
6
+ /**上海经纬度 */
7
+ export const SHANGHAI_CONST_DEGREES = Cartesian3.fromDegrees(121.3, 31.1, 0);
8
+ /**广州经纬度 */
9
+ export const GUANGZHOU_CONST_DEGREES = Cartesian3.fromDegrees(113.1, 23.0, 0);
10
+ /**深圳经纬度 */
11
+ export const SHENZHEN_CONST_DEGREES = Cartesian3.fromDegrees(113.8, 22.5, 0);
12
+
13
+ /**香河县 */
14
+ export const LNGLAT_CONST_XIANGHE: LnglatHeight = [116.95, 39.88];
15
+ /**锦州油田 */
16
+ export const LNGLAT_CONST_JINZHOU: LnglatHeight = [121.04084167, 40.35676944];
17
+ /**白洋淀 */
18
+ export const LNGLAT_CONST_BAIYANGDIAN: LnglatHeight = [116.05, 38.53];
19
+ /**沧州 */
20
+ export const LNGLAT_CONST_CANGZHOU: LnglatHeight = [116.85, 38.30];
21
+ /**天元海 */
22
+ export const LNGLAT_CONST_TIANYUANHAI: LnglatHeight = [117.5481, 39.7471];
23
+ /**深蓝 */
24
+ export const LNGLAT_CONST_SHENLAN: LnglatHeight = [114.12119, 22.68457];
25
+ /**博纳斯威 */
26
+ export const LNGLAT_CONST_BONASIWEI: LnglatHeight = [117.42950, 39.459000]
27
+ /**华南城 */
28
+ export const LNGLAT_CONST_HUANANCHEN: LnglatHeight = [114.1203520 + (0.1198286 - 0.119994081), 22.68317077 + (0.683382606 - 0.683162334)];
29
+
30
+ /**C3常量 */
31
+ /** @default 北京*/
32
+ export const CARTESIAN3_CONST_DEFAULT: Cartesian3 = Cartesian3.fromDegrees(116.4074, 39.9042);
33
+ /**香河县 */
34
+ export const CARTESIAN3_CONST_XIANGHE: Cartesian3 = Cartesian3.fromDegrees(116.95, 39.88);
@@ -0,0 +1,24 @@
1
+ import { SLCViewer } from "../viewer";
2
+ import svg_compass from './svg_compass.svg'
3
+ /**指南针
4
+ * @param 核心类
5
+ * @param ele 指南针节点
6
+ */
7
+ export class Compass {
8
+ constructor(cviewer: SLCViewer, ele: HTMLElement) {
9
+ if (!ele) {
10
+ ele = document.createElement('img');
11
+ ele.setAttribute('src', svg_compass);
12
+ const { style } = ele
13
+ style.position = 'absolute';
14
+ style.zIndex = '10000';
15
+ style.top = '10px';
16
+ style.right = '530px';
17
+ }
18
+ const { style } = ele, { camera } = cviewer;
19
+ cviewer.viewer.container.append(ele);
20
+ cviewer.on('TICK', () => {
21
+ style.transform = `rotate(${camera.heading * -180 / Math.PI}deg)`
22
+ })
23
+ }
24
+ }
@@ -0,0 +1,36 @@
1
+ /**组件开发工具包 */
2
+ import { SLCViewer } from "../viewer";
3
+ import { Slider } from "./slider";
4
+ import { Compass } from "./compass";
5
+ import { LnglatScale } from './lnglat';
6
+
7
+ /**组件开发工具包
8
+ * 获取当前指针经纬度
9
+ * 获取当前屏幕中间每一个像素的距离
10
+ *
11
+ */
12
+ export class SLCesiumCDK {
13
+ constructor(viewer: SLCViewer) {
14
+ this.cviewer = viewer;
15
+ }
16
+ /**cesiumViewer实例 */
17
+ private cviewer: SLCViewer;
18
+ /**经纬度存放地址 */
19
+ public readonly lnglathight: LnglatHeight = [0, 0, 0]
20
+ /**中心点经纬度和 */
21
+ public readonly center_lnglat: LnglatHeight = [0, 0, 0]
22
+ /**添加指南针 */
23
+ public onAddCompass(ele?: HTMLElement) {
24
+ const compass = new Compass(this.cviewer, ele)
25
+ }
26
+ /**添加分割线 */
27
+ public onAddSlider() {
28
+ const slider = new Slider(this.cviewer)
29
+ }
30
+
31
+ /**获取鼠标经纬度 */
32
+ public onAddMouseLnglatScale() {
33
+ const lnglat = new LnglatScale(this.cviewer)
34
+ }
35
+
36
+ }
@@ -0,0 +1,125 @@
1
+ import { Cartesian2, Cartographic, ScreenSpaceEventHandler } from "cesium";
2
+ import { SLCViewer } from "../viewer";
3
+ import { uc_getLnglat, uc_mathGetPoint } from "../../utils";
4
+
5
+ /**组件开发工具包
6
+ * 获取当前指针经纬度
7
+ * 获取当前屏幕中间每一个像素的距离
8
+ *
9
+ */
10
+ export class LnglatScale {
11
+ constructor(viewer: SLCViewer) {
12
+ this.cviewer = viewer;
13
+ viewer.on('INIT_PICK', () => {
14
+ this.onAddMouseLnglat()
15
+ this.onAddScale();
16
+ })
17
+ }
18
+ /**cesiumViewer实例 */
19
+ private cviewer: SLCViewer;
20
+ /**经纬度存放地址 */
21
+ public readonly lnglathight: LnglatHeight = [0, 0, 0]
22
+ /**中心点经纬度和 */
23
+ public readonly center_lnglat: LnglatHeight = [0, 0, 0]
24
+ /**获取鼠标经纬度 */
25
+ public onAddMouseLnglat() {
26
+ const { cviewer, lnglathight } = this, { viewer, lnglat, scene, celement: { position, width, height } } = cviewer;
27
+ const div = document.createElement('div');
28
+ const { style } = div
29
+ style.position = 'absolute';
30
+ style.bottom = '10px';
31
+ style.right = '10px';
32
+ style.zIndex = '10000';
33
+ style.borderRadius = '3px';
34
+ style.border = '1px solid #333';
35
+ style.backgroundColor = 'rgba(255, 255, 255, 0.6)';
36
+ style.color = '#333';
37
+ style.width = '200px';
38
+ style.height = '32px';
39
+ style.display = "flex";
40
+ style.alignItems = 'center';
41
+ style.padding = '0px 3px';
42
+ viewer.container.append(div);
43
+ const spanE = document.createElement('span'), spanN = document.createElement('span');
44
+ const { style: styleE } = spanE, { style: styleN } = spanN;
45
+ styleE.width = styleN.width = '30%';
46
+ styleE.flexGrow = styleN.flexGrow = '1';
47
+ styleE.textAlign = styleN.textAlign = 'right';
48
+ div.appendChild(spanE);
49
+ div.appendChild(spanN);
50
+ let click: boolean = false;
51
+ const getLnglat = (e) => {
52
+ if (click) return;
53
+ if (e instanceof Cartesian2) uc_getLnglat(e, scene, lnglathight);
54
+ else uc_getLnglat(position, scene, lnglathight);
55
+ lnglathight[0] = uc_mathGetPoint(lnglathight[0], 3)
56
+ lnglathight[1] = uc_mathGetPoint(lnglathight[1], 3)
57
+ lnglathight[2] = uc_mathGetPoint(lnglathight[2], 3)
58
+ spanE.textContent = `${lnglathight[0]}E `;
59
+ spanN.textContent = `${lnglathight[1]}N `;
60
+ }
61
+ cviewer.on('LEFT_DOWN', () => click = true)
62
+ cviewer.on('LEFT_UP', () => click = false)
63
+ cviewer.on('MOUSE_MOVE', getLnglat)
64
+ cviewer.on('CAMERA_MOVEEND', getLnglat)
65
+ getLnglat(new Cartesian2(width / 2, height / 2))
66
+ }
67
+ /**添加屏幕竖直中线的比例尺 */
68
+ public onAddScale() {
69
+ const div = document.createElement('div'), span = document.createElement('span'), line = document.createElement('div');
70
+ const { cviewer, center_lnglat } = this, { scene, celement: { center }, ccamera } = cviewer, { style } = div, { style: styleLine } = line, { style: styleSpan } = span;
71
+ div.id = 'scale-container', line.id = 'scale-line', span.id = 'scale-text';
72
+ cviewer.viewer.container.append(div);
73
+ div.append(line), div.append(span);
74
+ style.width = '200px';
75
+ style.height = '32px';
76
+ style.position = 'absolute';
77
+ style.zIndex = '10000';
78
+ style.bottom = '50px';
79
+ style.right = '10px';
80
+ style.display = "flex";
81
+ style.alignItems = 'center';
82
+ style.justifyContent = 'center';
83
+ style.color = '#333';
84
+ style.border = '1px solid #333';
85
+ style.borderRadius = '3px';
86
+ style.backgroundColor = 'rgba(255, 255, 255, 0.6)';
87
+ style.padding = '0px 3px';
88
+ styleLine.width = '20px';
89
+ styleLine.height = '5px';
90
+ styleLine.position = 'absolute';
91
+ styleLine.bottom = '5px';
92
+ styleLine.border = '1px solid #333';
93
+ styleLine.borderTop = '0px';
94
+ styleSpan.fontSize = '13px';
95
+ const getScale = () => {
96
+ const res = uc_getLnglat(center, scene, center_lnglat)
97
+ if (!res) style.display = 'none';
98
+ else style.display = 'flex';
99
+ const distance = ccamera.getPixelSize(center_lnglat)
100
+ const { width, text } = this.getZoomAndScale(distance);
101
+ span.textContent = text;
102
+ styleLine.width = width + 'px';
103
+ }
104
+ cviewer.on('CAMERA_MOVEEND', getScale);
105
+ getScale();
106
+ }
107
+ /**设置比例尺的信息 */
108
+ private getZoomAndScale(distance: number) {
109
+ distance = distance * 100;
110
+ let text = '';
111
+ if (distance > 2000) {
112
+ distance = distance / 1852
113
+ text = ' nm'
114
+ } else {
115
+ text = ' m'
116
+ }
117
+ let num = distance, power = 1;
118
+ while (num > 10) {
119
+ power = power * 10;
120
+ num = Math.ceil(num / 10)
121
+ }
122
+ num = Math.ceil(num) * power;
123
+ return { width: 100 * num / distance, text: num + text }
124
+ }
125
+ }
@@ -0,0 +1,118 @@
1
+ import { Camera, Cartesian3, CatmullRomSpline, Color, DeveloperError, DistanceDisplayCondition, JulianDate, createGuid } from "cesium";
2
+ import { CEvent, SLCViewer } from "../viewer";
3
+ import { uc_getCartesian3, uc_getDiffDegreesByDistance, uc_getDirection, uc_getLnglat } from "../../utils";
4
+ import { LNGLAT_CONST_HUANANCHEN, LNGLAT_CONST_SHENLAN } from "../../const";
5
+ import * as turf from '@turf/turf';
6
+ const DEFAULT_ORBIT_OPT: CDKOrbitOpt = {
7
+ position: [],
8
+ radius: 500,
9
+ steps: 50,
10
+ }
11
+ /**组件开发工具包--轨道 */
12
+ export class CDKOrbit {
13
+ constructor(viewer: SLCViewer, opt: CDKOrbitOpt) {
14
+ this.viewer = viewer;
15
+ const spline = this.spline = this.createSpline(opt);
16
+ // 显示轨迹
17
+ const interpolatedPoints = [];
18
+ const granularity = 0.01; // 控制轨迹的细致程度
19
+ for (let t = 0; t <= 1; t += granularity) {
20
+ const position = spline.evaluate(t);
21
+ interpolatedPoints.push(position);
22
+ }
23
+ viewer.centities.add({
24
+ polyline: {
25
+ positions: interpolatedPoints,
26
+ width: 2,
27
+ material: Color.RED,
28
+ distanceDisplayCondition: new DistanceDisplayCondition(10, 5000)
29
+ }
30
+ });
31
+ }
32
+ /** */
33
+ private id: string = createGuid();
34
+ /**视图 */
35
+ private viewer: SLCViewer;
36
+ /**相机 */
37
+ private get camera(): Camera {
38
+ return this.viewer.ccamera.camera
39
+ };
40
+ /**事件 */
41
+ private get cevent(): CEvent {
42
+ return this.viewer
43
+ }
44
+ /**轨迹 */
45
+ private spline: CatmullRomSpline;
46
+ /**巡视id */
47
+ private animId: number;
48
+ /**当前的位置 */
49
+ private c3: Cartesian3 = new Cartesian3();
50
+ /**获取轨道指定百分比位置的点*/
51
+ public getPosition(time: number, result: Cartesian3 = this.c3): Cartesian3 {
52
+ if (time < 0 || time > 1) throw new DeveloperError('参数应该大于等于0且小于等于1');
53
+ result = this.spline.evaluate(time, this.c3)
54
+ return result
55
+ }
56
+ /**开发组件开启轨迹
57
+ * @param all 整个轨迹巡视花费时间(秒)
58
+ */
59
+ public cdkOpenOrbit(all: number) {
60
+ const { camera, c3 } = this;
61
+ const start = performance.now(), time = all * 1000;
62
+ const t = uc_getCartesian3([LNGLAT_CONST_HUANANCHEN[0], LNGLAT_CONST_HUANANCHEN[1], 0]);
63
+ const cb = () => {
64
+ const now = performance.now(), percent = (now - start) / time % 1
65
+ this.getPosition(percent);
66
+ camera.setView({ destination: c3, orientation: uc_getDirection(c3, t) })
67
+ this.animId = requestAnimationFrame(cb)
68
+ }
69
+ cb();
70
+ this.addEventListener(true);
71
+ }
72
+ /**开发组件关闭轨迹 */
73
+ public cdkCloseOrbit() {
74
+ cancelAnimationFrame(this.animId);
75
+ this.addEventListener(false);
76
+ }
77
+ /**监听函数(一些操作关闭轨道巡视) */
78
+ private addEventListener(flag: boolean) {
79
+ const { cevent, id } = this
80
+ cevent[flag ? 'on' : 'off'](`click.${id}`, () => this.cdkCloseOrbit());
81
+ }
82
+ /**创建轨道线 */
83
+ private createSpline(opt: CDKOrbitOpt): CatmullRomSpline {
84
+ const { position, radius, steps } = Object.assign({}, DEFAULT_ORBIT_OPT, opt)
85
+ let points: Cartesian3[] = position.map(e => uc_getCartesian3(e)), len = points.length, [p0, p1] = points;
86
+ /**创建圆 */
87
+ if (len === 1) {
88
+ let p = uc_getLnglat(p0);
89
+ let { geometry: { coordinates: [arr] } } = turf.circle([p[0], p[1]], radius, { steps, units: "meters" });
90
+ points = arr.map((e: LnglatHeight) => uc_getCartesian3([e[0], e[1], p[2]]));
91
+ points.push(points[0])
92
+ } else if (len === 2) {
93
+ let [s0, s1] = points, [lng0, lat0] = uc_getLnglat(s0), [lng1, lat1] = uc_getLnglat(s1),
94
+ polygon = turf.polygon([[[lng0, lat0], [lng1, lat1], [lng1, lat1], [lng0, lat0]]]);
95
+ let { geometry: { coordinates: [arr] } } = turf.buffer(polygon, radius, { steps, units: "meters" })
96
+ points = arr.map((e: any) => uc_getCartesian3([e[0], e[1], s0[2]]))
97
+ points.push(points[0])
98
+ }
99
+ /**根据关键点创建线*/
100
+ let length = points.length, diff = 1.0 / (length - 1), times: number[] = [];
101
+ for (let i = 0; i < length; i++) {
102
+ times.push(diff * i)
103
+ }
104
+ return new CatmullRomSpline({
105
+ times: times,
106
+ points: points
107
+ })
108
+ }
109
+ }
110
+ /**轨道参数 */
111
+ interface CDKOrbitOpt {
112
+ /**点位(单点为圆中心,两点为线外拓,多点为必经点曲线) */
113
+ position: (Cartesian3 | LnglatHeight)[],
114
+ /**圆半径或外拓距离(m) @default 500 */
115
+ radius?: number,
116
+ /**取样点数量 @default 100 */
117
+ steps?: number,
118
+ }
@@ -0,0 +1,90 @@
1
+ import { ScreenSpaceEventHandler, createGuid } from "cesium";
2
+ import { SLCViewer } from "..";
3
+ /**组件开发工具包--浮层 */
4
+ export class CDKOverlay {
5
+ constructor(viewer: SLCViewer, opt?: COverlayOpt) {
6
+ this.cviewer = viewer;
7
+ this.setOption(opt)
8
+ this.openListener();
9
+ }
10
+ /**浮层id */
11
+ private uuid: string = createGuid();
12
+ /**浮层dom */
13
+ private dom: HTMLDivElement = document.createElement('div');
14
+ /**实际显示内容 */
15
+ private ele: HTMLElement;
16
+ /**浮层配置 */
17
+ private opt: COverlayOpt = {
18
+ positon: "left-bottom",
19
+ x: 5,
20
+ y: -5,
21
+ };
22
+ private cviewer: SLCViewer;
23
+ /**销毁浮层 */
24
+ public distory() {
25
+ this.cviewer.off(`MOUSE_MOVE.${this.uuid}`);
26
+ }
27
+ /**销毁浮层 SLUSubs工具类*/
28
+ public cdkUn() {
29
+ this.distory()
30
+ }
31
+ /**显示 */
32
+ public cdkShow() {
33
+ this.dom.style.display = 'block';
34
+ return this;
35
+ }
36
+ /**隐藏 */
37
+ public cdkHide() {
38
+ this.dom.style.display = 'none';
39
+ }
40
+ /**配置浮层 */
41
+ private setOption(opt: Partial<COverlayOpt>) {
42
+ this.opt = Object.assign(this.opt, opt);
43
+ this.ele = this.opt.ele;
44
+ const { cviewer, dom } = this, { className = "", ifEvent } = this.opt;
45
+ cviewer.viewer.container.appendChild(dom);
46
+ dom.className = className;
47
+ if (!ifEvent) dom.style.pointerEvents = 'none';
48
+ }
49
+ /**开启监听并对节点进行控制 */
50
+ private openListener() {
51
+ const { cviewer, opt, dom, ele } = this, { celement } = cviewer, { positon, x, y } = opt, { style } = dom;
52
+ if (!ele) return;
53
+ style.position = 'absolute';
54
+ style.width = "content";
55
+ dom.appendChild(ele);
56
+ const rect = ele.getBoundingClientRect();
57
+ cviewer.on(`MOUSE_MOVE.${this.uuid}`, (e: ScreenSpaceEventHandler.MotionEvent) => {
58
+ let { left, top, right, bottom } = celement.rect, { width, height } = rect;
59
+ left += x; right -= x; top += y; bottom -= y;
60
+ /**重设dom位置 */
61
+ style.top = "unset";
62
+ style.bottom = "unset";
63
+ style.left = "unset";
64
+ style.right = "unset";
65
+ let local: string = positon;
66
+ /**判断是否超出边界 */
67
+ if (top < height && positon.includes('bottom')) local = positon.replace('bottom', 'top');
68
+ if (right < width && positon.includes('left')) local = positon.replace('left', 'right');
69
+ /**设置位置 */
70
+ switch (local) {
71
+ case "left-top":
72
+ style.left = `${left}px`;
73
+ style.top = `${top}px`;
74
+ break;
75
+ case "left-bottom":
76
+ style.left = `${left}px`;
77
+ style.bottom = `${bottom}px`;
78
+ break;
79
+ case "right-top":
80
+ style.right = `${right}px`;
81
+ style.top = `${top}px`;
82
+ break;
83
+ case "right-bottom":
84
+ style.right = `${right}px`;
85
+ style.bottom = `${bottom}px`;
86
+ break;
87
+ }
88
+ });
89
+ }
90
+ }
@@ -0,0 +1,54 @@
1
+ import { Scene, ScreenSpaceEventHandler, ScreenSpaceEventType, Viewer } from "cesium";
2
+ import { SLCViewer } from "../viewer";
3
+
4
+ /**将cesium场景进行分割的工具类
5
+ * 自行将要比对的物体放置到左侧或右侧
6
+ * @example tileset.splitDirection = SplitDirection.LEFT;
7
+ * @example https://sandcastle.cesium.com/?id=3d-tiles-gaussian-splatting-comparison
8
+ */
9
+ export class Slider {
10
+ constructor(cviewer: SLCViewer) {
11
+ if (this.slider) return;
12
+ let slider = this.slider = document.getElementById("slider");
13
+ if (!this.slider) {
14
+ slider = this.slider = document.createElement('div');
15
+ cviewer.viewer.container.append(slider);
16
+ slider.id = "slider";
17
+ const style = slider.style;
18
+ style.width = '5px';
19
+ style.height = '100%';
20
+ style.position = 'absolute';
21
+ style.left = '50%';
22
+ style.top = '0%';
23
+ style.cursor = 'e-resize'
24
+ style.backgroundColor = 'rgba(255, 255, 255, 0.5)';
25
+ }
26
+ const handler = new ScreenSpaceEventHandler(slider as HTMLCanvasElement);
27
+ let moveActive = false;
28
+ function move(movement) {
29
+ if (!moveActive) {
30
+ return;
31
+ }
32
+ const relativeOffset = movement.endPosition.x;
33
+ const splitPosition =
34
+ (slider.offsetLeft + relativeOffset) / slider.parentElement.offsetWidth;
35
+ slider.style.left = `${100.0 * splitPosition}%`;
36
+ cviewer.scene.splitPosition = splitPosition;
37
+ }
38
+ handler.setInputAction(function () {
39
+ moveActive = true;
40
+ }, ScreenSpaceEventType.LEFT_DOWN);
41
+ handler.setInputAction(function () {
42
+ moveActive = true;
43
+ }, ScreenSpaceEventType.PINCH_START);
44
+ handler.setInputAction(move, ScreenSpaceEventType.MOUSE_MOVE);
45
+ handler.setInputAction(move, ScreenSpaceEventType.PINCH_MOVE);
46
+ handler.setInputAction(function () {
47
+ moveActive = false;
48
+ }, ScreenSpaceEventType.LEFT_UP);
49
+ handler.setInputAction(function () {
50
+ moveActive = false;
51
+ }, ScreenSpaceEventType.PINCH_END);
52
+ }
53
+ private slider: HTMLElement;
54
+ }
@@ -0,0 +1,33 @@
1
+ <svg width="130" height="130" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- 指南针外圆 -->
3
+ <circle cx="100" cy="100" r="95" fill="#f8f9fa66" stroke="#2c3e5066" stroke-width="3" />
4
+ <!-- 内圆背景 -->
5
+ <circle cx="100" cy="100" r="90" fill="#ffffff33" stroke="#bdc3c766" stroke-width="1" />
6
+ <!-- 刻度线(4个主方向粗刻度) -->
7
+ <line x1="100" y1="5" x2="100" y2="20" stroke="#e74c3c" stroke-width="4" /> <!-- 北 -->
8
+ <line x1="190" y1="100" x2="175" y2="100" stroke="#3498db" stroke-width="4" /> <!-- 东 -->
9
+ <line x1="100" y1="195" x2="100" y2="180" stroke="#2ecc71" stroke-width="4" /> <!-- 南 -->
10
+ <line x1="5" y1="100" x2="20" y2="100" stroke="#f39c12" stroke-width="4" /> <!-- 西 -->
11
+ <!-- 刻度线(8个次方向细刻度) -->
12
+ <line x1="155" y1="45" x2="145" y2="55" stroke="#7f8c8d" stroke-width="2" /> <!-- 东北 -->
13
+ <line x1="155" y1="155" x2="145" y2="145" stroke="#7f8c8d" stroke-width="2" /> <!-- 东南 -->
14
+ <line x1="45" y1="155" x2="55" y2="145" stroke="#7f8c8d" stroke-width="2" /> <!-- 西南 -->
15
+ <line x1="45" y1="45" x2="55" y2="55" stroke="#7f8c8d" stroke-width="2" /> <!-- 西北 -->
16
+ <!-- 方向文字 -->
17
+ <text x="100" y="40" font-family="Arial, sans-serif" font-size="20" font-weight="bold" text-anchor="middle"
18
+ fill="#e74c3c">N</text>
19
+ <text x="165" y="105" font-family="Arial, sans-serif" font-size="20" font-weight="bold" text-anchor="middle"
20
+ fill="#3498db">E</text>
21
+ <text x="100" y="170" font-family="Arial, sans-serif" font-size="20" font-weight="bold" text-anchor="middle"
22
+ fill="#2ecc71">S</text>
23
+ <text x="35" y="105" font-family="Arial, sans-serif" font-size="20" font-weight="bold" text-anchor="middle"
24
+ fill="#f39c12">W</text>
25
+ <!-- 指南针指针(北方向) -->
26
+ <polygon points="100,30 95,95 100,100 105,95" fill="#e74c3c" stroke="#c0392b" stroke-width="1" />
27
+
28
+ <!-- 指针尾部 -->
29
+ <polygon points="100,165 95,105 100,100 105,105" fill="#7f8c8d" stroke="#616a6b" stroke-width="1" />
30
+
31
+ <!-- 中心轴 -->
32
+ <circle cx="100" cy="100" r="5" fill="#2c3e50" />
33
+ </svg>
@@ -0,0 +1,2 @@
1
+ export * from './scene';
2
+ export * from './viewer';