@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,375 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Cartesian3,
|
|
3
|
+
HeadingPitchRoll,
|
|
4
|
+
Quaternion,
|
|
5
|
+
Math as CesiumMath,
|
|
6
|
+
TranslationRotationScale,
|
|
7
|
+
Cartesian2,
|
|
8
|
+
Cartographic,
|
|
9
|
+
} from "cesium";
|
|
10
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
11
|
+
import { useCesium } from "resium";
|
|
12
|
+
|
|
13
|
+
import type { Property } from "..";
|
|
14
|
+
import { LayerEditEvent } from "../../../..";
|
|
15
|
+
import { sampleTerrainHeightFromCartesian, updateMapController } from "../../../common";
|
|
16
|
+
import { useContext } from "../../context";
|
|
17
|
+
import {
|
|
18
|
+
type FeatureProps,
|
|
19
|
+
toColor,
|
|
20
|
+
toTimeInterval,
|
|
21
|
+
toDistanceDisplayCondition,
|
|
22
|
+
} from "../../utils";
|
|
23
|
+
import type { EdgeEventCallback } from "../Edge";
|
|
24
|
+
import type { PointEventCallback } from "../ScalePoints";
|
|
25
|
+
import { computeMouseMoveAmount, updateTrs } from "../utils";
|
|
26
|
+
|
|
27
|
+
export const useHooks = ({
|
|
28
|
+
property,
|
|
29
|
+
geometry,
|
|
30
|
+
feature,
|
|
31
|
+
onLayerEdit,
|
|
32
|
+
}: Pick<FeatureProps<Property>, "property" | "geometry" | "feature"> & {
|
|
33
|
+
onLayerEdit?: (e: LayerEditEvent) => void;
|
|
34
|
+
}) => {
|
|
35
|
+
const { viewer } = useCesium();
|
|
36
|
+
const ctx = useContext();
|
|
37
|
+
const {
|
|
38
|
+
fillColor,
|
|
39
|
+
outlineColor,
|
|
40
|
+
activeOutlineColor,
|
|
41
|
+
outlineWidth,
|
|
42
|
+
draggableOutlineColor,
|
|
43
|
+
activeDraggableOutlineColor,
|
|
44
|
+
draggableOutlineWidth,
|
|
45
|
+
pointFillColor,
|
|
46
|
+
pointOutlineColor,
|
|
47
|
+
activePointOutlineColor,
|
|
48
|
+
axisLineColor,
|
|
49
|
+
cursor,
|
|
50
|
+
allowEnterGround,
|
|
51
|
+
} = property ?? {};
|
|
52
|
+
|
|
53
|
+
const [terrainHeightEstimate, setTerrainHeightEstimate] = useState(0);
|
|
54
|
+
const [trs] = useState(() =>
|
|
55
|
+
updateTrs(
|
|
56
|
+
new TranslationRotationScale(),
|
|
57
|
+
property,
|
|
58
|
+
terrainHeightEstimate,
|
|
59
|
+
geometry,
|
|
60
|
+
allowEnterGround,
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const inProgressSamplingTerrainHeight = useRef(false);
|
|
65
|
+
const updateTerrainHeight = useCallback(() => {
|
|
66
|
+
if (inProgressSamplingTerrainHeight.current) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (!allowEnterGround && viewer) {
|
|
71
|
+
inProgressSamplingTerrainHeight.current = true;
|
|
72
|
+
sampleTerrainHeightFromCartesian(viewer.scene, trs.translation).then(v => {
|
|
73
|
+
setTerrainHeightEstimate(v ?? 0);
|
|
74
|
+
inProgressSamplingTerrainHeight.current = false;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}, [allowEnterGround, viewer, trs]);
|
|
78
|
+
|
|
79
|
+
const { requestRender } = useContext();
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
updateTrs(trs, property, terrainHeightEstimate, geometry, allowEnterGround);
|
|
83
|
+
requestRender?.();
|
|
84
|
+
updateTerrainHeight();
|
|
85
|
+
}, [
|
|
86
|
+
property,
|
|
87
|
+
geometry,
|
|
88
|
+
trs,
|
|
89
|
+
viewer,
|
|
90
|
+
terrainHeightEstimate,
|
|
91
|
+
updateTerrainHeight,
|
|
92
|
+
allowEnterGround,
|
|
93
|
+
requestRender,
|
|
94
|
+
]);
|
|
95
|
+
|
|
96
|
+
const style = useMemo(
|
|
97
|
+
() => ({
|
|
98
|
+
fillColor: toColor(fillColor),
|
|
99
|
+
outlineColor: toColor(outlineColor),
|
|
100
|
+
activeOutlineColor: toColor(activeOutlineColor),
|
|
101
|
+
draggableOutlineColor: toColor(draggableOutlineColor),
|
|
102
|
+
activeDraggableOutlineColor: toColor(activeDraggableOutlineColor),
|
|
103
|
+
outlineWidth,
|
|
104
|
+
draggableOutlineWidth,
|
|
105
|
+
fill: !!fillColor,
|
|
106
|
+
outline: !!outlineColor,
|
|
107
|
+
}),
|
|
108
|
+
[
|
|
109
|
+
fillColor,
|
|
110
|
+
outlineColor,
|
|
111
|
+
activeOutlineColor,
|
|
112
|
+
outlineWidth,
|
|
113
|
+
draggableOutlineWidth,
|
|
114
|
+
draggableOutlineColor,
|
|
115
|
+
activeDraggableOutlineColor,
|
|
116
|
+
],
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const scalePointStyle = useMemo(
|
|
120
|
+
() => ({
|
|
121
|
+
pointFillColor: toColor(pointFillColor) ?? style.fillColor,
|
|
122
|
+
pointOutlineColor: toColor(pointOutlineColor) ?? style.outlineColor,
|
|
123
|
+
activePointOutlineColor: toColor(activePointOutlineColor) ?? style.outlineColor,
|
|
124
|
+
axisLineColor: toColor(axisLineColor) ?? style.outlineColor,
|
|
125
|
+
}),
|
|
126
|
+
[pointFillColor, pointOutlineColor, axisLineColor, style, activePointOutlineColor],
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
// ScalePoint event handlers
|
|
130
|
+
const currentPointIndex = useRef<number>();
|
|
131
|
+
const handlePointMouseDown: PointEventCallback = useCallback(
|
|
132
|
+
(_, { index }) => {
|
|
133
|
+
if (!viewer) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
updateMapController(viewer, false);
|
|
137
|
+
currentPointIndex.current = index;
|
|
138
|
+
},
|
|
139
|
+
[viewer],
|
|
140
|
+
);
|
|
141
|
+
const prevMousePosition2dForPoint = useRef<Cartesian2>();
|
|
142
|
+
const handlePointMouseMove: PointEventCallback = useCallback(
|
|
143
|
+
(e, { position, oppositePosition, pointLocal, index, layerId }) => {
|
|
144
|
+
if (
|
|
145
|
+
currentPointIndex.current !== index ||
|
|
146
|
+
!position ||
|
|
147
|
+
!oppositePosition ||
|
|
148
|
+
!pointLocal ||
|
|
149
|
+
!viewer
|
|
150
|
+
) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const mousePosition = e.startPosition;
|
|
155
|
+
if (prevMousePosition2dForPoint.current === undefined) {
|
|
156
|
+
prevMousePosition2dForPoint.current = new Cartesian2(mousePosition.x, mousePosition.y);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const currentMousePosition2d = new Cartesian2(mousePosition.x, mousePosition.y);
|
|
161
|
+
|
|
162
|
+
const axisVector = Cartesian3.subtract(position, oppositePosition, new Cartesian3());
|
|
163
|
+
const length = Cartesian3.magnitude(axisVector);
|
|
164
|
+
const scaleDirection = Cartesian3.normalize(axisVector, new Cartesian3());
|
|
165
|
+
|
|
166
|
+
const { scaleAmount, pixelLengthAfterScaling } = computeMouseMoveAmount(
|
|
167
|
+
viewer.scene,
|
|
168
|
+
{
|
|
169
|
+
startPosition: prevMousePosition2dForPoint.current,
|
|
170
|
+
endPosition: currentMousePosition2d,
|
|
171
|
+
},
|
|
172
|
+
position,
|
|
173
|
+
scaleDirection,
|
|
174
|
+
length,
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
prevMousePosition2dForPoint.current = currentMousePosition2d.clone();
|
|
178
|
+
|
|
179
|
+
const axisLocal = Cartesian3.normalize(pointLocal, new Cartesian3());
|
|
180
|
+
const xDot = Math.abs(Cartesian3.dot(new Cartesian3(1, 0, 0), axisLocal));
|
|
181
|
+
const yDot = Math.abs(Cartesian3.dot(new Cartesian3(0, 1, 0), axisLocal));
|
|
182
|
+
const zDot = Math.abs(Cartesian3.dot(new Cartesian3(0, 0, 1), axisLocal));
|
|
183
|
+
|
|
184
|
+
const isProportionalScaling = xDot && yDot && zDot;
|
|
185
|
+
|
|
186
|
+
// When downscaling, stop at 20px length.
|
|
187
|
+
if (scaleAmount < 0) {
|
|
188
|
+
const isDiagonal = axisLocal.x && axisLocal.y && axisLocal.y;
|
|
189
|
+
const pixelSideLengthAfterScaling = isDiagonal
|
|
190
|
+
? pixelLengthAfterScaling / Math.sqrt(2)
|
|
191
|
+
: pixelLengthAfterScaling;
|
|
192
|
+
if (pixelSideLengthAfterScaling < 20) {
|
|
193
|
+
// Do nothing if scaling down will make the box smaller than 20px
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Compute scale components along xyz
|
|
199
|
+
const scaleStep = Cartesian3.multiplyByScalar(
|
|
200
|
+
// Taking abs because scaling step is independent of axis direction
|
|
201
|
+
// Scaling step is negative when scaling down and positive when scaling up
|
|
202
|
+
Cartesian3.abs(
|
|
203
|
+
// Extract scale components along the axis
|
|
204
|
+
Cartesian3.multiplyComponents(
|
|
205
|
+
trs.scale,
|
|
206
|
+
// For proportional scaling we scale equally along xyz
|
|
207
|
+
isProportionalScaling ? new Cartesian3(1, 1, 1) : axisLocal,
|
|
208
|
+
new Cartesian3(),
|
|
209
|
+
),
|
|
210
|
+
new Cartesian3(),
|
|
211
|
+
),
|
|
212
|
+
scaleAmount,
|
|
213
|
+
new Cartesian3(),
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
// Move the box by half the scale amount in the direction of scaling so
|
|
217
|
+
// that the opposite end remains stationary.
|
|
218
|
+
const moveStep = Cartesian3.multiplyByScalar(axisVector, scaleAmount / 2, new Cartesian3());
|
|
219
|
+
|
|
220
|
+
// Prevent scaling in Z axis if it will result in the box going underground.
|
|
221
|
+
const isDraggingBottomScalePoint = axisLocal.z < 0;
|
|
222
|
+
const isUpscaling = scaleAmount > 0;
|
|
223
|
+
if (!allowEnterGround && isUpscaling && isDraggingBottomScalePoint) {
|
|
224
|
+
const boxCenterHeight = Cartographic.fromCartesian(
|
|
225
|
+
trs.translation,
|
|
226
|
+
undefined,
|
|
227
|
+
new Cartographic(),
|
|
228
|
+
).height;
|
|
229
|
+
const bottomHeight = boxCenterHeight - trs.scale.z / 2;
|
|
230
|
+
const bottomHeightAfterScaling = bottomHeight - Math.abs(moveStep.z);
|
|
231
|
+
if (bottomHeightAfterScaling < 0) {
|
|
232
|
+
scaleStep.z = 0;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const nextScale = new Cartesian3();
|
|
237
|
+
const nextTranslation = new Cartesian3();
|
|
238
|
+
|
|
239
|
+
Cartesian3.add(trs.scale, scaleStep, nextScale);
|
|
240
|
+
Cartesian3.add(trs.translation, moveStep, nextTranslation);
|
|
241
|
+
|
|
242
|
+
const cartographic = viewer?.scene.globe.ellipsoid.cartesianToCartographic(
|
|
243
|
+
nextTranslation,
|
|
244
|
+
) as Cartographic;
|
|
245
|
+
|
|
246
|
+
onLayerEdit?.({
|
|
247
|
+
layerId,
|
|
248
|
+
scale: {
|
|
249
|
+
width: nextScale.x,
|
|
250
|
+
length: nextScale.y,
|
|
251
|
+
height: nextScale.z,
|
|
252
|
+
location: {
|
|
253
|
+
lat: CesiumMath.toDegrees(cartographic?.latitude),
|
|
254
|
+
lng: CesiumMath.toDegrees(cartographic?.longitude),
|
|
255
|
+
height: cartographic?.height,
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
ctx?.onLayerEdit?.({
|
|
260
|
+
layerId,
|
|
261
|
+
scale: {
|
|
262
|
+
width: nextScale.x,
|
|
263
|
+
length: nextScale.y,
|
|
264
|
+
height: nextScale.z,
|
|
265
|
+
location: {
|
|
266
|
+
lat: CesiumMath.toDegrees(cartographic?.latitude),
|
|
267
|
+
lng: CesiumMath.toDegrees(cartographic?.longitude),
|
|
268
|
+
height: cartographic?.height,
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
},
|
|
273
|
+
[trs, viewer, allowEnterGround, ctx, onLayerEdit],
|
|
274
|
+
);
|
|
275
|
+
const handlePointMouseUp: PointEventCallback = useCallback(() => {
|
|
276
|
+
if (!viewer) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
currentPointIndex.current = undefined;
|
|
280
|
+
prevMousePosition2dForPoint.current = undefined;
|
|
281
|
+
updateMapController(viewer, true);
|
|
282
|
+
}, [viewer]);
|
|
283
|
+
|
|
284
|
+
// Edge event handlers
|
|
285
|
+
const currentEdgeIndex = useRef<number>();
|
|
286
|
+
const handleEdgeMouseDown: EdgeEventCallback = useCallback(
|
|
287
|
+
(_, { index }) => {
|
|
288
|
+
if (!viewer) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
currentEdgeIndex.current = index;
|
|
292
|
+
updateMapController(viewer, false);
|
|
293
|
+
},
|
|
294
|
+
[viewer],
|
|
295
|
+
);
|
|
296
|
+
const prevMouseXAxisForEdge = useRef<number>();
|
|
297
|
+
const handleEdgeMouseMove: EdgeEventCallback = useCallback(
|
|
298
|
+
(e, { index, layerId }) => {
|
|
299
|
+
if (currentEdgeIndex.current !== index) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const mousePosition = e.startPosition;
|
|
304
|
+
if (prevMouseXAxisForEdge.current === undefined) {
|
|
305
|
+
prevMouseXAxisForEdge.current = mousePosition.x;
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const dx = mousePosition.x - prevMouseXAxisForEdge.current;
|
|
310
|
+
prevMouseXAxisForEdge.current = mousePosition.x;
|
|
311
|
+
const sensitivity = 0.05;
|
|
312
|
+
const hpr = new HeadingPitchRoll(0, 0, 0);
|
|
313
|
+
// -dx because the screen coordinates is opposite to local coordinates space.
|
|
314
|
+
hpr.heading = -dx * sensitivity;
|
|
315
|
+
hpr.pitch = 0;
|
|
316
|
+
hpr.roll = 0;
|
|
317
|
+
|
|
318
|
+
const nextRotation = new Quaternion();
|
|
319
|
+
|
|
320
|
+
Quaternion.multiply(trs.rotation, Quaternion.fromHeadingPitchRoll(hpr), nextRotation);
|
|
321
|
+
|
|
322
|
+
const { heading, pitch, roll } = HeadingPitchRoll.fromQuaternion(nextRotation);
|
|
323
|
+
|
|
324
|
+
onLayerEdit?.({
|
|
325
|
+
layerId,
|
|
326
|
+
rotate: {
|
|
327
|
+
heading,
|
|
328
|
+
pitch,
|
|
329
|
+
roll,
|
|
330
|
+
},
|
|
331
|
+
});
|
|
332
|
+
ctx?.onLayerEdit?.({
|
|
333
|
+
layerId,
|
|
334
|
+
rotate: {
|
|
335
|
+
heading,
|
|
336
|
+
pitch,
|
|
337
|
+
roll,
|
|
338
|
+
},
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
[trs, ctx, onLayerEdit],
|
|
342
|
+
);
|
|
343
|
+
const handleEdgeMouseUp: EdgeEventCallback = useCallback(() => {
|
|
344
|
+
if (!viewer) {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
currentEdgeIndex.current = undefined;
|
|
348
|
+
prevMouseXAxisForEdge.current = undefined;
|
|
349
|
+
updateMapController(viewer, true);
|
|
350
|
+
}, [viewer]);
|
|
351
|
+
|
|
352
|
+
useEffect(() => {
|
|
353
|
+
document.body.style.cursor = cursor || "default";
|
|
354
|
+
}, [cursor]);
|
|
355
|
+
|
|
356
|
+
const availability = useMemo(() => toTimeInterval(feature?.interval), [feature?.interval]);
|
|
357
|
+
const distanceDisplayCondition = useMemo(
|
|
358
|
+
() => toDistanceDisplayCondition(property?.near, property?.far),
|
|
359
|
+
[property?.near, property?.far],
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
return {
|
|
363
|
+
style,
|
|
364
|
+
trs,
|
|
365
|
+
scalePointStyle,
|
|
366
|
+
availability,
|
|
367
|
+
distanceDisplayCondition,
|
|
368
|
+
handlePointMouseDown,
|
|
369
|
+
handlePointMouseMove,
|
|
370
|
+
handlePointMouseUp,
|
|
371
|
+
handleEdgeMouseDown,
|
|
372
|
+
handleEdgeMouseMove,
|
|
373
|
+
handleEdgeMouseUp,
|
|
374
|
+
};
|
|
375
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CallbackProperty,
|
|
3
|
+
Cartesian3,
|
|
4
|
+
Color,
|
|
5
|
+
ColorMaterialProperty,
|
|
6
|
+
Matrix4,
|
|
7
|
+
ScreenSpaceEventHandler,
|
|
8
|
+
ScreenSpaceEventType,
|
|
9
|
+
TranslationRotationScale,
|
|
10
|
+
} from "cesium";
|
|
11
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
12
|
+
import { useCesium } from "resium";
|
|
13
|
+
|
|
14
|
+
import type { EventCallback } from "../../../../../Map";
|
|
15
|
+
import { getTag } from "../../utils";
|
|
16
|
+
import type { EdgeEventCallback, EdgeProperties } from "../Edge";
|
|
17
|
+
|
|
18
|
+
export const useHooks = ({
|
|
19
|
+
id,
|
|
20
|
+
index,
|
|
21
|
+
edge,
|
|
22
|
+
isHovered,
|
|
23
|
+
fillColor,
|
|
24
|
+
trs,
|
|
25
|
+
hoverColor,
|
|
26
|
+
onMouseDown,
|
|
27
|
+
onMouseMove,
|
|
28
|
+
onMouseUp,
|
|
29
|
+
}: {
|
|
30
|
+
id: string;
|
|
31
|
+
index: number;
|
|
32
|
+
edge: EdgeProperties;
|
|
33
|
+
trs: TranslationRotationScale;
|
|
34
|
+
isHovered: boolean;
|
|
35
|
+
fillColor?: Color;
|
|
36
|
+
hoverColor?: Color;
|
|
37
|
+
width?: number;
|
|
38
|
+
onMouseDown?: EdgeEventCallback;
|
|
39
|
+
onMouseMove?: EdgeEventCallback;
|
|
40
|
+
onMouseUp?: EdgeEventCallback;
|
|
41
|
+
onMouseEnter?: EdgeEventCallback;
|
|
42
|
+
onMouseLeave?: EdgeEventCallback;
|
|
43
|
+
}) => {
|
|
44
|
+
const { viewer } = useCesium();
|
|
45
|
+
const [cbp] = useState(
|
|
46
|
+
() =>
|
|
47
|
+
new CallbackProperty(() => {
|
|
48
|
+
const position1 = new Cartesian3();
|
|
49
|
+
const position2 = new Cartesian3();
|
|
50
|
+
const matrix = Matrix4.fromTranslationRotationScale(trs);
|
|
51
|
+
Matrix4.multiplyByPoint(matrix, edge.start, position1);
|
|
52
|
+
Matrix4.multiplyByPoint(matrix, edge.end, position2);
|
|
53
|
+
return [position1, position2];
|
|
54
|
+
}, false),
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const isEdgeHovered = useRef(false);
|
|
58
|
+
const [outlineColor] = useState(
|
|
59
|
+
() =>
|
|
60
|
+
new ColorMaterialProperty(
|
|
61
|
+
new CallbackProperty(
|
|
62
|
+
() => (isEdgeHovered.current ? hoverColor ?? fillColor : fillColor),
|
|
63
|
+
false,
|
|
64
|
+
),
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
isEdgeHovered.current = isHovered;
|
|
69
|
+
}, [isHovered]);
|
|
70
|
+
|
|
71
|
+
const handleMouseDown: EventCallback = useCallback(
|
|
72
|
+
e => {
|
|
73
|
+
if (!viewer) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const currentLayerId = getTag(viewer.scene.pick(e.position)?.id)?.layerId;
|
|
77
|
+
if (currentLayerId !== id) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
onMouseDown?.(e, { layerId: id, index });
|
|
81
|
+
},
|
|
82
|
+
[onMouseDown, id, index, viewer],
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
const handleMouseMove: EventCallback = useCallback(
|
|
86
|
+
e => {
|
|
87
|
+
onMouseMove?.(e, { layerId: id, index });
|
|
88
|
+
},
|
|
89
|
+
[onMouseMove, index, id],
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const handleMouseUp: EventCallback = useCallback(
|
|
93
|
+
e => {
|
|
94
|
+
onMouseUp?.(e, { layerId: id, index });
|
|
95
|
+
},
|
|
96
|
+
[onMouseUp, index, id],
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
const eventHandler = useMemo(() => new ScreenSpaceEventHandler(viewer?.scene.canvas), [viewer]);
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
eventHandler.setInputAction(handleMouseDown, ScreenSpaceEventType.LEFT_DOWN);
|
|
102
|
+
eventHandler.setInputAction(handleMouseMove, ScreenSpaceEventType.MOUSE_MOVE);
|
|
103
|
+
eventHandler.setInputAction(handleMouseUp, ScreenSpaceEventType.LEFT_UP);
|
|
104
|
+
}, [eventHandler, handleMouseDown, handleMouseMove, handleMouseUp]);
|
|
105
|
+
|
|
106
|
+
useEffect(() => () => eventHandler.destroy(), [eventHandler]);
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
cbp,
|
|
110
|
+
outlineColor,
|
|
111
|
+
};
|
|
112
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CallbackProperty,
|
|
3
|
+
Cartesian3,
|
|
4
|
+
Color,
|
|
5
|
+
JulianDate,
|
|
6
|
+
Matrix4,
|
|
7
|
+
PolylineDashMaterialProperty,
|
|
8
|
+
PositionProperty,
|
|
9
|
+
Quaternion,
|
|
10
|
+
ScreenSpaceEventHandler,
|
|
11
|
+
ScreenSpaceEventType,
|
|
12
|
+
TranslationRotationScale,
|
|
13
|
+
} from "cesium";
|
|
14
|
+
import { useCallback, useMemo, useState, useEffect, useRef } from "react";
|
|
15
|
+
import { useCesium } from "resium";
|
|
16
|
+
|
|
17
|
+
import type { EventCallback } from "../../../../../Map";
|
|
18
|
+
import { getTag } from "../../utils";
|
|
19
|
+
import type { PointEventCallback, ScalePointProperties } from "../ScalePoints";
|
|
20
|
+
|
|
21
|
+
export const useHooks = ({
|
|
22
|
+
id,
|
|
23
|
+
index,
|
|
24
|
+
scalePoint,
|
|
25
|
+
isHovered,
|
|
26
|
+
pointOutlineColor,
|
|
27
|
+
hoverPointOutlineColor,
|
|
28
|
+
axisLineColor,
|
|
29
|
+
trs,
|
|
30
|
+
dimensions,
|
|
31
|
+
onPointMouseDown,
|
|
32
|
+
onPointMouseMove,
|
|
33
|
+
onPointMouseUp,
|
|
34
|
+
}: {
|
|
35
|
+
id: string;
|
|
36
|
+
index: number;
|
|
37
|
+
scalePoint: ScalePointProperties;
|
|
38
|
+
trs: TranslationRotationScale;
|
|
39
|
+
isHovered: boolean;
|
|
40
|
+
pointOutlineColor?: Color;
|
|
41
|
+
hoverPointOutlineColor?: Color;
|
|
42
|
+
axisLineColor?: Color;
|
|
43
|
+
dimensions?: { width: number; height: number; length: number };
|
|
44
|
+
onPointMouseDown?: PointEventCallback;
|
|
45
|
+
onPointMouseMove?: PointEventCallback;
|
|
46
|
+
onPointMouseUp?: PointEventCallback;
|
|
47
|
+
}) => {
|
|
48
|
+
const layerId = `${id}-${index}`;
|
|
49
|
+
const oppositeLayerId = `${id}-opposite-${index}`;
|
|
50
|
+
|
|
51
|
+
const { viewer } = useCesium();
|
|
52
|
+
|
|
53
|
+
const [entitiesPosition] = useState(() => {
|
|
54
|
+
const point = new Cartesian3();
|
|
55
|
+
const oppositePoint = new Cartesian3();
|
|
56
|
+
|
|
57
|
+
const pointProperty = new CallbackProperty(() => {
|
|
58
|
+
const matrix = Matrix4.fromTranslationRotationScale(trs);
|
|
59
|
+
Matrix4.multiplyByPoint(matrix, scalePoint.point, point);
|
|
60
|
+
return point;
|
|
61
|
+
}, false) as unknown as PositionProperty;
|
|
62
|
+
const oppositePointProperty = new CallbackProperty(() => {
|
|
63
|
+
const matrix = Matrix4.fromTranslationRotationScale(trs);
|
|
64
|
+
Matrix4.multiplyByPoint(matrix, scalePoint.oppositePoint, oppositePoint);
|
|
65
|
+
return oppositePoint;
|
|
66
|
+
}, false) as unknown as PositionProperty;
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
point: pointProperty,
|
|
70
|
+
oppositePoint: oppositePointProperty,
|
|
71
|
+
axisLine: new CallbackProperty(
|
|
72
|
+
() => [
|
|
73
|
+
pointProperty.getValue(JulianDate.now()),
|
|
74
|
+
oppositePointProperty.getValue(JulianDate.now()),
|
|
75
|
+
],
|
|
76
|
+
false,
|
|
77
|
+
),
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const isScalePointHovered = useRef(false);
|
|
82
|
+
const [pointOutlineColorCb] = useState(
|
|
83
|
+
() =>
|
|
84
|
+
new CallbackProperty(
|
|
85
|
+
() => (isScalePointHovered.current ? hoverPointOutlineColor : pointOutlineColor),
|
|
86
|
+
false,
|
|
87
|
+
),
|
|
88
|
+
);
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
isScalePointHovered.current = isHovered;
|
|
91
|
+
}, [isHovered]);
|
|
92
|
+
|
|
93
|
+
const [cesiumDimensions] = useState(
|
|
94
|
+
() => new Cartesian3(dimensions?.width, dimensions?.length, dimensions?.height),
|
|
95
|
+
);
|
|
96
|
+
const [cesiumDimensionsCallbackProperty] = useState(
|
|
97
|
+
() => new CallbackProperty(() => cesiumDimensions, false),
|
|
98
|
+
);
|
|
99
|
+
const [orientation] = useState(() => new CallbackProperty(() => Quaternion.IDENTITY, false));
|
|
100
|
+
const axisColorProperty = useMemo(
|
|
101
|
+
() => new PolylineDashMaterialProperty({ color: axisLineColor, dashLength: 8 }),
|
|
102
|
+
[axisLineColor],
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const isOppositePointClicked = useRef(false);
|
|
106
|
+
const handlePointMouseDown: EventCallback = useCallback(
|
|
107
|
+
e => {
|
|
108
|
+
if (!viewer) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const currentLayerId = getTag(viewer.scene.pick(e.position)?.id)?.layerId;
|
|
112
|
+
isOppositePointClicked.current = currentLayerId === oppositeLayerId;
|
|
113
|
+
if (currentLayerId === layerId || currentLayerId === oppositeLayerId) {
|
|
114
|
+
onPointMouseDown?.(e, {
|
|
115
|
+
layerId: isOppositePointClicked.current ? oppositeLayerId : layerId,
|
|
116
|
+
index,
|
|
117
|
+
opposite: isOppositePointClicked.current,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
[onPointMouseDown, index, layerId, oppositeLayerId, viewer],
|
|
122
|
+
);
|
|
123
|
+
const handlePointMouseMove: EventCallback = useCallback(
|
|
124
|
+
e => {
|
|
125
|
+
onPointMouseMove?.(e, {
|
|
126
|
+
layerId: isOppositePointClicked.current ? oppositeLayerId : layerId,
|
|
127
|
+
index,
|
|
128
|
+
opposite: isOppositePointClicked.current,
|
|
129
|
+
position: isOppositePointClicked.current
|
|
130
|
+
? entitiesPosition.oppositePoint.getValue(JulianDate.now())
|
|
131
|
+
: entitiesPosition.point.getValue(JulianDate.now()),
|
|
132
|
+
oppositePosition: isOppositePointClicked.current
|
|
133
|
+
? entitiesPosition.point.getValue(JulianDate.now())
|
|
134
|
+
: entitiesPosition.oppositePoint.getValue(JulianDate.now()),
|
|
135
|
+
pointLocal: isOppositePointClicked ? scalePoint.oppositePoint : scalePoint.point,
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
[onPointMouseMove, index, entitiesPosition, scalePoint, layerId, oppositeLayerId],
|
|
139
|
+
);
|
|
140
|
+
const handlePointMouseUp: EventCallback = useCallback(
|
|
141
|
+
e => {
|
|
142
|
+
onPointMouseUp?.(e, {
|
|
143
|
+
layerId: isOppositePointClicked.current ? oppositeLayerId : layerId,
|
|
144
|
+
index,
|
|
145
|
+
opposite: isOppositePointClicked.current,
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
[onPointMouseUp, index, layerId, oppositeLayerId],
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
Cartesian3.clone(
|
|
153
|
+
new Cartesian3(dimensions?.width, dimensions?.length, dimensions?.height),
|
|
154
|
+
cesiumDimensions,
|
|
155
|
+
);
|
|
156
|
+
}, [dimensions, cesiumDimensions]);
|
|
157
|
+
|
|
158
|
+
const eventHandler = useMemo(() => new ScreenSpaceEventHandler(viewer?.scene.canvas), [viewer]);
|
|
159
|
+
useEffect(() => {
|
|
160
|
+
eventHandler.setInputAction(handlePointMouseDown, ScreenSpaceEventType.LEFT_DOWN);
|
|
161
|
+
eventHandler.setInputAction(handlePointMouseMove, ScreenSpaceEventType.MOUSE_MOVE);
|
|
162
|
+
eventHandler.setInputAction(handlePointMouseUp, ScreenSpaceEventType.LEFT_UP);
|
|
163
|
+
}, [eventHandler, handlePointMouseDown, handlePointMouseMove, handlePointMouseUp]);
|
|
164
|
+
|
|
165
|
+
useEffect(() => () => eventHandler.destroy(), [eventHandler]);
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
entitiesPosition,
|
|
169
|
+
pointOutlineColorCb,
|
|
170
|
+
cesiumDimensionsCallbackProperty,
|
|
171
|
+
orientation,
|
|
172
|
+
axisColorProperty,
|
|
173
|
+
};
|
|
174
|
+
};
|