@reearth/core 0.0.7-alpha.0 → 0.0.7-alpha.10
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/dist/core.js +34320 -34354
- package/dist/core.umd.cjs +3868 -3826
- package/dist/{index-DqatWUTw.js → index-DqGWVPtz.js} +0 -1
- package/dist/index.d.ts +217 -212
- package/package.json +8 -8
- package/src/Map/ClusteredLayers/index.tsx +2 -2
- package/src/Map/Layer/index.tsx +3 -3
- package/src/Map/Layers/hooks.ts +10 -0
- package/src/Map/Layers/index.tsx +2 -2
- package/src/Map/Sketch/hooks.ts +52 -72
- package/src/Map/Sketch/index.tsx +2 -24
- package/src/Map/Sketch/preset.ts +2 -0
- package/src/Map/Sketch/types.ts +31 -0
- package/src/Map/hooks.ts +0 -4
- package/src/Map/index.tsx +8 -5
- package/src/Map/ref.ts +4 -7
- package/src/Map/types/index.ts +34 -216
- package/src/Map/types/viewerProperty.ts +215 -0
- package/src/Map/useTimelineManager.ts +5 -3
- package/src/Map/utils.ts +1 -43
- package/src/Visualizer/coreContext.tsx +1 -8
- package/src/Visualizer/hooks.ts +20 -77
- package/src/Visualizer/index.stories.tsx +4 -48
- package/src/Visualizer/index.tsx +8 -6
- package/src/Visualizer/useCoreAPI.ts +30 -0
- package/src/engines/Cesium/Feature/Ellipse/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Frustum/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Model/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Model/index.tsx +10 -9
- package/src/engines/Cesium/Feature/Polygon/index.stories.tsx +8 -6
- package/src/engines/Cesium/Feature/Raster/index.stories.tsx +2 -2
- package/src/engines/Cesium/Feature/Resource/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Tileset/hooks.ts +12 -11
- package/src/engines/Cesium/Feature/Tileset/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Tileset/index.tsx +4 -4
- package/src/engines/Cesium/Feature/Tileset/useClippingBox.ts +10 -1
- package/src/engines/Cesium/Feature/index.tsx +5 -4
- package/src/engines/Cesium/Feature/utils.tsx +3 -2
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/IBL.glsl +6 -10
- package/src/engines/Cesium/core/Globe.tsx +36 -68
- package/src/engines/Cesium/core/Imagery.test.ts +9 -9
- package/src/engines/Cesium/core/Imagery.tsx +17 -19
- package/src/engines/Cesium/core/Indicator/Indicator.tsx +8 -8
- package/src/engines/Cesium/hooks/useCamera.ts +135 -0
- package/src/engines/Cesium/{cameraLimiter.ts → hooks/useCameraLimiter.ts} +22 -45
- package/src/engines/Cesium/{useEngineRef.test.tsx → hooks/useEngineRef.test.tsx} +38 -34
- package/src/engines/Cesium/{useEngineRef.ts → hooks/useEngineRef.ts} +43 -41
- package/src/engines/Cesium/hooks/useExplicitRender.ts +65 -0
- package/src/engines/Cesium/hooks/useLayerDragDrop.ts +77 -0
- package/src/engines/Cesium/{VertexTerrainElevationMaterial.ts → hooks/useOverrideGlobeShader/VertexTerrainElevationMaterial.ts} +3 -2
- package/src/engines/Cesium/{useOverrideGlobeShader.ts → hooks/useOverrideGlobeShader/useOverrideGlobeShader.ts} +20 -17
- package/src/engines/Cesium/hooks/useViewerProperty.ts +90 -0
- package/src/engines/Cesium/hooks.ts +129 -366
- package/src/engines/Cesium/index.stories.tsx +1 -1
- package/src/engines/Cesium/index.tsx +60 -62
- package/src/engines/index.ts +1 -1
- package/src/mantle/atoms/compute.ts +5 -1
- package/src/mantle/compat/types.ts +7 -7
- package/src/mantle/data/geojson.ts +53 -22
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_0.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_1.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_10.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_11.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_12.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_13.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_14.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_15.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_16.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_17.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_18.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_19.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_2.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_20.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_21.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_22.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_23.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_24.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_25.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_26.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_27.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_3.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_4.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_5.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_6.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_7.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_8.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_9.json +0 -1
- 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 +0 -14
- 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 +0 -1
- package/dist/cesium/Assets/Textures/waterNormals.jpg +0 -0
- package/dist/cesium/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/dist/cesium/Assets/approximateTerrainHeights.json +0 -1
- package/dist/cesium/ThirdParty/Workers/package.json +0 -1
- package/dist/cesium/ThirdParty/Workers/pako_deflate.min.js +0 -1
- package/dist/cesium/ThirdParty/Workers/pako_inflate.min.js +0 -1
- package/dist/cesium/ThirdParty/Workers/z-worker-pako.js +0 -1
- 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 +0 -1
- package/dist/cesium/Widgets/Animation/Animation.css +0 -127
- package/dist/cesium/Widgets/Animation/lighter.css +0 -70
- package/dist/cesium/Widgets/BaseLayerPicker/BaseLayerPicker.css +0 -108
- package/dist/cesium/Widgets/BaseLayerPicker/lighter.css +0 -22
- package/dist/cesium/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +0 -102
- package/dist/cesium/Widgets/CesiumInspector/CesiumInspector.css +0 -113
- package/dist/cesium/Widgets/CesiumWidget/CesiumWidget.css +0 -124
- package/dist/cesium/Widgets/CesiumWidget/lighter.css +0 -14
- package/dist/cesium/Widgets/FullscreenButton/FullscreenButton.css +0 -8
- package/dist/cesium/Widgets/Geocoder/Geocoder.css +0 -70
- package/dist/cesium/Widgets/Geocoder/lighter.css +0 -17
- package/dist/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +0 -27
- 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 +0 -84
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseLeft.svg +0 -76
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseMiddle.svg +0 -76
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseRight.svg +0 -76
- package/dist/cesium/Widgets/Images/NavigationHelp/Touch.svg +0 -120
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchDrag.svg +0 -129
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchRotate.svg +0 -76
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchTilt.svg +0 -135
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchZoom.svg +0 -74
- 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 +0 -92
- package/dist/cesium/Widgets/InfoBox/InfoBoxDescription.css +0 -178
- package/dist/cesium/Widgets/NavigationHelpButton/NavigationHelpButton.css +0 -93
- package/dist/cesium/Widgets/NavigationHelpButton/lighter.css +0 -38
- package/dist/cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +0 -15
- package/dist/cesium/Widgets/ProjectionPicker/ProjectionPicker.css +0 -38
- package/dist/cesium/Widgets/SceneModePicker/SceneModePicker.css +0 -56
- package/dist/cesium/Widgets/SelectionIndicator/SelectionIndicator.css +0 -20
- package/dist/cesium/Widgets/Timeline/Timeline.css +0 -103
- package/dist/cesium/Widgets/Timeline/lighter.css +0 -23
- package/dist/cesium/Widgets/VRButton/VRButton.css +0 -8
- package/dist/cesium/Widgets/Viewer/Viewer.css +0 -107
- package/dist/cesium/Widgets/VoxelInspector/VoxelInspector.css +0 -16
- package/dist/cesium/Widgets/lighter.css +0 -237
- package/dist/cesium/Widgets/lighterShared.css +0 -46
- package/dist/cesium/Widgets/shared.css +0 -103
- package/dist/cesium/Widgets/widgets.css +0 -1346
- package/dist/cesium/Workers/chunk-2ED5WI77.js +0 -26
- package/dist/cesium/Workers/chunk-2MBPFWCP.js +0 -26
- package/dist/cesium/Workers/chunk-3C74MLG3.js +0 -26
- package/dist/cesium/Workers/chunk-45U7TTT3.js +0 -26
- package/dist/cesium/Workers/chunk-4N7SRDH5.js +0 -26
- package/dist/cesium/Workers/chunk-4T6AS6BZ.js +0 -26
- package/dist/cesium/Workers/chunk-5AG2MVRM.js +0 -26
- package/dist/cesium/Workers/chunk-5Z6L2FHX.js +0 -26
- package/dist/cesium/Workers/chunk-6AUUBDOF.js +0 -26
- package/dist/cesium/Workers/chunk-74N6MC2V.js +0 -26
- package/dist/cesium/Workers/chunk-7VJK3KHI.js +0 -26
- package/dist/cesium/Workers/chunk-7VZHIB6P.js +0 -26
- package/dist/cesium/Workers/chunk-7X2YQ6I4.js +0 -27
- package/dist/cesium/Workers/chunk-B2SKQ7LU.js +0 -26
- package/dist/cesium/Workers/chunk-B4TQDFIE.js +0 -26
- package/dist/cesium/Workers/chunk-B6TRTFAA.js +0 -26
- package/dist/cesium/Workers/chunk-BK3HCS7I.js +0 -26
- package/dist/cesium/Workers/chunk-BOPB43LN.js +0 -26
- package/dist/cesium/Workers/chunk-C6DMEJQ7.js +0 -26
- package/dist/cesium/Workers/chunk-CN7UN2OZ.js +0 -26
- package/dist/cesium/Workers/chunk-CSISXEG7.js +0 -26
- package/dist/cesium/Workers/chunk-CUOR5F7T.js +0 -28
- package/dist/cesium/Workers/chunk-DGCK3LD2.js +0 -30
- package/dist/cesium/Workers/chunk-DXEZYE3K.js +0 -62
- package/dist/cesium/Workers/chunk-EXBFEYPQ.js +0 -26
- package/dist/cesium/Workers/chunk-FK5KFB6H.js +0 -26
- package/dist/cesium/Workers/chunk-HPBHKP5S.js +0 -26
- package/dist/cesium/Workers/chunk-JCJ24DHF.js +0 -26
- package/dist/cesium/Workers/chunk-JEWHFDAA.js +0 -26
- package/dist/cesium/Workers/chunk-JZLZJJQD.js +0 -26
- package/dist/cesium/Workers/chunk-KRZBI2MU.js +0 -26
- package/dist/cesium/Workers/chunk-KTTUANTJ.js +0 -26
- package/dist/cesium/Workers/chunk-LDCAXLGS.js +0 -26
- package/dist/cesium/Workers/chunk-LOPN5R3I.js +0 -26
- package/dist/cesium/Workers/chunk-MDLPQIMP.js +0 -26
- package/dist/cesium/Workers/chunk-MRR3RGFO.js +0 -26
- package/dist/cesium/Workers/chunk-NPBZI5YA.js +0 -26
- package/dist/cesium/Workers/chunk-NUSW5B6A.js +0 -26
- package/dist/cesium/Workers/chunk-OUXRUXNB.js +0 -26
- package/dist/cesium/Workers/chunk-QPOPEH3M.js +0 -26
- package/dist/cesium/Workers/chunk-R2AN7EKC.js +0 -26
- package/dist/cesium/Workers/chunk-RURL6ZX2.js +0 -26
- package/dist/cesium/Workers/chunk-SUQM3OSW.js +0 -28
- package/dist/cesium/Workers/chunk-UBIRX2SP.js +0 -26
- package/dist/cesium/Workers/chunk-VAKC5J5C.js +0 -26
- package/dist/cesium/Workers/chunk-VHNZBQTR.js +0 -27
- package/dist/cesium/Workers/chunk-VKV642QV.js +0 -26
- package/dist/cesium/Workers/chunk-VMSXG4OA.js +0 -26
- package/dist/cesium/Workers/chunk-VQZSIOZW.js +0 -26
- package/dist/cesium/Workers/chunk-WZUWQMI7.js +0 -26
- package/dist/cesium/Workers/chunk-YBI55DLZ.js +0 -26
- package/dist/cesium/Workers/chunk-YEJWCH6C.js +0 -26
- package/dist/cesium/Workers/chunk-YPDO7SPO.js +0 -26
- package/dist/cesium/Workers/chunk-ZYWD6OQH.js +0 -26
- package/dist/cesium/Workers/combineGeometry.js +0 -26
- package/dist/cesium/Workers/createBoxGeometry.js +0 -26
- package/dist/cesium/Workers/createBoxOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createCircleGeometry.js +0 -26
- package/dist/cesium/Workers/createCircleOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createCoplanarPolygonGeometry.js +0 -26
- package/dist/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createCorridorGeometry.js +0 -26
- package/dist/cesium/Workers/createCorridorOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createCylinderGeometry.js +0 -26
- package/dist/cesium/Workers/createCylinderOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createEllipseGeometry.js +0 -26
- package/dist/cesium/Workers/createEllipseOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createEllipsoidGeometry.js +0 -26
- package/dist/cesium/Workers/createEllipsoidOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createFrustumGeometry.js +0 -26
- package/dist/cesium/Workers/createFrustumOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createGeometry.js +0 -26
- package/dist/cesium/Workers/createGroundPolylineGeometry.js +0 -26
- package/dist/cesium/Workers/createPlaneGeometry.js +0 -26
- package/dist/cesium/Workers/createPlaneOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createPolygonGeometry.js +0 -26
- package/dist/cesium/Workers/createPolygonOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createPolylineGeometry.js +0 -26
- package/dist/cesium/Workers/createPolylineVolumeGeometry.js +0 -26
- package/dist/cesium/Workers/createPolylineVolumeOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createRectangleGeometry.js +0 -26
- package/dist/cesium/Workers/createRectangleOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createSimplePolylineGeometry.js +0 -26
- package/dist/cesium/Workers/createSphereGeometry.js +0 -26
- package/dist/cesium/Workers/createSphereOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createTaskProcessorWorker.js +0 -26
- package/dist/cesium/Workers/createVectorTileClampedPolylines.js +0 -26
- package/dist/cesium/Workers/createVectorTileGeometries.js +0 -26
- package/dist/cesium/Workers/createVectorTilePoints.js +0 -26
- package/dist/cesium/Workers/createVectorTilePolygons.js +0 -26
- package/dist/cesium/Workers/createVectorTilePolylines.js +0 -26
- package/dist/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -26
- package/dist/cesium/Workers/createVerticesFromHeightmap.js +0 -26
- package/dist/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -26
- package/dist/cesium/Workers/createWallGeometry.js +0 -26
- package/dist/cesium/Workers/createWallOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/decodeDraco.js +0 -26
- package/dist/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +0 -26
- package/dist/cesium/Workers/decodeI3S.js +0 -26
- package/dist/cesium/Workers/transcodeKTX2.js +0 -56
- package/dist/cesium/Workers/transferTypedArrayTest.js +0 -26
- package/dist/cesium/Workers/upsampleQuantizedTerrainMesh.js +0 -26
- /package/src/engines/Cesium/{JapanSeaLevelEllipsoid.ts → hooks/useOverrideGlobeShader/JapanSeaLevelEllipsoid.ts} +0 -0
- /package/src/engines/Cesium/{vertexTerrainElevationMaterial.glsl → hooks/useOverrideGlobeShader/vertexTerrainElevationMaterial.glsl} +0 -0
package/src/Map/types/index.ts
CHANGED
|
@@ -22,7 +22,6 @@ import type {
|
|
|
22
22
|
Feature,
|
|
23
23
|
ComputedFeature,
|
|
24
24
|
CameraPosition,
|
|
25
|
-
LUT,
|
|
26
25
|
} from "../../mantle";
|
|
27
26
|
import type {
|
|
28
27
|
CameraOptions,
|
|
@@ -39,10 +38,11 @@ import type {
|
|
|
39
38
|
LayerSelectionReason,
|
|
40
39
|
Ref as LayersRef,
|
|
41
40
|
} from "../Layers";
|
|
42
|
-
import { SketchComponentType } from "../Sketch";
|
|
43
|
-
import { SketchAppearance, SketchType } from "../Sketch/types";
|
|
41
|
+
import { SketchType, SketchOptions, SketchComponentType } from "../Sketch/types";
|
|
44
42
|
import type { TimelineManagerRef } from "../useTimelineManager";
|
|
45
43
|
|
|
44
|
+
import type { SceneMode, ViewerProperty } from "./viewerProperty";
|
|
45
|
+
|
|
46
46
|
export type {
|
|
47
47
|
FeatureComponentProps,
|
|
48
48
|
FeatureComponentType,
|
|
@@ -72,6 +72,7 @@ export type {
|
|
|
72
72
|
ValueType,
|
|
73
73
|
} from "../../mantle";
|
|
74
74
|
export * from "./event";
|
|
75
|
+
export * from "./viewerProperty";
|
|
75
76
|
|
|
76
77
|
export type EngineRef = {
|
|
77
78
|
name: string;
|
|
@@ -87,7 +88,7 @@ export type EngineRef = {
|
|
|
87
88
|
getLocationFromScreen: (x: number, y: number, withTerrain?: boolean) => LatLngHeight | undefined;
|
|
88
89
|
sampleTerrainHeight: (lng: number, lat: number) => Promise<number | undefined>;
|
|
89
90
|
computeGlobeHeight: (lng: number, lat: number, height?: number) => number | undefined;
|
|
90
|
-
getGlobeHeight: () =>
|
|
91
|
+
getGlobeHeight: () => number | undefined;
|
|
91
92
|
toXYZ: (
|
|
92
93
|
lng: number,
|
|
93
94
|
lat: number,
|
|
@@ -202,7 +203,8 @@ export type EngineProps = {
|
|
|
202
203
|
style?: CSSProperties;
|
|
203
204
|
isEditable?: boolean;
|
|
204
205
|
isBuilt?: boolean;
|
|
205
|
-
property?:
|
|
206
|
+
property?: ViewerProperty;
|
|
207
|
+
time?: string | Date;
|
|
206
208
|
camera?: Camera;
|
|
207
209
|
cameraForceHorizontalRoll?: boolean;
|
|
208
210
|
small?: boolean;
|
|
@@ -297,18 +299,18 @@ export type MouseEventCallback = (props: MouseEventProps) => void;
|
|
|
297
299
|
export type MouseWheelEventCallback = (props: MouseEventProps) => void;
|
|
298
300
|
export type MouseEventTypes =
|
|
299
301
|
| "click"
|
|
300
|
-
| "
|
|
301
|
-
| "
|
|
302
|
-
| "
|
|
303
|
-
| "
|
|
304
|
-
| "
|
|
305
|
-
| "
|
|
306
|
-
| "
|
|
307
|
-
| "
|
|
308
|
-
| "
|
|
309
|
-
| "
|
|
310
|
-
| "
|
|
311
|
-
| "
|
|
302
|
+
| "doubleClick"
|
|
303
|
+
| "mouseDown"
|
|
304
|
+
| "mouseUp"
|
|
305
|
+
| "rightClick"
|
|
306
|
+
| "rightDown"
|
|
307
|
+
| "rightUp"
|
|
308
|
+
| "middleClick"
|
|
309
|
+
| "middleDown"
|
|
310
|
+
| "middleUp"
|
|
311
|
+
| "mouseMove"
|
|
312
|
+
| "mouseEnter"
|
|
313
|
+
| "mouseLeave"
|
|
312
314
|
| "wheel";
|
|
313
315
|
|
|
314
316
|
export type MouseEvents = {
|
|
@@ -319,18 +321,18 @@ export type MouseEvents = {
|
|
|
319
321
|
|
|
320
322
|
export type MouseEventHandles = {
|
|
321
323
|
onClick: (fn: MouseEvents["click"]) => void;
|
|
322
|
-
onDoubleClick: (fn: MouseEvents["
|
|
323
|
-
onMouseDown: (fn: MouseEvents["
|
|
324
|
-
onMouseUp: (fn: MouseEvents["
|
|
325
|
-
onRightClick: (fn: MouseEvents["
|
|
326
|
-
onRightDown: (fn: MouseEvents["
|
|
327
|
-
onRightUp: (fn: MouseEvents["
|
|
328
|
-
onMiddleClick: (fn: MouseEvents["
|
|
329
|
-
onMiddleDown: (fn: MouseEvents["
|
|
330
|
-
onMiddleUp: (fn: MouseEvents["
|
|
331
|
-
onMouseMove: (fn: MouseEvents["
|
|
332
|
-
onMouseEnter: (fn: MouseEvents["
|
|
333
|
-
onMouseLeave: (fn: MouseEvents["
|
|
324
|
+
onDoubleClick: (fn: MouseEvents["doubleClick"]) => void;
|
|
325
|
+
onMouseDown: (fn: MouseEvents["mouseDown"]) => void;
|
|
326
|
+
onMouseUp: (fn: MouseEvents["mouseUp"]) => void;
|
|
327
|
+
onRightClick: (fn: MouseEvents["rightClick"]) => void;
|
|
328
|
+
onRightDown: (fn: MouseEvents["rightDown"]) => void;
|
|
329
|
+
onRightUp: (fn: MouseEvents["rightUp"]) => void;
|
|
330
|
+
onMiddleClick: (fn: MouseEvents["middleClick"]) => void;
|
|
331
|
+
onMiddleDown: (fn: MouseEvents["middleDown"]) => void;
|
|
332
|
+
onMiddleUp: (fn: MouseEvents["middleUp"]) => void;
|
|
333
|
+
onMouseMove: (fn: MouseEvents["mouseMove"]) => void;
|
|
334
|
+
onMouseEnter: (fn: MouseEvents["mouseEnter"]) => void;
|
|
335
|
+
onMouseLeave: (fn: MouseEvents["mouseLeave"]) => void;
|
|
334
336
|
onWheel: (fn: MouseEvents["wheel"]) => void;
|
|
335
337
|
};
|
|
336
338
|
|
|
@@ -339,186 +341,6 @@ export type MouseEventCallbacks = { [key in keyof MouseEvents]: MouseEvents[key]
|
|
|
339
341
|
export type TickEvent = (cb: TickEventCallback) => void;
|
|
340
342
|
export type TickEventCallback = (current: Date, clock: { start: Date; stop: Date }) => void;
|
|
341
343
|
|
|
342
|
-
export type SceneMode = "3d" | "2d" | "columbus";
|
|
343
|
-
export type IndicatorTypes = "default" | "crosshair" | "custom";
|
|
344
|
-
|
|
345
|
-
export type TerrainProperty = {
|
|
346
|
-
terrain?: boolean;
|
|
347
|
-
terrainType?: "cesium" | "arcgis" | "cesiumion"; // default: cesium
|
|
348
|
-
terrainExaggeration?: number; // default: 1
|
|
349
|
-
terrainExaggerationRelativeHeight?: number; // default: 0
|
|
350
|
-
depthTestAgainstTerrain?: boolean;
|
|
351
|
-
terrainCesiumIonAsset?: string;
|
|
352
|
-
terrainCesiumIonAccessToken?: string;
|
|
353
|
-
terrainCesiumIonUrl?: string;
|
|
354
|
-
terrainUrl?: string;
|
|
355
|
-
terrainNormal?: boolean;
|
|
356
|
-
// TODO: Add encode option
|
|
357
|
-
// Need to specify a tile from `tiles` option with `heatmap` option.
|
|
358
|
-
heatmapType?: "custom"; // TODO: Support Cesium's terrain heatmap as built-in: https://sandcastle.cesium.com/?src=Globe%20Materials.html
|
|
359
|
-
heatmapColorLUT?: LUT;
|
|
360
|
-
heatmapMinHeight?: number;
|
|
361
|
-
heatmapMaxHeight?: number;
|
|
362
|
-
heatmapLogarithmic?: boolean;
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
export type SceneProperty = {
|
|
366
|
-
main?: {
|
|
367
|
-
sceneMode?: SceneMode; // default: scene3d
|
|
368
|
-
ion?: string;
|
|
369
|
-
vr?: boolean;
|
|
370
|
-
};
|
|
371
|
-
tiles?: {
|
|
372
|
-
id: string;
|
|
373
|
-
tile_type?: string;
|
|
374
|
-
tile_url?: string;
|
|
375
|
-
tile_zoomLevel?: number[];
|
|
376
|
-
tile_zoomLevelForURL?: number[];
|
|
377
|
-
tile_opacity?: number;
|
|
378
|
-
heatmap?: boolean;
|
|
379
|
-
}[];
|
|
380
|
-
tileLabels?: {
|
|
381
|
-
id: string;
|
|
382
|
-
labelType: "japan_gsi_optimal_bvmap"; // | "other_map"
|
|
383
|
-
style: Record<string, any>; // Function isn't allowed
|
|
384
|
-
}[];
|
|
385
|
-
terrain?: {
|
|
386
|
-
terrain?: boolean;
|
|
387
|
-
terrainType?: "cesium" | "arcgis" | "cesiumion"; // default: cesium
|
|
388
|
-
terrainCesiumIonAsset?: string;
|
|
389
|
-
terrainCesiumIonAccessToken?: string;
|
|
390
|
-
terrainCesiumIonUrl?: string;
|
|
391
|
-
terrainExaggeration?: number; // default: 1
|
|
392
|
-
terrainExaggerationRelativeHeight?: number; // default: 0
|
|
393
|
-
depthTestAgainstTerrain?: boolean;
|
|
394
|
-
};
|
|
395
|
-
globeLighting?: {
|
|
396
|
-
globeLighting?: boolean;
|
|
397
|
-
};
|
|
398
|
-
globeShadow?: {
|
|
399
|
-
globeShadow?: boolean;
|
|
400
|
-
};
|
|
401
|
-
globeAtmosphere?: {
|
|
402
|
-
globeAtmosphere?: boolean;
|
|
403
|
-
globeAtmosphereIntensity?: number; // default: 10
|
|
404
|
-
};
|
|
405
|
-
skyBox?: {
|
|
406
|
-
skyBox?: boolean;
|
|
407
|
-
};
|
|
408
|
-
sun?: {
|
|
409
|
-
sun?: boolean;
|
|
410
|
-
};
|
|
411
|
-
moon?: {
|
|
412
|
-
moon?: boolean;
|
|
413
|
-
};
|
|
414
|
-
skyAtmosphere?: {
|
|
415
|
-
skyAtmosphere?: boolean;
|
|
416
|
-
skyAtmosphereIntensity?: number; // default: 50
|
|
417
|
-
};
|
|
418
|
-
camera?: {
|
|
419
|
-
camera?: Camera;
|
|
420
|
-
allowEnterGround?: boolean;
|
|
421
|
-
fov?: number;
|
|
422
|
-
};
|
|
423
|
-
render?: { showWireframe?: boolean };
|
|
424
|
-
} & LegacySceneProperty;
|
|
425
|
-
|
|
426
|
-
type LegacySceneProperty = {
|
|
427
|
-
default?: {
|
|
428
|
-
camera?: Camera;
|
|
429
|
-
allowEnterGround?: boolean;
|
|
430
|
-
skybox?: boolean;
|
|
431
|
-
bgcolor?: string;
|
|
432
|
-
ion?: string;
|
|
433
|
-
sceneMode?: SceneMode; // default: scene3d
|
|
434
|
-
vr?: boolean;
|
|
435
|
-
} & TerrainProperty; // compat
|
|
436
|
-
cameraLimiter?: {
|
|
437
|
-
cameraLimitterEnabled?: boolean;
|
|
438
|
-
cameraLimitterShowHelper?: boolean;
|
|
439
|
-
cameraLimitterTargetArea?: Camera;
|
|
440
|
-
cameraLimitterTargetWidth?: number;
|
|
441
|
-
cameraLimitterTargetLength?: number;
|
|
442
|
-
};
|
|
443
|
-
indicator?: {
|
|
444
|
-
indicator_type: IndicatorTypes;
|
|
445
|
-
indicator_image?: string;
|
|
446
|
-
indicator_image_scale?: number;
|
|
447
|
-
};
|
|
448
|
-
tiles?: {
|
|
449
|
-
id: string;
|
|
450
|
-
tile_type?: string;
|
|
451
|
-
tile_url?: string;
|
|
452
|
-
tile_zoomLevel?: number[];
|
|
453
|
-
tile_opacity?: number;
|
|
454
|
-
}[];
|
|
455
|
-
terrain?: TerrainProperty;
|
|
456
|
-
atmosphere?: {
|
|
457
|
-
enable_sun?: boolean;
|
|
458
|
-
enableMoon?: boolean;
|
|
459
|
-
enable_lighting?: boolean;
|
|
460
|
-
ground_atmosphere?: boolean;
|
|
461
|
-
sky_atmosphere?: boolean;
|
|
462
|
-
shadows?: boolean;
|
|
463
|
-
shadowResolution?: 1024 | 2048 | 4096;
|
|
464
|
-
softShadow?: boolean;
|
|
465
|
-
shadowDarkness?: number;
|
|
466
|
-
shadowMaximumDistance?: number;
|
|
467
|
-
fog?: boolean;
|
|
468
|
-
fog_density?: number;
|
|
469
|
-
hue_shift?: number;
|
|
470
|
-
brightness_shift?: number;
|
|
471
|
-
surturation_shift?: number;
|
|
472
|
-
skyboxBrightnessShift?: number;
|
|
473
|
-
skyboxSurturationShift?: number;
|
|
474
|
-
globeShadowDarkness?: number;
|
|
475
|
-
globeImageBasedLighting?: boolean;
|
|
476
|
-
globeBaseColor?: string;
|
|
477
|
-
};
|
|
478
|
-
timeline?: {
|
|
479
|
-
animation?: boolean;
|
|
480
|
-
visible?: boolean;
|
|
481
|
-
current?: string;
|
|
482
|
-
start?: string;
|
|
483
|
-
stop?: string;
|
|
484
|
-
stepType?: "rate" | "fixed";
|
|
485
|
-
multiplier?: number;
|
|
486
|
-
step?: number;
|
|
487
|
-
rangeType?: "unbounded" | "clamped" | "bounced";
|
|
488
|
-
};
|
|
489
|
-
googleAnalytics?: {
|
|
490
|
-
enableGA?: boolean;
|
|
491
|
-
trackingId?: string;
|
|
492
|
-
};
|
|
493
|
-
theme?: {
|
|
494
|
-
themeType?: "light" | "dark" | "forest" | "custom";
|
|
495
|
-
themeTextColor?: string;
|
|
496
|
-
themeSelectColor?: string;
|
|
497
|
-
themeBackgroundColor?: string;
|
|
498
|
-
};
|
|
499
|
-
ambientOcclusion?: {
|
|
500
|
-
enabled?: boolean;
|
|
501
|
-
quality?: "low" | "medium" | "high" | "extreme";
|
|
502
|
-
intensity?: number;
|
|
503
|
-
ambientOcclusionOnly?: boolean;
|
|
504
|
-
};
|
|
505
|
-
light?: {
|
|
506
|
-
lightType?: "sunLight" | "directionalLight";
|
|
507
|
-
lightDirectionX?: number;
|
|
508
|
-
lightDirectionY?: number;
|
|
509
|
-
lightDirectionZ?: number;
|
|
510
|
-
lightColor?: string;
|
|
511
|
-
lightIntensity?: number;
|
|
512
|
-
specularEnvironmentMaps?: string;
|
|
513
|
-
sphericalHarmonicCoefficients?: [x: number, y: number, z: number][];
|
|
514
|
-
imageBasedLightIntensity?: number;
|
|
515
|
-
};
|
|
516
|
-
render?: {
|
|
517
|
-
antialias?: "low" | "medium" | "high" | "extreme";
|
|
518
|
-
debugFramePerSecond?: boolean;
|
|
519
|
-
};
|
|
520
|
-
};
|
|
521
|
-
|
|
522
344
|
export type EngineComponent = ForwardRefExoticComponent<
|
|
523
345
|
PropsWithoutRef<EngineProps> & RefAttributes<EngineRef>
|
|
524
346
|
>;
|
|
@@ -534,12 +356,8 @@ export type Engine = {
|
|
|
534
356
|
export type RequestingRenderMode = -1 | 0 | 1; // -1: force render on every postUpdate, 0: no request to render, 1: request one frame
|
|
535
357
|
|
|
536
358
|
export type SketchRef = {
|
|
359
|
+
getType: () => SketchType | undefined;
|
|
537
360
|
setType: (type: SketchType | undefined, from?: "editor" | "plugin") => void;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
disableShadow: (disable: boolean) => void;
|
|
541
|
-
enableRelativeHeight: (enable: boolean) => void;
|
|
542
|
-
createDataOnly: (dataOnly: boolean) => void;
|
|
543
|
-
allowRightClickToAbort: (allow: boolean) => void;
|
|
544
|
-
allowAutoResetInteractionMode: (allow: boolean) => void;
|
|
361
|
+
getOptions: () => SketchOptions;
|
|
362
|
+
overrideOptions: (options: SketchOptions) => void;
|
|
545
363
|
};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ViewerProperty Interface
|
|
3
|
+
* ------------------------
|
|
4
|
+
* The ViewerProperty interface defines a collection of sub-properties that represent different aspects of the viewer component.
|
|
5
|
+
* Each sub-property encapsulates specific settings and configurations related to the viewer's behavior and appearance.
|
|
6
|
+
|
|
7
|
+
* GlobeProperty: Settings related to the globe visualization, such as base color, lighting, and atmosphere.
|
|
8
|
+
* TerrainProperty: Configuration options for terrain visualization, including terrain type, height map, and normal mapping.
|
|
9
|
+
* SceneProperty: Scene-specific settings, such as background color, scene mode, vertical exaggeration, and lighting.
|
|
10
|
+
* TilesProperty: Properties for managing tile layers, including URLs, opacity, zoom levels, and heatmap settings.
|
|
11
|
+
* TileLabelProperty: Properties for managing tile labels, such as label type and style.
|
|
12
|
+
* SkyProperty: Settings for sky visualization, including skybox, sun, moon, fog, and sky atmosphere.
|
|
13
|
+
* CameraProperty: Camera-related settings, such as camera position, limiter, and ground entry.
|
|
14
|
+
* RenderProperty: Rendering settings, such as antialiasing and ambient occlusion.
|
|
15
|
+
* IndicatorProperty: Properties for customizing the viewer's indicator, such as type and image.
|
|
16
|
+
* AssetsProperty: Asset-related settings, such as access tokens and URLs for external assets.
|
|
17
|
+
* DebugProperty: Debugging options, such as wireframe display and FPS counter.
|
|
18
|
+
|
|
19
|
+
* Guidelines for Adding New Properties
|
|
20
|
+
* ------------------------------------
|
|
21
|
+
* When adding new properties to the ViewerProperty interface, follow these steps to ensure consistency and maintainability:
|
|
22
|
+
* 1. Determine the Appropriate Category: Identify the aspect of the viewer your new property will affect and choose the most relevant existing sub-property type (e.g., GlobeProperty, TerrainProperty, SceneProperty, etc.). If your property does not fit into an existing category, consider creating a new sub-property type.
|
|
23
|
+
* 2. Define the New Property: Add your new property to the chosen sub-property type. Ensure that the property name is descriptive and the type is correctly specified. If your property requires complex structures, define new types as needed.
|
|
24
|
+
* 3. Maintain Optional Properties: To keep the interface flexible, add new properties as optional (?) unless they are strictly required.
|
|
25
|
+
* 4. Follow Naming Rules:
|
|
26
|
+
* - Use CamelCase for property names.
|
|
27
|
+
* - Keep property names descriptive but concise.
|
|
28
|
+
* - Maintain consistency with existing naming patterns.
|
|
29
|
+
* - Avoid abbreviations unless widely understood and standard.
|
|
30
|
+
* 5. Document the Property: Add comments or documentation to describe the purpose and usage of the new property. This will help other developers understand its function and how to use it.
|
|
31
|
+
* 6. Update Usage Examples: If applicable, update any example configurations or documentation to include the new property, demonstrating how it should be used.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
import type { LUT, Camera } from "../../mantle";
|
|
35
|
+
|
|
36
|
+
export type SceneMode = "3d" | "2d" | "columbus";
|
|
37
|
+
|
|
38
|
+
export type ViewerProperty = {
|
|
39
|
+
globe?: GlobeProperty;
|
|
40
|
+
terrain?: TerrainProperty;
|
|
41
|
+
scene?: SceneProperty;
|
|
42
|
+
tiles?: TileProperty[];
|
|
43
|
+
tileLabels?: TileLabelProperty[];
|
|
44
|
+
sky?: SkyProperty;
|
|
45
|
+
camera?: CameraProperty;
|
|
46
|
+
render?: RenderPeropty;
|
|
47
|
+
assets?: AssetsProperty; // anything related to specific assets and its access tokens
|
|
48
|
+
debug?: DebugProperty;
|
|
49
|
+
indicator?: IndicatorProperty; // consider remove this if not needed in the future
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type GlobeProperty = {
|
|
53
|
+
baseColor?: string;
|
|
54
|
+
enableLighting?: boolean;
|
|
55
|
+
atmosphere?: GlobeAtmosphereProperty;
|
|
56
|
+
depthTestAgainstTerrain?: boolean;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type GlobeAtmosphereProperty = {
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
lightIntensity?: number;
|
|
62
|
+
brightnessShift?: number;
|
|
63
|
+
hueShift?: number;
|
|
64
|
+
saturationShift?: number;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export type TerrainProperty = {
|
|
68
|
+
enabled?: boolean;
|
|
69
|
+
type?: "cesium" | "arcgis" | "cesiumion";
|
|
70
|
+
url?: string;
|
|
71
|
+
normal?: boolean;
|
|
72
|
+
elevationHeatMap?: ElevationHeatMapProperty;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type ElevationHeatMapProperty = {
|
|
76
|
+
type?: "custom";
|
|
77
|
+
colorLUT?: LUT;
|
|
78
|
+
minHeight?: number;
|
|
79
|
+
maxHeight?: number;
|
|
80
|
+
logarithmic?: boolean;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type SceneProperty = {
|
|
84
|
+
backgroundColor?: string;
|
|
85
|
+
mode?: SceneMode;
|
|
86
|
+
verticalExaggeration?: number;
|
|
87
|
+
verticalExaggerationRelativeHeight?: number;
|
|
88
|
+
vr?: boolean;
|
|
89
|
+
light?: LightProperty;
|
|
90
|
+
shadow?: ShadowProperty;
|
|
91
|
+
imageBasedLighting?: ImageBasedLighting;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type LightProperty = {
|
|
95
|
+
type?: "sunLight" | "directionalLight";
|
|
96
|
+
direction?: [x: number, y: number, z: number];
|
|
97
|
+
color?: string;
|
|
98
|
+
intensity?: number;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export type ShadowProperty = {
|
|
102
|
+
enabled?: boolean;
|
|
103
|
+
darkness?: number;
|
|
104
|
+
shadowMap?: ShadowMapProperty;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type ShadowMapProperty = {
|
|
108
|
+
size?: 1024 | 2048 | 4096;
|
|
109
|
+
softShadows?: boolean;
|
|
110
|
+
darkness?: number;
|
|
111
|
+
maximumDistance?: number;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export type ImageBasedLighting = {
|
|
115
|
+
enabled?: boolean;
|
|
116
|
+
intensity?: number;
|
|
117
|
+
specularEnvironmentMaps?: string;
|
|
118
|
+
sphericalHarmonicCoefficients?: [number, number, number][];
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export type TileProperty = {
|
|
122
|
+
id: string;
|
|
123
|
+
type?: string;
|
|
124
|
+
url?: string;
|
|
125
|
+
opacity?: number;
|
|
126
|
+
zoomLevel?: number[];
|
|
127
|
+
zoomLevelForURL?: number[];
|
|
128
|
+
heatmap?: boolean;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export type TileLabelProperty = {
|
|
132
|
+
id: string;
|
|
133
|
+
labelType: "japan_gsi_optimal_bvmap";
|
|
134
|
+
style: Record<string, any>;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export type SkyProperty = {
|
|
138
|
+
skyBox?: SkyBoxProperty;
|
|
139
|
+
sun?: SunProperty;
|
|
140
|
+
moon?: MoonProperty;
|
|
141
|
+
fog?: FogProperty;
|
|
142
|
+
skyAtmosphere?: SkyAtmosphereProperty;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export type SkyBoxProperty = {
|
|
146
|
+
show?: boolean;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export type SunProperty = {
|
|
150
|
+
show?: boolean;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export type MoonProperty = {
|
|
154
|
+
show?: boolean;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type FogProperty = {
|
|
158
|
+
enabled?: boolean;
|
|
159
|
+
density?: number;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export type SkyAtmosphereProperty = {
|
|
163
|
+
show?: boolean;
|
|
164
|
+
lightIntensity?: number;
|
|
165
|
+
saturationShift?: number;
|
|
166
|
+
brightnessShift?: number;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export type CameraProperty = {
|
|
170
|
+
allowEnterGround?: boolean;
|
|
171
|
+
limiter?: CameraLimiterProperty;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export type CameraLimiterProperty = {
|
|
175
|
+
enabled?: boolean;
|
|
176
|
+
targetArea?: Camera;
|
|
177
|
+
targetWidth?: number;
|
|
178
|
+
targetLength?: number;
|
|
179
|
+
showHelper?: boolean;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export type RenderPeropty = {
|
|
183
|
+
antialias?: "low" | "medium" | "high" | "extreme";
|
|
184
|
+
ambientOcclusion?: AmbientOcclusionProperty;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export type AmbientOcclusionProperty = {
|
|
188
|
+
enabled?: boolean;
|
|
189
|
+
quality?: "low" | "medium" | "high" | "extreme";
|
|
190
|
+
intensity?: number;
|
|
191
|
+
ambientOcclusionOnly?: boolean;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export type IndicatorProperty = {
|
|
195
|
+
type?: "default" | "crosshair" | "custom";
|
|
196
|
+
image?: string;
|
|
197
|
+
imageScale?: number;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export type AssetsProperty = {
|
|
201
|
+
cesium?: AssetsCesiumProperty;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export type AssetsCesiumProperty = {
|
|
205
|
+
terrain?: {
|
|
206
|
+
ionAccessToken?: string;
|
|
207
|
+
ionAsset?: string;
|
|
208
|
+
ionUrl?: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export type DebugProperty = {
|
|
213
|
+
showGlobeWireframe?: boolean;
|
|
214
|
+
showFramesPerSecond?: boolean;
|
|
215
|
+
};
|
|
@@ -62,12 +62,12 @@ export type TimelineCommit = (PlayCommand | PauseCommand | SetTimeCommand | SetO
|
|
|
62
62
|
|
|
63
63
|
export type TimelineCommitter = {
|
|
64
64
|
source:
|
|
65
|
-
| "overrideSceneProperty"
|
|
66
65
|
| "widgetContext"
|
|
67
66
|
| "pluginAPI"
|
|
68
67
|
| "featureResource"
|
|
69
68
|
| "storyTimelineBlock"
|
|
70
|
-
| "storyPage"
|
|
69
|
+
| "storyPage"
|
|
70
|
+
| "initialize";
|
|
71
71
|
id?: string;
|
|
72
72
|
};
|
|
73
73
|
|
|
@@ -193,7 +193,9 @@ export default ({ init, engineRef, timelineManagerRef }: Props) => {
|
|
|
193
193
|
onCommit,
|
|
194
194
|
offCommit,
|
|
195
195
|
handleTick,
|
|
196
|
-
tick
|
|
196
|
+
get tick() {
|
|
197
|
+
return engineRef?.current?.tick;
|
|
198
|
+
},
|
|
197
199
|
};
|
|
198
200
|
}, [
|
|
199
201
|
options,
|
package/src/Map/utils.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type RefObject, useCallback, useRef, useState, useMemo } from "react";
|
|
1
|
+
import { type RefObject, useCallback, useRef } from "react";
|
|
3
2
|
|
|
4
3
|
export function useGet<T>(value: T): () => T {
|
|
5
4
|
const ref = useRef<T>(value);
|
|
@@ -15,47 +14,6 @@ export function wrapRef<T>(ref: RefObject<T>, keys: FunctionKeys<T>): WrappedRef
|
|
|
15
14
|
) as WrappedRef<T>;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
export function mergeProperty(a: any, b: any) {
|
|
19
|
-
const a2 = cloneDeep(a);
|
|
20
|
-
return mergeWith(
|
|
21
|
-
a2,
|
|
22
|
-
b,
|
|
23
|
-
(
|
|
24
|
-
s: any,
|
|
25
|
-
v: any,
|
|
26
|
-
_k: string | number | symbol,
|
|
27
|
-
_obj: any,
|
|
28
|
-
_src: any,
|
|
29
|
-
stack: { size: number },
|
|
30
|
-
) => (stack.size > 0 || Array.isArray(v) ? v ?? s : undefined),
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export function useOverriddenProperty<T extends {}>(
|
|
35
|
-
property: T | undefined,
|
|
36
|
-
): [T, (pluginId: string, property: T) => void] {
|
|
37
|
-
const [overriddenProperties, setOverrideProperty] = useState<{
|
|
38
|
-
[pluginId: string]: any;
|
|
39
|
-
}>({});
|
|
40
|
-
const { overriddenPropertyCommon, overriddenProperty } = useMemo(() => {
|
|
41
|
-
const { "": overriddenPropertyCommon, ...overriddenProperty } = overriddenProperties;
|
|
42
|
-
return { overriddenPropertyCommon, overriddenProperty };
|
|
43
|
-
}, [overriddenProperties]);
|
|
44
|
-
|
|
45
|
-
const overrideProperty = useCallback((pluginId: string, property: any) => {
|
|
46
|
-
setOverrideProperty(p => (property ? { ...p, [pluginId || ""]: property } : omit(p, pluginId)));
|
|
47
|
-
}, []);
|
|
48
|
-
|
|
49
|
-
const mergedProperty = useMemo(() => {
|
|
50
|
-
return [overriddenPropertyCommon, ...Object.values(overriddenProperty)].reduce(
|
|
51
|
-
(p, v) => mergeProperty(p, v),
|
|
52
|
-
property,
|
|
53
|
-
);
|
|
54
|
-
}, [property, overriddenPropertyCommon, overriddenProperty]);
|
|
55
|
-
|
|
56
|
-
return [mergedProperty, overrideProperty];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
17
|
export type FunctionKeys<T> = {
|
|
60
18
|
[P in keyof T as T[P] extends (...args: any[]) => any ? P : never]: 1;
|
|
61
19
|
};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { createContext } from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
LayerEditEvent,
|
|
5
|
-
LayerSelectionReason,
|
|
6
|
-
LayerVisibilityEvent,
|
|
7
|
-
SceneProperty,
|
|
8
|
-
} from "../engines";
|
|
3
|
+
import { LayerEditEvent, LayerSelectionReason, LayerVisibilityEvent } from "../engines";
|
|
9
4
|
import { ComputedFeature, ComputedLayer } from "../mantle";
|
|
10
5
|
import {
|
|
11
6
|
LayerLoadEvent,
|
|
@@ -28,8 +23,6 @@ type CoreContext = {
|
|
|
28
23
|
};
|
|
29
24
|
selectedComputedFeature?: ComputedFeature | undefined;
|
|
30
25
|
viewport?: Viewport;
|
|
31
|
-
overriddenSceneProperty?: SceneProperty;
|
|
32
|
-
overrideSceneProperty?: (pluginId: string, property: SceneProperty) => void;
|
|
33
26
|
handleCameraForceHorizontalRollChange?: (enable?: boolean) => void;
|
|
34
27
|
handleInteractionModeChange?: (mode?: InteractionModeType | undefined) => void;
|
|
35
28
|
onSketchPluginFeatureCreate?: (cb: SketchEventCallback) => void;
|