@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.
- package/LICENSE copy +201 -0
- package/README.md +5 -0
- package/demo/App.vue +26 -0
- package/demo/main.ts +5 -0
- package/demo/style.css +3 -0
- package/index.cjs +12 -0
- package/index.html +13 -0
- package/package.json +31 -3
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
- package/public/Assets/Images/bing_maps_credit.png +0 -0
- package/public/Assets/Images/cesium_credit.png +0 -0
- package/public/Assets/Images/google_earth_credit.png +0 -0
- package/public/Assets/Images/ion-credit.png +0 -0
- package/public/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
- package/public/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
- package/public/Assets/Textures/maki/airfield.png +0 -0
- package/public/Assets/Textures/maki/airport.png +0 -0
- package/public/Assets/Textures/maki/alcohol-shop.png +0 -0
- package/public/Assets/Textures/maki/america-football.png +0 -0
- package/public/Assets/Textures/maki/art-gallery.png +0 -0
- package/public/Assets/Textures/maki/bakery.png +0 -0
- package/public/Assets/Textures/maki/bank.png +0 -0
- package/public/Assets/Textures/maki/bar.png +0 -0
- package/public/Assets/Textures/maki/baseball.png +0 -0
- package/public/Assets/Textures/maki/basketball.png +0 -0
- package/public/Assets/Textures/maki/beer.png +0 -0
- package/public/Assets/Textures/maki/bicycle.png +0 -0
- package/public/Assets/Textures/maki/building.png +0 -0
- package/public/Assets/Textures/maki/bus.png +0 -0
- package/public/Assets/Textures/maki/cafe.png +0 -0
- package/public/Assets/Textures/maki/camera.png +0 -0
- package/public/Assets/Textures/maki/campsite.png +0 -0
- package/public/Assets/Textures/maki/car.png +0 -0
- package/public/Assets/Textures/maki/cemetery.png +0 -0
- package/public/Assets/Textures/maki/cesium.png +0 -0
- package/public/Assets/Textures/maki/chemist.png +0 -0
- package/public/Assets/Textures/maki/cinema.png +0 -0
- package/public/Assets/Textures/maki/circle-stroked.png +0 -0
- package/public/Assets/Textures/maki/circle.png +0 -0
- package/public/Assets/Textures/maki/city.png +0 -0
- package/public/Assets/Textures/maki/clothing-store.png +0 -0
- package/public/Assets/Textures/maki/college.png +0 -0
- package/public/Assets/Textures/maki/commercial.png +0 -0
- package/public/Assets/Textures/maki/cricket.png +0 -0
- package/public/Assets/Textures/maki/cross.png +0 -0
- package/public/Assets/Textures/maki/dam.png +0 -0
- package/public/Assets/Textures/maki/danger.png +0 -0
- package/public/Assets/Textures/maki/disability.png +0 -0
- package/public/Assets/Textures/maki/dog-park.png +0 -0
- package/public/Assets/Textures/maki/embassy.png +0 -0
- package/public/Assets/Textures/maki/emergency-telephone.png +0 -0
- package/public/Assets/Textures/maki/entrance.png +0 -0
- package/public/Assets/Textures/maki/farm.png +0 -0
- package/public/Assets/Textures/maki/fast-food.png +0 -0
- package/public/Assets/Textures/maki/ferry.png +0 -0
- package/public/Assets/Textures/maki/fire-station.png +0 -0
- package/public/Assets/Textures/maki/fuel.png +0 -0
- package/public/Assets/Textures/maki/garden.png +0 -0
- package/public/Assets/Textures/maki/gift.png +0 -0
- package/public/Assets/Textures/maki/golf.png +0 -0
- package/public/Assets/Textures/maki/grocery.png +0 -0
- package/public/Assets/Textures/maki/hairdresser.png +0 -0
- package/public/Assets/Textures/maki/harbor.png +0 -0
- package/public/Assets/Textures/maki/heart.png +0 -0
- package/public/Assets/Textures/maki/heliport.png +0 -0
- package/public/Assets/Textures/maki/hospital.png +0 -0
- package/public/Assets/Textures/maki/ice-cream.png +0 -0
- package/public/Assets/Textures/maki/industrial.png +0 -0
- package/public/Assets/Textures/maki/land-use.png +0 -0
- package/public/Assets/Textures/maki/laundry.png +0 -0
- package/public/Assets/Textures/maki/library.png +0 -0
- package/public/Assets/Textures/maki/lighthouse.png +0 -0
- package/public/Assets/Textures/maki/lodging.png +0 -0
- package/public/Assets/Textures/maki/logging.png +0 -0
- package/public/Assets/Textures/maki/london-underground.png +0 -0
- package/public/Assets/Textures/maki/marker-stroked.png +0 -0
- package/public/Assets/Textures/maki/marker.png +0 -0
- package/public/Assets/Textures/maki/minefield.png +0 -0
- package/public/Assets/Textures/maki/mobilephone.png +0 -0
- package/public/Assets/Textures/maki/monument.png +0 -0
- package/public/Assets/Textures/maki/museum.png +0 -0
- package/public/Assets/Textures/maki/music.png +0 -0
- package/public/Assets/Textures/maki/oil-well.png +0 -0
- package/public/Assets/Textures/maki/park.png +0 -0
- package/public/Assets/Textures/maki/park2.png +0 -0
- package/public/Assets/Textures/maki/parking-garage.png +0 -0
- package/public/Assets/Textures/maki/parking.png +0 -0
- package/public/Assets/Textures/maki/pharmacy.png +0 -0
- package/public/Assets/Textures/maki/pitch.png +0 -0
- package/public/Assets/Textures/maki/place-of-worship.png +0 -0
- package/public/Assets/Textures/maki/playground.png +0 -0
- package/public/Assets/Textures/maki/police.png +0 -0
- package/public/Assets/Textures/maki/polling-place.png +0 -0
- package/public/Assets/Textures/maki/post.png +0 -0
- package/public/Assets/Textures/maki/prison.png +0 -0
- package/public/Assets/Textures/maki/rail-above.png +0 -0
- package/public/Assets/Textures/maki/rail-light.png +0 -0
- package/public/Assets/Textures/maki/rail-metro.png +0 -0
- package/public/Assets/Textures/maki/rail-underground.png +0 -0
- package/public/Assets/Textures/maki/rail.png +0 -0
- package/public/Assets/Textures/maki/religious-christian.png +0 -0
- package/public/Assets/Textures/maki/religious-jewish.png +0 -0
- package/public/Assets/Textures/maki/religious-muslim.png +0 -0
- package/public/Assets/Textures/maki/restaurant.png +0 -0
- package/public/Assets/Textures/maki/roadblock.png +0 -0
- package/public/Assets/Textures/maki/rocket.png +0 -0
- package/public/Assets/Textures/maki/school.png +0 -0
- package/public/Assets/Textures/maki/scooter.png +0 -0
- package/public/Assets/Textures/maki/shop.png +0 -0
- package/public/Assets/Textures/maki/skiing.png +0 -0
- package/public/Assets/Textures/maki/slaughterhouse.png +0 -0
- package/public/Assets/Textures/maki/soccer.png +0 -0
- package/public/Assets/Textures/maki/square-stroked.png +0 -0
- package/public/Assets/Textures/maki/square.png +0 -0
- package/public/Assets/Textures/maki/star-stroked.png +0 -0
- package/public/Assets/Textures/maki/star.png +0 -0
- package/public/Assets/Textures/maki/suitcase.png +0 -0
- package/public/Assets/Textures/maki/swimming.png +0 -0
- package/public/Assets/Textures/maki/telephone.png +0 -0
- package/public/Assets/Textures/maki/tennis.png +0 -0
- package/public/Assets/Textures/maki/theatre.png +0 -0
- package/public/Assets/Textures/maki/toilets.png +0 -0
- package/public/Assets/Textures/maki/town-hall.png +0 -0
- package/public/Assets/Textures/maki/town.png +0 -0
- package/public/Assets/Textures/maki/triangle-stroked.png +0 -0
- package/public/Assets/Textures/maki/triangle.png +0 -0
- package/public/Assets/Textures/maki/village.png +0 -0
- package/public/Assets/Textures/maki/warehouse.png +0 -0
- package/public/Assets/Textures/maki/waste-basket.png +0 -0
- package/public/Assets/Textures/maki/water.png +0 -0
- package/public/Assets/Textures/maki/wetland.png +0 -0
- package/public/Assets/Textures/maki/zoo.png +0 -0
- package/public/Assets/Textures/moonSmall.jpg +0 -0
- package/public/Assets/Textures/pin.svg +1 -0
- package/public/Assets/Textures/waterNormals.jpg +0 -0
- package/public/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/public/Assets/approximateTerrainHeights.json +1 -0
- package/public/Cesium.js +16587 -0
- package/public/ThirdParty/Workers/package.json +1 -0
- package/public/ThirdParty/Workers/zip-web-worker.js +1 -0
- package/public/ThirdParty/basis_transcoder.wasm +0 -0
- package/public/ThirdParty/draco_decoder.wasm +0 -0
- package/public/ThirdParty/google-earth-dbroot-parser.js +1 -0
- package/public/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/public/ThirdParty/zip-module.wasm +0 -0
- package/public/Widgets/Animation/Animation.css +127 -0
- package/public/Widgets/Animation/lighter.css +70 -0
- package/public/Widgets/BaseLayerPicker/BaseLayerPicker.css +108 -0
- package/public/Widgets/BaseLayerPicker/lighter.css +22 -0
- package/public/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +102 -0
- package/public/Widgets/CesiumInspector/CesiumInspector.css +113 -0
- package/public/Widgets/CesiumWidget/CesiumWidget.css +119 -0
- package/public/Widgets/CesiumWidget/lighter.css +14 -0
- package/public/Widgets/FullscreenButton/FullscreenButton.css +8 -0
- package/public/Widgets/Geocoder/Geocoder.css +70 -0
- package/public/Widgets/Geocoder/lighter.css +17 -0
- package/public/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/public/Widgets/Images/ImageryProviders/azureAerial.png +0 -0
- package/public/Widgets/Images/ImageryProviders/azureRoads.png +0 -0
- package/public/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
- package/public/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
- package/public/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
- package/public/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
- package/public/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
- package/public/Widgets/Images/ImageryProviders/googleContour.png +0 -0
- package/public/Widgets/Images/ImageryProviders/googleRoadmap.png +0 -0
- package/public/Widgets/Images/ImageryProviders/googleSatellite.png +0 -0
- package/public/Widgets/Images/ImageryProviders/googleSatelliteLabels.png +0 -0
- package/public/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
- package/public/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
- package/public/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
- package/public/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
- package/public/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
- package/public/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
- package/public/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
- package/public/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/public/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/public/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
- package/public/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
- package/public/Widgets/Images/NavigationHelp/Mouse.svg +84 -0
- package/public/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
- package/public/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
- package/public/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
- package/public/Widgets/Images/NavigationHelp/Touch.svg +120 -0
- package/public/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
- package/public/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
- package/public/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
- package/public/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
- package/public/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
- package/public/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
- package/public/Widgets/Images/TimelineIcons.png +0 -0
- package/public/Widgets/Images/info-loading.gif +0 -0
- package/public/Widgets/InfoBox/InfoBox.css +92 -0
- package/public/Widgets/InfoBox/InfoBoxDescription.css +178 -0
- package/public/Widgets/NavigationHelpButton/NavigationHelpButton.css +93 -0
- package/public/Widgets/NavigationHelpButton/lighter.css +38 -0
- package/public/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
- package/public/Widgets/ProjectionPicker/ProjectionPicker.css +38 -0
- package/public/Widgets/SceneModePicker/SceneModePicker.css +56 -0
- package/public/Widgets/SelectionIndicator/SelectionIndicator.css +20 -0
- package/public/Widgets/Timeline/Timeline.css +103 -0
- package/public/Widgets/Timeline/lighter.css +23 -0
- package/public/Widgets/VRButton/VRButton.css +8 -0
- package/public/Widgets/Viewer/Viewer.css +107 -0
- package/public/Widgets/VoxelInspector/VoxelInspector.css +16 -0
- package/public/Widgets/lighter.css +237 -0
- package/public/Widgets/lighterShared.css +46 -0
- package/public/Widgets/shared.css +103 -0
- package/public/Widgets/widgets.css +1342 -0
- package/public/Workers/chunk-3DKU5AMY.js +26 -0
- package/public/Workers/chunk-3MO6V622.js +26 -0
- package/public/Workers/chunk-3ULTL2FZ.js +26 -0
- package/public/Workers/chunk-43YDDN2L.js +26 -0
- package/public/Workers/chunk-453UE67U.js +26 -0
- package/public/Workers/chunk-5JJC62LP.js +26 -0
- package/public/Workers/chunk-65WPDQMK.js +26 -0
- package/public/Workers/chunk-6J7K26F7.js +26 -0
- package/public/Workers/chunk-A3G5ORRJ.js +26 -0
- package/public/Workers/chunk-AIXDAWPZ.js +26 -0
- package/public/Workers/chunk-ANKVUFZB.js +26 -0
- package/public/Workers/chunk-AZ67KQQB.js +26 -0
- package/public/Workers/chunk-C5F5JZAC.js +26 -0
- package/public/Workers/chunk-CK62LO4L.js +26 -0
- package/public/Workers/chunk-DXDIQEOK.js +26 -0
- package/public/Workers/chunk-E7ZPYMUI.js +26 -0
- package/public/Workers/chunk-GDE4VUE6.js +26 -0
- package/public/Workers/chunk-GGYRJCFH.js +29 -0
- package/public/Workers/chunk-HBIOVTO5.js +27 -0
- package/public/Workers/chunk-HJIURIT6.js +26 -0
- package/public/Workers/chunk-IDLM42AV.js +26 -0
- package/public/Workers/chunk-IFBNVX3N.js +26 -0
- package/public/Workers/chunk-IR47TAV5.js +26 -0
- package/public/Workers/chunk-ISGFCDPW.js +26 -0
- package/public/Workers/chunk-JJ24SU25.js +26 -0
- package/public/Workers/chunk-LAGV6F3C.js +29 -0
- package/public/Workers/chunk-LLCMCKFU.js +26 -0
- package/public/Workers/chunk-MSR5BKMH.js +26 -0
- package/public/Workers/chunk-MWVHSLYS.js +26 -0
- package/public/Workers/chunk-MYNU3I3W.js +26 -0
- package/public/Workers/chunk-NSDLDP72.js +26 -0
- package/public/Workers/chunk-NUY3PECV.js +26 -0
- package/public/Workers/chunk-OHMLE6SB.js +26 -0
- package/public/Workers/chunk-OJH7UFER.js +28 -0
- package/public/Workers/chunk-OUZ34R6R.js +26 -0
- package/public/Workers/chunk-OWJWRYGM.js +26 -0
- package/public/Workers/chunk-PAML32O3.js +26 -0
- package/public/Workers/chunk-PNKG35NX.js +26 -0
- package/public/Workers/chunk-Q6F3SO7I.js +26 -0
- package/public/Workers/chunk-QROIA2H7.js +26 -0
- package/public/Workers/chunk-RH6XN2ZV.js +28 -0
- package/public/Workers/chunk-SCMY6ELS.js +26 -0
- package/public/Workers/chunk-SP3AH7D2.js +26 -0
- package/public/Workers/chunk-SRXN2PE4.js +26 -0
- package/public/Workers/chunk-SUBLUDWJ.js +26 -0
- package/public/Workers/chunk-T4S74O3D.js +26 -0
- package/public/Workers/chunk-TITUTZNR.js +63 -0
- package/public/Workers/chunk-UWS7N7FB.js +26 -0
- package/public/Workers/chunk-V5C26K4F.js +26 -0
- package/public/Workers/chunk-VAPRBQYE.js +26 -0
- package/public/Workers/chunk-VBYW5FXW.js +26 -0
- package/public/Workers/chunk-VLPLGYXT.js +26 -0
- package/public/Workers/chunk-W5T7UWKW.js +26 -0
- package/public/Workers/chunk-XLJBHQML.js +26 -0
- package/public/Workers/chunk-XWXQVSYW.js +26 -0
- package/public/Workers/chunk-YSN2K4FT.js +27 -0
- package/public/Workers/chunk-ZTSD53QT.js +26 -0
- package/public/Workers/combineGeometry.js +26 -0
- package/public/Workers/createBoxGeometry.js +26 -0
- package/public/Workers/createBoxOutlineGeometry.js +26 -0
- package/public/Workers/createCircleGeometry.js +26 -0
- package/public/Workers/createCircleOutlineGeometry.js +26 -0
- package/public/Workers/createCoplanarPolygonGeometry.js +26 -0
- package/public/Workers/createCoplanarPolygonOutlineGeometry.js +26 -0
- package/public/Workers/createCorridorGeometry.js +26 -0
- package/public/Workers/createCorridorOutlineGeometry.js +26 -0
- package/public/Workers/createCylinderGeometry.js +26 -0
- package/public/Workers/createCylinderOutlineGeometry.js +26 -0
- package/public/Workers/createEllipseGeometry.js +26 -0
- package/public/Workers/createEllipseOutlineGeometry.js +26 -0
- package/public/Workers/createEllipsoidGeometry.js +26 -0
- package/public/Workers/createEllipsoidOutlineGeometry.js +26 -0
- package/public/Workers/createFrustumGeometry.js +26 -0
- package/public/Workers/createFrustumOutlineGeometry.js +26 -0
- package/public/Workers/createGeometry.js +26 -0
- package/public/Workers/createGroundPolylineGeometry.js +26 -0
- package/public/Workers/createPlaneGeometry.js +26 -0
- package/public/Workers/createPlaneOutlineGeometry.js +26 -0
- package/public/Workers/createPolygonGeometry.js +26 -0
- package/public/Workers/createPolygonOutlineGeometry.js +26 -0
- package/public/Workers/createPolylineGeometry.js +26 -0
- package/public/Workers/createPolylineVolumeGeometry.js +26 -0
- package/public/Workers/createPolylineVolumeOutlineGeometry.js +26 -0
- package/public/Workers/createRectangleGeometry.js +26 -0
- package/public/Workers/createRectangleOutlineGeometry.js +26 -0
- package/public/Workers/createSimplePolylineGeometry.js +26 -0
- package/public/Workers/createSphereGeometry.js +26 -0
- package/public/Workers/createSphereOutlineGeometry.js +26 -0
- package/public/Workers/createTaskProcessorWorker.js +26 -0
- package/public/Workers/createVectorTileClampedPolylines.js +26 -0
- package/public/Workers/createVectorTileGeometries.js +26 -0
- package/public/Workers/createVectorTilePoints.js +26 -0
- package/public/Workers/createVectorTilePolygons.js +26 -0
- package/public/Workers/createVectorTilePolylines.js +26 -0
- package/public/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -0
- package/public/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -0
- package/public/Workers/createVerticesFromHeightmap.js +26 -0
- package/public/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -0
- package/public/Workers/createWallGeometry.js +26 -0
- package/public/Workers/createWallOutlineGeometry.js +26 -0
- package/public/Workers/decodeDraco.js +26 -0
- package/public/Workers/decodeGoogleEarthEnterprisePacket.js +26 -0
- package/public/Workers/decodeI3S.js +26 -0
- package/public/Workers/gaussianSplatSorter.js +26 -0
- package/public/Workers/gaussianSplatTextureGenerator.js +26 -0
- package/public/Workers/incrementallyBuildTerrainPicker.js +26 -0
- package/public/Workers/transcodeKTX2.js +56 -0
- package/public/Workers/transferTypedArrayTest.js +26 -0
- package/public/Workers/upsampleQuantizedTerrainMesh.js +26 -0
- package/public/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -0
- package/public/index.cjs +16587 -0
- package/public/index.js +16587 -0
- package/src/Assets/geojson/BaiYangDian.geojson +699 -0
- package/src/Assets/geojson/HeBei.geojson +97754 -0
- package/src/Assets/geojson//344/270/255/345/233/275_/347/234/201.geojson +1 -0
- package/src/Assets/images/BYD.png +0 -0
- package/src/Assets/images/BYH.png +0 -0
- package/src/Assets/images/CZD.png +0 -0
- package/src/Assets/images/bouys.png +0 -0
- package/src/Assets/images/hebei.ico +0 -0
- package/src/Assets/images/jinzhou.ico +0 -0
- package/src/Assets/images/map_bg.png +0 -0
- package/src/Assets/images/map_bridge.png +0 -0
- package/src/Assets/images/map_radar.png +0 -0
- package/src/Assets/images/map_vhf.png +0 -0
- package/src/Assets/images/shenlan.png +0 -0
- package/src/Assets/images/ship.png +0 -0
- package/src/Assets/images/ship_1.png +0 -0
- package/src/Assets/images/ship_1_e.png +0 -0
- package/src/Assets/images/ship_1_tv.png +0 -0
- package/src/Assets/images/ship_2.png +0 -0
- package/src/Assets/images/ship_2_e.png +0 -0
- package/src/Assets/images/ship_2_tv.png +0 -0
- package/src/Assets/images/ship_3.png +0 -0
- package/src/Assets/images/ship_3_e.png +0 -0
- package/src/Assets/images/ship_3_tv.png +0 -0
- package/src/Assets/images/ship_4.png +0 -0
- package/src/Assets/images/ship_4_e.png +0 -0
- package/src/Assets/images/ship_4_tv.png +0 -0
- package/src/Assets/images/ship_5.png +0 -0
- package/src/Assets/images/ship_5_e.png +0 -0
- package/src/Assets/images/ship_5_tv.png +0 -0
- package/src/Assets/images/snowflake_particle.png +0 -0
- package/src/Assets/models/fengche.gltf +2920 -0
- package/src/Assets/resource.ts +32 -0
- package/src/const/color.ts +10 -0
- package/src/const/config/camera.ts +16 -0
- package/src/const/config/index.ts +2 -0
- package/src/const/config/viewer.ts +42 -0
- package/src/const/index.ts +3 -0
- package/src/const/position.ts +34 -0
- package/src/core/cdk/compass.ts +24 -0
- package/src/core/cdk/index.ts +36 -0
- package/src/core/cdk/lnglat.ts +125 -0
- package/src/core/cdk/orbit.ts +118 -0
- package/src/core/cdk/overlay.ts +90 -0
- package/src/core/cdk/slider.ts +54 -0
- package/src/core/cdk/svg_compass.svg +33 -0
- package/src/core/index.ts +2 -0
- package/src/core/layers/baidu-map-layer.ts +117 -0
- package/src/core/libs/gui.ts +88 -0
- package/src/core/scene/camera.ts +211 -0
- package/src/core/scene/globe.ts +33 -0
- package/src/core/scene/index.ts +5 -0
- package/src/core/scene/layers.ts +240 -0
- package/src/core/scene/primitives.ts +55 -0
- package/src/core/scene/scene.ts +44 -0
- package/src/core/viewer/clock.ts +93 -0
- package/src/core/viewer/data.ts +17 -0
- package/src/core/viewer/element.ts +146 -0
- package/src/core/viewer/entities.ts +74 -0
- package/src/core/viewer/event.ts +155 -0
- package/src/core/viewer/index.ts +7 -0
- package/src/core/viewer/result.ts +7 -0
- package/src/core/viewer/terrain.ts +30 -0
- package/src/core/viewer/viewer.ts +255 -0
- package/src/entities/ellipse.ts +68 -0
- package/src/entities/geojson.ts +19 -0
- package/src/entities/image.ts +28 -0
- package/src/entities/index.ts +42 -0
- package/src/entities/label.ts +37 -0
- package/src/entities/point.ts +48 -0
- package/src/entities/polygon.ts +59 -0
- package/src/entities/polyline.ts +55 -0
- package/src/entities/radar.ts +18 -0
- package/src/entities/rectangle.ts +50 -0
- package/src/entities/trailing.ts +22 -0
- package/src/index.ts +10 -0
- package/src/plugins/bathymetry.ts +107 -0
- package/src/plugins/elevation.ts +146 -0
- package/src/plugins/index.ts +3 -0
- package/src/plugins/post-process-snow.glsl +99 -0
- package/src/plugins/post-process-snow.ts +45 -0
- package/src/plugins/thunder.glsl +159 -0
- package/src/primitives/appearance/demo.ts +27 -0
- package/src/primitives/appearance/index.ts +1 -0
- package/src/primitives/area.ts +40 -0
- package/src/primitives/geometry/geometry.ts +44 -0
- package/src/primitives/image-2d.ts +73 -0
- package/src/primitives/index.ts +9 -0
- package/src/primitives/instance/instance.ts +58 -0
- package/src/primitives/material/image2d.ts +25 -0
- package/src/primitives/material/index.ts +8 -0
- package/src/primitives/material/ship2d.ts +55 -0
- package/src/primitives/particle.ts +47 -0
- package/src/primitives/shaders/EllipsoidSurfaceAppearanceFS.glsl +31 -0
- package/src/primitives/shaders/EllipsoidSurfaceAppearanceVS.glsl +19 -0
- package/src/primitives/shaders/imageFS.glsl +22 -0
- package/src/primitives/shaders/raedme.md +187 -0
- package/src/property/index.ts +1 -0
- package/src/property/material/core.ts +52 -0
- package/src/property/material/index.ts +5 -0
- package/src/property/material/radar.ts +41 -0
- package/src/property/material/road.ts +35 -0
- package/src/property/material/trailing.ts +31 -0
- package/src/property/material/wall.ts +31 -0
- package/src/scene/TJG/area.ts +37 -0
- package/src/scene/TJG/billboard.ts +89 -0
- package/src/scene/TJG/entityies.ts +131 -0
- package/src/scene/TJG/lines.ts +14 -0
- package/src/scene/TJG/maps.ts +16 -0
- package/src/scene/TJG/scene-tjg.ts +212 -0
- package/src/scene/TJG/ships.ts +32 -0
- package/src/scene/TJG/tileset.ts +144 -0
- package/src/scene/TJG/tjg.d.ts +14 -0
- package/src/scene/cdk/fog.ts +47 -0
- package/src/scene/cdk/index.ts +4 -0
- package/src/scene/cdk/measure.ts +108 -0
- package/src/scene/cdk/plot.ts +182 -0
- package/src/scene/cdk/source.ts +33 -0
- package/src/shaders/3d-tileset.ts +41 -0
- package/src/shaders/index.ts +1 -0
- package/src/shaders/material-property/a-readme.md +2 -0
- package/src/shaders/material-property/radarFS.glsl +25 -0
- package/src/shaders/material-property/roadFS.glsl +14 -0
- package/src/shaders/material-property/trailingFS.glsl +18 -0
- package/src/shaders/material-property/wallFS.glsl +31 -0
- package/src/shaders/raedme.md +187 -0
- package/src/shaders/ship/ShipVS.glsl +19 -0
- package/src/sl-utils-cesium.ts +1 -0
- package/src/types/cdk.d.ts +20 -0
- package/src/types/core.d.ts +6 -0
- package/src/types/entity.d.ts +628 -0
- package/src/types/event.d.ts +32 -0
- package/src/types/extend.Cesium.d.ts +28 -0
- package/src/types/geometry.d.ts +55 -0
- package/src/types/plugins.d.ts +34 -0
- package/src/types/primitive.d.ts +69 -0
- package/src/types/scene.d.ts +25 -0
- package/src/types/viewer.d.ts +114 -0
- package/src/utils/cesium.ts +189 -0
- package/src/utils/common.ts +87 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/map.ts +112 -0
- package/src/utils/types.ts +44 -0
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +34 -0
- package/types/billboard.d.ts +8 -0
- package/types/entities.d.ts +224 -0
- package/types/property.d.ts +12 -0
- package/types/resource.d.ts +26 -0
- package/types/sl-utils-cesium.d.ts +17 -0
- package/vite.config.ts +43 -0
- package/webpack.config.js +29 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as Cesium from 'cesium';
|
|
2
|
+
import { um_tobd09gps84, um_togps84bd09 } from 'src/utils';
|
|
3
|
+
export class BaiduImageryProvider extends Cesium.UrlTemplateImageryProvider {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
let southwestInMeters: Cesium.Cartesian2 = new Cesium.Cartesian2(-33554055.943697, -33746824.579666);
|
|
6
|
+
let northeastInMeters: Cesium.Cartesian2 = new Cesium.Cartesian2(33554055.943697, 33746824.579666);
|
|
7
|
+
super(Object.assign(options, {
|
|
8
|
+
subdomains: "0123", minimumLevel: 1, maximumLevel: 18, tilingScheme: new Cesium.WebMercatorTilingScheme({
|
|
9
|
+
rectangleSouthwestInMeters: southwestInMeters,
|
|
10
|
+
rectangleNortheastInMeters: northeastInMeters
|
|
11
|
+
})
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
public override requestImage(x, y, level, request) {
|
|
15
|
+
var r = this.tilingScheme.getNumberOfXTilesAtLevel(level);
|
|
16
|
+
var c = this.tilingScheme.getNumberOfYTilesAtLevel(level);
|
|
17
|
+
let X = x - r / 2, Y = c / 2 - y - 1, Z = level, S = Math.floor(10 * Math.random());
|
|
18
|
+
var s = this.url.replace("{x}", X.toString()).replace("{y}", Y.toString()).replace("{z}", Z).replace("{s}", S.toString());
|
|
19
|
+
return Cesium.ImageryProvider.loadImage(this, s) as Promise<Cesium.ImageryTypes>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class BaiduMercatorTilingScheme extends Cesium.WebMercatorTilingScheme {
|
|
25
|
+
constructor(options) {
|
|
26
|
+
super(options)
|
|
27
|
+
this._projection = new BaiduMercatorProjection(this._ellipsoid)
|
|
28
|
+
}
|
|
29
|
+
private _projection;
|
|
30
|
+
private _ellipsoid
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
class BaiduMercatorProjection { // 创建椭球墨卡托投影,Cesium 源码中是以xyz三个轴的最长的轴作为球来计算
|
|
34
|
+
constructor(ellipsoid) {
|
|
35
|
+
this._ellipsoid = ellipsoid || Cesium.Ellipsoid.WGS84;
|
|
36
|
+
this._semimajorAxis = this._ellipsoid.maximumRadius
|
|
37
|
+
this._oneOverSemimajorAxis = 1.0 / this._semimajorAxis
|
|
38
|
+
}
|
|
39
|
+
private _ellipsoid;
|
|
40
|
+
private _semimajorAxis;
|
|
41
|
+
private _oneOverSemimajorAxis;
|
|
42
|
+
get ellipsoid() { return this._ellipsoid }
|
|
43
|
+
get MaximumLatitude() { return this.mercatorAngleToGeodeticLatitude(Math.PI) }
|
|
44
|
+
geodeticLatitudeToMercatorAngle(latitude) {
|
|
45
|
+
if (latitude > this.MaximumLatitude) { latitude = this.MaximumLatitude }
|
|
46
|
+
else if (latitude < -this.MaximumLatitude) { latitude = -this.MaximumLatitude }
|
|
47
|
+
const tmp = this.ellipsoid.radii.z / this.ellipsoid.radii.x // 短半轴 / 长半轴
|
|
48
|
+
const e = Math.sqrt(1.0 - tmp * tmp)
|
|
49
|
+
const con = e * Math.sin(latitude)
|
|
50
|
+
const ts = Math.tan(Math.PI * 0.25 - latitude * 0.5) / Math.pow((1.0 - con) / (1.0 + con), e * 0.5)
|
|
51
|
+
return - Math.log(Math.max(ts, 1E-10))
|
|
52
|
+
}
|
|
53
|
+
project(cartographic, result) {
|
|
54
|
+
const correct = um_togps84bd09(Cesium.Math.toDegrees(cartographic.longitude), Cesium.Math.toDegrees(cartographic.latitude));
|
|
55
|
+
cartographic.longitude = Cesium.Math.toRadians(correct.lng), cartographic.latitude = Cesium.Math.toRadians(correct.lat)
|
|
56
|
+
|
|
57
|
+
var x = cartographic.longitude * this.ellipsoid.radii.x
|
|
58
|
+
var y = this.geodeticLatitudeToMercatorAngle(cartographic.latitude) * this.ellipsoid.radii.x
|
|
59
|
+
var z = cartographic.height
|
|
60
|
+
|
|
61
|
+
if (!Cesium.defined(result)) { return new Cesium.Cartesian3(x, y, z) }
|
|
62
|
+
result.x = x, result.y = y, result.z = z
|
|
63
|
+
return result
|
|
64
|
+
}
|
|
65
|
+
mercatorAngleToGeodeticLatitude(mercatorAngle) {
|
|
66
|
+
const tmp = this.ellipsoid.radii.z / this.ellipsoid.radii.x // 短半轴 / 长半轴
|
|
67
|
+
const e = Math.sqrt(1.0 - tmp * tmp)
|
|
68
|
+
const ts = Math.exp(-mercatorAngle)
|
|
69
|
+
var phi = Math.PI / 2 - 2 * Math.atan(ts)
|
|
70
|
+
for (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) {
|
|
71
|
+
con = e * Math.sin(phi)
|
|
72
|
+
con = Math.pow((1 - con) / (1 + con), e / 2)
|
|
73
|
+
dphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi
|
|
74
|
+
phi += dphi
|
|
75
|
+
}
|
|
76
|
+
return phi
|
|
77
|
+
}
|
|
78
|
+
unproject(cartesian, result) {
|
|
79
|
+
var longitude = cartesian.x / this.ellipsoid.radii.x
|
|
80
|
+
var latitude = this.mercatorAngleToGeodeticLatitude(cartesian.y / this.ellipsoid.radii.x)
|
|
81
|
+
var height = cartesian.z
|
|
82
|
+
const correct = um_tobd09gps84(Cesium.Math.toDegrees(longitude), Cesium.Math.toDegrees(latitude));
|
|
83
|
+
longitude = Cesium.Math.toRadians(correct.lng), latitude = Cesium.Math.toRadians(correct.lat)
|
|
84
|
+
|
|
85
|
+
if (!Cesium.defined(result)) { return new Cesium.Cartographic(longitude, latitude, height) }
|
|
86
|
+
result.longitude = longitude, result.latitude = latitude, result.height = height
|
|
87
|
+
return result
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
class BaiduImageryProvider2 extends Cesium.UrlTemplateImageryProvider {
|
|
92
|
+
constructor(param, options = {}) {
|
|
93
|
+
var templateImgUrl = "//maponline{s}.bdimg.com/starpic/u=x={x};y={y};z={z};v=009;type=sate&fm=46&app=webearth2&v=009&qt=satepc"
|
|
94
|
+
var templateUrl = "//maponline{s}.bdimg.com/tile/?x={x}&y={y}&z={z}&{p}"
|
|
95
|
+
var myUrl = (param === "img" ? templateImgUrl : templateUrl).replace(/\{p\}/g, param)
|
|
96
|
+
super(Object.assign({}, {
|
|
97
|
+
url: myUrl, subdomains: "0123", minimumLevel: 1, maximumLevel: 18, tilingScheme: new BaiduMercatorTilingScheme({
|
|
98
|
+
rectangleSouthwestInMeters: new Cesium.Cartesian2(-33554432, -33554432),
|
|
99
|
+
rectangleNortheastInMeters: new Cesium.Cartesian2(33554432, 33554432),
|
|
100
|
+
ellipsoid: new Cesium.Ellipsoid(6378206, 6378206, 6356584.314245179)
|
|
101
|
+
}),
|
|
102
|
+
}, options))
|
|
103
|
+
const that = this
|
|
104
|
+
this._readyPromise.then(function (properties) {
|
|
105
|
+
var customTags = { x: (l, x, y, z) => { return x - (1 << (z - 1)) }, y: (l, x, y, z) => { return (1 << (z - 1)) - y - 1 }, z: (l, x, y, z) => { return z } }
|
|
106
|
+
that._tags = Cesium.combine(customTags, that._tags)
|
|
107
|
+
that._pickFeaturesTags = Cesium.combine(customTags, that._pickFeaturesTags)
|
|
108
|
+
that._rectangle = that._tilingScheme.rectangle
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
private _tags;
|
|
112
|
+
private _pickFeaturesTags;
|
|
113
|
+
private _rectangle;
|
|
114
|
+
private _tilingScheme;
|
|
115
|
+
private _readyPromise;
|
|
116
|
+
|
|
117
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Color } from "cesium";
|
|
2
|
+
import { GUI } from "dat.gui";
|
|
3
|
+
// 1. 辅助类型:判断是否为“非基础类型的纯对象”(排除数组、日期等)
|
|
4
|
+
type IsPlainObject<T> = T extends null | undefined | string | number | boolean | symbol | bigint | Date | Array<any>
|
|
5
|
+
? false
|
|
6
|
+
: T extends object
|
|
7
|
+
? true
|
|
8
|
+
: false;
|
|
9
|
+
// 2. 辅助类型:提取 T 的所有“带路径属性名”(支持1-2层嵌套,匹配 A 的结构)
|
|
10
|
+
export type ParamPath<T, K extends keyof T = keyof T> = K extends string
|
|
11
|
+
? IsPlainObject<T[K]> extends true
|
|
12
|
+
? `${K}.${ParamPath<T[K]>}`
|
|
13
|
+
: K
|
|
14
|
+
: never;
|
|
15
|
+
export interface GUICtrParam<T> {
|
|
16
|
+
/**此调试项的名称 */
|
|
17
|
+
name: string,
|
|
18
|
+
/**被控制的属性名(可通过 . 获取更深层级) */
|
|
19
|
+
param: ParamPath<T>,
|
|
20
|
+
/**选项数据(增设选择项) */
|
|
21
|
+
items?: Object,
|
|
22
|
+
/**颜色采样(增设颜色配置) */
|
|
23
|
+
ifColor?: boolean,
|
|
24
|
+
/**数值设置 [最小值,最大值,单步大小] */
|
|
25
|
+
ifNums?: [number | undefined, number | undefined, number | undefined]
|
|
26
|
+
/**点击回调 */
|
|
27
|
+
callback?: Function
|
|
28
|
+
/**是否监听 */
|
|
29
|
+
listen?: boolean,
|
|
30
|
+
/**变更回调事件 */
|
|
31
|
+
change?: Function
|
|
32
|
+
}
|
|
33
|
+
/**页面调试控件类 */
|
|
34
|
+
export class Gui {
|
|
35
|
+
private static gui: GUI = undefined //: new GUI({ width: 320, });
|
|
36
|
+
/**已经添加的控制 */
|
|
37
|
+
private static folders: {} = {};
|
|
38
|
+
/**添加GUI文件夹控制
|
|
39
|
+
* @param obj 要控制的对象
|
|
40
|
+
* @param name 文件夹名称
|
|
41
|
+
* @param ctrs 控制属性组
|
|
42
|
+
*/
|
|
43
|
+
public static on<T>(obj: T, name: string, ctrs: GUICtrParam<T>[]) {
|
|
44
|
+
if (!this.gui) return;
|
|
45
|
+
let floder = this.folders[name] = this.folders[name] || this.gui.addFolder(`${name}`);
|
|
46
|
+
for (let i = 0, len = ctrs.length; i < len; i++) {
|
|
47
|
+
const { name, param, listen, ifColor, ifNums, ifNums: [min, max, step] = [], callback, items, change } = ctrs[i];
|
|
48
|
+
let data = obj, ctr;
|
|
49
|
+
let parmas = param.split('.') || [], last = parmas[parmas.length - 1];
|
|
50
|
+
for (let i = 0, len = parmas.length - 1; i < len; i++) {
|
|
51
|
+
data = data[parmas[i]];
|
|
52
|
+
}
|
|
53
|
+
if (ifColor) {
|
|
54
|
+
const info = data[last];
|
|
55
|
+
if (info instanceof Color) {
|
|
56
|
+
// let obj = { color: info.getHex() };
|
|
57
|
+
// ctr = floder.addColor(obj, 'color')
|
|
58
|
+
// ctr.onChange(e => {
|
|
59
|
+
// info.setHex(e)
|
|
60
|
+
// })
|
|
61
|
+
} else {
|
|
62
|
+
ctr = floder.addColor(obj, last)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (callback) ctr = floder.add({ [last]: callback }, last)
|
|
66
|
+
else if (ifNums) ctr = floder.add(data, last).step(step).min(min).max(max)
|
|
67
|
+
else ctr = floder.add(data, last, items)
|
|
68
|
+
if (listen) ctr.listen();
|
|
69
|
+
if (change) ctr.onChange(change);
|
|
70
|
+
ctr.name(name)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**添加基础控制位置和旋转
|
|
74
|
+
* @param obj 要控制的对象
|
|
75
|
+
* @param name 文件夹名称
|
|
76
|
+
*/
|
|
77
|
+
public static onGuiFolderBase(mesh: any, name: string, min: number = -100, max: number = 100) {
|
|
78
|
+
if (!this.gui) return;
|
|
79
|
+
let floder = this.folders[name] = this.folders[name] || this.gui.addFolder(`${name}`);
|
|
80
|
+
floder.add(mesh.position, 'x').step(0.001).min(min).max(max).name('positionX').listen()
|
|
81
|
+
floder.add(mesh.position, 'y').step(0.001).min(min).max(max).name('positionY').listen()
|
|
82
|
+
floder.add(mesh.position, 'z').step(0.001).min(min).max(max).name('positionZ').listen()
|
|
83
|
+
floder.add(mesh.rotation, 'x').step(0.001).min(- 5).max(5).name('rotationX').listen()
|
|
84
|
+
floder.add(mesh.rotation, 'y').step(0.001).min(- 5).max(5).name('rotationY').listen()
|
|
85
|
+
floder.add(mesh.rotation, 'z').step(0.001).min(- 5).max(5).name('rotationZ').listen()
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**相机的控制 */
|
|
2
|
+
/**视图控制模块 */
|
|
3
|
+
import { BoundingSphere, Camera, Cartesian3, Cartographic, ClassificationPrimitive, DirectionUp, EasingFunction, Event, HeadingPitchRange, Matrix4, Rectangle, Viewer, getImagePixels } from "cesium";
|
|
4
|
+
import { CMath, uc_getCartesian3 } from "../../utils";
|
|
5
|
+
import { CEvent, SLCViewer } from "../viewer";
|
|
6
|
+
import * as Cesium from 'cesium'
|
|
7
|
+
|
|
8
|
+
const RESULT_CARTESIAN3: Cartesian3 = new Cartesian3()
|
|
9
|
+
export class CCamera {
|
|
10
|
+
constructor(cviewer: SLCViewer) {
|
|
11
|
+
this.cviewer = cviewer;
|
|
12
|
+
this.camera = cviewer.viewer.scene.camera;
|
|
13
|
+
this.camera.percentageChanged = 0;
|
|
14
|
+
// this.onToggleCtr()
|
|
15
|
+
this.addEventListener()
|
|
16
|
+
this.openListenter()
|
|
17
|
+
}
|
|
18
|
+
private readonly cviewer: SLCViewer;
|
|
19
|
+
/**计算像素距离 */
|
|
20
|
+
private readonly sphere: BoundingSphere = new BoundingSphere();
|
|
21
|
+
/**原始相机 */
|
|
22
|
+
public readonly camera: Camera;
|
|
23
|
+
/**相机的控制模式(鼠标控制) */
|
|
24
|
+
private ctrMouse: boolean = true;
|
|
25
|
+
/**相机的目标位置 */
|
|
26
|
+
private target: Cartesian3 = new Cartesian3()
|
|
27
|
+
/**相机的位置 */
|
|
28
|
+
public get position(): Cartesian3 {
|
|
29
|
+
return this.camera.position
|
|
30
|
+
}
|
|
31
|
+
/**获取指定经纬度单位像素的大小(米) */
|
|
32
|
+
public getPixelSize(lntlat: LnglatHeight) {
|
|
33
|
+
const { camera, sphere, cviewer: { celement: { width, height } } } = this;
|
|
34
|
+
sphere.center = uc_getCartesian3(lntlat, RESULT_CARTESIAN3)
|
|
35
|
+
return camera.getPixelSize(sphere, width, height);
|
|
36
|
+
}
|
|
37
|
+
/**获取相机到指定位置的距离
|
|
38
|
+
* @param position 目标位置 LnglatHeight | Cartesian3
|
|
39
|
+
*/
|
|
40
|
+
public getDistance(position: LnglatHeight | Cartesian3) {
|
|
41
|
+
const { camera, sphere, cviewer: { celement: { width, height } } } = this;
|
|
42
|
+
if (position instanceof Cartesian3) {
|
|
43
|
+
Cartesian3.clone(position, RESULT_CARTESIAN3);
|
|
44
|
+
} else {
|
|
45
|
+
uc_getCartesian3(position, RESULT_CARTESIAN3)
|
|
46
|
+
}
|
|
47
|
+
sphere.center = RESULT_CARTESIAN3;
|
|
48
|
+
return camera.distanceToBoundingSphere(sphere);
|
|
49
|
+
}
|
|
50
|
+
/**获取相机高度 */
|
|
51
|
+
public getHeight() {
|
|
52
|
+
const { camera } = this;
|
|
53
|
+
const cartographic = Cartographic.fromCartesian(camera.position);
|
|
54
|
+
return cartographic.height;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**相机锁定并切换到目标位置
|
|
58
|
+
* @param lnglat 目标经纬度
|
|
59
|
+
* @param offset 偏移量或偏航、俯仰、距离
|
|
60
|
+
* @param lock 是否锁定 true
|
|
61
|
+
*/
|
|
62
|
+
public lookAt(lnglat: LnglatHeight, offset?: Cartesian3 | HeadingPitchRange, flag: boolean = true) {
|
|
63
|
+
const { target } = this;
|
|
64
|
+
uc_getCartesian3(lnglat, target)
|
|
65
|
+
this.camera.lookAt(target, offset || {
|
|
66
|
+
/** 相机自身扭转弧度*/
|
|
67
|
+
heading: CMath.toRadians(0),
|
|
68
|
+
/** 相机上下角度 */
|
|
69
|
+
pitch: CMath.toRadians(-15),
|
|
70
|
+
/**相机到规定点位距离 */
|
|
71
|
+
range: 100
|
|
72
|
+
})
|
|
73
|
+
if (!flag) this.unlock();
|
|
74
|
+
}
|
|
75
|
+
/**移除loockAt导致的锁定*/
|
|
76
|
+
public unlock() {
|
|
77
|
+
this.camera.lookAtTransform(Matrix4.IDENTITY);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**切换相机的控制权[鼠标-键盘] */
|
|
81
|
+
public onToggleCtr() {
|
|
82
|
+
const ifMouse = this.ctrMouse = !this.ctrMouse;
|
|
83
|
+
const { cviewer: { viewer: { scene: { screenSpaceCameraController } } } } = this;
|
|
84
|
+
/**允许鼠标控制平移 */
|
|
85
|
+
screenSpaceCameraController.enableTranslate = ifMouse;
|
|
86
|
+
/**允许鼠标控制倾斜 */
|
|
87
|
+
screenSpaceCameraController.enableTilt = ifMouse;
|
|
88
|
+
}
|
|
89
|
+
/**相机单步跨度 */
|
|
90
|
+
public setStep: number = 1;
|
|
91
|
+
/**添加监听,变换为常用 */
|
|
92
|
+
private addEventListener() {
|
|
93
|
+
const { camera, cviewer } = this
|
|
94
|
+
camera.moveStart.addEventListener(() => {
|
|
95
|
+
cviewer.trigger('CAMERA_MOVESTART')
|
|
96
|
+
cviewer.trigger('CAMERA_CHANGED')
|
|
97
|
+
})
|
|
98
|
+
camera.moveEnd.addEventListener(() => {
|
|
99
|
+
cviewer.trigger('CAMERA_MOVEEND')
|
|
100
|
+
cviewer.trigger('CAMERA_CHANGED')
|
|
101
|
+
})
|
|
102
|
+
camera.changed.addEventListener(() => {
|
|
103
|
+
cviewer.trigger('CAMERA_CHANGED')
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
/**开启监听
|
|
107
|
+
* ctrMouse=false时监听相机的键盘操作
|
|
108
|
+
*/
|
|
109
|
+
private openListenter() {
|
|
110
|
+
const { cviewer } = this;
|
|
111
|
+
cviewer.on('TICK', () => this.ctrCameraByKeyboard());
|
|
112
|
+
/**距离目标过远时解除锁定 */
|
|
113
|
+
cviewer.on('CAMERA_CHANGED', () => {
|
|
114
|
+
const distance = this.getDistance(this.target)
|
|
115
|
+
if (distance > 5000) this.unlock();
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
/**键盘控制相机方法 ctrMouse=false 时激活 */
|
|
119
|
+
private ctrCameraByKeyboard() {
|
|
120
|
+
if (this.ctrMouse) return
|
|
121
|
+
const { camera, setStep, cviewer: { scene: { globe: { ellipsoid } }, celement: { keyStates } } } = this;
|
|
122
|
+
// 相机位置操控(IJKLUO控制相机移动)
|
|
123
|
+
// W - 向上俯仰 S - 向下俯仰 A - 向左偏航 D - 向右偏航 Q - 向左翻滚 E键 - 向右翻滚
|
|
124
|
+
// I - 向前移动 K - 向后移动 J - 向左移动 L - 向右移动 U - 向上移动 O键 - 向下移动
|
|
125
|
+
const { KeyW, KeyS, KeyA, KeyD, KeyQ, KeyE, KeyI, KeyK, KeyJ, KeyL, KeyU, KeyO, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Digit0, Digit1, Digit2, Digit3 } = keyStates;
|
|
126
|
+
/**获取相机高度 */
|
|
127
|
+
const cameraHeight = Cartographic.fromCartesian(camera.position).height;
|
|
128
|
+
/**根据高度动态调整移动速率 */
|
|
129
|
+
const moveRate = (cameraHeight / 180) * setStep;
|
|
130
|
+
if (KeyA) {
|
|
131
|
+
this.hprSetting(-0.005 * setStep, 0, 0);
|
|
132
|
+
}
|
|
133
|
+
if (KeyD) {
|
|
134
|
+
this.hprSetting(0.005 * setStep, 0, 0);
|
|
135
|
+
}
|
|
136
|
+
if (KeyW) {
|
|
137
|
+
this.hprSetting(0, 0.01 * setStep, 0);
|
|
138
|
+
}
|
|
139
|
+
if (KeyS) {
|
|
140
|
+
this.hprSetting(0, -0.01 * setStep, 0);
|
|
141
|
+
}
|
|
142
|
+
if (KeyQ) {
|
|
143
|
+
this.hprSetting(0, 0, 0.01 * setStep);
|
|
144
|
+
}
|
|
145
|
+
if (KeyE) {
|
|
146
|
+
this.hprSetting(0, 0, -0.01 * setStep);
|
|
147
|
+
}
|
|
148
|
+
// (zoomIn与moveForward效果相同)
|
|
149
|
+
if (KeyI) {
|
|
150
|
+
camera.zoomIn(moveRate);
|
|
151
|
+
// camera.moveForward(moveRate);
|
|
152
|
+
}
|
|
153
|
+
// (zoomOut与moveBackward效果相同)
|
|
154
|
+
if (KeyK) {
|
|
155
|
+
camera.zoomOut(moveRate);
|
|
156
|
+
// camera.moveBackward(moveRate);
|
|
157
|
+
}
|
|
158
|
+
if (KeyU) {
|
|
159
|
+
camera.moveUp(moveRate);
|
|
160
|
+
}
|
|
161
|
+
if (KeyO) {
|
|
162
|
+
camera.moveDown(moveRate);
|
|
163
|
+
}
|
|
164
|
+
if (KeyJ) {
|
|
165
|
+
camera.moveLeft(moveRate);
|
|
166
|
+
}
|
|
167
|
+
if (KeyL) {
|
|
168
|
+
camera.moveRight(moveRate);
|
|
169
|
+
}
|
|
170
|
+
if (Digit0) {
|
|
171
|
+
camera.lookUp(Cesium.Math.toRadians(setStep))
|
|
172
|
+
}
|
|
173
|
+
if (Digit1) {
|
|
174
|
+
camera.lookDown(Cesium.Math.toRadians(setStep))
|
|
175
|
+
}
|
|
176
|
+
if (Digit2) {
|
|
177
|
+
camera.lookLeft(Cesium.Math.toRadians(setStep))
|
|
178
|
+
}
|
|
179
|
+
if (Digit3) {
|
|
180
|
+
camera.lookRight(Cesium.Math.toRadians(setStep))
|
|
181
|
+
}
|
|
182
|
+
if (ArrowUp) {
|
|
183
|
+
camera.rotateDown(Cesium.Math.toRadians(setStep))
|
|
184
|
+
}
|
|
185
|
+
if (ArrowDown) {
|
|
186
|
+
camera.rotateUp(Cesium.Math.toRadians(setStep))
|
|
187
|
+
}
|
|
188
|
+
if (ArrowLeft) {
|
|
189
|
+
camera.rotateLeft(Cesium.Math.toRadians(setStep))
|
|
190
|
+
}
|
|
191
|
+
if (ArrowRight) {
|
|
192
|
+
camera.rotateRight(Cesium.Math.toRadians(setStep))
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**相机姿态设置方法
|
|
197
|
+
* @param {number} h - 偏航角调整量
|
|
198
|
+
* @param {number} p - 俯仰角调整量
|
|
199
|
+
* @param {number} r - 翻滚角调整量
|
|
200
|
+
*/
|
|
201
|
+
private hprSetting(h, p, r) {
|
|
202
|
+
const { camera } = this, { heading, pitch, roll } = camera
|
|
203
|
+
camera.setView({
|
|
204
|
+
orientation: {
|
|
205
|
+
heading: heading + h, // 偏航角
|
|
206
|
+
pitch: pitch + p, // 俯仰角
|
|
207
|
+
roll: roll + r, // 翻滚角
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Globe } from "cesium";
|
|
2
|
+
/**地球
|
|
3
|
+
* 1、可以调用方法对地球表面地图的着色器进行修改
|
|
4
|
+
*/
|
|
5
|
+
export class CGlobe {
|
|
6
|
+
constructor(globe: Globe) {
|
|
7
|
+
this.globe = globe;
|
|
8
|
+
globe.enableLighting = true
|
|
9
|
+
globe.maximumScreenSpaceError = 1.0
|
|
10
|
+
}
|
|
11
|
+
public readonly globe: Globe;
|
|
12
|
+
/**获取地图影像图层 */
|
|
13
|
+
get imageryLayer() {
|
|
14
|
+
return this.globe.imageryLayers.get(0);
|
|
15
|
+
}
|
|
16
|
+
/**获取片元着色器代码 */
|
|
17
|
+
get fragmentShader(): string[] {
|
|
18
|
+
return this.globe['_surfaceShaderSet'].baseFragmentShaderSource.sources;
|
|
19
|
+
}
|
|
20
|
+
/**修改地图图层的颜色
|
|
21
|
+
* @param shader 片源着色器语言 color
|
|
22
|
+
*/
|
|
23
|
+
public setLayerShader(shader: string) {
|
|
24
|
+
const fragmentShader = this.fragmentShader;
|
|
25
|
+
for (let i = 0; i < fragmentShader.length; i++) {
|
|
26
|
+
let element = fragmentShader[i], point = `color = czm_saturation(color, textureSaturation);\n#endif\n`;
|
|
27
|
+
/**颜色翻转 `color.r=1.0-color.r;\ncolor.g=1.0-color.g;\ncolor.b=1.0-color.b;\n`*/
|
|
28
|
+
/**颜色进行指定变换 `color.r=color.r*55.0/255.0;\ncolor.g=color.g*55.0/255.0;\ncolor.b=color.b*55.0/255.0;\n`*/
|
|
29
|
+
fragmentShader[i] = element.replace(point, point + shader);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}
|