@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,16 @@
1
+ import { ImageryLayer } from "cesium";
2
+ import { CLayers, CONST_CESIUM_MAP, SLCViewer } from "../../core";
3
+
4
+ export class Maps {
5
+ constructor(cviewer: SLCViewer) {
6
+ this.cviewer = cviewer;
7
+ this.clayers = cviewer.clayers;
8
+ }
9
+ cviewer: SLCViewer;
10
+ private clayers: CLayers;
11
+
12
+ /**添加地图影像图层 */
13
+ public addMap(name: CONST_CESIUM_MAP | `${typeof CONST_CESIUM_MAP[keyof typeof CONST_CESIUM_MAP]}`): ImageryLayer {
14
+ return this.clayers.addLayer(name);
15
+ }
16
+ }
@@ -0,0 +1,212 @@
1
+ import { Billboard, BoundingRectangle, Cesium3DTile, Cesium3DTilesTerrainData, Cesium3DTileset, CesiumTerrainProvider, Color, CustomHeightmapTerrainProvider, DefaultProxy, DistanceDisplayCondition, ImageryLayer, JulianDate, NearFarScalar, Rectangle, SingleTileImageryProvider, TerrainProvider, VerticalOrigin, WebMapServiceImageryProvider } from "cesium";
2
+ import { LNGLAT_CONST_HUANANCHEN } from "../../const";
3
+ import { SLCViewer } from "../../core";
4
+ import { CMath, uc_getCartesian3, uc_getLnglat, uc_getUUID } from "../../utils";
5
+ import { CDKMeasure, Fog } from "../cdk";
6
+ import { Areas } from "./area";
7
+ import { ObjectEntities } from "./entityies";
8
+ import { Maps } from "./maps";
9
+ import { Ships } from "./ships";
10
+ import { SLCesiumCDK } from "../../core/cdk";
11
+ import { Tileset } from "./tileset";
12
+ import { Billboards } from "./billboard";
13
+ import { PluginBathymetry } from "../../plugins/bathymetry";
14
+ import { PluginElevation } from "../../plugins/elevation";
15
+ import { PrimitiveImage2D } from "../../primitives";
16
+ import { RESOURCES } from "../../Assets/resource";
17
+ import { PostProcessSnow } from "../../plugins";
18
+
19
+ export class SceneTJG extends SLCViewer {
20
+ constructor(html) {
21
+ super(html)
22
+ // this.openGUI()
23
+ this.initload()
24
+ }
25
+ /**3D瓦片系统 */
26
+ private tileset: Tileset = new Tileset(this);
27
+ /**船舶系统 */
28
+ private ships: Ships = new Ships(this)
29
+ /**地图系统 */
30
+ private maps: Maps = new Maps(this)
31
+ /**保护区+警戒区 */
32
+ private areas: Areas = new Areas(this)
33
+ /**一些实体 */
34
+ private entity: ObjectEntities = new ObjectEntities(this)
35
+ /** */
36
+ private measure: CDKMeasure = new CDKMeasure(this)
37
+ /**广告牌集合 */
38
+ private billboards: Billboards = new Billboards(this)
39
+
40
+ /** */
41
+ public openMeasure() {
42
+ this.measure.cdkOpenMeasure()
43
+ }
44
+ /**添加船舶 */
45
+ public onAddShips(ships: CesiumShipInfo[]) {
46
+ this.ships.onAddShips(ships)
47
+ }
48
+
49
+ public addBouys(allIcons: BillboardInfo[]) {
50
+ const { billboards } = this;
51
+ // const texture = textureLoadRGBE(RESOURCES.ICONS);
52
+ allIcons.forEach((e, index) => {
53
+ // const { type } = e;
54
+ let { positions, positions: [lng, lat, height], type } = e;
55
+ if (!lat || !lng) return;
56
+ e.id = e.id || uc_getUUID();
57
+ if (type === 'ship') {
58
+ this.cprimitives.addPrimitiveImages([e as any])
59
+ return
60
+ } else if (['bridge', 'vhf', 'radar'].includes(type)) {
61
+ billboards.addBillboard({
62
+ //根据距离缩放
63
+ id: e.id,
64
+ position: uc_getCartesian3(positions),
65
+ image:
66
+ type === 'bridge' ? RESOURCES.MAP_BRIDGE :
67
+ type === 'radar' ? RESOURCES.MAP_RADAR :
68
+ type === 'vhf' ? RESOURCES.MAP_VHF : '',
69
+ width: 10,
70
+ height: 10,
71
+ scaleByDistance: new NearFarScalar(2000, 1.0, 35000, 0.3),
72
+ verticalOrigin: VerticalOrigin.BOTTOM,
73
+ /**一公里内关闭深度检测(不被3DTiles遮挡) */
74
+ // disableDepthTestDistance: 1000,
75
+ }, true);
76
+ } else {
77
+ const [x, y] = e.subRegion;
78
+ billboards.addBillboard({
79
+ //根据距离缩放
80
+ id: e.id,
81
+ position: uc_getCartesian3(positions),
82
+ image: RESOURCES.ICONS,
83
+ width: 10,
84
+ height: 10,
85
+ scaleByDistance: new NearFarScalar(2000, 1.0, 35000, 0.3),
86
+ verticalOrigin: VerticalOrigin.BOTTOM,
87
+ imageSubRegion: new BoundingRectangle(x * 33, 512 - (y * 33 + 32), 32, 32)
88
+ /**一公里内关闭深度检测(不被3DTiles遮挡) */
89
+ // disableDepthTestDistance: 1000,
90
+ }, true);
91
+ }
92
+ })
93
+ }
94
+ /**添加风电场区域 */
95
+ public onAddWindArea() {
96
+ /**风机位置 */
97
+ function a() {
98
+ // A1:起点坐标 A2:终点坐标 A3:起点平行坐标
99
+ const r = [], A1 = [117.95657483, 38.85955843, 0], A2 = [117.93330276, 38.82583246, 0], A3 = [117.99261508, 38.84421572, 0], N = 5, R = 5;
100
+ const d1 = (A1[0] - A2[0]) / N
101
+ const d2 = (A1[1] - A2[1]) / N
102
+ for (let i = 0; i <= N; i++) {
103
+ const lng = A1[0] - d1 * i;
104
+ const lat = A1[1] - d2 * i;
105
+ const d3 = (A1[0] - A3[0]) / R
106
+ const d4 = (A1[1] - A3[1]) / R
107
+ for (let j = 0; j <= R; j++) {
108
+ const lngR = lng - d3 * j;
109
+ const latR = lat - d4 * j;
110
+ r.push([lngR, latR, 0])
111
+ }
112
+ }
113
+ return r
114
+ }
115
+ const positions = a();
116
+ /**保护区范围 */
117
+ const warningArea: LnglatHeight[] = [[117.95657483, 38.85955843, 0], [117.93330276, 38.82583246, 0], [117.96934301, 38.81048975, 0], [117.99261508, 38.84421572, 0]]
118
+ this.areas.onAddWarningArea(warningArea)
119
+ this.entity.onAddWindModel(positions)
120
+ }
121
+ /**初始化加载 */
122
+ private initload() {
123
+ this.clock.currentTime = JulianDate.fromIso8601('2025-10-01T05:00:00Z');
124
+
125
+ this.addMapAndMask();
126
+ this.addBillboardBYD();
127
+ this.openCDK();
128
+ this.addTilesets();
129
+ // this.scene.postProcessStages.add(new PostProcessSnow())
130
+ }
131
+ /**添加白洋淀指示标 */
132
+ private addBillboardBYD() {
133
+ const { billboards } = this;
134
+ billboards.addBillboard({
135
+ id: 'BYD_billboard',
136
+ verticalOrigin: VerticalOrigin.BOTTOM,
137
+ position: uc_getCartesian3([116.02425313, 38.89839672, 1000]),
138
+ image: RESOURCES.BYD_BILLBOARDS,
139
+ width: 164,
140
+ height: 92,
141
+ distanceDisplayCondition: new DistanceDisplayCondition(35000, undefined)
142
+ }, true)
143
+ billboards.addBillboard({
144
+ id: 'BYH_billboard',
145
+ verticalOrigin: VerticalOrigin.BOTTOM,
146
+ position: uc_getCartesian3([116.93354674, 39.74769688, 1000]),
147
+ image: RESOURCES.BYH_BILLBOARD,
148
+ width: 164,
149
+ height: 92,
150
+ distanceDisplayCondition: new DistanceDisplayCondition(35000, undefined)
151
+ }, true)
152
+ billboards.addBillboard({
153
+ id: 'CZD_billboard',
154
+ verticalOrigin: VerticalOrigin.BOTTOM,
155
+ position: uc_getCartesian3([116.84866703, 38.30386732, 1000]),
156
+ image: RESOURCES.CZD_BILLBOARD,
157
+ width: 164,
158
+ height: 92,
159
+ distanceDisplayCondition: new DistanceDisplayCondition(35000, undefined)
160
+ }, true)
161
+ }
162
+ /**添加地图和区域遮罩 */
163
+ private async addMapAndMask() {
164
+ this.maps.addMap('Tianditu_Satellite');
165
+ this.maps.addMap('Tianditu_Satellite_Annotion')
166
+ await this.cdata.loadJson(RESOURCES.GEOJSON_HEBEI)
167
+ const singleTileLayer = ImageryLayer.fromProviderAsync(
168
+ SingleTileImageryProvider.fromUrl(RESOURCES.MAP_BG, {
169
+ rectangle: Rectangle.fromDegrees(-180.0, -90.0, 180.0, 90.0),
170
+ }),
171
+ );
172
+ singleTileLayer['lightingAtmosphere'] = false
173
+ this.scene.imageryLayers.add(singleTileLayer);
174
+ }
175
+ /**开启cdk插件包 */
176
+ private openCDK() {
177
+ const cdk = new SLCesiumCDK(this)
178
+ cdk.onAddCompass();
179
+ cdk.onAddMouseLnglatScale();
180
+ }
181
+ /** */
182
+ private addTilesets() {
183
+ this.tileset.addTilesets();
184
+ return
185
+ var provider = new WebMapServiceImageryProvider({
186
+ url: `http://183.63.55.74:8001/geoserver/wms`,
187
+ layers: "baiyangdian:standard",
188
+ credit: "demo",
189
+ parameters: {
190
+ service: 'WMS',
191
+ request: 'GetMap',
192
+ layers: 'baiyangdian:standard',
193
+ styles: '',
194
+ format: 'image/png',
195
+ transparent: 'true',
196
+ version: '1.1.1',
197
+ tiled: 'true',
198
+ width: '256',
199
+ height: '256',
200
+ },
201
+ })
202
+ // this.clayers.addImageryProvider(provider)
203
+ }
204
+ /** */
205
+ private openGUI() {
206
+ const { gui, camera } = this;
207
+ gui.on(camera, '相机', [
208
+ { param: 'heading', name: '相机heading', ifNums: [-1.8, 1.8, 0.0001], listen: true, change: (e) => { console.log('相机方向X', e) } },
209
+ { param: 'pitch', name: '相机pitch', ifNums: [-1.8, 1.8, 0.0001], listen: true, change: (e) => { console.log('相机方向Y', e) } },
210
+ ])
211
+ }
212
+ }
@@ -0,0 +1,32 @@
1
+ import { Cartesian3, ConstantProperty, Entity, HeadingPitchRoll, Matrix4, Quaternion, Transforms } from "cesium";
2
+ import { SLCViewer } from "../../core";
3
+ import { EntityImage } from "../../entities";
4
+ import { PrimitiveImage2D } from "../../primitives";
5
+ import { SceneTJG } from "./scene-tjg";
6
+
7
+ /**所有船舶管理 */
8
+ export class Ships {
9
+ constructor(cviewer: SceneTJG) {
10
+ this.cviewer = cviewer
11
+ }
12
+ private cviewer: SceneTJG;
13
+ /**添加船舶 */
14
+ public onAddShips(ships: CesiumShipInfo[]) {
15
+ const { entities, ccamera, cprimitives, viewer, } = this.cviewer, pships: any[] = [];
16
+ ships.forEach(ship => {
17
+ const { lnglat, length = 125, width = 30, id, url } = ship;
18
+ const entity = entities.add(new EntityImage({
19
+ id,
20
+ url: url,
21
+ lnglat: lnglat,
22
+ sizeX: width,
23
+ sizeY: length,
24
+ camera: ccamera,
25
+ rotate: Math.random() * 360
26
+ }))
27
+ pships.push({ lng: lnglat[0], lat: lnglat[1], size: Math.random() * 5000 + 5000, rotation: Math.random() * 360 })
28
+ })
29
+ const primitive = new PrimitiveImage2D('/Assets/images/icon_small_type_EA.png', pships)
30
+ cprimitives.add(primitive)
31
+ }
32
+ }
@@ -0,0 +1,144 @@
1
+ import { Cartesian3, Cesium3DTileStyle, Cesium3DTileset, CesiumTerrainProvider, ClippingPolygon, ClippingPolygonCollection, Credit, ImageryLayer, Matrix4, Rectangle, SplitDirection, Terrain, WebMapServiceImageryProvider } from "cesium";
2
+ import { SceneTJG } from "./scene-tjg";
3
+ import { TileCustomShader } from "../../shaders";
4
+ import { uc_getCartesian3 } from "../../utils";
5
+
6
+ export class Tileset {
7
+ constructor(scene: SceneTJG) {
8
+ this.scene = scene;
9
+ }
10
+ private scene: SceneTJG;
11
+ /**当前瓦片序号 */
12
+ private i: number = 0;
13
+ /**瓦片集合 */
14
+ private tilesets: Cesium3DTileset[] = [];
15
+ /**网片路径名称 */
16
+ // private names = ['01潘家口水库', '02迁西县潘家口-大黑汀水库通航水域', '03北运河廊坊段', '04涞源湖', '05-1易水湖旺龙湖', '05-2易水湖旺龙湖', '06-1白洋淀', '06-2白洋淀', '06-3白洋淀', '06-4白洋淀', '07-南运河沧州段', '08-1衡水湖', '08-2衡水湖', '08-3衡水湖', '08-4衡水湖', '08-5衡水湖', '09-武安市京娘湖', '10-1磁县东武仕水库', '10-2磁县东武仕水库', '10-3磁县东武仕水库', '11-滏阳河磁县段', '12-滏阳河邯郸段']
17
+ private names = ['06-1白洋淀', '06-2白洋淀', '06-3白洋淀', '06-4白洋淀', '07-南运河沧州段',]
18
+ /**加载瓦片和地形文件 */
19
+ public async addTilesets() {
20
+ const { scene: { primitives, viewer } } = this
21
+ const tilesets = this.tilesets = await Promise.all(this.names.map(e => Cesium3DTileset.fromUrl(`http://183.63.55.74:5000/3DTiles/${e}/tileset.json`, {
22
+ // 降低误差,优先加载高分辨率瓦片
23
+ maximumScreenSpaceError: 16,
24
+ show: true,
25
+ // 优化裁剪,提升性能
26
+ cullWithChildrenBounds: true,
27
+ })))
28
+ tilesets.forEach(tileset => {
29
+ primitives.add(tileset);
30
+ //tileset.splitDirection = SplitDirection.LEFT;
31
+ })
32
+ viewer.terrainProvider = await CesiumTerrainProvider.fromUrl(`http://183.63.55.74:5000/terrains/ASTGTMV003`, { requestVertexNormals: true })
33
+ this.addClippingPolygons()
34
+ this.onAddImageryLayerToTile()
35
+ }
36
+ /**添加瓦片切除区域
37
+ * @example https://sandcastle.cesium.com/?id=aec-clipping
38
+ */
39
+ public addClippingPolygons() {
40
+ return;
41
+ const positions = [
42
+ [115.98725, 38.92652738, 0], [115.9875936, 38.9255246, 0], [115.98831278, 38.925426, 0], [115.98896601, 38.92529395, 0], [115.98980299, 38.92517716, 0], [115.99062273, 38.92516725, 0], [115.99126234, 38.92508052, 0], [115.99243472, 38.92516885, 0], [115.99292552, 38.9254267, 0], [115.99353778, 38.92556671, 0], [115.99340207, 38.92608534, 0], [115.99275908, 38.92600661, 0], [115.9921613, 38.92613862, 0], [115.99217202, 38.92631707, 0], [115.99265479, 38.9263993, 0], [115.99306894, 38.92663128, 0], [115.99329111, 38.92680885, 0], [115.99284393, 38.92707261, 0], [115.99224844, 38.92678732, 0], [115.99141597, 38.92652901, 0], [115.99066024, 38.92631385, 0], [115.98982908, 38.92619403, 0], [115.98885187, 38.92620566, 0], [115.98810931, 38.92634913, 0], [115.98753164, 38.92650735, 0], [115.98681596, 38.92653805, 0], [115.98660151, 38.92652897, 0], [115.98677457, 38.92564955, 0]
43
+ ].map((e: LnglatHeight) => uc_getCartesian3(e));
44
+ const clippingPolygons = new ClippingPolygonCollection({
45
+ polygons: [
46
+ new ClippingPolygon({
47
+ positions: positions,
48
+ }),
49
+ ],
50
+ });
51
+ const tileset = this.getTileset(1);
52
+ tileset.clippingPolygons = clippingPolygons;
53
+ }
54
+ /**在瓦片上叠加图层 */
55
+ public async onAddImageryLayerToTile() {
56
+ var provider = new WebMapServiceImageryProvider({
57
+ url: `http://183.63.55.74:8001/geoserver/wms`,
58
+ layers: "depare_depth",
59
+ credit: "demo",
60
+ rectangle:Rectangle.fromDegrees(115.80, 38.7, 116.2, 39.0),
61
+ parameters: {
62
+ service: 'WMS',
63
+ request: 'GetMap',
64
+ layers: 'depare_depth',
65
+ styles: '',
66
+ format: 'image/png',
67
+ transparent: 'true',
68
+ version: '1.1.1',
69
+ tiled: 'true',
70
+ width: '256',
71
+ height: '256',
72
+ },
73
+ })
74
+ const imageryLayers = this.scene.clayers.addImageryProvider(provider);
75
+ this.tilesets.forEach(tileset => tileset.imageryLayers.add(imageryLayers))
76
+ }
77
+
78
+ private getTileset(id: number | string) {
79
+ const { tilesets } = this;
80
+ const i = typeof id === 'number' ? id : this.names.findIndex(e => e == id);
81
+ if (tilesets.length === 0) {
82
+ console.warn('没有瓦片数据');
83
+ return;
84
+ }
85
+ if (i < 0 || i >= tilesets.length) {
86
+ console.warn('瓦片序号越界');
87
+ return;
88
+ }
89
+ return tilesets[i];
90
+ }
91
+
92
+ /**跳转切换到下一序号的瓦片 */
93
+ public onTo3Dtiles(num: -1 | 1): string {
94
+ this.i = this.i + num;
95
+ let i = Math.abs(this.i);
96
+ this.scene.viewer.zoomTo(this.tilesets[i % this.tilesets.length]);
97
+ return this.names[i]
98
+ }
99
+ /**用于调整位置的空间坐标 */
100
+ private cartesian3Pos: Cartesian3 = new Cartesian3();
101
+ /**调整部分瓦片的高度 */
102
+ private changePos(tileset: Cesium3DTileset, id: string) {
103
+ const translation = this.cartesian3Pos;
104
+ Cartesian3.normalize(tileset.boundingSphere.center, translation)
105
+ tileset.modelMatrix = Matrix4.fromTranslation(Cartesian3.multiplyByScalar(translation, 1, translation))
106
+ }
107
+ private setTilesetsStyle(tilesets: Cesium3DTileset) {
108
+ /**建筑样式条件 */
109
+ tilesets.style = new Cesium3DTileStyle({
110
+ color: {
111
+ conditions: [
112
+ ["${Height} !== undefined && ${Height} < 5", "color('#f5fd2d')"],
113
+ [
114
+ "${Height} !== undefined && ${Height} >= 5 && ${Height} < 10",
115
+ "color('#d3a34a')",
116
+ ],
117
+ [
118
+ "${Height} !== undefined && ${Height} >= 10 && ${Height} < 15",
119
+ "color('#947e75')",
120
+ ],
121
+ [
122
+ "${Height} !== undefined && ${Height} >= 15 && ${Height} < 20",
123
+ "color('#565a9f')",
124
+ ],
125
+ ["${Height} !== undefined && ${Height} > 20", "color('#223bc3')"],
126
+ ["${name} === 'OCEAN'", "color('#436d9d')"],
127
+ ["${name} === 'LAKE'", "color('#3987c9')"],
128
+ ["${name} === 'CALCAREOUS'", "color('#BBB6B1')"],
129
+ ["${name} === 'GRASS'", "color('#567d46')"],
130
+ ["${name} === 'FOREST'", "color('green')"],
131
+ ["${name} === 'CITY'", "color('lightgray')"],
132
+ ["${name} === 'ASPHALTROAD'", "color('#434343')"],
133
+ ["${name} === 'ASPHALT'", "color('#463d39')"],
134
+ ["${name} === 'CONCRETE'", "color('#b9b4ab')"],
135
+ ["${name} === 'DRYGROUND'", "color('#9B7653')"],
136
+ ["${name} === 'WETGROUND'", "color('#5a4332')"],
137
+ ["${name} === 'SAND'", "color('gold')"],
138
+ ["true", "color('white')"],
139
+ ],
140
+ },
141
+ });
142
+ tilesets.customShader = new TileCustomShader()
143
+ }
144
+ }
@@ -0,0 +1,14 @@
1
+ /**船舶信息 */
2
+ interface CesiumShipInfo {
3
+ id: string;
4
+ /**图片地址 */
5
+ url: string;
6
+ /**船舶所在经纬度 */
7
+ lnglat: [number, number, number?];
8
+ /**船舶长 */
9
+ length: number;
10
+ /**船舶宽 */
11
+ width: number;
12
+ /**船向 */
13
+ rotate: number
14
+ }
@@ -0,0 +1,47 @@
1
+ import { Cartesian4, Color, PostProcessStage } from "cesium";
2
+
3
+ const fragmentShaderSource = `
4
+ float getDistance(sampler2D depthTexture, vec2 texCoords)
5
+ {
6
+ float depth = czm_unpackDepth(texture(depthTexture, texCoords));
7
+ if (depth == 0.0) {
8
+ return czm_infinity;
9
+ }
10
+ vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);
11
+ return -eyeCoordinate.z / eyeCoordinate.w;
12
+ }
13
+ float interpolateByDistance(vec4 nearFarScalar, float distance)
14
+ {
15
+ float startDistance = nearFarScalar.x;
16
+ float startValue = nearFarScalar.y;
17
+ float endDistance = nearFarScalar.z;
18
+ float endValue = nearFarScalar.w;
19
+ float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
20
+ return mix(startValue, endValue, t);
21
+ }
22
+ vec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)
23
+ {
24
+ return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);
25
+ }
26
+ uniform sampler2D colorTexture;
27
+ uniform sampler2D depthTexture;
28
+ uniform vec4 fogByDistance;
29
+ uniform vec4 fogColor;
30
+ in vec2 v_textureCoordinates;
31
+ void main(void)
32
+ {
33
+ float distance = getDistance(depthTexture, v_textureCoordinates);
34
+ vec4 sceneColor = texture(colorTexture, v_textureCoordinates);
35
+ float blendAmount = interpolateByDistance(fogByDistance, distance);
36
+ vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);
37
+ out_FragColor = alphaBlend(finalFogColor, sceneColor);
38
+ }
39
+ `;
40
+ /**雾效 */
41
+ export const Fog = new PostProcessStage({
42
+ fragmentShader: fragmentShaderSource,
43
+ uniforms: {
44
+ fogByDistance: new Cartesian4(300, 0.0, 3000, 1.0),
45
+ fogColor: Color.WHITE
46
+ }
47
+ })
@@ -0,0 +1,4 @@
1
+ export * from './measure';
2
+ export * from './plot';
3
+ export * from './source';
4
+ export * from './fog'
@@ -0,0 +1,108 @@
1
+ import { AssociativeArray, CallbackProperty, Cartesian2, Cartesian3, Color, Entity, EntityCollection, ScreenSpaceEventHandler, createGuid, Math as CMath, CustomDataSource, PolylineDashMaterialProperty } from "cesium";
2
+ import { SLCViewer } from "../../core/viewer";
3
+ import { uc_getCartesian3, uc_getDistanceAndUnits } from "../../utils";
4
+ import { COLOR_CONST_LINE } from "../../const";
5
+ import { EntityLabel, EntityPoint, EntityPolyline } from "../../entities";
6
+ /**组件开发工具包--测量 */
7
+ export class CDKMeasure {
8
+ constructor(viewer: SLCViewer) {
9
+ this.viewer = viewer
10
+ }
11
+ private viewer: SLCViewer;
12
+ /**测量的所有实体集合 */
13
+ private measurs: AssociativeArray = new AssociativeArray();
14
+ /**本次测量的id */
15
+ private measurId?: string;
16
+ /**本次测量的所有实体 */
17
+ private dataSource?: CustomDataSource;
18
+ /**本次的线条实体 */
19
+ private line?: EntityPolyline;
20
+ /**鼠标移动label提示 */
21
+ private moveLable: EntityLabel = new EntityLabel();
22
+ /**鼠标移动的点 */
23
+ private movePoint: EntityPoint = new EntityPoint({ ifChange: true });
24
+ /**虚线 */
25
+ private dashLine: EntityPolyline = new EntityPolyline({
26
+ ifChange: true,
27
+ material: new PolylineDashMaterialProperty({
28
+ color: COLOR_CONST_LINE, // 线的颜色
29
+ dashLength: 16.0, // 每个虚线的长度
30
+ dashPattern: parseInt('1100110011001100', 2) // 虚线模式,二进制表示
31
+ })
32
+ })
33
+ /**点击后是否移动过 */
34
+ private flagMove: boolean = false;
35
+ /**开发组件开启测量 */
36
+ public cdkOpenMeasure() {
37
+ console.log(this.viewer.entities.id, this.viewer.dataSources)
38
+ this.measurId = createGuid();
39
+ this.dataSource = new CustomDataSource();
40
+ const { dataSources, centities } = this.viewer, { measurId, dataSource, measurs, movePoint, moveLable, dashLine } = this;
41
+ measurs.set(measurId, dataSource);
42
+ dataSources.add(dataSource);
43
+ this.cdkCloseMeasure();
44
+ centities.add(movePoint);
45
+ centities.add(moveLable);
46
+ centities.add(dashLine);
47
+ this.addEventListener();
48
+ }
49
+ /**开发组件关闭测量*/
50
+ public cdkCloseMeasure() {
51
+ const { dataSources, centities, cevent, id } = this.viewer, { movePoint, moveLable, dashLine } = this;
52
+ this.line = undefined;
53
+ centities.remove(movePoint);
54
+ centities.remove(moveLable);
55
+ centities.remove(dashLine);
56
+ cevent.off(`.${id}`);
57
+ }
58
+ /**添加事件 */
59
+ private addEventListener() {
60
+ const { cevent, id } = this.viewer, points = [];
61
+ cevent.on(`MOUSE_MOVE.${id}`, (e: ScreenSpaceEventHandler.MotionEvent) => {
62
+ this.onMouseMove(points)
63
+ });
64
+ cevent.on(`LEFT_DOWN.${id}`, (e: ScreenSpaceEventHandler.PositionedEvent) => {
65
+ this.onLeftClick(points);
66
+ });
67
+ cevent.on(`LEFT_DOUBLE_CLICK.${id}`, (e: ScreenSpaceEventHandler.PositionedEvent) => {
68
+ this.onLeftDoubleClick()
69
+ });
70
+ }
71
+ /**鼠标移动 */
72
+ private onMouseMove(points: Cartesian3[]) {
73
+ const { position } = this.viewer, { movePoint, moveLable, dashLine } = this, point = points[points.length - 1];
74
+ this.flagMove = true
75
+ movePoint.cdkSetPosition(position)
76
+ /**没有第一个点,不用画虚线 */
77
+ if (!point) {
78
+ moveLable.cdkSetLabelText('起点');
79
+ moveLable.cdkSetLabelPosition(position);
80
+ return
81
+ } else {
82
+ let { distance, units } = uc_getDistanceAndUnits(position, point);
83
+ moveLable.cdkSetLabelText(`${distance}${units}`);
84
+ moveLable.cdkSetLabelPosition(position);
85
+ dashLine.cdkSetPositions([point, position])
86
+ };
87
+ }
88
+ /**鼠标点击 */
89
+ private onLeftClick(points: Cartesian3[]) {
90
+ const { centities, position } = this.viewer, { flagMove, line, moveLable, dataSource: { entities } } = this;
91
+ if (!flagMove) return;
92
+ this.flagMove = false;
93
+ points.push(position.clone())
94
+ /**点 */
95
+ entities.add(new EntityPoint({ position: position }))
96
+ /**本次测量的线 */
97
+ if (!line) this.line = entities.add(new EntityPolyline({ positions: points, ifChange: true })) as EntityPolyline
98
+ /**提示语 */
99
+ entities.add(moveLable);
100
+ centities.remove(moveLable);
101
+ this.moveLable = new EntityLabel()
102
+ centities.add(this.moveLable)
103
+ }
104
+ /**鼠标双击 */
105
+ private onLeftDoubleClick() {
106
+ this.cdkCloseMeasure();
107
+ }
108
+ }