@reearth/core 0.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/README.md +18 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
- package/dist/cesium/Assets/Images/bing_maps_credit.png +0 -0
- package/dist/cesium/Assets/Images/cesium_credit.png +0 -0
- package/dist/cesium/Assets/Images/google_earth_credit.png +0 -0
- package/dist/cesium/Assets/Images/ion-credit.png +0 -0
- package/dist/cesium/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
- package/dist/cesium/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
- package/dist/cesium/Assets/Textures/maki/airfield.png +0 -0
- package/dist/cesium/Assets/Textures/maki/airport.png +0 -0
- package/dist/cesium/Assets/Textures/maki/alcohol-shop.png +0 -0
- package/dist/cesium/Assets/Textures/maki/america-football.png +0 -0
- package/dist/cesium/Assets/Textures/maki/art-gallery.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bakery.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bank.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bar.png +0 -0
- package/dist/cesium/Assets/Textures/maki/baseball.png +0 -0
- package/dist/cesium/Assets/Textures/maki/basketball.png +0 -0
- package/dist/cesium/Assets/Textures/maki/beer.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bicycle.png +0 -0
- package/dist/cesium/Assets/Textures/maki/building.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bus.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cafe.png +0 -0
- package/dist/cesium/Assets/Textures/maki/camera.png +0 -0
- package/dist/cesium/Assets/Textures/maki/campsite.png +0 -0
- package/dist/cesium/Assets/Textures/maki/car.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cemetery.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cesium.png +0 -0
- package/dist/cesium/Assets/Textures/maki/chemist.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cinema.png +0 -0
- package/dist/cesium/Assets/Textures/maki/circle-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/circle.png +0 -0
- package/dist/cesium/Assets/Textures/maki/city.png +0 -0
- package/dist/cesium/Assets/Textures/maki/clothing-store.png +0 -0
- package/dist/cesium/Assets/Textures/maki/college.png +0 -0
- package/dist/cesium/Assets/Textures/maki/commercial.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cricket.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cross.png +0 -0
- package/dist/cesium/Assets/Textures/maki/dam.png +0 -0
- package/dist/cesium/Assets/Textures/maki/danger.png +0 -0
- package/dist/cesium/Assets/Textures/maki/disability.png +0 -0
- package/dist/cesium/Assets/Textures/maki/dog-park.png +0 -0
- package/dist/cesium/Assets/Textures/maki/embassy.png +0 -0
- package/dist/cesium/Assets/Textures/maki/emergency-telephone.png +0 -0
- package/dist/cesium/Assets/Textures/maki/entrance.png +0 -0
- package/dist/cesium/Assets/Textures/maki/farm.png +0 -0
- package/dist/cesium/Assets/Textures/maki/fast-food.png +0 -0
- package/dist/cesium/Assets/Textures/maki/ferry.png +0 -0
- package/dist/cesium/Assets/Textures/maki/fire-station.png +0 -0
- package/dist/cesium/Assets/Textures/maki/fuel.png +0 -0
- package/dist/cesium/Assets/Textures/maki/garden.png +0 -0
- package/dist/cesium/Assets/Textures/maki/gift.png +0 -0
- package/dist/cesium/Assets/Textures/maki/golf.png +0 -0
- package/dist/cesium/Assets/Textures/maki/grocery.png +0 -0
- package/dist/cesium/Assets/Textures/maki/hairdresser.png +0 -0
- package/dist/cesium/Assets/Textures/maki/harbor.png +0 -0
- package/dist/cesium/Assets/Textures/maki/heart.png +0 -0
- package/dist/cesium/Assets/Textures/maki/heliport.png +0 -0
- package/dist/cesium/Assets/Textures/maki/hospital.png +0 -0
- package/dist/cesium/Assets/Textures/maki/ice-cream.png +0 -0
- package/dist/cesium/Assets/Textures/maki/industrial.png +0 -0
- package/dist/cesium/Assets/Textures/maki/land-use.png +0 -0
- package/dist/cesium/Assets/Textures/maki/laundry.png +0 -0
- package/dist/cesium/Assets/Textures/maki/library.png +0 -0
- package/dist/cesium/Assets/Textures/maki/lighthouse.png +0 -0
- package/dist/cesium/Assets/Textures/maki/lodging.png +0 -0
- package/dist/cesium/Assets/Textures/maki/logging.png +0 -0
- package/dist/cesium/Assets/Textures/maki/london-underground.png +0 -0
- package/dist/cesium/Assets/Textures/maki/marker-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/marker.png +0 -0
- package/dist/cesium/Assets/Textures/maki/minefield.png +0 -0
- package/dist/cesium/Assets/Textures/maki/mobilephone.png +0 -0
- package/dist/cesium/Assets/Textures/maki/monument.png +0 -0
- package/dist/cesium/Assets/Textures/maki/museum.png +0 -0
- package/dist/cesium/Assets/Textures/maki/music.png +0 -0
- package/dist/cesium/Assets/Textures/maki/oil-well.png +0 -0
- package/dist/cesium/Assets/Textures/maki/park.png +0 -0
- package/dist/cesium/Assets/Textures/maki/park2.png +0 -0
- package/dist/cesium/Assets/Textures/maki/parking-garage.png +0 -0
- package/dist/cesium/Assets/Textures/maki/parking.png +0 -0
- package/dist/cesium/Assets/Textures/maki/pharmacy.png +0 -0
- package/dist/cesium/Assets/Textures/maki/pitch.png +0 -0
- package/dist/cesium/Assets/Textures/maki/place-of-worship.png +0 -0
- package/dist/cesium/Assets/Textures/maki/playground.png +0 -0
- package/dist/cesium/Assets/Textures/maki/police.png +0 -0
- package/dist/cesium/Assets/Textures/maki/polling-place.png +0 -0
- package/dist/cesium/Assets/Textures/maki/post.png +0 -0
- package/dist/cesium/Assets/Textures/maki/prison.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail-above.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail-light.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail-metro.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail-underground.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail.png +0 -0
- package/dist/cesium/Assets/Textures/maki/religious-christian.png +0 -0
- package/dist/cesium/Assets/Textures/maki/religious-jewish.png +0 -0
- package/dist/cesium/Assets/Textures/maki/religious-muslim.png +0 -0
- package/dist/cesium/Assets/Textures/maki/restaurant.png +0 -0
- package/dist/cesium/Assets/Textures/maki/roadblock.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rocket.png +0 -0
- package/dist/cesium/Assets/Textures/maki/school.png +0 -0
- package/dist/cesium/Assets/Textures/maki/scooter.png +0 -0
- package/dist/cesium/Assets/Textures/maki/shop.png +0 -0
- package/dist/cesium/Assets/Textures/maki/skiing.png +0 -0
- package/dist/cesium/Assets/Textures/maki/slaughterhouse.png +0 -0
- package/dist/cesium/Assets/Textures/maki/soccer.png +0 -0
- package/dist/cesium/Assets/Textures/maki/square-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/square.png +0 -0
- package/dist/cesium/Assets/Textures/maki/star-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/star.png +0 -0
- package/dist/cesium/Assets/Textures/maki/suitcase.png +0 -0
- package/dist/cesium/Assets/Textures/maki/swimming.png +0 -0
- package/dist/cesium/Assets/Textures/maki/telephone.png +0 -0
- package/dist/cesium/Assets/Textures/maki/tennis.png +0 -0
- package/dist/cesium/Assets/Textures/maki/theatre.png +0 -0
- package/dist/cesium/Assets/Textures/maki/toilets.png +0 -0
- package/dist/cesium/Assets/Textures/maki/town-hall.png +0 -0
- package/dist/cesium/Assets/Textures/maki/town.png +0 -0
- package/dist/cesium/Assets/Textures/maki/triangle-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/triangle.png +0 -0
- package/dist/cesium/Assets/Textures/maki/village.png +0 -0
- package/dist/cesium/Assets/Textures/maki/warehouse.png +0 -0
- package/dist/cesium/Assets/Textures/maki/waste-basket.png +0 -0
- package/dist/cesium/Assets/Textures/maki/water.png +0 -0
- package/dist/cesium/Assets/Textures/maki/wetland.png +0 -0
- package/dist/cesium/Assets/Textures/maki/zoo.png +0 -0
- package/dist/cesium/Assets/Textures/moonSmall.jpg +0 -0
- package/dist/cesium/Assets/Textures/pin.svg +1 -0
- package/dist/cesium/Assets/Textures/waterNormals.jpg +0 -0
- package/dist/cesium/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/dist/cesium/Assets/approximateTerrainHeights.json +1 -0
- package/dist/cesium/ThirdParty/Workers/package.json +1 -0
- package/dist/cesium/ThirdParty/Workers/pako_deflate.min.js +1 -0
- package/dist/cesium/ThirdParty/Workers/pako_inflate.min.js +1 -0
- package/dist/cesium/ThirdParty/Workers/z-worker-pako.js +1 -0
- package/dist/cesium/ThirdParty/basis_transcoder.wasm +0 -0
- package/dist/cesium/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/cesium/ThirdParty/google-earth-dbroot-parser.js +1 -0
- package/dist/cesium/Widgets/Animation/Animation.css +127 -0
- package/dist/cesium/Widgets/Animation/lighter.css +70 -0
- package/dist/cesium/Widgets/BaseLayerPicker/BaseLayerPicker.css +108 -0
- package/dist/cesium/Widgets/BaseLayerPicker/lighter.css +22 -0
- package/dist/cesium/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +102 -0
- package/dist/cesium/Widgets/CesiumInspector/CesiumInspector.css +113 -0
- package/dist/cesium/Widgets/CesiumWidget/CesiumWidget.css +124 -0
- package/dist/cesium/Widgets/CesiumWidget/lighter.css +14 -0
- package/dist/cesium/Widgets/FullscreenButton/FullscreenButton.css +8 -0
- package/dist/cesium/Widgets/Geocoder/Geocoder.css +70 -0
- package/dist/cesium/Widgets/Geocoder/lighter.css +17 -0
- package/dist/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/Mouse.svg +84 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/Touch.svg +120 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
- package/dist/cesium/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
- package/dist/cesium/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
- package/dist/cesium/Widgets/Images/TimelineIcons.png +0 -0
- package/dist/cesium/Widgets/Images/info-loading.gif +0 -0
- package/dist/cesium/Widgets/InfoBox/InfoBox.css +92 -0
- package/dist/cesium/Widgets/InfoBox/InfoBoxDescription.css +178 -0
- package/dist/cesium/Widgets/NavigationHelpButton/NavigationHelpButton.css +93 -0
- package/dist/cesium/Widgets/NavigationHelpButton/lighter.css +38 -0
- package/dist/cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
- package/dist/cesium/Widgets/ProjectionPicker/ProjectionPicker.css +38 -0
- package/dist/cesium/Widgets/SceneModePicker/SceneModePicker.css +56 -0
- package/dist/cesium/Widgets/SelectionIndicator/SelectionIndicator.css +20 -0
- package/dist/cesium/Widgets/Timeline/Timeline.css +103 -0
- package/dist/cesium/Widgets/Timeline/lighter.css +23 -0
- package/dist/cesium/Widgets/VRButton/VRButton.css +8 -0
- package/dist/cesium/Widgets/Viewer/Viewer.css +107 -0
- package/dist/cesium/Widgets/VoxelInspector/VoxelInspector.css +16 -0
- package/dist/cesium/Widgets/lighter.css +237 -0
- package/dist/cesium/Widgets/lighterShared.css +46 -0
- package/dist/cesium/Widgets/shared.css +103 -0
- package/dist/cesium/Widgets/widgets.css +1346 -0
- package/dist/cesium/Workers/chunk-2ED5WI77.js +26 -0
- package/dist/cesium/Workers/chunk-2MBPFWCP.js +26 -0
- package/dist/cesium/Workers/chunk-3C74MLG3.js +26 -0
- package/dist/cesium/Workers/chunk-45U7TTT3.js +26 -0
- package/dist/cesium/Workers/chunk-4N7SRDH5.js +26 -0
- package/dist/cesium/Workers/chunk-4T6AS6BZ.js +26 -0
- package/dist/cesium/Workers/chunk-5AG2MVRM.js +26 -0
- package/dist/cesium/Workers/chunk-5Z6L2FHX.js +26 -0
- package/dist/cesium/Workers/chunk-6AUUBDOF.js +26 -0
- package/dist/cesium/Workers/chunk-74N6MC2V.js +26 -0
- package/dist/cesium/Workers/chunk-7VJK3KHI.js +26 -0
- package/dist/cesium/Workers/chunk-7VZHIB6P.js +26 -0
- package/dist/cesium/Workers/chunk-7X2YQ6I4.js +27 -0
- package/dist/cesium/Workers/chunk-B2SKQ7LU.js +26 -0
- package/dist/cesium/Workers/chunk-B4TQDFIE.js +26 -0
- package/dist/cesium/Workers/chunk-B6TRTFAA.js +26 -0
- package/dist/cesium/Workers/chunk-BK3HCS7I.js +26 -0
- package/dist/cesium/Workers/chunk-BOPB43LN.js +26 -0
- package/dist/cesium/Workers/chunk-C6DMEJQ7.js +26 -0
- package/dist/cesium/Workers/chunk-CN7UN2OZ.js +26 -0
- package/dist/cesium/Workers/chunk-CSISXEG7.js +26 -0
- package/dist/cesium/Workers/chunk-CUOR5F7T.js +28 -0
- package/dist/cesium/Workers/chunk-DGCK3LD2.js +30 -0
- package/dist/cesium/Workers/chunk-DXEZYE3K.js +62 -0
- package/dist/cesium/Workers/chunk-EXBFEYPQ.js +26 -0
- package/dist/cesium/Workers/chunk-FK5KFB6H.js +26 -0
- package/dist/cesium/Workers/chunk-HPBHKP5S.js +26 -0
- package/dist/cesium/Workers/chunk-JCJ24DHF.js +26 -0
- package/dist/cesium/Workers/chunk-JEWHFDAA.js +26 -0
- package/dist/cesium/Workers/chunk-JZLZJJQD.js +26 -0
- package/dist/cesium/Workers/chunk-KRZBI2MU.js +26 -0
- package/dist/cesium/Workers/chunk-KTTUANTJ.js +26 -0
- package/dist/cesium/Workers/chunk-LDCAXLGS.js +26 -0
- package/dist/cesium/Workers/chunk-LOPN5R3I.js +26 -0
- package/dist/cesium/Workers/chunk-MDLPQIMP.js +26 -0
- package/dist/cesium/Workers/chunk-MRR3RGFO.js +26 -0
- package/dist/cesium/Workers/chunk-NPBZI5YA.js +26 -0
- package/dist/cesium/Workers/chunk-NUSW5B6A.js +26 -0
- package/dist/cesium/Workers/chunk-OUXRUXNB.js +26 -0
- package/dist/cesium/Workers/chunk-QPOPEH3M.js +26 -0
- package/dist/cesium/Workers/chunk-R2AN7EKC.js +26 -0
- package/dist/cesium/Workers/chunk-RURL6ZX2.js +26 -0
- package/dist/cesium/Workers/chunk-SUQM3OSW.js +28 -0
- package/dist/cesium/Workers/chunk-UBIRX2SP.js +26 -0
- package/dist/cesium/Workers/chunk-VAKC5J5C.js +26 -0
- package/dist/cesium/Workers/chunk-VHNZBQTR.js +27 -0
- package/dist/cesium/Workers/chunk-VKV642QV.js +26 -0
- package/dist/cesium/Workers/chunk-VMSXG4OA.js +26 -0
- package/dist/cesium/Workers/chunk-VQZSIOZW.js +26 -0
- package/dist/cesium/Workers/chunk-WZUWQMI7.js +26 -0
- package/dist/cesium/Workers/chunk-YBI55DLZ.js +26 -0
- package/dist/cesium/Workers/chunk-YEJWCH6C.js +26 -0
- package/dist/cesium/Workers/chunk-YPDO7SPO.js +26 -0
- package/dist/cesium/Workers/chunk-ZYWD6OQH.js +26 -0
- package/dist/cesium/Workers/combineGeometry.js +26 -0
- package/dist/cesium/Workers/createBoxGeometry.js +26 -0
- package/dist/cesium/Workers/createBoxOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createCircleGeometry.js +26 -0
- package/dist/cesium/Workers/createCircleOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createCoplanarPolygonGeometry.js +26 -0
- package/dist/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createCorridorGeometry.js +26 -0
- package/dist/cesium/Workers/createCorridorOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createCylinderGeometry.js +26 -0
- package/dist/cesium/Workers/createCylinderOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createEllipseGeometry.js +26 -0
- package/dist/cesium/Workers/createEllipseOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createEllipsoidGeometry.js +26 -0
- package/dist/cesium/Workers/createEllipsoidOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createFrustumGeometry.js +26 -0
- package/dist/cesium/Workers/createFrustumOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createGeometry.js +26 -0
- package/dist/cesium/Workers/createGroundPolylineGeometry.js +26 -0
- package/dist/cesium/Workers/createPlaneGeometry.js +26 -0
- package/dist/cesium/Workers/createPlaneOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createPolygonGeometry.js +26 -0
- package/dist/cesium/Workers/createPolygonOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createPolylineGeometry.js +26 -0
- package/dist/cesium/Workers/createPolylineVolumeGeometry.js +26 -0
- package/dist/cesium/Workers/createPolylineVolumeOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createRectangleGeometry.js +26 -0
- package/dist/cesium/Workers/createRectangleOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createSimplePolylineGeometry.js +26 -0
- package/dist/cesium/Workers/createSphereGeometry.js +26 -0
- package/dist/cesium/Workers/createSphereOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createTaskProcessorWorker.js +26 -0
- package/dist/cesium/Workers/createVectorTileClampedPolylines.js +26 -0
- package/dist/cesium/Workers/createVectorTileGeometries.js +26 -0
- package/dist/cesium/Workers/createVectorTilePoints.js +26 -0
- package/dist/cesium/Workers/createVectorTilePolygons.js +26 -0
- package/dist/cesium/Workers/createVectorTilePolylines.js +26 -0
- package/dist/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -0
- package/dist/cesium/Workers/createVerticesFromHeightmap.js +26 -0
- package/dist/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -0
- package/dist/cesium/Workers/createWallGeometry.js +26 -0
- package/dist/cesium/Workers/createWallOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/decodeDraco.js +26 -0
- package/dist/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +26 -0
- package/dist/cesium/Workers/decodeI3S.js +26 -0
- package/dist/cesium/Workers/transcodeKTX2.js +56 -0
- package/dist/cesium/Workers/transferTypedArrayTest.js +26 -0
- package/dist/cesium/Workers/upsampleQuantizedTerrainMesh.js +26 -0
- package/dist/core.js +83397 -0
- package/dist/core.umd.cjs +6710 -0
- package/dist/index-DqatWUTw.js +3225 -0
- package/dist/index.d.ts +1760 -0
- package/package.json +115 -0
- package/src/Map/ClusteredLayers/index.tsx +106 -0
- package/src/Map/Layer/hooks.ts +180 -0
- package/src/Map/Layer/index.tsx +92 -0
- package/src/Map/Layers/hooks.test.ts +819 -0
- package/src/Map/Layers/hooks.ts +955 -0
- package/src/Map/Layers/index.test.tsx +188 -0
- package/src/Map/Layers/index.tsx +76 -0
- package/src/Map/Layers/keys.ts +51 -0
- package/src/Map/Layers/utils.test.ts +53 -0
- package/src/Map/Layers/utils.ts +37 -0
- package/src/Map/Sketch/hooks.ts +641 -0
- package/src/Map/Sketch/index.tsx +101 -0
- package/src/Map/Sketch/preset.ts +29 -0
- package/src/Map/Sketch/sketchMachine.ts +323 -0
- package/src/Map/Sketch/sketchMachine.typegen.ts +72 -0
- package/src/Map/Sketch/types.ts +52 -0
- package/src/Map/Sketch/utils.ts +24 -0
- package/src/Map/hooks.ts +127 -0
- package/src/Map/index.tsx +147 -0
- package/src/Map/ref.ts +147 -0
- package/src/Map/types/event.ts +104 -0
- package/src/Map/types/index.ts +545 -0
- package/src/Map/useTimelineManager.ts +215 -0
- package/src/Map/utils.test.ts +62 -0
- package/src/Map/utils.ts +71 -0
- package/src/Visualizer/DropHolder.tsx +41 -0
- package/src/Visualizer/Error.tsx +15 -0
- package/src/Visualizer/context.tsx +27 -0
- package/src/Visualizer/coreContext.tsx +47 -0
- package/src/Visualizer/engines.ts +7 -0
- package/src/Visualizer/featureFlags.ts +9 -0
- package/src/Visualizer/hooks.ts +403 -0
- package/src/Visualizer/index.stories.tsx +128 -0
- package/src/Visualizer/index.tsx +187 -0
- package/src/Visualizer/interactionMode.ts +25 -0
- package/src/Visualizer/useViewport.ts +74 -0
- package/src/e2eConfig.ts +20 -0
- package/src/engines/Cesium/Cluster.tsx +90 -0
- package/src/engines/Cesium/Event.tsx +15 -0
- package/src/engines/Cesium/Feature/Box/Edge.tsx +94 -0
- package/src/engines/Cesium/Feature/Box/ScalePoints.tsx +158 -0
- package/src/engines/Cesium/Feature/Box/Side.tsx +70 -0
- package/src/engines/Cesium/Feature/Box/constants.ts +63 -0
- package/src/engines/Cesium/Feature/Box/hooks/box.ts +375 -0
- package/src/engines/Cesium/Feature/Box/hooks/edge.ts +112 -0
- package/src/engines/Cesium/Feature/Box/hooks/scalePoint.ts +174 -0
- package/src/engines/Cesium/Feature/Box/hooks/side.ts +72 -0
- package/src/engines/Cesium/Feature/Box/index.tsx +156 -0
- package/src/engines/Cesium/Feature/Box/utils.ts +168 -0
- package/src/engines/Cesium/Feature/Ellipse/index.stories.tsx +48 -0
- package/src/engines/Cesium/Feature/Ellipse/index.tsx +91 -0
- package/src/engines/Cesium/Feature/Ellipsoid/index.tsx +84 -0
- package/src/engines/Cesium/Feature/Frustum/FrustumColorAppearance.ts +38 -0
- package/src/engines/Cesium/Feature/Frustum/getFieldOfView.ts +23 -0
- package/src/engines/Cesium/Feature/Frustum/index.stories.tsx +49 -0
- package/src/engines/Cesium/Feature/Frustum/index.tsx +163 -0
- package/src/engines/Cesium/Feature/Frustum/shaders/frustumAppearance.frag.glsl +31 -0
- package/src/engines/Cesium/Feature/Frustum/shaders/frustumAppearance.vert.glsl +29 -0
- package/src/engines/Cesium/Feature/HeatMap/HeatmapMesh.tsx +186 -0
- package/src/engines/Cesium/Feature/HeatMap/HeatmapMeshMaterial.ts +81 -0
- package/src/engines/Cesium/Feature/HeatMap/colorMap.ts +47 -0
- package/src/engines/Cesium/Feature/HeatMap/constants.ts +781 -0
- package/src/engines/Cesium/Feature/HeatMap/createMeshImageData.ts +108 -0
- package/src/engines/Cesium/Feature/HeatMap/index.tsx +169 -0
- package/src/engines/Cesium/Feature/HeatMap/shaders/heatmapMeshMaterial.glsl +78 -0
- package/src/engines/Cesium/Feature/HeatMap/shaders/makeContour.glsl +13 -0
- package/src/engines/Cesium/Feature/HeatMap/shaders/sampleBicubic.glsl +57 -0
- package/src/engines/Cesium/Feature/Marker/index.tsx +296 -0
- package/src/engines/Cesium/Feature/Marker/marker.svg +3 -0
- package/src/engines/Cesium/Feature/Model/index.stories.tsx +48 -0
- package/src/engines/Cesium/Feature/Model/index.tsx +223 -0
- package/src/engines/Cesium/Feature/PhotoOverlay/hooks.ts +98 -0
- package/src/engines/Cesium/Feature/PhotoOverlay/index.tsx +163 -0
- package/src/engines/Cesium/Feature/PhotoOverlay/primPhotoIcon.svg +3 -0
- package/src/engines/Cesium/Feature/Polygon/index.stories.tsx +174 -0
- package/src/engines/Cesium/Feature/Polygon/index.tsx +182 -0
- package/src/engines/Cesium/Feature/Polyline/index.tsx +98 -0
- package/src/engines/Cesium/Feature/Raster/hooks.ts +52 -0
- package/src/engines/Cesium/Feature/Raster/index.stories.tsx +77 -0
- package/src/engines/Cesium/Feature/Raster/index.tsx +37 -0
- package/src/engines/Cesium/Feature/Raster/mvt.ts +33 -0
- package/src/engines/Cesium/Feature/Raster/tiles.ts +27 -0
- package/src/engines/Cesium/Feature/Raster/tms.ts +31 -0
- package/src/engines/Cesium/Feature/Raster/types.ts +5 -0
- package/src/engines/Cesium/Feature/Raster/utils.test.ts +14 -0
- package/src/engines/Cesium/Feature/Raster/utils.ts +10 -0
- package/src/engines/Cesium/Feature/Raster/wms.ts +28 -0
- package/src/engines/Cesium/Feature/Resource/index.stories.tsx +46 -0
- package/src/engines/Cesium/Feature/Resource/index.tsx +218 -0
- package/src/engines/Cesium/Feature/Resource/utils.test.ts +69 -0
- package/src/engines/Cesium/Feature/Resource/utils.ts +377 -0
- package/src/engines/Cesium/Feature/Tileset/DrawClippingPolygon/index.tsx +77 -0
- package/src/engines/Cesium/Feature/Tileset/TilesetFeatureIndex.ts +46 -0
- package/src/engines/Cesium/Feature/Tileset/hooks.ts +793 -0
- package/src/engines/Cesium/Feature/Tileset/index.stories.tsx +41 -0
- package/src/engines/Cesium/Feature/Tileset/index.tsx +127 -0
- package/src/engines/Cesium/Feature/Tileset/types.ts +5 -0
- package/src/engines/Cesium/Feature/Tileset/useClippingBox.ts +457 -0
- package/src/engines/Cesium/Feature/Tileset/useDrawClipping.ts +200 -0
- package/src/engines/Cesium/Feature/context.ts +33 -0
- package/src/engines/Cesium/Feature/index.tsx +250 -0
- package/src/engines/Cesium/Feature/utils.test.tsx +30 -0
- package/src/engines/Cesium/Feature/utils.tsx +289 -0
- package/src/engines/Cesium/FeatureIndex.ts +15 -0
- package/src/engines/Cesium/JapanSeaLevelEllipsoid.ts +20 -0
- package/src/engines/Cesium/PostProcesses/README.md +1 -0
- package/src/engines/Cesium/PostProcesses/hbao/AmbientOcclusion.tsx +120 -0
- package/src/engines/Cesium/PostProcesses/hbao/AmbientOcclusionOutputType.ts +7 -0
- package/src/engines/Cesium/PostProcesses/hbao/README.md +3 -0
- package/src/engines/Cesium/PostProcesses/hbao/config.ts +29 -0
- package/src/engines/Cesium/PostProcesses/hbao/createAmbientOcclusionStage.ts +173 -0
- package/src/engines/Cesium/PostProcesses/hbao/createCrossBilateralFilterStage.ts +94 -0
- package/src/engines/Cesium/PostProcesses/hbao/index.ts +3 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/ambientOcclusionGenerate.glsl +151 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/ambientOcclusionModulate.glsl +46 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/crossBilateralFilter.glsl +108 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/depth.glsl +3 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/globeDepth.glsl +15 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/highPassRandom.glsl +28 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/packing.glsl +7 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/reconstructNormal.glsl +109 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/reconstructPosition.glsl +10 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/turboColorMap.glsl +20 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/vogelDisk.glsl +13 -0
- package/src/engines/Cesium/Shaders/CustomShaders/NonPBRLightingShader.ts +66 -0
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/Definitions.glsl +5 -0
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/HeatmapForTerrain.glsl +13 -0
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/IBL.glsl +57 -0
- package/src/engines/Cesium/Shaders/OverriddenShaders/README.md +13 -0
- package/src/engines/Cesium/Sketch/ControlPoint.tsx +67 -0
- package/src/engines/Cesium/Sketch/Entity.tsx +43 -0
- package/src/engines/Cesium/Sketch/ExtrudedControlPoints.tsx +51 -0
- package/src/engines/Cesium/Sketch/ExtrudedMeasurement.tsx +70 -0
- package/src/engines/Cesium/Sketch/ExtrudedPolygonEntity.tsx +75 -0
- package/src/engines/Cesium/Sketch/MeasurementText.tsx +13 -0
- package/src/engines/Cesium/Sketch/PolygonEntity.tsx +48 -0
- package/src/engines/Cesium/Sketch/PolylineEntity.tsx +44 -0
- package/src/engines/Cesium/Sketch/ScreenSpaceElement.tsx +87 -0
- package/src/engines/Cesium/Sketch/SurfaceControlPoints.tsx +67 -0
- package/src/engines/Cesium/Sketch/SurfaceMeasurement.tsx +80 -0
- package/src/engines/Cesium/Sketch/createGeometry.ts +224 -0
- package/src/engines/Cesium/Sketch/index.tsx +119 -0
- package/src/engines/Cesium/Sketch/utils.ts +27 -0
- package/src/engines/Cesium/VertexTerrainElevationMaterial.ts +33 -0
- package/src/engines/Cesium/cameraLimiter.ts +256 -0
- package/src/engines/Cesium/common.test.ts +38 -0
- package/src/engines/Cesium/common.ts +901 -0
- package/src/engines/Cesium/constants.ts +25 -0
- package/src/engines/Cesium/core/Clock.tsx +58 -0
- package/src/engines/Cesium/core/Globe.tsx +136 -0
- package/src/engines/Cesium/core/Imagery.test.ts +102 -0
- package/src/engines/Cesium/core/Imagery.tsx +184 -0
- package/src/engines/Cesium/core/Indicator/Indicator.tsx +141 -0
- package/src/engines/Cesium/core/Indicator/crosshair.svg +3 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImagery.tsx +321 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImageryLayer.tsx +56 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImageryProvider.ts +146 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapVectorMapLabel.tsx +258 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/getAnnotationType.ts +117 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/helpers.ts +24 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/index.ts +3 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/types.ts +26 -0
- package/src/engines/Cesium/core/labels/LabelImageryLayers.tsx +39 -0
- package/src/engines/Cesium/core/presets.ts +95 -0
- package/src/engines/Cesium/helpers/createUniforms.ts +64 -0
- package/src/engines/Cesium/helpers/sphericalHaromic.test.ts +33 -0
- package/src/engines/Cesium/helpers/sphericalHaromic.ts +27 -0
- package/src/engines/Cesium/hooks/useInstance.ts +98 -0
- package/src/engines/Cesium/hooks/useLayerSelectWithRect.ts +157 -0
- package/src/engines/Cesium/hooks/useSceneEvent.ts +47 -0
- package/src/engines/Cesium/hooks.ts +1004 -0
- package/src/engines/Cesium/index.stories.tsx +42 -0
- package/src/engines/Cesium/index.tsx +285 -0
- package/src/engines/Cesium/pickMany.ts +310 -0
- package/src/engines/Cesium/type.d.ts +47 -0
- package/src/engines/Cesium/types.ts +24 -0
- package/src/engines/Cesium/useEngineRef.test.tsx +627 -0
- package/src/engines/Cesium/useEngineRef.ts +945 -0
- package/src/engines/Cesium/useOverrideGlobeShader.ts +322 -0
- package/src/engines/Cesium/utils/mouse.ts +16 -0
- package/src/engines/Cesium/utils/polygon.ts +48 -0
- package/src/engines/Cesium/utils/utils.ts +446 -0
- package/src/engines/Cesium/vertexTerrainElevationMaterial.glsl +25 -0
- package/src/engines/index.ts +37 -0
- package/src/env.d.ts +3 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useRefFunction.ts +10 -0
- package/src/hooks/useRefValue.ts +7 -0
- package/src/index.ts +4 -0
- package/src/mantle/README.md +7 -0
- package/src/mantle/atoms/cache.test.ts +61 -0
- package/src/mantle/atoms/cache.ts +55 -0
- package/src/mantle/atoms/compute.test.ts +794 -0
- package/src/mantle/atoms/compute.ts +344 -0
- package/src/mantle/atoms/data.test.ts +182 -0
- package/src/mantle/atoms/data.ts +114 -0
- package/src/mantle/atoms/index.ts +1 -0
- package/src/mantle/compat/backward.test.ts +368 -0
- package/src/mantle/compat/backward.ts +189 -0
- package/src/mantle/compat/forward.test.ts +688 -0
- package/src/mantle/compat/forward.ts +272 -0
- package/src/mantle/compat/index.ts +4 -0
- package/src/mantle/compat/types.ts +73 -0
- package/src/mantle/data/csv.test.ts +478 -0
- package/src/mantle/data/csv.ts +194 -0
- package/src/mantle/data/geojson.ts +72 -0
- package/src/mantle/data/georss.ts +172 -0
- package/src/mantle/data/gml.ts +244 -0
- package/src/mantle/data/gpx.test.ts +65 -0
- package/src/mantle/data/gpx.ts +551 -0
- package/src/mantle/data/gtfs.ts +116 -0
- package/src/mantle/data/gtfsReader.ts +454 -0
- package/src/mantle/data/index.test.ts +16 -0
- package/src/mantle/data/index.ts +73 -0
- package/src/mantle/data/shapefile.ts +232 -0
- package/src/mantle/data/utils.ts +21 -0
- package/src/mantle/evaluator/index.ts +40 -0
- package/src/mantle/evaluator/simple/conditionalExpression/index.ts +60 -0
- package/src/mantle/evaluator/simple/expression/constants.ts +204 -0
- package/src/mantle/evaluator/simple/expression/expression.test.ts +63 -0
- package/src/mantle/evaluator/simple/expression/expression.ts +116 -0
- package/src/mantle/evaluator/simple/expression/functions/binaryFunctions.ts +43 -0
- package/src/mantle/evaluator/simple/expression/functions/colors.ts +189 -0
- package/src/mantle/evaluator/simple/expression/functions/index.ts +3 -0
- package/src/mantle/evaluator/simple/expression/functions/unaryFunctions.ts +54 -0
- package/src/mantle/evaluator/simple/expression/index.ts +1 -0
- package/src/mantle/evaluator/simple/expression/node.ts +570 -0
- package/src/mantle/evaluator/simple/expression/runtime.ts +266 -0
- package/src/mantle/evaluator/simple/expression/variableReplacer.test.ts +54 -0
- package/src/mantle/evaluator/simple/expression/variableReplacer.ts +121 -0
- package/src/mantle/evaluator/simple/index.test.ts +656 -0
- package/src/mantle/evaluator/simple/index.ts +178 -0
- package/src/mantle/evaluator/simple/interval.test.ts +102 -0
- package/src/mantle/evaluator/simple/interval.ts +27 -0
- package/src/mantle/evaluator/simple/utils.test.ts +56 -0
- package/src/mantle/evaluator/simple/utils.ts +31 -0
- package/src/mantle/index.ts +6 -0
- package/src/mantle/types/appearance.ts +318 -0
- package/src/mantle/types/events.ts +16 -0
- package/src/mantle/types/expression.ts +9 -0
- package/src/mantle/types/index.ts +156 -0
- package/src/mantle/types/value.ts +153 -0
- package/src/mantle/utils.test.ts +74 -0
- package/src/mantle/utils.ts +53 -0
- package/src/reearthTypes.ts +64 -0
- package/src/setupTests.ts +1 -0
- package/src/test/setup.ts +40 -0
- package/src/test/utils.tsx +40 -0
- package/src/types.ts +66 -0
- package/src/utils/StringMatcher.test.ts +132 -0
- package/src/utils/StringMatcher.ts +104 -0
- package/src/utils/assertType.ts +1 -0
- package/src/utils/generate-random-string.ts +9 -0
- package/src/utils/idle.ts +22 -0
- package/src/utils/image.ts +35 -0
- package/src/utils/index.ts +11 -0
- package/src/utils/object.ts +70 -0
- package/src/utils/raf.ts +58 -0
- package/src/utils/time.ts +18 -0
- package/src/utils/use-delayed-count.test.ts +139 -0
- package/src/utils/use-delayed-count.ts +65 -0
- package/src/utils/use-dnd/drag.ts +34 -0
- package/src/utils/use-dnd/drop.ts +93 -0
- package/src/utils/use-dnd/index.tsx +20 -0
- package/src/utils/use-dnd/types.ts +47 -0
- package/src/utils/util.ts +81 -0
- package/src/utils/value.ts +260 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Cartesian3,
|
|
3
|
+
Color,
|
|
4
|
+
HorizontalOrigin,
|
|
5
|
+
VerticalOrigin,
|
|
6
|
+
Cartesian2,
|
|
7
|
+
CallbackProperty,
|
|
8
|
+
PositionProperty,
|
|
9
|
+
Entity,
|
|
10
|
+
} from "cesium";
|
|
11
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
12
|
+
import {
|
|
13
|
+
BillboardGraphics,
|
|
14
|
+
PointGraphics,
|
|
15
|
+
LabelGraphics,
|
|
16
|
+
PolylineGraphics,
|
|
17
|
+
CesiumComponentRef,
|
|
18
|
+
} from "resium";
|
|
19
|
+
|
|
20
|
+
import type { MarkerAppearance } from "../../..";
|
|
21
|
+
import { toCSSFont } from "../../../../utils";
|
|
22
|
+
import { useIcon, ho, vo, heightReference, toColor } from "../../common";
|
|
23
|
+
import { useContext } from "../context";
|
|
24
|
+
import {
|
|
25
|
+
EntityExt,
|
|
26
|
+
toDistanceDisplayCondition,
|
|
27
|
+
toTimeInterval,
|
|
28
|
+
type FeatureComponentConfig,
|
|
29
|
+
type FeatureProps,
|
|
30
|
+
getTag,
|
|
31
|
+
} from "../utils";
|
|
32
|
+
|
|
33
|
+
import marker from "./marker.svg";
|
|
34
|
+
|
|
35
|
+
export type Props = FeatureProps<Property>;
|
|
36
|
+
|
|
37
|
+
export type Property = MarkerAppearance & {
|
|
38
|
+
// compat
|
|
39
|
+
location?: { lat: number; lng: number };
|
|
40
|
+
height?: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default function Marker({ property, id, isVisible, geometry, layer, feature }: Props) {
|
|
44
|
+
const coordinates = useMemo(
|
|
45
|
+
() =>
|
|
46
|
+
geometry?.type === "Point"
|
|
47
|
+
? property?.height
|
|
48
|
+
? [...geometry.coordinates.slice(0, 2), property.height]
|
|
49
|
+
: geometry.coordinates
|
|
50
|
+
: property?.location
|
|
51
|
+
? [property.location.lng, property.location.lat, property.height ?? 0]
|
|
52
|
+
: undefined,
|
|
53
|
+
[geometry?.coordinates, geometry?.type, property?.height, property?.location],
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const { requestRender } = useContext();
|
|
57
|
+
|
|
58
|
+
const {
|
|
59
|
+
show = true,
|
|
60
|
+
extrude,
|
|
61
|
+
pointSize = 10,
|
|
62
|
+
style,
|
|
63
|
+
pointColor,
|
|
64
|
+
pointOutlineColor,
|
|
65
|
+
pointOutlineWidth,
|
|
66
|
+
label,
|
|
67
|
+
labelTypography,
|
|
68
|
+
labelText,
|
|
69
|
+
labelPosition: labelPos = "right",
|
|
70
|
+
labelBackground,
|
|
71
|
+
labelBackgroundColor,
|
|
72
|
+
labelBackgroundPaddingHorizontal,
|
|
73
|
+
labelBackgroundPaddingVertical,
|
|
74
|
+
image = marker,
|
|
75
|
+
imageSize,
|
|
76
|
+
imageSizeInMeters,
|
|
77
|
+
imageHorizontalOrigin: horizontalOrigin,
|
|
78
|
+
imageVerticalOrigin: verticalOrigin,
|
|
79
|
+
imageColor,
|
|
80
|
+
imageCrop: crop,
|
|
81
|
+
imageShadow: shadow,
|
|
82
|
+
imageShadowColor: shadowColor,
|
|
83
|
+
imageShadowBlur: shadowBlur,
|
|
84
|
+
imageShadowPositionX: shadowOffsetX,
|
|
85
|
+
imageShadowPositionY: shadowOffsetY,
|
|
86
|
+
eyeOffset,
|
|
87
|
+
pixelOffset,
|
|
88
|
+
heightReference: hr,
|
|
89
|
+
hideIndicator,
|
|
90
|
+
} = property ?? {};
|
|
91
|
+
|
|
92
|
+
const { useTransition, translate } = layer?.transition ?? {};
|
|
93
|
+
const translatedCoords = useMemo(
|
|
94
|
+
() => (translate ? Cartesian3.fromDegrees(...translate) : undefined),
|
|
95
|
+
[translate],
|
|
96
|
+
);
|
|
97
|
+
const translatedCoordsRef = useRef(translatedCoords);
|
|
98
|
+
translatedCoordsRef.current = translatedCoords;
|
|
99
|
+
// CallbackProperty forces to disable the request render mode,
|
|
100
|
+
// so we need to be able to switch the use of `CallbackProperty` for performance.
|
|
101
|
+
const translateCallbackProperty = useMemo(
|
|
102
|
+
() =>
|
|
103
|
+
useTransition ? new CallbackProperty(() => translatedCoordsRef.current, false) : undefined,
|
|
104
|
+
[useTransition],
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
const pos = useMemo(() => {
|
|
108
|
+
return coordinates
|
|
109
|
+
? Cartesian3.fromDegrees(coordinates[0], coordinates[1], coordinates[2])
|
|
110
|
+
: undefined;
|
|
111
|
+
}, [coordinates]);
|
|
112
|
+
|
|
113
|
+
const extrudePoints = useMemo(() => {
|
|
114
|
+
return extrude && coordinates && typeof coordinates[2] === "number"
|
|
115
|
+
? [
|
|
116
|
+
Cartesian3.fromDegrees(coordinates[0], coordinates[1], coordinates[2]),
|
|
117
|
+
Cartesian3.fromDegrees(coordinates[0], coordinates[1], 0),
|
|
118
|
+
]
|
|
119
|
+
: undefined;
|
|
120
|
+
}, [coordinates, extrude]);
|
|
121
|
+
|
|
122
|
+
const isStyleImage = !style || style === "image";
|
|
123
|
+
const [icon, imgw, imgh] = useIcon({
|
|
124
|
+
image: isStyleImage ? image : undefined,
|
|
125
|
+
imageSize,
|
|
126
|
+
crop,
|
|
127
|
+
shadow,
|
|
128
|
+
shadowColor,
|
|
129
|
+
shadowBlur,
|
|
130
|
+
shadowOffsetX,
|
|
131
|
+
shadowOffsetY,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const cartPixelOffset = useMemo(
|
|
135
|
+
() => (pixelOffset ? new Cartesian2(...pixelOffset) : undefined),
|
|
136
|
+
[pixelOffset],
|
|
137
|
+
);
|
|
138
|
+
const cartEyeOffset = useMemo(
|
|
139
|
+
() => (eyeOffset ? new Cartesian3(...eyeOffset) : undefined),
|
|
140
|
+
[eyeOffset],
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
const labelPixelOffset = useMemo(() => {
|
|
144
|
+
if (cartPixelOffset) return cartPixelOffset;
|
|
145
|
+
const padding = 15;
|
|
146
|
+
const x = (isStyleImage ? imgw : pointSize) / 2 + padding;
|
|
147
|
+
const y = (isStyleImage ? imgh : pointSize) / 2 + padding;
|
|
148
|
+
return new Cartesian2(
|
|
149
|
+
labelPos.includes("left") || labelPos.includes("right")
|
|
150
|
+
? x * (labelPos.includes("left") ? -1 : 1)
|
|
151
|
+
: 0,
|
|
152
|
+
labelPos.includes("top") || labelPos.includes("bottom")
|
|
153
|
+
? y * (labelPos.includes("top") ? -1 : 1)
|
|
154
|
+
: 0,
|
|
155
|
+
);
|
|
156
|
+
}, [isStyleImage, imgw, pointSize, imgh, labelPos, cartPixelOffset]);
|
|
157
|
+
|
|
158
|
+
const extrudePointsLineColor = useMemo(() => {
|
|
159
|
+
return Color.WHITE.withAlpha(0.4);
|
|
160
|
+
}, []);
|
|
161
|
+
|
|
162
|
+
const entityRef = useRef<CesiumComponentRef<Entity>>(null);
|
|
163
|
+
const tag = getTag(entityRef.current?.cesiumElement);
|
|
164
|
+
|
|
165
|
+
const imageColorCesium = useMemo(
|
|
166
|
+
() =>
|
|
167
|
+
toColor(
|
|
168
|
+
tag?.isFeatureSelected && typeof layer?.["marker"]?.selectedFeatureColor === "string"
|
|
169
|
+
? layer["marker"]?.selectedFeatureColor
|
|
170
|
+
: imageColor,
|
|
171
|
+
),
|
|
172
|
+
[imageColor, layer, tag?.isFeatureSelected],
|
|
173
|
+
);
|
|
174
|
+
const pointColorCesium = useMemo(
|
|
175
|
+
() =>
|
|
176
|
+
toColor(
|
|
177
|
+
tag?.isFeatureSelected && typeof layer?.["marker"]?.selectedFeatureColor === "string"
|
|
178
|
+
? layer["marker"]?.selectedFeatureColor
|
|
179
|
+
: pointColor,
|
|
180
|
+
),
|
|
181
|
+
[pointColor, layer, tag?.isFeatureSelected],
|
|
182
|
+
);
|
|
183
|
+
const pointOutlineColorCesium = useMemo(() => toColor(pointOutlineColor), [pointOutlineColor]);
|
|
184
|
+
const labelColorCesium = useMemo(() => toColor(labelTypography?.color), [labelTypography?.color]);
|
|
185
|
+
const labelBackgroundColorCesium = useMemo(
|
|
186
|
+
() => toColor(labelBackgroundColor),
|
|
187
|
+
[labelBackgroundColor],
|
|
188
|
+
);
|
|
189
|
+
const labelBackgroundPadding = useMemo(
|
|
190
|
+
// https://cesium.com/learn/cesiumjs/ref-doc/LabelGraphics.html?classFilter=labelgra#backgroundPadding
|
|
191
|
+
() =>
|
|
192
|
+
new Cartesian2(labelBackgroundPaddingHorizontal || 7, labelBackgroundPaddingVertical || 5),
|
|
193
|
+
[labelBackgroundPaddingHorizontal, labelBackgroundPaddingVertical],
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
const availability = useMemo(() => toTimeInterval(feature?.interval), [feature?.interval]);
|
|
197
|
+
const distanceDisplayCondition = useMemo(
|
|
198
|
+
() => toDistanceDisplayCondition(property?.near, property?.far),
|
|
199
|
+
[property?.near, property?.far],
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
const stringLabelText = useMemo(() => String(labelText), [labelText]);
|
|
203
|
+
|
|
204
|
+
useEffect(() => {
|
|
205
|
+
requestRender?.();
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
return !pos || !isVisible || !show ? null : (
|
|
209
|
+
<>
|
|
210
|
+
{extrudePoints && (
|
|
211
|
+
<EntityExt
|
|
212
|
+
layerId={layer?.id}
|
|
213
|
+
featureId={feature?.id}
|
|
214
|
+
unselectable
|
|
215
|
+
properties={feature?.properties}
|
|
216
|
+
availability={availability}
|
|
217
|
+
hideIndicator={hideIndicator}>
|
|
218
|
+
<PolylineGraphics
|
|
219
|
+
positions={extrudePoints}
|
|
220
|
+
material={extrudePointsLineColor}
|
|
221
|
+
width={0.5}
|
|
222
|
+
distanceDisplayCondition={distanceDisplayCondition}
|
|
223
|
+
/>
|
|
224
|
+
</EntityExt>
|
|
225
|
+
)}
|
|
226
|
+
<EntityExt
|
|
227
|
+
id={id}
|
|
228
|
+
position={
|
|
229
|
+
useTransition
|
|
230
|
+
? (translateCallbackProperty as unknown as PositionProperty)
|
|
231
|
+
: translatedCoords ?? pos
|
|
232
|
+
}
|
|
233
|
+
layerId={layer?.id}
|
|
234
|
+
featureId={feature?.id}
|
|
235
|
+
ref={entityRef}
|
|
236
|
+
draggable
|
|
237
|
+
properties={feature?.properties}
|
|
238
|
+
availability={availability}
|
|
239
|
+
hideIndicator={hideIndicator}>
|
|
240
|
+
{style === "point" ? (
|
|
241
|
+
<PointGraphics
|
|
242
|
+
pixelSize={pointSize}
|
|
243
|
+
color={pointColorCesium}
|
|
244
|
+
outlineColor={pointOutlineColorCesium}
|
|
245
|
+
outlineWidth={pointOutlineWidth}
|
|
246
|
+
heightReference={heightReference(hr)}
|
|
247
|
+
distanceDisplayCondition={distanceDisplayCondition}
|
|
248
|
+
/>
|
|
249
|
+
) : (
|
|
250
|
+
<BillboardGraphics
|
|
251
|
+
image={icon}
|
|
252
|
+
color={imageColorCesium}
|
|
253
|
+
horizontalOrigin={ho(horizontalOrigin)}
|
|
254
|
+
verticalOrigin={vo(verticalOrigin)}
|
|
255
|
+
heightReference={heightReference(hr)}
|
|
256
|
+
distanceDisplayCondition={distanceDisplayCondition}
|
|
257
|
+
sizeInMeters={imageSizeInMeters}
|
|
258
|
+
pixelOffset={cartPixelOffset}
|
|
259
|
+
eyeOffset={cartEyeOffset}
|
|
260
|
+
/>
|
|
261
|
+
)}
|
|
262
|
+
{label && (
|
|
263
|
+
<LabelGraphics
|
|
264
|
+
horizontalOrigin={
|
|
265
|
+
labelPos === "right" || labelPos == "righttop" || labelPos === "rightbottom"
|
|
266
|
+
? HorizontalOrigin.LEFT
|
|
267
|
+
: labelPos === "left" || labelPos === "lefttop" || labelPos === "leftbottom"
|
|
268
|
+
? HorizontalOrigin.RIGHT
|
|
269
|
+
: HorizontalOrigin.CENTER
|
|
270
|
+
}
|
|
271
|
+
verticalOrigin={
|
|
272
|
+
labelPos === "bottom" || labelPos === "rightbottom" || labelPos === "leftbottom"
|
|
273
|
+
? VerticalOrigin.TOP
|
|
274
|
+
: labelPos === "top" || labelPos === "righttop" || labelPos === "lefttop"
|
|
275
|
+
? VerticalOrigin.BOTTOM
|
|
276
|
+
: VerticalOrigin.CENTER
|
|
277
|
+
}
|
|
278
|
+
pixelOffset={labelPixelOffset}
|
|
279
|
+
fillColor={labelColorCesium}
|
|
280
|
+
font={toCSSFont(labelTypography, { fontSize: 30 })}
|
|
281
|
+
text={stringLabelText}
|
|
282
|
+
showBackground={labelBackground}
|
|
283
|
+
backgroundColor={labelBackgroundColorCesium}
|
|
284
|
+
backgroundPadding={labelBackgroundPadding}
|
|
285
|
+
heightReference={heightReference(hr)}
|
|
286
|
+
distanceDisplayCondition={distanceDisplayCondition}
|
|
287
|
+
/>
|
|
288
|
+
)}
|
|
289
|
+
</EntityExt>
|
|
290
|
+
</>
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export const config: FeatureComponentConfig = {
|
|
295
|
+
noLayer: true,
|
|
296
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.0292 22.7354C15.1183 21.8682 16.207 20.8883 17.226 19.8127C20.1976 16.676 22 13.3716 22 10C22 4.47715 17.5228 0 12 0C6.47715 0 2 4.47715 2 10C2 13.3716 3.8024 16.676 6.77405 19.8127C7.793 20.8883 8.88175 21.8682 9.97082 22.7354C10.3526 23.0394 10.7078 23.3081 11.0278 23.5392C11.2228 23.68 11.3649 23.7784 11.4453 23.8321C11.7812 24.056 12.2188 24.056 12.5547 23.8321C12.6351 23.7784 12.7772 23.68 12.9722 23.5392C13.2922 23.3081 13.6474 23.0394 14.0292 22.7354ZM15.774 18.4373C14.8242 19.4398 13.8036 20.3584 12.7833 21.1708C12.5048 21.3926 12.2423 21.5936 12 21.7726C11.7577 21.5936 11.4952 21.3926 11.2167 21.1708C10.1964 20.3584 9.17575 19.4398 8.22595 18.4373C5.5726 15.6365 4 12.7534 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 12.7534 18.4274 15.6365 15.774 18.4373ZM12 14C9.79086 14 8 12.2091 8 10C8 7.79086 9.79086 6 12 6C14.2091 6 16 7.79086 16 10C16 12.2091 14.2091 14 12 14ZM14 10C14 11.1046 13.1046 12 12 12C10.8954 12 10 11.1046 10 10C10 8.89543 10.8954 8 12 8C13.1046 8 14 8.89543 14 10Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { engine } from "../..";
|
|
4
|
+
import { Map, Props } from "../../../../Map";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: Map,
|
|
8
|
+
parameters: { actions: { argTypesRegex: "^on.*" } },
|
|
9
|
+
} as Meta;
|
|
10
|
+
|
|
11
|
+
const Template: StoryFn<Props> = args => <Map {...args} />;
|
|
12
|
+
|
|
13
|
+
export const Default = Template.bind([]);
|
|
14
|
+
Default.args = {
|
|
15
|
+
engine: "cesium",
|
|
16
|
+
engines: {
|
|
17
|
+
cesium: engine,
|
|
18
|
+
},
|
|
19
|
+
ready: true,
|
|
20
|
+
layers: [
|
|
21
|
+
{
|
|
22
|
+
id: "l",
|
|
23
|
+
type: "simple",
|
|
24
|
+
data: {
|
|
25
|
+
type: "geojson",
|
|
26
|
+
value: {
|
|
27
|
+
type: "Feature",
|
|
28
|
+
geometry: {
|
|
29
|
+
type: "Point",
|
|
30
|
+
coordinates: [0, 0, 1000],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
model: {
|
|
35
|
+
url: "/BoxAnimated.glb",
|
|
36
|
+
scale: 1000000,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
property: {
|
|
41
|
+
tiles: [
|
|
42
|
+
{
|
|
43
|
+
id: "default",
|
|
44
|
+
tile_type: "default",
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Cartesian3,
|
|
3
|
+
HeadingPitchRoll,
|
|
4
|
+
Math as CesiumMath,
|
|
5
|
+
Transforms,
|
|
6
|
+
Model as CesiumModel,
|
|
7
|
+
ImageBasedLighting,
|
|
8
|
+
} from "cesium";
|
|
9
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
10
|
+
import { ModelGraphics, useCesium } from "resium";
|
|
11
|
+
|
|
12
|
+
import type { ModelAppearance } from "../../..";
|
|
13
|
+
import { colorBlendMode, heightReference, shadowMode } from "../../common";
|
|
14
|
+
import { arrayToCartecian3 } from "../../helpers/sphericalHaromic";
|
|
15
|
+
import { useSceneEvent } from "../../hooks/useSceneEvent";
|
|
16
|
+
import {
|
|
17
|
+
NonPBRLightingShader,
|
|
18
|
+
NonPBRWithTextureLightingShader,
|
|
19
|
+
} from "../../Shaders/CustomShaders/NonPBRLightingShader";
|
|
20
|
+
import { useContext } from "../context";
|
|
21
|
+
import { toColor } from "../utils";
|
|
22
|
+
import {
|
|
23
|
+
EntityExt,
|
|
24
|
+
extractSimpleLayerData,
|
|
25
|
+
toDistanceDisplayCondition,
|
|
26
|
+
toTimeInterval,
|
|
27
|
+
type FeatureComponentConfig,
|
|
28
|
+
type FeatureProps,
|
|
29
|
+
} from "../utils";
|
|
30
|
+
|
|
31
|
+
export type Props = FeatureProps<Property>;
|
|
32
|
+
|
|
33
|
+
export type Property = ModelAppearance & {
|
|
34
|
+
location?: { lat: number; lng: number };
|
|
35
|
+
height?: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default function Model({
|
|
39
|
+
id,
|
|
40
|
+
isVisible,
|
|
41
|
+
property,
|
|
42
|
+
sceneProperty,
|
|
43
|
+
geometry,
|
|
44
|
+
layer,
|
|
45
|
+
feature,
|
|
46
|
+
}: Props) {
|
|
47
|
+
const data = extractSimpleLayerData(layer);
|
|
48
|
+
const isGltfData = data?.type === "gltf";
|
|
49
|
+
|
|
50
|
+
const coordinates = useMemo(
|
|
51
|
+
() =>
|
|
52
|
+
geometry?.type === "Point"
|
|
53
|
+
? geometry.coordinates
|
|
54
|
+
: property?.location
|
|
55
|
+
? [property.location.lng, property.location.lat, property.height ?? 0]
|
|
56
|
+
: undefined,
|
|
57
|
+
[geometry?.coordinates, geometry?.type, property?.height, property?.location],
|
|
58
|
+
);
|
|
59
|
+
const position = useMemo(() => {
|
|
60
|
+
return coordinates
|
|
61
|
+
? Cartesian3.fromDegrees(coordinates[0], coordinates[1], coordinates[2])
|
|
62
|
+
: Cartesian3.ZERO;
|
|
63
|
+
}, [coordinates]);
|
|
64
|
+
|
|
65
|
+
const {
|
|
66
|
+
show = true,
|
|
67
|
+
model,
|
|
68
|
+
url,
|
|
69
|
+
heightReference: hr,
|
|
70
|
+
heading,
|
|
71
|
+
pitch,
|
|
72
|
+
roll,
|
|
73
|
+
scale,
|
|
74
|
+
maximumScale,
|
|
75
|
+
minimumPixelSize,
|
|
76
|
+
animation = true,
|
|
77
|
+
shadows = "disabled",
|
|
78
|
+
colorBlend = "none",
|
|
79
|
+
color,
|
|
80
|
+
colorBlendAmount,
|
|
81
|
+
lightColor,
|
|
82
|
+
silhouette,
|
|
83
|
+
silhouetteColor,
|
|
84
|
+
bearing,
|
|
85
|
+
silhouetteSize = 1,
|
|
86
|
+
pbr,
|
|
87
|
+
} = property ?? {};
|
|
88
|
+
|
|
89
|
+
const actualUrl = useMemo(() => model || url || data?.url, [model, url, data?.url]);
|
|
90
|
+
const orientation = useMemo(
|
|
91
|
+
() =>
|
|
92
|
+
bearing
|
|
93
|
+
? Transforms.headingPitchRollQuaternion(
|
|
94
|
+
position,
|
|
95
|
+
HeadingPitchRoll.fromDegrees(bearing - 90.0, 0.0, 0.0),
|
|
96
|
+
)
|
|
97
|
+
: Transforms.headingPitchRollQuaternion(
|
|
98
|
+
position,
|
|
99
|
+
new HeadingPitchRoll(
|
|
100
|
+
CesiumMath.toRadians(heading ?? 0),
|
|
101
|
+
CesiumMath.toRadians(pitch ?? 0),
|
|
102
|
+
CesiumMath.toRadians(roll ?? 0),
|
|
103
|
+
),
|
|
104
|
+
),
|
|
105
|
+
[bearing, heading, pitch, position, roll],
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
const modelColor = useMemo(() => (colorBlend ? toColor(color) : undefined), [colorBlend, color]);
|
|
109
|
+
const modelLightColor = useMemo(() => toColor(lightColor), [lightColor]);
|
|
110
|
+
const modelSilhouetteColor = useMemo(() => toColor(silhouetteColor), [silhouetteColor]);
|
|
111
|
+
const availability = useMemo(() => toTimeInterval(feature?.interval), [feature?.interval]);
|
|
112
|
+
const distanceDisplayCondition = useMemo(
|
|
113
|
+
() => toDistanceDisplayCondition(property?.near, property?.far),
|
|
114
|
+
[property?.near, property?.far],
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const imageBasedLighting = useMemo(() => {
|
|
118
|
+
const ibl = new ImageBasedLighting();
|
|
119
|
+
|
|
120
|
+
if (
|
|
121
|
+
!property?.specularEnvironmentMaps &&
|
|
122
|
+
!property?.sphericalHarmonicCoefficients &&
|
|
123
|
+
!sceneProperty?.light?.specularEnvironmentMaps &&
|
|
124
|
+
!sceneProperty?.light?.sphericalHarmonicCoefficients
|
|
125
|
+
)
|
|
126
|
+
return ibl;
|
|
127
|
+
|
|
128
|
+
const specularEnvironmentMaps =
|
|
129
|
+
property?.specularEnvironmentMaps ?? sceneProperty?.light?.specularEnvironmentMaps;
|
|
130
|
+
const imageBasedLightIntensity =
|
|
131
|
+
property?.imageBasedLightIntensity ?? sceneProperty?.light?.imageBasedLightIntensity;
|
|
132
|
+
const sphericalHarmonicCoefficients = arrayToCartecian3(
|
|
133
|
+
property?.sphericalHarmonicCoefficients ??
|
|
134
|
+
sceneProperty?.light?.sphericalHarmonicCoefficients,
|
|
135
|
+
imageBasedLightIntensity,
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
if (specularEnvironmentMaps) {
|
|
139
|
+
ibl.specularEnvironmentMaps = specularEnvironmentMaps;
|
|
140
|
+
}
|
|
141
|
+
if (sphericalHarmonicCoefficients) {
|
|
142
|
+
ibl.sphericalHarmonicCoefficients = sphericalHarmonicCoefficients;
|
|
143
|
+
}
|
|
144
|
+
return ibl;
|
|
145
|
+
}, [
|
|
146
|
+
property?.specularEnvironmentMaps,
|
|
147
|
+
property?.sphericalHarmonicCoefficients,
|
|
148
|
+
property?.imageBasedLightIntensity,
|
|
149
|
+
sceneProperty?.light?.specularEnvironmentMaps,
|
|
150
|
+
sceneProperty?.light?.sphericalHarmonicCoefficients,
|
|
151
|
+
sceneProperty?.light?.imageBasedLightIntensity,
|
|
152
|
+
]);
|
|
153
|
+
|
|
154
|
+
const { viewer } = useCesium();
|
|
155
|
+
const { requestRender } = useContext();
|
|
156
|
+
const shouldUpdateAfterLoaded = useRef(false);
|
|
157
|
+
useSceneEvent("postRender", () => {
|
|
158
|
+
const primitives = viewer?.scene.primitives;
|
|
159
|
+
const length = primitives?.length ?? 0;
|
|
160
|
+
|
|
161
|
+
if (!shouldUpdateAfterLoaded.current || !imageBasedLighting) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
for (let i = 0; i < length; i++) {
|
|
166
|
+
const prim = primitives?.get(i);
|
|
167
|
+
if (prim instanceof CesiumModel && prim.id && prim.id.id === id) {
|
|
168
|
+
prim.imageBasedLighting = imageBasedLighting;
|
|
169
|
+
shouldUpdateAfterLoaded.current = false;
|
|
170
|
+
requestRender?.();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
useEffect(() => {
|
|
176
|
+
if (imageBasedLighting) {
|
|
177
|
+
shouldUpdateAfterLoaded.current = true;
|
|
178
|
+
}
|
|
179
|
+
}, [imageBasedLighting]);
|
|
180
|
+
|
|
181
|
+
useEffect(() => {
|
|
182
|
+
requestRender?.();
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// if data type is gltf, layer should be rendered. Otherwise only features should be rendererd.
|
|
186
|
+
return (isGltfData ? feature : !feature) || !isVisible || !show || !actualUrl ? null : (
|
|
187
|
+
<EntityExt
|
|
188
|
+
id={id}
|
|
189
|
+
position={position}
|
|
190
|
+
orientation={orientation as any}
|
|
191
|
+
layerId={layer?.id}
|
|
192
|
+
featureId={feature?.id}
|
|
193
|
+
draggable
|
|
194
|
+
properties={feature?.properties}
|
|
195
|
+
availability={availability}>
|
|
196
|
+
<ModelGraphics
|
|
197
|
+
uri={actualUrl}
|
|
198
|
+
scale={scale}
|
|
199
|
+
shadows={shadowMode(shadows)}
|
|
200
|
+
customShader={
|
|
201
|
+
pbr === false
|
|
202
|
+
? NonPBRLightingShader
|
|
203
|
+
: pbr === "withTexture"
|
|
204
|
+
? NonPBRWithTextureLightingShader
|
|
205
|
+
: undefined
|
|
206
|
+
}
|
|
207
|
+
colorBlendMode={colorBlendMode(colorBlend)}
|
|
208
|
+
colorBlendAmount={colorBlendAmount}
|
|
209
|
+
color={modelColor}
|
|
210
|
+
lightColor={modelLightColor}
|
|
211
|
+
runAnimations={animation}
|
|
212
|
+
silhouetteColor={modelSilhouetteColor}
|
|
213
|
+
silhouetteSize={silhouette ? silhouetteSize : undefined}
|
|
214
|
+
heightReference={heightReference(hr)}
|
|
215
|
+
maximumScale={maximumScale}
|
|
216
|
+
minimumPixelSize={minimumPixelSize}
|
|
217
|
+
distanceDisplayCondition={distanceDisplayCondition}
|
|
218
|
+
/>
|
|
219
|
+
</EntityExt>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export const config: FeatureComponentConfig = {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import useTransition, { TransitionStatus } from "@rot1024/use-transition";
|
|
2
|
+
import { Math as CesiumMath, EasingFunction } from "cesium";
|
|
3
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
4
|
+
|
|
5
|
+
import type { Camera } from "../../..";
|
|
6
|
+
import { useDelayedCount, Durations } from "../../../../utils";
|
|
7
|
+
import { useContext } from "../context";
|
|
8
|
+
|
|
9
|
+
export type { TransitionStatus } from "@rot1024/use-transition";
|
|
10
|
+
|
|
11
|
+
const cameraDuration = 2;
|
|
12
|
+
const cameraExitDuration = 2;
|
|
13
|
+
const fovDuration = 0.5;
|
|
14
|
+
const fovExitDuration = 0.5;
|
|
15
|
+
export const photoDuration = 1;
|
|
16
|
+
export const photoExitDuration = 0.5;
|
|
17
|
+
const defaultFOV = CesiumMath.toRadians(60);
|
|
18
|
+
|
|
19
|
+
const durations: Durations = [
|
|
20
|
+
[cameraDuration * 1000, cameraExitDuration * 1000],
|
|
21
|
+
[fovDuration * 1000, fovExitDuration * 1000],
|
|
22
|
+
[photoDuration * 1000, photoExitDuration * 1000],
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export default function ({ isSelected, camera }: { isSelected?: boolean; camera?: Camera }): {
|
|
26
|
+
photoOverlayImageTransiton: TransitionStatus;
|
|
27
|
+
exitPhotoOverlay: () => void;
|
|
28
|
+
} {
|
|
29
|
+
const { selectionReason, flyTo, getCamera } = useContext();
|
|
30
|
+
|
|
31
|
+
// mode 0 = idle, 1 = idle<->fly, 2 = fly<->fov, 3 = fov<->photo, 4 = photo
|
|
32
|
+
const [mode, prevMode, startTransition] = useDelayedCount(durations);
|
|
33
|
+
const cameraRef = useRef(camera);
|
|
34
|
+
cameraRef.current = camera;
|
|
35
|
+
const storytelling = useRef(false);
|
|
36
|
+
storytelling.current = selectionReason?.reason === "storytelling";
|
|
37
|
+
const prevCamera = useRef<Camera>();
|
|
38
|
+
|
|
39
|
+
// camera flight
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if ((prevMode ?? 0) > 1 && mode === 1 && prevCamera.current) {
|
|
42
|
+
flyTo?.(prevCamera.current, {
|
|
43
|
+
duration: cameraExitDuration,
|
|
44
|
+
easing: EasingFunction.CUBIC_IN_OUT,
|
|
45
|
+
});
|
|
46
|
+
prevCamera.current = undefined;
|
|
47
|
+
} else if ((prevMode ?? 0) === 0 && mode === 1 && cameraRef.current) {
|
|
48
|
+
prevCamera.current = getCamera?.();
|
|
49
|
+
flyTo?.(
|
|
50
|
+
{ ...cameraRef.current, fov: prevCamera.current?.fov },
|
|
51
|
+
{
|
|
52
|
+
duration: cameraDuration,
|
|
53
|
+
easing: EasingFunction.CUBIC_IN_OUT,
|
|
54
|
+
},
|
|
55
|
+
);
|
|
56
|
+
} else if (mode === 2) {
|
|
57
|
+
const fov =
|
|
58
|
+
(prevMode ?? 0) === 1 ? cameraRef.current?.fov : prevCamera.current?.fov ?? defaultFOV;
|
|
59
|
+
flyTo?.(
|
|
60
|
+
{ fov },
|
|
61
|
+
{
|
|
62
|
+
duration: (prevMode ?? 0) === 1 ? fovDuration : fovExitDuration,
|
|
63
|
+
easing: EasingFunction.CUBIC_IN_OUT,
|
|
64
|
+
},
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}, [flyTo, getCamera, mode, prevMode]);
|
|
68
|
+
|
|
69
|
+
// start transition: when selection was changed
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
// restore fov
|
|
72
|
+
if (!isSelected && storytelling.current) {
|
|
73
|
+
const fov = prevCamera.current?.fov ?? defaultFOV;
|
|
74
|
+
flyTo?.({ fov }, { duration: 0 });
|
|
75
|
+
}
|
|
76
|
+
// skip camera flight when is not selected
|
|
77
|
+
startTransition(!isSelected, !isSelected);
|
|
78
|
+
}, [flyTo, startTransition, isSelected]);
|
|
79
|
+
|
|
80
|
+
const transition = useTransition(
|
|
81
|
+
!!isSelected && mode >= 3,
|
|
82
|
+
(prevMode ?? 0) > 3 ? photoExitDuration * 1000 : photoDuration * 1000,
|
|
83
|
+
{
|
|
84
|
+
mountOnEnter: true,
|
|
85
|
+
unmountOnExit: true,
|
|
86
|
+
},
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
const exitPhotoOverlay = useCallback(
|
|
90
|
+
() => startTransition(true, !camera),
|
|
91
|
+
[camera, startTransition],
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
photoOverlayImageTransiton: transition,
|
|
96
|
+
exitPhotoOverlay,
|
|
97
|
+
};
|
|
98
|
+
}
|