@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,182 @@
|
|
|
1
|
+
import { AssociativeArray, CallbackProperty, Cartesian2, Cartesian3, Color, Entity, JulianDate, PolygonHierarchy, ScreenSpaceEventHandler } from "cesium";
|
|
2
|
+
import { SLCViewer } from "../../core";
|
|
3
|
+
import { EntityEllipse } from "../../entities/ellipse";
|
|
4
|
+
import { SceneCDKSource } from "./source";
|
|
5
|
+
import { EntityPoint, EntityPolygon } from "../../entities";
|
|
6
|
+
import { uc_getCartesian3, uc_getDistanceByCartesian3, uc_getLnglat } from "../../utils";
|
|
7
|
+
import { LNGLAT_CONST_SHENLAN } from "../../const";
|
|
8
|
+
import * as Cesium from "cesium";
|
|
9
|
+
import { EntityRectangle } from "../../entities/rectangle";
|
|
10
|
+
import { PropertyMaterialRadar } from "../../property";
|
|
11
|
+
/**场景的标绘 */
|
|
12
|
+
export class SceneCDKPlot {
|
|
13
|
+
constructor(viewer: SLCViewer) {
|
|
14
|
+
this.viewer = viewer;
|
|
15
|
+
viewer.cdata.dataSources.add(this.custom);
|
|
16
|
+
this.custom.entities.add(this.point);
|
|
17
|
+
}
|
|
18
|
+
private viewer: SLCViewer;
|
|
19
|
+
/**所有实体集合 */
|
|
20
|
+
private custom: SceneCDKSource = new SceneCDKSource();
|
|
21
|
+
/**300ms的点击间隔 */
|
|
22
|
+
private flagClick: boolean = true;
|
|
23
|
+
/**所有标绘的集合 */
|
|
24
|
+
private plotList: CDKPlotInfo[] = [];
|
|
25
|
+
/**当前的标绘信息 */
|
|
26
|
+
private plotInfo: CDKPlotInfo = { type: 'circle', positions: [], lnglats: [] };
|
|
27
|
+
/**当前实体 */
|
|
28
|
+
private entityCircle?: EntityEllipse;
|
|
29
|
+
private entityPolygon?: EntityPolygon;
|
|
30
|
+
private entityRect?: EntityRectangle;
|
|
31
|
+
/**本次标绘添加的实体点,不合规时需要移除 */
|
|
32
|
+
private entityPoints: EntityPoint[] = [];
|
|
33
|
+
/**动态点 */
|
|
34
|
+
private point: EntityPoint = new EntityPoint({ ifChange: true });
|
|
35
|
+
/**开启标绘 */
|
|
36
|
+
public cdkOpenPlot(type: CDKPlotType) {
|
|
37
|
+
this.cdkCloesPlot();
|
|
38
|
+
this.plotInfo = { type, positions: [], lnglats: [] };
|
|
39
|
+
const { plotList, point, plotInfo } = this, { position } = this.viewer;
|
|
40
|
+
point.show = true;
|
|
41
|
+
point.cdkSetPosition(position);
|
|
42
|
+
plotList.push(plotInfo);
|
|
43
|
+
this.addEventListener();
|
|
44
|
+
this.createEntity(type);
|
|
45
|
+
}
|
|
46
|
+
/**关闭标绘 */
|
|
47
|
+
public cdkCloesPlot() {
|
|
48
|
+
const { entityPoints, plotInfo: { type }, custom } = this, len = entityPoints.length;
|
|
49
|
+
this.viewer.cevent.off(`.${this.viewer.id}`);
|
|
50
|
+
if ((len < 2 && (type === 'circle' || type === 'rect')) || (type === 'polygon' && len < 3)) {
|
|
51
|
+
entityPoints.forEach(e => custom.entities.remove(e))
|
|
52
|
+
}
|
|
53
|
+
this.point.show = false;
|
|
54
|
+
this.entityCircle = this.entityPolygon = this.entityRect = undefined;
|
|
55
|
+
this.entityPoints = []
|
|
56
|
+
}
|
|
57
|
+
/**设置所有的标绘信息数据 */
|
|
58
|
+
public cdkSetAllPlots() {
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
/**编辑已有标绘 */
|
|
62
|
+
public cdkEditPlot() {
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
/**添加事件 */
|
|
66
|
+
private addEventListener() {
|
|
67
|
+
const { cevent, id, scene, position } = this.viewer;
|
|
68
|
+
cevent.on(`LEFT_CLICK.${id}`, (e: ScreenSpaceEventHandler.PositionedEvent) => {
|
|
69
|
+
this.onClick();
|
|
70
|
+
});
|
|
71
|
+
cevent.on(`MOUSE_MOVE.${id}`, (e: ScreenSpaceEventHandler.MotionEvent) => {
|
|
72
|
+
this.onMouseMove()
|
|
73
|
+
});
|
|
74
|
+
cevent.on(`LEFT_DOUBLE_CLICK.${id}`, (e: ScreenSpaceEventHandler.PositionedEvent) => {
|
|
75
|
+
this.onLeftDoubleClick()
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**创建实体 */
|
|
79
|
+
private createEntity(type: CDKPlotType) {
|
|
80
|
+
let entity;
|
|
81
|
+
switch (type) {
|
|
82
|
+
case 'circle': entity = this.entityCircle = new EntityEllipse({ ifChange: true, material: new PropertyMaterialRadar(), }); break;
|
|
83
|
+
case 'polygon': entity = this.entityPolygon = new EntityPolygon({ ifChange: true }); break;
|
|
84
|
+
case 'rect': entity = this.entityRect = new EntityRectangle({ ifChange: true }); break;
|
|
85
|
+
case 'line': entity = this.entityRect = new EntityRectangle({ ifChange: true }); break;
|
|
86
|
+
}
|
|
87
|
+
this.custom.entities.add(entity);
|
|
88
|
+
}
|
|
89
|
+
/**鼠标移动 */
|
|
90
|
+
private onMouseMove() {
|
|
91
|
+
this.handleCircleMove();
|
|
92
|
+
this.handleRectMove();
|
|
93
|
+
}
|
|
94
|
+
/**单击 */
|
|
95
|
+
private onClick() {
|
|
96
|
+
const { plotInfo: { positions, lnglats }, custom, flagClick, entityPoints } = this, { position, lnglat } = this.viewer;
|
|
97
|
+
if (!flagClick) return;
|
|
98
|
+
this.flagClick = false;
|
|
99
|
+
setTimeout(() => this.flagClick = true, 300);
|
|
100
|
+
entityPoints.push(custom.cdkAddArc({ position }));
|
|
101
|
+
positions.push(position.clone());
|
|
102
|
+
lnglats.push([...lnglat]);
|
|
103
|
+
this.handleCircleClick();
|
|
104
|
+
this.handlePolygonClick();
|
|
105
|
+
this.handleRectClick();
|
|
106
|
+
}
|
|
107
|
+
/**双击 */
|
|
108
|
+
private onLeftDoubleClick() {
|
|
109
|
+
this.handlePolygonDbclick();
|
|
110
|
+
this.cdkCloesPlot();
|
|
111
|
+
}
|
|
112
|
+
/**圆形的鼠标移动操作*/
|
|
113
|
+
private handleCircleMove() {
|
|
114
|
+
const { entityCircle, plotInfo: { positions } } = this, position = this.viewer.position;
|
|
115
|
+
if (!entityCircle) return;
|
|
116
|
+
if (positions.length == 0) {
|
|
117
|
+
/**确定中心位置 */
|
|
118
|
+
entityCircle.cdkSetPosition(position);
|
|
119
|
+
} else if (positions.length == 1) {
|
|
120
|
+
let distance = uc_getDistanceByCartesian3(positions[0], position);
|
|
121
|
+
entityCircle.cdkSetMajorAxis(distance);
|
|
122
|
+
entityCircle.cdkSetMinorAxis(distance);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**圆形的点击操作 */
|
|
126
|
+
private handleCircleClick() {
|
|
127
|
+
const { plotInfo: { positions }, entityCircle, point } = this;
|
|
128
|
+
if (!entityCircle) return;
|
|
129
|
+
if (positions.length >= 2) {
|
|
130
|
+
this.cdkCloesPlot();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**多边形的点击操作 */
|
|
134
|
+
private handlePolygonClick() {
|
|
135
|
+
const { plotInfo: { positions, lnglats }, entityPolygon, custom } = this, position = this.viewer.position;
|
|
136
|
+
if (!entityPolygon) return;
|
|
137
|
+
entityPolygon.cdkSetPositions([...positions, position]);
|
|
138
|
+
}
|
|
139
|
+
/**多边形的双击操作 */
|
|
140
|
+
private handlePolygonDbclick() {
|
|
141
|
+
const { plotInfo: { positions }, entityPolygon } = this;
|
|
142
|
+
if (!entityPolygon) return;
|
|
143
|
+
entityPolygon.cdkSetPositions(positions);
|
|
144
|
+
}
|
|
145
|
+
/**矩形的鼠标移动操作*/
|
|
146
|
+
private handleRectMove() {
|
|
147
|
+
const { entityRect, plotInfo: { positions, lnglats } } = this, lnglat = this.viewer.lnglat;
|
|
148
|
+
if (!entityRect) return;
|
|
149
|
+
if (lnglats.length == 1) {
|
|
150
|
+
entityRect.cdkSetCoordinates(lnglats[0], lnglat);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**矩形的点击操作 */
|
|
154
|
+
private handleRectClick() {
|
|
155
|
+
const { plotInfo: { positions }, entityRect, point } = this;
|
|
156
|
+
if (!entityRect) return;
|
|
157
|
+
if (positions.length >= 2) {
|
|
158
|
+
this.cdkCloesPlot();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**!------------------标绘相关类型----------------- */
|
|
164
|
+
/**标绘的类型 */
|
|
165
|
+
type CDKPlotType = 'circle' | 'polygon' | 'rect' | 'point' | 'line' | '';
|
|
166
|
+
/**标绘的信息 */
|
|
167
|
+
type CDKPlotInfo = {
|
|
168
|
+
/**名称 */
|
|
169
|
+
name?: string;
|
|
170
|
+
/**是否隐藏 */
|
|
171
|
+
ifHide?: boolean;
|
|
172
|
+
/**是否是编辑状态 */
|
|
173
|
+
ifEdit?: boolean;
|
|
174
|
+
/**半径 */
|
|
175
|
+
rail?: number;
|
|
176
|
+
/**类型 */
|
|
177
|
+
type: CDKPlotType;
|
|
178
|
+
/**经纬度集合(预留编辑时使用)*/
|
|
179
|
+
lnglats: LnglatHeight[];
|
|
180
|
+
/**C3集合 */
|
|
181
|
+
positions: Cartesian3[]
|
|
182
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CustomDataSource, Entity, Primitive } from "cesium";
|
|
2
|
+
import { EntityPoint } from "../../entities";
|
|
3
|
+
|
|
4
|
+
export class SceneCDKSource extends CustomDataSource {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
/**所有的小圆数据 */
|
|
9
|
+
protected _allArcs: any[] = [];
|
|
10
|
+
/**所有的线数据 */
|
|
11
|
+
protected _allLines: any[] = [];
|
|
12
|
+
/**所有的贝塞尔曲线数据 */
|
|
13
|
+
protected _allBLins: any[] = [];
|
|
14
|
+
/**所有的多边形数据 */
|
|
15
|
+
protected _allRects: any[] = [];
|
|
16
|
+
/**所有的文本数据 */
|
|
17
|
+
protected _allTexts: any[] = [];
|
|
18
|
+
/**所有的图片数据 */
|
|
19
|
+
protected _allImgs: any[] = [];
|
|
20
|
+
/**所有的Gif数据 */
|
|
21
|
+
protected _allGifs: any[] = [];
|
|
22
|
+
/**添加点 */
|
|
23
|
+
public cdkAddArc(opt: OptEntityPoint): EntityPoint {
|
|
24
|
+
let point = new EntityPoint(opt)
|
|
25
|
+
this.entities.add(point);
|
|
26
|
+
return point;
|
|
27
|
+
}
|
|
28
|
+
/**移除点 */
|
|
29
|
+
public cdkRemoveArc(entity: EntityPoint | string) {
|
|
30
|
+
const id = typeof entity === 'string' ? entity : entity.id;
|
|
31
|
+
this.entities.removeById(id)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Cesium3DTileFeature, Cesium3DTileset, CustomShader, LightingModel, Model, UniformType } from "cesium";
|
|
2
|
+
export class TileCustomShader extends CustomShader {
|
|
3
|
+
constructor() {
|
|
4
|
+
super({
|
|
5
|
+
lightingModel: LightingModel.UNLIT,
|
|
6
|
+
uniforms: {
|
|
7
|
+
maxHeight: {
|
|
8
|
+
type: UniformType.FLOAT,
|
|
9
|
+
value: 0.0,
|
|
10
|
+
},
|
|
11
|
+
minHeight: {
|
|
12
|
+
type: UniformType.FLOAT,
|
|
13
|
+
value: 0.0,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
fragmentShaderText: `
|
|
17
|
+
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
|
|
18
|
+
float curz = fsInput.attributes.positionMC.z;
|
|
19
|
+
float d = (curz - minHeight) / (maxHeight - minHeight);
|
|
20
|
+
float r = 0.01;
|
|
21
|
+
r = fract(r * czm_frameNumber);
|
|
22
|
+
float c = smoothstep(r, r+0.03, d) - smoothstep(r + 0.035,r + 0.04, d);
|
|
23
|
+
vec3 linearColor = mix(vec3(1.0,1.0,1.0) ,vec3(255.0,48.0,48.0)/255.0,r);
|
|
24
|
+
vec3 renderColor = mix(vec3(0.0,0.96,1.0) ,linearColor,c);
|
|
25
|
+
material.diffuse = renderColor;
|
|
26
|
+
//动态光环
|
|
27
|
+
//获取当前帧数 czm_frameNumber
|
|
28
|
+
// farct(x) 函数返回浮点数的小数部分
|
|
29
|
+
float time =fract(czm_frameNumber / 180.0);
|
|
30
|
+
//往返操作
|
|
31
|
+
time = abs(time - 0.5)*2.0;
|
|
32
|
+
//设置光环的位置
|
|
33
|
+
float diff =abs(clamp(curz/300.0,0.0,1.0) - time ) ;
|
|
34
|
+
if(diff < 0.02){
|
|
35
|
+
material.diffuse += vec3(0.5) ;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}`
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./3d-tileset";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//实体材质属性 MaterialPropertyRadar 的着色器代码
|
|
2
|
+
|
|
3
|
+
//旋转uv
|
|
4
|
+
vec2 newSt(float uTime, vec2 st){
|
|
5
|
+
return mat2(
|
|
6
|
+
cos(uTime), sin(uTime),
|
|
7
|
+
-sin(uTime), cos(uTime)
|
|
8
|
+
)*( st - 0.5 );
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
12
|
+
{
|
|
13
|
+
// 生成默认的基础材质
|
|
14
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
15
|
+
//获取st
|
|
16
|
+
vec2 st = newSt(uTime, materialInput.st ) + 0.5;
|
|
17
|
+
//设置圆外部透明 内部不透明
|
|
18
|
+
float alpha = 1.0 - step( 0.5, distance( st, vec2(0.5) ) );
|
|
19
|
+
//按照角度设置强弱
|
|
20
|
+
float angle = atan(st.x - 0.5 , st.y - 0.5);
|
|
21
|
+
float strength = (angle + 3.14 ) / 6.28;
|
|
22
|
+
material.alpha = alpha * strength;
|
|
23
|
+
material.diffuse = vec3( st, 0.0 );
|
|
24
|
+
return material;
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//实体材质属性 MaterialPropertyRoad 的着色器代码
|
|
2
|
+
|
|
3
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
4
|
+
{
|
|
5
|
+
// 生成默认的基础材质
|
|
6
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
7
|
+
//获取uv
|
|
8
|
+
vec2 st = materialInput.st;
|
|
9
|
+
//根据uv获取颜色
|
|
10
|
+
vec4 colorImage = texture(image0, vec2( fract(st.s + uTime0), st.t));
|
|
11
|
+
material.alpha = colorImage.a;
|
|
12
|
+
material.diffuse = colorImage.rgb;
|
|
13
|
+
return material;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 实体材质属性 MaterialPropertyTrailing 的着色器代码
|
|
3
|
+
* 带拖尾效果的短线
|
|
4
|
+
*/
|
|
5
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
6
|
+
{
|
|
7
|
+
// 生成默认的基础材质
|
|
8
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
9
|
+
//获取st
|
|
10
|
+
vec2 st = materialInput.st;
|
|
11
|
+
//当前百分比
|
|
12
|
+
float percent = fract( czm_frameNumber / ( 60.0 * 3.0) ) *( 1.1 );
|
|
13
|
+
//平滑过渡函数 smoothstep( a, b, value)
|
|
14
|
+
//当value小于a时,返回0.0;当value大于b时,返回1.0;当value在a和b之间时,返回一个平滑过渡的值
|
|
15
|
+
material.alpha = smoothstep( percent-0.1, percent , st.s) * step(-percent, -st.s);
|
|
16
|
+
material.diffuse = vec3( 0.7, 0.6, 1.0 );
|
|
17
|
+
return material;
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//实体材质属性 MaterialPropertyWall 的着色器代码
|
|
2
|
+
|
|
3
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
4
|
+
{
|
|
5
|
+
// 生成默认的基础材质
|
|
6
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
7
|
+
//获取st
|
|
8
|
+
vec2 st = materialInput.st;
|
|
9
|
+
|
|
10
|
+
float center = abs(fract(st.y*3.0)-0.5) ;
|
|
11
|
+
|
|
12
|
+
material.alpha = center;
|
|
13
|
+
|
|
14
|
+
material.diffuse = ucolor.xyz;
|
|
15
|
+
|
|
16
|
+
return material;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//实体材质属性 MaterialPropertyWall 的着色器代码
|
|
20
|
+
|
|
21
|
+
// czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
22
|
+
// {
|
|
23
|
+
// // 生成默认的基础材质
|
|
24
|
+
// czm_material material = czm_getDefaultMaterial(materialInput);
|
|
25
|
+
// //获取st
|
|
26
|
+
// vec2 st = materialInput.st;
|
|
27
|
+
// //根据uv获取颜色
|
|
28
|
+
// vec4 colorImage = texture(image0, vec2( fract(st.s *100.0 + uTime), fract(st.t)));
|
|
29
|
+
// material.diffuse = vec3(colorImage.xyz);
|
|
30
|
+
// return material;
|
|
31
|
+
// }
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
gl_FragCoord 片元中粒子的UV(屏幕坐标0-1000) //vec4
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
1.@attributes 属性 (从缓冲读取数据, 例如Geometry对象的attributes属性、uv属性、法线属性等)
|
|
5
|
+
2.@uniforms 全局变量 (一般用来对物体做整体变化、旋转、缩放,例如模型矩阵、视图矩阵、投影矩阵等)
|
|
6
|
+
3.@textures 纹理 (从像素或者纹理获得数据)
|
|
7
|
+
4.@varyings 变量 (将顶点着色器的变量传给片元着色器)
|
|
8
|
+
|
|
9
|
+
申明浮点数精度
|
|
10
|
+
1.@precision highp float; -2^16 ~ 2^16
|
|
11
|
+
2.@precision mediump float; -2^10 ~ 2^10
|
|
12
|
+
3.@precision lowp float; -2^8 ~ 2^8
|
|
13
|
+
|
|
14
|
+
物体坐标 @position * 模型矩阵 @modelMatrix * 视图矩阵 @viewMatrix * 投影矩阵 @projectionMatrix
|
|
15
|
+
(物体本身的坐标 vec4(p,1.0))*(物体放入世界坐标系时需要自行的缩放,平移,旋转操作)*(视点坐标,观察点坐标,上方向)*(如何投影平行投影或透视投影)
|
|
16
|
+
@gl_Position 顶点着色器的最终输出 /// vec4(r,g,b,a)
|
|
17
|
+
@gl_FragColor 片元着色器的最终输出 /// vec4(r,g,b,a)
|
|
18
|
+
|
|
19
|
+
基本类型
|
|
20
|
+
|
|
21
|
+
void 作为函数的返回类型,表示这个函数不返回值。
|
|
22
|
+
bool 布尔类型,可以是true 和false,以及可以产生布尔型的表达式。
|
|
23
|
+
int 整型,是十进制的,十六进制的,八进制的。
|
|
24
|
+
float 浮点型
|
|
25
|
+
bvec2(bvec3,bvec4) 包含2个布尔成分的向量
|
|
26
|
+
ivec2(ivec3,ivec4) 包含2个整型成分的向量
|
|
27
|
+
mat2或者mat2x2 2×2的浮点数矩阵类型(OpenGL的矩阵是列主顺序的)(mat3,mat4,mat2x3,mat2x4,mat3x2,mat3x4,mat4x2,mat4x3)
|
|
28
|
+
sampler1D 用于内建的纹理函数中引用指定的1D纹理的句柄。只可以作为一致变量或者函数参数使用
|
|
29
|
+
sampler2D 二维纹理句柄
|
|
30
|
+
sampler3D 三维纹理句柄
|
|
31
|
+
samplerCube cube map纹理句柄
|
|
32
|
+
sampler1DShadow 一维深度纹理句柄
|
|
33
|
+
sampler2DShadow 二维深度纹理句柄
|
|
34
|
+
|
|
35
|
+
1.3修饰符变量的声明可以使用如下的修饰符:
|
|
36
|
+
修饰符 描述
|
|
37
|
+
precision 指定数据精度级别precision highp float;mediump;lowp
|
|
38
|
+
const 常量值必须在声明时初始化。它是只读的不可修改的。
|
|
39
|
+
attribute 表示只读的顶点数据,只用在顶点着色器中。数据来自当前的顶点状态或者顶点数组。它必须是全局范围声明的,不能在函数内部。一个attribute可以是浮点数类型的标量,向量,或者矩阵。不可以是数组或者结构体
|
|
40
|
+
uniform 一致变量。在着色器执行期间一致变量的值是不变的。与const常量不同的是,这个值在编译时期是未知的是由着色器外部初始化的。一致变量在顶点着色器和片段着色器之间是共享的。它也只能在全局范围进行声明。
|
|
41
|
+
varying 顶点着色器的输出。例如颜色或者纹理坐标,(插值后的数据)作为片段着色器的只读输入数据。必须是全局范围声明的全局变量。可以是浮点数类型的标量,向量,矩阵。不能是数组或者结构体。 centorid varying 在没有多重采样的情况下,与varying是一样的意思。在多重采样时,centorid varying在光栅化的图形内部进行求值而不是在片段中心的固定位置求值。
|
|
42
|
+
centorid varying 在没有多重采样的情况下,与varying是一样的意思。在多重采样时,centorid varying在光栅化的图形内部进行求值而不是在片段中心的固定位置求值。
|
|
43
|
+
invariant (不变量)用于表示顶点着色器的输出和任何匹配片段着色器的输入,在不同的着色器中计算产生的值必须是一致的。所有的数据流和控制流,写入一个invariant变量的是一致的。编译器为了保证结果是完全一致的,需要放弃那些可能会导致不一致值的潜在的优化。除非必要,不要使用这个修饰符。在多通道渲染中避免z-fighting可能会使用到。
|
|
44
|
+
in 用在函数的参数中,表示这个参数是输入的,在函数中改变这个值,并不会影响对调用的函数产生副作用。(相当于C语言的传值),这个是函数参数默认的修饰符
|
|
45
|
+
out 用在函数的参数中,表示该参数是输出参数,值是会改变的。
|
|
46
|
+
inout 用在函数的参数,表示这个参数即是输入参数也是输出参数。
|
|
47
|
+
|
|
48
|
+
1.4 数组 GLSL中只能使用一维数组。数组的类型可以是一切基本类型或者结构体。声明方式如下:vec4 transMatrix[4];vec4 affineMatrix[4] = {0, 1, 2, 3};vec4 rotateMatrix = affineMatrix;1.5 结构体 结构体的定义方式和C语言类似,可以组合基本类型和数组来形成用户自定义的类型, 区别是GLSL的结构体不支持嵌套定义,只有预先声明的结构体可以嵌套其中,参考代码如下:struct rotateMatrix { float x; float y; float coeff[8];}struct positionInfo { vec2 coord; float value; rotateMatrix matrix;}
|
|
49
|
+
|
|
50
|
+
1.6 4×4 矩阵(如变换矩阵)表示空间变换(平移、旋转、缩放等)。vec4 表示一个四维向量 (x, y, z, w),通常用于表示三维坐标 (x, y, z),其中 w 为齐次分量(通常为 1.0 表示点,0.0 表示方向)。
|
|
51
|
+
┌ a b c d ┐ ┌ x ┐ ┌ ax + by + cz + dw ┐
|
|
52
|
+
│ e f g h │ × │ y │ = │ ex + fy + gz + hw │
|
|
53
|
+
│ i j k l │ │ z │ │ ix + jy + kz + lw │
|
|
54
|
+
└ m n o p ┘ └ w ┘ └ mx + ny + oz + pw ┘
|
|
55
|
+
|
|
56
|
+
# (以下所有的内置函数使用时可将该函数的*所有float*替换为*vec2*、*vec3*、*vec4*,能部分替换的会特殊申明)
|
|
57
|
+
# 角度和三角函数
|
|
58
|
+
# 将角度值转化为弧度值,即n*degree/180
|
|
59
|
+
float radians(float degree)
|
|
60
|
+
# 将弧度值转化为角度值,即180*radian/n
|
|
61
|
+
float degrees(float radian)
|
|
62
|
+
# 标准三角正弦函数,angie 是弧度值返回值在[-1,1]区间内
|
|
63
|
+
float sin(float angle)
|
|
64
|
+
# 标准三角余弦函数,angle 是弧度值返回值在[-1,1]区间内
|
|
65
|
+
float cos(float angle)
|
|
66
|
+
# 标准三角正切函数,angle 是弧度值
|
|
67
|
+
float tan(float angle)
|
|
68
|
+
# 反正弦函数,返回角度(弧度值)的正弦值为x。返四值在[-n/2,n/2】区间内,如果x<-1或者x>+1则返回未定义的值
|
|
69
|
+
float asin(float x)
|
|
70
|
+
# 反余弦函数,返回角度(弧度值)的余弦值为x。返回值在[-n/2,n/2]区间内,如果x<-1或者x>+1则返回未定义的值
|
|
71
|
+
float acos(float x)
|
|
72
|
+
# 反正切函数,返回角度(弧度值)的正切值为y/x。x和y的符号决定了角度在哪个象限,返回角度在[-n,n]区间中。如果x和y都是0,则返回未定义的值。注意,对于矢量而言,这是一个逐分量的运算
|
|
73
|
+
float atan(float y,float x)
|
|
74
|
+
# 反正切函数,返回角度(弧度值)的正切值为y/x。x和y的符号决定了角度在哪个象限,返回角度在【-n,n]区间中。如果x和y都是0,则返回未定义的值。注意,对于矢量而言,这是一个逐分量的运算
|
|
75
|
+
float atan(float y_over_x)
|
|
76
|
+
|
|
77
|
+
# 指数函数
|
|
78
|
+
# 返回x的y次幂,即x。如果x<0,则返回未定义值。如果x=0而y<0,则返回未定义值。注意,对于矢量而言,这是一个逐分量的运算
|
|
79
|
+
float pow(float x,float y)
|
|
80
|
+
# 返回x的自然指数幂,即 e x
|
|
81
|
+
float exp(float x)
|
|
82
|
+
# 返回x的自然对数,即返回y使得满足x=e”如果x<0,则返回未定义值
|
|
83
|
+
float log(float x)
|
|
84
|
+
# 返回2的X次幂,即2
|
|
85
|
+
float exp2(float x)
|
|
86
|
+
# 返回以2为底的对数值,即返回y使得满足x=2^y 如果x≤0,则返回未定义值
|
|
87
|
+
float log2 (float x)
|
|
88
|
+
# 返回√ ̄x。如果x<0,则返回未定义值
|
|
89
|
+
float sqrt(float x)
|
|
90
|
+
# 返回1 / √ ̄x。如果x<0,则返四未定义值
|
|
91
|
+
float inversesqrt(float x)
|
|
92
|
+
|
|
93
|
+
# 通用函数
|
|
94
|
+
# 返回x的无符号绝对值,即如果x>0,返回x,否期返回-X
|
|
95
|
+
float abs(float x)
|
|
96
|
+
# 如果x>0返回1.0,如果x=0返回0.0,否期返回-1.0
|
|
97
|
+
float sign(float x)
|
|
98
|
+
# 返回小于等于x且最接近x的整数
|
|
99
|
+
float floor(float x)
|
|
100
|
+
# 返回大于等于x且最接近x的整数
|
|
101
|
+
float ceil(float x)
|
|
102
|
+
# 返回x的小数部分,即返回x-floor(x)
|
|
103
|
+
float fract(float x)
|
|
104
|
+
# 模数(模),返回x除以y的余数,即(x-y*floor(x/y))给定两个正整数x和y,mod(x,y)可以求得x除以y的余数。注意,对于矢量而言,这是一个逐分量的运算
|
|
105
|
+
float mod(float x,float y)
|
|
106
|
+
vec2 mod(vec2 x,float y) vec3 mod(vec3 x,float y) vec4 mod(vec4 x,float y)
|
|
107
|
+
# 返回最小值,即如果y<x则返回y,否则返回x,注意,对于矢量而言,这是一个逐分量的运算
|
|
108
|
+
float min(float x,float y)
|
|
109
|
+
vec2 min(vec2 x,float y) vec3 min(vec3 x,float y) vec4 min(vec4 x,float y)
|
|
110
|
+
# 返回最大值,即如果x<y则返回y,否则返回X。注意,对于矢量而言,这是一个逐分量的运算
|
|
111
|
+
float max(float x,float y)
|
|
112
|
+
vec2 max(vec2 Xfloat y) vec3 max(vec3 x,float y) vec4 max(vec4 x,float y)
|
|
113
|
+
# 将x限制在minVal和max之间,即返回min(max(x,minVal),max)如果minVal>max,则返回未定义值
|
|
114
|
+
float clamp(float x,float min,float max)
|
|
115
|
+
vec2 clamp(vec2 x,float minVal,float max) vec3 clamp(vec3 x,float minVal,float max) vec4 clamp(vec4x,float minVal,float max)
|
|
116
|
+
# 返四x和y的线性混合,即x*(1-a)+y*a
|
|
117
|
+
float mix(float x,float y,float a)
|
|
118
|
+
vec2 mix(vec2 x,vec2 y,float a) vec3 mix(vec3 x,vec3 y,float a) vec4 mix(vec4 x,vec4 y,float a)
|
|
119
|
+
vec2 mix(vec2 x,float y,vec2 a) vec3 mix(vec3 x,float y,vec3 a) vec4 mix(vec4 X,float y,vec4 a)
|
|
120
|
+
# 根据两个数值生成阶梯函数,即,如果x<edge则返回0.0,否则返四1.0
|
|
121
|
+
float step(float edge,float x)
|
|
122
|
+
vec2 step(float edge,vec2 x) vec3 step(lloat edge,vec3 x) vec4 step(float edge,vec4 X)
|
|
123
|
+
# 经过 Hermite插值的阶梯函数。如果xSedge0则返回0.0.如果x2edge1则返四1.0,否则按照如下方法插值出一个值并返回 //genType is float、vec2、vec3 道 vec4genType t;t-clamp((x-edge0)/(edge1-edge0),0,1)EeといEn t*t*(3-2*七),如果egde0zedge1 则返四未定义值
|
|
124
|
+
float smoothstep(float edge0,float eage1,float x)
|
|
125
|
+
|
|
126
|
+
# (以下所有的内置函数使用时不能将该函数的*所有float*替换为*vec2*、*vec3*、*vec4*,能替换的会申明)
|
|
127
|
+
# 几何函数
|
|
128
|
+
# 返回失量x的长度
|
|
129
|
+
float length(float x) float length(vec2 x) float length(vec3 x) float length(vec4 x)
|
|
130
|
+
# 返回p0和P之间的距离,即1ength(p0-p1)
|
|
131
|
+
float distance(float p0,float p1) float distance(vec2 p0,vec2 p1) float distance(vec3 p0,vec3 pl) float distance(vec4 p0,vec4 p1)
|
|
132
|
+
# 返回x和y的点积,对于vec3而言,就是x[0]*y[0]+x[1]*y[1]+x[2]*y[2]
|
|
133
|
+
float dot(float x,float y) float dot(vec2 x,vec2 y) float dot(vec3 x,vec3 y) float dot(vec4 x,vec4 y)
|
|
134
|
+
# 返回x和y的又积,对于vec3而言,就是reslut[0]=x[1]*y[2]-y[1]*x[2]result[1]=x[2]*y[0]-y[2]*x[0]result[2]-x[0]*y[1]-y[0]*x[1]
|
|
135
|
+
vec3 cross(vec3 X,vec3 y)
|
|
136
|
+
# 对x进行归一化,保持矢量方向不变但长度为1,即 x/length(x)
|
|
137
|
+
float normalize(float x)
|
|
138
|
+
# 法向量反向(如果需要)操作,根据入射矢量N和参考失量Wref 来调整法向量。如果dot(Nzef,I)<0则返回N,否则返回-N
|
|
139
|
+
float faceforward(float N,float I,float Nref)
|
|
140
|
+
# 计算反射失量。入射矢量为I,表面法向量为N,近回 I-2 * dot(N,T) * N 。注意,N必须已经被归一化
|
|
141
|
+
float reflect(float I,float N)
|
|
142
|
+
# 根据入射光和介质特性计算折射现象。入射光方向为I,表面法向量为N,介质的折射率为eta,
|
|
143
|
+
# 返回被折射后的光线方向k=1,0-eta*eta*(1.0-dot(N,I)*dot(N,I))if(k<0.0) //genTyp包括float、vec2、vec3vec4返回 genType(0.0)
|
|
144
|
+
# 或者返回 eta*-(eta*dot(N,I)+sqrt(k))*N注意,入射光矢量 I 和表面法向量N必须已经被归一化
|
|
145
|
+
float refract(float I,float N,float eta)
|
|
146
|
+
vec2 refract(vec2 I,vec2 N,float eta)
|
|
147
|
+
vec2 refract(vec3 I,vec3 N,float eta)
|
|
148
|
+
vec4 refract(vec4 I,vec4 N,float eta)
|
|
149
|
+
|
|
150
|
+
# 矩阵函数
|
|
151
|
+
# 将矩阵x和矩阵y逐元素相乘,也就是说,result=matrixCompMatrix(x,y) 则 result[i][j]-x[i][j]*y[i][j]
|
|
152
|
+
mat2 matrixCompMult(mat2 x,mat2 y)
|
|
153
|
+
mat3 matrixCompMult(mat3 x,mat3 y)
|
|
154
|
+
mat4 matrixcompMult(mat4 x,mat4 y)
|
|
155
|
+
# 矢量函数(可类推vec3、vec4、ivec2、ivec3、ivec4)
|
|
156
|
+
# 逐分量比较 x<y是否成立
|
|
157
|
+
bvec2 lessThan(vec2 X,vec2 y)
|
|
158
|
+
# 逐分量比较x≤y是否成立
|
|
159
|
+
bvec2 lessThanEqual(vec2 x,vec2 y)
|
|
160
|
+
# 逐分量比较x>y是否成立
|
|
161
|
+
bvec2 greaterThan(vec2 x,vec2 y)
|
|
162
|
+
# 逐分量比较x≥y是否成立
|
|
163
|
+
bvec2 greaterThanEqual(vec2 x,vec2 y)
|
|
164
|
+
# 逐分量比较x==y是否成立
|
|
165
|
+
bvec2 equal(vec2 x,vec2 y)
|
|
166
|
+
# 逐分量比较x!=y是否成立
|
|
167
|
+
bvec2 notEqual(vec2 x,vec2 y)
|
|
168
|
+
# 失量的任意分量为true,则返回true
|
|
169
|
+
bool any(bvec2 x)
|
|
170
|
+
# 失量的所有分量都为true,则返回true
|
|
171
|
+
boo1 all(bvec2 x)
|
|
172
|
+
# 失量逐分量的逻辑补运算
|
|
173
|
+
bvec2 not(bvec2 x)
|
|
174
|
+
# 纹理查询函数
|
|
175
|
+
# 使用纹理坐标 coord,从当前绑定到sampler的二维纹理中读取相应的纹素。对于投影版本(常有Proj的),纹理坐标将从 coord 的最后一个分量中解析出来,而 vec4 类型的coord 的第3个分量将被忽略参数bias 只可在片元着色器中使用,它表示在sampler是MIPMAP纹理时,加在当前Iod 上的值
|
|
176
|
+
vec4 texture2D(sampler2D sampler,vec2 coord)
|
|
177
|
+
vec4 texture2D(sampler2D sampler,vec2 coord,float bias)
|
|
178
|
+
vec4 texture2DProi(sampler2D sampler,vec3 coord)
|
|
179
|
+
vec4 texture2DProj(sampler2D sampler,vec3 coord,float bias)
|
|
180
|
+
vec4 texture2DProi(sampler2Dsampler,vec4cod)
|
|
181
|
+
vec4 texture2DProj(sampler2D sampler,vec4 coord,float bias)
|
|
182
|
+
vec4 texture2DLod(sampler2D sampler,vec2 coord,float lod)
|
|
183
|
+
vec4 texture2DProjLod(sampler2D sampler,vec3 coord,Toat lod)
|
|
184
|
+
# 使用纹理坐标coord,从绑定到sampler的主方体纹理中读取响应纹素。coord 的方向可用来指定立方体纹理的表面
|
|
185
|
+
vec4 textureCube(samplerCube sampler,vec3 coord)
|
|
186
|
+
vec4 textureCube(samplerCube sampler,vec3 coord,float bias)
|
|
187
|
+
vec4 textureCubeLod(samplerCube sampler,vec3 coord,float lod)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
in vec3 position3DHigh;
|
|
2
|
+
in vec3 position3DLow;
|
|
3
|
+
in vec2 st;
|
|
4
|
+
in float batchId;
|
|
5
|
+
|
|
6
|
+
out vec3 v_positionMC;
|
|
7
|
+
out vec3 v_positionEC;
|
|
8
|
+
out vec2 v_st;
|
|
9
|
+
|
|
10
|
+
void main()
|
|
11
|
+
{
|
|
12
|
+
vec4 p = czm_computePosition();
|
|
13
|
+
|
|
14
|
+
v_positionMC = position3DHigh + position3DLow; // position in model coordinates
|
|
15
|
+
v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
|
|
16
|
+
v_st = st;
|
|
17
|
+
|
|
18
|
+
gl_Position = czm_modelViewProjectionRelativeToEye * p;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scene/TJG/scene-tjg'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as Cesium from 'cesium';
|
|
2
|
+
declare global {
|
|
3
|
+
/** left-top浮层左上与鼠标点一致 | left-bottom左下与鼠标点一致 | right-top右上 | right-bottom右下*/
|
|
4
|
+
type OverlayPosition = "left-top" | "left-bottom" | "right-top" | "right-bottom";
|
|
5
|
+
/**弹窗浮层覆盖层dom的相关配置 */
|
|
6
|
+
interface COverlayOpt {
|
|
7
|
+
/**传给弹窗的内容 */
|
|
8
|
+
ele?: HTMLElement;
|
|
9
|
+
/**指定dom的类名 */
|
|
10
|
+
className?: string;
|
|
11
|
+
/**浮层与鼠标🖱连接点 */
|
|
12
|
+
positon?: OverlayPosition;
|
|
13
|
+
/**X轴偏移量 */
|
|
14
|
+
x?: number;
|
|
15
|
+
/**Y轴偏移量 */
|
|
16
|
+
y?: number;
|
|
17
|
+
/**是否挂载事件 */
|
|
18
|
+
ifEvent?: boolean;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ClockViewModel, ContextOptions, DataSourceCollection, GeocoderService, Globe, ImageryLayer, MapMode2D, MapProjection, ProviderViewModel, SceneMode, ShadowMode, SkyAtmosphere, SkyBox, Terrain, TerrainProvider, Viewer } from "cesium";
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
/**经纬度高度 */
|
|
5
|
+
type LnglatHeight = [number, number, number?]
|
|
6
|
+
}
|