@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,48 @@
1
+ import { CallbackProperty, Cartesian2, Cartesian3, Color, DeveloperError, DistanceDisplayCondition, Entity, HeightReference, NearFarScalar, PointGraphics, PositionProperty, Property } from "cesium";
2
+ import { uc_getCartesian3, uc_tsIfCartesian3, uc_tsIfLnglatHeight } from "../utils";
3
+ import { COLOR_CONST_FILL, COLOR_CONST_OUTLINE } from "../const";
4
+
5
+ const DEFAULT_POINT_OPT: OptEntityPoint = {
6
+ ifChange: false,
7
+ pixelSize: 5,
8
+ color: Color.WHITE.withAlpha(0.7),
9
+ outlineColor: COLOR_CONST_OUTLINE,
10
+ outlineWidth: 1,
11
+ }
12
+ /**实体点 */
13
+ export class EntityPoint extends Entity {
14
+ constructor(opt?: OptEntityPoint) {
15
+ const { position, ifChange, id, show, pixelSize, heightReference, color, outlineColor, outlineWidth, scaleByDistance, translucencyByDistance, distanceDisplayCondition, disableDepthTestDistance } = Object.assign({}, DEFAULT_POINT_OPT, opt);
16
+ let c3;
17
+ if (ifChange) {
18
+ c3 = new CallbackProperty(() => { return this.cdkPosition }, false);
19
+ } else if (position instanceof PositionProperty) {
20
+ c3 = position
21
+ } else {
22
+ c3 = position
23
+ }
24
+ super({
25
+ id,
26
+ position: c3,
27
+ point: {
28
+ show, pixelSize, heightReference, color, outlineColor, outlineWidth, scaleByDistance, translucencyByDistance, distanceDisplayCondition, disableDepthTestDistance
29
+ }
30
+ })
31
+ if (ifChange && uc_tsIfCartesian3(position)) {
32
+ this.cdkPosition = position;
33
+ }
34
+ this.cdkIfChange = ifChange;
35
+ }
36
+
37
+ private cdkIfChange: boolean = false;
38
+ /**点的位置 */
39
+ private cdkPosition: Cartesian3 = new Cartesian3(0, 0, 0);
40
+ /**重设位置 */
41
+ public cdkSetPosition(point: Cartesian3) {
42
+ if (!this.cdkIfChange) {
43
+ throw new DeveloperError(`非动态变化点,不允许再次设置点位.`);
44
+ };
45
+ this.cdkPosition = point
46
+ }
47
+
48
+ }
@@ -0,0 +1,59 @@
1
+ import { ArcType, CallbackProperty, Cartesian3, ClassificationType, Color, ConstantPositionProperty, ConstantProperty, DeveloperError, DistanceDisplayCondition, EllipseGraphics, Entity, HeightReference, MaterialProperty, PolygonGraphics, PolygonHierarchy, PositionProperty, Property, ShadowMode } from "cesium";
2
+ import { uc_tsIfLnglatHeightArray, uc_getCartesian3, uc_tsIfLnglatHeight, uc_tsIfCartesian3Array, uc_tsIfProperty, uc_tsIfCartesian3, uc_tsIfNumber } from "../utils";
3
+ import { COLOR_CONST_FILL, COLOR_CONST_OUTLINE, LNGLAT_CONST_SHENLAN } from "../const";
4
+ const DEFAULT_POLYGON_OPT: OptEntityPolygon = {
5
+ ifChange: false,
6
+ show: true,
7
+ material: COLOR_CONST_FILL,
8
+ height: 0,
9
+ outline: true,
10
+ outlineColor: COLOR_CONST_OUTLINE,
11
+ outlineWidth: 1,
12
+ fill: true,
13
+ }
14
+ /**实体多边形*/
15
+ export class EntityPolygon extends Entity {
16
+ constructor(opt: OptEntityPolygon) {
17
+ let { ifChange,
18
+ show, hierarchy, height, heightReference, extrudedHeight, extrudedHeightReference, stRotation, granularity, fill, material, outline, outlineColor, outlineWidth, perPositionHeight, closeTop, closeBottom, arcType, shadows, distanceDisplayCondition, classificationType, zIndex, textureCoordinates,
19
+ } = Object.assign({}, DEFAULT_POLYGON_OPT, opt);
20
+ let c3s;
21
+ if (ifChange) {
22
+ c3s = new CallbackProperty(() => { return this.hierarchy }, false);
23
+ } else {
24
+ c3s = hierarchy
25
+ }
26
+ super({
27
+ polygon: {
28
+ show, hierarchy: c3s, height, heightReference, extrudedHeight, extrudedHeightReference, stRotation, granularity, fill, material, outline, outlineColor, outlineWidth, perPositionHeight, closeTop, closeBottom, arcType, shadows, distanceDisplayCondition, classificationType, zIndex, textureCoordinates,
29
+ }
30
+ });
31
+ }
32
+ private cdkIfChange: boolean = true;
33
+ /**中心位置 */
34
+ private hierarchy: PolygonHierarchy = new PolygonHierarchy();
35
+ /**重设多边形 */
36
+ public cdkSetPositions(value: Cartesian3[]) {
37
+ if (!this.cdkIfChange) {
38
+ throw new DeveloperError(`非动态变化折线,不允许再次设置点位集合.`);
39
+ };
40
+ this.hierarchy.positions = value
41
+ }
42
+ /**添加多边形控制点 */
43
+ public cdkAddPoint(value: Cartesian3) {
44
+ if (!this.cdkIfChange) {
45
+ throw new DeveloperError(`非动态变化折线,不允许再次设置点位集合.`);
46
+ };
47
+ this.hierarchy.positions.push(value)
48
+ }
49
+ /**移除多边形控制点*/
50
+ public cdkRemovePoint(value: Cartesian3) {
51
+ if (!this.cdkIfChange) {
52
+ throw new DeveloperError(`非动态变化折线,不允许再次设置点位集合.`);
53
+ };
54
+ let index = this.hierarchy.positions.findIndex(e => e === value || (e.x == value.x && e.y == value.y && e.z == value.z))
55
+ this.hierarchy.positions.splice(index, 1);
56
+ }
57
+
58
+
59
+ }
@@ -0,0 +1,55 @@
1
+ import { ArcType, CallbackProperty, Cartesian3, ClassificationType, Color, ConstantProperty, DeveloperError, DistanceDisplayCondition, Entity, MaterialProperty, PolylineDashMaterialProperty, PolylineGraphics, PositionPropertyArray, Property, ShadowMode } from "cesium";
2
+ import { uc_tsIfCartesian3Array, uc_tsIfLnglatHeight, uc_tsIfLnglatHeightArray, uc_getCartesian3, uc_getDiffDegreesByDistance } from "../utils";
3
+ import { COLOR_CONST_FILL, COLOR_CONST_LINE, COLOR_CONST_OUTLINE } from "../const";
4
+ // 定义虚线材质
5
+ const dashedLineMaterial = new PolylineDashMaterialProperty({
6
+ color: Color.RED, // 线的颜色
7
+ dashLength: 16.0, // 每个虚线的长度
8
+ dashPattern: parseInt('1100110011001100', 2) // 虚线模式,二进制表示
9
+ });
10
+ const DEFAULT_POLYLINE_OPT: OptEntityPolyline = {
11
+ ifChange: false,
12
+ show: true,
13
+ width: 1,
14
+ material: COLOR_CONST_LINE,
15
+ }
16
+ /**实体折线 */
17
+ export class EntityPolyline extends Entity {
18
+ constructor(opt: OptEntityPolyline = {}) {
19
+ const { ifChange,
20
+ show, positions, width, granularity, material, depthFailMaterial, arcType, clampToGround, shadows, distanceDisplayCondition, classificationType, zIndex } = Object.assign({}, DEFAULT_POLYLINE_OPT, opt);
21
+ let c3s: Property | Cartesian3[] = []
22
+ if (ifChange) {
23
+ c3s = new CallbackProperty(() => { return this.cdkPoints }, false);
24
+ } else {
25
+ c3s = positions
26
+ }
27
+ super({
28
+ polyline: {
29
+ positions: c3s,
30
+ show, width, granularity, material, depthFailMaterial, arcType, clampToGround, shadows, distanceDisplayCondition, classificationType, zIndex
31
+ }
32
+ });
33
+ if (ifChange && Array.isArray(positions)) {
34
+ this.cdkPoints = positions
35
+ }
36
+ this.cdkIfChange = ifChange;
37
+ }
38
+ private cdkIfChange: boolean = false;
39
+ /**折线点位集合 (动态点不能是Property) */
40
+ private cdkPoints: Cartesian3[] = [];
41
+ /**添加点到折线 */
42
+ public cdkAddPoint(value: Cartesian3) {
43
+ if (!this.cdkIfChange) {
44
+ throw new DeveloperError(`非动态变化折线,不允许再次设置点位集合.`);
45
+ };
46
+ this.cdkPoints.push(value)
47
+ }
48
+ /**重设折线 */
49
+ public cdkSetPositions(value: Cartesian3[]) {
50
+ if (!this.cdkIfChange) {
51
+ throw new DeveloperError(`非动态变化折线,不允许再次设置点位集合.`);
52
+ };
53
+ this.cdkPoints = value;
54
+ }
55
+ }
@@ -0,0 +1,18 @@
1
+ import { Entity, Rectangle } from "cesium";
2
+ import { uc_getDiffDegreesByDistance } from "../utils";
3
+ import { PropertyMaterialRadar } from "../property";
4
+ /**实体雷达 */
5
+ export class EntityRadar extends Entity {
6
+ constructor(opt: OptEntityRadar) {
7
+ const { position: [lng, lat, height = 0], radius } = opt || {};
8
+ const { diffLat, diffLng } = uc_getDiffDegreesByDistance(lat, radius)
9
+ super({
10
+ rectangle: {
11
+ coordinates: Rectangle.fromDegrees(lng - diffLng, lat - diffLat, lng + diffLng, lat + diffLat,),
12
+ material: new PropertyMaterialRadar(),
13
+ height: height
14
+ }
15
+ })
16
+ }
17
+ }
18
+
@@ -0,0 +1,50 @@
1
+ import { ArcType, CallbackProperty, Cartesian3, ClassificationType, Color, ConstantPositionProperty, ConstantProperty, DeveloperError, DistanceDisplayCondition, EllipseGraphics, Entity, HeightReference, MaterialProperty, RectangleGraphics, PositionProperty, Property, ShadowMode, Rectangle, Cartographic } from "cesium";
2
+ import { uc_tsIfLnglatHeightArray, uc_getCartesian3, uc_tsIfLnglatHeight, uc_tsIfCartesian3Array, uc_tsIfProperty, uc_tsIfCartesian3, uc_tsIfNumber, CMath } from "../utils";
3
+ import { COLOR_CONST_FILL, COLOR_CONST_OUTLINE, LNGLAT_CONST_SHENLAN } from "../const";
4
+ const DEFAULT_POLYGON_OPT: OptEntityRectangle = {
5
+ ifChange: false,
6
+ show: true,
7
+ material: COLOR_CONST_FILL,
8
+ height: 0,
9
+ outline: true,
10
+ outlineColor: COLOR_CONST_OUTLINE,
11
+ outlineWidth: 2,
12
+ fill: true,
13
+ }
14
+ /**实体矩形 */
15
+ export class EntityRectangle extends Entity {
16
+ constructor(opt: OptEntityRectangle) {
17
+ let { ifChange,
18
+ show, coordinates, height, heightReference, extrudedHeight, extrudedHeightReference, rotation, stRotation, granularity, fill, material, outline, outlineColor, outlineWidth, shadows, distanceDisplayCondition, classificationType, zIndex,
19
+ } = Object.assign({}, DEFAULT_POLYGON_OPT, opt);
20
+ let c3;
21
+ if (ifChange) {
22
+ c3 = new CallbackProperty(() => { return this.coordinates }, false);
23
+ } else {
24
+ c3 = coordinates
25
+ }
26
+ super({
27
+ rectangle: {
28
+ show, coordinates: c3, height, heightReference, extrudedHeight, extrudedHeightReference, rotation, stRotation, granularity, fill, material, outline, outlineColor, outlineWidth, shadows, distanceDisplayCondition, classificationType, zIndex,
29
+ }
30
+ });
31
+ }
32
+ private cdkIfChange: boolean = true;
33
+ /**中心位置 */
34
+ private coordinates: Rectangle = new Rectangle();
35
+ /**重设矩形 */
36
+ public cdkSetCoordinates(s: LnglatHeight, e: LnglatHeight) {
37
+ if (!this.cdkIfChange) {
38
+ throw new DeveloperError(`非动态变化折线,不允许再次设置点位集合.`);
39
+ };
40
+ let [slng, slat, sheight] = s, [elng, elat, eheight] = e;
41
+ const north = slat > elat ? slat : elat;
42
+ const south = slat > elat ? elat : slat;
43
+ const east = slng > elng ? slng : elng;
44
+ const west = slng > elng ? elng : slng;
45
+ this.coordinates.east = CMath.toRadians(east);
46
+ this.coordinates.north = CMath.toRadians(north);
47
+ this.coordinates.west = CMath.toRadians(west);
48
+ this.coordinates.south = CMath.toRadians(south);
49
+ }
50
+ }
@@ -0,0 +1,22 @@
1
+ import { Cartesian3, Entity, Viewer } from "cesium";
2
+ import { uc_getCartesian3, uc_getDiffDegreesByDistance } from "../utils";
3
+ import { PropertyMaterialTrailing } from "../property";
4
+ /**实体线+拖尾效果 */
5
+ export class EntityTrailing extends Entity {
6
+ static material: PropertyMaterialTrailing
7
+ constructor(opt: OptEntityTrailing) {
8
+ const { positions = [] } = opt || {};
9
+ //拖尾效果材质
10
+ let material = EntityTrailing.material = EntityTrailing.material || new PropertyMaterialTrailing();
11
+ //设置结束位
12
+ let cartesian3s = positions.map(e => uc_getCartesian3(e));
13
+ super({
14
+ polyline: {
15
+ positions: cartesian3s,
16
+ width: 2,
17
+ material: material,
18
+ }
19
+ })
20
+ }
21
+
22
+ }
package/src/index.ts ADDED
@@ -0,0 +1,10 @@
1
+ /** Cesium 1.107.2 */
2
+ /**
3
+ * @如果主组件导入了 SLUCesiumInit 则所有使用到的方法都会被打包到main.js中
4
+ *
5
+ * @ export * from "./load/building"; === export { XXXXX } from "./load/building";
6
+ *
7
+ * @ export * as LoadBuilding from "./load/building";LoadBuilding未使用则不会被打包,但只要使用到LoadBuilding,其所有方法都会被打包
8
+ *
9
+ *
10
+ */
@@ -0,0 +1,107 @@
1
+ import { Color, Material, Scene } from "cesium";
2
+
3
+ /**插件---根据高程数据实现水深渐变插件
4
+ * @example https://sandcastle.cesium.com/?id=bathymetry
5
+ */
6
+ export class PluginBathymetry extends Material {
7
+ constructor(scene: Scene) {
8
+ super({
9
+ fabric: {
10
+ /**自定义材质标识 */
11
+ type: "ElevationColorContour",
12
+ materials: {
13
+ contourMaterial: {
14
+ type: "ElevationContour",
15
+ },
16
+ /**声明「高程渐变材质」,类型为 ElevationRamp(基于地形高程值的渐变着色,比如低海拔绿色、高海拔棕色) */
17
+ elevationRampMaterial: {
18
+ type: "ElevationRamp",
19
+ },
20
+ },
21
+ components: {
22
+ /**最终材质的漫反射颜色,复用 elevationRampMaterial 的漫反射结果(即高程渐变色) */
23
+ diffuse: "(1.0 - contourMaterial.alpha) * elevationRampMaterial.diffuse + contourMaterial.alpha * contourMaterial.diffuse",
24
+ alpha: "max(0.8, 0.8)",
25
+ },
26
+ },
27
+ /**全局禁用半透明(强制材质不透明渲染,避免陆地出现半透效果) */
28
+ translucent: false,
29
+ })
30
+ this.updateGlobeMaterial(scene)
31
+ }
32
+ /**配置的最高的高程 */
33
+ public readonly maxHeight: number = 20;
34
+ /**配置的最低的高程 */
35
+ public readonly minHeight: number = -10;
36
+ /**用于绘制渐变的canvas */
37
+ private canvas: HTMLCanvasElement | undefined;
38
+ /**显示高程等高线 */
39
+ public showContourLines: boolean = false;
40
+ /**显示高程渐变颜色图 */
41
+ public showElevationColorRamp: boolean = true;
42
+ /**高程垂直差缩放倍数( scene.verticalExaggeration 落差不能太大) */
43
+ private verticalExaggeration: number = 1;
44
+
45
+ public readonly countourLineSpacing: number = 1.0;
46
+ public readonly invertContourLines = true;
47
+ /**更新地球材质 */
48
+ private updateGlobeMaterial(scene: Scene) {
49
+ const { showContourLines, showElevationColorRamp, minHeight, maxHeight, countourLineSpacing, invertContourLines, verticalExaggeration } = this, { globe } = scene;
50
+ let material: Material = this;
51
+ if (showContourLines) {
52
+ if (showElevationColorRamp) {
53
+ let shadingUniforms = material.materials.elevationRampMaterial.uniforms;
54
+ shadingUniforms.image = this.createColorRamp();
55
+ shadingUniforms.minimumHeight = minHeight * verticalExaggeration;
56
+ shadingUniforms.maximumHeight = maxHeight * verticalExaggeration;
57
+ shadingUniforms = material.materials.contourMaterial.uniforms;
58
+ shadingUniforms.width = 1.0;
59
+ shadingUniforms.spacing = countourLineSpacing * verticalExaggeration;
60
+ shadingUniforms.color = invertContourLines ? Color.WHITE.withAlpha(0.5) : Color.BLACK.withAlpha(0.5);
61
+ globe.material = material;
62
+ return;
63
+ }
64
+ material = Material.fromType("ElevationContour");
65
+ const shadingUniforms = material.uniforms;
66
+ shadingUniforms.width = 1.0;
67
+ shadingUniforms.spacing = countourLineSpacing * verticalExaggeration;
68
+ shadingUniforms.color = invertContourLines ? Color.WHITE : Color.BLACK;
69
+ globe.material = material;
70
+ return;
71
+ }
72
+ if (showElevationColorRamp) {
73
+ material = Material.fromType("ElevationRamp");
74
+ const shadingUniforms = material.uniforms;
75
+ shadingUniforms.image = this.createColorRamp();
76
+ shadingUniforms.minimumHeight = minHeight * verticalExaggeration;
77
+ shadingUniforms.maximumHeight = maxHeight * verticalExaggeration;
78
+ globe.material = material;
79
+ return;
80
+ }
81
+ globe.material = material;
82
+ }
83
+ /**创建一个颜色渐变 */
84
+ private createColorRamp(): HTMLCanvasElement {
85
+ if (this.canvas) return this.canvas;
86
+ const canvas = this.canvas = document.createElement('canvas');
87
+ canvas.width = 100;
88
+ canvas.height = 15;
89
+ const ctx = canvas.getContext('2d');
90
+ const grd = ctx.createLinearGradient(0, 0, 100, 0);
91
+ grd.addColorStop(1.0, "#B79E6C");
92
+ grd.addColorStop(0.95, "#FBFFEE");
93
+ grd.addColorStop(0.9, "#F9FCCA");
94
+ grd.addColorStop(0.8, "#BDE7AD");
95
+ grd.addColorStop(0.7, "#81D2A3");
96
+ grd.addColorStop(0.6, "#5AB7A4");
97
+ grd.addColorStop(0.5, "#4C9AA0");
98
+ grd.addColorStop(0.4, "#437D9A");
99
+ grd.addColorStop(0.3, "#3E6194");
100
+ grd.addColorStop(0.2, "#424380");
101
+ grd.addColorStop(0.1, "#392D52");
102
+ grd.addColorStop(0.0, "#291C2F");
103
+ ctx.fillStyle = grd;
104
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
105
+ return canvas;
106
+ }
107
+ }
@@ -0,0 +1,146 @@
1
+ import { GlobeTranslucency, Globe, createElevationBandMaterial, Scene, Material, Math as CMath, Color } from "cesium";
2
+ import { uc_deepAssign } from "../utils";
3
+ /**默认配置 */
4
+ const DEFAULT_ELEVATIONOPT: PluginElevationOpt = {
5
+ heightStyles: [
6
+ [1000, [0.0, 1.0, 0.0, 0.5]],
7
+ [2000, [0.0, 0.0, 1.0, 0.5]],
8
+ [4000, [1.0, 0.0, 0.0, 0.5]]
9
+ ],
10
+ thickness: 100,
11
+ alpha: 0.2,
12
+ ifGradient: true,
13
+ grid: {
14
+ count: 50,
15
+ color: [1.0, 1.0, 0.0, 0.2],
16
+ width: 10,
17
+ heightAbove: 8800,
18
+ heightBelow: 0
19
+ }
20
+ }
21
+ /**插件---海拔类
22
+ * @example https://sandcastle.cesium.com/?id=elevation-band-material
23
+ */
24
+ export class PluginElevation {
25
+ constructor(scene: Scene, opt?: PluginElevationOpt) {
26
+ this.options = uc_deepAssign(DEFAULT_ELEVATIONOPT, opt);
27
+ this.scene = scene;
28
+ this.createLayers();
29
+ }
30
+ private scene: Scene;
31
+ private options: PluginElevationOpt;
32
+ /**本材质 */
33
+ private material: Material;
34
+ /**之前的材质 */
35
+ private materialPer: Material;
36
+ /**创建图层并记录原始材质 */
37
+ private createLayers() {
38
+ const { scene, options } = this, { alpha, thickness, grid, ifGradient, heightStyles } = options;
39
+ const layers = [];
40
+ /**背景渐变透明度 */
41
+ const backgroundTransparency = 0.9;
42
+ /**配置一个特定的渐变 */
43
+ const backgroundLayer = {
44
+ entries: [
45
+ {
46
+ height: 0.0,
47
+ color: new Color(0.0, 0.0, 0.2, backgroundTransparency),
48
+ },
49
+ {
50
+ height: 8000.0,
51
+ color: new Color(1.0, 1.0, 1.0, backgroundTransparency),
52
+ },
53
+ {
54
+ height: 8500.0,
55
+ color: new Color(1.0, 1.0, 0.0, backgroundTransparency),
56
+ },
57
+ ],
58
+ extendDownwards: true,
59
+ extendUpwards: true,
60
+ };
61
+ layers.push(backgroundLayer);
62
+ if (grid.count) {
63
+ /**分割条纹 */
64
+ const { count, color, width, heightBelow, heightAbove } = grid, [r, g, b, a] = color;
65
+ for (let i = 0; i < count; i++) {
66
+ const lerper = i / (count - 1);
67
+ const below = CMath.lerp(heightBelow, heightAbove, lerper);
68
+ const above = below + width;
69
+ const alpha = CMath.lerp(0.2, 0.4, lerper) * a;
70
+ layers.push({
71
+ entries: [
72
+ {
73
+ height: below,
74
+ color: new Color(r, g, b, alpha),
75
+ },
76
+ {
77
+ height: above,
78
+ color: new Color(r, g, b, alpha),
79
+ },
80
+ ],
81
+ });
82
+ }
83
+ }
84
+ /** */
85
+ if (ifGradient) {
86
+ const entries = [];
87
+ for (let i = 0, len = heightStyles.length; i < len; i++) {
88
+ const [height, [r, g, b, a = alpha]] = heightStyles[i];
89
+ if (i == 0) {
90
+ entries.push({
91
+ height: height - thickness * 0.5,
92
+ color: new Color(r, g, b, a),
93
+ })
94
+ } else if (i == len - 1) {
95
+ entries.push({
96
+ height: height + thickness * 0.5,
97
+ color: new Color(r, g, b, a),
98
+ })
99
+ } else {
100
+ entries.push({
101
+ height: height,
102
+ color: new Color(r, g, b, a),
103
+ })
104
+ }
105
+ }
106
+ layers.push({ entries });
107
+ } else {
108
+ const antialias = Math.min(10.0, thickness * 0.1);
109
+ for (let i = 0, len = heightStyles.length; i < len; i++) {
110
+ const [height, [r, g, b, a = alpha]] = heightStyles[i];
111
+ layers.push({
112
+ entries: [
113
+ {
114
+ height: height - thickness * 0.5 - antialias,
115
+ color: new Color(r, g, b, 0.0),
116
+ },
117
+ {
118
+ height: height - thickness * 0.5,
119
+ color: new Color(r, g, b, a),
120
+ },
121
+ {
122
+ height: height + thickness * 0.5,
123
+ color: new Color(r, g, b, a),
124
+ },
125
+ {
126
+ height: height + thickness * 0.5 + antialias,
127
+ color: new Color(r, g, b, 0.0),
128
+ },
129
+ ]
130
+ });
131
+ }
132
+ }
133
+ this.material = createElevationBandMaterial({ scene: scene, layers: layers, })
134
+ this.materialPer = this.scene.globe.material;
135
+ this.show();
136
+ }
137
+ /**添加到场景 */
138
+ public show() {
139
+ this.scene.globe.material = this.material;
140
+ }
141
+ /**隐藏 */
142
+ public hide() {
143
+ this.scene.globe.material = this.materialPer;
144
+ }
145
+
146
+ }
@@ -0,0 +1,3 @@
1
+ export * from './bathymetry'
2
+ export * from './elevation'
3
+ export * from './post-process-snow'
@@ -0,0 +1,99 @@
1
+ precision highp float;
2
+ //颜色纹理是渲染场景或上一阶段的输出结果
3
+ uniform sampler2D colorTexture;
4
+ //深度纹理是渲染场景的输出结果;
5
+ uniform sampler2D depthTexture;
6
+ //用于采样纹理(PostProcessStage内部会替换该句代码)
7
+ in vec2 v_textureCoordinates;
8
+
9
+ #define HASHSCALE1 .1031
10
+ #define HASHSCALE3 vec3(.1031, .1030, .0973)
11
+
12
+ float time;
13
+ float SIZE_RATE = 0.1;
14
+ // X轴的速度
15
+ float XSPEED = 0.2;
16
+ //雪花贴图
17
+ uniform sampler2D u_snowTexture;
18
+ //雨雪大小1-10
19
+ uniform float u_sl_size;
20
+ //雨雪密度(密度越大,雪也会越小)
21
+ uniform float u_sl_density;
22
+ // 雨雪层数
23
+ uniform float u_sl_layers;
24
+ // 雨雪层数
25
+ uniform float u_sl_speedY;
26
+
27
+ //传入图层layer
28
+ float Hash11(float p)
29
+ {
30
+ vec3 p3 = fract(vec3(p) * HASHSCALE1);
31
+ p3 += dot(p3, p3.yzx + 19.19);
32
+ return fract((p3.x + p3.y) * p3.z);
33
+ }
34
+
35
+ vec2 Hash22(vec2 p)
36
+ {
37
+ vec3 p3 = fract(vec3(p.xyx) * HASHSCALE3);
38
+ p3 += dot(p3, p3.yzx+19.19);
39
+ return fract((p3.xx+p3.yz)*p3.zy);
40
+ }
41
+ // 旋转UV坐标的函数
42
+ vec2 rotateUV(vec2 uv, float angle) {
43
+ float s = sin(angle);
44
+ float c = cos(angle);
45
+ mat2 rot = mat2(c, -s, s, c);
46
+ return rot * uv;
47
+ }
48
+ // 或者使用更简单的2D旋转
49
+ vec2 rotate(vec2 uv, float angle, vec2 center) {
50
+ uv -= center;
51
+ float s = sin(angle);
52
+ float c = cos(angle);
53
+ mat2 m = mat2(c, -s, s, c);
54
+ return m * uv + center;
55
+ }
56
+ // 雪景单层绘制
57
+ vec4 SnowSingleLayer(vec2 uv,float layer){
58
+ // 1. 保持原有坐标变换
59
+ uv = uv * (5.0 + layer) * u_sl_density;
60
+ float xOffset = uv.y * ( ( ( Hash11(layer) * 2. - 1.) * 0.5 + 1. ) * XSPEED );
61
+ float yOffset = ( u_sl_speedY * time );
62
+ uv += vec2( xOffset , yOffset );
63
+ vec2 rgrid = Hash22(floor(uv) + (31.1759 * layer));
64
+ vec2 center = fract(uv);
65
+ center -= (rgrid * 2. - 1.0) * 0.35;
66
+ center -= 0.5;
67
+ float dist = length(center);
68
+ // 计算雪花的大小(半径),其中基础大小为0.08,同时随着时间正弦变化,变化幅度为0.2倍,变化频率由SIZE_RATE控制
69
+ float size = 0.05 * (1.0 + 0.2 * sin(time * SIZE_RATE)) * u_sl_size;
70
+ // 2. 使用原有的圆形遮罩
71
+ float circleMask = 1.0 - smoothstep(size * 0.7, size, dist);
72
+ // 3. 纹理坐标映射
73
+ vec2 texCoord = (center / (size * 2.0)) + 0.5;
74
+ // 可选:添加随机旋转
75
+ float rotation = rgrid.y * 6.283; // 0-2π
76
+ texCoord = rotateUV(texCoord - 0.5, rotation) + 0.5;
77
+ // 4. 采样纹理并应用遮罩
78
+ vec4 texColor = texture(u_snowTexture, texCoord);
79
+ texColor.a = texColor.a * circleMask;
80
+ // vec4 col = fract( vec4(start.x,start.y,.0,0.99) );
81
+ return texColor;
82
+ }
83
+
84
+ void main()
85
+ {
86
+ time = czm_frameNumber / 120.0;
87
+ // time = 1. / 120.0;
88
+ // 将像素坐标归一化到[0,1]范围
89
+ vec2 uv = gl_FragCoord.xy / czm_viewport.zw;
90
+ // 矩形化使XY方向的每像素变化值一致
91
+ uv *= vec2( czm_viewport.z/czm_viewport.w , 1.0 );
92
+ // 初始色彩值
93
+ vec4 acc = vec4(0,0,0,0);
94
+ for (float i=0. ; i < u_sl_layers ; i++) {
95
+ acc += SnowSingleLayer(uv,i);
96
+ }
97
+ //混合比例
98
+ out_FragColor = mix( texture(colorTexture, v_textureCoordinates) , acc , acc.a * 0.8);
99
+ }
@@ -0,0 +1,45 @@
1
+ import { Cartesian2, Color, PixelFormat, PostProcessStage, PostProcessStageSampleMode } from "cesium";
2
+ import PostProcessSnowFS from './post-process-snow.glsl'
3
+ import PostProcessThunderFS from './thunder.glsl'
4
+ import { RESOURCES } from "../Assets/resource";
5
+ /**后处理管线---雪花、雨点 */
6
+ export class PostProcessSnow extends PostProcessStage {
7
+ constructor() {
8
+ super({
9
+ /**此后处理阶段的唯一名称,供组合中的其他阶段引用.未提供名称,将生成一个全球唯一标识符(GUID) */
10
+ name: "Post-Process-Snow",
11
+ /** 一个在 (0.0, 1.0] 范围内的数字,用于缩放纹理尺寸。缩放比例为 1.0 时,此后期处理阶段会将纹理渲染为与视口相同的大小 */
12
+ textureScale: 1.0,
13
+ /**是否强制纹理尺寸为2的幂次方 */
14
+ forcePowerOfTwo: false,
15
+ /**如何对输入的颜色纹理进行采样 */
16
+ sampleMode: PostProcessStageSampleMode.NEAREST,
17
+ /**输出纹理的颜色像素格式 */
18
+ pixelFormat: PixelFormat.RGBA,
19
+ /**用于清除输出纹理的颜色 */
20
+ clearColor: Color.BLACK,
21
+ fragmentShader: PostProcessThunderFS,
22
+ uniforms: {
23
+ u_snowTexture: RESOURCES.U_SNOWTEXTURE, // 雪花图片纹理(后续加载赋值)
24
+ /**雨雪大小(1-10) */
25
+ u_sl_size: 1,
26
+ /**雨雪密度(密度越大,雪也会越小) */
27
+ u_sl_density: 3,
28
+ /**雨雪层数(越大叠加的越厚) */
29
+ u_sl_layers: 5,
30
+ /**Y方向的速度 */
31
+ u_sl_speedY: 3.5,
32
+
33
+ // 雷电参数
34
+ u_thunderIntensity: 1.0, // 初始无雷电
35
+ u_thunderFlash: 1.0, // 初始无闪光
36
+ u_thunderFrequency: 0.5, // 中等频率
37
+ u_thunderPosition: new Cartesian2(0.5, 0.9), // 屏幕上方中间
38
+ u_screenShake: 0.5, // 中等抖动强度
39
+ u_thunderTime: 0.0 // 雷电时间
40
+ }
41
+ })
42
+ }
43
+
44
+
45
+ }