@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,101 @@
|
|
|
1
|
+
// Reference: Sketch feature is basically referenced from https://github.com/takram-design-engineering/plateau-view/blob/main/libs/sketch/src/SketchTool.tsx
|
|
2
|
+
|
|
3
|
+
import { type LineString, type MultiPolygon, type Polygon } from "geojson";
|
|
4
|
+
import { ComponentType, ForwardRefRenderFunction, RefObject, forwardRef } from "react";
|
|
5
|
+
import { RequireExactlyOne } from "type-fest";
|
|
6
|
+
|
|
7
|
+
import { ComputedLayer, SelectedFeatureInfo } from "../../mantle";
|
|
8
|
+
import { Position3d } from "../../types";
|
|
9
|
+
import { InteractionModeType } from "../../Visualizer/interactionMode";
|
|
10
|
+
import { EngineRef, Feature, LayerSelectionReason, LayersRef, SketchRef } from "../types";
|
|
11
|
+
|
|
12
|
+
import useHooks from "./hooks";
|
|
13
|
+
import { SketchEventProps, SketchFeature, SketchType } from "./types";
|
|
14
|
+
|
|
15
|
+
export * from "./types";
|
|
16
|
+
|
|
17
|
+
export type SketchComponentType = ComponentType<SketchComponentProps>;
|
|
18
|
+
|
|
19
|
+
type GeometryOptions = {
|
|
20
|
+
type: SketchType;
|
|
21
|
+
controlPoints: readonly Position3d[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type SketchComponentProps = RequireExactlyOne<
|
|
25
|
+
{
|
|
26
|
+
geometry?: LineString | Polygon | MultiPolygon | null;
|
|
27
|
+
geometryOptions?: GeometryOptions | null;
|
|
28
|
+
extrudedHeight?: number;
|
|
29
|
+
disableShadow?: boolean;
|
|
30
|
+
enableRelativeHeight?: boolean;
|
|
31
|
+
color?: string;
|
|
32
|
+
},
|
|
33
|
+
"geometry" | "geometryOptions"
|
|
34
|
+
>;
|
|
35
|
+
|
|
36
|
+
export type OnLayerSelectType = (
|
|
37
|
+
layerId: string | undefined,
|
|
38
|
+
featureId: string | undefined,
|
|
39
|
+
layer: (() => Promise<ComputedLayer | undefined>) | undefined,
|
|
40
|
+
reason: LayerSelectionReason | undefined,
|
|
41
|
+
info: SelectedFeatureInfo | undefined,
|
|
42
|
+
) => void;
|
|
43
|
+
|
|
44
|
+
export type SketchProps = {
|
|
45
|
+
layersRef: RefObject<LayersRef>;
|
|
46
|
+
engineRef: RefObject<EngineRef>;
|
|
47
|
+
SketchComponent?: SketchComponentType;
|
|
48
|
+
selectedFeature?: Feature;
|
|
49
|
+
interactionMode?: InteractionModeType;
|
|
50
|
+
overrideInteractionMode?: (mode: InteractionModeType) => void;
|
|
51
|
+
onSketchTypeChange?: (type: SketchType | undefined, from?: "editor" | "plugin") => void;
|
|
52
|
+
onSketchFeatureCreate?: (feature: SketchFeature | null) => void;
|
|
53
|
+
onSketchPluginFeatureCreate?: (props: SketchEventProps) => void;
|
|
54
|
+
onLayerSelect?: OnLayerSelectType;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const Sketch: ForwardRefRenderFunction<SketchRef, SketchProps> = (
|
|
58
|
+
{
|
|
59
|
+
layersRef,
|
|
60
|
+
engineRef,
|
|
61
|
+
interactionMode = "default",
|
|
62
|
+
selectedFeature,
|
|
63
|
+
SketchComponent,
|
|
64
|
+
overrideInteractionMode,
|
|
65
|
+
onSketchTypeChange,
|
|
66
|
+
onSketchFeatureCreate,
|
|
67
|
+
onSketchPluginFeatureCreate,
|
|
68
|
+
onLayerSelect,
|
|
69
|
+
},
|
|
70
|
+
ref,
|
|
71
|
+
) => {
|
|
72
|
+
const { state, extrudedHeight, geometryOptions, color, disableShadow, enableRelativeHeight } =
|
|
73
|
+
useHooks({
|
|
74
|
+
ref,
|
|
75
|
+
layersRef,
|
|
76
|
+
engineRef,
|
|
77
|
+
interactionMode,
|
|
78
|
+
selectedFeature,
|
|
79
|
+
overrideInteractionMode,
|
|
80
|
+
onSketchTypeChange,
|
|
81
|
+
onSketchFeatureCreate,
|
|
82
|
+
onSketchPluginFeatureCreate,
|
|
83
|
+
onLayerSelect,
|
|
84
|
+
});
|
|
85
|
+
if (state.matches("idle")) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
return SketchComponent ? (
|
|
89
|
+
<SketchComponent
|
|
90
|
+
geometryOptions={geometryOptions}
|
|
91
|
+
color={color}
|
|
92
|
+
disableShadow={disableShadow}
|
|
93
|
+
enableRelativeHeight={enableRelativeHeight}
|
|
94
|
+
{...(state.matches("extruding") && {
|
|
95
|
+
extrudedHeight,
|
|
96
|
+
})}
|
|
97
|
+
/>
|
|
98
|
+
) : null;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export default forwardRef(Sketch);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SketchAppearance } from "./types";
|
|
2
|
+
|
|
3
|
+
export const PRESET_APPEARANCE: SketchAppearance = {
|
|
4
|
+
marker: {
|
|
5
|
+
height: 0,
|
|
6
|
+
heightReference: "clamp",
|
|
7
|
+
hideIndicator: true,
|
|
8
|
+
selectedFeatureColor: "#00bebe",
|
|
9
|
+
},
|
|
10
|
+
polygon: {
|
|
11
|
+
classificationType: "terrain",
|
|
12
|
+
extrudedHeight: {
|
|
13
|
+
expression: "${extrudedHeight}",
|
|
14
|
+
},
|
|
15
|
+
fillColor: "#FFFFFF",
|
|
16
|
+
heightReference: "clamp",
|
|
17
|
+
hideIndicator: true,
|
|
18
|
+
selectedFeatureColor: "#00bebe",
|
|
19
|
+
shadows: "enabled",
|
|
20
|
+
},
|
|
21
|
+
polyline: {
|
|
22
|
+
clampToGround: true,
|
|
23
|
+
hideIndicator: true,
|
|
24
|
+
selectedFeatureColor: "#00bebe",
|
|
25
|
+
shadows: "enabled",
|
|
26
|
+
strokeColor: "#FFFFFF",
|
|
27
|
+
strokeWidth: 2,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
// TODO: Refactor: move cesium related code to engine.
|
|
2
|
+
// import { Cartesian2, Cartesian3 } from "cesium";
|
|
3
|
+
import invariant from "tiny-invariant";
|
|
4
|
+
import { createMachine, type StateFrom } from "xstate";
|
|
5
|
+
|
|
6
|
+
import { type SketchType } from "./types";
|
|
7
|
+
|
|
8
|
+
export type Position2d = [number, number];
|
|
9
|
+
export type Position3d = [number, number, number];
|
|
10
|
+
|
|
11
|
+
export type EventObject =
|
|
12
|
+
| ((
|
|
13
|
+
| { type: "MARKER" }
|
|
14
|
+
| { type: "POLYLINE" }
|
|
15
|
+
| { type: "CIRCLE" }
|
|
16
|
+
| { type: "RECTANGLE" }
|
|
17
|
+
| { type: "POLYGON" }
|
|
18
|
+
| { type: "EXTRUDED_CIRCLE" }
|
|
19
|
+
| { type: "EXTRUDED_RECTANGLE" }
|
|
20
|
+
| { type: "EXTRUDED_POLYGON" }
|
|
21
|
+
| { type: "NEXT" }
|
|
22
|
+
| { type: "EXTRUDE" }
|
|
23
|
+
) & {
|
|
24
|
+
pointerPosition: Position2d;
|
|
25
|
+
controlPoint: Position3d;
|
|
26
|
+
})
|
|
27
|
+
| { type: "CREATE" }
|
|
28
|
+
| { type: "CANCEL" }
|
|
29
|
+
| { type: "ABORT" };
|
|
30
|
+
|
|
31
|
+
interface Context {
|
|
32
|
+
lastPointerPosition?: Position2d;
|
|
33
|
+
lastControlPoint?: Position3d;
|
|
34
|
+
type?: SketchType;
|
|
35
|
+
controlPoints?: Position3d[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function createSketchMachine() {
|
|
39
|
+
return createMachine(
|
|
40
|
+
{
|
|
41
|
+
id: "sketch",
|
|
42
|
+
initial: "idle",
|
|
43
|
+
context: {} as Context,
|
|
44
|
+
states: {
|
|
45
|
+
idle: {
|
|
46
|
+
on: {
|
|
47
|
+
MARKER: {
|
|
48
|
+
target: "drawing.marker",
|
|
49
|
+
actions: ["createMarker"],
|
|
50
|
+
},
|
|
51
|
+
POLYLINE: {
|
|
52
|
+
target: "drawing.polyline",
|
|
53
|
+
actions: ["createPolyline"],
|
|
54
|
+
},
|
|
55
|
+
CIRCLE: {
|
|
56
|
+
target: "drawing.circle",
|
|
57
|
+
actions: ["createCircle"],
|
|
58
|
+
},
|
|
59
|
+
RECTANGLE: {
|
|
60
|
+
target: "drawing.rectangle",
|
|
61
|
+
actions: ["createRectangle"],
|
|
62
|
+
},
|
|
63
|
+
POLYGON: {
|
|
64
|
+
target: "drawing.polygon",
|
|
65
|
+
actions: ["createPolygon"],
|
|
66
|
+
},
|
|
67
|
+
EXTRUDED_CIRCLE: {
|
|
68
|
+
target: "drawing.circle",
|
|
69
|
+
actions: ["createExtrudedCircle"],
|
|
70
|
+
},
|
|
71
|
+
EXTRUDED_RECTANGLE: {
|
|
72
|
+
target: "drawing.extrudedRectangle",
|
|
73
|
+
actions: ["createExtrudedRectangle"],
|
|
74
|
+
},
|
|
75
|
+
EXTRUDED_POLYGON: {
|
|
76
|
+
target: "drawing.extrudedPolygon",
|
|
77
|
+
actions: ["createExtrudedPolygon"],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
drawing: {
|
|
82
|
+
states: {
|
|
83
|
+
marker: {
|
|
84
|
+
initial: "vertex",
|
|
85
|
+
states: {
|
|
86
|
+
vertex: {},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
polyline: {
|
|
90
|
+
initial: "vertex",
|
|
91
|
+
states: {
|
|
92
|
+
vertex: {
|
|
93
|
+
on: {
|
|
94
|
+
NEXT: {
|
|
95
|
+
target: "vertex",
|
|
96
|
+
internal: true,
|
|
97
|
+
actions: ["pushPosition"],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
circle: {
|
|
104
|
+
initial: "vertex",
|
|
105
|
+
states: {
|
|
106
|
+
vertex: {
|
|
107
|
+
on: {
|
|
108
|
+
NEXT: {
|
|
109
|
+
target: "#sketch.extruding",
|
|
110
|
+
actions: ["pushPosition"],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
rectangle: {
|
|
117
|
+
initial: "vertex",
|
|
118
|
+
states: {
|
|
119
|
+
vertex: {
|
|
120
|
+
on: {
|
|
121
|
+
NEXT: [
|
|
122
|
+
{
|
|
123
|
+
target: "vertex",
|
|
124
|
+
internal: true,
|
|
125
|
+
actions: ["pushPosition"],
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
extrudedRectangle: {
|
|
133
|
+
initial: "vertex",
|
|
134
|
+
states: {
|
|
135
|
+
vertex: {
|
|
136
|
+
on: {
|
|
137
|
+
NEXT: [
|
|
138
|
+
{
|
|
139
|
+
target: "#sketch.extruding",
|
|
140
|
+
cond: "willRectangleComplete",
|
|
141
|
+
actions: ["pushPosition"],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
target: "vertex",
|
|
145
|
+
internal: true,
|
|
146
|
+
actions: ["pushPosition"],
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
polygon: {
|
|
154
|
+
initial: "vertex",
|
|
155
|
+
states: {
|
|
156
|
+
vertex: {
|
|
157
|
+
on: {
|
|
158
|
+
NEXT: {
|
|
159
|
+
target: "vertex",
|
|
160
|
+
internal: true,
|
|
161
|
+
actions: ["pushPosition"],
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
extrudedPolygon: {
|
|
168
|
+
initial: "vertex",
|
|
169
|
+
states: {
|
|
170
|
+
vertex: {
|
|
171
|
+
on: {
|
|
172
|
+
NEXT: {
|
|
173
|
+
target: "vertex",
|
|
174
|
+
internal: true,
|
|
175
|
+
actions: ["pushPosition"],
|
|
176
|
+
},
|
|
177
|
+
EXTRUDE: {
|
|
178
|
+
target: "#sketch.extruding",
|
|
179
|
+
actions: ["pushPosition"],
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
history: {
|
|
186
|
+
type: "history",
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
on: {
|
|
190
|
+
CANCEL: [
|
|
191
|
+
{
|
|
192
|
+
target: ".history",
|
|
193
|
+
cond: "canPopPosition",
|
|
194
|
+
actions: ["popPosition"],
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
target: "idle",
|
|
198
|
+
actions: ["clearDrawing"],
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
ABORT: {
|
|
202
|
+
target: "idle",
|
|
203
|
+
actions: ["clearDrawing"],
|
|
204
|
+
},
|
|
205
|
+
CREATE: {
|
|
206
|
+
target: "idle",
|
|
207
|
+
actions: ["clearDrawing"],
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
extruding: {
|
|
212
|
+
on: {
|
|
213
|
+
CREATE: {
|
|
214
|
+
target: "idle",
|
|
215
|
+
actions: ["clearDrawing"],
|
|
216
|
+
},
|
|
217
|
+
CANCEL: {
|
|
218
|
+
target: "drawing.history",
|
|
219
|
+
actions: ["popPosition"],
|
|
220
|
+
},
|
|
221
|
+
ABORT: {
|
|
222
|
+
target: "idle",
|
|
223
|
+
actions: ["clearDrawing"],
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
schema: {
|
|
229
|
+
events: {} as unknown as EventObject,
|
|
230
|
+
},
|
|
231
|
+
predictableActionArguments: true,
|
|
232
|
+
preserveActionOrder: true,
|
|
233
|
+
tsTypes: {} as import("./sketchMachine.typegen").Typegen0,
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
guards: {
|
|
237
|
+
canPopPosition: context => {
|
|
238
|
+
return context.controlPoints != null && context.controlPoints.length > 1;
|
|
239
|
+
},
|
|
240
|
+
willRectangleComplete: context => {
|
|
241
|
+
return context.controlPoints != null && context.controlPoints.length === 2;
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
actions: {
|
|
245
|
+
createMarker: (context, event) => {
|
|
246
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
247
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
248
|
+
context.lastControlPoint = controlPoint;
|
|
249
|
+
context.type = "marker";
|
|
250
|
+
context.controlPoints = [controlPoint];
|
|
251
|
+
},
|
|
252
|
+
createPolyline: (context, event) => {
|
|
253
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
254
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
255
|
+
context.lastControlPoint = controlPoint;
|
|
256
|
+
context.type = "polyline";
|
|
257
|
+
context.controlPoints = [controlPoint];
|
|
258
|
+
},
|
|
259
|
+
createCircle: (context, event) => {
|
|
260
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
261
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
262
|
+
context.lastControlPoint = controlPoint;
|
|
263
|
+
context.type = "circle";
|
|
264
|
+
context.controlPoints = [controlPoint];
|
|
265
|
+
},
|
|
266
|
+
createRectangle: (context, event) => {
|
|
267
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
268
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
269
|
+
context.lastControlPoint = controlPoint;
|
|
270
|
+
context.type = "rectangle";
|
|
271
|
+
context.controlPoints = [controlPoint];
|
|
272
|
+
},
|
|
273
|
+
createPolygon: (context, event) => {
|
|
274
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
275
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
276
|
+
context.lastControlPoint = controlPoint;
|
|
277
|
+
context.type = "polygon";
|
|
278
|
+
context.controlPoints = [controlPoint];
|
|
279
|
+
},
|
|
280
|
+
createExtrudedCircle: (context, event) => {
|
|
281
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
282
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
283
|
+
context.lastControlPoint = controlPoint;
|
|
284
|
+
context.type = "extrudedCircle";
|
|
285
|
+
context.controlPoints = [controlPoint];
|
|
286
|
+
},
|
|
287
|
+
createExtrudedRectangle: (context, event) => {
|
|
288
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
289
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
290
|
+
context.lastControlPoint = controlPoint;
|
|
291
|
+
context.type = "extrudedRectangle";
|
|
292
|
+
context.controlPoints = [controlPoint];
|
|
293
|
+
},
|
|
294
|
+
createExtrudedPolygon: (context, event) => {
|
|
295
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
296
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
297
|
+
context.lastControlPoint = controlPoint;
|
|
298
|
+
context.type = "extrudedPolygon";
|
|
299
|
+
context.controlPoints = [controlPoint];
|
|
300
|
+
},
|
|
301
|
+
pushPosition: (context, event) => {
|
|
302
|
+
context.lastPointerPosition = [...event.pointerPosition];
|
|
303
|
+
const controlPoint = [...event.controlPoint] as Position3d;
|
|
304
|
+
context.lastControlPoint = controlPoint;
|
|
305
|
+
context.controlPoints?.push(controlPoint);
|
|
306
|
+
},
|
|
307
|
+
popPosition: context => {
|
|
308
|
+
invariant(context.controlPoints != null);
|
|
309
|
+
invariant(context.controlPoints.length > 1);
|
|
310
|
+
context.controlPoints.pop();
|
|
311
|
+
},
|
|
312
|
+
clearDrawing: context => {
|
|
313
|
+
delete context.lastControlPoint;
|
|
314
|
+
delete context.type;
|
|
315
|
+
delete context.controlPoints;
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export type SketchMachine = ReturnType<typeof createSketchMachine>;
|
|
323
|
+
export type SketchMachineState = StateFrom<SketchMachine>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// This file was automatically generated. Edits will be overwritten
|
|
2
|
+
|
|
3
|
+
export interface Typegen0 {
|
|
4
|
+
"@@xstate/typegen": true;
|
|
5
|
+
internalEvents: {
|
|
6
|
+
"xstate.init": { type: "xstate.init" };
|
|
7
|
+
};
|
|
8
|
+
invokeSrcNameMap: {};
|
|
9
|
+
missingImplementations: {
|
|
10
|
+
actions: never;
|
|
11
|
+
delays: never;
|
|
12
|
+
guards: never;
|
|
13
|
+
services: never;
|
|
14
|
+
};
|
|
15
|
+
eventsCausingActions: {
|
|
16
|
+
clearDrawing: "ABORT" | "CANCEL" | "CREATE";
|
|
17
|
+
createCircle: "CIRCLE";
|
|
18
|
+
createExtrudedCircle: "EXTRUDED_CIRCLE";
|
|
19
|
+
createExtrudedPolygon: "EXTRUDED_POLYGON";
|
|
20
|
+
createExtrudedRectangle: "EXTRUDED_RECTANGLE";
|
|
21
|
+
createMarker: "MARKER";
|
|
22
|
+
createPolygon: "POLYGON";
|
|
23
|
+
createPolyline: "POLYLINE";
|
|
24
|
+
createRectangle: "RECTANGLE";
|
|
25
|
+
popPosition: "CANCEL";
|
|
26
|
+
pushPosition: "EXTRUDE" | "NEXT";
|
|
27
|
+
};
|
|
28
|
+
eventsCausingDelays: {};
|
|
29
|
+
eventsCausingGuards: {
|
|
30
|
+
canPopPosition: "CANCEL";
|
|
31
|
+
willRectangleComplete: "NEXT";
|
|
32
|
+
};
|
|
33
|
+
eventsCausingServices: {};
|
|
34
|
+
matchesStates:
|
|
35
|
+
| "drawing"
|
|
36
|
+
| "drawing.circle"
|
|
37
|
+
| "drawing.circle.vertex"
|
|
38
|
+
| "drawing.extrudedPolygon"
|
|
39
|
+
| "drawing.extrudedPolygon.vertex"
|
|
40
|
+
| "drawing.extrudedRectangle"
|
|
41
|
+
| "drawing.extrudedRectangle.vertex"
|
|
42
|
+
| "drawing.marker"
|
|
43
|
+
| "drawing.marker.vertex"
|
|
44
|
+
| "drawing.polygon"
|
|
45
|
+
| "drawing.polygon.vertex"
|
|
46
|
+
| "drawing.polyline"
|
|
47
|
+
| "drawing.polyline.vertex"
|
|
48
|
+
| "drawing.rectangle"
|
|
49
|
+
| "drawing.rectangle.vertex"
|
|
50
|
+
| "extruding"
|
|
51
|
+
| "idle"
|
|
52
|
+
| {
|
|
53
|
+
drawing?:
|
|
54
|
+
| "circle"
|
|
55
|
+
| "extrudedPolygon"
|
|
56
|
+
| "extrudedRectangle"
|
|
57
|
+
| "marker"
|
|
58
|
+
| "polygon"
|
|
59
|
+
| "polyline"
|
|
60
|
+
| "rectangle"
|
|
61
|
+
| {
|
|
62
|
+
circle?: "vertex";
|
|
63
|
+
extrudedPolygon?: "vertex";
|
|
64
|
+
extrudedRectangle?: "vertex";
|
|
65
|
+
marker?: "vertex";
|
|
66
|
+
polygon?: "vertex";
|
|
67
|
+
polyline?: "vertex";
|
|
68
|
+
rectangle?: "vertex";
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
tags: never;
|
|
72
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Feature as GeojsonFeature, MultiPolygon, Polygon, Point, LineString } from "geojson";
|
|
2
|
+
|
|
3
|
+
import { LayerAppearanceTypes } from "../../mantle";
|
|
4
|
+
import { Position3d } from "../../types";
|
|
5
|
+
|
|
6
|
+
export type SketchType =
|
|
7
|
+
| "marker"
|
|
8
|
+
| "polyline"
|
|
9
|
+
| "circle"
|
|
10
|
+
| "rectangle"
|
|
11
|
+
| "polygon"
|
|
12
|
+
| "extrudedCircle"
|
|
13
|
+
| "extrudedRectangle"
|
|
14
|
+
| "extrudedPolygon";
|
|
15
|
+
|
|
16
|
+
export type GeometryOptionsXYZ = {
|
|
17
|
+
type: SketchType;
|
|
18
|
+
controlPoints: Position3d[];
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type SketchFeature = GeojsonFeature<
|
|
22
|
+
Polygon | MultiPolygon | Point | LineString,
|
|
23
|
+
{
|
|
24
|
+
id: string;
|
|
25
|
+
type: SketchType;
|
|
26
|
+
positions: readonly Position3d[];
|
|
27
|
+
extrudedHeight: number;
|
|
28
|
+
}
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
export type SketchEventProps = {
|
|
32
|
+
layerId?: string;
|
|
33
|
+
featureId?: string;
|
|
34
|
+
feature?: SketchFeature;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type SketchEventCallback = (event: SketchEventProps) => void;
|
|
38
|
+
|
|
39
|
+
export type SketchAppearance = Partial<LayerAppearanceTypes>;
|
|
40
|
+
|
|
41
|
+
export function isSketchType(value: unknown): value is SketchType {
|
|
42
|
+
return (
|
|
43
|
+
value === "marker" ||
|
|
44
|
+
value === "polyline" ||
|
|
45
|
+
value === "circle" ||
|
|
46
|
+
value === "rectangle" ||
|
|
47
|
+
value === "polygon" ||
|
|
48
|
+
value === "extrudedCircle" ||
|
|
49
|
+
value === "extrudedRectangle" ||
|
|
50
|
+
value === "extrudedPolygon"
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
export function useWindowEvent<K extends keyof WindowEventMap>(
|
|
4
|
+
eventName: K,
|
|
5
|
+
callback: (event: WindowEventMap[K]) => void,
|
|
6
|
+
options?: EventListenerOptions,
|
|
7
|
+
): void {
|
|
8
|
+
const callbackRef = useRef(callback);
|
|
9
|
+
callbackRef.current = callback;
|
|
10
|
+
const optionsRef = useRef(options);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (typeof window === "undefined") {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const listener = (event: WindowEventMap[K]): void => {
|
|
16
|
+
callbackRef.current?.(event);
|
|
17
|
+
};
|
|
18
|
+
const options = optionsRef.current;
|
|
19
|
+
window.addEventListener(eventName, listener, options);
|
|
20
|
+
return () => {
|
|
21
|
+
window.removeEventListener(eventName, listener, options);
|
|
22
|
+
};
|
|
23
|
+
}, [eventName]);
|
|
24
|
+
}
|