@reearth/core 0.0.7-alpha.4 → 0.0.7-alpha.41
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 +44858 -39524
- package/dist/core.umd.cjs +3910 -3868
- package/dist/{index-DqatWUTw.js → index-DqGWVPtz.js} +0 -1
- package/dist/index.d.ts +141 -24
- package/package.json +29 -9
- package/src/Map/Geoid/index.tsx +68 -0
- package/src/Map/Geoid/types.ts +8 -0
- package/src/Map/Layer/hooks.ts +6 -3
- package/src/Map/Layer/index.tsx +2 -0
- package/src/Map/Layers/hooks.ts +27 -0
- package/src/Map/Layers/index.tsx +12 -1
- package/src/Map/Layers/keys.ts +1 -0
- package/src/Map/Sketch/hooks.ts +450 -407
- package/src/Map/Sketch/index.tsx +65 -18
- package/src/Map/Sketch/sketchMachine.ts +359 -4
- package/src/Map/Sketch/sketchMachine.typegen.ts +58 -1
- package/src/Map/Sketch/types.ts +10 -20
- package/src/Map/Sketch/usePluginSketchLayer.ts +105 -0
- package/src/Map/Sketch/useSketch.ts +559 -0
- package/src/Map/Sketch/useSketchFeature.ts +198 -0
- package/src/Map/SpatialId/constants.ts +21 -0
- package/src/Map/SpatialId/hooks.ts +448 -0
- package/src/Map/SpatialId/index.tsx +63 -0
- package/src/Map/SpatialId/types.ts +68 -0
- package/src/Map/SpatialId/utils.ts +65 -0
- package/src/Map/hooks.ts +54 -8
- package/src/Map/index.tsx +40 -7
- package/src/Map/ref.ts +30 -0
- package/src/Map/types/index.ts +37 -1
- package/src/Map/types/viewerProperty.ts +10 -0
- package/src/Visualizer/coreContext.tsx +2 -0
- package/src/Visualizer/hooks.ts +46 -12
- package/src/Visualizer/index.tsx +22 -3
- package/src/Visualizer/interactionMode.ts +2 -1
- package/src/engines/Cesium/Feature/Model/index.tsx +3 -3
- package/src/engines/Cesium/Feature/Polygon/index.tsx +6 -4
- package/src/engines/Cesium/Feature/Raster/mvt.ts +2 -1
- package/src/engines/Cesium/Feature/Resource/utils.ts +86 -91
- package/src/engines/Cesium/Feature/Tileset/hooks.ts +75 -35
- package/src/engines/Cesium/Feature/context.ts +1 -0
- package/src/engines/Cesium/Feature/index.tsx +6 -2
- package/src/engines/Cesium/Feature/utils.tsx +9 -5
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/IBL.glsl +6 -10
- package/src/engines/Cesium/Sketch/ControlPoint.tsx +128 -24
- package/src/engines/Cesium/Sketch/ExtrudedControlPoints.tsx +70 -25
- package/src/engines/Cesium/Sketch/ExtrudedMeasurement.tsx +3 -1
- package/src/engines/Cesium/Sketch/ExtrudedPolygonEntity.tsx +14 -14
- package/src/engines/Cesium/Sketch/PolylineEntity.tsx +7 -4
- package/src/engines/Cesium/Sketch/SurfaceAddingPoints.tsx +60 -0
- package/src/engines/Cesium/Sketch/SurfaceControlPoints.tsx +125 -35
- package/src/engines/Cesium/Sketch/constants.ts +5 -0
- package/src/engines/Cesium/Sketch/index.tsx +68 -29
- package/src/engines/Cesium/SpatialId/CoordinateIndicator.tsx +28 -0
- package/src/engines/Cesium/SpatialId/SpatialIdSpace.tsx +33 -0
- package/src/engines/Cesium/SpatialId/VerticalSpaceIndicator.tsx +32 -0
- package/src/engines/Cesium/SpatialId/index.ts +3 -0
- package/src/engines/Cesium/common.ts +52 -16
- package/src/engines/Cesium/core/Globe.tsx +11 -2
- package/src/engines/Cesium/core/Imagery.tsx +16 -3
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImagery.tsx +8 -1
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapVectorMapLabel.tsx +14 -2
- package/src/engines/Cesium/core/labels/LabelImageryLayers.tsx +10 -1
- package/src/engines/Cesium/core/presets.ts +10 -27
- package/src/engines/Cesium/helpers/getGeometryFromEntity.ts +55 -0
- package/src/engines/Cesium/hooks/useEngineRef.ts +46 -1
- package/src/engines/Cesium/hooks/useOverrideGlobeShader/useOverrideGlobeShader.ts +1 -1
- package/src/engines/Cesium/hooks.ts +45 -4
- package/src/engines/Cesium/index.tsx +16 -3
- package/src/engines/Cesium/types.ts +1 -1
- package/src/mantle/atoms/compute.ts +5 -1
- package/src/mantle/data/geojson.ts +53 -22
- package/src/mantle/evaluator/simple/expression/expression.test.ts +72 -0
- package/src/mantle/evaluator/simple/expression/node.ts +10 -12
- package/src/mantle/types/appearance.ts +12 -10
- package/src/mantle/types/index.ts +3 -0
- package/src/utils/image.ts +1 -11
- 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/{Map/Sketch/utils.ts → utils/use-window-event.ts} +0 -0
package/src/Visualizer/hooks.ts
CHANGED
|
@@ -7,7 +7,6 @@ import type {
|
|
|
7
7
|
Camera,
|
|
8
8
|
ComputedLayer,
|
|
9
9
|
LayerEditEvent,
|
|
10
|
-
CursorType,
|
|
11
10
|
LayerVisibilityEvent,
|
|
12
11
|
LayerLoadEvent,
|
|
13
12
|
LayerSelectWithRectStart,
|
|
@@ -82,12 +81,24 @@ export default function useHooks(
|
|
|
82
81
|
reason: LayerSelectionReason | undefined,
|
|
83
82
|
info: SelectedFeatureInfo | undefined,
|
|
84
83
|
) => {
|
|
85
|
-
|
|
84
|
+
const isSketchLayer =
|
|
85
|
+
selectedLayer.layer?.layer.type === "simple" &&
|
|
86
|
+
selectedLayer.layer?.layer?.data?.isSketchLayer;
|
|
87
|
+
// Sketch layer feature has a fixed featureId, we need to exclude it from the skip condition
|
|
88
|
+
if (
|
|
89
|
+
selectedLayer.layerId === layerId &&
|
|
90
|
+
selectedLayer.featureId === featureId &&
|
|
91
|
+
!isSketchLayer
|
|
92
|
+
)
|
|
93
|
+
return;
|
|
86
94
|
|
|
87
95
|
const computedLayer = await layer?.();
|
|
88
96
|
const computedFeature =
|
|
89
97
|
layerId && featureId
|
|
90
|
-
?
|
|
98
|
+
? (isSketchLayer
|
|
99
|
+
? computedLayer?.features?.find(f => f.id === featureId)
|
|
100
|
+
: mapRef.current?.engine.findComputedFeatureById?.(layerId, featureId)) ??
|
|
101
|
+
info?.feature
|
|
91
102
|
: undefined;
|
|
92
103
|
|
|
93
104
|
selectFeature(
|
|
@@ -119,21 +130,19 @@ export default function useHooks(
|
|
|
119
130
|
}, []);
|
|
120
131
|
|
|
121
132
|
// interaction mode
|
|
122
|
-
const [
|
|
123
|
-
initialInteractionMode,
|
|
133
|
+
const [interactionMode, changeInteractionMode] = useValue(
|
|
134
|
+
initialInteractionMode || "default",
|
|
124
135
|
onInteractionModeChange,
|
|
125
136
|
);
|
|
126
|
-
const interactionMode = _interactionMode || "default";
|
|
127
137
|
|
|
128
|
-
const [cursor, setCursor] = useState<CursorType>("auto");
|
|
129
138
|
useEffect(() => {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
if (interactionMode === "default") {
|
|
140
|
+
mapRef?.current?.engine?.setCursor("auto");
|
|
141
|
+
}
|
|
133
142
|
}, [interactionMode]);
|
|
134
143
|
|
|
135
144
|
// feature flags
|
|
136
|
-
const featureFlags = INTERACTION_MODES[interactionMode];
|
|
145
|
+
const featureFlags = INTERACTION_MODES[interactionMode ?? "default"];
|
|
137
146
|
|
|
138
147
|
// layer edit
|
|
139
148
|
const onLayerEditRef = useRef<(e: LayerEditEvent) => void>();
|
|
@@ -194,6 +203,25 @@ export default function useHooks(
|
|
|
194
203
|
onSketchPluginFeatureCreateCallbacksRef.current.forEach(fn => fn(props));
|
|
195
204
|
}, []);
|
|
196
205
|
|
|
206
|
+
const onSketchPluginFeatureUpdateCallbacksRef = useRef<SketchEventCallback[]>([]);
|
|
207
|
+
const onSketchPluginFeatureUpdate = useCallback((cb: SketchEventCallback) => {
|
|
208
|
+
onSketchPluginFeatureUpdateCallbacksRef.current.push(cb);
|
|
209
|
+
}, []);
|
|
210
|
+
const handleSketchPluginFeatureUpdate = useCallback((props: SketchEventProps) => {
|
|
211
|
+
onSketchPluginFeatureUpdateCallbacksRef.current.forEach(fn => fn(props));
|
|
212
|
+
}, []);
|
|
213
|
+
|
|
214
|
+
const onSketchPluginFeatureDeleteCallbacksRef = useRef<SketchEventCallback[]>([]);
|
|
215
|
+
const onSketchPluginFeatureDelete = useCallback((cb: SketchEventCallback) => {
|
|
216
|
+
onSketchPluginFeatureDeleteCallbacksRef.current.push(cb);
|
|
217
|
+
}, []);
|
|
218
|
+
const handleSketchPluginFeatureDelete = useCallback(
|
|
219
|
+
(props: { layerId: string; featureId: string }) => {
|
|
220
|
+
onSketchPluginFeatureDeleteCallbacksRef.current.forEach(fn => fn(props));
|
|
221
|
+
},
|
|
222
|
+
[],
|
|
223
|
+
);
|
|
224
|
+
|
|
197
225
|
const onSketchTypeChangeCallbacksRef = useRef<((type: SketchType | undefined) => void)[]>([]);
|
|
198
226
|
const onSketchTypeChange = useCallback((cb: (type: SketchType | undefined) => void) => {
|
|
199
227
|
onSketchTypeChangeCallbacksRef.current.push(cb);
|
|
@@ -244,6 +272,8 @@ export default function useHooks(
|
|
|
244
272
|
handleCameraForceHorizontalRollChange,
|
|
245
273
|
handleInteractionModeChange: changeInteractionMode,
|
|
246
274
|
onSketchPluginFeatureCreate,
|
|
275
|
+
onSketchPluginFeatureUpdate,
|
|
276
|
+
onSketchPluginFeatureDelete,
|
|
247
277
|
onSketchTypeChange,
|
|
248
278
|
onLayerVisibility,
|
|
249
279
|
onLayerLoad,
|
|
@@ -261,6 +291,8 @@ export default function useHooks(
|
|
|
261
291
|
handleCameraForceHorizontalRollChange,
|
|
262
292
|
onLayerEdit,
|
|
263
293
|
onSketchPluginFeatureCreate,
|
|
294
|
+
onSketchPluginFeatureUpdate,
|
|
295
|
+
onSketchPluginFeatureDelete,
|
|
264
296
|
onSketchTypeChange,
|
|
265
297
|
onLayerVisibility,
|
|
266
298
|
onLayerLoad,
|
|
@@ -290,10 +322,10 @@ export default function useHooks(
|
|
|
290
322
|
featureFlags,
|
|
291
323
|
isLayerDragging,
|
|
292
324
|
timelineManagerRef,
|
|
293
|
-
cursor,
|
|
294
325
|
cameraForceHorizontalRoll,
|
|
295
326
|
coreContextValue,
|
|
296
327
|
containerStyle,
|
|
328
|
+
overriddenInteractionMode: interactionMode,
|
|
297
329
|
handleLayerSelect,
|
|
298
330
|
handleLayerDrag,
|
|
299
331
|
handleLayerDrop,
|
|
@@ -301,6 +333,8 @@ export default function useHooks(
|
|
|
301
333
|
handleCameraChange: changeCamera,
|
|
302
334
|
handleInteractionModeChange: changeInteractionMode,
|
|
303
335
|
handleSketchPluginFeatureCreate,
|
|
336
|
+
handleSketchPluginFeatureUpdate,
|
|
337
|
+
handleSketchPluginFeatureDelete,
|
|
304
338
|
handleSketchTypeChange,
|
|
305
339
|
handleLayerVisibility,
|
|
306
340
|
handleLayerLoad,
|
package/src/Visualizer/index.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
type LatLng,
|
|
13
13
|
type Cluster,
|
|
14
14
|
type ComputedLayer,
|
|
15
|
+
type Credits,
|
|
15
16
|
} from "../Map";
|
|
16
17
|
import { SketchFeature, SketchType } from "../Map/Sketch/types";
|
|
17
18
|
|
|
@@ -46,6 +47,7 @@ export type CoreVisualizerProps = {
|
|
|
46
47
|
ready?: boolean;
|
|
47
48
|
hiddenLayers?: string[];
|
|
48
49
|
zoomedLayerId?: string;
|
|
50
|
+
displayCredits?: boolean;
|
|
49
51
|
onCameraChange?: (camera: Camera) => void;
|
|
50
52
|
onLayerDrop?: (layerId: string, propertyKey: string, position: LatLng | undefined) => void;
|
|
51
53
|
onLayerSelect?: (
|
|
@@ -58,7 +60,11 @@ export type CoreVisualizerProps = {
|
|
|
58
60
|
onMount?: () => void;
|
|
59
61
|
onSketchTypeChangeProp?: (type: SketchType | undefined) => void;
|
|
60
62
|
onSketchFeatureCreate?: (feature: SketchFeature | null) => void;
|
|
63
|
+
onSketchFeatureUpdate?: (feature: SketchFeature | null) => void;
|
|
64
|
+
onSketchFeatureDelete?: (layerId: string, featureId: string) => void;
|
|
61
65
|
onInteractionModeChange?: (mode: InteractionModeType) => void;
|
|
66
|
+
onAPIReady?: () => void;
|
|
67
|
+
onCreditsUpdate?: (credits?: Credits) => void;
|
|
62
68
|
};
|
|
63
69
|
|
|
64
70
|
export const CoreVisualizer = memo(
|
|
@@ -79,6 +85,7 @@ export const CoreVisualizer = memo(
|
|
|
79
85
|
interactionMode,
|
|
80
86
|
shouldRender,
|
|
81
87
|
meta,
|
|
88
|
+
displayCredits = true,
|
|
82
89
|
style,
|
|
83
90
|
zoomedLayerId,
|
|
84
91
|
children,
|
|
@@ -90,6 +97,10 @@ export const CoreVisualizer = memo(
|
|
|
90
97
|
onMount,
|
|
91
98
|
onSketchTypeChangeProp,
|
|
92
99
|
onSketchFeatureCreate,
|
|
100
|
+
onSketchFeatureUpdate,
|
|
101
|
+
onSketchFeatureDelete,
|
|
102
|
+
onAPIReady,
|
|
103
|
+
onCreditsUpdate,
|
|
93
104
|
},
|
|
94
105
|
ref: Ref<MapRef | null>,
|
|
95
106
|
) => {
|
|
@@ -101,10 +112,10 @@ export const CoreVisualizer = memo(
|
|
|
101
112
|
featureFlags,
|
|
102
113
|
isLayerDragging,
|
|
103
114
|
timelineManagerRef,
|
|
104
|
-
cursor,
|
|
105
115
|
cameraForceHorizontalRoll,
|
|
106
116
|
coreContextValue,
|
|
107
117
|
containerStyle,
|
|
118
|
+
overriddenInteractionMode,
|
|
108
119
|
handleLayerSelect,
|
|
109
120
|
handleLayerDrag,
|
|
110
121
|
handleLayerDrop,
|
|
@@ -112,6 +123,8 @@ export const CoreVisualizer = memo(
|
|
|
112
123
|
handleCameraChange,
|
|
113
124
|
handleInteractionModeChange,
|
|
114
125
|
handleSketchPluginFeatureCreate,
|
|
126
|
+
handleSketchPluginFeatureUpdate,
|
|
127
|
+
handleSketchPluginFeatureDelete,
|
|
115
128
|
handleSketchTypeChange,
|
|
116
129
|
handleLayerVisibility,
|
|
117
130
|
handleLayerLoad,
|
|
@@ -152,6 +165,7 @@ export const CoreVisualizer = memo(
|
|
|
152
165
|
isLayerDragging={isLayerDragging}
|
|
153
166
|
isLayerDraggable={isEditable}
|
|
154
167
|
meta={meta}
|
|
168
|
+
displayCredits={displayCredits}
|
|
155
169
|
style={style}
|
|
156
170
|
featureFlags={featureFlags}
|
|
157
171
|
shouldRender={shouldRender}
|
|
@@ -160,9 +174,8 @@ export const CoreVisualizer = memo(
|
|
|
160
174
|
small={small}
|
|
161
175
|
ready={ready}
|
|
162
176
|
timelineManagerRef={timelineManagerRef}
|
|
163
|
-
interactionMode={
|
|
177
|
+
interactionMode={overriddenInteractionMode}
|
|
164
178
|
selectedFeature={selectedFeature}
|
|
165
|
-
cursor={cursor}
|
|
166
179
|
onCameraChange={handleCameraChange}
|
|
167
180
|
onLayerDrag={handleLayerDrag}
|
|
168
181
|
onLayerDrop={handleLayerDrop}
|
|
@@ -171,6 +184,10 @@ export const CoreVisualizer = memo(
|
|
|
171
184
|
overrideInteractionMode={handleInteractionModeChange}
|
|
172
185
|
onSketchFeatureCreate={onSketchFeatureCreate}
|
|
173
186
|
onSketchPluginFeatureCreate={handleSketchPluginFeatureCreate}
|
|
187
|
+
onSketchFeatureUpdate={onSketchFeatureUpdate}
|
|
188
|
+
onSketchPluginFeatureUpdate={handleSketchPluginFeatureUpdate}
|
|
189
|
+
onSketchFeatureDelete={onSketchFeatureDelete}
|
|
190
|
+
onSketchPluginFeatureDelete={handleSketchPluginFeatureDelete}
|
|
174
191
|
onSketchTypeChange={handleSketchTypeChange}
|
|
175
192
|
onMount={onMount}
|
|
176
193
|
onLayerVisibility={handleLayerVisibility}
|
|
@@ -178,6 +195,8 @@ export const CoreVisualizer = memo(
|
|
|
178
195
|
onLayerSelectWithRectStart={handleLayerSelectWithRectStart}
|
|
179
196
|
onLayerSelectWithRectMove={handleLayerSelectWithRectMove}
|
|
180
197
|
onLayerSelectWithRectEnd={handleLayerSelectWithRectEnd}
|
|
198
|
+
onAPIReady={onAPIReady}
|
|
199
|
+
onCreditsUpdate={onCreditsUpdate}
|
|
181
200
|
/>
|
|
182
201
|
<coreContext.Provider value={coreContextValue}>{children}</coreContext.Provider>
|
|
183
202
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FEATURE_FLAGS } from "./featureFlags";
|
|
2
2
|
|
|
3
|
-
export type InteractionModeType = "default" | "move" | "selection" | "sketch";
|
|
3
|
+
export type InteractionModeType = "default" | "move" | "selection" | "sketch" | "spatialId";
|
|
4
4
|
|
|
5
5
|
// If you would like enable a feature in a specific mode,
|
|
6
6
|
// just set the feature's flag here to that mode.
|
|
@@ -22,4 +22,5 @@ export const INTERACTION_MODES: Record<InteractionModeType, number> = {
|
|
|
22
22
|
FEATURE_FLAGS.CAMERA_ZOOM |
|
|
23
23
|
FEATURE_FLAGS.CAMERA_TILT,
|
|
24
24
|
sketch: FEATURE_FLAGS.SKETCH | FEATURE_FLAGS.CAMERA_ZOOM | FEATURE_FLAGS.CAMERA_TILT,
|
|
25
|
+
spatialId: FEATURE_FLAGS.CAMERA_ZOOM | FEATURE_FLAGS.CAMERA_TILT,
|
|
25
26
|
};
|
|
@@ -32,9 +32,7 @@ export type Props = FeatureProps<Property>;
|
|
|
32
32
|
|
|
33
33
|
export type Property = ModelAppearance & {
|
|
34
34
|
location?: { lat: number; lng: number };
|
|
35
|
-
height?: number;
|
|
36
35
|
};
|
|
37
|
-
|
|
38
36
|
export default function Model({
|
|
39
37
|
id,
|
|
40
38
|
isVisible,
|
|
@@ -50,7 +48,9 @@ export default function Model({
|
|
|
50
48
|
const coordinates = useMemo(
|
|
51
49
|
() =>
|
|
52
50
|
geometry?.type === "Point"
|
|
53
|
-
?
|
|
51
|
+
? property?.height === undefined
|
|
52
|
+
? geometry.coordinates
|
|
53
|
+
: [...geometry.coordinates.slice(0, 2), property.height]
|
|
54
54
|
: property?.location
|
|
55
55
|
? [property.location.lng, property.location.lat, property.height ?? 0]
|
|
56
56
|
: undefined,
|
|
@@ -54,6 +54,7 @@ export default function Polygon({
|
|
|
54
54
|
fillColor,
|
|
55
55
|
strokeColor,
|
|
56
56
|
strokeWidth = 1,
|
|
57
|
+
height,
|
|
57
58
|
heightReference: hr,
|
|
58
59
|
shadows,
|
|
59
60
|
extrudedHeight,
|
|
@@ -83,7 +84,7 @@ export default function Polygon({
|
|
|
83
84
|
coordiantes && stroke && !disableWorkaround
|
|
84
85
|
? coordiantes.flatMap(hole => [
|
|
85
86
|
// bottom
|
|
86
|
-
hole.map(c => Cartesian3.fromDegrees(c[0], c[1], c[2] ??
|
|
87
|
+
hole.map(c => Cartesian3.fromDegrees(c[0], c[1], c[2] ?? height)),
|
|
87
88
|
...(extrudedHeight
|
|
88
89
|
? [
|
|
89
90
|
// top
|
|
@@ -92,14 +93,14 @@ export default function Polygon({
|
|
|
92
93
|
...hole
|
|
93
94
|
.slice(0, -1)
|
|
94
95
|
.map(c => [
|
|
95
|
-
Cartesian3.fromDegrees(c[0], c[1], 0),
|
|
96
|
+
Cartesian3.fromDegrees(c[0], c[1], height ?? 0),
|
|
96
97
|
Cartesian3.fromDegrees(c[0], c[1], extrudedHeight),
|
|
97
98
|
]),
|
|
98
99
|
]
|
|
99
100
|
: []),
|
|
100
101
|
])
|
|
101
102
|
: [],
|
|
102
|
-
[coordiantes, stroke, disableWorkaround],
|
|
103
|
+
[coordiantes, stroke, disableWorkaround, height, extrudedHeight],
|
|
103
104
|
);
|
|
104
105
|
|
|
105
106
|
const memoStrokeColor = useMemo(
|
|
@@ -127,7 +128,7 @@ export default function Polygon({
|
|
|
127
128
|
);
|
|
128
129
|
|
|
129
130
|
const extrudedHeightProperty: { extrudedHeight: number } | undefined = useMemo(
|
|
130
|
-
() => (extrudedHeight ? { extrudedHeight } : undefined),
|
|
131
|
+
() => (extrudedHeight !== undefined ? { extrudedHeight } : undefined),
|
|
131
132
|
[extrudedHeight],
|
|
132
133
|
);
|
|
133
134
|
|
|
@@ -152,6 +153,7 @@ export default function Polygon({
|
|
|
152
153
|
outline={!!memoStrokeColor}
|
|
153
154
|
outlineColor={memoStrokeColor}
|
|
154
155
|
outlineWidth={strokeWidth}
|
|
156
|
+
height={height}
|
|
155
157
|
heightReference={heightReference(hr)}
|
|
156
158
|
shadows={shadowMode(shadows)}
|
|
157
159
|
distanceDisplayCondition={distanceDisplayCondition}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { MVTImageryProvider } from "@reearth/cesium-mvt-imagery-provider";
|
|
2
1
|
import { useMemo } from "react";
|
|
3
2
|
|
|
3
|
+
import { MVTImageryProvider } from "@reearth/cesium-mvt-imagery-provider";
|
|
4
|
+
|
|
4
5
|
import { extractSimpleLayer } from "../utils";
|
|
5
6
|
|
|
6
7
|
import { useData, useImageryProvider } from "./hooks";
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Entity,
|
|
3
|
-
Cartesian3,
|
|
4
|
-
PolygonHierarchy,
|
|
5
|
-
PointGraphics,
|
|
6
|
-
BillboardGraphics,
|
|
7
|
-
JulianDate,
|
|
8
|
-
} from "cesium";
|
|
1
|
+
import { Entity, PointGraphics, BillboardGraphics, JulianDate } from "cesium";
|
|
9
2
|
|
|
10
3
|
import { EvalFeature } from "../../..";
|
|
11
4
|
import { AppearanceTypes, ComputedFeature, ComputedLayer, Feature } from "../../../../mantle";
|
|
12
|
-
import { heightReference, shadowMode, toColor } from "../../common";
|
|
5
|
+
import { heightReference, shadowMode, toColor, classificationType } from "../../common";
|
|
6
|
+
import { getMarkerCoordinates, getGeometryFromEntity } from "../../helpers/getGeometryFromEntity";
|
|
13
7
|
import { convertEntityDescription, convertEntityProperties } from "../../utils/utils";
|
|
14
8
|
import { attachTag, extractSimpleLayer, getTag, Tag } from "../utils";
|
|
15
9
|
|
|
@@ -39,7 +33,7 @@ type EntityAppearanceKey<AName extends SupportedAppearanceKey> = AName extends "
|
|
|
39
33
|
? keyof Pick<Entity, "point" | "billboard" | "label">
|
|
40
34
|
: keyof Pick<Entity, CesiumEntityAppearanceKey>;
|
|
41
35
|
|
|
42
|
-
type AppearancePropertyKeyType = "color" | "heightReference" | "shadows";
|
|
36
|
+
type AppearancePropertyKeyType = "color" | "heightReference" | "shadows" | "classificationType";
|
|
43
37
|
|
|
44
38
|
export function attachProperties<
|
|
45
39
|
AName extends SupportedAppearanceKey,
|
|
@@ -93,6 +87,9 @@ export function attachProperties<
|
|
|
93
87
|
break;
|
|
94
88
|
case "heightReference":
|
|
95
89
|
value = heightReference(value);
|
|
90
|
+
break;
|
|
91
|
+
case "classificationType":
|
|
92
|
+
value = classificationType(value);
|
|
96
93
|
}
|
|
97
94
|
|
|
98
95
|
if (value === (entity[propertyName] as any)[entityPropertyKey]) {
|
|
@@ -132,16 +129,14 @@ export const attachStyle = (
|
|
|
132
129
|
const point = hasAppearance(layer, entity, ["marker", "point"]);
|
|
133
130
|
const billboard = hasAppearance(layer, entity, ["marker", "billboard"]);
|
|
134
131
|
const label = hasAppearance(layer, entity, ["marker", "label"]);
|
|
135
|
-
if (point || billboard || label) {
|
|
136
|
-
const
|
|
137
|
-
const
|
|
132
|
+
if (entity.point || entity.billboard || entity.label) {
|
|
133
|
+
const coordinates = getMarkerCoordinates(entity, currentTime);
|
|
134
|
+
const geometry = getGeometryFromEntity(currentTime, entity);
|
|
135
|
+
|
|
138
136
|
const feature: Feature = {
|
|
139
137
|
type: "feature",
|
|
140
138
|
id: makeFeatureId(entity),
|
|
141
|
-
geometry
|
|
142
|
-
type: "Point",
|
|
143
|
-
coordinates,
|
|
144
|
-
},
|
|
139
|
+
geometry,
|
|
145
140
|
properties: convertEntityProperties(currentTime, entity),
|
|
146
141
|
metaData: {
|
|
147
142
|
description: convertEntityDescription(currentTime, entity),
|
|
@@ -261,21 +256,14 @@ export const attachStyle = (
|
|
|
261
256
|
return [feature, computedFeature];
|
|
262
257
|
}
|
|
263
258
|
|
|
264
|
-
if (
|
|
259
|
+
if (entity.polyline) {
|
|
265
260
|
const entityPosition = entity.position?.getValue(currentTime);
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
position?.x ?? 0,
|
|
269
|
-
position?.y ?? 0,
|
|
270
|
-
position?.z ?? 0,
|
|
271
|
-
]);
|
|
261
|
+
const geometry = getGeometryFromEntity(currentTime, entity);
|
|
262
|
+
|
|
272
263
|
const feature: Feature = {
|
|
273
264
|
type: "feature",
|
|
274
265
|
id: makeFeatureId(entity),
|
|
275
|
-
geometry
|
|
276
|
-
type: "LineString",
|
|
277
|
-
coordinates,
|
|
278
|
-
},
|
|
266
|
+
geometry,
|
|
279
267
|
properties: convertEntityProperties(currentTime, entity),
|
|
280
268
|
metaData: {
|
|
281
269
|
description: convertEntityDescription(currentTime, entity),
|
|
@@ -290,42 +278,43 @@ export const attachStyle = (
|
|
|
290
278
|
if (!computedFeature) {
|
|
291
279
|
return;
|
|
292
280
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
281
|
+
if (hasAppearance(layer, entity, ["polyline", "polyline"])) {
|
|
282
|
+
attachProperties(entity, computedFeature, ["polyline", "polyline"], {
|
|
283
|
+
show: {
|
|
284
|
+
name: "show",
|
|
285
|
+
default: true,
|
|
286
|
+
},
|
|
287
|
+
width: {
|
|
288
|
+
name: "strokeWidth",
|
|
289
|
+
},
|
|
290
|
+
material: {
|
|
291
|
+
name: "strokeColor",
|
|
292
|
+
type: "color",
|
|
293
|
+
},
|
|
294
|
+
shadows: {
|
|
295
|
+
name: "shadows",
|
|
296
|
+
type: "shadows",
|
|
297
|
+
},
|
|
298
|
+
clampToGround: {
|
|
299
|
+
name: "clampToGround",
|
|
300
|
+
},
|
|
301
|
+
classificationType: {
|
|
302
|
+
name: "classificationType",
|
|
303
|
+
type: "classificationType",
|
|
304
|
+
},
|
|
305
|
+
});
|
|
306
|
+
}
|
|
313
307
|
return [feature, computedFeature];
|
|
314
308
|
}
|
|
315
309
|
|
|
316
|
-
if (
|
|
310
|
+
if (entity.polygon) {
|
|
317
311
|
const entityPosition = entity.position?.getValue(currentTime);
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
hole.positions.map(position => [position?.x ?? 0, position?.y ?? 0, position?.z ?? 0]),
|
|
321
|
-
);
|
|
312
|
+
const geometry = getGeometryFromEntity(currentTime, entity);
|
|
313
|
+
|
|
322
314
|
const feature: Feature = {
|
|
323
315
|
type: "feature",
|
|
324
316
|
id: makeFeatureId(entity),
|
|
325
|
-
geometry
|
|
326
|
-
type: "Polygon",
|
|
327
|
-
coordinates,
|
|
328
|
-
},
|
|
317
|
+
geometry,
|
|
329
318
|
properties: convertEntityProperties(currentTime, entity),
|
|
330
319
|
metaData: {
|
|
331
320
|
description: convertEntityDescription(currentTime, entity),
|
|
@@ -340,40 +329,46 @@ export const attachStyle = (
|
|
|
340
329
|
if (!computedFeature) {
|
|
341
330
|
return;
|
|
342
331
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
332
|
+
if (hasAppearance(layer, entity, ["polygon", "polygon"])) {
|
|
333
|
+
attachProperties(entity, computedFeature, ["polygon", "polygon"], {
|
|
334
|
+
show: {
|
|
335
|
+
name: "show",
|
|
336
|
+
default: true,
|
|
337
|
+
},
|
|
338
|
+
fill: {
|
|
339
|
+
name: "fill",
|
|
340
|
+
},
|
|
341
|
+
material: {
|
|
342
|
+
name: "fillColor",
|
|
343
|
+
type: "color",
|
|
344
|
+
},
|
|
345
|
+
outline: {
|
|
346
|
+
name: "stroke",
|
|
347
|
+
},
|
|
348
|
+
outlineColor: {
|
|
349
|
+
name: "strokeColor",
|
|
350
|
+
type: "color",
|
|
351
|
+
},
|
|
352
|
+
outlineWidth: {
|
|
353
|
+
name: "strokeWidth",
|
|
354
|
+
},
|
|
355
|
+
shadows: {
|
|
356
|
+
name: "shadows",
|
|
357
|
+
type: "shadows",
|
|
358
|
+
},
|
|
359
|
+
heightReference: {
|
|
360
|
+
name: "heightReference",
|
|
361
|
+
type: "heightReference",
|
|
362
|
+
},
|
|
363
|
+
extrudedHeight: {
|
|
364
|
+
name: "extrudedHeight",
|
|
365
|
+
},
|
|
366
|
+
classificationType: {
|
|
367
|
+
name: "classificationType",
|
|
368
|
+
type: "classificationType",
|
|
369
|
+
},
|
|
370
|
+
});
|
|
371
|
+
}
|
|
377
372
|
return [feature, computedFeature];
|
|
378
373
|
}
|
|
379
374
|
};
|