@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,793 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Cesium3DTileset as Cesium3DTilesetType,
|
|
3
|
+
Cesium3DTileStyle,
|
|
4
|
+
IonResource,
|
|
5
|
+
ClippingPlane,
|
|
6
|
+
ClippingPlaneCollection as CesiumClippingPlaneCollection,
|
|
7
|
+
Cartesian3,
|
|
8
|
+
Matrix4,
|
|
9
|
+
Transforms,
|
|
10
|
+
TranslationRotationScale,
|
|
11
|
+
HeadingPitchRoll,
|
|
12
|
+
Matrix3,
|
|
13
|
+
Cesium3DTileset,
|
|
14
|
+
Cesium3DTile,
|
|
15
|
+
Cesium3DTileFeature,
|
|
16
|
+
Model,
|
|
17
|
+
Cesium3DTilePointFeature,
|
|
18
|
+
GoogleMaps as CesiumGoogleMaps,
|
|
19
|
+
Resource,
|
|
20
|
+
defaultValue,
|
|
21
|
+
ImageBasedLighting,
|
|
22
|
+
Cesium3DTileContent,
|
|
23
|
+
Color,
|
|
24
|
+
Viewer,
|
|
25
|
+
} from "cesium";
|
|
26
|
+
import { pick } from "lodash-es";
|
|
27
|
+
import { MutableRefObject, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
28
|
+
import { CesiumComponentRef, useCesium } from "resium";
|
|
29
|
+
|
|
30
|
+
import type {
|
|
31
|
+
ComputedFeature,
|
|
32
|
+
ComputedLayer,
|
|
33
|
+
Feature,
|
|
34
|
+
EvalFeature,
|
|
35
|
+
SceneProperty,
|
|
36
|
+
Cesium3DTilesAppearance,
|
|
37
|
+
} from "../../..";
|
|
38
|
+
import { useRefValue } from "../../../../hooks";
|
|
39
|
+
import { LayerSimple } from "../../../../Map";
|
|
40
|
+
import { layerIdField, sampleTerrainHeightFromCartesian } from "../../common";
|
|
41
|
+
import { arrayToCartecian3 } from "../../helpers/sphericalHaromic";
|
|
42
|
+
import type { InternalCesium3DTileFeature } from "../../types";
|
|
43
|
+
import {
|
|
44
|
+
convertCesium3DTileFeatureProperties,
|
|
45
|
+
lookupFeatures,
|
|
46
|
+
translationWithClamping,
|
|
47
|
+
} from "../../utils/utils";
|
|
48
|
+
import { useContext } from "../context";
|
|
49
|
+
import {
|
|
50
|
+
usePick,
|
|
51
|
+
attachTag,
|
|
52
|
+
extractSimpleLayer,
|
|
53
|
+
extractSimpleLayerData,
|
|
54
|
+
generateIDWithMD5,
|
|
55
|
+
toColor,
|
|
56
|
+
getTag,
|
|
57
|
+
} from "../utils";
|
|
58
|
+
|
|
59
|
+
import { TilesetFeatureIndex } from "./TilesetFeatureIndex";
|
|
60
|
+
import { GoogleMaps } from "./types";
|
|
61
|
+
import { useClippingBox } from "./useClippingBox";
|
|
62
|
+
import { useDrawClipping } from "./useDrawClipping";
|
|
63
|
+
|
|
64
|
+
import { Property } from ".";
|
|
65
|
+
|
|
66
|
+
const DEFAULT_FEATURE_COLOR = Color.WHITE;
|
|
67
|
+
|
|
68
|
+
const useData = (layer: ComputedLayer | undefined) => {
|
|
69
|
+
return useMemo(() => {
|
|
70
|
+
const data = extractSimpleLayerData(layer);
|
|
71
|
+
return {
|
|
72
|
+
type: data?.type,
|
|
73
|
+
url: data?.url,
|
|
74
|
+
idProperty: data?.idProperty,
|
|
75
|
+
layers: data?.layers
|
|
76
|
+
? Array.isArray(data.layers)
|
|
77
|
+
? data.layers.join(",")
|
|
78
|
+
: data?.layers
|
|
79
|
+
: undefined,
|
|
80
|
+
};
|
|
81
|
+
}, [layer]);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const makeFeatureId = (
|
|
85
|
+
tileFeature: InternalCesium3DTileFeature,
|
|
86
|
+
content: Cesium3DTileContent,
|
|
87
|
+
idProperty?: string,
|
|
88
|
+
) => {
|
|
89
|
+
const coordinates = content.tile.boundingSphere.center;
|
|
90
|
+
const specifiedId =
|
|
91
|
+
idProperty && !(tileFeature instanceof Model) ? tileFeature.getProperty(idProperty) : undefined;
|
|
92
|
+
if (specifiedId) {
|
|
93
|
+
return specifiedId as string;
|
|
94
|
+
}
|
|
95
|
+
const featureId = getBuiltinFeatureId(tileFeature);
|
|
96
|
+
return generateIDWithMD5(
|
|
97
|
+
`${coordinates.x}-${coordinates.y}-${coordinates.z}-${featureId}-${
|
|
98
|
+
!(tileFeature instanceof Model)
|
|
99
|
+
? JSON.stringify(
|
|
100
|
+
// Read only root properties.
|
|
101
|
+
Object.entries(convertCesium3DTileFeatureProperties(tileFeature))
|
|
102
|
+
.filter((_k, v) => typeof v === "string" || typeof v === "number")
|
|
103
|
+
.map(([k, v]) => `${k}${v}`),
|
|
104
|
+
)
|
|
105
|
+
: ""
|
|
106
|
+
}`,
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const makeFeatureFrom3DTile = (
|
|
111
|
+
tileFeature: InternalCesium3DTileFeature,
|
|
112
|
+
content: Cesium3DTileContent,
|
|
113
|
+
idProperty?: string,
|
|
114
|
+
): Omit<Feature, "properties"> => {
|
|
115
|
+
const coordinates = content.tile.boundingSphere.center;
|
|
116
|
+
const id = makeFeatureId(tileFeature, content, idProperty);
|
|
117
|
+
return {
|
|
118
|
+
type: "feature",
|
|
119
|
+
id,
|
|
120
|
+
geometry: {
|
|
121
|
+
type: "Point",
|
|
122
|
+
coordinates: [coordinates.x, coordinates.y, coordinates.z],
|
|
123
|
+
},
|
|
124
|
+
range: {
|
|
125
|
+
x: coordinates.x,
|
|
126
|
+
y: coordinates.y,
|
|
127
|
+
z: coordinates.z,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const getBuiltinFeatureId = (f: InternalCesium3DTileFeature) => {
|
|
133
|
+
return (f instanceof Model ? f.id : f instanceof Cesium3DTileFeature ? f.featureId : "") ?? "";
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
type CachedFeature = {
|
|
137
|
+
// NOTE: `properties` wastes memory, so don't pass it.
|
|
138
|
+
feature: Omit<Feature, "properties">;
|
|
139
|
+
raw: InternalCesium3DTileFeature;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const MAX_NUMBER_OF_CONCURRENT_COMPUTING_FEATURES = 5000;
|
|
143
|
+
|
|
144
|
+
type StyleProperty<N = string> = {
|
|
145
|
+
name: N;
|
|
146
|
+
convert?: "color" | "colorFunctionString" | "vec2" | "vec4";
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const COMMON_STYLE_PROPERTIES: StyleProperty<"color" | "show">[] = [
|
|
150
|
+
{ name: "color", convert: "color" },
|
|
151
|
+
{ name: "show" },
|
|
152
|
+
];
|
|
153
|
+
const MODEL_STYLE_PROPERTIES: StyleProperty<"color" | "show" | "pointSize" | "meta">[] = [
|
|
154
|
+
{ name: "color", convert: "colorFunctionString" },
|
|
155
|
+
{ name: "show" },
|
|
156
|
+
{ name: "pointSize" },
|
|
157
|
+
{ name: "meta" },
|
|
158
|
+
];
|
|
159
|
+
// TODO: Add more styles. And it has not been tested yet.
|
|
160
|
+
const POINT_STYLE_PROPERTIES: StyleProperty<"pointSize">[] = [{ name: "pointSize" }];
|
|
161
|
+
|
|
162
|
+
const TILESET_APPEARANCE_FIELDS: (keyof Cesium3DTilesAppearance)[] = [
|
|
163
|
+
"show",
|
|
164
|
+
"color",
|
|
165
|
+
"pointSize",
|
|
166
|
+
"meta",
|
|
167
|
+
];
|
|
168
|
+
|
|
169
|
+
// TODO: Implement other convert type
|
|
170
|
+
const convertStyle = (val: any, convert: StyleProperty["convert"]) => {
|
|
171
|
+
if (convert === "color") {
|
|
172
|
+
return toColor(val);
|
|
173
|
+
} else if (convert === "colorFunctionString") {
|
|
174
|
+
return val === undefined ? val : `color("${val}")`;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return val;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const useFeature = ({
|
|
181
|
+
id,
|
|
182
|
+
tileset,
|
|
183
|
+
idProperty,
|
|
184
|
+
layer,
|
|
185
|
+
viewer,
|
|
186
|
+
featureIndex,
|
|
187
|
+
selectedFeatureIdsRef,
|
|
188
|
+
evalFeature,
|
|
189
|
+
onComputedFeatureFetch,
|
|
190
|
+
shouldUseFeatureIndex,
|
|
191
|
+
isTilesetReady,
|
|
192
|
+
}: {
|
|
193
|
+
id?: string;
|
|
194
|
+
tileset: MutableRefObject<Cesium3DTileset | undefined>;
|
|
195
|
+
idProperty?: string;
|
|
196
|
+
layer?: ComputedLayer;
|
|
197
|
+
viewer?: Viewer;
|
|
198
|
+
evalFeature: EvalFeature;
|
|
199
|
+
onComputedFeatureFetch?: (f: Feature[], cf: ComputedFeature[]) => void;
|
|
200
|
+
featureIndex: TilesetFeatureIndex;
|
|
201
|
+
selectedFeatureIdsRef: MutableRefObject<string[]>;
|
|
202
|
+
shouldUseFeatureIndex?: boolean;
|
|
203
|
+
isTilesetReady: boolean;
|
|
204
|
+
}) => {
|
|
205
|
+
const cachedFeaturesRef = useRef<CachedFeature[]>([]);
|
|
206
|
+
const cachedCalculatedLayerRef = useRef(layer);
|
|
207
|
+
const cachedFeatureIds = useRef(new Set<string>());
|
|
208
|
+
const layerId = layer?.id || id;
|
|
209
|
+
const layerIdRef = useRefValue(layerId);
|
|
210
|
+
|
|
211
|
+
const attachComputedFeature = useCallback(
|
|
212
|
+
async (feature?: CachedFeature) => {
|
|
213
|
+
const layer = cachedCalculatedLayerRef?.current?.layer;
|
|
214
|
+
if (layer?.type === "simple" && feature?.feature) {
|
|
215
|
+
const raw = feature.raw;
|
|
216
|
+
const tag = getTag(raw);
|
|
217
|
+
const properties =
|
|
218
|
+
viewer && !(raw instanceof Model) ? convertCesium3DTileFeatureProperties(raw) : {};
|
|
219
|
+
const isFeatureSelected = shouldUseFeatureIndex
|
|
220
|
+
? selectedFeatureIdsRef.current.includes(tag?.featureId ?? "")
|
|
221
|
+
: tag?.isFeatureSelected;
|
|
222
|
+
|
|
223
|
+
const computedFeature = evalFeature(layer, { ...feature?.feature, properties });
|
|
224
|
+
|
|
225
|
+
const style = computedFeature?.["3dtiles"];
|
|
226
|
+
|
|
227
|
+
COMMON_STYLE_PROPERTIES.forEach(({ name, convert }) => {
|
|
228
|
+
if (name === "color") {
|
|
229
|
+
if (isFeatureSelected) {
|
|
230
|
+
raw.color =
|
|
231
|
+
typeof layer["3dtiles"]?.selectedFeatureColor === "string"
|
|
232
|
+
? toColor(layer["3dtiles"]?.selectedFeatureColor) ?? raw.color
|
|
233
|
+
: raw.color;
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
raw.color = DEFAULT_FEATURE_COLOR;
|
|
238
|
+
}
|
|
239
|
+
const val = convertStyle(style?.[name], convert);
|
|
240
|
+
if (val !== undefined) {
|
|
241
|
+
raw[name] = val;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
if (raw instanceof Cesium3DTilePointFeature) {
|
|
246
|
+
POINT_STYLE_PROPERTIES.forEach(({ name, convert }) => {
|
|
247
|
+
const val = convertStyle(style?.[name], convert);
|
|
248
|
+
if (val !== undefined) {
|
|
249
|
+
raw[name] = val;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if ("style" in raw) {
|
|
255
|
+
raw.style = new Cesium3DTileStyle(
|
|
256
|
+
// TODO: Convert value if it's necessary
|
|
257
|
+
MODEL_STYLE_PROPERTIES.reduce((res, { name, convert }) => {
|
|
258
|
+
const val = convertStyle(style?.[name as keyof typeof style], convert);
|
|
259
|
+
if (val === undefined) return res;
|
|
260
|
+
return { ...res, [name]: val };
|
|
261
|
+
}, {}),
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
attachTag(feature.raw, {
|
|
266
|
+
layerId,
|
|
267
|
+
featureId: feature.feature.id,
|
|
268
|
+
computedFeature,
|
|
269
|
+
isFeatureSelected: tag?.isFeatureSelected,
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
return computedFeature;
|
|
273
|
+
}
|
|
274
|
+
return;
|
|
275
|
+
},
|
|
276
|
+
[evalFeature, layerId, viewer, shouldUseFeatureIndex, selectedFeatureIdsRef],
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
const handleTilesetLoad = useCallback(
|
|
280
|
+
async (t: Cesium3DTile) => {
|
|
281
|
+
if (t.tileset.isDestroyed()) return;
|
|
282
|
+
const features = new Set<Feature>();
|
|
283
|
+
await lookupFeatures(t.content, async (tileFeature, content, batchId) => {
|
|
284
|
+
const feature = (() => {
|
|
285
|
+
const normalFeature = makeFeatureFrom3DTile(tileFeature, content, idProperty);
|
|
286
|
+
const feature: CachedFeature = {
|
|
287
|
+
feature: normalFeature,
|
|
288
|
+
raw: tileFeature,
|
|
289
|
+
};
|
|
290
|
+
return feature;
|
|
291
|
+
})();
|
|
292
|
+
|
|
293
|
+
// Attach tag temporally to select the feature correctly.
|
|
294
|
+
attachTag(feature.raw, {
|
|
295
|
+
layerId: layerIdRef.current,
|
|
296
|
+
featureId: feature.feature.id,
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
if (batchId != null && shouldUseFeatureIndex) {
|
|
300
|
+
featureIndex.addFeature(content, batchId, feature.feature.id);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
await attachComputedFeature(feature);
|
|
304
|
+
cachedFeaturesRef.current.push(feature);
|
|
305
|
+
|
|
306
|
+
cachedFeatureIds.current.add(feature.feature.id);
|
|
307
|
+
|
|
308
|
+
// NOTE: Don't pass a large object like `properties`.
|
|
309
|
+
features.add(pick(feature.feature, ["id", "type", "range"]));
|
|
310
|
+
});
|
|
311
|
+
onComputedFeatureFetch?.(Array.from(features.values()), []);
|
|
312
|
+
},
|
|
313
|
+
[
|
|
314
|
+
cachedFeaturesRef,
|
|
315
|
+
attachComputedFeature,
|
|
316
|
+
onComputedFeatureFetch,
|
|
317
|
+
idProperty,
|
|
318
|
+
featureIndex,
|
|
319
|
+
shouldUseFeatureIndex,
|
|
320
|
+
layerIdRef,
|
|
321
|
+
],
|
|
322
|
+
);
|
|
323
|
+
const handleTilesetLoadRef = useRef(handleTilesetLoad);
|
|
324
|
+
handleTilesetLoadRef.current = handleTilesetLoad;
|
|
325
|
+
useEffect(
|
|
326
|
+
() =>
|
|
327
|
+
tileset.current?.tileLoad.addEventListener((t: Cesium3DTile) =>
|
|
328
|
+
handleTilesetLoadRef.current(t),
|
|
329
|
+
),
|
|
330
|
+
[tileset, isTilesetReady],
|
|
331
|
+
);
|
|
332
|
+
|
|
333
|
+
const handleTilesetUnload = useCallback(
|
|
334
|
+
async (t: Cesium3DTile) => {
|
|
335
|
+
if (t.tileset.isDestroyed() || !shouldUseFeatureIndex) return;
|
|
336
|
+
await lookupFeatures(t.content, async (tileFeature, content) => {
|
|
337
|
+
featureIndex.deleteFeature(makeFeatureId(tileFeature, content, idProperty));
|
|
338
|
+
});
|
|
339
|
+
},
|
|
340
|
+
[idProperty, featureIndex, shouldUseFeatureIndex],
|
|
341
|
+
);
|
|
342
|
+
const handleTilesetUnloadRef = useRef(handleTilesetUnload);
|
|
343
|
+
handleTilesetUnloadRef.current = handleTilesetUnload;
|
|
344
|
+
useEffect(
|
|
345
|
+
() =>
|
|
346
|
+
tileset.current?.tileUnload.addEventListener((t: Cesium3DTile) =>
|
|
347
|
+
handleTilesetUnloadRef.current(t),
|
|
348
|
+
),
|
|
349
|
+
[tileset, isTilesetReady],
|
|
350
|
+
);
|
|
351
|
+
|
|
352
|
+
useEffect(() => {
|
|
353
|
+
cachedCalculatedLayerRef.current = layer;
|
|
354
|
+
}, [layer]);
|
|
355
|
+
|
|
356
|
+
// Update 3dtiles styles
|
|
357
|
+
const tileAppearance = useMemo(() => extractSimpleLayer(layer)?.["3dtiles"], [layer]);
|
|
358
|
+
const pickedAppearance = usePick(tileAppearance, TILESET_APPEARANCE_FIELDS);
|
|
359
|
+
|
|
360
|
+
const updateStyle = shouldUseFeatureIndex ? 0 : layer?.layer._updateStyle;
|
|
361
|
+
const prevUpdateStyle = useRef(updateStyle);
|
|
362
|
+
|
|
363
|
+
// If styles are updated while features are calculating,
|
|
364
|
+
// we stop calculating features, and reassign styles.
|
|
365
|
+
const skippedComputingAt = useRef<number | null>();
|
|
366
|
+
useEffect(() => {
|
|
367
|
+
skippedComputingAt.current = Date.now();
|
|
368
|
+
}, [pickedAppearance, updateStyle]);
|
|
369
|
+
|
|
370
|
+
const computeFeatureAsync = useCallback(
|
|
371
|
+
async (f: CachedFeature, startedComputingAt: number) =>
|
|
372
|
+
new Promise(resolve =>
|
|
373
|
+
requestAnimationFrame(() => {
|
|
374
|
+
if (skippedComputingAt.current && skippedComputingAt.current > startedComputingAt) {
|
|
375
|
+
resolve(undefined);
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (pickedAppearance || updateStyle) {
|
|
380
|
+
attachComputedFeature(f);
|
|
381
|
+
}
|
|
382
|
+
resolve(undefined);
|
|
383
|
+
}),
|
|
384
|
+
),
|
|
385
|
+
[pickedAppearance, attachComputedFeature, updateStyle],
|
|
386
|
+
);
|
|
387
|
+
|
|
388
|
+
const computeFeatures = useCallback(
|
|
389
|
+
async (startedComputingAt: number) => {
|
|
390
|
+
const tempAsyncProcesses: Promise<unknown>[] = [];
|
|
391
|
+
let skipped = false;
|
|
392
|
+
// TODO: Search the layer's features from tilesetRef to improve performance instead of using cachedFeaturesRef
|
|
393
|
+
for (const f of cachedFeaturesRef.current) {
|
|
394
|
+
if (skippedComputingAt.current && skippedComputingAt.current > startedComputingAt) {
|
|
395
|
+
skipped = true;
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
tempAsyncProcesses.push(computeFeatureAsync(f, startedComputingAt));
|
|
400
|
+
|
|
401
|
+
if (tempAsyncProcesses.length > MAX_NUMBER_OF_CONCURRENT_COMPUTING_FEATURES) {
|
|
402
|
+
await Promise.all(tempAsyncProcesses);
|
|
403
|
+
tempAsyncProcesses.length = 0;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
if (!skipped) {
|
|
407
|
+
await Promise.all(tempAsyncProcesses);
|
|
408
|
+
}
|
|
409
|
+
prevUpdateStyle.current = updateStyle;
|
|
410
|
+
tempAsyncProcesses.length = 0;
|
|
411
|
+
},
|
|
412
|
+
[computeFeatureAsync, updateStyle],
|
|
413
|
+
);
|
|
414
|
+
|
|
415
|
+
const { requestRender } = useContext();
|
|
416
|
+
|
|
417
|
+
useEffect(() => {
|
|
418
|
+
const compute = async () => {
|
|
419
|
+
const startedComputingAt = Date.now();
|
|
420
|
+
await computeFeatures(startedComputingAt);
|
|
421
|
+
requestRender?.();
|
|
422
|
+
};
|
|
423
|
+
compute();
|
|
424
|
+
}, [computeFeatures, requestRender, updateStyle]);
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
export const useHooks = ({
|
|
428
|
+
id,
|
|
429
|
+
boxId,
|
|
430
|
+
isVisible,
|
|
431
|
+
property,
|
|
432
|
+
sceneProperty,
|
|
433
|
+
layer,
|
|
434
|
+
meta,
|
|
435
|
+
evalFeature,
|
|
436
|
+
onComputedFeatureFetch,
|
|
437
|
+
onLayerFetch,
|
|
438
|
+
}: {
|
|
439
|
+
id: string;
|
|
440
|
+
boxId: string;
|
|
441
|
+
isVisible?: boolean;
|
|
442
|
+
property?: Property;
|
|
443
|
+
sceneProperty?: SceneProperty;
|
|
444
|
+
layer?: ComputedLayer;
|
|
445
|
+
feature?: ComputedFeature;
|
|
446
|
+
meta?: Record<string, unknown>;
|
|
447
|
+
evalFeature: EvalFeature;
|
|
448
|
+
onComputedFeatureFetch?: (f: Feature[], cf: ComputedFeature[]) => void;
|
|
449
|
+
onLayerFetch?: (value: Partial<Pick<LayerSimple, "properties">>) => void;
|
|
450
|
+
}) => {
|
|
451
|
+
const { viewer } = useCesium();
|
|
452
|
+
const tilesetRef = useRef<Cesium3DTilesetType>();
|
|
453
|
+
const { onLayerLoad } = useContext();
|
|
454
|
+
const layerIdRef = useRef(layer?.id);
|
|
455
|
+
layerIdRef.current = layer?.id;
|
|
456
|
+
|
|
457
|
+
const {
|
|
458
|
+
tileset,
|
|
459
|
+
styleUrl,
|
|
460
|
+
edgeColor,
|
|
461
|
+
edgeWidth,
|
|
462
|
+
experimental_clipping,
|
|
463
|
+
apiKey,
|
|
464
|
+
selectedFeatureColor,
|
|
465
|
+
disableIndexingFeature,
|
|
466
|
+
} = property ?? {};
|
|
467
|
+
const {
|
|
468
|
+
width,
|
|
469
|
+
height,
|
|
470
|
+
length,
|
|
471
|
+
location,
|
|
472
|
+
coordinates,
|
|
473
|
+
heading,
|
|
474
|
+
roll,
|
|
475
|
+
pitch,
|
|
476
|
+
planes: _planes,
|
|
477
|
+
visible: clippingVisible = true,
|
|
478
|
+
direction = "inside",
|
|
479
|
+
builtinBoxProps,
|
|
480
|
+
allowEnterGround,
|
|
481
|
+
} = useClippingBox({ clipping: experimental_clipping, boxId });
|
|
482
|
+
|
|
483
|
+
const [style, setStyle] = useState<Cesium3DTileStyle>();
|
|
484
|
+
const { url, type, idProperty } = useData(layer);
|
|
485
|
+
const shouldUseFeatureIndex = !disableIndexingFeature && !!idProperty;
|
|
486
|
+
|
|
487
|
+
const [isTilesetReady, setIsTilesetReady] = useState(false);
|
|
488
|
+
|
|
489
|
+
const prevPlanes = useRef(_planes);
|
|
490
|
+
const planes = useMemo(() => {
|
|
491
|
+
if (
|
|
492
|
+
!prevPlanes.current?.length ||
|
|
493
|
+
!prevPlanes.current?.every(
|
|
494
|
+
(p, i) =>
|
|
495
|
+
p.normal?.x === _planes?.[i].normal?.x &&
|
|
496
|
+
p.normal?.y === _planes?.[i].normal?.y &&
|
|
497
|
+
p.normal?.z === _planes?.[i].normal?.z &&
|
|
498
|
+
p.distance === _planes?.[i].distance,
|
|
499
|
+
)
|
|
500
|
+
) {
|
|
501
|
+
prevPlanes.current = _planes;
|
|
502
|
+
}
|
|
503
|
+
return prevPlanes.current;
|
|
504
|
+
}, [_planes]);
|
|
505
|
+
const clipDirection = direction === "inside" ? -1 : 1;
|
|
506
|
+
// Create immutable object
|
|
507
|
+
const [clippingPlanes] = useState(
|
|
508
|
+
() =>
|
|
509
|
+
new CesiumClippingPlaneCollection({
|
|
510
|
+
planes: planes?.map(
|
|
511
|
+
plane =>
|
|
512
|
+
new ClippingPlane(
|
|
513
|
+
new Cartesian3(plane.normal?.x, plane.normal?.y, plane.normal?.z),
|
|
514
|
+
(plane.distance || 0) * clipDirection,
|
|
515
|
+
),
|
|
516
|
+
),
|
|
517
|
+
unionClippingRegions: direction === "outside",
|
|
518
|
+
edgeWidth: edgeWidth,
|
|
519
|
+
edgeColor: toColor(edgeColor),
|
|
520
|
+
}),
|
|
521
|
+
);
|
|
522
|
+
|
|
523
|
+
const { drawClippingEnabled, drawClippingEdgeProps } = useDrawClipping({
|
|
524
|
+
...experimental_clipping?.draw,
|
|
525
|
+
tilesetRef,
|
|
526
|
+
viewer,
|
|
527
|
+
clippingPlanes,
|
|
528
|
+
isTilesetReady,
|
|
529
|
+
});
|
|
530
|
+
const [featureIndex] = useState(() => new TilesetFeatureIndex());
|
|
531
|
+
|
|
532
|
+
const ref = useCallback(
|
|
533
|
+
(tileset: CesiumComponentRef<Cesium3DTilesetType> | null) => {
|
|
534
|
+
if (tileset?.cesiumElement) {
|
|
535
|
+
attachTag(tileset.cesiumElement, {
|
|
536
|
+
layerId: layer?.id || id,
|
|
537
|
+
featureIndex: shouldUseFeatureIndex ? featureIndex : undefined,
|
|
538
|
+
appearanceType: "3dtiles",
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
if (layer?.id && tileset?.cesiumElement) {
|
|
542
|
+
(tileset?.cesiumElement as any)[layerIdField] = layer.id;
|
|
543
|
+
}
|
|
544
|
+
tilesetRef.current = tileset?.cesiumElement;
|
|
545
|
+
},
|
|
546
|
+
[id, layer?.id, featureIndex, shouldUseFeatureIndex],
|
|
547
|
+
);
|
|
548
|
+
|
|
549
|
+
const selectedFeatureIdsRef = useRef<string[]>([]);
|
|
550
|
+
const selectedFeatureColorRef = useRef(selectedFeatureColor);
|
|
551
|
+
selectedFeatureColorRef.current = selectedFeatureColor;
|
|
552
|
+
const [selectedFeatureColorMap] = useState(() => new Map<string, Color>());
|
|
553
|
+
|
|
554
|
+
useEffect(() => {
|
|
555
|
+
if (!tilesetRef.current || !shouldUseFeatureIndex || !isTilesetReady) return;
|
|
556
|
+
Object.assign(tilesetRef.current, {
|
|
557
|
+
onSelectFeature: (f: Cesium3DTileFeature) => {
|
|
558
|
+
const tag = getTag(f);
|
|
559
|
+
if (tag?.featureId) {
|
|
560
|
+
selectedFeatureIdsRef.current.push(tag.featureId);
|
|
561
|
+
selectedFeatureColorMap.set(tag.featureId, f.color);
|
|
562
|
+
}
|
|
563
|
+
if (selectedFeatureColorRef.current) {
|
|
564
|
+
f.color = toColor(selectedFeatureColorRef.current) ?? f.color;
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
onUnselectFeature: (f: Cesium3DTileFeature) => {
|
|
568
|
+
const tag = getTag(f);
|
|
569
|
+
if (tag?.featureId) {
|
|
570
|
+
selectedFeatureIdsRef.current = selectedFeatureIdsRef.current.filter(
|
|
571
|
+
v => v !== tag.featureId,
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
f.color = selectedFeatureColorMap.get(tag?.featureId ?? "") ?? DEFAULT_FEATURE_COLOR;
|
|
575
|
+
},
|
|
576
|
+
});
|
|
577
|
+
}, [selectedFeatureColorMap, featureIndex, shouldUseFeatureIndex, isTilesetReady]);
|
|
578
|
+
|
|
579
|
+
useFeature({
|
|
580
|
+
id,
|
|
581
|
+
tileset: tilesetRef,
|
|
582
|
+
layer,
|
|
583
|
+
idProperty,
|
|
584
|
+
viewer,
|
|
585
|
+
evalFeature,
|
|
586
|
+
onComputedFeatureFetch,
|
|
587
|
+
featureIndex,
|
|
588
|
+
selectedFeatureIdsRef,
|
|
589
|
+
shouldUseFeatureIndex,
|
|
590
|
+
isTilesetReady,
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
const [terrainHeightEstimate, setTerrainHeightEstimate] = useState(0);
|
|
594
|
+
const inProgressSamplingTerrainHeight = useRef(false);
|
|
595
|
+
const updateTerrainHeight = useCallback(
|
|
596
|
+
(translation: Cartesian3) => {
|
|
597
|
+
if (inProgressSamplingTerrainHeight.current || !viewer) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
if (!allowEnterGround) {
|
|
602
|
+
inProgressSamplingTerrainHeight.current = true;
|
|
603
|
+
sampleTerrainHeightFromCartesian(viewer.scene, translation).then(v => {
|
|
604
|
+
setTerrainHeightEstimate(v ?? 0);
|
|
605
|
+
inProgressSamplingTerrainHeight.current = false;
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
[allowEnterGround, viewer],
|
|
610
|
+
);
|
|
611
|
+
|
|
612
|
+
useEffect(() => {
|
|
613
|
+
if (experimental_clipping?.draw) return;
|
|
614
|
+
|
|
615
|
+
const coords = coordinates
|
|
616
|
+
? coordinates
|
|
617
|
+
: location
|
|
618
|
+
? [location.lng, location.lat, location.height ?? 0]
|
|
619
|
+
: undefined;
|
|
620
|
+
const position = Cartesian3.fromDegrees(coords?.[0] || 0, coords?.[1] || 0, coords?.[2] || 0);
|
|
621
|
+
|
|
622
|
+
const prepareClippingPlanes = async () => {
|
|
623
|
+
if (!tilesetRef.current || !isTilesetReady) {
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
// Use internal original matrix for clipping planes.
|
|
628
|
+
const clippingPlanesOriginMatrix = (
|
|
629
|
+
tilesetRef.current as any
|
|
630
|
+
).clippingPlanesOriginMatrix.clone();
|
|
631
|
+
|
|
632
|
+
const dimensions = new Cartesian3(width || 100, length || 100, height || 100);
|
|
633
|
+
|
|
634
|
+
if (!allowEnterGround) {
|
|
635
|
+
const trs = new TranslationRotationScale(position, undefined, dimensions);
|
|
636
|
+
translationWithClamping(trs, !!allowEnterGround, terrainHeightEstimate);
|
|
637
|
+
position.x = trs.translation.x;
|
|
638
|
+
position.y = trs.translation.y;
|
|
639
|
+
position.z = trs.translation.z;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
const hpr = heading && pitch && roll ? new HeadingPitchRoll(heading, pitch, roll) : undefined;
|
|
643
|
+
const boxTransform = Matrix4.multiply(
|
|
644
|
+
hpr
|
|
645
|
+
? Matrix4.fromRotationTranslation(Matrix3.fromHeadingPitchRoll(hpr), position)
|
|
646
|
+
: Transforms.eastNorthUpToFixedFrame(position),
|
|
647
|
+
Matrix4.fromScale(dimensions, new Matrix4()),
|
|
648
|
+
new Matrix4(),
|
|
649
|
+
);
|
|
650
|
+
|
|
651
|
+
const inverseOriginalModelMatrix = Matrix4.inverse(clippingPlanesOriginMatrix, new Matrix4());
|
|
652
|
+
Matrix4.multiply(inverseOriginalModelMatrix, boxTransform, clippingPlanes.modelMatrix);
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
prepareClippingPlanes();
|
|
656
|
+
if (!allowEnterGround) {
|
|
657
|
+
updateTerrainHeight(position);
|
|
658
|
+
}
|
|
659
|
+
}, [
|
|
660
|
+
width,
|
|
661
|
+
length,
|
|
662
|
+
height,
|
|
663
|
+
heading,
|
|
664
|
+
pitch,
|
|
665
|
+
roll,
|
|
666
|
+
location,
|
|
667
|
+
coordinates,
|
|
668
|
+
clippingPlanes.modelMatrix,
|
|
669
|
+
updateTerrainHeight,
|
|
670
|
+
allowEnterGround,
|
|
671
|
+
terrainHeightEstimate,
|
|
672
|
+
experimental_clipping?.draw,
|
|
673
|
+
isTilesetReady,
|
|
674
|
+
]);
|
|
675
|
+
|
|
676
|
+
useEffect(() => {
|
|
677
|
+
if (experimental_clipping?.draw) return;
|
|
678
|
+
clippingPlanes.enabled = clippingVisible;
|
|
679
|
+
}, [clippingPlanes, clippingVisible, experimental_clipping?.draw]);
|
|
680
|
+
|
|
681
|
+
useEffect(() => {
|
|
682
|
+
if (experimental_clipping?.draw) return;
|
|
683
|
+
clippingPlanes.unionClippingRegions = direction === "outside";
|
|
684
|
+
}, [clippingPlanes, direction, experimental_clipping?.draw]);
|
|
685
|
+
|
|
686
|
+
useEffect(() => {
|
|
687
|
+
if (experimental_clipping?.draw) return;
|
|
688
|
+
clippingPlanes.removeAll();
|
|
689
|
+
planes?.forEach(plane =>
|
|
690
|
+
clippingPlanes.add(
|
|
691
|
+
new ClippingPlane(
|
|
692
|
+
new Cartesian3(plane.normal?.x, plane.normal?.y, plane.normal?.z),
|
|
693
|
+
(plane.distance || 0) * clipDirection,
|
|
694
|
+
),
|
|
695
|
+
),
|
|
696
|
+
);
|
|
697
|
+
}, [planes, clippingPlanes, clipDirection, experimental_clipping?.draw]);
|
|
698
|
+
|
|
699
|
+
useEffect(() => {
|
|
700
|
+
if (!styleUrl) {
|
|
701
|
+
setStyle(undefined);
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
(async () => {
|
|
705
|
+
const res = await fetch(styleUrl);
|
|
706
|
+
if (!res.ok) return;
|
|
707
|
+
setStyle(new Cesium3DTileStyle(await res.json()));
|
|
708
|
+
})();
|
|
709
|
+
}, [styleUrl]);
|
|
710
|
+
|
|
711
|
+
const googleMapResource = useMemo(() => {
|
|
712
|
+
if (type !== "google-photorealistic" || !isVisible) return;
|
|
713
|
+
// Ref: https://github.com/CesiumGS/cesium/blob/b208135a095073386e5f04a59956ee11a03aa847/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js#L30
|
|
714
|
+
const googleMaps = CesiumGoogleMaps as GoogleMaps;
|
|
715
|
+
// Default key: https://github.com/CesiumGS/cesium/blob/b208135a095073386e5f04a59956ee11a03aa847/packages/engine/Source/Core/GoogleMaps.js#L6C36-L6C36
|
|
716
|
+
const key = defaultValue(apiKey, googleMaps.defaultApiKey);
|
|
717
|
+
const credit = googleMaps.getDefaultApiKeyCredit(key);
|
|
718
|
+
return new Resource({
|
|
719
|
+
url: `${googleMaps.mapTilesApiEndpoint}3dtiles/root.json`,
|
|
720
|
+
queryParameters: { key },
|
|
721
|
+
credits: credit ? [credit] : undefined,
|
|
722
|
+
} as Resource.ConstructorOptions);
|
|
723
|
+
}, [apiKey, type, isVisible]);
|
|
724
|
+
|
|
725
|
+
const tilesetUrl = useMemo(() => {
|
|
726
|
+
return type === "osm-buildings" && isVisible
|
|
727
|
+
? IonResource.fromAssetId(96188, {
|
|
728
|
+
accessToken: meta?.cesiumIonAccessToken as string | undefined,
|
|
729
|
+
}) // https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Scene/createOsmBuildings.js#L53
|
|
730
|
+
: googleMapResource
|
|
731
|
+
? googleMapResource
|
|
732
|
+
: type === "3dtiles" && isVisible
|
|
733
|
+
? url ?? tileset
|
|
734
|
+
: null;
|
|
735
|
+
}, [isVisible, tileset, url, type, meta, googleMapResource]);
|
|
736
|
+
|
|
737
|
+
const imageBasedLighting = useMemo(() => {
|
|
738
|
+
if (
|
|
739
|
+
!property?.specularEnvironmentMaps &&
|
|
740
|
+
!property?.sphericalHarmonicCoefficients &&
|
|
741
|
+
!sceneProperty?.light?.specularEnvironmentMaps &&
|
|
742
|
+
!sceneProperty?.light?.sphericalHarmonicCoefficients
|
|
743
|
+
)
|
|
744
|
+
return;
|
|
745
|
+
|
|
746
|
+
const ibl = new ImageBasedLighting();
|
|
747
|
+
const specularEnvironmentMaps =
|
|
748
|
+
property?.specularEnvironmentMaps ?? sceneProperty?.light?.specularEnvironmentMaps;
|
|
749
|
+
const imageBasedLightIntensity =
|
|
750
|
+
property?.imageBasedLightIntensity ?? sceneProperty?.light?.imageBasedLightIntensity;
|
|
751
|
+
const sphericalHarmonicCoefficients = arrayToCartecian3(
|
|
752
|
+
property?.sphericalHarmonicCoefficients ??
|
|
753
|
+
sceneProperty?.light?.sphericalHarmonicCoefficients,
|
|
754
|
+
imageBasedLightIntensity,
|
|
755
|
+
);
|
|
756
|
+
|
|
757
|
+
if (specularEnvironmentMaps) {
|
|
758
|
+
ibl.specularEnvironmentMaps = specularEnvironmentMaps;
|
|
759
|
+
}
|
|
760
|
+
if (sphericalHarmonicCoefficients) {
|
|
761
|
+
ibl.sphericalHarmonicCoefficients = sphericalHarmonicCoefficients;
|
|
762
|
+
}
|
|
763
|
+
return ibl;
|
|
764
|
+
}, [
|
|
765
|
+
property?.specularEnvironmentMaps,
|
|
766
|
+
property?.sphericalHarmonicCoefficients,
|
|
767
|
+
property?.imageBasedLightIntensity,
|
|
768
|
+
sceneProperty?.light?.specularEnvironmentMaps,
|
|
769
|
+
sceneProperty?.light?.sphericalHarmonicCoefficients,
|
|
770
|
+
sceneProperty?.light?.imageBasedLightIntensity,
|
|
771
|
+
]);
|
|
772
|
+
|
|
773
|
+
const handleReady = useCallback(
|
|
774
|
+
(tileset: Cesium3DTileset) => {
|
|
775
|
+
setIsTilesetReady(true);
|
|
776
|
+
onLayerFetch?.({ properties: tileset.properties });
|
|
777
|
+
onLayerLoad?.({ layerId: layerIdRef.current });
|
|
778
|
+
},
|
|
779
|
+
[onLayerFetch, onLayerLoad],
|
|
780
|
+
);
|
|
781
|
+
|
|
782
|
+
return {
|
|
783
|
+
tilesetUrl,
|
|
784
|
+
ref,
|
|
785
|
+
style,
|
|
786
|
+
clippingPlanes,
|
|
787
|
+
drawClippingEnabled,
|
|
788
|
+
drawClippingEdgeProps,
|
|
789
|
+
builtinBoxProps,
|
|
790
|
+
imageBasedLighting,
|
|
791
|
+
handleReady,
|
|
792
|
+
};
|
|
793
|
+
};
|