@vcmap/core 6.1.11 → 6.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/build/buildShader.js +61 -0
- package/build/postinstall.js +6 -3
- package/dist/cesium.d.ts +57 -18
- package/dist/geojson.d.ts +3 -2
- package/dist/index.d.ts +244 -109
- package/dist/index.js +82 -63
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +27 -29
- package/dist/src/category/category.d.ts +3 -2
- package/dist/src/category/category.js +2 -2
- package/dist/src/category/category.js.map +1 -1
- package/dist/src/category/categoryCollection.d.ts +3 -2
- package/dist/src/category/categoryCollection.js.map +1 -1
- package/dist/src/cesium/cesium3DTileFeature.d.ts +2 -1
- package/dist/src/cesium/cesium3DTileFeature.js +2 -3
- package/dist/src/cesium/cesium3DTileFeature.js.map +1 -1
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js +6 -5
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -1
- package/dist/src/cesium/entity.js +1 -1
- package/dist/src/cesium/entity.js.map +1 -1
- package/dist/src/classRegistry.d.ts +4 -4
- package/dist/src/classRegistry.js +2 -0
- package/dist/src/classRegistry.js.map +1 -1
- package/dist/src/featureProvider/abstractFeatureProvider.d.ts +2 -1
- package/dist/src/featureProvider/abstractFeatureProvider.js +8 -2
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/wmsFeatureProvider.d.ts +38 -10
- package/dist/src/featureProvider/wmsFeatureProvider.js +69 -15
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/abstractInteraction.d.ts +5 -4
- package/dist/src/interaction/abstractInteraction.js +1 -1
- package/dist/src/interaction/abstractInteraction.js.map +1 -1
- package/dist/src/interaction/coordinateAtPixel.js +23 -0
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
- package/dist/src/interaction/eventHandler.d.ts +4 -3
- package/dist/src/interaction/eventHandler.js +1 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.d.ts +5 -0
- package/dist/src/interaction/featureAtPixelInteraction.js +7 -4
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/interaction/interactionType.js +1 -0
- package/dist/src/interaction/interactionType.js.map +1 -1
- package/dist/src/interaction/panoramaFeatureHighlight.d.ts +29 -0
- package/dist/src/interaction/panoramaFeatureHighlight.js +88 -0
- package/dist/src/interaction/panoramaFeatureHighlight.js.map +1 -0
- package/dist/src/interaction/panoramaImageSelection.d.ts +8 -0
- package/dist/src/interaction/panoramaImageSelection.js +29 -0
- package/dist/src/interaction/panoramaImageSelection.js.map +1 -0
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.d.ts +6 -5
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js +2 -2
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/cogCesiumImpl.d.ts +14 -0
- package/dist/src/layer/cesium/cogCesiumImpl.js +28 -0
- package/dist/src/layer/cesium/cogCesiumImpl.js.map +1 -0
- package/dist/src/layer/cesium/cogImageryProvider.d.ts +31 -0
- package/dist/src/layer/cesium/cogImageryProvider.js +258 -0
- package/dist/src/layer/cesium/cogImageryProvider.js.map +1 -0
- package/dist/src/layer/cesium/dataSourceCesiumImpl.d.ts +3 -2
- package/dist/src/layer/cesium/dataSourceCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/resourceHelper.js +0 -1
- package/dist/src/layer/cesium/resourceHelper.js.map +1 -1
- package/dist/src/layer/cesium/sourceVectorContextSync.d.ts +2 -2
- package/dist/src/layer/cesium/sourceVectorContextSync.js +1 -1
- package/dist/src/layer/cesium/sourceVectorContextSync.js.map +1 -1
- package/dist/src/layer/cesium/terrainCesiumImpl.d.ts +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsChildTile.d.ts +3 -2
- package/dist/src/layer/cesium/vcsTile/vcsChildTile.js +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsChildTile.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsDebugTile.d.ts +3 -2
- package/dist/src/layer/cesium/vcsTile/vcsDebugTile.js +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsDebugTile.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.d.ts +3 -2
- package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.js +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsNoDataTile.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.d.ts +6 -5
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js +4 -4
- package/dist/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsTileHelpers.d.ts +6 -5
- package/dist/src/layer/cesium/vcsTile/vcsTileHelpers.js.map +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsVectorTile.d.ts +3 -2
- package/dist/src/layer/cesium/vcsTile/vcsVectorTile.js +1 -1
- package/dist/src/layer/cesium/vcsTile/vcsVectorTile.js.map +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.js +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.d.ts +9 -8
- package/dist/src/layer/cesium/vectorContext.js +6 -5
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.d.ts +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileCesiumImpl.d.ts +3 -3
- package/dist/src/layer/cesium/vectorTileCesiumImpl.js +2 -1
- package/dist/src/layer/cesium/vectorTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.d.ts +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.js +3 -2
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
- package/dist/src/layer/cesium/wmsCesiumImpl.js +3 -2
- package/dist/src/layer/cesium/wmsCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesiumTilesetLayer.d.ts +6 -4
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
- package/dist/src/layer/cogLayer.d.ts +37 -0
- package/dist/src/layer/cogLayer.js +119 -0
- package/dist/src/layer/cogLayer.js.map +1 -0
- package/dist/src/layer/czmlLayer.js.map +1 -1
- package/dist/src/layer/dataSourceLayer.d.ts +4 -2
- package/dist/src/layer/dataSourceLayer.js +1 -1
- package/dist/src/layer/dataSourceLayer.js.map +1 -1
- package/dist/src/layer/featureLayer.d.ts +4 -2
- package/dist/src/layer/featureLayer.js.map +1 -1
- package/dist/src/layer/featureStoreFeatureVisibility.d.ts +2 -1
- package/dist/src/layer/featureStoreFeatureVisibility.js.map +1 -1
- package/dist/src/layer/featureStoreLayer.d.ts +8 -6
- package/dist/src/layer/featureStoreLayer.js +2 -2
- package/dist/src/layer/featureStoreLayer.js.map +1 -1
- package/dist/src/layer/featureStoreLayerChanges.d.ts +1 -1
- package/dist/src/layer/featureStoreLayerChanges.js.map +1 -1
- package/dist/src/layer/featureVisibility.d.ts +2 -1
- package/dist/src/layer/featureVisibility.js.map +1 -1
- package/dist/src/layer/flatGeobufHelpers.d.ts +18 -3
- package/dist/src/layer/flatGeobufHelpers.js +21 -1
- package/dist/src/layer/flatGeobufHelpers.js.map +1 -1
- package/dist/src/layer/flatGeobufLayer.d.ts +2 -1
- package/dist/src/layer/flatGeobufLayer.js.map +1 -1
- package/dist/src/layer/geojsonHelpers.d.ts +1 -1
- package/dist/src/layer/geojsonHelpers.js +8 -6
- package/dist/src/layer/geojsonHelpers.js.map +1 -1
- package/dist/src/layer/geojsonLayer.d.ts +2 -1
- package/dist/src/layer/geojsonLayer.js +3 -1
- package/dist/src/layer/geojsonLayer.js.map +1 -1
- package/dist/src/layer/globalHider.d.ts +1 -1
- package/dist/src/layer/globalHider.js.map +1 -1
- package/dist/src/layer/layer.d.ts +9 -7
- package/dist/src/layer/layer.js +1 -1
- package/dist/src/layer/layer.js.map +1 -1
- package/dist/src/layer/oblique/obliqueHelpers.js +2 -0
- package/dist/src/layer/oblique/obliqueHelpers.js.map +1 -1
- package/dist/src/layer/oblique/sourceObliqueSync.d.ts +1 -1
- package/dist/src/layer/oblique/sourceObliqueSync.js +7 -7
- package/dist/src/layer/oblique/sourceObliqueSync.js.map +1 -1
- package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +2 -2
- package/dist/src/layer/oblique/vectorObliqueImpl.js +3 -3
- package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -1
- package/dist/src/layer/openStreetMapLayer.d.ts +5 -4
- package/dist/src/layer/openStreetMapLayer.js +1 -1
- package/dist/src/layer/openStreetMapLayer.js.map +1 -1
- package/dist/src/layer/openlayers/cogOpenlayersImpl.d.ts +23 -0
- package/dist/src/layer/openlayers/cogOpenlayersImpl.js +54 -0
- package/dist/src/layer/openlayers/cogOpenlayersImpl.js.map +1 -0
- package/dist/src/layer/openlayers/layerOpenlayersImpl.d.ts +4 -2
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js +5 -4
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/loadFunctionHelpers.js +0 -1
- package/dist/src/layer/openlayers/loadFunctionHelpers.js.map +1 -1
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.d.ts +1 -1
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.js +2 -2
- package/dist/src/layer/openlayers/tileDebugOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js +1 -1
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js +1 -1
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/wmsOpenlayersImpl.d.ts +1 -1
- package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.d.ts +13 -0
- package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.js +34 -0
- package/dist/src/layer/panorama/panoramaDatasetPanoramaImpl.js.map +1 -0
- package/dist/src/layer/panorama/vectorTilePanoramaImpl.d.ts +28 -0
- package/dist/src/layer/panorama/vectorTilePanoramaImpl.js +114 -0
- package/dist/src/layer/panorama/vectorTilePanoramaImpl.js.map +1 -0
- package/dist/src/layer/panoramaDatasetLayer.d.ts +53 -0
- package/dist/src/layer/panoramaDatasetLayer.js +192 -0
- package/dist/src/layer/panoramaDatasetLayer.js.map +1 -0
- package/dist/src/layer/pointCloudLayer.d.ts +8 -5
- package/dist/src/layer/pointCloudLayer.js +1 -1
- package/dist/src/layer/pointCloudLayer.js.map +1 -1
- package/dist/src/layer/rasterLayer.d.ts +6 -4
- package/dist/src/layer/rasterLayer.js.map +1 -1
- package/dist/src/layer/singleImageLayer.d.ts +3 -2
- package/dist/src/layer/singleImageLayer.js.map +1 -1
- package/dist/src/layer/terrainHelpers.d.ts +1 -1
- package/dist/src/layer/terrainHelpers.js.map +1 -1
- package/dist/src/layer/terrainLayer.d.ts +3 -2
- package/dist/src/layer/terrainLayer.js.map +1 -1
- package/dist/src/layer/tileLoadedHelper.d.ts +2 -2
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.d.ts +7 -4
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js +10 -2
- package/dist/src/layer/tileProvider/flatGeobufTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.d.ts +3 -2
- package/dist/src/layer/tileProvider/mvtTileProvider.js +3 -3
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.d.ts +3 -2
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js +0 -1
- package/dist/src/layer/tileProvider/staticFeatureTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.d.ts +2 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js +0 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/tileProvider.d.ts +3 -2
- package/dist/src/layer/tileProvider/tileProvider.js +10 -3
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.d.ts +2 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
- package/dist/src/layer/tmsLayer.d.ts +3 -2
- package/dist/src/layer/tmsLayer.js +1 -1
- package/dist/src/layer/tmsLayer.js.map +1 -1
- package/dist/src/layer/vectorHelpers.d.ts +2 -2
- package/dist/src/layer/vectorHelpers.js +1 -1
- package/dist/src/layer/vectorHelpers.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +12 -8
- package/dist/src/layer/vectorLayer.js +1 -1
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.d.ts +3 -3
- package/dist/src/layer/vectorProperties.js +4 -0
- package/dist/src/layer/vectorProperties.js.map +1 -1
- package/dist/src/layer/vectorSymbols.d.ts +8 -0
- package/dist/src/layer/vectorSymbols.js +8 -0
- package/dist/src/layer/vectorSymbols.js.map +1 -1
- package/dist/src/layer/vectorTileLayer.d.ts +17 -10
- package/dist/src/layer/vectorTileLayer.js +8 -1
- package/dist/src/layer/vectorTileLayer.js.map +1 -1
- package/dist/src/layer/wfsLayer.d.ts +2 -1
- package/dist/src/layer/wfsLayer.js +6 -4
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/layer/wmsHelpers.js +2 -2
- package/dist/src/layer/wmsHelpers.js.map +1 -1
- package/dist/src/layer/wmsLayer.d.ts +4 -3
- package/dist/src/layer/wmsLayer.js.map +1 -1
- package/dist/src/layer/wmtsLayer.d.ts +3 -2
- package/dist/src/layer/wmtsLayer.js +1 -1
- package/dist/src/layer/wmtsLayer.js.map +1 -1
- package/dist/src/map/baseOLMap.d.ts +1 -1
- package/dist/src/map/baseOLMap.js +17 -8
- package/dist/src/map/baseOLMap.js.map +1 -1
- package/dist/src/map/cameraLimiter.d.ts +2 -1
- package/dist/src/map/cameraLimiter.js.map +1 -1
- package/dist/src/map/cesiumMap.d.ts +5 -7
- package/dist/src/map/cesiumMap.js +27 -186
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/cesiumMapHelpers.d.ts +7 -0
- package/dist/src/map/cesiumMapHelpers.js +144 -0
- package/dist/src/map/cesiumMapHelpers.js.map +1 -0
- package/dist/src/map/navigation/cameraHelper.d.ts +3 -2
- package/dist/src/map/navigation/cameraHelper.js.map +1 -1
- package/dist/src/map/navigation/cesiumNavigation.d.ts +4 -3
- package/dist/src/map/navigation/cesiumNavigation.js.map +1 -1
- package/dist/src/map/navigation/controller/controller.d.ts +1 -1
- package/dist/src/map/navigation/controller/controller.js +2 -2
- package/dist/src/map/navigation/controller/controller.js.map +1 -1
- package/dist/src/map/navigation/controller/keyboardController.d.ts +3 -2
- package/dist/src/map/navigation/controller/keyboardController.js +4 -2
- package/dist/src/map/navigation/controller/keyboardController.js.map +1 -1
- package/dist/src/map/navigation/easingHelper.d.ts +1 -1
- package/dist/src/map/navigation/easingHelper.js +1 -1
- package/dist/src/map/navigation/easingHelper.js.map +1 -1
- package/dist/src/map/navigation/navigation.d.ts +6 -6
- package/dist/src/map/navigation/navigation.js +6 -2
- package/dist/src/map/navigation/navigation.js.map +1 -1
- package/dist/src/map/navigation/navigationImpl.d.ts +2 -2
- package/dist/src/map/navigation/obliqueNavigation.d.ts +4 -3
- package/dist/src/map/navigation/obliqueNavigation.js +3 -1
- package/dist/src/map/navigation/obliqueNavigation.js.map +1 -1
- package/dist/src/map/navigation/openlayersNavigation.d.ts +4 -3
- package/dist/src/map/navigation/openlayersNavigation.js.map +1 -1
- package/dist/src/map/navigation/viewHelper.d.ts +2 -2
- package/dist/src/map/navigation/viewHelper.js +0 -1
- package/dist/src/map/navigation/viewHelper.js.map +1 -1
- package/dist/src/map/obliqueMap.d.ts +3 -3
- package/dist/src/map/obliqueMap.js +1 -1
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/panoramaMap.d.ts +98 -0
- package/dist/src/map/panoramaMap.js +298 -0
- package/dist/src/map/panoramaMap.js.map +1 -0
- package/dist/src/map/vcsMap.d.ts +3 -3
- package/dist/src/map/vcsMap.js +17 -11
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/moduleIdSymbol.js +0 -1
- package/dist/src/moduleIdSymbol.js.map +1 -1
- package/dist/src/oblique/defaultObliqueCollection.js +3 -1
- package/dist/src/oblique/defaultObliqueCollection.js.map +1 -1
- package/dist/src/oblique/helpers.d.ts +1 -1
- package/dist/src/oblique/helpers.js +1 -1
- package/dist/src/oblique/helpers.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.d.ts +3 -2
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/oblique/obliqueDataSet.d.ts +2 -1
- package/dist/src/oblique/obliqueDataSet.js.map +1 -1
- package/dist/src/oblique/obliqueImage.d.ts +1 -1
- package/dist/src/oblique/obliqueProvider.d.ts +1 -1
- package/dist/src/oblique/obliqueProvider.js.map +1 -1
- package/dist/src/oblique/obliqueView.js +1 -0
- package/dist/src/oblique/obliqueView.js.map +1 -1
- package/dist/src/oblique/parseImageJson.js +2 -3
- package/dist/src/oblique/parseImageJson.js.map +1 -1
- package/dist/src/ol/feature.js.map +1 -1
- package/dist/src/ol/geom/circle.js.map +1 -1
- package/dist/src/ol/render/canvas/canvasTileRenderer.js +0 -1
- package/dist/src/ol/render/canvas/canvasTileRenderer.js.map +1 -1
- package/dist/src/ol/source/ClusterEnhancedVectorSource.d.ts +1 -1
- package/dist/src/ol/source/VcsCluster.d.ts +3 -3
- package/dist/src/ol/source/VcsCluster.js.map +1 -1
- package/dist/src/overrideClassRegistry.d.ts +3 -3
- package/dist/src/overrideClassRegistry.js +1 -0
- package/dist/src/overrideClassRegistry.js.map +1 -1
- package/dist/src/panorama/fieldOfView.d.ts +57 -0
- package/dist/src/panorama/fieldOfView.js +135 -0
- package/dist/src/panorama/fieldOfView.js.map +1 -0
- package/dist/src/panorama/panoramaCameraController.d.ts +35 -0
- package/dist/src/panorama/panoramaCameraController.js +146 -0
- package/dist/src/panorama/panoramaCameraController.js.map +1 -0
- package/dist/src/panorama/panoramaImage.d.ts +135 -0
- package/dist/src/panorama/panoramaImage.js +269 -0
- package/dist/src/panorama/panoramaImage.js.map +1 -0
- package/dist/src/panorama/panoramaImageView.d.ts +25 -0
- package/dist/src/panorama/panoramaImageView.js +328 -0
- package/dist/src/panorama/panoramaImageView.js.map +1 -0
- package/dist/src/panorama/panoramaTile.d.ts +23 -0
- package/dist/src/panorama/panoramaTile.js +101 -0
- package/dist/src/panorama/panoramaTile.js.map +1 -0
- package/dist/src/panorama/panoramaTileCache.d.ts +16 -0
- package/dist/src/panorama/panoramaTileCache.js +34 -0
- package/dist/src/panorama/panoramaTileCache.js.map +1 -0
- package/dist/src/panorama/panoramaTileCoordinate.d.ts +56 -0
- package/dist/src/panorama/panoramaTileCoordinate.js +110 -0
- package/dist/src/panorama/panoramaTileCoordinate.js.map +1 -0
- package/dist/src/panorama/panoramaTileMaterial.d.ts +96 -0
- package/dist/src/panorama/panoramaTileMaterial.js +213 -0
- package/dist/src/panorama/panoramaTileMaterial.js.map +1 -0
- package/dist/src/panorama/panoramaTileMaterialFS.shader.d.ts +2 -0
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js +170 -0
- package/dist/src/panorama/panoramaTileMaterialFS.shader.js.map +1 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.d.ts +31 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js +113 -0
- package/dist/src/panorama/panoramaTilePrimitiveCollection.js.map +1 -0
- package/dist/src/panorama/panoramaTileProvider.d.ts +67 -0
- package/dist/src/panorama/panoramaTileProvider.js +312 -0
- package/dist/src/panorama/panoramaTileProvider.js.map +1 -0
- package/dist/src/panorama/sphericalCoordinates.d.ts +20 -0
- package/dist/src/panorama/sphericalCoordinates.js +78 -0
- package/dist/src/panorama/sphericalCoordinates.js.map +1 -0
- package/dist/src/style/arrowStyle.d.ts +1 -1
- package/dist/src/style/arrowStyle.js.map +1 -1
- package/dist/src/style/declarativeStyleItem.d.ts +1 -1
- package/dist/src/style/declarativeStyleItem.js +12 -14
- package/dist/src/style/declarativeStyleItem.js.map +1 -1
- package/dist/src/style/styleFactory.d.ts +2 -2
- package/dist/src/style/styleFactory.js +1 -2
- package/dist/src/style/styleFactory.js.map +1 -1
- package/dist/src/style/styleHelpers.d.ts +2 -2
- package/dist/src/style/styleHelpers.js +6 -6
- package/dist/src/style/styleHelpers.js.map +1 -1
- package/dist/src/style/styleItem.d.ts +4 -2
- package/dist/src/style/styleItem.js +3 -1
- package/dist/src/style/styleItem.js.map +1 -1
- package/dist/src/style/vectorStyleItem.d.ts +7 -5
- package/dist/src/style/vectorStyleItem.js +9 -19
- package/dist/src/style/vectorStyleItem.js.map +1 -1
- package/dist/src/style/writeStyle.d.ts +2 -2
- package/dist/src/style/writeStyle.js.map +1 -1
- package/dist/src/util/clipping/clippingObject.js.map +1 -1
- package/dist/src/util/clipping/clippingObjectManager.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonHelper.d.ts +2 -1
- package/dist/src/util/clipping/clippingPolygonHelper.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonObject.d.ts +4 -3
- package/dist/src/util/clipping/clippingPolygonObject.js.map +1 -1
- package/dist/src/util/clipping/clippingPolygonObjectCollection.d.ts +3 -4
- package/dist/src/util/clipping/clippingPolygonObjectCollection.js +37 -11
- package/dist/src/util/clipping/clippingPolygonObjectCollection.js.map +1 -1
- package/dist/src/util/collection.js.map +1 -1
- package/dist/src/util/createAbsoluteFeature.d.ts +4 -0
- package/dist/src/util/createAbsoluteFeature.js +98 -0
- package/dist/src/util/createAbsoluteFeature.js.map +1 -0
- package/dist/src/util/displayQuality/displayQuality.d.ts +3 -5
- package/dist/src/util/displayQuality/displayQuality.js +4 -5
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.d.ts +4 -3
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.d.ts +2 -1
- package/dist/src/util/editor/editFeaturesSession.js +3 -1
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.d.ts +3 -2
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorHelpers.d.ts +5 -4
- package/dist/src/util/editor/editorHelpers.js +4 -0
- package/dist/src/util/editor/editorHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +3 -3
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createLineStringInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/createLineStringInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/createPointInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPolygonInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/createPolygonInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.d.ts +2 -2
- package/dist/src/util/editor/interactions/creationSnapping.js +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/insertVertexInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/insertVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.d.ts +4 -4
- package/dist/src/util/editor/interactions/layerSnapping.js +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -1
- package/dist/src/util/editor/interactions/mapInteractionController.d.ts +2 -1
- package/dist/src/util/editor/interactions/mapInteractionController.js +1 -0
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/removeVertexInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/removeVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/rightClickInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/rightClickInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/segmentLengthInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/segmentLengthInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js +13 -13
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.d.ts +3 -3
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js +1 -1
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.d.ts +2 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js +1 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translateVertexInteraction.d.ts +3 -2
- package/dist/src/util/editor/interactions/translateVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.d.ts +2 -2
- package/dist/src/util/editor/interactions/translationSnapping.js +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -1
- package/dist/src/util/editor/selectFeaturesSession.d.ts +3 -2
- package/dist/src/util/editor/selectFeaturesSession.js +1 -1
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/snappingHelpers.d.ts +3 -3
- package/dist/src/util/editor/snappingHelpers.js.map +1 -1
- package/dist/src/util/editor/transformation/create2DHandlers.d.ts +2 -1
- package/dist/src/util/editor/transformation/create2DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.d.ts +3 -2
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/extrudeInteraction.d.ts +3 -2
- package/dist/src/util/editor/transformation/extrudeInteraction.js +1 -1
- package/dist/src/util/editor/transformation/extrudeInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/rotateInteraction.d.ts +4 -2
- package/dist/src/util/editor/transformation/rotateInteraction.js +1 -1
- package/dist/src/util/editor/transformation/rotateInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/scaleInteraction.d.ts +3 -2
- package/dist/src/util/editor/transformation/scaleInteraction.js +1 -1
- package/dist/src/util/editor/transformation/scaleInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.d.ts +2 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/translateInteraction.d.ts +3 -2
- package/dist/src/util/editor/transformation/translateInteraction.js +2 -2
- package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
- package/dist/src/util/exclusiveManager.d.ts +1 -1
- package/dist/src/util/exclusiveManager.js.map +1 -1
- package/dist/src/util/featureconverter/arcToCesium.d.ts +1 -1
- package/dist/src/util/featureconverter/arcToCesium.js +1 -2
- package/dist/src/util/featureconverter/arcToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/circleToCesium.d.ts +1 -1
- package/dist/src/util/featureconverter/circleToCesium.js +1 -1
- package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/clampedPrimitive.d.ts +2 -1
- package/dist/src/util/featureconverter/clampedPrimitive.js +0 -1
- package/dist/src/util/featureconverter/clampedPrimitive.js.map +1 -1
- package/dist/src/util/featureconverter/convert.d.ts +4 -3
- package/dist/src/util/featureconverter/convert.js +1 -1
- package/dist/src/util/featureconverter/convert.js.map +1 -1
- package/dist/src/util/featureconverter/extent3D.d.ts +2 -2
- package/dist/src/util/featureconverter/extent3D.js.map +1 -1
- package/dist/src/util/featureconverter/lineStringToCesium.d.ts +5 -5
- package/dist/src/util/featureconverter/lineStringToCesium.js +1 -2
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/pointHelpers.d.ts +6 -5
- package/dist/src/util/featureconverter/pointHelpers.js +2 -3
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/pointToCesium.d.ts +6 -11
- package/dist/src/util/featureconverter/pointToCesium.js +3 -20
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.d.ts +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.js +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/storeyHelpers.d.ts +2 -2
- package/dist/src/util/featureconverter/vectorGeometryFactory.d.ts +2 -2
- package/dist/src/util/featureconverter/vectorGeometryFactory.js.map +1 -1
- package/dist/src/util/featureconverter/vectorHeightInfo.d.ts +8 -2
- package/dist/src/util/featureconverter/vectorHeightInfo.js +17 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.js.map +1 -1
- package/dist/src/util/flight/flightAnchor.js +4 -3
- package/dist/src/util/flight/flightAnchor.js.map +1 -1
- package/dist/src/util/flight/flightCollection.d.ts +2 -2
- package/dist/src/util/flight/flightCollection.js.map +1 -1
- package/dist/src/util/flight/flightHelpers.d.ts +1 -1
- package/dist/src/util/flight/flightInstance.d.ts +3 -2
- package/dist/src/util/flight/flightInstance.js.map +1 -1
- package/dist/src/util/flight/flightPlayer.js +1 -1
- package/dist/src/util/flight/flightPlayer.js.map +1 -1
- package/dist/src/util/flight/flightRecorder.d.ts +10 -0
- package/dist/src/util/flight/flightRecorder.js +172 -0
- package/dist/src/util/flight/flightRecorder.js.map +1 -0
- package/dist/src/util/flight/flightVisualizer.d.ts +1 -1
- package/dist/src/util/flight/flightVisualizer.js.map +1 -1
- package/dist/src/util/geometryHelpers.d.ts +3 -5
- package/dist/src/util/geometryHelpers.js +0 -91
- package/dist/src/util/geometryHelpers.js.map +1 -1
- package/dist/src/util/hiddenObjects.d.ts +2 -2
- package/dist/src/util/hiddenObjects.js +0 -1
- package/dist/src/util/hiddenObjects.js.map +1 -1
- package/dist/src/util/indexedCollection.js.map +1 -1
- package/dist/src/util/isMobile.js +3 -2
- package/dist/src/util/isMobile.js.map +1 -1
- package/dist/src/util/layerCollection.d.ts +6 -1
- package/dist/src/util/layerCollection.js +5 -1
- package/dist/src/util/layerCollection.js.map +1 -1
- package/dist/src/util/locale.js +0 -1
- package/dist/src/util/locale.js.map +1 -1
- package/dist/src/util/mapCollection.d.ts +9 -4
- package/dist/src/util/mapCollection.js +67 -34
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/math.d.ts +4 -1
- package/dist/src/util/math.js +20 -1
- package/dist/src/util/math.js.map +1 -1
- package/dist/src/util/overrideCollection.d.ts +1 -1
- package/dist/src/util/overrideCollection.js +3 -1
- package/dist/src/util/overrideCollection.js.map +1 -1
- package/dist/src/util/projection.d.ts +1 -1
- package/dist/src/util/projection.js +2 -2
- package/dist/src/util/projection.js.map +1 -1
- package/dist/src/util/renderScreenshot.d.ts +1 -1
- package/dist/src/util/rotation.d.ts +4 -3
- package/dist/src/util/rotation.js +1 -1
- package/dist/src/util/rotation.js.map +1 -1
- package/dist/src/util/urlHelpers.js +0 -1
- package/dist/src/util/urlHelpers.js.map +1 -1
- package/dist/src/util/vcsTemplate.js +2 -4
- package/dist/src/util/vcsTemplate.js.map +1 -1
- package/dist/src/util/viewpoint.d.ts +6 -2
- package/dist/src/util/viewpoint.js +11 -1
- package/dist/src/util/viewpoint.js.map +1 -1
- package/dist/src/vcsApp.d.ts +7 -6
- package/dist/src/vcsApp.js +20 -14
- package/dist/src/vcsApp.js.map +1 -1
- package/dist/src/vcsEvent.js.map +1 -1
- package/dist/src/vcsModuleHelpers.js +3 -3
- package/dist/src/vcsModuleHelpers.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterCesiumContext.d.ts +4 -4
- package/dist/src/vectorCluster/vectorClusterCesiumContext.js +1 -1
- package/dist/src/vectorCluster/vectorClusterCesiumContext.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroup.d.ts +9 -6
- package/dist/src/vectorCluster/vectorClusterGroup.js +17 -5
- package/dist/src/vectorCluster/vectorClusterGroup.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.d.ts +2 -2
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.js +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupCesiumImpl.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupCollection.d.ts +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupImpl.d.ts +5 -5
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.d.ts +2 -2
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.js +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupObliqueImpl.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterGroupOpenlayersImpl.d.ts +2 -2
- package/dist/src/vectorCluster/vectorClusterStyleItem.d.ts +4 -3
- package/dist/src/vectorCluster/vectorClusterStyleItem.js.map +1 -1
- package/dist/src/vectorCluster/vectorClusterSymbols.js +0 -1
- package/dist/src/vectorCluster/vectorClusterSymbols.js.map +1 -1
- package/dist/src/workers/panoramaImageWorker.d.ts +1 -0
- package/dist/src/workers/panoramaImageWorker.js +34 -0
- package/dist/src/workers/panoramaImageWorker.js.map +1 -0
- package/dist/tests/data/cog/test_grey_world.tif +0 -0
- package/dist/tests/data/cog/test_rgb.tif +0 -0
- package/dist/tests/data/cog/test_rgb_world.tif +0 -0
- package/dist/tests/data/panorama/badOrientation.tif +0 -0
- package/dist/tests/data/panorama/badPosition.tif +0 -0
- package/dist/tests/data/panorama/lowOverview.tif +0 -0
- package/dist/tests/data/panorama/noVersionDepth.tif +0 -0
- package/dist/tests/data/panorama/noVersionRgb.tif +0 -0
- package/dist/tests/data/panorama/testDepthGeotiff.tif +0 -0
- package/dist/tests/data/panorama/testRgbGeotiff.tif +0 -0
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +6 -2
- package/dist/tests/unit/helpers/cesiumHelpers.js +15 -6
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/flatGeobufHelpers.d.ts +2 -0
- package/dist/tests/unit/helpers/flatGeobufHelpers.js +13 -0
- package/dist/tests/unit/helpers/flatGeobufHelpers.js.map +1 -0
- package/dist/tests/unit/helpers/helpers.d.ts +4 -0
- package/dist/tests/unit/helpers/helpers.js +26 -1
- package/dist/tests/unit/helpers/helpers.js.map +1 -1
- package/dist/tests/unit/helpers/panoramaHelpers.d.ts +30 -0
- package/dist/tests/unit/helpers/panoramaHelpers.js +76 -0
- package/dist/tests/unit/helpers/panoramaHelpers.js.map +1 -0
- package/index.ts +325 -279
- package/package.json +17 -49
- package/src/category/category.ts +9 -6
- package/src/category/categoryCollection.ts +4 -3
- package/src/cesium/cesium.d.ts +57 -18
- package/src/cesium/cesium3DTileFeature.ts +6 -7
- package/src/cesium/cesiumVcsCameraPrimitive.ts +6 -5
- package/src/cesium/entity.ts +1 -1
- package/src/classRegistry.ts +19 -18
- package/src/featureProvider/abstractFeatureProvider.ts +8 -4
- package/src/featureProvider/wmsFeatureProvider.ts +97 -23
- package/src/global.d.ts +6 -1
- package/src/interaction/abstractInteraction.ts +5 -5
- package/src/interaction/coordinateAtPixel.ts +37 -0
- package/src/interaction/eventHandler.ts +6 -8
- package/src/interaction/featureAtPixelInteraction.ts +24 -13
- package/src/interaction/featureProviderInteraction.ts +6 -7
- package/src/interaction/interactionType.ts +1 -0
- package/src/interaction/panoramaFeatureHighlight.ts +109 -0
- package/src/interaction/panoramaImageSelection.ts +37 -0
- package/src/layer/cesium/cesiumTilesetCesiumImpl.ts +14 -10
- package/src/layer/cesium/cogCesiumImpl.ts +36 -0
- package/src/layer/cesium/cogImageryProvider.ts +389 -0
- package/src/layer/cesium/dataSourceCesiumImpl.ts +8 -6
- package/src/layer/cesium/resourceHelper.ts +0 -1
- package/src/layer/cesium/sourceVectorContextSync.ts +4 -4
- package/src/layer/cesium/terrainCesiumImpl.ts +1 -1
- package/src/layer/cesium/vcsTile/vcsChildTile.ts +3 -3
- package/src/layer/cesium/vcsTile/vcsDebugTile.ts +5 -10
- package/src/layer/cesium/vcsTile/vcsNoDataTile.ts +3 -3
- package/src/layer/cesium/vcsTile/vcsQuadtreeTileProvider.ts +19 -17
- package/src/layer/cesium/vcsTile/vcsTileHelpers.ts +10 -8
- package/src/layer/cesium/vcsTile/vcsVectorTile.ts +7 -11
- package/src/layer/cesium/vectorCesiumImpl.ts +2 -4
- package/src/layer/cesium/vectorContext.ts +32 -25
- package/src/layer/cesium/vectorRasterTileCesiumImpl.ts +2 -2
- package/src/layer/cesium/vectorTileCesiumImpl.ts +5 -7
- package/src/layer/cesium/vectorTileImageryProvider.ts +4 -4
- package/src/layer/cesium/wmsCesiumImpl.ts +3 -2
- package/src/layer/cesiumTilesetLayer.ts +6 -8
- package/src/layer/cogLayer.ts +162 -0
- package/src/layer/czmlLayer.ts +2 -2
- package/src/layer/dataSourceLayer.ts +4 -6
- package/src/layer/featureLayer.ts +6 -4
- package/src/layer/featureStoreFeatureVisibility.ts +2 -1
- package/src/layer/featureStoreLayer.ts +18 -14
- package/src/layer/featureStoreLayerChanges.ts +7 -7
- package/src/layer/featureVisibility.ts +3 -2
- package/src/layer/flatGeobufHelpers.ts +46 -6
- package/src/layer/flatGeobufLayer.ts +2 -1
- package/src/layer/geojsonHelpers.ts +11 -8
- package/src/layer/geojsonLayer.ts +8 -5
- package/src/layer/globalHider.ts +5 -3
- package/src/layer/layer.ts +14 -14
- package/src/layer/oblique/obliqueHelpers.ts +2 -0
- package/src/layer/oblique/sourceObliqueSync.ts +9 -9
- package/src/layer/oblique/vectorObliqueImpl.ts +6 -8
- package/src/layer/openStreetMapLayer.ts +7 -8
- package/src/layer/openlayers/cogOpenlayersImpl.ts +75 -0
- package/src/layer/openlayers/layerOpenlayersImpl.ts +9 -7
- package/src/layer/openlayers/loadFunctionHelpers.ts +0 -1
- package/src/layer/openlayers/tileDebugOpenlayersImpl.ts +3 -3
- package/src/layer/openlayers/vectorOpenlayersImpl.ts +1 -1
- package/src/layer/openlayers/vectorTileOpenlayersImpl.ts +3 -3
- package/src/layer/openlayers/wmsOpenlayersImpl.ts +1 -1
- package/src/layer/panorama/panoramaDatasetPanoramaImpl.ts +49 -0
- package/src/layer/panorama/vectorTilePanoramaImpl.ts +163 -0
- package/src/layer/panoramaDatasetLayer.ts +272 -0
- package/src/layer/pointCloudLayer.ts +9 -12
- package/src/layer/rasterLayer.ts +6 -5
- package/src/layer/singleImageLayer.ts +3 -2
- package/src/layer/terrainHelpers.ts +2 -1
- package/src/layer/terrainLayer.ts +3 -2
- package/src/layer/tileLoadedHelper.ts +2 -2
- package/src/layer/tileProvider/flatGeobufTileProvider.ts +22 -10
- package/src/layer/tileProvider/mvtTileProvider.ts +4 -6
- package/src/layer/tileProvider/staticFeatureTileProvider.ts +3 -3
- package/src/layer/tileProvider/staticGeojsonTileProvider.ts +2 -2
- package/src/layer/tileProvider/tileProvider.ts +15 -10
- package/src/layer/tileProvider/urlTemplateTileProvider.ts +2 -1
- package/src/layer/tmsLayer.ts +3 -3
- package/src/layer/vectorHelpers.ts +3 -4
- package/src/layer/vectorLayer.ts +14 -15
- package/src/layer/vectorProperties.ts +27 -16
- package/src/layer/vectorSymbols.ts +10 -0
- package/src/layer/vectorTileLayer.ts +39 -29
- package/src/layer/wfsLayer.ts +10 -7
- package/src/layer/wmsHelpers.ts +2 -2
- package/src/layer/wmsLayer.ts +5 -5
- package/src/layer/wmtsLayer.ts +3 -3
- package/src/map/baseOLMap.ts +18 -9
- package/src/map/cameraLimiter.ts +1 -1
- package/src/map/cesiumMap.ts +49 -265
- package/src/map/cesiumMapHelpers.ts +219 -0
- package/src/map/navigation/cameraHelper.ts +2 -3
- package/src/map/navigation/cesiumNavigation.ts +5 -4
- package/src/map/navigation/controller/controller.ts +3 -6
- package/src/map/navigation/controller/keyboardController.ts +7 -7
- package/src/map/navigation/easingHelper.ts +2 -5
- package/src/map/navigation/navigation.ts +18 -14
- package/src/map/navigation/navigationImpl.ts +2 -2
- package/src/map/navigation/obliqueNavigation.ts +7 -6
- package/src/map/navigation/openlayersNavigation.ts +4 -3
- package/src/map/navigation/viewHelper.ts +2 -3
- package/src/map/obliqueMap.ts +7 -9
- package/src/map/panoramaMap.ts +415 -0
- package/src/map/vcsMap.ts +19 -16
- package/src/moduleIdSymbol.ts +0 -1
- package/src/oblique/defaultObliqueCollection.ts +1 -0
- package/src/oblique/helpers.ts +2 -4
- package/src/oblique/obliqueCollection.ts +7 -7
- package/src/oblique/obliqueDataSet.ts +7 -6
- package/src/oblique/obliqueImage.ts +1 -1
- package/src/oblique/obliqueProvider.ts +3 -3
- package/src/oblique/obliqueView.ts +1 -0
- package/src/oblique/parseImageJson.ts +11 -12
- package/src/ol/feature.ts +1 -0
- package/src/ol/geojson.d.ts +3 -2
- package/src/ol/geom/circle.ts +1 -1
- package/src/ol/ol.d.ts +27 -29
- package/src/ol/render/canvas/canvasTileRenderer.js +0 -1
- package/src/ol/source/ClusterEnhancedVectorSource.ts +1 -1
- package/src/ol/source/VcsCluster.ts +4 -4
- package/src/overrideClassRegistry.ts +14 -10
- package/src/panorama/fieldOfView.ts +254 -0
- package/src/panorama/panoramaCameraController.ts +206 -0
- package/src/panorama/panoramaImage.ts +531 -0
- package/src/panorama/panoramaImageView.ts +445 -0
- package/src/panorama/panoramaTile.ts +154 -0
- package/src/panorama/panoramaTileCache.ts +40 -0
- package/src/panorama/panoramaTileCoordinate.ts +166 -0
- package/src/panorama/panoramaTileMaterial.ts +309 -0
- package/src/panorama/panoramaTileMaterialFS.glsl +165 -0
- package/src/panorama/panoramaTilePrimitiveCollection.ts +158 -0
- package/src/panorama/panoramaTileProvider.ts +533 -0
- package/src/panorama/sphericalCoordinates.ts +96 -0
- package/src/style/arrowStyle.ts +1 -1
- package/src/style/declarativeStyleItem.ts +19 -19
- package/src/style/styleFactory.ts +6 -7
- package/src/style/styleHelpers.ts +9 -9
- package/src/style/styleItem.ts +8 -3
- package/src/style/vectorStyleItem.ts +24 -30
- package/src/style/writeStyle.ts +3 -2
- package/src/util/clipping/clippingObject.ts +2 -3
- package/src/util/clipping/clippingObjectManager.ts +3 -3
- package/src/util/clipping/clippingPolygonHelper.ts +1 -2
- package/src/util/clipping/clippingPolygonObject.ts +4 -3
- package/src/util/clipping/clippingPolygonObjectCollection.ts +43 -27
- package/src/util/collection.ts +1 -1
- package/src/util/createAbsoluteFeature.ts +155 -0
- package/src/util/displayQuality/displayQuality.ts +7 -8
- package/src/util/editor/createFeatureSession.ts +12 -12
- package/src/util/editor/editFeaturesSession.ts +6 -4
- package/src/util/editor/editGeometrySession.ts +4 -3
- package/src/util/editor/editorHelpers.ts +14 -12
- package/src/util/editor/editorSessionHelpers.ts +13 -12
- package/src/util/editor/interactions/createCircleInteraction.ts +2 -3
- package/src/util/editor/interactions/createLineStringInteraction.ts +3 -4
- package/src/util/editor/interactions/createPointInteraction.ts +3 -4
- package/src/util/editor/interactions/createPolygonInteraction.ts +3 -4
- package/src/util/editor/interactions/creationSnapping.ts +4 -7
- package/src/util/editor/interactions/editFeaturesMouseOverInteraction.ts +2 -3
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.ts +4 -4
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.ts +2 -3
- package/src/util/editor/interactions/insertVertexInteraction.ts +3 -4
- package/src/util/editor/interactions/layerSnapping.ts +6 -8
- package/src/util/editor/interactions/mapInteractionController.ts +5 -3
- package/src/util/editor/interactions/removeVertexInteraction.ts +4 -4
- package/src/util/editor/interactions/rightClickInteraction.ts +2 -3
- package/src/util/editor/interactions/segmentLengthInteraction.ts +2 -3
- package/src/util/editor/interactions/selectFeatureMouseOverInteraction.ts +15 -14
- package/src/util/editor/interactions/selectMultiFeatureInteraction.ts +9 -9
- package/src/util/editor/interactions/selectSingleFeatureInteraction.ts +5 -7
- package/src/util/editor/interactions/translateVertexInteraction.ts +4 -4
- package/src/util/editor/interactions/translationSnapping.ts +4 -7
- package/src/util/editor/selectFeaturesSession.ts +5 -8
- package/src/util/editor/snappingHelpers.ts +21 -20
- package/src/util/editor/transformation/create2DHandlers.ts +1 -1
- package/src/util/editor/transformation/create3DHandlers.ts +3 -3
- package/src/util/editor/transformation/extrudeInteraction.ts +5 -5
- package/src/util/editor/transformation/rotateInteraction.ts +7 -6
- package/src/util/editor/transformation/scaleInteraction.ts +7 -6
- package/src/util/editor/transformation/transformationHandler.ts +3 -3
- package/src/util/editor/transformation/translateInteraction.ts +7 -11
- package/src/util/exclusiveManager.ts +1 -1
- package/src/util/featureconverter/arcToCesium.ts +4 -6
- package/src/util/featureconverter/circleToCesium.ts +3 -5
- package/src/util/featureconverter/clampedPrimitive.ts +6 -5
- package/src/util/featureconverter/convert.ts +22 -24
- package/src/util/featureconverter/extent3D.ts +3 -3
- package/src/util/featureconverter/lineStringToCesium.ts +7 -7
- package/src/util/featureconverter/pointHelpers.ts +10 -11
- package/src/util/featureconverter/pointToCesium.ts +18 -44
- package/src/util/featureconverter/polygonToCesium.ts +3 -5
- package/src/util/featureconverter/storeyHelpers.ts +2 -2
- package/src/util/featureconverter/vectorGeometryFactory.ts +41 -39
- package/src/util/featureconverter/vectorHeightInfo.ts +60 -30
- package/src/util/flight/flightAnchor.ts +4 -3
- package/src/util/flight/flightCollection.ts +3 -2
- package/src/util/flight/flightHelpers.ts +1 -1
- package/src/util/flight/flightInstance.ts +7 -4
- package/src/util/flight/flightPlayer.ts +2 -2
- package/src/util/flight/flightRecorder.ts +234 -0
- package/src/util/flight/flightVisualizer.ts +2 -2
- package/src/util/geometryHelpers.ts +3 -135
- package/src/util/hiddenObjects.ts +3 -4
- package/src/util/indexedCollection.ts +1 -1
- package/src/util/isMobile.ts +2 -1
- package/src/util/layerCollection.ts +7 -2
- package/src/util/locale.ts +0 -1
- package/src/util/mapCollection.ts +104 -47
- package/src/util/math.ts +34 -0
- package/src/util/overrideCollection.ts +4 -5
- package/src/util/projection.ts +3 -7
- package/src/util/renderScreenshot.ts +2 -2
- package/src/util/rotation.ts +3 -4
- package/src/util/urlHelpers.ts +0 -1
- package/src/util/vcsTemplate.ts +6 -5
- package/src/util/viewpoint.ts +20 -3
- package/src/vcsApp.ts +42 -42
- package/src/vcsEvent.ts +1 -1
- package/src/vcsModuleHelpers.ts +4 -3
- package/src/vectorCluster/vectorClusterCesiumContext.ts +8 -9
- package/src/vectorCluster/vectorClusterGroup.ts +26 -16
- package/src/vectorCluster/vectorClusterGroupCesiumImpl.ts +10 -10
- package/src/vectorCluster/vectorClusterGroupCollection.ts +1 -1
- package/src/vectorCluster/vectorClusterGroupImpl.ts +5 -5
- package/src/vectorCluster/vectorClusterGroupObliqueImpl.ts +4 -6
- package/src/vectorCluster/vectorClusterGroupOpenlayersImpl.ts +2 -2
- package/src/vectorCluster/vectorClusterStyleItem.ts +5 -3
- package/src/vectorCluster/vectorClusterSymbols.ts +0 -1
- package/src/workers/panoramaImageWorker.ts +50 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Primitive, type Matrix4 } from '@vcmap-cesium/engine';
|
|
2
|
+
import type { Size } from 'ol/size.js';
|
|
3
|
+
import PanoramaTileMaterial from './panoramaTileMaterial.js';
|
|
4
|
+
import type { PanoramaTileCoordinate } from './panoramaTileCoordinate.js';
|
|
5
|
+
import type PanoramaMap from '../map/panoramaMap.js';
|
|
6
|
+
import type { PanoramaResourceData, PanoramaResourceType } from './panoramaTileProvider.js';
|
|
7
|
+
export type PanoramaTile = {
|
|
8
|
+
hasResource(type: PanoramaResourceType): boolean;
|
|
9
|
+
setResource<T extends PanoramaResourceType>(type: T, resource: PanoramaResourceData<T>): void;
|
|
10
|
+
getDepthAtPixel(x: number, y: number): number | undefined;
|
|
11
|
+
readonly tileCoordinate: PanoramaTileCoordinate;
|
|
12
|
+
getPrimitive(map: PanoramaMap): Primitive;
|
|
13
|
+
getMaterial(map: PanoramaMap): PanoramaTileMaterial | undefined;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Creates a panorama tile primitive with the given tile coordinate and image. Typically only called
|
|
18
|
+
* by the PanoramaTileProvider when creating tiles.
|
|
19
|
+
* @param tileCoordinate
|
|
20
|
+
* @param modelMatrix
|
|
21
|
+
* @param tileSize
|
|
22
|
+
*/
|
|
23
|
+
export declare function createPanoramaTile(tileCoordinate: PanoramaTileCoordinate, modelMatrix: Matrix4, tileSize: Size): PanoramaTile;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Cartesian3, EllipsoidGeometry, GeometryInstance, MaterialAppearance, Primitive, VertexFormat, } from '@vcmap-cesium/engine';
|
|
2
|
+
import PanoramaTileMaterial from './panoramaTileMaterial.js';
|
|
3
|
+
import { tileSizeInRadians } from './panoramaTileCoordinate.js';
|
|
4
|
+
function createPanoramaTilePrimitive({ x, y, level }, modelMatrix, material) {
|
|
5
|
+
const sizeR = tileSizeInRadians(level);
|
|
6
|
+
const heading = x * sizeR;
|
|
7
|
+
const tilt = y * sizeR;
|
|
8
|
+
return new Primitive({
|
|
9
|
+
geometryInstances: [
|
|
10
|
+
new GeometryInstance({
|
|
11
|
+
geometry: new EllipsoidGeometry({
|
|
12
|
+
vertexFormat: VertexFormat.POSITION_AND_ST,
|
|
13
|
+
radii: new Cartesian3(1, 1, 1),
|
|
14
|
+
minimumClock: heading,
|
|
15
|
+
maximumClock: heading + sizeR,
|
|
16
|
+
minimumCone: tilt,
|
|
17
|
+
maximumCone: tilt + sizeR,
|
|
18
|
+
stackPartitions: (level + 1) * 64,
|
|
19
|
+
slicePartitions: (level + 1) * 64,
|
|
20
|
+
}),
|
|
21
|
+
}),
|
|
22
|
+
],
|
|
23
|
+
appearance: new MaterialAppearance({
|
|
24
|
+
material,
|
|
25
|
+
closed: false,
|
|
26
|
+
flat: true,
|
|
27
|
+
}),
|
|
28
|
+
modelMatrix,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates a panorama tile primitive with the given tile coordinate and image. Typically only called
|
|
33
|
+
* by the PanoramaTileProvider when creating tiles.
|
|
34
|
+
* @param tileCoordinate
|
|
35
|
+
* @param modelMatrix
|
|
36
|
+
* @param tileSize
|
|
37
|
+
*/
|
|
38
|
+
export function createPanoramaTile(tileCoordinate, modelMatrix, tileSize) {
|
|
39
|
+
let destroyed = false;
|
|
40
|
+
const primitives = new Map();
|
|
41
|
+
let resources = {};
|
|
42
|
+
return {
|
|
43
|
+
get tileCoordinate() {
|
|
44
|
+
return tileCoordinate;
|
|
45
|
+
},
|
|
46
|
+
hasResource(type) {
|
|
47
|
+
return resources[type] != null;
|
|
48
|
+
},
|
|
49
|
+
setResource(type, resource) {
|
|
50
|
+
if (this.hasResource(type)) {
|
|
51
|
+
throw new Error(`Resource of type "${type}" already set for this tile. Cannot overwrite.`);
|
|
52
|
+
}
|
|
53
|
+
resources[type] = resource;
|
|
54
|
+
primitives.forEach(({ material }) => {
|
|
55
|
+
material.setTexture(type, resource);
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
getPrimitive(map) {
|
|
59
|
+
if (destroyed) {
|
|
60
|
+
throw new Error('Cannot get primitive from destroyed panorama tile.');
|
|
61
|
+
}
|
|
62
|
+
if (primitives.has(map)) {
|
|
63
|
+
return primitives.get(map).primitive;
|
|
64
|
+
}
|
|
65
|
+
const material = new PanoramaTileMaterial(tileCoordinate, tileSize);
|
|
66
|
+
Object.entries(resources).forEach(([type, resource]) => {
|
|
67
|
+
material.setTexture(type, resource);
|
|
68
|
+
});
|
|
69
|
+
const primitive = createPanoramaTilePrimitive(tileCoordinate, modelMatrix, material);
|
|
70
|
+
primitives.set(map, { primitive, material });
|
|
71
|
+
return primitive;
|
|
72
|
+
},
|
|
73
|
+
getMaterial(map) {
|
|
74
|
+
if (primitives.has(map)) {
|
|
75
|
+
return primitives.get(map).material;
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* Returns the normalized depth value [0, 1] at the given pixel coordinates in the panorama tile.
|
|
81
|
+
* @param x
|
|
82
|
+
* @param y
|
|
83
|
+
*/
|
|
84
|
+
getDepthAtPixel(x, y) {
|
|
85
|
+
if (!resources.depth) {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
const index = y * tileSize[0] + x;
|
|
89
|
+
return resources.depth[index];
|
|
90
|
+
},
|
|
91
|
+
destroy() {
|
|
92
|
+
destroyed = true;
|
|
93
|
+
resources = {};
|
|
94
|
+
primitives.forEach(({ primitive, material }) => {
|
|
95
|
+
primitive.destroy();
|
|
96
|
+
material.destroy();
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=panoramaTile.js.map
|
|
@@ -0,0 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AAC,CAAC;YAC9D,CAAC,CAAC,CAAC;YACH,MAAM,SAAS,GAAG,2BAA2B,CAC3C,cAAc,EACd,WAAW,EACX,QAAQ,CACT,CAAC;YACF,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;YAC7C,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,WAAW,CAAC,GAAgB;YAC1B,IAAI,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACxB,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC,QAAQ,CAAC;YACvC,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD;;;;WAIG;QACH,eAAe,CAAC,CAAS,EAAE,CAAS;YAClC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;gBACrB,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,MAAM,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAClC,OAAO,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;QACD,OAAO;YACL,SAAS,GAAG,IAAI,CAAC;YACjB,SAAS,GAAG,EAAE,CAAC;YACf,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;gBAC7C,SAAS,CAAC,OAAO,EAAE,CAAC;gBACpB,QAAQ,CAAC,OAAO,EAAE,CAAC;YACrB,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import LRUCache from 'ol/structs/LRUCache.js';
|
|
2
|
+
import type { PanoramaTile } from './panoramaTile.js';
|
|
3
|
+
/**
|
|
4
|
+
* A specialized LRU cache
|
|
5
|
+
*/
|
|
6
|
+
export declare class PanoramaTileCache extends LRUCache<PanoramaTile> {
|
|
7
|
+
deleteOldest(): void;
|
|
8
|
+
expireCache(usedTiles?: Record<string, boolean>): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* convenience function to cache a tile and cleanup all the non-visible tiles
|
|
12
|
+
* @param tile
|
|
13
|
+
* @param cache
|
|
14
|
+
* @param currentlyVisibleTileKeys
|
|
15
|
+
*/
|
|
16
|
+
export declare function addTileToCache(tile: PanoramaTile, cache: PanoramaTileCache, currentlyVisibleTileKeys: Record<string, boolean>): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import LRUCache from 'ol/structs/LRUCache.js';
|
|
2
|
+
/**
|
|
3
|
+
* A specialized LRU cache
|
|
4
|
+
*/
|
|
5
|
+
export class PanoramaTileCache extends LRUCache {
|
|
6
|
+
deleteOldest() {
|
|
7
|
+
const entry = this.pop();
|
|
8
|
+
if (entry) {
|
|
9
|
+
entry.destroy();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
expireCache(usedTiles = {}) {
|
|
13
|
+
while (this.canExpireCache()) {
|
|
14
|
+
const tile = this.peekLast();
|
|
15
|
+
if (usedTiles[tile.tileCoordinate.key]) {
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
this.pop().destroy();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* convenience function to cache a tile and cleanup all the non-visible tiles
|
|
26
|
+
* @param tile
|
|
27
|
+
* @param cache
|
|
28
|
+
* @param currentlyVisibleTileKeys
|
|
29
|
+
*/
|
|
30
|
+
export function addTileToCache(tile, cache, currentlyVisibleTileKeys) {
|
|
31
|
+
cache.set(tile.tileCoordinate.key, tile);
|
|
32
|
+
cache.expireCache(currentlyVisibleTileKeys);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=panoramaTileCache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panoramaTileCache.js","sourceRoot":"","sources":["../../../src/panorama/panoramaTileCache.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAG9C;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,QAAsB;IAC3D,YAAY;QACV,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;IACH,CAAC;IAED,WAAW,CAAC,YAAqC,EAAE;QACjD,OAAO,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;YAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC7B,IAAI,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvC,MAAM;YACR,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAkB,EAClB,KAAwB,EACxB,wBAAiD;IAEjD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACzC,KAAK,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Extent } from 'ol/extent.js';
|
|
2
|
+
import type { Size } from 'ol/size.js';
|
|
3
|
+
/**
|
|
4
|
+
* Tile coordinate in format [x, y, level]
|
|
5
|
+
*/
|
|
6
|
+
export type PanoramaTileCoordinate = {
|
|
7
|
+
readonly x: number;
|
|
8
|
+
readonly y: number;
|
|
9
|
+
readonly level: number;
|
|
10
|
+
readonly key: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Calculates the number of tiles in the given level.
|
|
14
|
+
* @param level
|
|
15
|
+
*/
|
|
16
|
+
export declare function getNumberOfTiles(level: number): Size;
|
|
17
|
+
export declare function createTileCoordinate(x: number, y: number, level: number): PanoramaTileCoordinate;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a tile coordinate from a the key string of a tile coordinate.
|
|
20
|
+
* The key is semantic and has the following structure: `level/x/y`
|
|
21
|
+
* @param key
|
|
22
|
+
*/
|
|
23
|
+
export declare function createTileCoordinateFromKey(key: string): PanoramaTileCoordinate;
|
|
24
|
+
/**
|
|
25
|
+
* Calculates the tile size in radians for the given level.
|
|
26
|
+
* @param level
|
|
27
|
+
*/
|
|
28
|
+
export declare function tileSizeInRadians(level: number): number;
|
|
29
|
+
/**
|
|
30
|
+
* Calculates the tile coordinates from the given image spherical coordinate & level.
|
|
31
|
+
* @param spherical
|
|
32
|
+
* @param level
|
|
33
|
+
*/
|
|
34
|
+
export declare function tileCoordinateFromImageCoordinate(spherical: [number, number], level: number): PanoramaTileCoordinate;
|
|
35
|
+
/**
|
|
36
|
+
* Get the tile coordinates of all tiles which intersect the given extent of image coordinates for the given level.
|
|
37
|
+
* @param extent
|
|
38
|
+
* @param level
|
|
39
|
+
*/
|
|
40
|
+
export declare function getTileCoordinatesInImageExtent(extent: Extent, level: number): PanoramaTileCoordinate[];
|
|
41
|
+
/**
|
|
42
|
+
* Gets the center point of a tile in image spherical coordinates.
|
|
43
|
+
* @param tileCoordinate
|
|
44
|
+
*/
|
|
45
|
+
export declare function getTileSphericalCenter(tileCoordinate: PanoramaTileCoordinate): [number, number];
|
|
46
|
+
/**
|
|
47
|
+
* Gets the extent of a tile in image spherical coordinates.
|
|
48
|
+
* @param tileCoordinate
|
|
49
|
+
*/
|
|
50
|
+
export declare function getTileSphericalExtent(tileCoordinate: PanoramaTileCoordinate): [number, number, number, number];
|
|
51
|
+
/**
|
|
52
|
+
* @param tileCoordinate - the tile coordinate to calculate the distance to
|
|
53
|
+
* @param position - the image spherical position to calculate the distance from
|
|
54
|
+
* @returns the distance in radians. this is only used for relative comparisons.
|
|
55
|
+
*/
|
|
56
|
+
export declare function getDistanceToTileCoordinate(position: [number, number], tileCoordinate: PanoramaTileCoordinate): number;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Math as CesiumMath } from '@vcmap-cesium/engine';
|
|
2
|
+
import { cartesian2DDistance } from '../util/math.js';
|
|
3
|
+
/**
|
|
4
|
+
* Calculates the number of tiles in the given level.
|
|
5
|
+
* @param level
|
|
6
|
+
*/
|
|
7
|
+
export function getNumberOfTiles(level) {
|
|
8
|
+
const maxX = 2 ** level * 2;
|
|
9
|
+
const maxY = 2 ** level;
|
|
10
|
+
return [maxX, maxY];
|
|
11
|
+
}
|
|
12
|
+
export function createTileCoordinate(x, y, level) {
|
|
13
|
+
return {
|
|
14
|
+
x,
|
|
15
|
+
y,
|
|
16
|
+
level,
|
|
17
|
+
key: `${level}/${x}/${y}`,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Creates a tile coordinate from a the key string of a tile coordinate.
|
|
22
|
+
* The key is semantic and has the following structure: `level/x/y`
|
|
23
|
+
* @param key
|
|
24
|
+
*/
|
|
25
|
+
export function createTileCoordinateFromKey(key) {
|
|
26
|
+
const keys = key.split('/').map(Number).filter(Number.isFinite);
|
|
27
|
+
if (keys.length === 3) {
|
|
28
|
+
return createTileCoordinate(keys[1], keys[2], keys[0]);
|
|
29
|
+
}
|
|
30
|
+
throw new Error(`Provided key "${key}" is not a valid tile coordinate key`);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Calculates the tile size in radians for the given level.
|
|
34
|
+
* @param level
|
|
35
|
+
*/
|
|
36
|
+
export function tileSizeInRadians(level) {
|
|
37
|
+
return CesiumMath.PI / 2 ** level;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Calculates the tile coordinates from the given image spherical coordinate & level.
|
|
41
|
+
* @param spherical
|
|
42
|
+
* @param level
|
|
43
|
+
*/
|
|
44
|
+
export function tileCoordinateFromImageCoordinate(spherical, level) {
|
|
45
|
+
const tileSize = tileSizeInRadians(level);
|
|
46
|
+
const [numTilesX] = getNumberOfTiles(level);
|
|
47
|
+
let tileX = numTilesX - 1 - Math.floor(spherical[0] / tileSize);
|
|
48
|
+
const tileY = Math.floor(spherical[1] / tileSize);
|
|
49
|
+
if (tileX < 0) {
|
|
50
|
+
// wrap around 2 * PI
|
|
51
|
+
tileX = numTilesX + tileX;
|
|
52
|
+
}
|
|
53
|
+
return createTileCoordinate(tileX, tileY, level);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get the tile coordinates of all tiles which intersect the given extent of image coordinates for the given level.
|
|
57
|
+
* @param extent
|
|
58
|
+
* @param level
|
|
59
|
+
*/
|
|
60
|
+
export function getTileCoordinatesInImageExtent(extent, level) {
|
|
61
|
+
// the extent is flipped along the X axis, we need to take this into account.
|
|
62
|
+
const bottomLeft = tileCoordinateFromImageCoordinate([extent[2], extent[1]], level);
|
|
63
|
+
const topRight = tileCoordinateFromImageCoordinate([extent[0], extent[3]], level);
|
|
64
|
+
const numberOfLines = topRight.y - bottomLeft.y;
|
|
65
|
+
const tileCoordinates = new Array((topRight.x - bottomLeft.x) * numberOfLines);
|
|
66
|
+
for (let i = bottomLeft.x; i <= topRight.x; i++) {
|
|
67
|
+
for (let j = bottomLeft.y; j <= topRight.y; j++) {
|
|
68
|
+
tileCoordinates[(i - bottomLeft.x) * (numberOfLines + 1) + (j - bottomLeft.y)] = createTileCoordinate(i, j, level);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return tileCoordinates;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Gets the center point of a tile in image spherical coordinates.
|
|
75
|
+
* @param tileCoordinate
|
|
76
|
+
*/
|
|
77
|
+
export function getTileSphericalCenter(tileCoordinate) {
|
|
78
|
+
const sizeR = tileSizeInRadians(tileCoordinate.level);
|
|
79
|
+
const [numTilesX] = getNumberOfTiles(tileCoordinate.level);
|
|
80
|
+
const phi = (numTilesX - 1 - (tileCoordinate.x - 0.5)) * sizeR;
|
|
81
|
+
const theta = (tileCoordinate.y + 0.5) * sizeR;
|
|
82
|
+
return [phi, theta];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Gets the extent of a tile in image spherical coordinates.
|
|
86
|
+
* @param tileCoordinate
|
|
87
|
+
*/
|
|
88
|
+
export function getTileSphericalExtent(tileCoordinate) {
|
|
89
|
+
const sizeR = tileSizeInRadians(tileCoordinate.level);
|
|
90
|
+
const [numTilesX] = getNumberOfTiles(tileCoordinate.level);
|
|
91
|
+
const minPhi = (numTilesX - 1 - tileCoordinate.x) * sizeR;
|
|
92
|
+
const maxPhi = (numTilesX - 1 - (tileCoordinate.x - 1)) * sizeR;
|
|
93
|
+
const minTheta = tileCoordinate.y * sizeR;
|
|
94
|
+
const maxTheta = (tileCoordinate.y + 1) * sizeR;
|
|
95
|
+
return [minPhi, minTheta, maxPhi, maxTheta];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @param tileCoordinate - the tile coordinate to calculate the distance to
|
|
99
|
+
* @param position - the image spherical position to calculate the distance from
|
|
100
|
+
* @returns the distance in radians. this is only used for relative comparisons.
|
|
101
|
+
*/
|
|
102
|
+
export function getDistanceToTileCoordinate(position, tileCoordinate) {
|
|
103
|
+
const center = getTileSphericalCenter(tileCoordinate);
|
|
104
|
+
const distance = cartesian2DDistance(position, center);
|
|
105
|
+
if (distance > Math.PI) {
|
|
106
|
+
return Math.abs(CesiumMath.TWO_PI - distance);
|
|
107
|
+
}
|
|
108
|
+
return distance;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=panoramaTileCoordinate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panoramaTileCoordinate.js","sourceRoot":"","sources":["../../../src/panorama/panoramaTileCoordinate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,sBAAsB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AAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAEhD,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CACzC,QAA0B,EAC1B,cAAsC;IAEtC,MAAM,MAAM,GAAG,sBAAsB,CAAC,cAAc,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEvD,IAAI,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Context } from '@vcmap-cesium/engine';
|
|
2
|
+
import { Cartesian2, Cartesian3, Color, Material, Texture } from '@vcmap-cesium/engine';
|
|
3
|
+
import type { Size } from 'ol/size.js';
|
|
4
|
+
import { type PanoramaTileCoordinate } from './panoramaTileCoordinate.js';
|
|
5
|
+
import type { PanoramaResourceData, PanoramaResourceType } from './panoramaTileProvider.js';
|
|
6
|
+
export declare const defaultCursorColor = "rgba(255, 206, 0, 0.33)";
|
|
7
|
+
/**
|
|
8
|
+
* The overlay mode for panorama tiles.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum PanoramaOverlayMode {
|
|
11
|
+
None = 0,
|
|
12
|
+
Intensity = 1,
|
|
13
|
+
Depth = 2
|
|
14
|
+
}
|
|
15
|
+
export type PanoramaTileMaterialUniforms = {
|
|
16
|
+
u_rgb: ImageBitmap | string;
|
|
17
|
+
u_intensity: ImageBitmap | string;
|
|
18
|
+
u_depth: Texture | string;
|
|
19
|
+
u_debug: HTMLCanvasElement | string;
|
|
20
|
+
u_cursorPosition: Cartesian3;
|
|
21
|
+
u_minUV: Cartesian2;
|
|
22
|
+
u_maxUV: Cartesian2;
|
|
23
|
+
u_opacity: number;
|
|
24
|
+
u_overlay: PanoramaOverlayMode;
|
|
25
|
+
u_overlayOpacity: number;
|
|
26
|
+
u_overlayNaNColor: Color;
|
|
27
|
+
u_showDebug: boolean;
|
|
28
|
+
u_depthReady: boolean;
|
|
29
|
+
u_imageReady: boolean;
|
|
30
|
+
u_intensityReady: boolean;
|
|
31
|
+
u_cursorColor: Color;
|
|
32
|
+
};
|
|
33
|
+
export declare function getDefaultPanoramaTileMaterialUniforms(): PanoramaTileMaterialUniforms;
|
|
34
|
+
export default class PanoramaTileMaterial extends Material {
|
|
35
|
+
readonly tileCoordinate: PanoramaTileCoordinate;
|
|
36
|
+
private _tileSize;
|
|
37
|
+
private _loadedImages;
|
|
38
|
+
/**
|
|
39
|
+
* The uniforms used by the panorama tile material. These are not intended to be modified directly
|
|
40
|
+
* but rather through the provided properties.
|
|
41
|
+
*/
|
|
42
|
+
uniforms: PanoramaTileMaterialUniforms;
|
|
43
|
+
private _minificationFilter;
|
|
44
|
+
private _magnificationFilter;
|
|
45
|
+
private _depthData;
|
|
46
|
+
constructor(tileCoordinate: PanoramaTileCoordinate, _tileSize: Size);
|
|
47
|
+
/**
|
|
48
|
+
* Shows the debug overlay on the panorama tile.
|
|
49
|
+
*/
|
|
50
|
+
get showDebug(): boolean;
|
|
51
|
+
set showDebug(value: boolean);
|
|
52
|
+
/**
|
|
53
|
+
* Display the overlay on the panorama tile.
|
|
54
|
+
*/
|
|
55
|
+
get overlay(): PanoramaOverlayMode;
|
|
56
|
+
set overlay(value: PanoramaOverlayMode);
|
|
57
|
+
/**
|
|
58
|
+
* The opacity of the overlay on the panorama tile.
|
|
59
|
+
*/
|
|
60
|
+
get overlayOpacity(): number;
|
|
61
|
+
set overlayOpacity(value: number);
|
|
62
|
+
/**
|
|
63
|
+
* The color used where overlay values are 0.
|
|
64
|
+
*/
|
|
65
|
+
get overlayNaNColor(): Color;
|
|
66
|
+
set overlayNaNColor(value: Color);
|
|
67
|
+
/**
|
|
68
|
+
* The global opacity of the panorama tile.
|
|
69
|
+
*/
|
|
70
|
+
get opacity(): number;
|
|
71
|
+
set opacity(value: number);
|
|
72
|
+
/**
|
|
73
|
+
* The position of the cursor in the panorama tile. Internal API to render the depth cursor.
|
|
74
|
+
* (-1, -1, -1) means no data is available.
|
|
75
|
+
* It should be a valid position in the panorama tiles cartesian coordinate system, scaled by the normalized depth.
|
|
76
|
+
*/
|
|
77
|
+
get cursorPosition(): Cartesian3;
|
|
78
|
+
set cursorPosition(value: Cartesian3);
|
|
79
|
+
/**
|
|
80
|
+
* The color of the cursor in the panorama tile.
|
|
81
|
+
*/
|
|
82
|
+
get cursorColor(): Color;
|
|
83
|
+
set cursorColor(value: Color);
|
|
84
|
+
/**
|
|
85
|
+
* Sets the texture for the given panorama resource type.
|
|
86
|
+
* @param type
|
|
87
|
+
* @param data
|
|
88
|
+
*/
|
|
89
|
+
setTexture<T extends PanoramaResourceType>(type: T, data: PanoramaResourceData<T>): void;
|
|
90
|
+
hasTexture(type: PanoramaResourceType): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Internal cesium API to update the material.
|
|
93
|
+
* @param context
|
|
94
|
+
*/
|
|
95
|
+
update(context: Context): void;
|
|
96
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { Cartesian2, Cartesian3, Color, Material, PixelDatatype, PixelFormat, Sampler, Texture, } from '@vcmap-cesium/engine';
|
|
2
|
+
import { getNumberOfTiles, } from './panoramaTileCoordinate.js';
|
|
3
|
+
import source from './panoramaTileMaterialFS.shader.js';
|
|
4
|
+
export const defaultCursorColor = 'rgba(255, 206, 0, 0.33)';
|
|
5
|
+
/**
|
|
6
|
+
* The overlay mode for panorama tiles.
|
|
7
|
+
*/
|
|
8
|
+
export var PanoramaOverlayMode;
|
|
9
|
+
(function (PanoramaOverlayMode) {
|
|
10
|
+
PanoramaOverlayMode[PanoramaOverlayMode["None"] = 0] = "None";
|
|
11
|
+
PanoramaOverlayMode[PanoramaOverlayMode["Intensity"] = 1] = "Intensity";
|
|
12
|
+
PanoramaOverlayMode[PanoramaOverlayMode["Depth"] = 2] = "Depth";
|
|
13
|
+
})(PanoramaOverlayMode || (PanoramaOverlayMode = {}));
|
|
14
|
+
function createDebugCanvas(tileSize, text) {
|
|
15
|
+
const canvas = document.createElement('canvas');
|
|
16
|
+
canvas.width = tileSize[0];
|
|
17
|
+
canvas.height = tileSize[1];
|
|
18
|
+
const ctx = canvas.getContext('2d');
|
|
19
|
+
ctx.strokeStyle = 'hotpink';
|
|
20
|
+
ctx.lineWidth = 5;
|
|
21
|
+
ctx.strokeRect(0, 0, tileSize[0], tileSize[1]);
|
|
22
|
+
ctx.translate(tileSize[0], 0);
|
|
23
|
+
ctx.scale(-1, 1); // Flip the context horizontally
|
|
24
|
+
ctx.fillStyle = 'hotpink';
|
|
25
|
+
ctx.font = '60px Arial';
|
|
26
|
+
ctx.textAlign = 'center';
|
|
27
|
+
ctx.textBaseline = 'middle';
|
|
28
|
+
ctx.fillText(text, tileSize[0] / 2, tileSize[1] / 2);
|
|
29
|
+
return canvas;
|
|
30
|
+
}
|
|
31
|
+
function getUniformForType(type) {
|
|
32
|
+
return `u_${type}`;
|
|
33
|
+
}
|
|
34
|
+
export function getDefaultPanoramaTileMaterialUniforms() {
|
|
35
|
+
return {
|
|
36
|
+
u_rgb: Material.DefaultImageId,
|
|
37
|
+
u_intensity: Material.DefaultImageId,
|
|
38
|
+
u_depth: Material.DefaultImageId,
|
|
39
|
+
u_debug: Material.DefaultImageId,
|
|
40
|
+
u_minUV: new Cartesian2(),
|
|
41
|
+
u_maxUV: new Cartesian2(),
|
|
42
|
+
u_opacity: 1,
|
|
43
|
+
u_overlay: PanoramaOverlayMode.Intensity,
|
|
44
|
+
u_overlayOpacity: 1,
|
|
45
|
+
u_showDebug: false,
|
|
46
|
+
u_cursorPosition: new Cartesian3(-1, -1, -1),
|
|
47
|
+
u_imageReady: false,
|
|
48
|
+
u_intensityReady: false,
|
|
49
|
+
u_depthReady: false,
|
|
50
|
+
u_overlayNaNColor: Color.RED,
|
|
51
|
+
u_cursorColor: Color.fromCssColorString(defaultCursorColor),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export default class PanoramaTileMaterial extends Material {
|
|
55
|
+
tileCoordinate;
|
|
56
|
+
_tileSize;
|
|
57
|
+
_depthData;
|
|
58
|
+
constructor(tileCoordinate, _tileSize) {
|
|
59
|
+
const [numx, numy] = getNumberOfTiles(tileCoordinate.level);
|
|
60
|
+
const sizeX = 1 / numx;
|
|
61
|
+
const sizeY = 1 / numy;
|
|
62
|
+
const { x, y } = tileCoordinate;
|
|
63
|
+
const minUV = new Cartesian2(x * sizeX, 1 - (y * sizeY + sizeY));
|
|
64
|
+
const maxUV = new Cartesian2(x * sizeX + sizeX, 1 - y * sizeY);
|
|
65
|
+
super({
|
|
66
|
+
fabric: {
|
|
67
|
+
type: 'TileImage',
|
|
68
|
+
uniforms: {
|
|
69
|
+
...getDefaultPanoramaTileMaterialUniforms(),
|
|
70
|
+
u_minUV: minUV,
|
|
71
|
+
u_maxUV: maxUV,
|
|
72
|
+
},
|
|
73
|
+
source,
|
|
74
|
+
},
|
|
75
|
+
translucent: false,
|
|
76
|
+
});
|
|
77
|
+
this.tileCoordinate = tileCoordinate;
|
|
78
|
+
this._tileSize = _tileSize;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Shows the debug overlay on the panorama tile.
|
|
82
|
+
*/
|
|
83
|
+
get showDebug() {
|
|
84
|
+
return this.uniforms.u_showDebug;
|
|
85
|
+
}
|
|
86
|
+
set showDebug(value) {
|
|
87
|
+
this.uniforms.u_showDebug = value;
|
|
88
|
+
if (value && this.uniforms.u_debug === Material.DefaultImageId) {
|
|
89
|
+
this.uniforms.u_debug = createDebugCanvas(this._tileSize, this.tileCoordinate.key);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Display the overlay on the panorama tile.
|
|
94
|
+
*/
|
|
95
|
+
get overlay() {
|
|
96
|
+
return this.uniforms.u_overlay;
|
|
97
|
+
}
|
|
98
|
+
set overlay(value) {
|
|
99
|
+
this.uniforms.u_overlay = value;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The opacity of the overlay on the panorama tile.
|
|
103
|
+
*/
|
|
104
|
+
get overlayOpacity() {
|
|
105
|
+
return this.uniforms.u_overlayOpacity;
|
|
106
|
+
}
|
|
107
|
+
set overlayOpacity(value) {
|
|
108
|
+
this.uniforms.u_overlayOpacity = value;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The color used where overlay values are 0.
|
|
112
|
+
*/
|
|
113
|
+
get overlayNaNColor() {
|
|
114
|
+
return this.uniforms.u_overlayNaNColor;
|
|
115
|
+
}
|
|
116
|
+
set overlayNaNColor(value) {
|
|
117
|
+
this.uniforms.u_overlayNaNColor = value;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The global opacity of the panorama tile.
|
|
121
|
+
*/
|
|
122
|
+
get opacity() {
|
|
123
|
+
return this.uniforms.u_opacity;
|
|
124
|
+
}
|
|
125
|
+
set opacity(value) {
|
|
126
|
+
this.uniforms.u_opacity = value;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The position of the cursor in the panorama tile. Internal API to render the depth cursor.
|
|
130
|
+
* (-1, -1, -1) means no data is available.
|
|
131
|
+
* It should be a valid position in the panorama tiles cartesian coordinate system, scaled by the normalized depth.
|
|
132
|
+
*/
|
|
133
|
+
get cursorPosition() {
|
|
134
|
+
return this.uniforms.u_cursorPosition;
|
|
135
|
+
}
|
|
136
|
+
set cursorPosition(value) {
|
|
137
|
+
this.uniforms.u_cursorPosition = value;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The color of the cursor in the panorama tile.
|
|
141
|
+
*/
|
|
142
|
+
get cursorColor() {
|
|
143
|
+
return this.uniforms.u_cursorColor;
|
|
144
|
+
}
|
|
145
|
+
set cursorColor(value) {
|
|
146
|
+
this.uniforms.u_cursorColor = value;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Sets the texture for the given panorama resource type.
|
|
150
|
+
* @param type
|
|
151
|
+
* @param data
|
|
152
|
+
*/
|
|
153
|
+
setTexture(type, data) {
|
|
154
|
+
if (this.hasTexture(type)) {
|
|
155
|
+
throw new Error(`Texture for ${type} can only be set once!`);
|
|
156
|
+
}
|
|
157
|
+
const uniformType = getUniformForType(type);
|
|
158
|
+
if (uniformType === 'u_depth') {
|
|
159
|
+
this._depthData = data;
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
this.uniforms[uniformType] = data;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
hasTexture(type) {
|
|
166
|
+
const uniform = getUniformForType(type);
|
|
167
|
+
if (uniform === 'u_depth') {
|
|
168
|
+
return this._depthData !== undefined;
|
|
169
|
+
}
|
|
170
|
+
return this.uniforms[uniform] !== Material.DefaultImageId;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Internal cesium API to update the material.
|
|
174
|
+
* @param context
|
|
175
|
+
*/
|
|
176
|
+
update(context) {
|
|
177
|
+
const resolveImage = !this.uniforms.u_imageReady &&
|
|
178
|
+
this._loadedImages?.some((i) => i.id === 'u_rgb');
|
|
179
|
+
const resolveIntensity = !this.uniforms.u_intensityReady &&
|
|
180
|
+
this._loadedImages?.find((i) => i.id === 'u_intensity');
|
|
181
|
+
if (this.uniforms.u_depth === Material.DefaultImageId && this._depthData) {
|
|
182
|
+
const sampler = new Sampler({
|
|
183
|
+
minificationFilter: this._minificationFilter,
|
|
184
|
+
magnificationFilter: this._magnificationFilter,
|
|
185
|
+
});
|
|
186
|
+
this.uniforms.u_depth = new Texture({
|
|
187
|
+
context,
|
|
188
|
+
pixelDatatype: PixelDatatype.FLOAT,
|
|
189
|
+
pixelFormat: PixelFormat.RED,
|
|
190
|
+
source: {
|
|
191
|
+
arrayBufferView: this._depthData,
|
|
192
|
+
width: this._tileSize[0],
|
|
193
|
+
height: this._tileSize[1],
|
|
194
|
+
},
|
|
195
|
+
sampler,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else if (!this.uniforms.u_depthReady &&
|
|
199
|
+
this.uniforms.u_depth !== Material.DefaultImageId) {
|
|
200
|
+
this.uniforms.u_depthReady = true;
|
|
201
|
+
}
|
|
202
|
+
// @ts-expect-error is actually private
|
|
203
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
204
|
+
super.update(context);
|
|
205
|
+
if (resolveImage) {
|
|
206
|
+
this.uniforms.u_imageReady = true;
|
|
207
|
+
}
|
|
208
|
+
if (resolveIntensity) {
|
|
209
|
+
this.uniforms.u_intensityReady = true;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=panoramaTileMaterial.js.map
|