@itwin/core-frontend 5.1.0-dev.9 → 5.2.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +92 -1
- package/lib/cjs/AccuDraw.js +2 -2
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/AccuSnap.d.ts.map +1 -1
- package/lib/cjs/AccuSnap.js +15 -6
- package/lib/cjs/AccuSnap.js.map +1 -1
- package/lib/cjs/AuxCoordSys.js +1 -1
- package/lib/cjs/AuxCoordSys.js.map +1 -1
- package/lib/cjs/DisplayStyleState.d.ts +37 -0
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +65 -0
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/DrawingViewState.d.ts.map +1 -1
- package/lib/cjs/DrawingViewState.js +1 -0
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/GraphicalEditingScope.d.ts +1 -1
- package/lib/cjs/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/cjs/GraphicalEditingScope.js +1 -1
- package/lib/cjs/GraphicalEditingScope.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +1 -1
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +19 -4
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +21 -2
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +8 -9
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +52 -24
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/IpcApp.d.ts +2 -1
- package/lib/cjs/IpcApp.d.ts.map +1 -1
- package/lib/cjs/IpcApp.js +4 -2
- package/lib/cjs/IpcApp.js.map +1 -1
- package/lib/cjs/RealityDataSource.d.ts +65 -3
- package/lib/cjs/RealityDataSource.d.ts.map +1 -1
- package/lib/cjs/RealityDataSource.js +79 -3
- package/lib/cjs/RealityDataSource.js.map +1 -1
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.js +1 -1
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.js.map +1 -1
- package/lib/cjs/SelectionSet.d.ts +7 -7
- package/lib/cjs/SelectionSet.js +3 -3
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/SheetViewState.d.ts +2 -0
- package/lib/cjs/SheetViewState.d.ts.map +1 -1
- package/lib/cjs/SheetViewState.js +25 -3
- package/lib/cjs/SheetViewState.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +1 -1
- package/lib/cjs/ViewState.js +1 -1
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +6 -4
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +23 -3
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/common/gltf/GltfSchema.d.ts +18 -0
- package/lib/cjs/common/gltf/GltfSchema.d.ts.map +1 -1
- package/lib/cjs/common/gltf/GltfSchema.js +1 -0
- package/lib/cjs/common/gltf/GltfSchema.js.map +1 -1
- package/lib/cjs/common/imdl/CompactEdges.d.ts +11 -0
- package/lib/cjs/common/imdl/CompactEdges.d.ts.map +1 -1
- package/lib/cjs/common/imdl/CompactEdges.js +9 -6
- package/lib/cjs/common/imdl/CompactEdges.js.map +1 -1
- package/lib/cjs/common/imdl/ImdlSchema.d.ts +5 -1
- package/lib/cjs/common/imdl/ImdlSchema.d.ts.map +1 -1
- package/lib/cjs/common/imdl/ImdlSchema.js +4 -0
- package/lib/cjs/common/imdl/ImdlSchema.js.map +1 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.d.ts.map +1 -1
- package/lib/cjs/common/imdl/ParseImdlDocument.js +11 -9
- package/lib/cjs/common/imdl/ParseImdlDocument.js.map +1 -1
- package/lib/cjs/common/internal/render/EdgeParams.d.ts +7 -2
- package/lib/cjs/common/internal/render/EdgeParams.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/EdgeParams.js +30 -8
- package/lib/cjs/common/internal/render/EdgeParams.js.map +1 -1
- package/lib/cjs/common/internal/render/MeshPrimitives.d.ts +2 -1
- package/lib/cjs/common/internal/render/MeshPrimitives.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/MeshPrimitives.js +5 -7
- package/lib/cjs/common/internal/render/MeshPrimitives.js.map +1 -1
- package/lib/cjs/common/internal/render/PolylineParams.d.ts +8 -3
- package/lib/cjs/common/internal/render/PolylineParams.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/PolylineParams.js +6 -9
- package/lib/cjs/common/internal/render/PolylineParams.js.map +1 -1
- package/lib/cjs/common/internal/render/VertexTableSplitter.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/VertexTableSplitter.js +9 -7
- package/lib/cjs/common/internal/render/VertexTableSplitter.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +2 -2
- package/lib/cjs/core-frontend.d.ts.map +1 -1
- package/lib/cjs/core-frontend.js +1 -1
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/extension/ExtensionRuntime.js +15 -2
- package/lib/cjs/extension/ExtensionRuntime.js.map +1 -1
- package/lib/cjs/extension/providers/ExtensionLoadScript.js.map +1 -1
- package/lib/cjs/internal/GoogleMapsDecorator.d.ts +53 -0
- package/lib/cjs/internal/GoogleMapsDecorator.d.ts.map +1 -0
- package/lib/cjs/internal/GoogleMapsDecorator.js +132 -0
- package/lib/cjs/internal/GoogleMapsDecorator.js.map +1 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.d.ts +83 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.d.ts.map +1 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.js +201 -0
- package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.js.map +1 -0
- package/lib/cjs/internal/ScriptUtils.d.ts +5 -0
- package/lib/cjs/internal/ScriptUtils.d.ts.map +1 -0
- package/lib/cjs/internal/ScriptUtils.js +120 -0
- package/lib/cjs/internal/ScriptUtils.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +1 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +4 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BatchUniforms.js +1 -1
- package/lib/cjs/internal/render/webgl/BatchUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchStack.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/BranchStack.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchStack.js +3 -2
- package/lib/cjs/internal/render/webgl/BranchStack.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchState.d.ts +4 -2
- package/lib/cjs/internal/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchState.js +4 -1
- package/lib/cjs/internal/render/webgl/BranchState.js.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchUniforms.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/BranchUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/BranchUniforms.js +2 -2
- package/lib/cjs/internal/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ContourUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ContourUniforms.js +2 -3
- package/lib/cjs/internal/render/webgl/ContourUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Contours.js +8 -8
- package/lib/cjs/internal/render/webgl/Contours.js.map +1 -1
- package/lib/cjs/internal/render/webgl/EdgeGeometry.d.ts +8 -6
- package/lib/cjs/internal/render/webgl/EdgeGeometry.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/EdgeGeometry.js +21 -7
- package/lib/cjs/internal/render/webgl/EdgeGeometry.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Graphic.d.ts +2 -1
- package/lib/cjs/internal/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Graphic.js +2 -0
- package/lib/cjs/internal/render/webgl/Graphic.js.map +1 -1
- package/lib/cjs/internal/render/webgl/IndexedEdgeGeometry.d.ts +6 -1
- package/lib/cjs/internal/render/webgl/IndexedEdgeGeometry.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/IndexedEdgeGeometry.js +19 -4
- package/lib/cjs/internal/render/webgl/IndexedEdgeGeometry.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Mesh.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/Mesh.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Mesh.js +13 -6
- package/lib/cjs/internal/render/webgl/Mesh.js.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js +2 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts +2 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.js +3 -1
- package/lib/cjs/internal/render/webgl/Target.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/cjs/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.js +3 -3
- package/lib/cjs/internal/render/webgl/Technique.js.map +1 -1
- package/lib/cjs/internal/tile/ClassifierTileTree.js +3 -1
- package/lib/cjs/internal/tile/ClassifierTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/IModelTile.d.ts +1 -0
- package/lib/cjs/internal/tile/IModelTile.d.ts.map +1 -1
- package/lib/cjs/internal/tile/IModelTile.js +4 -0
- package/lib/cjs/internal/tile/IModelTile.js.map +1 -1
- package/lib/cjs/internal/tile/IModelTileTree.d.ts +4 -2
- package/lib/cjs/internal/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/IModelTileTree.js +58 -0
- package/lib/cjs/internal/tile/IModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.d.ts.map +1 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.js +8 -0
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.js.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts +4 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.js +4 -0
- package/lib/cjs/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/PrimaryTileTree.js +5 -4
- package/lib/cjs/internal/tile/PrimaryTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts +26 -7
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js +48 -21
- package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts +2 -2
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.js +10 -2
- package/lib/cjs/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts +4 -0
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +52 -11
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts +7 -0
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js +17 -0
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/internal/webgl.d.ts +1 -1
- package/lib/cjs/internal/webgl.d.ts.map +1 -1
- package/lib/cjs/internal/webgl.js.map +1 -1
- package/lib/cjs/properties/AngleDescription.d.ts +4 -1
- package/lib/cjs/properties/AngleDescription.d.ts.map +1 -1
- package/lib/cjs/properties/AngleDescription.js +10 -2
- package/lib/cjs/properties/AngleDescription.js.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts +11 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.js +7 -2
- package/lib/cjs/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/cjs/properties/LengthDescription.d.ts +12 -3
- package/lib/cjs/properties/LengthDescription.d.ts.map +1 -1
- package/lib/cjs/properties/LengthDescription.js +30 -6
- package/lib/cjs/properties/LengthDescription.js.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts +103 -7
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.js +210 -23
- package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/cjs/render/Decorations.d.ts +1 -1
- package/lib/cjs/render/Decorations.d.ts.map +1 -1
- package/lib/cjs/render/Decorations.js +1 -1
- package/lib/cjs/render/Decorations.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +4 -2
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/MeshArgs.d.ts +8 -3
- package/lib/cjs/render/MeshArgs.d.ts.map +1 -1
- package/lib/cjs/render/MeshArgs.js.map +1 -1
- package/lib/cjs/render/RenderGraphic.d.ts +1 -1
- package/lib/cjs/render/RenderGraphic.d.ts.map +1 -1
- package/lib/cjs/render/RenderGraphic.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +2 -2
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/cjs/request/Request.d.ts +2 -2
- package/lib/cjs/request/Request.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts +6 -2
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +154 -18
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/ImdlReader.js.map +1 -1
- package/lib/cjs/tile/RealityTile.d.ts +9 -0
- package/lib/cjs/tile/RealityTile.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTile.js +12 -0
- package/lib/cjs/tile/RealityTile.js.map +1 -1
- package/lib/cjs/tile/RealityTileTree.d.ts +4 -0
- package/lib/cjs/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTileTree.js +4 -0
- package/lib/cjs/tile/RealityTileTree.js.map +1 -1
- package/lib/cjs/tile/Tile.d.ts +1 -1
- package/lib/cjs/tile/Tile.d.ts.map +1 -1
- package/lib/cjs/tile/Tile.js +1 -1
- package/lib/cjs/tile/Tile.js.map +1 -1
- package/lib/cjs/tile/TileAdmin.d.ts +10 -0
- package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
- package/lib/cjs/tile/TileAdmin.js +3 -0
- package/lib/cjs/tile/TileAdmin.js.map +1 -1
- package/lib/cjs/tile/TileGeometryCollector.d.ts +5 -0
- package/lib/cjs/tile/TileGeometryCollector.d.ts.map +1 -1
- package/lib/cjs/tile/TileGeometryCollector.js.map +1 -1
- package/lib/cjs/tile/TileTree.d.ts +15 -2
- package/lib/cjs/tile/TileTree.d.ts.map +1 -1
- package/lib/cjs/tile/TileTree.js +14 -1
- package/lib/cjs/tile/TileTree.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +17 -3
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +11 -5
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts +10 -0
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.js +12 -0
- package/lib/cjs/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +3 -3
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +9 -5
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +1 -1
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/QuadId.d.ts +15 -0
- package/lib/cjs/tile/map/QuadId.d.ts.map +1 -1
- package/lib/cjs/tile/map/QuadId.js +12 -0
- package/lib/cjs/tile/map/QuadId.js.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/cjs/tools/ClipViewTool.d.ts.map +1 -1
- package/lib/cjs/tools/ClipViewTool.js +18 -7
- package/lib/cjs/tools/ClipViewTool.js.map +1 -1
- package/lib/cjs/tools/ElementSetTool.d.ts +9 -1
- package/lib/cjs/tools/ElementSetTool.d.ts.map +1 -1
- package/lib/cjs/tools/ElementSetTool.js +130 -7
- package/lib/cjs/tools/ElementSetTool.js.map +1 -1
- package/lib/cjs/tools/IdleTool.d.ts.map +1 -1
- package/lib/cjs/tools/IdleTool.js +4 -1
- package/lib/cjs/tools/IdleTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTool.d.ts +9 -0
- package/lib/cjs/tools/MeasureTool.d.ts.map +1 -1
- package/lib/cjs/tools/MeasureTool.js +57 -24
- package/lib/cjs/tools/MeasureTool.js.map +1 -1
- package/lib/cjs/tools/PrimitiveTool.d.ts +1 -1
- package/lib/cjs/tools/PrimitiveTool.d.ts.map +1 -1
- package/lib/cjs/tools/PrimitiveTool.js +4 -3
- package/lib/cjs/tools/PrimitiveTool.js.map +1 -1
- package/lib/cjs/tools/SelectTool.d.ts +2 -2
- package/lib/cjs/tools/SelectTool.d.ts.map +1 -1
- package/lib/cjs/tools/SelectTool.js +26 -97
- package/lib/cjs/tools/SelectTool.js.map +1 -1
- package/lib/cjs/tools/Tool.d.ts +10 -1
- package/lib/cjs/tools/Tool.d.ts.map +1 -1
- package/lib/cjs/tools/Tool.js +27 -4
- package/lib/cjs/tools/Tool.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +51 -16
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/cjs/tools/ToolAssistance.d.ts +1 -1
- package/lib/cjs/tools/ToolAssistance.js.map +1 -1
- package/lib/cjs/tools/ToolSettings.d.ts +5 -0
- package/lib/cjs/tools/ToolSettings.d.ts.map +1 -1
- package/lib/cjs/tools/ToolSettings.js +5 -0
- package/lib/cjs/tools/ToolSettings.js.map +1 -1
- package/lib/cjs/tools/ViewTool.d.ts +1 -2
- package/lib/cjs/tools/ViewTool.d.ts.map +1 -1
- package/lib/cjs/tools/ViewTool.js +143 -84
- package/lib/cjs/tools/ViewTool.js.map +1 -1
- package/lib/esm/AccuDraw.js +2 -2
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/AccuSnap.d.ts.map +1 -1
- package/lib/esm/AccuSnap.js +15 -6
- package/lib/esm/AccuSnap.js.map +1 -1
- package/lib/esm/AuxCoordSys.js +1 -1
- package/lib/esm/AuxCoordSys.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts +37 -0
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +65 -0
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/DrawingViewState.d.ts.map +1 -1
- package/lib/esm/DrawingViewState.js +1 -0
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/GraphicalEditingScope.d.ts +1 -1
- package/lib/esm/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/esm/GraphicalEditingScope.js +1 -1
- package/lib/esm/GraphicalEditingScope.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +1 -1
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +19 -4
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +22 -3
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +8 -9
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +53 -25
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/IpcApp.d.ts +2 -1
- package/lib/esm/IpcApp.d.ts.map +1 -1
- package/lib/esm/IpcApp.js +4 -2
- package/lib/esm/IpcApp.js.map +1 -1
- package/lib/esm/RealityDataSource.d.ts +65 -3
- package/lib/esm/RealityDataSource.d.ts.map +1 -1
- package/lib/esm/RealityDataSource.js +77 -3
- package/lib/esm/RealityDataSource.js.map +1 -1
- package/lib/esm/RealityDataSourceTilesetUrlImpl.js +1 -1
- package/lib/esm/RealityDataSourceTilesetUrlImpl.js.map +1 -1
- package/lib/esm/SelectionSet.d.ts +7 -7
- package/lib/esm/SelectionSet.js +3 -3
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/SheetViewState.d.ts +2 -0
- package/lib/esm/SheetViewState.d.ts.map +1 -1
- package/lib/esm/SheetViewState.js +25 -3
- package/lib/esm/SheetViewState.js.map +1 -1
- package/lib/esm/ViewState.d.ts +1 -1
- package/lib/esm/ViewState.js +1 -1
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +6 -4
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +23 -3
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/common/gltf/GltfSchema.d.ts +18 -0
- package/lib/esm/common/gltf/GltfSchema.d.ts.map +1 -1
- package/lib/esm/common/gltf/GltfSchema.js +1 -0
- package/lib/esm/common/gltf/GltfSchema.js.map +1 -1
- package/lib/esm/common/imdl/CompactEdges.d.ts +11 -0
- package/lib/esm/common/imdl/CompactEdges.d.ts.map +1 -1
- package/lib/esm/common/imdl/CompactEdges.js +8 -6
- package/lib/esm/common/imdl/CompactEdges.js.map +1 -1
- package/lib/esm/common/imdl/ImdlSchema.d.ts +5 -1
- package/lib/esm/common/imdl/ImdlSchema.d.ts.map +1 -1
- package/lib/esm/common/imdl/ImdlSchema.js +4 -0
- package/lib/esm/common/imdl/ImdlSchema.js.map +1 -1
- package/lib/esm/common/imdl/ParseImdlDocument.d.ts.map +1 -1
- package/lib/esm/common/imdl/ParseImdlDocument.js +11 -9
- package/lib/esm/common/imdl/ParseImdlDocument.js.map +1 -1
- package/lib/esm/common/internal/render/EdgeParams.d.ts +7 -2
- package/lib/esm/common/internal/render/EdgeParams.d.ts.map +1 -1
- package/lib/esm/common/internal/render/EdgeParams.js +31 -9
- package/lib/esm/common/internal/render/EdgeParams.js.map +1 -1
- package/lib/esm/common/internal/render/MeshPrimitives.d.ts +2 -1
- package/lib/esm/common/internal/render/MeshPrimitives.d.ts.map +1 -1
- package/lib/esm/common/internal/render/MeshPrimitives.js +5 -7
- package/lib/esm/common/internal/render/MeshPrimitives.js.map +1 -1
- package/lib/esm/common/internal/render/PolylineParams.d.ts +8 -3
- package/lib/esm/common/internal/render/PolylineParams.d.ts.map +1 -1
- package/lib/esm/common/internal/render/PolylineParams.js +5 -8
- package/lib/esm/common/internal/render/PolylineParams.js.map +1 -1
- package/lib/esm/common/internal/render/VertexTableSplitter.d.ts.map +1 -1
- package/lib/esm/common/internal/render/VertexTableSplitter.js +9 -7
- package/lib/esm/common/internal/render/VertexTableSplitter.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +2 -2
- package/lib/esm/core-frontend.d.ts.map +1 -1
- package/lib/esm/core-frontend.js +1 -1
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/extension/ExtensionRuntime.js +15 -2
- package/lib/esm/extension/ExtensionRuntime.js.map +1 -1
- package/lib/esm/extension/providers/ExtensionLoadScript.js +1 -1
- package/lib/esm/extension/providers/ExtensionLoadScript.js.map +1 -1
- package/lib/esm/internal/GoogleMapsDecorator.d.ts +53 -0
- package/lib/esm/internal/GoogleMapsDecorator.d.ts.map +1 -0
- package/lib/esm/internal/GoogleMapsDecorator.js +126 -0
- package/lib/esm/internal/GoogleMapsDecorator.js.map +1 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.d.ts +83 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.d.ts.map +1 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.js +197 -0
- package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.js.map +1 -0
- package/lib/esm/internal/ScriptUtils.d.ts +5 -0
- package/lib/esm/internal/ScriptUtils.d.ts.map +1 -0
- package/lib/esm/internal/ScriptUtils.js +117 -0
- package/lib/esm/internal/ScriptUtils.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +1 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +1 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/esm/internal/render/webgl/BatchUniforms.js +1 -1
- package/lib/esm/internal/render/webgl/BatchUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/BranchStack.d.ts +2 -2
- package/lib/esm/internal/render/webgl/BranchStack.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/BranchStack.js +3 -2
- package/lib/esm/internal/render/webgl/BranchStack.js.map +1 -1
- package/lib/esm/internal/render/webgl/BranchState.d.ts +4 -2
- package/lib/esm/internal/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/BranchState.js +4 -1
- package/lib/esm/internal/render/webgl/BranchState.js.map +1 -1
- package/lib/esm/internal/render/webgl/BranchUniforms.d.ts +2 -2
- package/lib/esm/internal/render/webgl/BranchUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/BranchUniforms.js +2 -2
- package/lib/esm/internal/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/ContourUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ContourUniforms.js +2 -3
- package/lib/esm/internal/render/webgl/ContourUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/Contours.js +8 -8
- package/lib/esm/internal/render/webgl/Contours.js.map +1 -1
- package/lib/esm/internal/render/webgl/EdgeGeometry.d.ts +8 -6
- package/lib/esm/internal/render/webgl/EdgeGeometry.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/EdgeGeometry.js +21 -7
- package/lib/esm/internal/render/webgl/EdgeGeometry.js.map +1 -1
- package/lib/esm/internal/render/webgl/Graphic.d.ts +2 -1
- package/lib/esm/internal/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Graphic.js +2 -0
- package/lib/esm/internal/render/webgl/Graphic.js.map +1 -1
- package/lib/esm/internal/render/webgl/IndexedEdgeGeometry.d.ts +6 -1
- package/lib/esm/internal/render/webgl/IndexedEdgeGeometry.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/IndexedEdgeGeometry.js +19 -4
- package/lib/esm/internal/render/webgl/IndexedEdgeGeometry.js.map +1 -1
- package/lib/esm/internal/render/webgl/Mesh.d.ts +1 -1
- package/lib/esm/internal/render/webgl/Mesh.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Mesh.js +14 -7
- package/lib/esm/internal/render/webgl/Mesh.js.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js +2 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts +2 -1
- package/lib/esm/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Target.js +3 -1
- package/lib/esm/internal/render/webgl/Target.js.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/esm/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.js +3 -3
- package/lib/esm/internal/render/webgl/Technique.js.map +1 -1
- package/lib/esm/internal/tile/ClassifierTileTree.js +3 -1
- package/lib/esm/internal/tile/ClassifierTileTree.js.map +1 -1
- package/lib/esm/internal/tile/IModelTile.d.ts +1 -0
- package/lib/esm/internal/tile/IModelTile.d.ts.map +1 -1
- package/lib/esm/internal/tile/IModelTile.js +4 -0
- package/lib/esm/internal/tile/IModelTile.js.map +1 -1
- package/lib/esm/internal/tile/IModelTileTree.d.ts +4 -2
- package/lib/esm/internal/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/IModelTileTree.js +60 -2
- package/lib/esm/internal/tile/IModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.d.ts.map +1 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.js +8 -0
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.js.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts +4 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js +5 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/esm/internal/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/PrimaryTileTree.js +5 -4
- package/lib/esm/internal/tile/PrimaryTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts +26 -7
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js +48 -22
- package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.d.ts +2 -2
- package/lib/esm/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.js +10 -2
- package/lib/esm/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts +4 -0
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +52 -11
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts +7 -0
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.js +17 -0
- package/lib/esm/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/internal/webgl.d.ts +1 -1
- package/lib/esm/internal/webgl.d.ts.map +1 -1
- package/lib/esm/internal/webgl.js.map +1 -1
- package/lib/esm/properties/AngleDescription.d.ts +4 -1
- package/lib/esm/properties/AngleDescription.d.ts.map +1 -1
- package/lib/esm/properties/AngleDescription.js +10 -2
- package/lib/esm/properties/AngleDescription.js.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts +11 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.js +7 -2
- package/lib/esm/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/esm/properties/LengthDescription.d.ts +12 -3
- package/lib/esm/properties/LengthDescription.d.ts.map +1 -1
- package/lib/esm/properties/LengthDescription.js +30 -6
- package/lib/esm/properties/LengthDescription.js.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts +103 -7
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.js +208 -23
- package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/esm/render/Decorations.d.ts +1 -1
- package/lib/esm/render/Decorations.d.ts.map +1 -1
- package/lib/esm/render/Decorations.js +1 -1
- package/lib/esm/render/Decorations.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +4 -2
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/MeshArgs.d.ts +8 -3
- package/lib/esm/render/MeshArgs.d.ts.map +1 -1
- package/lib/esm/render/MeshArgs.js.map +1 -1
- package/lib/esm/render/RenderGraphic.d.ts +1 -1
- package/lib/esm/render/RenderGraphic.d.ts.map +1 -1
- package/lib/esm/render/RenderGraphic.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +2 -2
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/esm/request/Request.d.ts +2 -2
- package/lib/esm/request/Request.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts +6 -2
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +154 -19
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/ImdlReader.js.map +1 -1
- package/lib/esm/tile/RealityTile.d.ts +9 -0
- package/lib/esm/tile/RealityTile.d.ts.map +1 -1
- package/lib/esm/tile/RealityTile.js +12 -0
- package/lib/esm/tile/RealityTile.js.map +1 -1
- package/lib/esm/tile/RealityTileTree.d.ts +4 -0
- package/lib/esm/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityTileTree.js +4 -0
- package/lib/esm/tile/RealityTileTree.js.map +1 -1
- package/lib/esm/tile/Tile.d.ts +1 -1
- package/lib/esm/tile/Tile.d.ts.map +1 -1
- package/lib/esm/tile/Tile.js +1 -1
- package/lib/esm/tile/Tile.js.map +1 -1
- package/lib/esm/tile/TileAdmin.d.ts +10 -0
- package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
- package/lib/esm/tile/TileAdmin.js +3 -0
- package/lib/esm/tile/TileAdmin.js.map +1 -1
- package/lib/esm/tile/TileGeometryCollector.d.ts +5 -0
- package/lib/esm/tile/TileGeometryCollector.d.ts.map +1 -1
- package/lib/esm/tile/TileGeometryCollector.js.map +1 -1
- package/lib/esm/tile/TileTree.d.ts +15 -2
- package/lib/esm/tile/TileTree.d.ts.map +1 -1
- package/lib/esm/tile/TileTree.js +14 -1
- package/lib/esm/tile/TileTree.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +17 -3
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +11 -5
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +2 -2
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.d.ts +10 -0
- package/lib/esm/tile/map/MapCartoRectangle.d.ts.map +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.js +12 -0
- package/lib/esm/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +3 -3
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +9 -5
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +1 -1
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/QuadId.d.ts +15 -0
- package/lib/esm/tile/map/QuadId.d.ts.map +1 -1
- package/lib/esm/tile/map/QuadId.js +12 -0
- package/lib/esm/tile/map/QuadId.js.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/esm/tools/ClipViewTool.d.ts.map +1 -1
- package/lib/esm/tools/ClipViewTool.js +18 -7
- package/lib/esm/tools/ClipViewTool.js.map +1 -1
- package/lib/esm/tools/ElementSetTool.d.ts +9 -1
- package/lib/esm/tools/ElementSetTool.d.ts.map +1 -1
- package/lib/esm/tools/ElementSetTool.js +132 -9
- package/lib/esm/tools/ElementSetTool.js.map +1 -1
- package/lib/esm/tools/IdleTool.d.ts.map +1 -1
- package/lib/esm/tools/IdleTool.js +4 -1
- package/lib/esm/tools/IdleTool.js.map +1 -1
- package/lib/esm/tools/MeasureTool.d.ts +9 -0
- package/lib/esm/tools/MeasureTool.d.ts.map +1 -1
- package/lib/esm/tools/MeasureTool.js +57 -24
- package/lib/esm/tools/MeasureTool.js.map +1 -1
- package/lib/esm/tools/PrimitiveTool.d.ts +1 -1
- package/lib/esm/tools/PrimitiveTool.d.ts.map +1 -1
- package/lib/esm/tools/PrimitiveTool.js +4 -3
- package/lib/esm/tools/PrimitiveTool.js.map +1 -1
- package/lib/esm/tools/SelectTool.d.ts +2 -2
- package/lib/esm/tools/SelectTool.d.ts.map +1 -1
- package/lib/esm/tools/SelectTool.js +26 -97
- package/lib/esm/tools/SelectTool.js.map +1 -1
- package/lib/esm/tools/Tool.d.ts +10 -1
- package/lib/esm/tools/Tool.d.ts.map +1 -1
- package/lib/esm/tools/Tool.js +27 -4
- package/lib/esm/tools/Tool.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +51 -16
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/tools/ToolAssistance.d.ts +1 -1
- package/lib/esm/tools/ToolAssistance.js.map +1 -1
- package/lib/esm/tools/ToolSettings.d.ts +5 -0
- package/lib/esm/tools/ToolSettings.d.ts.map +1 -1
- package/lib/esm/tools/ToolSettings.js +5 -0
- package/lib/esm/tools/ToolSettings.js.map +1 -1
- package/lib/esm/tools/ViewTool.d.ts +1 -2
- package/lib/esm/tools/ViewTool.d.ts.map +1 -1
- package/lib/esm/tools/ViewTool.js +143 -84
- package/lib/esm/tools/ViewTool.js.map +1 -1
- package/lib/public/images/google_on_non_white.png +0 -0
- package/lib/public/images/google_on_non_white_hdpi.png +0 -0
- package/lib/public/images/google_on_white.png +0 -0
- package/lib/public/images/google_on_white_hdpi.png +0 -0
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +25 -22
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Point3d } from "@itwin/core-geometry";
|
|
2
|
+
import { CanvasDecoration } from "../render/CanvasDecoration";
|
|
3
|
+
import { DecorateContext } from "../ViewContext";
|
|
4
|
+
import { Decorator } from "../ViewManager";
|
|
5
|
+
import { Sprite } from "../Sprites";
|
|
6
|
+
import { ScreenViewport } from "../Viewport";
|
|
7
|
+
/** Layer types that can be added to the map.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
type GoogleMapsMapTypes = "roadmap" | "satellite" | "terrain";
|
|
11
|
+
/** A simple decorator that shows the logo at a given screen position.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare class LogoDecoration implements CanvasDecoration {
|
|
15
|
+
private _sprite?;
|
|
16
|
+
/** The current position of the logo in view coordinates. */
|
|
17
|
+
readonly position: Point3d;
|
|
18
|
+
private _offset;
|
|
19
|
+
set offset(offset: Point3d | undefined);
|
|
20
|
+
/** The logo offset in view coordinates.*/
|
|
21
|
+
get offset(): Point3d | undefined;
|
|
22
|
+
/** Move the logo to the lower left corner of the screen. */
|
|
23
|
+
moveToLowerLeftCorner(context: DecorateContext): boolean;
|
|
24
|
+
/** Indicate if the logo is loaded and ready to be drawn. */
|
|
25
|
+
get isLoaded(): boolean;
|
|
26
|
+
activate(sprite: Sprite): Promise<boolean>;
|
|
27
|
+
/** Draw this sprite onto the supplied canvas.
|
|
28
|
+
* @see [[CanvasDecoration.drawDecoration]]
|
|
29
|
+
*/
|
|
30
|
+
drawDecoration(ctx: CanvasRenderingContext2D): void;
|
|
31
|
+
decorate(context: DecorateContext): void;
|
|
32
|
+
}
|
|
33
|
+
/** A decorator that adds the Google Maps logo to the lower left corner of the screen.
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare class GoogleMapsDecorator implements Decorator {
|
|
37
|
+
readonly logo: LogoDecoration;
|
|
38
|
+
private _showCreditsOnScreen?;
|
|
39
|
+
/** Create a new GoogleMapsDecorator.
|
|
40
|
+
* @param showCreditsOnScreen If true, the data attributions/copyrights from the Google Photorealistic 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed.
|
|
41
|
+
*/
|
|
42
|
+
constructor(showCreditsOnScreen?: boolean);
|
|
43
|
+
/** Activate the logo based on the given map type. */
|
|
44
|
+
activate(mapType: GoogleMapsMapTypes): Promise<boolean>;
|
|
45
|
+
/** Decorate implementation */
|
|
46
|
+
decorate: (context: DecorateContext) => void;
|
|
47
|
+
}
|
|
48
|
+
/** Get copyrights from tiles currently in the viewport.
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare function getCopyrights(vp: ScreenViewport): Map<string, number>;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=GoogleMapsDecorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleMapsDecorator.d.ts","sourceRoot":"","sources":["../../../src/internal/GoogleMapsDecorator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAe,MAAM,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,KAAK,kBAAkB,GAAI,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAE/D;;GAEG;AACH,qBAAa,cAAe,YAAW,gBAAgB;IACrD,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,4DAA4D;IAC5D,SAAgB,QAAQ,UAAiB;IAEzC,OAAO,CAAC,OAAO,CAAsB;IAErC,IAAW,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,EAE5C;IAED,0CAA0C;IAC1C,IAAW,MAAM,IALS,OAAO,GAAG,SAAS,CAO5C;IAED,4DAA4D;IACrD,qBAAqB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO;IAa/D,4DAA4D;IAC5D,IAAW,QAAQ,YAA8C;IAEpD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWvD;;OAEG;IACI,cAAc,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI;IAOnD,QAAQ,CAAC,OAAO,EAAE,eAAe;CAGzC;AAED;;GAEG;AACH,qBAAa,mBAAoB,YAAW,SAAS;IACnD,SAAgB,IAAI,iBAAwB;IAC5C,OAAO,CAAC,oBAAoB,CAAC,CAAU;IAEvC;;OAEG;gBACS,mBAAmB,CAAC,EAAE,OAAO;IAIzC,qDAAqD;IACxC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpE,8BAA8B;IACvB,QAAQ,YAAa,eAAe,UA2BzC;CACH;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,cAAc,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAcrE"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Point3d } from "@itwin/core-geometry";
|
|
6
|
+
import { IModelApp } from "../IModelApp";
|
|
7
|
+
import { IconSprites } from "../Sprites";
|
|
8
|
+
/** A simple decorator that shows the logo at a given screen position.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export class LogoDecoration {
|
|
12
|
+
_sprite;
|
|
13
|
+
/** The current position of the logo in view coordinates. */
|
|
14
|
+
position = new Point3d();
|
|
15
|
+
_offset;
|
|
16
|
+
set offset(offset) {
|
|
17
|
+
this._offset = offset;
|
|
18
|
+
}
|
|
19
|
+
/** The logo offset in view coordinates.*/
|
|
20
|
+
get offset() {
|
|
21
|
+
return this._offset;
|
|
22
|
+
}
|
|
23
|
+
/** Move the logo to the lower left corner of the screen. */
|
|
24
|
+
moveToLowerLeftCorner(context) {
|
|
25
|
+
if (!this._sprite || !this._sprite.isLoaded)
|
|
26
|
+
return false;
|
|
27
|
+
this.position.x = this._offset?.x ?? 0;
|
|
28
|
+
this.position.y = context.viewport.parentDiv.clientHeight - this._sprite.size.y;
|
|
29
|
+
if (this._offset?.y)
|
|
30
|
+
this.position.y -= this._offset.y;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
/* TODO: Add other move methods as needed */
|
|
34
|
+
/** Indicate if the logo is loaded and ready to be drawn. */
|
|
35
|
+
get isLoaded() { return this._sprite?.isLoaded ?? false; }
|
|
36
|
+
async activate(sprite) {
|
|
37
|
+
this._sprite = sprite;
|
|
38
|
+
return new Promise((resolve, _reject) => {
|
|
39
|
+
sprite.loadPromise.then(() => {
|
|
40
|
+
resolve(true);
|
|
41
|
+
}).catch(() => {
|
|
42
|
+
resolve(false);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/** Draw this sprite onto the supplied canvas.
|
|
47
|
+
* @see [[CanvasDecoration.drawDecoration]]
|
|
48
|
+
*/
|
|
49
|
+
drawDecoration(ctx) {
|
|
50
|
+
if (this.isLoaded) {
|
|
51
|
+
// Draw image with an origin at the top left corner
|
|
52
|
+
ctx.drawImage(this._sprite.image, 0, 0);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
decorate(context) {
|
|
56
|
+
context.addCanvasDecoration(this);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/** A decorator that adds the Google Maps logo to the lower left corner of the screen.
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export class GoogleMapsDecorator {
|
|
63
|
+
logo = new LogoDecoration();
|
|
64
|
+
_showCreditsOnScreen;
|
|
65
|
+
/** Create a new GoogleMapsDecorator.
|
|
66
|
+
* @param showCreditsOnScreen If true, the data attributions/copyrights from the Google Photorealistic 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed.
|
|
67
|
+
*/
|
|
68
|
+
constructor(showCreditsOnScreen) {
|
|
69
|
+
this._showCreditsOnScreen = showCreditsOnScreen;
|
|
70
|
+
}
|
|
71
|
+
/** Activate the logo based on the given map type. */
|
|
72
|
+
async activate(mapType) {
|
|
73
|
+
// Pick the logo that is the most visible on the background map
|
|
74
|
+
const imageName = mapType === "roadmap" ?
|
|
75
|
+
"google_on_white" :
|
|
76
|
+
"google_on_non_white";
|
|
77
|
+
// We need to move the logo right after the 'i.js' button
|
|
78
|
+
this.logo.offset = new Point3d(45, 10);
|
|
79
|
+
return this.logo.activate(IconSprites.getSpriteFromUrl(`${IModelApp.publicPath}images/${imageName}.png`));
|
|
80
|
+
}
|
|
81
|
+
;
|
|
82
|
+
/** Decorate implementation */
|
|
83
|
+
decorate = (context) => {
|
|
84
|
+
if (!this.logo.isLoaded)
|
|
85
|
+
return;
|
|
86
|
+
this.logo.moveToLowerLeftCorner(context);
|
|
87
|
+
this.logo.decorate(context);
|
|
88
|
+
if (!this._showCreditsOnScreen)
|
|
89
|
+
return;
|
|
90
|
+
// Get data attribution (copyright) text
|
|
91
|
+
const copyrightMap = getCopyrights(context.viewport);
|
|
92
|
+
// Order by most occurances to least
|
|
93
|
+
// See https://developers.google.com/maps/documentation/tile/create-renderer#display-attributions
|
|
94
|
+
const sortedCopyrights = [...copyrightMap.entries()].sort((a, b) => b[1] - a[1]);
|
|
95
|
+
const copyrightText = sortedCopyrights.map(([key]) => ` • ${key}`).join("");
|
|
96
|
+
// Create and add element, offset to leave space for i.js and Google logos
|
|
97
|
+
const elem = document.createElement("div");
|
|
98
|
+
elem.innerHTML = copyrightText;
|
|
99
|
+
elem.style.color = "white";
|
|
100
|
+
elem.style.fontSize = "11px";
|
|
101
|
+
elem.style.textWrap = "wrap";
|
|
102
|
+
elem.style.position = "absolute";
|
|
103
|
+
elem.style.bottom = "10px";
|
|
104
|
+
elem.style.left = "107px";
|
|
105
|
+
context.addHtmlDecoration(elem);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/** Get copyrights from tiles currently in the viewport.
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
export function getCopyrights(vp) {
|
|
112
|
+
const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;
|
|
113
|
+
const copyrightMap = new Map();
|
|
114
|
+
if (tiles) {
|
|
115
|
+
for (const tile of tiles) {
|
|
116
|
+
if (tile.copyright) {
|
|
117
|
+
for (const copyright of tile.copyright.split(";")) {
|
|
118
|
+
const currentCount = copyrightMap.get(copyright);
|
|
119
|
+
copyrightMap.set(copyright, currentCount ? currentCount + 1 : 1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return copyrightMap;
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=GoogleMapsDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleMapsDecorator.js","sourceRoot":"","sources":["../../../src/internal/GoogleMapsDecorator.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAU,MAAM,YAAY,CAAC;AASjD;;GAEG;AACH,MAAM,OAAO,cAAc;IACjB,OAAO,CAAU;IAEzB,4DAA4D;IAC5C,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAC;IAEjC,OAAO,CAAsB;IAErC,IAAW,MAAM,CAAC,MAA2B;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,0CAA0C;IAC1C,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,4DAA4D;IACrD,qBAAqB,CAAC,OAAwB;QACnD,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ;YACzC,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CA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ACD,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { Point3d } from \"@itwin/core-geometry\";\nimport { CanvasDecoration } from \"../render/CanvasDecoration\";\nimport { DecorateContext } from \"../ViewContext\";\nimport { IModelApp } from \"../IModelApp\";\nimport { Decorator } from \"../ViewManager\";\nimport { IconSprites, Sprite } from \"../Sprites\";\nimport { RealityTile } from \"../tile/internal\";\nimport { ScreenViewport } from \"../Viewport\";\n\n/** Layer types that can be added to the map.\n * @internal\n */\ntype GoogleMapsMapTypes = \"roadmap\" | \"satellite\" | \"terrain\";\n\n/** A simple decorator that shows the logo at a given screen position.\n * @internal\n */\nexport class LogoDecoration implements CanvasDecoration {\n private _sprite?: Sprite;\n\n /** The current position of the logo in view coordinates. */\n public readonly position = new Point3d();\n\n private _offset: Point3d | undefined;\n\n public set offset(offset: Point3d | undefined) {\n this._offset = offset;\n }\n\n /** The logo offset in view coordinates.*/\n public get offset() {\n return this._offset;\n }\n\n /** Move the logo to the lower left corner of the screen. */\n public moveToLowerLeftCorner(context: DecorateContext): boolean {\n if (!this._sprite || !this._sprite.isLoaded)\n return false;\n\n this.position.x = this._offset?.x ?? 0;\n this.position.y = context.viewport.parentDiv.clientHeight - this._sprite.size.y;\n if (this._offset?.y)\n this.position.y -= this._offset.y;\n return true;\n }\n\n /* TODO: Add other move methods as needed */\n\n /** Indicate if the logo is loaded and ready to be drawn. */\n public get isLoaded() { return this._sprite?.isLoaded ?? false; }\n\n public async activate(sprite: Sprite): Promise<boolean> {\n this._sprite = sprite;\n return new Promise<boolean>((resolve, _reject) => {\n sprite.loadPromise.then(() => {\n resolve(true);\n }).catch(() => {\n resolve (false);\n });\n });\n }\n\n /** Draw this sprite onto the supplied canvas.\n * @see [[CanvasDecoration.drawDecoration]]\n */\n public drawDecoration(ctx: CanvasRenderingContext2D): void {\n if (this.isLoaded) {\n // Draw image with an origin at the top left corner\n ctx.drawImage(this._sprite!.image!, 0, 0);\n }\n }\n\n public decorate(context: DecorateContext) {\n context.addCanvasDecoration(this);\n }\n}\n\n/** A decorator that adds the Google Maps logo to the lower left corner of the screen.\n * @internal\n */\nexport class GoogleMapsDecorator implements Decorator {\n public readonly logo = new LogoDecoration();\n private _showCreditsOnScreen?: boolean;\n\n /** Create a new GoogleMapsDecorator.\n * @param showCreditsOnScreen If true, the data attributions/copyrights from the Google Photorealistic 3D Tiles will be displayed on screen. The Google Maps logo will always be displayed.\n */\n constructor(showCreditsOnScreen?: boolean) {\n this._showCreditsOnScreen = showCreditsOnScreen;\n }\n\n /** Activate the logo based on the given map type. */\n public async activate(mapType: GoogleMapsMapTypes): Promise<boolean> {\n // Pick the logo that is the most visible on the background map\n const imageName = mapType === \"roadmap\" ?\n \"google_on_white\" :\n \"google_on_non_white\";\n\n // We need to move the logo right after the 'i.js' button\n this.logo.offset = new Point3d(45, 10);\n\n return this.logo.activate(IconSprites.getSpriteFromUrl(`${IModelApp.publicPath}images/${imageName}.png`));\n };\n\n /** Decorate implementation */\n public decorate = (context: DecorateContext) => {\n if (!this.logo.isLoaded)\n return;\n this.logo.moveToLowerLeftCorner(context);\n this.logo.decorate(context);\n\n if (!this._showCreditsOnScreen)\n return;\n\n // Get data attribution (copyright) text\n const copyrightMap = getCopyrights(context.viewport);\n // Order by most occurances to least\n // See https://developers.google.com/maps/documentation/tile/create-renderer#display-attributions\n const sortedCopyrights = [...copyrightMap.entries()].sort((a, b) => b[1] - a[1]);\n const copyrightText = sortedCopyrights.map(([key]) => ` • ${key}`).join(\"\");\n\n // Create and add element, offset to leave space for i.js and Google logos\n const elem = document.createElement(\"div\");\n elem.innerHTML = copyrightText;\n elem.style.color = \"white\";\n elem.style.fontSize = \"11px\";\n elem.style.textWrap = \"wrap\";\n elem.style.position = \"absolute\";\n elem.style.bottom = \"10px\";\n elem.style.left = \"107px\";\n\n context.addHtmlDecoration(elem);\n };\n}\n\n/** Get copyrights from tiles currently in the viewport.\n * @internal\n */\nexport function getCopyrights(vp: ScreenViewport): Map<string, number> {\n const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;\n const copyrightMap = new Map<string, number>();\n if (tiles) {\n for (const tile of tiles as Set<RealityTile>) {\n if (tile.copyright) {\n for (const copyright of tile.copyright.split(\";\")) {\n const currentCount = copyrightMap.get(copyright);\n copyrightMap.set(copyright, currentCount ? currentCount + 1 : 1);\n }\n }\n }\n }\n return copyrightMap;\n}"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Tiles
|
|
3
|
+
*/
|
|
4
|
+
import { GuidString } from "@itwin/core-bentley";
|
|
5
|
+
import { RealityData, RealityDataSourceKey, RealityDataSourceProps } from "@itwin/core-common";
|
|
6
|
+
import { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from "../RealityDataSource";
|
|
7
|
+
/** This class provides access to the reality data provider services.
|
|
8
|
+
* It encapsulates access to a reality data from the Google Photorealistic 3D Tiles service.
|
|
9
|
+
* A valid Google 3D Tiles authentication key must be configured for this provider to work (provide the key in the [[RealityDataSourceGoogle3dTilesImpl.createFromKey]] method).
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class RealityDataSourceGoogle3dTilesImpl implements RealityDataSource {
|
|
13
|
+
readonly key: RealityDataSourceKey;
|
|
14
|
+
/** The URL that supplies the 3d tiles for displaying the Google 3D Tiles tileset. */
|
|
15
|
+
private _tilesetUrl;
|
|
16
|
+
/** Base URL of the Google 3D Tiles tileset. Does not include trailing subdirectories. */
|
|
17
|
+
private _baseUrl;
|
|
18
|
+
/** Search parameters that must be passed down to child tile requests. */
|
|
19
|
+
private _searchParams?;
|
|
20
|
+
/** Google Map Tiles API Key used to access Google 3D Tiles. */
|
|
21
|
+
private _apiKey?;
|
|
22
|
+
/** Function that returns an OAuth token for authenticating with GP3sDT. This token is expected to not contain the "Bearer" prefix. */
|
|
23
|
+
private _getAuthToken?;
|
|
24
|
+
/** This is necessary for Google 3D Tiles tilesets! This tells the iTwin.js tiling system to use the geometric error specified in the tileset rather than any of our own. */
|
|
25
|
+
readonly usesGeometricError = true;
|
|
26
|
+
readonly maximumScreenSpaceError = 16;
|
|
27
|
+
/** Construct a new reality data source.
|
|
28
|
+
* @param props JSON representation of the reality data source
|
|
29
|
+
*/
|
|
30
|
+
protected constructor(props: RealityDataSourceProps, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>);
|
|
31
|
+
/**
|
|
32
|
+
* Create an instance of this class from a source key and iTwin context.
|
|
33
|
+
*/
|
|
34
|
+
static createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>): Promise<RealityDataSource | undefined>;
|
|
35
|
+
get isContextShare(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Returns Reality Data if available
|
|
38
|
+
*/
|
|
39
|
+
get realityData(): RealityData | undefined;
|
|
40
|
+
get realityDataId(): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Returns Reality Data type if available
|
|
43
|
+
*/
|
|
44
|
+
get realityDataType(): string | undefined;
|
|
45
|
+
getTilesetUrl(): string | undefined;
|
|
46
|
+
/** Return the URL of the Google 3D Tiles tileset with its API key included. */
|
|
47
|
+
private getTilesetUrlWithKey;
|
|
48
|
+
protected setBaseUrl(url: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* This method returns the URL to access the actual 3d tiles from the service provider.
|
|
51
|
+
* @returns string containing the URL to reality data.
|
|
52
|
+
*/
|
|
53
|
+
getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined>;
|
|
54
|
+
getRootDocument(_iTwinId: GuidString | undefined): Promise<any>;
|
|
55
|
+
/** Returns the tile URL relative to the base URL.
|
|
56
|
+
* If the tile path is a relative URL, the base URL is prepended to it.
|
|
57
|
+
* For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.
|
|
58
|
+
*/
|
|
59
|
+
getTileUrl(tilePath: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
62
|
+
*/
|
|
63
|
+
getTileContent(name: string): Promise<ArrayBuffer>;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
66
|
+
*/
|
|
67
|
+
getTileJson(name: string): Promise<any>;
|
|
68
|
+
getTileContentType(url: string): "tile" | "tileset";
|
|
69
|
+
/**
|
|
70
|
+
* Gets spatial location and extents of this reality data source
|
|
71
|
+
* @returns spatial location and extents
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* Gets information to identify the product and engine that create this reality data
|
|
77
|
+
* Will return undefined if cannot be resolved
|
|
78
|
+
* @returns information to identify the product and engine that create this reality data
|
|
79
|
+
* @alpha
|
|
80
|
+
*/
|
|
81
|
+
getPublisherProductInfo(): Promise<PublisherProductInfo | undefined>;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=RealityDataSourceGoogle3dTilesImpl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RealityDataSourceGoogle3dTilesImpl.d.ts","sourceRoot":"","sources":["../../../src/internal/RealityDataSourceGoogle3dTilesImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAiB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAe,WAAW,EAAqB,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG/H,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAG1G;;;;EAIE;AACF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S,CAAC;IAI5E,eAAe,CAAC,QAAQ,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC;IAmB5E;;;OAGG;IACI,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IA8B3C;;OAEG;IACU,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAa/D;;OAEG;IACU,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAa7C,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI1D;;;;OAIG;IACU,4BAA4B,IAAI,OAAO,CAAC,yBAAyB,GAAG,SAAS,CAAC;IAQ3F;;;;;OAKG;IACU,uBAAuB,IAAI,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;CAIlF"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Tiles
|
|
7
|
+
*/
|
|
8
|
+
import { BentleyStatus } from "@itwin/core-bentley";
|
|
9
|
+
import { IModelError, RealityDataFormat } from "@itwin/core-common";
|
|
10
|
+
import { request } from "../request/Request";
|
|
11
|
+
import { ThreeDTileFormatInterpreter } from "../tile/internal";
|
|
12
|
+
/** This class provides access to the reality data provider services.
|
|
13
|
+
* It encapsulates access to a reality data from the Google Photorealistic 3D Tiles service.
|
|
14
|
+
* A valid Google 3D Tiles authentication key must be configured for this provider to work (provide the key in the [[RealityDataSourceGoogle3dTilesImpl.createFromKey]] method).
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export class RealityDataSourceGoogle3dTilesImpl {
|
|
18
|
+
key;
|
|
19
|
+
/** The URL that supplies the 3d tiles for displaying the Google 3D Tiles tileset. */
|
|
20
|
+
_tilesetUrl;
|
|
21
|
+
/** Base URL of the Google 3D Tiles tileset. Does not include trailing subdirectories. */
|
|
22
|
+
_baseUrl = "";
|
|
23
|
+
/** Search parameters that must be passed down to child tile requests. */
|
|
24
|
+
_searchParams;
|
|
25
|
+
/** Google Map Tiles API Key used to access Google 3D Tiles. */
|
|
26
|
+
_apiKey;
|
|
27
|
+
/** Function that returns an OAuth token for authenticating with GP3sDT. This token is expected to not contain the "Bearer" prefix. */
|
|
28
|
+
_getAuthToken;
|
|
29
|
+
/** This is necessary for Google 3D Tiles tilesets! This tells the iTwin.js tiling system to use the geometric error specified in the tileset rather than any of our own. */
|
|
30
|
+
usesGeometricError = true;
|
|
31
|
+
maximumScreenSpaceError = 16;
|
|
32
|
+
/** Construct a new reality data source.
|
|
33
|
+
* @param props JSON representation of the reality data source
|
|
34
|
+
*/
|
|
35
|
+
constructor(props, apiKey, _getAuthToken) {
|
|
36
|
+
this.key = props.sourceKey;
|
|
37
|
+
this._tilesetUrl = this.key.id;
|
|
38
|
+
this._apiKey = apiKey;
|
|
39
|
+
this._getAuthToken = _getAuthToken;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create an instance of this class from a source key and iTwin context.
|
|
43
|
+
*/
|
|
44
|
+
static async createFromKey(sourceKey, _iTwinId, apiKey, _getAuthToken) {
|
|
45
|
+
return new RealityDataSourceGoogle3dTilesImpl({ sourceKey }, apiKey, _getAuthToken);
|
|
46
|
+
}
|
|
47
|
+
get isContextShare() {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Returns Reality Data if available
|
|
52
|
+
*/
|
|
53
|
+
get realityData() {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
get realityDataId() {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns Reality Data type if available
|
|
61
|
+
*/
|
|
62
|
+
get realityDataType() {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
getTilesetUrl() {
|
|
66
|
+
return this._tilesetUrl;
|
|
67
|
+
}
|
|
68
|
+
/** Return the URL of the Google 3D Tiles tileset with its API key included. */
|
|
69
|
+
getTilesetUrlWithKey() {
|
|
70
|
+
const google3dTilesKey = this._apiKey;
|
|
71
|
+
if (this._getAuthToken) {
|
|
72
|
+
// If we have a getAuthToken function, no need to append API key to the URL
|
|
73
|
+
return this._tilesetUrl;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return `${this._tilesetUrl}?key=${google3dTilesKey}`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
setBaseUrl(url) {
|
|
80
|
+
const urlParts = url.split("/");
|
|
81
|
+
const newUrl = new URL(url);
|
|
82
|
+
this._searchParams = newUrl.searchParams;
|
|
83
|
+
urlParts.pop();
|
|
84
|
+
if (urlParts.length === 0) {
|
|
85
|
+
this._baseUrl = "";
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this._baseUrl = newUrl.origin;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* This method returns the URL to access the actual 3d tiles from the service provider.
|
|
93
|
+
* @returns string containing the URL to reality data.
|
|
94
|
+
*/
|
|
95
|
+
async getServiceUrl(_iTwinId) {
|
|
96
|
+
return this._tilesetUrl;
|
|
97
|
+
}
|
|
98
|
+
async getRootDocument(_iTwinId) {
|
|
99
|
+
const url = this.getTilesetUrlWithKey();
|
|
100
|
+
if (!url)
|
|
101
|
+
throw new IModelError(BentleyStatus.ERROR, "Unable to get service url");
|
|
102
|
+
this.setBaseUrl(url);
|
|
103
|
+
let authToken;
|
|
104
|
+
if (this._getAuthToken) {
|
|
105
|
+
authToken = await this._getAuthToken();
|
|
106
|
+
}
|
|
107
|
+
return request(url, "json", authToken ? {
|
|
108
|
+
headers: {
|
|
109
|
+
authorization: `Bearer ${authToken}`
|
|
110
|
+
}
|
|
111
|
+
} : undefined);
|
|
112
|
+
}
|
|
113
|
+
/** Returns the tile URL relative to the base URL.
|
|
114
|
+
* If the tile path is a relative URL, the base URL is prepended to it.
|
|
115
|
+
* For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.
|
|
116
|
+
*/
|
|
117
|
+
getTileUrl(tilePath) {
|
|
118
|
+
// this._baseUrl does not include the trailing subdirectories.
|
|
119
|
+
// This is not an issue because the tile path always starts with the appropriate subdirectories.
|
|
120
|
+
// We also do not need to worry about the tile path starting with a slash.
|
|
121
|
+
// This happens in these tiles at the second .json level, but the URL API will handle that for us.
|
|
122
|
+
const url = new URL(tilePath, this._baseUrl);
|
|
123
|
+
// If tile is a reference to a tileset, iterate over tileset url's search params and store them in this._searchParams so we can pass them down to children
|
|
124
|
+
if (this.getTileContentType(url.toString()) === "tileset" && url.searchParams.size !== 0) {
|
|
125
|
+
for (const [key, value] of url.searchParams.entries()) {
|
|
126
|
+
this._searchParams?.append(key, value);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (this._searchParams === undefined || this._searchParams.size === 0) {
|
|
130
|
+
return url.toString();
|
|
131
|
+
}
|
|
132
|
+
// Append all stored search params to url's existing ones
|
|
133
|
+
const newUrl = new URL(url.toString());
|
|
134
|
+
for (const [key, value] of this._searchParams.entries()) {
|
|
135
|
+
if (!url.searchParams.has(key)) {
|
|
136
|
+
// Only append the search param if it does not already exist in the url
|
|
137
|
+
newUrl.searchParams.append(key, value);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return newUrl.toString();
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
144
|
+
*/
|
|
145
|
+
async getTileContent(name) {
|
|
146
|
+
let authToken;
|
|
147
|
+
if (this._getAuthToken) {
|
|
148
|
+
authToken = await this._getAuthToken();
|
|
149
|
+
}
|
|
150
|
+
return request(this.getTileUrl(name), "arraybuffer", authToken ? {
|
|
151
|
+
headers: {
|
|
152
|
+
authorization: `Bearer ${authToken}`
|
|
153
|
+
}
|
|
154
|
+
} : undefined);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
158
|
+
*/
|
|
159
|
+
async getTileJson(name) {
|
|
160
|
+
let authToken;
|
|
161
|
+
if (this._getAuthToken) {
|
|
162
|
+
authToken = await this._getAuthToken();
|
|
163
|
+
}
|
|
164
|
+
return request(this.getTileUrl(name), "json", authToken ? {
|
|
165
|
+
headers: {
|
|
166
|
+
authorization: `Bearer ${authToken}`
|
|
167
|
+
}
|
|
168
|
+
} : undefined);
|
|
169
|
+
}
|
|
170
|
+
getTileContentType(url) {
|
|
171
|
+
return new URL(url, "https://localhost/").pathname.toLowerCase().endsWith("json") ? "tileset" : "tile";
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Gets spatial location and extents of this reality data source
|
|
175
|
+
* @returns spatial location and extents
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
async getSpatialLocationAndExtents() {
|
|
179
|
+
let spatialLocation;
|
|
180
|
+
if (this.key.format === RealityDataFormat.ThreeDTile) {
|
|
181
|
+
const rootDocument = await this.getRootDocument(undefined);
|
|
182
|
+
spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);
|
|
183
|
+
}
|
|
184
|
+
return spatialLocation;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Gets information to identify the product and engine that create this reality data
|
|
188
|
+
* Will return undefined if cannot be resolved
|
|
189
|
+
* @returns information to identify the product and engine that create this reality data
|
|
190
|
+
* @alpha
|
|
191
|
+
*/
|
|
192
|
+
async getPublisherProductInfo() {
|
|
193
|
+
let publisherInfo;
|
|
194
|
+
return publisherInfo;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=RealityDataSourceGoogle3dTilesImpl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RealityDataSourceGoogle3dTilesImpl.js","sourceRoot":"","sources":["../../../src/internal/RealityDataSourceGoogle3dTilesImpl.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,aAAa,EAAc,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAe,iBAAiB,EAAgD,MAAM,oBAAoB,CAAC;AAE/H,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;EAIE;AACF,MAAM,OAAO,kCAAkC;IAC7B,GAAG,CAAuB;IAC1C,qFAAqF;IAC7E,WAAW,CAAqB;IACxC,yFAAyF;IACjF,QAAQ,GAAW,EAAE,CAAA;IAC7B,yEAAyE;IACjE,aAAa,CAAmB;IACxC,+DAA+D;IACvD,OAAO,CAAU;IACzB,sIAAsI;IAC9H,aAAa,CAAqC;IAE1D,4KAA4K;IAC5J,kBAAkB,GAAG,IAAI,CAAC;IAC1B,uBAAuB,GAAG,EAAE,CAAC;IAE7C;;OAEG;IACH,YAAsB,KAA6B,EAAE,MAA0B,EAAE,aAAiD;QAChI,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,SAA+B,EAAE,QAAgC,EAAE,MAA0B,EAAE,aAAiD;QAChL,OAAO,IAAI,kCAAkC,CAAC,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;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AC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACzG,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,4BAA4B;QACvC,IAAI,eAAsD,CAAC;QAC3D,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,iBAAiB,CAAC,UAAU,EAAE,CAAC;YACrD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAC3D,eAAe,GAAG,2BAA2B,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\nimport { BentleyStatus, GuidString } from \"@itwin/core-bentley\";\nimport { IModelError, RealityData, RealityDataFormat, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\n\nimport { request } from \"../request/Request\";\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"../RealityDataSource\";\nimport { ThreeDTileFormatInterpreter } from \"../tile/internal\";\n\n/** This class provides access to the reality data provider services.\n * It encapsulates access to a reality data from the Google Photorealistic 3D Tiles service.\n * A valid Google 3D Tiles authentication key must be configured for this provider to work (provide the key in the [[RealityDataSourceGoogle3dTilesImpl.createFromKey]] method).\n* @internal\n*/\nexport class RealityDataSourceGoogle3dTilesImpl implements RealityDataSource {\n public readonly key: RealityDataSourceKey;\n /** The URL that supplies the 3d tiles for displaying the Google 3D Tiles tileset. */\n private _tilesetUrl: string | undefined;\n /** Base URL of the Google 3D Tiles tileset. Does not include trailing subdirectories. */\n private _baseUrl: string = \"\"\n /** Search parameters that must be passed down to child tile requests. */\n private _searchParams?: URLSearchParams;\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\n private _apiKey?: string;\n /** Function that returns an OAuth token for authenticating with GP3sDT. This token is expected to not contain the \"Bearer\" prefix. */\n private _getAuthToken?: () => Promise<string | undefined>;\n\n /** This is necessary for Google 3D Tiles tilesets! This tells the iTwin.js tiling system to use the geometric error specified in the tileset rather than any of our own. */\n public readonly usesGeometricError = true;\n public readonly maximumScreenSpaceError = 16;\n\n /** Construct a new reality data source.\n * @param props JSON representation of the reality data source\n */\n protected constructor(props: RealityDataSourceProps, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>) {\n this.key = props.sourceKey;\n this._tilesetUrl = this.key.id;\n this._apiKey = apiKey;\n this._getAuthToken = _getAuthToken;\n }\n\n /**\n * Create an instance of this class from a source key and iTwin context.\n */\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>): Promise<RealityDataSource | undefined> {\n return new RealityDataSourceGoogle3dTilesImpl({ sourceKey }, apiKey, _getAuthToken);\n }\n\n public get isContextShare(): boolean {\n return false;\n }\n /**\n * Returns Reality Data if available\n */\n public get realityData(): RealityData | undefined {\n return undefined;\n }\n public get realityDataId(): string | undefined {\n return undefined;\n }\n /**\n * Returns Reality Data type if available\n */\n public get realityDataType(): string | undefined {\n return undefined;\n }\n\n public getTilesetUrl(): string | undefined {\n return this._tilesetUrl;\n }\n\n /** Return the URL of the Google 3D Tiles tileset with its API key included. */\n private getTilesetUrlWithKey() {\n const google3dTilesKey = this._apiKey;\n if (this._getAuthToken) {\n // If we have a getAuthToken function, no need to append API key to the URL\n return this._tilesetUrl;\n } else {\n return `${this._tilesetUrl}?key=${google3dTilesKey}`;\n }\n }\n\n protected setBaseUrl(url: string): void {\n const urlParts = url.split(\"/\");\n const newUrl = new URL(url);\n this._searchParams = newUrl.searchParams;\n urlParts.pop();\n if (urlParts.length === 0) {\n this._baseUrl = \"\";\n } else {\n this._baseUrl = newUrl.origin;\n }\n }\n\n /**\n * This method returns the URL to access the actual 3d tiles from the service provider.\n * @returns string containing the URL to reality data.\n */\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\n return this._tilesetUrl;\n }\n\n public async getRootDocument(_iTwinId: GuidString | undefined): Promise<any> {\n const url = this.getTilesetUrlWithKey();\n if (!url)\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\n\n this.setBaseUrl(url);\n\n let authToken;\n if (this._getAuthToken) {\n authToken = await this._getAuthToken();\n }\n\n return request(url, \"json\", authToken ? {\n headers: {\n authorization: `Bearer ${authToken}`\n }} : undefined\n );\n }\n\n /** Returns the tile URL relative to the base URL.\n * If the tile path is a relative URL, the base URL is prepended to it.\n * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.\n */\n public getTileUrl(tilePath: string): string {\n // this._baseUrl does not include the trailing subdirectories.\n // This is not an issue because the tile path always starts with the appropriate subdirectories.\n // We also do not need to worry about the tile path starting with a slash.\n // This happens in these tiles at the second .json level, but the URL API will handle that for us.\n const url = new URL(tilePath, this._baseUrl);\n\n // If tile is a reference to a tileset, iterate over tileset url's search params and store them in this._searchParams so we can pass them down to children\n if (this.getTileContentType(url.toString()) === \"tileset\" && url.searchParams.size !== 0) {\n for (const [key, value] of url.searchParams.entries()) {\n this._searchParams?.append(key, value);\n }\n }\n\n if (this._searchParams === undefined || this._searchParams.size === 0) {\n return url.toString();\n }\n\n // Append all stored search params to url's existing ones\n const newUrl = new URL(url.toString());\n for (const [key, value] of this._searchParams.entries()) {\n if (!url.searchParams.has(key)) {\n // Only append the search param if it does not already exist in the url\n newUrl.searchParams.append(key, value);\n }\n }\n\n return newUrl.toString();\n }\n\n /**\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\n */\n public async getTileContent(name: string): Promise<ArrayBuffer> {\n let authToken;\n if (this._getAuthToken) {\n authToken = await this._getAuthToken();\n }\n\n return request(this.getTileUrl(name), \"arraybuffer\", authToken ? {\n headers: {\n authorization: `Bearer ${authToken}`\n }} : undefined\n );\n }\n\n /**\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\n */\n public async getTileJson(name: string): Promise<any> {\n let authToken;\n if (this._getAuthToken) {\n authToken = await this._getAuthToken();\n }\n\n return request(this.getTileUrl(name), \"json\", authToken ? {\n headers: {\n authorization: `Bearer ${authToken}`\n }} : undefined\n );\n }\n\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\n return new URL(url, \"https://localhost/\").pathname.toLowerCase().endsWith(\"json\") ? \"tileset\" : \"tile\";\n }\n\n /**\n * Gets spatial location and extents of this reality data source\n * @returns spatial location and extents\n * @internal\n */\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\n let spatialLocation: SpatialLocationAndExtents | undefined;\n if (this.key.format === RealityDataFormat.ThreeDTile) {\n const rootDocument = await this.getRootDocument(undefined);\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\n }\n return spatialLocation;\n }\n /**\n * Gets information to identify the product and engine that create this reality data\n * Will return undefined if cannot be resolved\n * @returns information to identify the product and engine that create this reality data\n * @alpha\n */\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\n let publisherInfo: PublisherProductInfo | undefined;\n return publisherInfo;\n }\n}\n\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Id64String } from "@itwin/core-bentley";
|
|
2
|
+
import { RenderSchedule } from "@itwin/core-common";
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare function getScriptDelta(prev: RenderSchedule.Script | undefined | null, next: RenderSchedule.Script): Set<Id64String>;
|
|
5
|
+
//# sourceMappingURL=ScriptUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScriptUtils.d.ts","sourceRoot":"","sources":["../../../src/internal/ScriptUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,gBAAgB;AAChB,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,CA4C3H"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/** @internal */
|
|
2
|
+
export function getScriptDelta(prev, next) {
|
|
3
|
+
if (!prev || !prev.modelTimelines || prev.modelTimelines.length === 0) {
|
|
4
|
+
return getAllElementIdsFromScript(next);
|
|
5
|
+
}
|
|
6
|
+
const changed = new Set();
|
|
7
|
+
const prevModels = new Map(prev.modelTimelines.map(m => [m.modelId, m]));
|
|
8
|
+
const nextModels = new Map(next.modelTimelines.map(m => [m.modelId, m]));
|
|
9
|
+
for (const modelId of new Set([...prevModels.keys(), ...nextModels.keys()])) {
|
|
10
|
+
const prevModel = prevModels.get(modelId);
|
|
11
|
+
const nextModel = nextModels.get(modelId);
|
|
12
|
+
if (!prevModel || !nextModel) {
|
|
13
|
+
const timelines = (prevModel ?? nextModel)?.elementTimelines ?? [];
|
|
14
|
+
for (const timeline of timelines)
|
|
15
|
+
for (const id of timeline.elementIds)
|
|
16
|
+
changed.add(id);
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const prevTimelineMap = new Map(prevModel.elementTimelines.map(et => [et.batchId, et]));
|
|
20
|
+
const nextTimelineMap = new Map(nextModel.elementTimelines.map(et => [et.batchId, et]));
|
|
21
|
+
const allBatchIds = new Set([...prevTimelineMap.keys(), ...nextTimelineMap.keys()]);
|
|
22
|
+
for (const batchId of allBatchIds) {
|
|
23
|
+
const prevTimeline = prevTimelineMap.get(batchId);
|
|
24
|
+
const nextTimeline = nextTimelineMap.get(batchId);
|
|
25
|
+
if (!prevTimeline || !nextTimeline) {
|
|
26
|
+
const ids = (prevTimeline ?? nextTimeline)?.elementIds ?? [];
|
|
27
|
+
for (const id of ids)
|
|
28
|
+
changed.add(id);
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (!isTimelineEntryEqual(prevTimeline, nextTimeline)) {
|
|
32
|
+
for (const id of nextTimeline.elementIds)
|
|
33
|
+
changed.add(id);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return changed;
|
|
38
|
+
}
|
|
39
|
+
function collectTimelineEntryTimes(timeline) {
|
|
40
|
+
const result = new Set();
|
|
41
|
+
if (timeline.cuttingPlane) {
|
|
42
|
+
for (const entry of timeline.cuttingPlane) {
|
|
43
|
+
result.add(entry.time);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (timeline.visibility) {
|
|
47
|
+
for (const entry of timeline.visibility) {
|
|
48
|
+
result.add(entry.time);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (timeline.transform) {
|
|
52
|
+
for (const entry of timeline.transform) {
|
|
53
|
+
result.add(entry.time);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (timeline.color) {
|
|
57
|
+
for (const entry of timeline.color) {
|
|
58
|
+
result.add(entry.time);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return Array.from(result);
|
|
62
|
+
}
|
|
63
|
+
function isTimelineEntryEqual(a, b) {
|
|
64
|
+
const timesSet = new Set([
|
|
65
|
+
...collectTimelineEntryTimes(a),
|
|
66
|
+
...collectTimelineEntryTimes(b),
|
|
67
|
+
]);
|
|
68
|
+
let times = Array.from(timesSet).sort((x, y) => x - y);
|
|
69
|
+
if (times.length === 0) {
|
|
70
|
+
times = [0, 0.25, 0.5, 0.75, 1];
|
|
71
|
+
}
|
|
72
|
+
for (const [] of a.elementIds) {
|
|
73
|
+
for (const t of times) {
|
|
74
|
+
// Check visibility
|
|
75
|
+
const v1 = a.getVisibility(t);
|
|
76
|
+
const v2 = b.getVisibility(t);
|
|
77
|
+
if (Math.abs(v1 - v2) > 0.01)
|
|
78
|
+
return false;
|
|
79
|
+
// Check Transform
|
|
80
|
+
const tf1 = a.getAnimationTransform(t);
|
|
81
|
+
const tf2 = b.getAnimationTransform(t);
|
|
82
|
+
if (!tf1.isAlmostEqual(tf2))
|
|
83
|
+
return false;
|
|
84
|
+
// Check Color
|
|
85
|
+
const c1 = a.getColor(t);
|
|
86
|
+
const c2 = b.getColor(t);
|
|
87
|
+
if ((c1 === undefined) !== (c2 === undefined))
|
|
88
|
+
return false;
|
|
89
|
+
if (c1 !== undefined && !c1.equals(c2))
|
|
90
|
+
return false;
|
|
91
|
+
// Cutting Plane (CLIPPING)
|
|
92
|
+
const clip1 = a.getCuttingPlane?.(t);
|
|
93
|
+
const clip2 = b.getCuttingPlane?.(t);
|
|
94
|
+
const oneUndefined = (clip1 === undefined) !== (clip2 === undefined);
|
|
95
|
+
if (oneUndefined)
|
|
96
|
+
return false;
|
|
97
|
+
if (clip1 && clip2) {
|
|
98
|
+
if (!clip1.getOriginRef().isAlmostEqual(clip2.getOriginRef(), 1e-6) ||
|
|
99
|
+
!clip1.getNormalRef().isAlmostEqual(clip2.getNormalRef(), 1e-6)) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
function getAllElementIdsFromScript(script) {
|
|
108
|
+
const ids = new Set();
|
|
109
|
+
for (const modelTimeline of script.modelTimelines) {
|
|
110
|
+
for (const elementTimeline of modelTimeline.elementTimelines) {
|
|
111
|
+
for (const id of elementTimeline.elementIds)
|
|
112
|
+
ids.add(id);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return ids;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=ScriptUtils.js.map
|