@itwin/core-common 5.5.0-dev.2 → 5.5.0-dev.4
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 +12 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
# Change Log - @itwin/core-common
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 02 Dec 2025 23:11:57 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.4.0
|
|
6
|
+
Tue, 02 Dec 2025 21:22:25 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Fixes and enhancements for text fields.
|
|
11
|
+
- Fix MapImagerySettings failing to preserve solid black background base.
|
|
12
|
+
- Add APIs for project and sheet information.
|
|
13
|
+
- Added changeset_index as a part of ChangesetHealthStats.
|
|
14
|
+
- Added new terminatorShape property in TextStyleSettings
|
|
4
15
|
|
|
5
16
|
## 5.3.3
|
|
6
17
|
Thu, 20 Nov 2025 22:30:37 GMT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmbientOcclusion.js","sourceRoot":"","sources":["../../src/AmbientOcclusion.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAEhD;;GAEG;AACH,IAAiB,gBAAgB,CAwEhC;AAxED,WAAiB,gBAAgB;IAqB/B,wJAAwJ;IACxJ,MAAa,QAAQ;QACX,MAAM,CAAC,YAAY,GAAW,IAAI,CAAC;QACnC,MAAM,CAAC,kBAAkB,GAAW,MAAM,CAAC;QAC3C,MAAM,CAAC,mBAAmB,GAAW,OAAO,CAAC;QAC7C,MAAM,CAAC,iBAAiB,GAAW,GAAG,CAAC;QACvC,MAAM,CAAC,qBAAqB,GAAW,CAAC,CAAC;QACzC,MAAM,CAAC,iBAAiB,GAAW,GAAG,CAAC;QACvC,MAAM,CAAC,iBAAiB,GAAW,GAAG,CAAC;QACvC,MAAM,CAAC,yBAAyB,GAAW,GAAG,CAAC;QAEvC,IAAI,CAAS;QACb,UAAU,CAAS;QACnB,WAAW,CAAS;QACpB,SAAS,CAAS;QAClB,aAAa,CAAS;QACtB,SAAS,CAAS;QAClB,SAAS,CAAS;QAClB,iBAAiB,CAAS;QAE1C,YAAoB,IAAY;YAC9B,IAAI,SAAS,KAAK,IAAI;gBACpB,IAAI,GAAG,EAAE,CAAC;YAEZ,IAAI,CAAC,IAAI,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;YACjE,IAAI,CAAC,UAAU,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;YACnF,IAAI,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AAC,WAAW,KAAK,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;gBAC7F,SAAS,EAAE,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBACrF,aAAa,EAAE,IAAI,CAAC,aAAa,KAAK,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;gBACrG,SAAS,EAAE,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBACrF,SAAS,EAAE,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBACrF,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,KAAK,QAAQ,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS;aACtH,CAAC;QACJ,CAAC;;IAhDU,yBAAQ,WAiDpB,CAAA;AACH,CAAC,EAxEgB,gBAAgB,gCAAhB,gBAAgB,QAwEhC","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 DisplayStyles\n */\n\nimport { JsonUtils } from \"@itwin/core-bentley\";\n\n/** Namespace containing types controlling how ambient occlusion should be drawn.\n * @public\n */\nexport namespace AmbientOcclusion {\n /** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */\n export interface Props {\n /** If defined, represents an angle in radians. If the dot product between the normal of the sample and the vector to the camera is less than this value, sampling stops in the current direction. This is used to remove shadows from near planar edges. If undefined, the bias defaults to 0.25. */\n readonly bias?: number;\n /** If defined, if the distance in linear depth from the current sample to first sample is greater than this value, sampling stops in the current direction. If undefined, the zLengthCap defaults to 0.0025. The full range of linear depth is 0 to 1. */\n readonly zLengthCap?: number;\n /** If defined, the maximum distance from the camera's near plane in meters at which ambient occlusion will be applied. If undefined, the maximum distance defaults to 10000. */\n readonly maxDistance?: number;\n /** If defined, raise the final ambient occlusion to the power of this value. Larger values make the ambient shadows darker. If undefined, the intensity defaults to 2.0. */\n readonly intensity?: number;\n /** If defined, indicates the texel distance to step toward the next texel sample in the current direction. For portions of geometry close to the near plane, this value will be what is used. As portions of geometry extend away from the near plane, this value will gradually reduce until it reaches a minimum value of 1.0 at the far plane. If undefined, texelStepSize defaults to 1.95. */\n readonly texelStepSize?: number;\n /** If defined, blurDelta is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurDelta defaults to 1.0. */\n readonly blurDelta?: number;\n /** If defined, blurSigma is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurSigma defaults to 2.0. */\n readonly blurSigma?: number;\n /* If defined, blurTexelStepSize indicates the distance to the next texel for blurring. If undefined, blurTexelStepSize defaults to 1.0. */\n readonly blurTexelStepSize?: number;\n }\n\n /** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */\n export class Settings implements Props {\n private static _defaultBias: number = 0.25;\n private static _defaultZLengthCap: number = 0.0025;\n private static _defaultMaxDistance: number = 10000.0;\n private static _defaultIntensity: number = 1.0;\n private static _defaultTexelStepSize: number = 1;\n private static _defaultBlurDelta: number = 1.0;\n private static _defaultBlurSigma: number = 2.0;\n private static _defaultBlurTexelStepSize: number = 1.0;\n\n public readonly bias: number;\n public readonly zLengthCap: number;\n public readonly maxDistance: number;\n public readonly intensity: number;\n public readonly texelStepSize: number;\n public readonly blurDelta: number;\n public readonly blurSigma: number;\n public readonly blurTexelStepSize: number;\n\n private constructor(json?: Props) {\n if (undefined === json)\n json = {};\n\n this.bias = JsonUtils.asDouble(json.bias, Settings._defaultBias);\n this.zLengthCap = JsonUtils.asDouble(json.zLengthCap, Settings._defaultZLengthCap);\n this.maxDistance = JsonUtils.asDouble(json.maxDistance, Settings._defaultMaxDistance);\n this.intensity = JsonUtils.asDouble(json.intensity, Settings._defaultIntensity);\n this.texelStepSize = JsonUtils.asDouble(json.texelStepSize, Settings._defaultTexelStepSize);\n this.blurDelta = JsonUtils.asDouble(json.blurDelta, Settings._defaultBlurDelta);\n this.blurSigma = JsonUtils.asDouble(json.blurSigma, Settings._defaultBlurSigma);\n this.blurTexelStepSize = JsonUtils.asDouble(json.blurTexelStepSize, Settings._defaultBlurTexelStepSize);\n }\n\n public static defaults = new Settings({});\n\n public static fromJSON(json?: Props): Settings { return undefined !== json ? new Settings(json) : this.defaults; }\n\n public toJSON(): Props {\n return {\n bias: this.bias !== Settings._defaultBias ? this.bias : undefined,\n zLengthCap: this.zLengthCap !== Settings._defaultZLengthCap ? this.zLengthCap : undefined,\n maxDistance: this.maxDistance !== Settings._defaultMaxDistance ? this.maxDistance : undefined,\n intensity: this.intensity !== Settings._defaultIntensity ? this.intensity : undefined,\n texelStepSize: this.texelStepSize !== Settings._defaultTexelStepSize ? this.texelStepSize : undefined,\n blurDelta: this.blurDelta !== Settings._defaultBlurDelta ? this.blurDelta : undefined,\n blurSigma: this.blurSigma !== Settings._defaultBlurSigma ? this.blurSigma : undefined,\n blurTexelStepSize: this.blurTexelStepSize !== Settings._defaultBlurTexelStepSize ? this.blurTexelStepSize : undefined,\n };\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AmbientOcclusion.js","sourceRoot":"","sources":["../../src/AmbientOcclusion.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAEhD;;GAEG;AACH,IAAiB,g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CAAC,CAAC,SAAS;gBACrG,SAAS,EAAE,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBACrF,SAAS,EAAE,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBACrF,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,KAAK,QAAQ,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS;aACtH,CAAC;QACJ,CAAC;;IAhDU,yBAAQ,WAiDpB,CAAA;AACH,CAAC,EAxEgB,gBAAgB,gCAAhB,gBAAgB,QAwEhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { JsonUtils } from \"@itwin/core-bentley\";\r\n\r\n/** Namespace containing types controlling how ambient occlusion should be drawn.\r\n * @public\r\n */\r\nexport namespace AmbientOcclusion {\r\n /** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */\r\n export interface Props {\r\n /** If defined, represents an angle in radians. If the dot product between the normal of the sample and the vector to the camera is less than this value, sampling stops in the current direction. This is used to remove shadows from near planar edges. If undefined, the bias defaults to 0.25. */\r\n readonly bias?: number;\r\n /** If defined, if the distance in linear depth from the current sample to first sample is greater than this value, sampling stops in the current direction. If undefined, the zLengthCap defaults to 0.0025. The full range of linear depth is 0 to 1. */\r\n readonly zLengthCap?: number;\r\n /** If defined, the maximum distance from the camera's near plane in meters at which ambient occlusion will be applied. If undefined, the maximum distance defaults to 10000. */\r\n readonly maxDistance?: number;\r\n /** If defined, raise the final ambient occlusion to the power of this value. Larger values make the ambient shadows darker. If undefined, the intensity defaults to 2.0. */\r\n readonly intensity?: number;\r\n /** If defined, indicates the texel distance to step toward the next texel sample in the current direction. For portions of geometry close to the near plane, this value will be what is used. As portions of geometry extend away from the near plane, this value will gradually reduce until it reaches a minimum value of 1.0 at the far plane. If undefined, texelStepSize defaults to 1.95. */\r\n readonly texelStepSize?: number;\r\n /** If defined, blurDelta is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurDelta defaults to 1.0. */\r\n readonly blurDelta?: number;\r\n /** If defined, blurSigma is used to compute the weight of a Gaussian filter. The equation is exp((-0.5 * blurDelta * blurDelta) / (blurSigma * blurSigma)). If undefined, blurSigma defaults to 2.0. */\r\n readonly blurSigma?: number;\r\n /* If defined, blurTexelStepSize indicates the distance to the next texel for blurring. If undefined, blurTexelStepSize defaults to 1.0. */\r\n readonly blurTexelStepSize?: number;\r\n }\r\n\r\n /** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */\r\n export class Settings implements Props {\r\n private static _defaultBias: number = 0.25;\r\n private static _defaultZLengthCap: number = 0.0025;\r\n private static _defaultMaxDistance: number = 10000.0;\r\n private static _defaultIntensity: number = 1.0;\r\n private static _defaultTexelStepSize: number = 1;\r\n private static _defaultBlurDelta: number = 1.0;\r\n private static _defaultBlurSigma: number = 2.0;\r\n private static _defaultBlurTexelStepSize: number = 1.0;\r\n\r\n public readonly bias: number;\r\n public readonly zLengthCap: number;\r\n public readonly maxDistance: number;\r\n public readonly intensity: number;\r\n public readonly texelStepSize: number;\r\n public readonly blurDelta: number;\r\n public readonly blurSigma: number;\r\n public readonly blurTexelStepSize: number;\r\n\r\n private constructor(json?: Props) {\r\n if (undefined === json)\r\n json = {};\r\n\r\n this.bias = JsonUtils.asDouble(json.bias, Settings._defaultBias);\r\n this.zLengthCap = JsonUtils.asDouble(json.zLengthCap, Settings._defaultZLengthCap);\r\n this.maxDistance = JsonUtils.asDouble(json.maxDistance, Settings._defaultMaxDistance);\r\n this.intensity = JsonUtils.asDouble(json.intensity, Settings._defaultIntensity);\r\n this.texelStepSize = JsonUtils.asDouble(json.texelStepSize, Settings._defaultTexelStepSize);\r\n this.blurDelta = JsonUtils.asDouble(json.blurDelta, Settings._defaultBlurDelta);\r\n this.blurSigma = JsonUtils.asDouble(json.blurSigma, Settings._defaultBlurSigma);\r\n this.blurTexelStepSize = JsonUtils.asDouble(json.blurTexelStepSize, Settings._defaultBlurTexelStepSize);\r\n }\r\n\r\n public static defaults = new Settings({});\r\n\r\n public static fromJSON(json?: Props): Settings { return undefined !== json ? new Settings(json) : this.defaults; }\r\n\r\n public toJSON(): Props {\r\n return {\r\n bias: this.bias !== Settings._defaultBias ? this.bias : undefined,\r\n zLengthCap: this.zLengthCap !== Settings._defaultZLengthCap ? this.zLengthCap : undefined,\r\n maxDistance: this.maxDistance !== Settings._defaultMaxDistance ? this.maxDistance : undefined,\r\n intensity: this.intensity !== Settings._defaultIntensity ? this.intensity : undefined,\r\n texelStepSize: this.texelStepSize !== Settings._defaultTexelStepSize ? this.texelStepSize : undefined,\r\n blurDelta: this.blurDelta !== Settings._defaultBlurDelta ? this.blurDelta : undefined,\r\n blurSigma: this.blurSigma !== Settings._defaultBlurSigma ? this.blurSigma : undefined,\r\n blurTexelStepSize: this.blurTexelStepSize !== Settings._defaultBlurTexelStepSize ? this.blurTexelStepSize : undefined,\r\n };\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalysisStyle.js","sourceRoot":"","sources":["../../src/AnalysisStyle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAA6D;AAC7D,uDAA4F;AAC5F,yCAAsC;AAgBtC;;;GAGG;AACH,MAAa,yBAAyB;IACpC,8GAA8G;IAC9F,WAAW,CAAS;IACpC;;OAEG;IACa,KAAK,CAAS;IA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IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAS,CAAC,CAAC;IAC9E,CAAC;IAEM,MAAM,CAAU,QAAQ,GAAG,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;;AAzE1D,sCA0EC","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 DisplayStyles\n */\n\nimport { Range1d, Range1dProps } from \"@itwin/core-geometry\";\nimport { ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\nimport { Gradient } from \"./Gradient\";\n\n/** JSON representation of an [[AnalysisStyleDisplacement]].\n * @see [[AnalysisStyleProps.displacement]].\n * @public\n * @extensions\n */\nexport interface AnalysisStyleDisplacementProps {\n /** See [[AnalysisStyleDisplacement.channelName]]. */\n channelName: string;\n /** See [[AnalysisStyleDisplacement.scale]].\n * Default value: 1.\n */\n scale?: number;\n}\n\n/** Describes how an [[AnalysisStyle]] deforms a [Polyface]($core-geometry) by applying translation to its vertices.\n * @see [[AnalysisStyle.displacement]].\n * @public\n */\nexport class AnalysisStyleDisplacement {\n /** The name of the [AuxChannel]($core-geometry) supplying the displacements to be applied to the vertices. */\n public readonly channelName: string;\n /** A scale applied to the displacements to adjust the magnitude of the effect.\n * Default value: 1.\n */\n public readonly scale: number;\n\n private constructor(channelName: string, scale = 1) {\n this.channelName = channelName;\n this.scale = scale;\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props: AnalysisStyleDisplacementProps): AnalysisStyleDisplacement {\n return new this(props.channelName, props.scale);\n }\n\n /** Convert to JSON representation. */\n public toJSON(): AnalysisStyleDisplacementProps {\n const props: AnalysisStyleDisplacementProps = { channelName: this.channelName };\n if (this.scale !== 1)\n props.scale = this.scale;\n\n return props;\n }\n\n /** Return true if `this` is equivalent to `other`. */\n public equals(other: AnalysisStyleDisplacement): boolean {\n return this.channelName === other.channelName && this.scale === other.scale;\n }\n}\n\n/** JSON representation of an [[AnalysisStyleThematic]].\n * @see [[AnalysisStyleProps.scalar]].\n * @public\n * @extensions\n */\nexport interface AnalysisStyleThematicProps {\n /** See [[AnalysisStyleThematic.channelName]]. */\n channelName: string;\n /** See [[AnalysisStyleThematic.range]]. */\n range: Range1dProps;\n /** See [[AnalysisStyleThematic.thematicSettings]].\n * Default value: [[ThematicGradientSettings.defaults]].\n */\n thematicSettings?: ThematicGradientSettingsProps;\n}\n\n/** Describes how an [[AnalysisStyle]] recolors [Polyface]($core-geometry) vertices by mapping values of type\n * [AuxChannelDataType.Scalar]($core-geometry) or [AuxChannelDataType.Distance]($core-geometry) supplied\n * by an [AuxChannel]($core-geometry) to colors supplied by a [[Gradient]] image.\n * @see [[AnalysisStyle.thematic]].\n * @public\n */\nexport class AnalysisStyleThematic {\n /** The name of the [AuxChannel]($core-geometry) supplying the values from which the vertex colors are computed. */\n public readonly channelName: string;\n /** The minimum and maximum values that map to colors in the [[Gradient]] image. Vertices with values outside of\n * this range are displayed with the gradient's margin color.\n */\n public readonly range: Readonly<Range1d>;\n /** Settings used to produce the [[Gradient]] image. */\n public readonly thematicSettings: ThematicGradientSettings;\n private _gradient?: Gradient.Symb;\n\n private constructor(props: AnalysisStyleThematicProps) {\n this.channelName = props.channelName;\n this.range = Range1d.fromJSON(props.range);\n this.thematicSettings = ThematicGradientSettings.fromJSON(props.thematicSettings);\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props: AnalysisStyleThematicProps): AnalysisStyleThematic {\n return new this(props);\n }\n\n /** Convert to JSON representation. */\n public toJSON(): AnalysisStyleThematicProps {\n const props: AnalysisStyleThematicProps = {\n channelName: this.channelName,\n range: this.range.toJSON(),\n };\n\n if (!this.thematicSettings.equals(ThematicGradientSettings.defaults))\n props.thematicSettings = this.thematicSettings.toJSON();\n\n return props;\n }\n\n /** The gradient computed from [[thematicSettings]]. */\n public get gradient(): Gradient.Symb {\n if (!this._gradient)\n this._gradient = Gradient.Symb.createThematic(this.thematicSettings);\n\n return this._gradient;\n }\n\n /** Return true if `this` is equivalent to `other`. */\n public equals(other: AnalysisStyleThematic): boolean {\n return this.channelName === other.channelName && this.range.isAlmostEqual(other.range) && this.thematicSettings.equals(other.thematicSettings);\n }\n}\n\n/** JSON representation of an [[AnalysisStyle]].\n * @public\n * @extensions\n */\nexport interface AnalysisStyleProps {\n /** See [[AnalysisStyle.displacement]]. */\n displacement?: AnalysisStyleDisplacementProps;\n /** JSON representation of [[AnalysisStyle.thematic]].\n * @note The name \"scalar\" is used instead of \"thematic\" for backwards compatibility.\n */\n scalar?: AnalysisStyleThematicProps;\n /** See [[AnalysisStyle.normalChannelName]]. */\n normalChannelName?: string;\n}\n\n/** At time of writing, the only iModel in existence that uses AnalysisStyle is the one created by the analysis-importer test app.\n * To avoid breaking existing saved views of that iModel, AnalysisStyle.fromJSON() continues to accept the old JSON representation -\n * but that representation is not part of the public API.\n * @internal exported strictly for tests.\n */\nexport interface LegacyAnalysisStyleProps {\n displacementChannelName?: string;\n scalarChannelName?: string;\n normalChannelName?: string;\n displacementScale?: number;\n scalarRange?: Range1dProps;\n scalarThematicSettings?: ThematicGradientSettingsProps;\n}\n\nfunction tryConvertLegacyProps(input: AnalysisStyleProps): AnalysisStyleProps {\n if (input.displacement || input.scalar)\n return input;\n\n const legacy = input as LegacyAnalysisStyleProps;\n if (undefined === legacy.displacementChannelName && undefined === legacy.scalarChannelName)\n return input;\n\n const output: AnalysisStyleProps = {\n normalChannelName: input.normalChannelName,\n };\n\n if (undefined !== legacy.displacementChannelName) {\n output.displacement = {\n channelName: legacy.displacementChannelName,\n scale: legacy.displacementScale,\n };\n }\n\n if (undefined !== legacy.scalarChannelName && undefined !== legacy.scalarRange) {\n output.scalar = {\n channelName: legacy.scalarChannelName,\n range: legacy.scalarRange,\n thematicSettings: legacy.scalarThematicSettings,\n };\n }\n\n return output;\n}\n\n/** As part of a [[DisplayStyleSettings]], describes how to animate meshes in the view that have been augmented with\n * [PolyfaceAuxData]($core-geometry). The style specifies which channels to use, and can deform the meshes by\n * translating vertices and/or recolor vertices using [[ThematicDisplay]].\n * @see [[DisplayStyleSettings.analysisStyle]] to define the analysis style for a [DisplayStyle]($backend).\n * @see [[DisplayStyleSettings.analysisFraction]] to control playback of the animation.\n * @public\n */\nexport class AnalysisStyle {\n public readonly displacement?: AnalysisStyleDisplacement;\n public readonly thematic?: AnalysisStyleThematic;\n /** If defined, the name of the [AuxChannel]($core-geometry) from which to obtain normal vectors for the vertices. */\n public readonly normalChannelName?: string;\n\n /** Create an analysis style from its JSON representation.\n * @note AnalysisStyle is an immutable type - use [[clone]] to produce a modified copy.\n */\n public static fromJSON(props?: AnalysisStyleProps): AnalysisStyle {\n if (!props)\n return this.defaults;\n\n props = tryConvertLegacyProps(props);\n if (!props.displacement && !props.scalar && undefined === props.normalChannelName)\n return this.defaults;\n\n return new AnalysisStyle(props);\n }\n\n private constructor(props: AnalysisStyleProps) {\n this.normalChannelName = props.normalChannelName;\n if (props.displacement)\n this.displacement = AnalysisStyleDisplacement.fromJSON(props.displacement);\n\n if (props.scalar)\n this.thematic = AnalysisStyleThematic.fromJSON(props.scalar);\n }\n\n /** Convert this style to its JSON representation. */\n public toJSON(): AnalysisStyleProps {\n const props: AnalysisStyleProps = {};\n if (this === AnalysisStyle.defaults)\n return props;\n\n if (this.displacement)\n props.displacement = this.displacement.toJSON();\n\n if (this.thematic)\n props.scalar = this.thematic.toJSON();\n\n if (undefined !== this.normalChannelName)\n props.normalChannelName = this.normalChannelName;\n\n return props;\n }\n\n /** Produce a copy of this style identical except for properties explicitly specified by `changedProps`. */\n public clone(changedProps: AnalysisStyleProps): AnalysisStyle {\n return AnalysisStyle.fromJSON({\n ...this.toJSON(),\n ...changedProps,\n });\n }\n\n /** Return true if this style is equivalent to `other`. */\n public equals(other: AnalysisStyle): boolean {\n if (this.normalChannelName !== other.normalChannelName)\n return false;\n\n if ((undefined === this.displacement) !== (undefined === other.displacement))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n else if (this.displacement && !this.displacement.equals(other.displacement!))\n return false;\n\n if ((undefined === this.thematic) !== (undefined === other.thematic))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return undefined === this.thematic || this.thematic.equals(other.thematic!);\n }\n\n public static readonly defaults = new AnalysisStyle({});\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AnalysisStyle.js","sourceRoot":"","sources":["../../src/AnalysisStyle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAA6D;AAC7D,uDAA4F;AAC5F,yCAAsC;AAgBtC;;;GAGG;AACH,MAAa,yBAAyB;IACpC,8GAA8G;IAC9F,WAAW,CAAS;IACpC;;OAEG;IACa,KAAK,CAAS;IAE9B,YAAoB,WAAmB,EAAE,KAAK,GAAG,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAqC;QAC1D,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IAED,sCAAsC;IAC/B,MAAM;QACX,MAAM,KAAK,GAAmC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;QAChF,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC;YAClB,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAE3B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,sDAAsD;IAC/C,MAAM,CAAC,KAAgC;QAC5C,OAAO,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IAC9E,CAAC;CACF;AA/BD,8DA+BC;AA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AAC,iBAAiB,KAAK,KAAK,CAAC,iBAAiB;YACpD,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,YAAY,CAAC;YAC1E,OAAO,KAAK,CAAC;QACf,oEAAoE;aAC/D,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,YAAa,CAAC;YAC1E,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,QAAQ,CAAC;YAClE,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,OAAO,SAAS,KAAK,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAS,CAAC,CAAC;IAC9E,CAAC;IAEM,MAAM,CAAU,QAAQ,GAAG,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;;AAzE1D,sCA0EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { Range1d, Range1dProps } from \"@itwin/core-geometry\";\r\nimport { ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\r\nimport { Gradient } from \"./Gradient\";\r\n\r\n/** JSON representation of an [[AnalysisStyleDisplacement]].\r\n * @see [[AnalysisStyleProps.displacement]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AnalysisStyleDisplacementProps {\r\n /** See [[AnalysisStyleDisplacement.channelName]]. */\r\n channelName: string;\r\n /** See [[AnalysisStyleDisplacement.scale]].\r\n * Default value: 1.\r\n */\r\n scale?: number;\r\n}\r\n\r\n/** Describes how an [[AnalysisStyle]] deforms a [Polyface]($core-geometry) by applying translation to its vertices.\r\n * @see [[AnalysisStyle.displacement]].\r\n * @public\r\n */\r\nexport class AnalysisStyleDisplacement {\r\n /** The name of the [AuxChannel]($core-geometry) supplying the displacements to be applied to the vertices. */\r\n public readonly channelName: string;\r\n /** A scale applied to the displacements to adjust the magnitude of the effect.\r\n * Default value: 1.\r\n */\r\n public readonly scale: number;\r\n\r\n private constructor(channelName: string, scale = 1) {\r\n this.channelName = channelName;\r\n this.scale = scale;\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props: AnalysisStyleDisplacementProps): AnalysisStyleDisplacement {\r\n return new this(props.channelName, props.scale);\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): AnalysisStyleDisplacementProps {\r\n const props: AnalysisStyleDisplacementProps = { channelName: this.channelName };\r\n if (this.scale !== 1)\r\n props.scale = this.scale;\r\n\r\n return props;\r\n }\r\n\r\n /** Return true if `this` is equivalent to `other`. */\r\n public equals(other: AnalysisStyleDisplacement): boolean {\r\n return this.channelName === other.channelName && this.scale === other.scale;\r\n }\r\n}\r\n\r\n/** JSON representation of an [[AnalysisStyleThematic]].\r\n * @see [[AnalysisStyleProps.scalar]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AnalysisStyleThematicProps {\r\n /** See [[AnalysisStyleThematic.channelName]]. */\r\n channelName: string;\r\n /** See [[AnalysisStyleThematic.range]]. */\r\n range: Range1dProps;\r\n /** See [[AnalysisStyleThematic.thematicSettings]].\r\n * Default value: [[ThematicGradientSettings.defaults]].\r\n */\r\n thematicSettings?: ThematicGradientSettingsProps;\r\n}\r\n\r\n/** Describes how an [[AnalysisStyle]] recolors [Polyface]($core-geometry) vertices by mapping values of type\r\n * [AuxChannelDataType.Scalar]($core-geometry) or [AuxChannelDataType.Distance]($core-geometry) supplied\r\n * by an [AuxChannel]($core-geometry) to colors supplied by a [[Gradient]] image.\r\n * @see [[AnalysisStyle.thematic]].\r\n * @public\r\n */\r\nexport class AnalysisStyleThematic {\r\n /** The name of the [AuxChannel]($core-geometry) supplying the values from which the vertex colors are computed. */\r\n public readonly channelName: string;\r\n /** The minimum and maximum values that map to colors in the [[Gradient]] image. Vertices with values outside of\r\n * this range are displayed with the gradient's margin color.\r\n */\r\n public readonly range: Readonly<Range1d>;\r\n /** Settings used to produce the [[Gradient]] image. */\r\n public readonly thematicSettings: ThematicGradientSettings;\r\n private _gradient?: Gradient.Symb;\r\n\r\n private constructor(props: AnalysisStyleThematicProps) {\r\n this.channelName = props.channelName;\r\n this.range = Range1d.fromJSON(props.range);\r\n this.thematicSettings = ThematicGradientSettings.fromJSON(props.thematicSettings);\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props: AnalysisStyleThematicProps): AnalysisStyleThematic {\r\n return new this(props);\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): AnalysisStyleThematicProps {\r\n const props: AnalysisStyleThematicProps = {\r\n channelName: this.channelName,\r\n range: this.range.toJSON(),\r\n };\r\n\r\n if (!this.thematicSettings.equals(ThematicGradientSettings.defaults))\r\n props.thematicSettings = this.thematicSettings.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** The gradient computed from [[thematicSettings]]. */\r\n public get gradient(): Gradient.Symb {\r\n if (!this._gradient)\r\n this._gradient = Gradient.Symb.createThematic(this.thematicSettings);\r\n\r\n return this._gradient;\r\n }\r\n\r\n /** Return true if `this` is equivalent to `other`. */\r\n public equals(other: AnalysisStyleThematic): boolean {\r\n return this.channelName === other.channelName && this.range.isAlmostEqual(other.range) && this.thematicSettings.equals(other.thematicSettings);\r\n }\r\n}\r\n\r\n/** JSON representation of an [[AnalysisStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AnalysisStyleProps {\r\n /** See [[AnalysisStyle.displacement]]. */\r\n displacement?: AnalysisStyleDisplacementProps;\r\n /** JSON representation of [[AnalysisStyle.thematic]].\r\n * @note The name \"scalar\" is used instead of \"thematic\" for backwards compatibility.\r\n */\r\n scalar?: AnalysisStyleThematicProps;\r\n /** See [[AnalysisStyle.normalChannelName]]. */\r\n normalChannelName?: string;\r\n}\r\n\r\n/** At time of writing, the only iModel in existence that uses AnalysisStyle is the one created by the analysis-importer test app.\r\n * To avoid breaking existing saved views of that iModel, AnalysisStyle.fromJSON() continues to accept the old JSON representation -\r\n * but that representation is not part of the public API.\r\n * @internal exported strictly for tests.\r\n */\r\nexport interface LegacyAnalysisStyleProps {\r\n displacementChannelName?: string;\r\n scalarChannelName?: string;\r\n normalChannelName?: string;\r\n displacementScale?: number;\r\n scalarRange?: Range1dProps;\r\n scalarThematicSettings?: ThematicGradientSettingsProps;\r\n}\r\n\r\nfunction tryConvertLegacyProps(input: AnalysisStyleProps): AnalysisStyleProps {\r\n if (input.displacement || input.scalar)\r\n return input;\r\n\r\n const legacy = input as LegacyAnalysisStyleProps;\r\n if (undefined === legacy.displacementChannelName && undefined === legacy.scalarChannelName)\r\n return input;\r\n\r\n const output: AnalysisStyleProps = {\r\n normalChannelName: input.normalChannelName,\r\n };\r\n\r\n if (undefined !== legacy.displacementChannelName) {\r\n output.displacement = {\r\n channelName: legacy.displacementChannelName,\r\n scale: legacy.displacementScale,\r\n };\r\n }\r\n\r\n if (undefined !== legacy.scalarChannelName && undefined !== legacy.scalarRange) {\r\n output.scalar = {\r\n channelName: legacy.scalarChannelName,\r\n range: legacy.scalarRange,\r\n thematicSettings: legacy.scalarThematicSettings,\r\n };\r\n }\r\n\r\n return output;\r\n}\r\n\r\n/** As part of a [[DisplayStyleSettings]], describes how to animate meshes in the view that have been augmented with\r\n * [PolyfaceAuxData]($core-geometry). The style specifies which channels to use, and can deform the meshes by\r\n * translating vertices and/or recolor vertices using [[ThematicDisplay]].\r\n * @see [[DisplayStyleSettings.analysisStyle]] to define the analysis style for a [DisplayStyle]($backend).\r\n * @see [[DisplayStyleSettings.analysisFraction]] to control playback of the animation.\r\n * @public\r\n */\r\nexport class AnalysisStyle {\r\n public readonly displacement?: AnalysisStyleDisplacement;\r\n public readonly thematic?: AnalysisStyleThematic;\r\n /** If defined, the name of the [AuxChannel]($core-geometry) from which to obtain normal vectors for the vertices. */\r\n public readonly normalChannelName?: string;\r\n\r\n /** Create an analysis style from its JSON representation.\r\n * @note AnalysisStyle is an immutable type - use [[clone]] to produce a modified copy.\r\n */\r\n public static fromJSON(props?: AnalysisStyleProps): AnalysisStyle {\r\n if (!props)\r\n return this.defaults;\r\n\r\n props = tryConvertLegacyProps(props);\r\n if (!props.displacement && !props.scalar && undefined === props.normalChannelName)\r\n return this.defaults;\r\n\r\n return new AnalysisStyle(props);\r\n }\r\n\r\n private constructor(props: AnalysisStyleProps) {\r\n this.normalChannelName = props.normalChannelName;\r\n if (props.displacement)\r\n this.displacement = AnalysisStyleDisplacement.fromJSON(props.displacement);\r\n\r\n if (props.scalar)\r\n this.thematic = AnalysisStyleThematic.fromJSON(props.scalar);\r\n }\r\n\r\n /** Convert this style to its JSON representation. */\r\n public toJSON(): AnalysisStyleProps {\r\n const props: AnalysisStyleProps = {};\r\n if (this === AnalysisStyle.defaults)\r\n return props;\r\n\r\n if (this.displacement)\r\n props.displacement = this.displacement.toJSON();\r\n\r\n if (this.thematic)\r\n props.scalar = this.thematic.toJSON();\r\n\r\n if (undefined !== this.normalChannelName)\r\n props.normalChannelName = this.normalChannelName;\r\n\r\n return props;\r\n }\r\n\r\n /** Produce a copy of this style identical except for properties explicitly specified by `changedProps`. */\r\n public clone(changedProps: AnalysisStyleProps): AnalysisStyle {\r\n return AnalysisStyle.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n\r\n /** Return true if this style is equivalent to `other`. */\r\n public equals(other: AnalysisStyle): boolean {\r\n if (this.normalChannelName !== other.normalChannelName)\r\n return false;\r\n\r\n if ((undefined === this.displacement) !== (undefined === other.displacement))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n else if (this.displacement && !this.displacement.equals(other.displacement!))\r\n return false;\r\n\r\n if ((undefined === this.thematic) !== (undefined === other.thematic))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n return undefined === this.thematic || this.thematic.equals(other.thematic!);\r\n }\r\n\r\n public static readonly defaults = new AnalysisStyle({});\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Atmosphere.js","sourceRoot":"","sources":["../../src/Atmosphere.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAgD;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,IAAiB,UAAU,CAgK1B;AAhKD,WAAiB,UAAU;IASzB,oIAAoI;IACpI,MAAa,WAAW;QACN,CAAC,CAAS;QACV,CAAC,CAAS;QACV,CAAC,CAAS;QAE1B;;;;WAIG;QACH,YAAY,KAAuB;YACjC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;QAEM,MAAM,CAAC,KAAkB;YAC9B,OAAO,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;QACxE,CAAC;QAEM,MAAM;YACX,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;QAC7C,CAAC;QAEM,MAAM,C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,CAAC,4BAA4B;gBAC/D,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;gBAC3C,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;aACvC,CAAC;YAEF,IAAI,SAAS,KAAK,OAAO;gBACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YAEzB,OAAO,IAAI,CAAC;QACd,CAAC;;IArFU,mBAAQ,WAsFpB,CAAA;AACH,CAAC,EAhKgB,UAAU,0BAAV,UAAU,QAgK1B","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 DisplayStyles\n */\nimport { JsonUtils } from \"@itwin/core-bentley\";\n\n/** Namespace containing types controlling how atmospheric scattering should be rendered.\n * @beta\n * The techniques used to render the atmosphere approximate the physical behavior of light when interacting with particles in the air (Rayleigh Scattering and Mie Scattering)\n * Presently, only Rayleigh Scattering is implemented here\n *\n * In a nutshell, this implementation samples atmospheric density along rays cast from the view and uses the samples to simulate the scattering of light toward the camera.\n * The amount of light scattered toward the camera is dependent on the amount of light scattered away from its original path from the sun, so rays must also be cast from the sample points to the sun.\n *\n * The effect can be computed on vertices (the default for the background map) and fragments (the default for the skybox, which is a ViewportQuad).\n * All coordinates are in view space.\n *\n * This implementation is adapted from equations outlined in \"Display of Clouds Taking into Account Multiple Anisotropic Scattering and Sky Light\", Nishita et al. 1993\n * which are further refined for use in GPU shaders in \"Photorealistic Real-Time Outdoor Light Scattering\", Hoffman and Preetham 2002.\n * These sources are also compiled in Chapter 16 of NVIDIA's \"GPU Gems 2\", which can be found online here:\n * https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering\n *\n * This implementation is also highly inspired by Sebastian Lague's Solar System project: https://github.com/SebLague/Solar-System/ and video: https://www.youtube.com/watch?v=DxfEbulyFcY\n * along with this ShaderToy replica: https://www.shadertoy.com/view/fltXD2.\n * Both of which are inspired by this Nvidia article on atmospheric scattering: https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering.\n */\nexport namespace Atmosphere {\n\n /** @internal JSON representation of a [[Wavelengths]] object */\n export interface WavelengthsProps {\n r: number;\n g: number;\n b: number;\n }\n\n /** @internal An immutable container of wavelength values for the red, green and blue pixel components. Values are in nanometers. */\n export class Wavelengths {\n public readonly r: number;\n public readonly g: number;\n public readonly b: number;\n\n /** Constructs from red, green, and blue wavelength values.\n * @param r Wavelength value for red\n * @param g Wavelength value for green\n * @param b Wavelength value for blue\n */\n constructor(props: WavelengthsProps) {\n this.r = Math.max(0, props.r);\n this.g = Math.max(0, props.g);\n this.b = Math.max(0, props.b);\n }\n\n public equals(other: Wavelengths): boolean {\n return this.r === other.r && this.g === other.g && this.b === other.b;\n }\n\n public toJSON(): WavelengthsProps {\n return { r: this.r, g: this.g, b: this.b };\n }\n\n public static fromJSON(json: WavelengthsProps | undefined): Wavelengths {\n let r = 0;\n let g = 0;\n let b = 0;\n if (undefined !== json) {\n if (typeof json.r === \"number\")\n r = json.r;\n if (typeof json.g === \"number\")\n g = json.g;\n if (typeof json.b === \"number\")\n b = json.b;\n }\n return new Wavelengths({ r, g, b });\n }\n }\n\n /** Describes the properties with which the atmospheric scattering effect should be drawn. Theses properties correspond to a physics-based approximation of atmospheric scattering phenomenons. */\n export interface Props {\n /** Whether the ground plane should be displayed. Defaults to false. */\n display?: boolean;\n /** @internal See [[Settings.atmosphereHeightAboveEarth]] */\n atmosphereHeightAboveEarth?: number;\n /** See [[Settings.exposure]] */\n exposure?: number;\n /** @internal See [[Settings.densityFalloff]] */\n densityFalloff?: number;\n /** @internal See [[Settings.minDensityHeightBelowEarth]] */\n depthBelowEarthForMaxDensity?: number;\n /** See [[Settings.numViewRaySamples]] */\n numViewRaySamples?: number;\n /** See [[Settings.numSunRaySamples]] */\n numSunRaySamples?: number;\n /** @internal See [[Settings.scatteringStrength]] */\n scatteringStrength?: number;\n /** @internal See [[Settings.wavelengths]] */\n wavelengths?: WavelengthsProps;\n }\n\n /** Describes the properties with which the atmospheric scattering effect should be drawn. Theses properties correspond to a physics-based approximation of atmospheric scattering phenomenons. */\n export class Settings {\n private static _defaultAtmosphereHeightAboveEarth: number = 100000.0;\n private static _defaultExposure: number = 2.0;\n private static _defaultDensityFalloff: number = 10.0;\n private static _defaultMinDensityHeightBelowEarth: 0.0;\n private static _defaultScatteringStrength: number = 100;\n private static _defaultWavelengths: Wavelengths = new Wavelengths({ r: 700.0, g: 530.0, b: 440.0 });\n\n private static _defaultNumViewRaySamples: number = 10;\n private static _highQualityNumViewRaySamples: number = 20;\n private static _defaultNumSunRaySamples: number = 5;\n\n public static readonly defaults = new Settings({});\n public static readonly highQuality = new Settings({ numViewRaySamples: this._highQualityNumViewRaySamples });\n\n /** @internal If defined, corresponds to the height in meters above the earth's pole at which the atmosphere terminates. Physically, this is the point at which there are no more air molecules to interfere with light transmission. Defaults to 100_000.0. */\n public readonly atmosphereHeightAboveEarth: number;\n /** If defined, this value is used to simulate the aperture of a camera. Higher values allow more light in. This value might need to be adjusted slightly in situations without much sunlight (like sunset) to brighten the image. Defaults to 2.0 */\n public readonly exposure: number;\n /** @internal If defined, controls the rate at which the air density decreases between the point it is the highest and the point is is the lowest. A higher value means a faster decrease in air density. Defaults to 10.0. */\n public readonly densityFalloff: number;\n /** @internal If defined, corresponds to the height in meters below the earth's pole at which the atmosphere is at its densest. Physically, this is the point at which there is the most air molecules to interfere with light transmission. Defaults to 0.0. */\n public readonly depthBelowEarthForMaxDensity: number;\n /** If defined, corresponds to the number of atmospheric density samples used to compute the amount of light scattered along each view ray. For each sample point, another ray will be cast toward the sun to compute the amount of light reaching the sample point. Higher values increase fidelity, but greatly decrease performance because sun rays must be cast from each additional sample point. The range is 1 to 40. Defaults to 10. */\n public readonly numViewRaySamples: number;\n /** If defined, corresponds to the number of atmospheric density samples uses to compute the amount of light scattered along each sun ray. Higher values increase fidelity slightly but greatly decrease performance. Minimal improvement is observable with values above 5. The range is 1 to 40. Defaults to 5. */\n public readonly numSunRaySamples: number;\n /** @internal If defined, controls how strongly the atmosphere's air diverts light. Higher values increase scattering intensity. Defaults to 100.0. */\n public readonly scatteringStrength: number;\n /** @internal If defined, corresponds the wavelengths of the red, green and blue color components in nanometers used to simulate how the atmosphere's air molecules affects light transmission. (See Rayleigh Scattering) Thus, a value of 470 for the red wavelength will make the red light component scatter as if it physically were a cyan light ray. The default value is {r:700.0, g:530.0, b:440.0}. */\n public readonly wavelengths: Wavelengths;\n\n public equals(other: Settings): boolean {\n if (this.atmosphereHeightAboveEarth !== other.atmosphereHeightAboveEarth)\n return false;\n if (this.exposure !== other.exposure)\n return false;\n if (this.densityFalloff !== other.densityFalloff)\n return false;\n if (this.depthBelowEarthForMaxDensity !== other.depthBelowEarthForMaxDensity)\n return false;\n if (this.numViewRaySamples !== other.numViewRaySamples)\n return false;\n if (this.numSunRaySamples !== other.numSunRaySamples)\n return false;\n if (this.scatteringStrength !== other.scatteringStrength)\n return false;\n if (!this.wavelengths.equals(other.wavelengths))\n return false;\n return true;\n }\n\n private constructor(json: Props) {\n this.atmosphereHeightAboveEarth = JsonUtils.asDouble(json.atmosphereHeightAboveEarth, Settings._defaultAtmosphereHeightAboveEarth);\n this.exposure = JsonUtils.asDouble(json.exposure, Settings._defaultExposure);\n this.densityFalloff = JsonUtils.asDouble(json.densityFalloff, Settings._defaultDensityFalloff);\n this.depthBelowEarthForMaxDensity = JsonUtils.asDouble(json.depthBelowEarthForMaxDensity, Settings._defaultMinDensityHeightBelowEarth);\n this.numViewRaySamples = JsonUtils.asDouble(json.numViewRaySamples, Settings._defaultNumViewRaySamples);\n this.numSunRaySamples = JsonUtils.asDouble(json.numSunRaySamples, Settings._defaultNumSunRaySamples);\n this.scatteringStrength = JsonUtils.asDouble(json.scatteringStrength, Settings._defaultScatteringStrength);\n this.wavelengths = Wavelengths.fromJSON(JsonUtils.asObject(json.wavelengths) ?? Settings._defaultWavelengths);\n }\n\n public static fromJSON(json?: Props) {\n if (undefined === json)\n return this.defaults;\n return new Settings(json);\n }\n\n public toJSON(display?: boolean): Props {\n const json: Props = {\n atmosphereHeightAboveEarth: this.atmosphereHeightAboveEarth,\n exposure: this.exposure,\n densityFalloff: this.densityFalloff,\n depthBelowEarthForMaxDensity: this.depthBelowEarthForMaxDensity,\n numViewRaySamples: this.numViewRaySamples,\n numSunRaySamples: this.numSunRaySamples,\n scatteringStrength: this.scatteringStrength,\n wavelengths: this.wavelengths.toJSON(),\n };\n\n if (undefined !== display)\n json.display = display;\n\n return json;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Atmosphere.js","sourceRoot":"","sources":["../../src/Atmosphere.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAgD;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,IAAiB,UAAU,CAgK1B;AAhKD,WAAiB,UAAU;IASzB,oIAAoI;IACpI,MAAa,WAAW;QACN,CAAC,CAAS;QACV,CAAC,CAAS;QACV,CAAC,CAAS;QAE1B;;;;WAIG;QACH,YAAY,KAAuB;YACjC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;QAEM,MAAM,CAAC,KAAkB;YAC9B,OAAO,IAAI,CAAC,CAAC,KAAK,KAAK,CA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B,OAAO,IAAI,CAAC,QAAQ,CAAC;YACvB,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QAEM,MAAM,CAAC,OAAiB;YAC7B,MAAM,IAAI,GAAU;gBAClB,0BAA0B,EAAE,IAAI,CAAC,0BAA0B;gBAC3D,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,4BAA4B,EAAE,IAAI,CAAC,4BAA4B;gBAC/D,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;gBAC3C,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;aACvC,CAAC;YAEF,IAAI,SAAS,KAAK,OAAO;gBACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YAEzB,OAAO,IAAI,CAAC;QACd,CAAC;;IArFU,mBAAQ,WAsFpB,CAAA;AACH,CAAC,EAhKgB,UAAU,0BAAV,UAAU,QAgK1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\nimport { JsonUtils } from \"@itwin/core-bentley\";\r\n\r\n/** Namespace containing types controlling how atmospheric scattering should be rendered.\r\n * @beta\r\n * The techniques used to render the atmosphere approximate the physical behavior of light when interacting with particles in the air (Rayleigh Scattering and Mie Scattering)\r\n * Presently, only Rayleigh Scattering is implemented here\r\n *\r\n * In a nutshell, this implementation samples atmospheric density along rays cast from the view and uses the samples to simulate the scattering of light toward the camera.\r\n * The amount of light scattered toward the camera is dependent on the amount of light scattered away from its original path from the sun, so rays must also be cast from the sample points to the sun.\r\n *\r\n * The effect can be computed on vertices (the default for the background map) and fragments (the default for the skybox, which is a ViewportQuad).\r\n * All coordinates are in view space.\r\n *\r\n * This implementation is adapted from equations outlined in \"Display of Clouds Taking into Account Multiple Anisotropic Scattering and Sky Light\", Nishita et al. 1993\r\n * which are further refined for use in GPU shaders in \"Photorealistic Real-Time Outdoor Light Scattering\", Hoffman and Preetham 2002.\r\n * These sources are also compiled in Chapter 16 of NVIDIA's \"GPU Gems 2\", which can be found online here:\r\n * https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering\r\n *\r\n * This implementation is also highly inspired by Sebastian Lague's Solar System project: https://github.com/SebLague/Solar-System/ and video: https://www.youtube.com/watch?v=DxfEbulyFcY\r\n * along with this ShaderToy replica: https://www.shadertoy.com/view/fltXD2.\r\n * Both of which are inspired by this Nvidia article on atmospheric scattering: https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering.\r\n */\r\nexport namespace Atmosphere {\r\n\r\n /** @internal JSON representation of a [[Wavelengths]] object */\r\n export interface WavelengthsProps {\r\n r: number;\r\n g: number;\r\n b: number;\r\n }\r\n\r\n /** @internal An immutable container of wavelength values for the red, green and blue pixel components. Values are in nanometers. */\r\n export class Wavelengths {\r\n public readonly r: number;\r\n public readonly g: number;\r\n public readonly b: number;\r\n\r\n /** Constructs from red, green, and blue wavelength values.\r\n * @param r Wavelength value for red\r\n * @param g Wavelength value for green\r\n * @param b Wavelength value for blue\r\n */\r\n constructor(props: WavelengthsProps) {\r\n this.r = Math.max(0, props.r);\r\n this.g = Math.max(0, props.g);\r\n this.b = Math.max(0, props.b);\r\n }\r\n\r\n public equals(other: Wavelengths): boolean {\r\n return this.r === other.r && this.g === other.g && this.b === other.b;\r\n }\r\n\r\n public toJSON(): WavelengthsProps {\r\n return { r: this.r, g: this.g, b: this.b };\r\n }\r\n\r\n public static fromJSON(json: WavelengthsProps | undefined): Wavelengths {\r\n let r = 0;\r\n let g = 0;\r\n let b = 0;\r\n if (undefined !== json) {\r\n if (typeof json.r === \"number\")\r\n r = json.r;\r\n if (typeof json.g === \"number\")\r\n g = json.g;\r\n if (typeof json.b === \"number\")\r\n b = json.b;\r\n }\r\n return new Wavelengths({ r, g, b });\r\n }\r\n }\r\n\r\n /** Describes the properties with which the atmospheric scattering effect should be drawn. Theses properties correspond to a physics-based approximation of atmospheric scattering phenomenons. */\r\n export interface Props {\r\n /** Whether the ground plane should be displayed. Defaults to false. */\r\n display?: boolean;\r\n /** @internal See [[Settings.atmosphereHeightAboveEarth]] */\r\n atmosphereHeightAboveEarth?: number;\r\n /** See [[Settings.exposure]] */\r\n exposure?: number;\r\n /** @internal See [[Settings.densityFalloff]] */\r\n densityFalloff?: number;\r\n /** @internal See [[Settings.minDensityHeightBelowEarth]] */\r\n depthBelowEarthForMaxDensity?: number;\r\n /** See [[Settings.numViewRaySamples]] */\r\n numViewRaySamples?: number;\r\n /** See [[Settings.numSunRaySamples]] */\r\n numSunRaySamples?: number;\r\n /** @internal See [[Settings.scatteringStrength]] */\r\n scatteringStrength?: number;\r\n /** @internal See [[Settings.wavelengths]] */\r\n wavelengths?: WavelengthsProps;\r\n }\r\n\r\n /** Describes the properties with which the atmospheric scattering effect should be drawn. Theses properties correspond to a physics-based approximation of atmospheric scattering phenomenons. */\r\n export class Settings {\r\n private static _defaultAtmosphereHeightAboveEarth: number = 100000.0;\r\n private static _defaultExposure: number = 2.0;\r\n private static _defaultDensityFalloff: number = 10.0;\r\n private static _defaultMinDensityHeightBelowEarth: 0.0;\r\n private static _defaultScatteringStrength: number = 100;\r\n private static _defaultWavelengths: Wavelengths = new Wavelengths({ r: 700.0, g: 530.0, b: 440.0 });\r\n\r\n private static _defaultNumViewRaySamples: number = 10;\r\n private static _highQualityNumViewRaySamples: number = 20;\r\n private static _defaultNumSunRaySamples: number = 5;\r\n\r\n public static readonly defaults = new Settings({});\r\n public static readonly highQuality = new Settings({ numViewRaySamples: this._highQualityNumViewRaySamples });\r\n\r\n /** @internal If defined, corresponds to the height in meters above the earth's pole at which the atmosphere terminates. Physically, this is the point at which there are no more air molecules to interfere with light transmission. Defaults to 100_000.0. */\r\n public readonly atmosphereHeightAboveEarth: number;\r\n /** If defined, this value is used to simulate the aperture of a camera. Higher values allow more light in. This value might need to be adjusted slightly in situations without much sunlight (like sunset) to brighten the image. Defaults to 2.0 */\r\n public readonly exposure: number;\r\n /** @internal If defined, controls the rate at which the air density decreases between the point it is the highest and the point is is the lowest. A higher value means a faster decrease in air density. Defaults to 10.0. */\r\n public readonly densityFalloff: number;\r\n /** @internal If defined, corresponds to the height in meters below the earth's pole at which the atmosphere is at its densest. Physically, this is the point at which there is the most air molecules to interfere with light transmission. Defaults to 0.0. */\r\n public readonly depthBelowEarthForMaxDensity: number;\r\n /** If defined, corresponds to the number of atmospheric density samples used to compute the amount of light scattered along each view ray. For each sample point, another ray will be cast toward the sun to compute the amount of light reaching the sample point. Higher values increase fidelity, but greatly decrease performance because sun rays must be cast from each additional sample point. The range is 1 to 40. Defaults to 10. */\r\n public readonly numViewRaySamples: number;\r\n /** If defined, corresponds to the number of atmospheric density samples uses to compute the amount of light scattered along each sun ray. Higher values increase fidelity slightly but greatly decrease performance. Minimal improvement is observable with values above 5. The range is 1 to 40. Defaults to 5. */\r\n public readonly numSunRaySamples: number;\r\n /** @internal If defined, controls how strongly the atmosphere's air diverts light. Higher values increase scattering intensity. Defaults to 100.0. */\r\n public readonly scatteringStrength: number;\r\n /** @internal If defined, corresponds the wavelengths of the red, green and blue color components in nanometers used to simulate how the atmosphere's air molecules affects light transmission. (See Rayleigh Scattering) Thus, a value of 470 for the red wavelength will make the red light component scatter as if it physically were a cyan light ray. The default value is {r:700.0, g:530.0, b:440.0}. */\r\n public readonly wavelengths: Wavelengths;\r\n\r\n public equals(other: Settings): boolean {\r\n if (this.atmosphereHeightAboveEarth !== other.atmosphereHeightAboveEarth)\r\n return false;\r\n if (this.exposure !== other.exposure)\r\n return false;\r\n if (this.densityFalloff !== other.densityFalloff)\r\n return false;\r\n if (this.depthBelowEarthForMaxDensity !== other.depthBelowEarthForMaxDensity)\r\n return false;\r\n if (this.numViewRaySamples !== other.numViewRaySamples)\r\n return false;\r\n if (this.numSunRaySamples !== other.numSunRaySamples)\r\n return false;\r\n if (this.scatteringStrength !== other.scatteringStrength)\r\n return false;\r\n if (!this.wavelengths.equals(other.wavelengths))\r\n return false;\r\n return true;\r\n }\r\n\r\n private constructor(json: Props) {\r\n this.atmosphereHeightAboveEarth = JsonUtils.asDouble(json.atmosphereHeightAboveEarth, Settings._defaultAtmosphereHeightAboveEarth);\r\n this.exposure = JsonUtils.asDouble(json.exposure, Settings._defaultExposure);\r\n this.densityFalloff = JsonUtils.asDouble(json.densityFalloff, Settings._defaultDensityFalloff);\r\n this.depthBelowEarthForMaxDensity = JsonUtils.asDouble(json.depthBelowEarthForMaxDensity, Settings._defaultMinDensityHeightBelowEarth);\r\n this.numViewRaySamples = JsonUtils.asDouble(json.numViewRaySamples, Settings._defaultNumViewRaySamples);\r\n this.numSunRaySamples = JsonUtils.asDouble(json.numSunRaySamples, Settings._defaultNumSunRaySamples);\r\n this.scatteringStrength = JsonUtils.asDouble(json.scatteringStrength, Settings._defaultScatteringStrength);\r\n this.wavelengths = Wavelengths.fromJSON(JsonUtils.asObject(json.wavelengths) ?? Settings._defaultWavelengths);\r\n }\r\n\r\n public static fromJSON(json?: Props) {\r\n if (undefined === json)\r\n return this.defaults;\r\n return new Settings(json);\r\n }\r\n\r\n public toJSON(display?: boolean): Props {\r\n const json: Props = {\r\n atmosphereHeightAboveEarth: this.atmosphereHeightAboveEarth,\r\n exposure: this.exposure,\r\n densityFalloff: this.densityFalloff,\r\n depthBelowEarthForMaxDensity: this.depthBelowEarthForMaxDensity,\r\n numViewRaySamples: this.numViewRaySamples,\r\n numSunRaySamples: this.numSunRaySamples,\r\n scatteringStrength: this.scatteringStrength,\r\n wavelengths: this.wavelengths.toJSON(),\r\n };\r\n\r\n if (undefined !== display)\r\n json.display = display;\r\n\r\n return json;\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorizationClient.js","sourceRoot":"","sources":["../../src/AuthorizationClient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Authorization\n */\n\nimport { AccessToken } from \"@itwin/core-bentley\";\n\n/** Provides authorization to access APIs.\n * Bentley's iTwin platform APIs [use OAuth 2.0](https://developer.bentley.com/apis/overview/authorization/) for authorization.\n * Implementations are provided for [Electron](https://www.npmjs.com/package/@itwin/electron-authorization), [browsers](https://www.npmjs.com/package/@itwin/browser-authorization),\n * [services](https://www.npmjs.com/package/@itwin/service-authorization), and [command-line applications](https://www.npmjs.com/package/@itwin/node-cli-authorization).\n * @see [IModelHostOptions.authorizationClient]($backend) and [IModelAppOptions.authorizationClient]($frontend) to configure the client.\n * @see [IModelHost.authorizationClient]($backend) and [IModelApp.authorizationClient]($frontend) to access the configured client.\n * @note Access tokens expire periodically and are automatically refreshed when possible; therefore, tokens should always be requested via the client, not cached for later reuse.\n @public\n */\nexport interface AuthorizationClient {\n /** Obtain an [[AccessToken]] for the currently authorized user, or blank string if no token is available. */\n getAccessToken(): Promise<AccessToken>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AuthorizationClient.js","sourceRoot":"","sources":["../../src/AuthorizationClient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Authorization\r\n */\r\n\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\n\r\n/** Provides authorization to access APIs.\r\n * Bentley's iTwin platform APIs [use OAuth 2.0](https://developer.bentley.com/apis/overview/authorization/) for authorization.\r\n * Implementations are provided for [Electron](https://www.npmjs.com/package/@itwin/electron-authorization), [browsers](https://www.npmjs.com/package/@itwin/browser-authorization),\r\n * [services](https://www.npmjs.com/package/@itwin/service-authorization), and [command-line applications](https://www.npmjs.com/package/@itwin/node-cli-authorization).\r\n * @see [IModelHostOptions.authorizationClient]($backend) and [IModelAppOptions.authorizationClient]($frontend) to configure the client.\r\n * @see [IModelHost.authorizationClient]($backend) and [IModelApp.authorizationClient]($frontend) to access the configured client.\r\n * @note Access tokens expire periodically and are automatically refreshed when possible; therefore, tokens should always be requested via the client, not cached for later reuse.\r\n @public\r\n */\r\nexport interface AuthorizationClient {\r\n /** Obtain an [[AccessToken]] for the currently authorized user, or blank string if no token is available. */\r\n getAccessToken(): Promise<AccessToken>;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundMapProvider.js","sourceRoot":"","sources":["../../src/BackgroundMapProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;GAGG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,6DAAU,CAAA;IACV,6DAAU,CAAA;IACV,6DAAU,CAAA;AACZ,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAoBD;;GAEG;AACH,MAAa,qBAAqB;IAChC,gCAAgC;IAChB,IAAI,CAA4B;IAChD,wCAAwC;IACxB,IAAI,CAAoB;IAExC,YAAoB,IAA+B,EAAE,IAAuB;QAC1E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sDAAsD;IAC/C,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,MAAM,IAAI,GAA8B,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC;QACtG,IAAI,IAAI,CAAC;QACT,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,iBAAiB,CAAC,MAAM,CAAC;YAC9B,KAAK,iBAAiB,CAAC,MAAM;gBAC3B,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;gBAClB,MAAM;YACR;gBACE,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC;gBAChC,MAAM;QACV,CAAC;QAED,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,wDAAwD;IACjD,MAAM;QACX,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,sBAAsB,CAAC,KAAmC;QACtE,4DAA4D;QAC5D,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,YAAyC,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC;IACrH,CAAC;IAED,6DAA6D;IACtD,MAAM,CAAC,KAA4B;QACxC,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC;IAC9D,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAwC;QACnD,OAAO,qBAAqB,CAAC,QAAQ,CAAC;YACpC,GAAG,IAAI,CAAC,MAAM,EAAE;YAChB,GAAG,YAAY;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AArDD,sDAqDC","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 DisplayStyles\n */\n\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** Enumerates the types of map imagery that can be supplied by a [[BackgroundMapProvider]].\n * @public\n * @extensions\n */\nexport enum BackgroundMapType {\n Street = 1,\n Aerial = 2,\n Hybrid = 3,\n}\n\n/** Enumerates a set of supported [[BackgroundMapProvider]]s that can provide map imagery.\n * @note To access imagery from such a provider, an API key must be supplied via [IModelAppOptions.mapLayerOptions]($frontend).\n * @public\n * @extensions\n */\nexport type BackgroundMapProviderName = \"BingProvider\" | \"MapBoxProvider\";\n\n/** JSON representation of a [[BackgroundMapProvider]].\n * @see [[BaseMapLayerProps.provider]].\n * @public\n */\nexport interface BackgroundMapProviderProps {\n /** The name of the provider. Default: \"BingProvider\" */\n name?: BackgroundMapProviderName;\n /** The type of imagery to display. Default: Hybrid. */\n type?: BackgroundMapType;\n}\n\n/** Describes one of a small set of standard, known suppliers of background map imagery as part of a [[BaseMapLayerSettings]].\n * @public\n */\nexport class BackgroundMapProvider {\n /** The name of the provider. */\n public readonly name: BackgroundMapProviderName;\n /** The type of map imagery provided. */\n public readonly type: BackgroundMapType;\n\n private constructor(name: BackgroundMapProviderName, type: BackgroundMapType) {\n this.name = name;\n this.type = type;\n }\n\n /** Create a provider from its JSON representation. */\n public static fromJSON(props: BackgroundMapProviderProps): BackgroundMapProvider {\n const name: BackgroundMapProviderName = props.name === \"MapBoxProvider\" ? props.name : \"BingProvider\";\n let type;\n switch (props.type) {\n case BackgroundMapType.Street:\n case BackgroundMapType.Aerial:\n type = props.type;\n break;\n default:\n type = BackgroundMapType.Hybrid;\n break;\n }\n\n return new BackgroundMapProvider(name, type);\n }\n\n /** Convert this provider to its JSON representation. */\n public toJSON(): BackgroundMapProviderProps {\n return { name: this.name, type: this.type };\n }\n\n /** @internal */\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BackgroundMapProvider {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return this.fromJSON({ name: props.providerName as BackgroundMapProviderName, type: props.providerData?.mapType });\n }\n\n /** Return true if this provider is equivalent to `other`. */\n public equals(other: BackgroundMapProvider): boolean {\n return this.name === other.name && this.type === other.type;\n }\n\n /** Produce a copy of this provider with identical properties except for those explicitly specified by `changedProps`.\n * Any properties explicitly set to `undefined` in `changedProps` will be reset to their default values.\n */\n public clone(changedProps: BackgroundMapProviderProps): BackgroundMapProvider {\n return BackgroundMapProvider.fromJSON({\n ...this.toJSON(),\n ...changedProps,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BackgroundMapProvider.js","sourceRoot":"","sources":["../../src/BackgroundMapProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;GAGG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,6DAAU,CAAA;IACV,6DAAU,CAAA;IACV,6DAAU,CAAA;AACZ,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAoBD;;GAEG;AACH,MAAa,qBAAqB;IAChC,gCAAgC;IAChB,IAAI,CAA4B;IAChD,wCAAwC;IACxB,IAAI,CAAoB;IAExC,YAAoB,IAA+B,EAAE,IAAuB;QAC1E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sDAAsD;IAC/C,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,MAAM,IAAI,GAA8B,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC;QACtG,IAAI,IAAI,CAAC;QACT,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,iBAAiB,CAAC,MAAM,CAAC;YAC9B,KAAK,iBAAiB,CAAC,MAAM;gBAC3B,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;gBAClB,MAAM;YACR;gBACE,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC;gBAChC,MAAM;QACV,CAAC;QAED,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,wDAAwD;IACjD,MAAM;QACX,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,sBAAsB,CAAC,KAAmC;QACtE,4DAA4D;QAC5D,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,YAAyC,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC;IACrH,CAAC;IAED,6DAA6D;IACtD,MAAM,CAAC,KAA4B;QACxC,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC;IAC9D,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAwC;QACnD,OAAO,qBAAqB,CAAC,QAAQ,CAAC;YACpC,GAAG,IAAI,CAAC,MAAM,EAAE;YAChB,GAAG,YAAY;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AArDD,sDAqDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\r\n\r\n/** Enumerates the types of map imagery that can be supplied by a [[BackgroundMapProvider]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BackgroundMapType {\r\n Street = 1,\r\n Aerial = 2,\r\n Hybrid = 3,\r\n}\r\n\r\n/** Enumerates a set of supported [[BackgroundMapProvider]]s that can provide map imagery.\r\n * @note To access imagery from such a provider, an API key must be supplied via [IModelAppOptions.mapLayerOptions]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport type BackgroundMapProviderName = \"BingProvider\" | \"MapBoxProvider\";\r\n\r\n/** JSON representation of a [[BackgroundMapProvider]].\r\n * @see [[BaseMapLayerProps.provider]].\r\n * @public\r\n */\r\nexport interface BackgroundMapProviderProps {\r\n /** The name of the provider. Default: \"BingProvider\" */\r\n name?: BackgroundMapProviderName;\r\n /** The type of imagery to display. Default: Hybrid. */\r\n type?: BackgroundMapType;\r\n}\r\n\r\n/** Describes one of a small set of standard, known suppliers of background map imagery as part of a [[BaseMapLayerSettings]].\r\n * @public\r\n */\r\nexport class BackgroundMapProvider {\r\n /** The name of the provider. */\r\n public readonly name: BackgroundMapProviderName;\r\n /** The type of map imagery provided. */\r\n public readonly type: BackgroundMapType;\r\n\r\n private constructor(name: BackgroundMapProviderName, type: BackgroundMapType) {\r\n this.name = name;\r\n this.type = type;\r\n }\r\n\r\n /** Create a provider from its JSON representation. */\r\n public static fromJSON(props: BackgroundMapProviderProps): BackgroundMapProvider {\r\n const name: BackgroundMapProviderName = props.name === \"MapBoxProvider\" ? props.name : \"BingProvider\";\r\n let type;\r\n switch (props.type) {\r\n case BackgroundMapType.Street:\r\n case BackgroundMapType.Aerial:\r\n type = props.type;\r\n break;\r\n default:\r\n type = BackgroundMapType.Hybrid;\r\n break;\r\n }\r\n\r\n return new BackgroundMapProvider(name, type);\r\n }\r\n\r\n /** Convert this provider to its JSON representation. */\r\n public toJSON(): BackgroundMapProviderProps {\r\n return { name: this.name, type: this.type };\r\n }\r\n\r\n /** @internal */\r\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BackgroundMapProvider {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return this.fromJSON({ name: props.providerName as BackgroundMapProviderName, type: props.providerData?.mapType });\r\n }\r\n\r\n /** Return true if this provider is equivalent to `other`. */\r\n public equals(other: BackgroundMapProvider): boolean {\r\n return this.name === other.name && this.type === other.type;\r\n }\r\n\r\n /** Produce a copy of this provider with identical properties except for those explicitly specified by `changedProps`.\r\n * Any properties explicitly set to `undefined` in `changedProps` will be reset to their default values.\r\n */\r\n public clone(changedProps: BackgroundMapProviderProps): BackgroundMapProvider {\r\n return BackgroundMapProvider.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,mEAAmF;AACnF,qDAA+E;AAC/E,uDAAkE;AAElE;;;;;GAKG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9B,2CAAS,CAAA;AACX,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAgED,SAAS,kBAAkB,CAAC,IAAgB;IAC1C,OAAO,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;AAC/D,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAsB;IACnD,IAAI,QAAQ,KAAK,OAAO,KAAK;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAa,qBAAqB;IAChC,yCAAyC;IACxB,SAAS,CAAwB;IAElD,yDAAyD;IACzC,UAAU,CAAS;IACnC,2MAA2M;IAC3L,YAAY,CAAiB;IAC7C,+LAA+L;IAC/K,cAAc,CAAU;IACxC,0GAA0G;IAC1F,YAAY,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AAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;IACpG,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAAiC;QAC5C,IAAI,SAAS,KAAK,YAAY;YAC5B,OAAO,IAAI,CAAC;QAEd,MAAM,KAAK,GAAG;YACZ,UAAU,EAAE,YAAY,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU;YACtD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,cAAc,EAAE,YAAY,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc;YAClE,SAAS,EAAE,YAAY,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS;YACnD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,UAAU;YAC3D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,eAAe,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;YACjJ,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;YAC5I,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;YACjC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;SAC/C,CAAC;QAEF,OAAO,qBAAqB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;CACF;AAvJD,sDAuJC","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 DisplayStyles\n */\n\nimport { BackgroundMapProvider, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\nimport { TerrainProps, TerrainSettings } from \"./TerrainSettings\";\n\n/** Describes the projection of the background map\n * @see [[BackgroundMapProps]]\n * @see [[DisplayStyleSettingsProps]]\n * @public\n * @extensions\n */\nexport enum GlobeMode {\n /** Display Earth as 3d ellipsoid */\n Ellipsoid = 0,\n /** Display Earth as plane. */\n Plane = 1,\n}\n\n/** In-memory JSON representation of a [[BackgroundMapSettings]].\n * @see [[PersistentBackgroundMapProps]] for the persistent JSON representation.\n * @public\n * @extensions\n */\nexport interface BackgroundMapProps {\n /** The elevation of the map in meters relative the WGS84 ellipsoid. Default value: 0. */\n groundBias?: number;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.\n * Default value: false.\n */\n transparency?: number | false;\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\n useDepthBuffer?: boolean;\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\n applyTerrain?: boolean;\n /** Properties associated with terrain display. */\n terrainSettings?: TerrainProps;\n /** Globe Mode. Default value: GlobeMode.Ellipsoid */\n globeMode?: GlobeMode;\n /** If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\n * allows the user to select elements that are behind the map.\n */\n nonLocatable?: boolean;\n /** A planar mask applied to the map geometry\n * @beta\n */\n planarClipMask?: PlanarClipMaskProps;\n\n /** See [[DeprecatedBackgroundMapProps.providerName]]. */\n providerName?: never;\n /** See [[DeprecatedBackgroundMapProps.providerData]]. */\n providerData?: never;\n}\n\n/** Properties of [[PersistentBackgroundMapProps]] that have been deprecated, but are retained for backwards compatibility.\n * These properties are omitted from [[BackgroundMapProps]] as they are no longer part of the API, but are included in\n * [[PersistentBackgroundMapProps]] because they remain part of the persistence format.\n * @public\n * @extensions\n */\nexport interface DeprecatedBackgroundMapProps {\n /** Identifies the source of the map tiles. Currently supported providers are \"BingProvider\" and \"MapBoxProvider\".\n * Default value: \"BingProvider\"\n * @deprecated in 3.6.0 - might be removed in next major version. Use MapImageryProps.backgroundBase.\n */\n providerName?: string;\n /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.\n * @deprecated in 3.6.0 - might be removed in next major version. Use MapImageryProps.backgroundBase\n */\n providerData?: {\n /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */\n mapType?: BackgroundMapType;\n };\n}\n\n/** Persistent JSON representation of a [[BackgroundMapSettings]].\n * @public\n * @extensions\n */\nexport type PersistentBackgroundMapProps = Omit<BackgroundMapProps, keyof DeprecatedBackgroundMapProps> & DeprecatedBackgroundMapProps;\n\nfunction normalizeGlobeMode(mode?: GlobeMode): GlobeMode {\n return GlobeMode.Plane === mode ? mode : GlobeMode.Ellipsoid;\n}\n\nfunction normalizeTransparency(trans?: number | false): number | false {\n if (\"number\" === typeof trans)\n return Math.min(1, Math.max(0, trans));\n\n return false;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls aspects of how the background map is displayed.\n * @see [[DisplayStyleSettings.backgroundMap]] to query or change these settings for a display style.\n * @see [[MapImagerySettings]] to control the type of imagery applied to the background map.\n * @public\n */\nexport class BackgroundMapSettings {\n /** Retained strictly for persistence. */\n private readonly _provider: BackgroundMapProvider;\n\n /** Elevation in meters, relative to WGS84 Ellipsoid.. */\n public readonly groundBias: number;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\n public readonly transparency: number | false;\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\n public readonly useDepthBuffer: boolean;\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\n public readonly applyTerrain: boolean;\n /** Settings associated with terrain display. */\n public readonly terrainSettings: TerrainSettings;\n /** Globe display mode. */\n public readonly globeMode: GlobeMode;\n /** Planar Mask - used to mask the background map to avoid overlapping with other geometry\n * @beta\n */\n public readonly planarClipMask: PlanarClipMaskSettings;\n private readonly _locatable: boolean;\n /** If false, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\n * allows the user to select elements that are behind the map.\n */\n public get locatable(): boolean {\n // Handle legacy TerrainProps.nonLocatable:\n // - If TerrainProps.nonLocatable=true and terrain is on, terrain is not locatable.\n // - Otherwise, use BackgroundMapProps.nonLocatable.\n if (this.applyTerrain && this.terrainSettings.nonLocatable)\n return false;\n\n return this._locatable;\n }\n\n /** If transparency is overridden, the transparency to apply; otherwise, undefined. */\n public get transparencyOverride(): number | undefined { return false !== this.transparency ? this.transparency : undefined; }\n\n private constructor(props: BackgroundMapProps | PersistentBackgroundMapProps) {\n this.groundBias = props.groundBias ?? 0;\n this.transparency = normalizeTransparency(props.transparency);\n this.useDepthBuffer = props.useDepthBuffer ?? false;\n this.applyTerrain = props.applyTerrain ?? false;\n this.terrainSettings = TerrainSettings.fromJSON(props.terrainSettings);\n this.globeMode = normalizeGlobeMode(props.globeMode);\n this._locatable = true !== props.nonLocatable;\n this.planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\n this._provider = BackgroundMapProvider.fromBackgroundMapProps(props);\n }\n\n /** Create settings from their persistent representation. In general, this method should only be used when reading the settings directly from\n * the iModel - otherwise, prefer [[fromJSON]].\n */\n public static fromPersistentJSON(json?: PersistentBackgroundMapProps): BackgroundMapSettings {\n return new this(json ?? {});\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields.\n * @see [[fromPersistentJSON]] if you are reading the settings directly from the iModel.\n */\n public static fromJSON(json?: BackgroundMapProps): BackgroundMapSettings {\n return new BackgroundMapSettings(json ?? {});\n }\n\n /** Convert these settings to their in-memory JSON representation.\n * @see [[toPersistentJSON]] if you intend to write the JSON directly to an iModel.\n */\n public toJSON(): BackgroundMapProps {\n const props: BackgroundMapProps = {};\n if (0 !== this.groundBias)\n props.groundBias = this.groundBias;\n if (this.applyTerrain)\n props.applyTerrain = true;\n if (false !== this.transparency)\n props.transparency = this.transparency;\n if (GlobeMode.Ellipsoid !== this.globeMode)\n props.globeMode = this.globeMode;\n if (this.useDepthBuffer)\n props.useDepthBuffer = true;\n if (!this._locatable)\n props.nonLocatable = true;\n\n const terrainSettings = this.terrainSettings.toJSON();\n for (const prop of Object.values(terrainSettings)) {\n if (undefined !== prop) {\n props.terrainSettings = terrainSettings;\n break;\n }\n }\n\n if (this.planarClipMask.isValid)\n props.planarClipMask = this.planarClipMask.toJSON();\n\n return props;\n }\n\n /** Convert these settings to their persistent representation. In general, this method should only be used when writing the settings directly to\n * the iModel - otherwise, prefer [[toJSON]].\n */\n public toPersistentJSON(): PersistentBackgroundMapProps {\n const props = this.toJSON() as PersistentBackgroundMapProps;\n\n // Preserve deprecated imagery provider properties.\n if (\"BingProvider\" !== this._provider.name)\n props.providerName = this._provider.name; // eslint-disable-line @typescript-eslint/no-deprecated\n if (BackgroundMapType.Hybrid !== this._provider.type)\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line @typescript-eslint/no-deprecated\n\n return props;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(BackgroundMapSettings.fromJSON(json));\n }\n\n /** Returns true if the persistent representation of these settings is equivalent to `json`. */\n public equalsPersistentJSON(json?: PersistentBackgroundMapProps): boolean {\n return this.equals(BackgroundMapSettings.fromPersistentJSON(json));\n }\n\n /** Returns true if these settings are equivalent to `other`. */\n public equals(other: BackgroundMapSettings): boolean {\n return this.groundBias === other.groundBias && this.useDepthBuffer === other.useDepthBuffer && this.transparency === other.transparency\n && this.globeMode === other.globeMode && this._locatable === other._locatable && this.applyTerrain === other.applyTerrain\n && this.terrainSettings.equals(other.terrainSettings) && this.planarClipMask.equals(other.planarClipMask)\n && this._provider.name === other._provider.name && this._provider.type === other._provider.type;\n }\n\n /** Create a copy of this BackgroundMapSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A BackgroundMapSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: BackgroundMapProps): BackgroundMapSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n groundBias: changedProps.groundBias ?? this.groundBias,\n transparency: changedProps.transparency ?? this.transparency,\n useDepthBuffer: changedProps.useDepthBuffer ?? this.useDepthBuffer,\n globeMode: changedProps.globeMode ?? this.globeMode,\n nonLocatable: changedProps.nonLocatable ?? !this._locatable,\n applyTerrain: changedProps.applyTerrain ?? this.applyTerrain,\n terrainSettings: changedProps.terrainSettings ? this.terrainSettings.clone(changedProps.terrainSettings).toJSON() : this.terrainSettings.toJSON(),\n planarClipMask: changedProps.planarClipMask ? this.planarClipMask.clone(changedProps.planarClipMask).toJSON() : this.planarClipMask.toJSON(),\n providerName: this._provider.name,\n providerData: { mapType: this._provider.type },\n };\n\n return BackgroundMapSettings.fromPersistentJSON(props);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,mEAAmF;AACnF,qDAA+E;AAC/E,uDAAkE;AAElE;;;;;GAKG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9B,2CAAS,CAAA;AACX,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAgED,SAAS,kBAAkB,CAAC,IAAgB;IAC1C,OAAO,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC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,eAAe,CAAC,MAAM,EAAE;YACjJ,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;YAC5I,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;YACjC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;SAC/C,CAAC;QAEF,OAAO,qBAAqB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;CACF;AAvJD,sDAuJC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { BackgroundMapProvider, BackgroundMapType } from \"./BackgroundMapProvider\";\r\nimport { PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\r\nimport { TerrainProps, TerrainSettings } from \"./TerrainSettings\";\r\n\r\n/** Describes the projection of the background map\r\n * @see [[BackgroundMapProps]]\r\n * @see [[DisplayStyleSettingsProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GlobeMode {\r\n /** Display Earth as 3d ellipsoid */\r\n Ellipsoid = 0,\r\n /** Display Earth as plane. */\r\n Plane = 1,\r\n}\r\n\r\n/** In-memory JSON representation of a [[BackgroundMapSettings]].\r\n * @see [[PersistentBackgroundMapProps]] for the persistent JSON representation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface BackgroundMapProps {\r\n /** The elevation of the map in meters relative the WGS84 ellipsoid. Default value: 0. */\r\n groundBias?: number;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.\r\n * Default value: false.\r\n */\r\n transparency?: number | false;\r\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\r\n useDepthBuffer?: boolean;\r\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\r\n applyTerrain?: boolean;\r\n /** Properties associated with terrain display. */\r\n terrainSettings?: TerrainProps;\r\n /** Globe Mode. Default value: GlobeMode.Ellipsoid */\r\n globeMode?: GlobeMode;\r\n /** If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\r\n * allows the user to select elements that are behind the map.\r\n */\r\n nonLocatable?: boolean;\r\n /** A planar mask applied to the map geometry\r\n * @beta\r\n */\r\n planarClipMask?: PlanarClipMaskProps;\r\n\r\n /** See [[DeprecatedBackgroundMapProps.providerName]]. */\r\n providerName?: never;\r\n /** See [[DeprecatedBackgroundMapProps.providerData]]. */\r\n providerData?: never;\r\n}\r\n\r\n/** Properties of [[PersistentBackgroundMapProps]] that have been deprecated, but are retained for backwards compatibility.\r\n * These properties are omitted from [[BackgroundMapProps]] as they are no longer part of the API, but are included in\r\n * [[PersistentBackgroundMapProps]] because they remain part of the persistence format.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DeprecatedBackgroundMapProps {\r\n /** Identifies the source of the map tiles. Currently supported providers are \"BingProvider\" and \"MapBoxProvider\".\r\n * Default value: \"BingProvider\"\r\n * @deprecated in 3.6.0 - might be removed in next major version. Use MapImageryProps.backgroundBase.\r\n */\r\n providerName?: string;\r\n /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.\r\n * @deprecated in 3.6.0 - might be removed in next major version. Use MapImageryProps.backgroundBase\r\n */\r\n providerData?: {\r\n /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */\r\n mapType?: BackgroundMapType;\r\n };\r\n}\r\n\r\n/** Persistent JSON representation of a [[BackgroundMapSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type PersistentBackgroundMapProps = Omit<BackgroundMapProps, keyof DeprecatedBackgroundMapProps> & DeprecatedBackgroundMapProps;\r\n\r\nfunction normalizeGlobeMode(mode?: GlobeMode): GlobeMode {\r\n return GlobeMode.Plane === mode ? mode : GlobeMode.Ellipsoid;\r\n}\r\n\r\nfunction normalizeTransparency(trans?: number | false): number | false {\r\n if (\"number\" === typeof trans)\r\n return Math.min(1, Math.max(0, trans));\r\n\r\n return false;\r\n}\r\n\r\n/** As part of a [[DisplayStyleSettings]], controls aspects of how the background map is displayed.\r\n * @see [[DisplayStyleSettings.backgroundMap]] to query or change these settings for a display style.\r\n * @see [[MapImagerySettings]] to control the type of imagery applied to the background map.\r\n * @public\r\n */\r\nexport class BackgroundMapSettings {\r\n /** Retained strictly for persistence. */\r\n private readonly _provider: BackgroundMapProvider;\r\n\r\n /** Elevation in meters, relative to WGS84 Ellipsoid.. */\r\n public readonly groundBias: number;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\r\n public readonly transparency: number | false;\r\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\r\n public readonly useDepthBuffer: boolean;\r\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\r\n public readonly applyTerrain: boolean;\r\n /** Settings associated with terrain display. */\r\n public readonly terrainSettings: TerrainSettings;\r\n /** Globe display mode. */\r\n public readonly globeMode: GlobeMode;\r\n /** Planar Mask - used to mask the background map to avoid overlapping with other geometry\r\n * @beta\r\n */\r\n public readonly planarClipMask: PlanarClipMaskSettings;\r\n private readonly _locatable: boolean;\r\n /** If false, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\r\n * allows the user to select elements that are behind the map.\r\n */\r\n public get locatable(): boolean {\r\n // Handle legacy TerrainProps.nonLocatable:\r\n // - If TerrainProps.nonLocatable=true and terrain is on, terrain is not locatable.\r\n // - Otherwise, use BackgroundMapProps.nonLocatable.\r\n if (this.applyTerrain && this.terrainSettings.nonLocatable)\r\n return false;\r\n\r\n return this._locatable;\r\n }\r\n\r\n /** If transparency is overridden, the transparency to apply; otherwise, undefined. */\r\n public get transparencyOverride(): number | undefined { return false !== this.transparency ? this.transparency : undefined; }\r\n\r\n private constructor(props: BackgroundMapProps | PersistentBackgroundMapProps) {\r\n this.groundBias = props.groundBias ?? 0;\r\n this.transparency = normalizeTransparency(props.transparency);\r\n this.useDepthBuffer = props.useDepthBuffer ?? false;\r\n this.applyTerrain = props.applyTerrain ?? false;\r\n this.terrainSettings = TerrainSettings.fromJSON(props.terrainSettings);\r\n this.globeMode = normalizeGlobeMode(props.globeMode);\r\n this._locatable = true !== props.nonLocatable;\r\n this.planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\r\n this._provider = BackgroundMapProvider.fromBackgroundMapProps(props);\r\n }\r\n\r\n /** Create settings from their persistent representation. In general, this method should only be used when reading the settings directly from\r\n * the iModel - otherwise, prefer [[fromJSON]].\r\n */\r\n public static fromPersistentJSON(json?: PersistentBackgroundMapProps): BackgroundMapSettings {\r\n return new this(json ?? {});\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields.\r\n * @see [[fromPersistentJSON]] if you are reading the settings directly from the iModel.\r\n */\r\n public static fromJSON(json?: BackgroundMapProps): BackgroundMapSettings {\r\n return new BackgroundMapSettings(json ?? {});\r\n }\r\n\r\n /** Convert these settings to their in-memory JSON representation.\r\n * @see [[toPersistentJSON]] if you intend to write the JSON directly to an iModel.\r\n */\r\n public toJSON(): BackgroundMapProps {\r\n const props: BackgroundMapProps = {};\r\n if (0 !== this.groundBias)\r\n props.groundBias = this.groundBias;\r\n if (this.applyTerrain)\r\n props.applyTerrain = true;\r\n if (false !== this.transparency)\r\n props.transparency = this.transparency;\r\n if (GlobeMode.Ellipsoid !== this.globeMode)\r\n props.globeMode = this.globeMode;\r\n if (this.useDepthBuffer)\r\n props.useDepthBuffer = true;\r\n if (!this._locatable)\r\n props.nonLocatable = true;\r\n\r\n const terrainSettings = this.terrainSettings.toJSON();\r\n for (const prop of Object.values(terrainSettings)) {\r\n if (undefined !== prop) {\r\n props.terrainSettings = terrainSettings;\r\n break;\r\n }\r\n }\r\n\r\n if (this.planarClipMask.isValid)\r\n props.planarClipMask = this.planarClipMask.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Convert these settings to their persistent representation. In general, this method should only be used when writing the settings directly to\r\n * the iModel - otherwise, prefer [[toJSON]].\r\n */\r\n public toPersistentJSON(): PersistentBackgroundMapProps {\r\n const props = this.toJSON() as PersistentBackgroundMapProps;\r\n\r\n // Preserve deprecated imagery provider properties.\r\n if (\"BingProvider\" !== this._provider.name)\r\n props.providerName = this._provider.name; // eslint-disable-line @typescript-eslint/no-deprecated\r\n if (BackgroundMapType.Hybrid !== this._provider.type)\r\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line @typescript-eslint/no-deprecated\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\r\n public equalsJSON(json?: BackgroundMapProps): boolean {\r\n return this.equals(BackgroundMapSettings.fromJSON(json));\r\n }\r\n\r\n /** Returns true if the persistent representation of these settings is equivalent to `json`. */\r\n public equalsPersistentJSON(json?: PersistentBackgroundMapProps): boolean {\r\n return this.equals(BackgroundMapSettings.fromPersistentJSON(json));\r\n }\r\n\r\n /** Returns true if these settings are equivalent to `other`. */\r\n public equals(other: BackgroundMapSettings): boolean {\r\n return this.groundBias === other.groundBias && this.useDepthBuffer === other.useDepthBuffer && this.transparency === other.transparency\r\n && this.globeMode === other.globeMode && this._locatable === other._locatable && this.applyTerrain === other.applyTerrain\r\n && this.terrainSettings.equals(other.terrainSettings) && this.planarClipMask.equals(other.planarClipMask)\r\n && this._provider.name === other._provider.name && this._provider.type === other._provider.type;\r\n }\r\n\r\n /** Create a copy of this BackgroundMapSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A BackgroundMapSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: BackgroundMapProps): BackgroundMapSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n const props = {\r\n groundBias: changedProps.groundBias ?? this.groundBias,\r\n transparency: changedProps.transparency ?? this.transparency,\r\n useDepthBuffer: changedProps.useDepthBuffer ?? this.useDepthBuffer,\r\n globeMode: changedProps.globeMode ?? this.globeMode,\r\n nonLocatable: changedProps.nonLocatable ?? !this._locatable,\r\n applyTerrain: changedProps.applyTerrain ?? this.applyTerrain,\r\n terrainSettings: changedProps.terrainSettings ? this.terrainSettings.clone(changedProps.terrainSettings).toJSON() : this.terrainSettings.toJSON(),\r\n planarClipMask: changedProps.planarClipMask ? this.planarClipMask.clone(changedProps.planarClipMask).toJSON() : this.planarClipMask.toJSON(),\r\n providerName: this._provider.name,\r\n providerData: { mapType: this._provider.type },\r\n };\r\n\r\n return BackgroundMapSettings.fromPersistentJSON(props);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base64EncodedString.js","sourceRoot":"","sources":["../../src/Base64EncodedString.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yCAAmC;AASnC;;GAEG;AACH,IAAiB,mBAAmB,CAsDnC;AAtDD,WAAiB,mBAAmB;IAClC,4EAA4E;IAC/D,0BAAM,GAAG,kBAAkB,CAAC;IAEzC,2DAA2D;IAC3D,SAAgB,cAAc,CAAC,KAAiB;QAC9C,OAAO,GAAG,oBAAA,MAAM,GAAG,kBAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;IACpD,CAAC;IAFe,kCAAc,iBAE7B,CAAA;IAED,2DAA2D;IAC3D,SAAgB,YAAY,CAAC,MAA2B;QACtD,OAAO,kBAAM,CAAC,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC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CAAA;IAED,iDAAiD;IACjD,SAAgB,MAAM,CAAC,GAAW;QAChC,OAAO,kBAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAFe,0BAAM,SAErB,CAAA;AACH,CAAC,EAtDgB,mBAAmB,mCAAnB,mBAAmB,QAsDnC","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 Entities\n */\n\nimport { Base64 } from \"js-base64\";\n\n/** Represents an array of bytes encoded in base-64 with a prefix indicating the encoding, as required when converting EC properties of `binary` type to and from JSON.\n * @see [[TextureProps.data]] and [[BRepEntity.DataProps.data]] for examples of properties of this type.\n * @public\n * @extensions\n */\nexport type Base64EncodedString = string;\n\n/** Represents an array of bytes encoded in base-64 with a prefix indicating the encoding, as persisted in an [ECDb]($backend) for properties of `binary` type.\n * @public\n */\nexport namespace Base64EncodedString { // eslint-disable-line @typescript-eslint/no-redeclare\n /** The prefix prepended to the string identifying it as base-64-encoded. */\n export const prefix = \"encoding=base64;\";\n\n /** Encode an array of bytes into a Base64EncodedString. */\n export function fromUint8Array(bytes: Uint8Array): Base64EncodedString {\n return `${prefix}${Base64.fromUint8Array(bytes)}`;\n }\n\n /** Decode a Base64EncodedString into an array of bytes. */\n export function toUint8Array(base64: Base64EncodedString): Uint8Array {\n return Base64.toUint8Array(stripPrefix(base64));\n }\n\n /** Returns true if the input starts with [[Base64EncodedString.prefix]] indicating it is a well-formed Base64EncodedString. */\n export function hasPrefix(str: string): boolean {\n return str.startsWith(prefix);\n }\n\n /** Ensure that the base-64-encoded string starts with the [[Base64EncodedString.prefix]]. */\n export function ensurePrefix(base64: string): Base64EncodedString {\n return hasPrefix(base64) ? base64 : `${prefix}${base64}`;\n }\n\n /** Remove the [[Base64EncodedString.prefix]] from the string if present. */\n export function stripPrefix(base64: Base64EncodedString): string {\n return hasPrefix(base64) ? base64.substring(prefix.length) : base64;\n }\n\n /** A function suitable for use with `JSON.parse` to revive a Base64EncodedString into a Uint8Array. */\n export const reviver = (_name: string, value: any): any => {\n if (typeof value === \"string\" && hasPrefix(value))\n value = toUint8Array(value);\n\n return value;\n };\n\n /** A function suitable for use with `JSON.stringify` to serialize a Uint8Array as a Base64EncodedString. */\n export const replacer = (_name: string, value: any): any => {\n if (value && value.constructor === Uint8Array)\n value = fromUint8Array(value);\n\n return value;\n };\n\n /* Encode a string into a Base64EncodedString. */\n export function encode(src: string, urlSafe?: boolean): Base64EncodedString {\n return Base64.encode(src, urlSafe);\n }\n\n /* Decode a Base64EncodedString into a string. */\n export function decode(src: string): Base64EncodedString {\n return Base64.decode(src);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Base64EncodedString.js","sourceRoot":"","sources":["../../src/Base64EncodedString.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yCAAmC;AASnC;;GAEG;AACH,IAAiB,mBAAmB,CAsDnC;AAtDD,WAAiB,mBAAmB;IAClC,4EAA4E;IAC/D,0BAAM,GAAG,kBAAkB,CAAC;IAEzC,2DAA2D;IAC3D,SAAgB,cAAc,CAAC,KAAiB;QAC9C,OAAO,GAAG,oBAAA,MAAM,GAAG,kBAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;IACpD,CAAC;IAFe,kCAAc,iBAE7B,CAAA;IAED,2DAA2D;IAC3D,SAAgB,YAAY,CAAC,MAA2B;QACtD,OAAO,kBAAM,CAAC,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IAFe,gCAAY,eAE3B,CAAA;IAED,+HAA+H;IAC/H,SAAgB,SAAS,CAAC,GAAW;QACnC,OAAO,GAAG,CAAC,UAAU,CAAC,oBAAA,MAAM,CAAC,CAAC;IAChC,CAAC;IAFe,6BAAS,YAExB,CAAA;IAED,6FAA6F;IAC7F,S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------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { Base64 } from \"js-base64\";\r\n\r\n/** Represents an array of bytes encoded in base-64 with a prefix indicating the encoding, as required when converting EC properties of `binary` type to and from JSON.\r\n * @see [[TextureProps.data]] and [[BRepEntity.DataProps.data]] for examples of properties of this type.\r\n * @public\r\n * @extensions\r\n */\r\nexport type Base64EncodedString = string;\r\n\r\n/** Represents an array of bytes encoded in base-64 with a prefix indicating the encoding, as persisted in an [ECDb]($backend) for properties of `binary` type.\r\n * @public\r\n */\r\nexport namespace Base64EncodedString { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** The prefix prepended to the string identifying it as base-64-encoded. */\r\n export const prefix = \"encoding=base64;\";\r\n\r\n /** Encode an array of bytes into a Base64EncodedString. */\r\n export function fromUint8Array(bytes: Uint8Array): Base64EncodedString {\r\n return `${prefix}${Base64.fromUint8Array(bytes)}`;\r\n }\r\n\r\n /** Decode a Base64EncodedString into an array of bytes. */\r\n export function toUint8Array(base64: Base64EncodedString): Uint8Array {\r\n return Base64.toUint8Array(stripPrefix(base64));\r\n }\r\n\r\n /** Returns true if the input starts with [[Base64EncodedString.prefix]] indicating it is a well-formed Base64EncodedString. */\r\n export function hasPrefix(str: string): boolean {\r\n return str.startsWith(prefix);\r\n }\r\n\r\n /** Ensure that the base-64-encoded string starts with the [[Base64EncodedString.prefix]]. */\r\n export function ensurePrefix(base64: string): Base64EncodedString {\r\n return hasPrefix(base64) ? base64 : `${prefix}${base64}`;\r\n }\r\n\r\n /** Remove the [[Base64EncodedString.prefix]] from the string if present. */\r\n export function stripPrefix(base64: Base64EncodedString): string {\r\n return hasPrefix(base64) ? base64.substring(prefix.length) : base64;\r\n }\r\n\r\n /** A function suitable for use with `JSON.parse` to revive a Base64EncodedString into a Uint8Array. */\r\n export const reviver = (_name: string, value: any): any => {\r\n if (typeof value === \"string\" && hasPrefix(value))\r\n value = toUint8Array(value);\r\n\r\n return value;\r\n };\r\n\r\n /** A function suitable for use with `JSON.stringify` to serialize a Uint8Array as a Base64EncodedString. */\r\n export const replacer = (_name: string, value: any): any => {\r\n if (value && value.constructor === Uint8Array)\r\n value = fromUint8Array(value);\r\n\r\n return value;\r\n };\r\n\r\n /* Encode a string into a Base64EncodedString. */\r\n export function encode(src: string, urlSafe?: boolean): Base64EncodedString {\r\n return Base64.encode(src, urlSafe);\r\n }\r\n\r\n /* Decode a Base64EncodedString into a string. */\r\n export function decode(src: string): Base64EncodedString {\r\n return Base64.decode(src);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlobReader.js","sourceRoot":"","sources":["../../src/BlobReader.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAgE;AAChE,uDAE2B;AAE3B,YAAY;AACZ,MAAa,WAAW;IACd,OAAO,GAAiB,EAAE,CAAC;IAC5B,MAAM,CAAC,KAAiB;QAC7B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IACM,EAAE,CAAC,GAAW,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpD,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5C,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,OAAQ,IAAI,CAAC,OAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IACM,OAAO;QACZ,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC5E,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AK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,IAAW,MAAM,KAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;CAC1D;AArDD,gCAqDC","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 iModels\n */\nimport { expectDefined, Id64String } from \"@itwin/core-bentley\";\nimport {\n BlobOptions, BlobOptionsBuilder, BlobRange, DbBlobRequest, DbBlobResponse, DbQueryError, DbRequestExecutor, DbRequestKind,\n} from \"./ConcurrentQuery\";\n\n/** @beta */\nexport class Uint8Chunks implements Iterable<Uint8Array> {\n private _chunks: Uint8Array[] = [];\n public append(chunk: Uint8Array) {\n this._chunks.push(chunk);\n }\n public at(idx: number) { return this._chunks[idx]; }\n public get length() { return this._chunks.length; }\n public [Symbol.iterator](): Iterator<Uint8Array, any, undefined> {\n return (this._chunks as any)[Symbol.iterator];\n }\n public combine(): Uint8Array {\n const totalChunkLength = this._chunks.reduce((acc, v) => acc + v.length, 0);\n const combineChunk = new Uint8Array(totalChunkLength);\n let offset = 0;\n for (const array of this._chunks) {\n combineChunk.set(array, offset);\n offset += array.length;\n }\n return combineChunk;\n }\n}\n/** @beta */\nexport class BlobReader {\n private _chunks = new Uint8Chunks();\n private _lengthToRead: number = -1;\n private _options = new BlobOptionsBuilder().getOptions();\n public constructor(private _executor: DbRequestExecutor<DbBlobRequest, DbBlobResponse>,\n public readonly className: string,\n public readonly accessString: string,\n public readonly instanceId: Id64String,\n options?: BlobOptions) {\n this.reset(options);\n }\n public reset(options?: BlobOptions) {\n if (options) {\n this._options = options;\n }\n this._chunks = new Uint8Chunks();\n this._lengthToRead = expectDefined(this.range.count);\n }\n public get range(): BlobRange { return expectDefined(this._options.range); }\n public async step(): Promise<boolean> {\n if (this._lengthToRead === this._chunks.length) {\n return false;\n }\n const request: DbBlobRequest = {\n kind: DbRequestKind.BlobIO,\n className: this.className,\n accessString: this.accessString,\n instanceId: this.instanceId,\n ...this._options,\n };\n request.range = {offset: this._chunks.length, count: this.range ? this._lengthToRead - this._chunks.length : 0};\n const resp = await this._executor.execute(request);\n DbQueryError.throwIfError(resp, request);\n\n if (this._lengthToRead === -1) {\n this._lengthToRead = resp.rawBlobSize;\n }\n if (resp.data && resp.data.length > 0) {\n this._chunks.append(resp.data);\n }\n return true;\n }\n public async readToEnd(): Promise<Uint8Array> {\n while (await this.step()) { }\n return this._chunks.combine();\n }\n public get current(): Uint8Array {\n if (this._chunks.length === 0) {\n throw new Error(\"there is no current buffer\");\n }\n return this._chunks.at(this._chunks.length);\n }\n public get chunks(): Uint8Chunks { return this._chunks; }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BlobReader.js","sourceRoot":"","sources":["../../src/BlobReader.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAgE;AAChE,uDAE2B;AAE3B,YAAY;AACZ,MAAa,WAAW;IACd,OAAO,GAAiB,EAAE,CAAC;IAC5B,MAAM,CAAC,KAAiB;QAC7B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IACM,EAAE,CAAC,GAAW,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpD,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5C,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,OAAQ,IAAI,CAAC,OAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IACM,OAAO;QACZ,MAAM,gBAAgB,GAAG,IAAI,CAAC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EAAE,CAAC;IAChC,CAAC;IACD,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,IAAW,MAAM,KAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;CAC1D;AArDD,gCAqDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\nimport { expectDefined, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n BlobOptions, BlobOptionsBuilder, BlobRange, DbBlobRequest, DbBlobResponse, DbQueryError, DbRequestExecutor, DbRequestKind,\r\n} from \"./ConcurrentQuery\";\r\n\r\n/** @beta */\r\nexport class Uint8Chunks implements Iterable<Uint8Array> {\r\n private _chunks: Uint8Array[] = [];\r\n public append(chunk: Uint8Array) {\r\n this._chunks.push(chunk);\r\n }\r\n public at(idx: number) { return this._chunks[idx]; }\r\n public get length() { return this._chunks.length; }\r\n public [Symbol.iterator](): Iterator<Uint8Array, any, undefined> {\r\n return (this._chunks as any)[Symbol.iterator];\r\n }\r\n public combine(): Uint8Array {\r\n const totalChunkLength = this._chunks.reduce((acc, v) => acc + v.length, 0);\r\n const combineChunk = new Uint8Array(totalChunkLength);\r\n let offset = 0;\r\n for (const array of this._chunks) {\r\n combineChunk.set(array, offset);\r\n offset += array.length;\r\n }\r\n return combineChunk;\r\n }\r\n}\r\n/** @beta */\r\nexport class BlobReader {\r\n private _chunks = new Uint8Chunks();\r\n private _lengthToRead: number = -1;\r\n private _options = new BlobOptionsBuilder().getOptions();\r\n public constructor(private _executor: DbRequestExecutor<DbBlobRequest, DbBlobResponse>,\r\n public readonly className: string,\r\n public readonly accessString: string,\r\n public readonly instanceId: Id64String,\r\n options?: BlobOptions) {\r\n this.reset(options);\r\n }\r\n public reset(options?: BlobOptions) {\r\n if (options) {\r\n this._options = options;\r\n }\r\n this._chunks = new Uint8Chunks();\r\n this._lengthToRead = expectDefined(this.range.count);\r\n }\r\n public get range(): BlobRange { return expectDefined(this._options.range); }\r\n public async step(): Promise<boolean> {\r\n if (this._lengthToRead === this._chunks.length) {\r\n return false;\r\n }\r\n const request: DbBlobRequest = {\r\n kind: DbRequestKind.BlobIO,\r\n className: this.className,\r\n accessString: this.accessString,\r\n instanceId: this.instanceId,\r\n ...this._options,\r\n };\r\n request.range = {offset: this._chunks.length, count: this.range ? this._lengthToRead - this._chunks.length : 0};\r\n const resp = await this._executor.execute(request);\r\n DbQueryError.throwIfError(resp, request);\r\n\r\n if (this._lengthToRead === -1) {\r\n this._lengthToRead = resp.rawBlobSize;\r\n }\r\n if (resp.data && resp.data.length > 0) {\r\n this._chunks.append(resp.data);\r\n }\r\n return true;\r\n }\r\n public async readToEnd(): Promise<Uint8Array> {\r\n while (await this.step()) { }\r\n return this._chunks.combine();\r\n }\r\n public get current(): Uint8Array {\r\n if (this._chunks.length === 0) {\r\n throw new Error(\"there is no current buffer\");\r\n }\r\n return this._chunks.at(this._chunks.length);\r\n }\r\n public get chunks(): Uint8Chunks { return this._chunks; }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BriefcaseTypes.js","sourceRoot":"","sources":["../../src/BriefcaseTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH;;;GAGG;AACH,IAAY,gBAyBX;AAzBD,WAAY,gBAAgB;IAC1B,+CAA+C;IAC/C,sEAAoB,CAAA;IAEpB,gDAAgD;IAChD,4DAAa,CAAA;IAEb,gFAAgF;IAChF,mEAAc,CAAA;IAEd,+EAA+E;IAC/E,wEAAqC,CAAA;IAErC;;;;;;;;;;OAUG;IACH,mEAAc,CAAA;AAChB,CAAC,EAzBW,gBAAgB,gCAAhB,gBAAgB,QAyB3B;AAED;;;GAGG;AACH,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mIAAmI;IACnI,uDAAgB,CAAA;IAChB,0FAA0F;IAC1F,qDAAe,CAAA;IACf,qJAAqJ;IACrJ,+CAAY,CAAA;AACd,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB;AA2ID;;GAEG;AACH,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,qJAAqJ;IACrJ,mFAAyB,CAAA;IAEzB,iKAAiK;IACjK,yFAA4B,CAAA;IAE5B,sMAAsM;IACtM,uDAAW,CAAA;IAEX,qFAAqF;IACrF,2DAAa,CAAA;AACf,CAAC,EAZW,aAAa,6BAAb,aAAa,QAYxB;AAED;;GAEG;AACH,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,0GAA0G;IAC1G,mDAAQ,CAAA;IAER,qDAAqD;IACrD,yDAAW,CAAA;AACb,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB;AAgBD;;;;GAIG;AACH,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,sIAAsI;IACtI,qDAAQ,CAAA;IAER;;;OAGG;IACH,mEAAe,CAAA;IAEf,4IAA4I;IAC5I,yEAAkB,CAAA;IAElB,oIAAoI;IACpI,iDAAM,CAAA;IAEN,4FAA4F;IAC5F,iDAAM,CAAA;AACR,CAAC,EAlBW,WAAW,2BAAX,WAAW,QAkBtB","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 iModels\n */\n\nimport { GuidString } from \"@itwin/core-bentley\";\nimport { ChangesetIdWithIndex, ChangesetIndexOrId, LocalFileName } from \"./ChangesetProps\";\nimport { OpenDbKey } from \"./IModel\";\nimport { IModelVersionProps } from \"./IModelVersion\";\n\n/** The Id assigned to a briefcase by iModelHub, or [[BriefcaseIdValue.Unassigned]] .\n * @public\n * @extensions\n */\nexport type BriefcaseId = number;\n\n/** Values of [[BriefcaseId]] that have special meaning.\n * @public\n * @extensions\n */\nexport enum BriefcaseIdValue {\n /** Indicates an invalid/illegal BriefcaseId */\n Illegal = 0xffffffff,\n\n /** BriefcaseIds must be less than this value */\n Max = 1 << 24,\n\n /** All valid iModelHub issued BriefcaseIds will be equal or higher than this */\n FirstValid = 2,\n\n /** All valid iModelHub issued BriefcaseIds will be equal or lower than this */\n LastValid = BriefcaseIdValue.Max - 11,\n\n /**\n * The briefcase has not been assigned a unique Id by iModelHub. Only briefcases that have been assigned a unique BriefcaseId may create changesets,\n * because BriefcaseId is used to create unique ElementIds for new elements.\n *\n * The `Unassigned` briefcaseId is used for several purposes:\n * - **Snapshots**. Snapshot files are immutable copies of an iModel for archival or data exchange purposes. They can neither generate nor accept new changesets.\n * - **Checkpoints**. Checkpoints are Snapshots that represent a specific version on an iModel's timeline.\n * - **PullOnly**. A local briefcase file that may be used to \"slide\" along a timeline by applying incoming changesets.\n * They are always opened readonly except to apply changesets.\n * - **Standalone**. Standalone iModels are local files that are not connected to iModelHub, and therefore cannot accept or create changesets.\n */\n Unassigned = 0,\n}\n\n/** Whether a briefcase is editable or may only accept incoming changesets from iModelHub\n * @public\n * @extensions\n */\nexport enum SyncMode {\n /** Use a fixed version (i.e. a checkpoint). See [CheckpointManager]($backend) for preferred approach to using checkpoint files. */\n FixedVersion = 1,\n /** A briefcase that can be edited. A unique briefcaseId must be assigned by iModelHub. */\n PullAndPush = 2,\n /** use [BriefcaseIdValue.Unassigned](%backend). This makes a briefcase that can accept changesets from iModelHub but can never create changesets. */\n PullOnly = 3,\n}\n\n/**\n * Options to open a previously downloaded briefcase\n * @public\n */\nexport interface OpenBriefcaseOptions {\n /** open briefcase Readonly */\n readonly openAsReadOnly?: boolean;\n}\n\n/**\n * Properties that specify a briefcase within the local briefcase cache.\n * @see BriefcaseManager.getFileName\n * @public\n */\nexport interface BriefcaseProps {\n /** Id of the iModel */\n readonly iModelId: GuidString;\n\n /** BriefcaseId of the briefcase */\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Properties for opening a local briefcase file via [BriefcaseDb.open]($backend)\n * @public\n */\nexport interface OpenBriefcaseProps extends OpenDbKey {\n /** the full path to the briefcase file */\n readonly fileName: LocalFileName;\n /**\n * If true, open the briefcase readonly.\n * @note Readonly connections always hold a read transaction against the briefcase. That can cause the WAL file size to grow\n * unbounded if changes happen while they're open (see [Checkpoint starvation](https://www.sqlite.org/wal.html#avoiding_excessively_large_wal_files))\n * It is a good idea to close the readonly connection *before* closing the writeable connection so the WAL file will be deleted.\n */\n readonly readonly?: boolean;\n /** If true, open the briefcase readonly and monitor it for changes originating from another connection.\n * When such changes are detected, the default txn will be restarted.\n * The restart occurs only after the next iteration of the backend event loop, and will generate events that reflect the changes from the other connection.\n * This can be useful in contexts where the read-only connection is displaying a view of the contents of the briefcase while another, non-interactive program\n * is adding txns to the briefcase. It may not be reliable if the writable connection is undoing or redoing txns.\n * @note This cannot be used with cloud-based briefcases.\n */\n readonly watchForChanges?: boolean;\n}\n\n/** Properties of a local briefcase file, returned by [BriefcaseManager.getCachedBriefcases]($backend) and [BriefcaseManager.downloadBriefcase]($backend)\n * @public\n * @extensions\n */\nexport interface LocalBriefcaseProps {\n /** Full path of local file. */\n readonly fileName: LocalFileName;\n\n /** The iTwin containing the iModel. */\n readonly iTwinId: GuidString;\n\n /** The iModelId. */\n readonly iModelId: GuidString;\n\n /** The briefcaseId. */\n readonly briefcaseId: BriefcaseId;\n\n /** The current changesetId.\n * @note ChangeSet Ids are string hash values based on the ChangeSet's content and parent.\n */\n readonly changeset: ChangesetIdWithIndex;\n\n /** Size of the briefcase file in bytes */\n readonly fileSize: number;\n}\n\n/** Properties for downloading a briefcase to a local file, from iModelHub.\n * @public\n * @extensions\n */\nexport interface RequestNewBriefcaseProps {\n /** iTwin that the iModel belongs to. */\n readonly iTwinId: GuidString;\n\n /** The iModelId for the new briefcase. */\n readonly iModelId: GuidString;\n\n /** Full path of local file to store the briefcase. If undefined, a file will be created in the briefcase cache, and this member will be filled with the full path to the file.\n * Callers can use this to open the briefcase after the download completes.\n * @note this member is both an input and an output.\n */\n readonly fileName?: LocalFileName;\n\n /**\n * The BriefcaseId for the new briefcase. If undefined, a new BriefcaseId will be acquired from iModelHub before the download, and is returned in this member.\n * @note To download a briefcase that can accept but not create new changesets (sometimes referred to as \"pull only\" briefcases), set this value to [[BriefcaseIdValue.Unassigned]].\n * After downloading, you can merely delete unassigned briefcase files when they are no longer needed. Assigned BriefcaseIds should be released (via [BriefcaseManager.releaseBriefcase]($backend) )\n * when you are done with them.\n * @note this member is both an input and an output.\n *\n */\n briefcaseId?: BriefcaseId;\n\n /** Id of the change set of the new briefcase. If undefined, use latest. */\n asOf?: IModelVersionProps;\n\n /** A string to represent the device that holds the briefcase. */\n deviceName?: string;\n}\n\n/**\n * Arguments to open a Checkpoint directly from its cloud container\n * @beta\n */\nexport interface OpenCheckpointArgs {\n readonly iTwinId: GuidString;\n\n /** Id of the iModel */\n readonly iModelId: GuidString;\n\n /** changeset for the checkpoint. If undefined, attempt to open the checkpoint for the latest changeset. */\n readonly changeset?: ChangesetIndexOrId;\n}\n\n/**\n * Manages the download of a briefcase\n * @public\n */\nexport interface BriefcaseDownloader {\n /** Id of the briefcase being downloaded */\n readonly briefcaseId: BriefcaseId;\n\n /** the name of the local file for the briefcase */\n readonly fileName: LocalFileName;\n\n /** Promise that resolves when the download completes. await this to complete the download */\n readonly downloadPromise: Promise<void>;\n\n /** Request cancellation of the download */\n readonly requestCancel: () => Promise<boolean>;\n}\n\n/** Option to control the validation and upgrade of domain schemas in the Db\n * @beta\n */\nexport enum DomainOptions {\n /** Domain schemas will be validated for any required upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\n CheckRequiredUpgrades = 0,\n\n /** Domain schemas will be validated for any required or optional upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\n CheckRecommendedUpgrades = 1,\n\n /** Domain schemas will be upgraded if necessary. However, only compatible schema upgrades will be allowed - these are typically additions of classes, properties, and changes to custom attributes */\n Upgrade = 2,\n\n /** Domain schemas will neither be validated nor be upgraded. Used only internally */\n SkipCheck = 3,\n}\n\n/** Options that control whether a profile upgrade should be performed when opening a Db\n * @beta\n */\nexport enum ProfileOptions {\n /** No profile upgrade will be performed. If a profile upgrade was required, opening the file will fail */\n None = 0,\n\n /** Profile upgrade will be performed if necessary */\n Upgrade = 1,\n}\n\n/** Arguments to validate and update the profile and domain schemas when opening a Db\n * @beta\n */\nexport interface UpgradeOptions {\n /** Option to control the validation and upgrade of domain schemas in the Db */\n readonly domain?: DomainOptions;\n\n /** Options that control whether a profile upgrade should be performed when opening a file */\n readonly profile?: ProfileOptions;\n\n /** Options that will allow data transform during Profile/Domain schema upgrade */\n readonly schemaLockHeld?: boolean;\n}\n\n/**\n * The state of the schemas in the Db compared with what the current version of the software expects\n * Note: The state may vary depending on whether the Db is to be opened ReadOnly or ReadWrite.\n * @public\n */\nexport enum SchemaState {\n /** The schemas in the Db are up-to-date, and do not need to be upgraded before opening it with the current version of the software */\n UpToDate,\n\n /** It's required that the schemas in the Db be upgraded before it can be opened with the current version of the software.\n * This may happen in read-write scenarios where the application requires a newer version of the schemas to be in place before\n * it can write data based on that new schema.\n */\n UpgradeRequired,\n\n /** It's recommended, but not necessary that the schemas in the Db be upgraded before opening it with the current version of the software */\n UpgradeRecommended,\n\n /** The schemas in the Db are too old to be opened by the current version of the software. Upgrade using the API is not possible. */\n TooOld,\n\n /** The schemas in the Db are too new to be opened by the current version of the software */\n TooNew,\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BriefcaseTypes.js","sourceRoot":"","sources":["../../src/BriefcaseTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH;;;GAGG;AACH,IAAY,gBAyBX;AAzBD,WAAY,gBAAgB;IAC1B,+CAA+C;IAC/C,sEAAoB,CAAA;IAEpB,gDAAgD;IAChD,4DAAa,CAAA;IAEb,gFAAgF;IAChF,mEAAc,CAAA;IAEd,+EAA+E;IAC/E,wEAAqC,CAAA;IAErC;;;;;;;;;;OAUG;IACH,mEAAc,CAAA;AAChB,CAAC,EAzBW,gBAAgB,gCAAhB,gBAAgB,QAyB3B;AAED;;;GAGG;AACH,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mIAAmI;IACnI,uDAAgB,CAAA;IAChB,0FAA0F;IAC1F,qDAAe,CAAA;IACf,qJAAqJ;IACrJ,+CAAY,CAAA;AACd,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB;AA2ID;;GAEG;AACH,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,qJAAqJ;IACrJ,mFAAyB,CAAA;IAEzB,iKAAiK;IACjK,yFAA4B,CAAA;IAE5B,sMAAsM;IACtM,uDAAW,CAAA;IAEX,qFAAqF;IACrF,2DAAa,CAAA;AACf,CAAC,EAZW,aAAa,6BAAb,aAAa,QAYxB;AAED;;GAEG;AACH,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,0GAA0G;IAC1G,mDAAQ,CAAA;IAER,qDAAqD;IACrD,yDAAW,CAAA;AACb,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB;AAgBD;;;;GAIG;AACH,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,sIAAsI;IACtI,qDAAQ,CAAA;IAER;;;OAGG;IACH,mEAAe,CAAA;IAEf,4IAA4I;IAC5I,yEAAkB,CAAA;IAElB,oIAAoI;IACpI,iDAAM,CAAA;IAEN,4FAA4F;IAC5F,iDAAM,CAAA;AACR,CAAC,EAlBW,WAAW,2BAAX,WAAW,QAkBtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { GuidString } from \"@itwin/core-bentley\";\r\nimport { ChangesetIdWithIndex, ChangesetIndexOrId, LocalFileName } from \"./ChangesetProps\";\r\nimport { OpenDbKey } from \"./IModel\";\r\nimport { IModelVersionProps } from \"./IModelVersion\";\r\n\r\n/** The Id assigned to a briefcase by iModelHub, or [[BriefcaseIdValue.Unassigned]] .\r\n * @public\r\n * @extensions\r\n */\r\nexport type BriefcaseId = number;\r\n\r\n/** Values of [[BriefcaseId]] that have special meaning.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BriefcaseIdValue {\r\n /** Indicates an invalid/illegal BriefcaseId */\r\n Illegal = 0xffffffff,\r\n\r\n /** BriefcaseIds must be less than this value */\r\n Max = 1 << 24,\r\n\r\n /** All valid iModelHub issued BriefcaseIds will be equal or higher than this */\r\n FirstValid = 2,\r\n\r\n /** All valid iModelHub issued BriefcaseIds will be equal or lower than this */\r\n LastValid = BriefcaseIdValue.Max - 11,\r\n\r\n /**\r\n * The briefcase has not been assigned a unique Id by iModelHub. Only briefcases that have been assigned a unique BriefcaseId may create changesets,\r\n * because BriefcaseId is used to create unique ElementIds for new elements.\r\n *\r\n * The `Unassigned` briefcaseId is used for several purposes:\r\n * - **Snapshots**. Snapshot files are immutable copies of an iModel for archival or data exchange purposes. They can neither generate nor accept new changesets.\r\n * - **Checkpoints**. Checkpoints are Snapshots that represent a specific version on an iModel's timeline.\r\n * - **PullOnly**. A local briefcase file that may be used to \"slide\" along a timeline by applying incoming changesets.\r\n * They are always opened readonly except to apply changesets.\r\n * - **Standalone**. Standalone iModels are local files that are not connected to iModelHub, and therefore cannot accept or create changesets.\r\n */\r\n Unassigned = 0,\r\n}\r\n\r\n/** Whether a briefcase is editable or may only accept incoming changesets from iModelHub\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SyncMode {\r\n /** Use a fixed version (i.e. a checkpoint). See [CheckpointManager]($backend) for preferred approach to using checkpoint files. */\r\n FixedVersion = 1,\r\n /** A briefcase that can be edited. A unique briefcaseId must be assigned by iModelHub. */\r\n PullAndPush = 2,\r\n /** use [BriefcaseIdValue.Unassigned](%backend). This makes a briefcase that can accept changesets from iModelHub but can never create changesets. */\r\n PullOnly = 3,\r\n}\r\n\r\n/**\r\n * Options to open a previously downloaded briefcase\r\n * @public\r\n */\r\nexport interface OpenBriefcaseOptions {\r\n /** open briefcase Readonly */\r\n readonly openAsReadOnly?: boolean;\r\n}\r\n\r\n/**\r\n * Properties that specify a briefcase within the local briefcase cache.\r\n * @see BriefcaseManager.getFileName\r\n * @public\r\n */\r\nexport interface BriefcaseProps {\r\n /** Id of the iModel */\r\n readonly iModelId: GuidString;\r\n\r\n /** BriefcaseId of the briefcase */\r\n readonly briefcaseId: BriefcaseId;\r\n}\r\n\r\n/** Properties for opening a local briefcase file via [BriefcaseDb.open]($backend)\r\n * @public\r\n */\r\nexport interface OpenBriefcaseProps extends OpenDbKey {\r\n /** the full path to the briefcase file */\r\n readonly fileName: LocalFileName;\r\n /**\r\n * If true, open the briefcase readonly.\r\n * @note Readonly connections always hold a read transaction against the briefcase. That can cause the WAL file size to grow\r\n * unbounded if changes happen while they're open (see [Checkpoint starvation](https://www.sqlite.org/wal.html#avoiding_excessively_large_wal_files))\r\n * It is a good idea to close the readonly connection *before* closing the writeable connection so the WAL file will be deleted.\r\n */\r\n readonly readonly?: boolean;\r\n /** If true, open the briefcase readonly and monitor it for changes originating from another connection.\r\n * When such changes are detected, the default txn will be restarted.\r\n * The restart occurs only after the next iteration of the backend event loop, and will generate events that reflect the changes from the other connection.\r\n * This can be useful in contexts where the read-only connection is displaying a view of the contents of the briefcase while another, non-interactive program\r\n * is adding txns to the briefcase. It may not be reliable if the writable connection is undoing or redoing txns.\r\n * @note This cannot be used with cloud-based briefcases.\r\n */\r\n readonly watchForChanges?: boolean;\r\n}\r\n\r\n/** Properties of a local briefcase file, returned by [BriefcaseManager.getCachedBriefcases]($backend) and [BriefcaseManager.downloadBriefcase]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LocalBriefcaseProps {\r\n /** Full path of local file. */\r\n readonly fileName: LocalFileName;\r\n\r\n /** The iTwin containing the iModel. */\r\n readonly iTwinId: GuidString;\r\n\r\n /** The iModelId. */\r\n readonly iModelId: GuidString;\r\n\r\n /** The briefcaseId. */\r\n readonly briefcaseId: BriefcaseId;\r\n\r\n /** The current changesetId.\r\n * @note ChangeSet Ids are string hash values based on the ChangeSet's content and parent.\r\n */\r\n readonly changeset: ChangesetIdWithIndex;\r\n\r\n /** Size of the briefcase file in bytes */\r\n readonly fileSize: number;\r\n}\r\n\r\n/** Properties for downloading a briefcase to a local file, from iModelHub.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RequestNewBriefcaseProps {\r\n /** iTwin that the iModel belongs to. */\r\n readonly iTwinId: GuidString;\r\n\r\n /** The iModelId for the new briefcase. */\r\n readonly iModelId: GuidString;\r\n\r\n /** Full path of local file to store the briefcase. If undefined, a file will be created in the briefcase cache, and this member will be filled with the full path to the file.\r\n * Callers can use this to open the briefcase after the download completes.\r\n * @note this member is both an input and an output.\r\n */\r\n readonly fileName?: LocalFileName;\r\n\r\n /**\r\n * The BriefcaseId for the new briefcase. If undefined, a new BriefcaseId will be acquired from iModelHub before the download, and is returned in this member.\r\n * @note To download a briefcase that can accept but not create new changesets (sometimes referred to as \"pull only\" briefcases), set this value to [[BriefcaseIdValue.Unassigned]].\r\n * After downloading, you can merely delete unassigned briefcase files when they are no longer needed. Assigned BriefcaseIds should be released (via [BriefcaseManager.releaseBriefcase]($backend) )\r\n * when you are done with them.\r\n * @note this member is both an input and an output.\r\n *\r\n */\r\n briefcaseId?: BriefcaseId;\r\n\r\n /** Id of the change set of the new briefcase. If undefined, use latest. */\r\n asOf?: IModelVersionProps;\r\n\r\n /** A string to represent the device that holds the briefcase. */\r\n deviceName?: string;\r\n}\r\n\r\n/**\r\n * Arguments to open a Checkpoint directly from its cloud container\r\n * @beta\r\n */\r\nexport interface OpenCheckpointArgs {\r\n readonly iTwinId: GuidString;\r\n\r\n /** Id of the iModel */\r\n readonly iModelId: GuidString;\r\n\r\n /** changeset for the checkpoint. If undefined, attempt to open the checkpoint for the latest changeset. */\r\n readonly changeset?: ChangesetIndexOrId;\r\n}\r\n\r\n/**\r\n * Manages the download of a briefcase\r\n * @public\r\n */\r\nexport interface BriefcaseDownloader {\r\n /** Id of the briefcase being downloaded */\r\n readonly briefcaseId: BriefcaseId;\r\n\r\n /** the name of the local file for the briefcase */\r\n readonly fileName: LocalFileName;\r\n\r\n /** Promise that resolves when the download completes. await this to complete the download */\r\n readonly downloadPromise: Promise<void>;\r\n\r\n /** Request cancellation of the download */\r\n readonly requestCancel: () => Promise<boolean>;\r\n}\r\n\r\n/** Option to control the validation and upgrade of domain schemas in the Db\r\n * @beta\r\n */\r\nexport enum DomainOptions {\r\n /** Domain schemas will be validated for any required upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\r\n CheckRequiredUpgrades = 0,\r\n\r\n /** Domain schemas will be validated for any required or optional upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\r\n CheckRecommendedUpgrades = 1,\r\n\r\n /** Domain schemas will be upgraded if necessary. However, only compatible schema upgrades will be allowed - these are typically additions of classes, properties, and changes to custom attributes */\r\n Upgrade = 2,\r\n\r\n /** Domain schemas will neither be validated nor be upgraded. Used only internally */\r\n SkipCheck = 3,\r\n}\r\n\r\n/** Options that control whether a profile upgrade should be performed when opening a Db\r\n * @beta\r\n */\r\nexport enum ProfileOptions {\r\n /** No profile upgrade will be performed. If a profile upgrade was required, opening the file will fail */\r\n None = 0,\r\n\r\n /** Profile upgrade will be performed if necessary */\r\n Upgrade = 1,\r\n}\r\n\r\n/** Arguments to validate and update the profile and domain schemas when opening a Db\r\n * @beta\r\n */\r\nexport interface UpgradeOptions {\r\n /** Option to control the validation and upgrade of domain schemas in the Db */\r\n readonly domain?: DomainOptions;\r\n\r\n /** Options that control whether a profile upgrade should be performed when opening a file */\r\n readonly profile?: ProfileOptions;\r\n\r\n /** Options that will allow data transform during Profile/Domain schema upgrade */\r\n readonly schemaLockHeld?: boolean;\r\n}\r\n\r\n/**\r\n * The state of the schemas in the Db compared with what the current version of the software expects\r\n * Note: The state may vary depending on whether the Db is to be opened ReadOnly or ReadWrite.\r\n * @public\r\n */\r\nexport enum SchemaState {\r\n /** The schemas in the Db are up-to-date, and do not need to be upgraded before opening it with the current version of the software */\r\n UpToDate,\r\n\r\n /** It's required that the schemas in the Db be upgraded before it can be opened with the current version of the software.\r\n * This may happen in read-write scenarios where the application requires a newer version of the schemas to be in place before\r\n * it can write data based on that new schema.\r\n */\r\n UpgradeRequired,\r\n\r\n /** It's recommended, but not necessary that the schemas in the Db be upgraded before opening it with the current version of the software */\r\n UpgradeRecommended,\r\n\r\n /** The schemas in the Db are too old to be opened by the current version of the software. Upgrade using the API is not possible. */\r\n TooOld,\r\n\r\n /** The schemas in the Db are too new to be opened by the current version of the software */\r\n TooNew,\r\n}\r\n"]}
|
package/lib/cjs/Camera.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../src/Camera.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,wDAAoF;AAYpF;;;GAGG;AACH,MAAa,MAAM;IACD,IAAI,CAAQ;IACrB,SAAS,CAAS;IACT,GAAG,CAAU;IAEtB,MAAM,CAAC,gBAAgB,CAAC,GAAU;QACvC,OAAO,GAAG,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;IAChE,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,GAAU;QACxC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC;YAC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;YAC/C,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACM,KAAK,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpC,OAAO,CAAC,GAAW;QACxB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QAC/B,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,YAAmB,KAAmB;QACpC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,GAAG,qBAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACvC,IAAI,CAAC,SAAS,GAAG,wBAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACrD,IAAI,CAAC,GAAG,GAAG,uBAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACvC,OAAO;QACT,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,qBAAK,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,GAAG,GAAG,IAAI,uBAAO,EAAE,CAAC;IAC3B,CAAC;CACF;AAnDD,wBAmDC","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 Views\n */\n\nimport { JsonUtils } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps, Point3d, XYAndZ, XYZProps } from \"@itwin/core-geometry\";\n\n/** JSON representation of a [[Camera]].\n * @public\n * @extensions\n */\nexport interface CameraProps {\n lens: AngleProps;\n focusDist: number; // NOTE: this is abbreviated, do not change!\n eye: XYZProps;\n}\n\n/** The current position (eyepoint), lens angle, and focus distance of a camera.\n * @see [Views]($docs/learning/frontend/Views.md)\n * @public\n */\nexport class Camera implements CameraProps {\n public readonly lens: Angle;\n public focusDist: number;\n public readonly eye: Point3d;\n\n public static isValidLensAngle(val: Angle) {\n return val.radians > (Math.PI / 8.0) && val.radians < Math.PI;\n }\n\n public static validateLensAngle(val: Angle) {\n if (!this.isValidLensAngle(val))\n val.setRadians(Math.PI / 2.0);\n }\n\n public invalidateFocus() { this.focusDist = 0.0; }\n public get isFocusValid() { return this.focusDist > 0.0 && this.focusDist < 1.0e14; }\n public getFocusDistance() { return this.focusDist; }\n public setFocusDistance(dist: number) { this.focusDist = dist; }\n public get isLensValid() { return Camera.isValidLensAngle(this.lens); }\n public validateLens() { Camera.validateLensAngle(this.lens); }\n public getLensAngle() { return this.lens; }\n public setLensAngle(angle: Angle) { this.lens.setFrom(angle); }\n public getEyePoint() { return this.eye; }\n public setEyePoint(pt: XYAndZ) { this.eye.setFrom(pt); }\n public get isValid() { return this.isLensValid && this.isFocusValid; }\n public equals(other: Camera) {\n return Math.abs(this.lens.radians - other.lens.radians) < .01 &&\n Math.abs(this.focusDist - other.focusDist) < .1 &&\n this.eye.isAlmostEqual(other.eye);\n }\n public clone() { return new Camera(this); }\n public setFrom(rhs: Camera) {\n this.lens.setFrom(rhs.lens);\n this.focusDist = rhs.focusDist;\n this.eye.setFrom(rhs.eye);\n }\n\n /** Construct a Camera\n * @param props The properties of the new camera. If undefined, create a camera with eye at {0,0,0}, 90 degree lens, 1 meter focus distance.\n */\n public constructor(props?: CameraProps) {\n if (props !== undefined) {\n this.lens = Angle.fromJSON(props.lens);\n this.focusDist = JsonUtils.asDouble(props.focusDist);\n this.eye = Point3d.fromJSON(props.eye);\n return;\n }\n this.lens = Angle.createRadians(Math.PI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AAO,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACvC,OAAO;QACT,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,qBAAK,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,GAAG,GAAG,IAAI,uBAAO,EAAE,CAAC;IAC3B,CAAC;CACF;AAnDD,wBAmDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { JsonUtils } from \"@itwin/core-bentley\";\r\nimport { Angle, AngleProps, Point3d, XYAndZ, XYZProps } from \"@itwin/core-geometry\";\r\n\r\n/** JSON representation of a [[Camera]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CameraProps {\r\n lens: AngleProps;\r\n focusDist: number; // NOTE: this is abbreviated, do not change!\r\n eye: XYZProps;\r\n}\r\n\r\n/** The current position (eyepoint), lens angle, and focus distance of a camera.\r\n * @see [Views]($docs/learning/frontend/Views.md)\r\n * @public\r\n */\r\nexport class Camera implements CameraProps {\r\n public readonly lens: Angle;\r\n public focusDist: number;\r\n public readonly eye: Point3d;\r\n\r\n public static isValidLensAngle(val: Angle) {\r\n return val.radians > (Math.PI / 8.0) && val.radians < Math.PI;\r\n }\r\n\r\n public static validateLensAngle(val: Angle) {\r\n if (!this.isValidLensAngle(val))\r\n val.setRadians(Math.PI / 2.0);\r\n }\r\n\r\n public invalidateFocus() { this.focusDist = 0.0; }\r\n public get isFocusValid() { return this.focusDist > 0.0 && this.focusDist < 1.0e14; }\r\n public getFocusDistance() { return this.focusDist; }\r\n public setFocusDistance(dist: number) { this.focusDist = dist; }\r\n public get isLensValid() { return Camera.isValidLensAngle(this.lens); }\r\n public validateLens() { Camera.validateLensAngle(this.lens); }\r\n public getLensAngle() { return this.lens; }\r\n public setLensAngle(angle: Angle) { this.lens.setFrom(angle); }\r\n public getEyePoint() { return this.eye; }\r\n public setEyePoint(pt: XYAndZ) { this.eye.setFrom(pt); }\r\n public get isValid() { return this.isLensValid && this.isFocusValid; }\r\n public equals(other: Camera) {\r\n return Math.abs(this.lens.radians - other.lens.radians) < .01 &&\r\n Math.abs(this.focusDist - other.focusDist) < .1 &&\r\n this.eye.isAlmostEqual(other.eye);\r\n }\r\n public clone() { return new Camera(this); }\r\n public setFrom(rhs: Camera) {\r\n this.lens.setFrom(rhs.lens);\r\n this.focusDist = rhs.focusDist;\r\n this.eye.setFrom(rhs.eye);\r\n }\r\n\r\n /** Construct a Camera\r\n * @param props The properties of the new camera. If undefined, create a camera with eye at {0,0,0}, 90 degree lens, 1 meter focus distance.\r\n */\r\n public constructor(props?: CameraProps) {\r\n if (props !== undefined) {\r\n this.lens = Angle.fromJSON(props.lens);\r\n this.focusDist = JsonUtils.asDouble(props.focusDist);\r\n this.eye = Point3d.fromJSON(props.eye);\r\n return;\r\n }\r\n this.lens = Angle.createRadians(Math.PI / 2.0);\r\n this.focusDist = 1;\r\n this.eye = new Point3d();\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatalogIModel.js","sourceRoot":"","sources":["../../src/CatalogIModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6D;AAI7D;;;GAGG;AACH,IAAiB,YAAY,CAgB5B;AAhBD,WAAiB,YAAY;IACd,kBAAK,GAAG,eAAe,CAAC;IAMrC,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,KAAc,EAAE,GAAS;QAC/C,OAAO,yBAAU,CAAC,OAAO,CAAa,KAAK,EAAE,aAAA,KAAK,EAAE,GAAG,CAAC,CAAC;IAC3D,CAAC;IAFe,oBAAO,UAEtB,CAAA;IAED,2CAA2C;IAC3C,SAAgB,UAAU,CAAuB,GAAQ,EAAE,CAAmC;QAC5F,yBAAU,CAAC,UAAU,CAAa,EAAE,GAAG,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAL,aAAA,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5E,CAAC;IAFe,uBAAU,aAEzB,CAAA;AACH,CAAC,EAhBgB,YAAY,4BAAZ,YAAY,QAgB5B","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 NativeApp\n */\n\nimport { Id64String, ITwinError } from \"@itwin/core-bentley\";\nimport { LocalFileName } from \"./ChangesetProps\";\nimport { IModelConnectionProps, SnapshotOpenOptions } from \"./IModel\";\n\n/**\n * Errors produced by the [[CatalogIModel]] API.\n * @beta\n */\nexport namespace CatalogError {\n export const scope = \"itwin-Catalog\";\n\n export type Key =\n \"invalid-seed-catalog\" |\n \"manifest-missing\";\n\n /** Determine whether an error object is a CatalogError */\n export function isError(error: unknown, key?: Key): error is ITwinError {\n return ITwinError.isError<ITwinError>(error, scope, key);\n }\n\n /** Instantiate and throw a CatalogError */\n export function throwError<T extends ITwinError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\n ITwinError.throwError<ITwinError>({ ...e, iTwinErrorId: { scope, key } });\n }\n}\n\n/** A \"catalog iModel\" is an [[IModel]] containing elements (e.g., component definitions) that are intended to be copied into another iModel by applications.\n * They can be stored in [BlobContainer]($backend)s managed by a \"reference data service\" that uses [semantic versioning](https://semver.org/), much like [WorkspaceDb]($backend)s.\n * @see [CatalogDb]($backend) to interact with catalog iModels on the backend\n * @see [CatalogConnection]($frontend) to interact with catalog iModels on the frontend.\n * @beta\n */\nexport namespace CatalogIModel {\n\n /** Metadata describing a catalog iModel.\n * @note Only the [[catalogName]] field is required, and users may add additional fields for their own purposes.\n * @note The manifest is stored inside of the CatalogIModel, so it is versioned along with the rest of the catalog's contents.\n * @beta\n */\n export interface Manifest {\n /** The iTwinId for the Catalog */\n readonly iTwinId?: Id64String;\n\n /**\n * The name of the Catalog to be shown in user interfaces. Organizations should attempt to make this name informative enough\n * so that uses may refer to it in conversations. It should also be unique enough that there's no confusion when it appears in\n * lists of catalogs.\n * @note it is possible and valid to change the catalogName between versions of a CatalogIModel (e.g. incorporating a date).\n */\n readonly catalogName: string;\n /** A description of the contents of this catalog to help users understand its purpose and appropriate usage. */\n readonly description?: string;\n /** The name of the person to contact with questions about this catalog */\n readonly contactName?: string;\n /** The name of the person who last modified this catalog. */\n lastEditedBy?: string;\n }\n\n /** Arguments for creating a new [BlobContainer]($backend) that holds (versions of) a CatalogIModel. */\n export interface CreateNewContainerArgs {\n /** supplies the iTwinId for the new container */\n readonly iTwinId: Id64String;\n /** metadata stored with the new container */\n readonly metadata: {\n /** a \"name\" for the Catalog container. Should be long enough to be unique, but this is not enforced. */\n label: string;\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\n description?: string;\n /** optional properties for the container */\n json?: { [key: string]: any };\n }\n\n /** The manifest to be stored in the catalog */\n readonly manifest: Manifest;\n /** The name for the CatalogIModel database within the container. May not contain a version. Default is \"catalog-db\" */\n readonly dbName?: string,\n /** version for the catalog created [[localCatalogFile]]. Defaults to \"0.0.0\" */\n readonly version?: string;\n /** A filename on the local computer of the \"seed\" CatalogIModel to be uploaded into the new container */\n readonly localCatalogFile: LocalFileName;\n }\n\n /** Properties of a newly created container created from [[CatalogIModel.CreateNewContainerArgs]]. Most importantly, this holds the ContainerId of the new container. */\n export interface NewContainerProps {\n /** The ContainerId of the new container (usually a [Guid]($bentley)). Applications should store this value to access the container via the CatalogIModel apis. */\n readonly containerId: string;\n /** the uri of the BlobContainer service where the new container resides. */\n readonly baseUri: string;\n /** name of the blob storage provider. */\n readonly provider: \"azure\" | \"google\";\n }\n\n /** Properties to identify a specific CatalogIModel within a container. */\n export interface NameAndVersion {\n /** The name of the catalog database. Defaults to \"catalog-db\" for CatalogIModels stored in cloud containers. */\n readonly dbName?: string;\n /** The range of acceptable versions of the database of the specified [[dbName]].\n * If not present, defaults to the newest available version.\n */\n readonly version?: VersionRange;\n }\n\n /** Arguments to open an existing version of a CatalogIModel. */\n export interface OpenArgs extends NameAndVersion, SnapshotOpenOptions {\n /** The ContainerId of the cloud container. If not present, dbName is the name of a file on the local computer. */\n containerId?: string;\n /** If true, attempt to synchronize the container with any changes in the cloud. Since this automatically happens the first time a\n * container is accessed within a session, this is usually not necessary except for tests.\n */\n syncWithCloud?: boolean;\n /** Start a prefetch operation on the CatalogIModel as it is opened. */\n prefetch?: boolean;\n }\n\n /** Arguments to create a new version of a CatalogIModel from (a copy of) an existing version in a cloud container. */\n export interface CreateNewVersionArgs {\n /** The id of cloud container. */\n readonly containerId: string;\n /** the source version of the CatalogIModel, from which the new version will copied. */\n readonly fromDb: NameAndVersion;\n /** The type of version increment to apply to the source version. */\n readonly versionType: \"major\" | \"minor\" | \"patch\" | \"premajor\" | \"preminor\" | \"prepatch\" | \"prerelease\";\n /** For prerelease versions, a string that becomes part of the version name. */\n readonly identifier?: string;\n }\n\n /** A [semver string](https://github.com/npm/node-semver?tab=readme-ov-file#ranges) describing a range of acceptable [[CatalogIModel]]s,\n * e.g., \">=1.2.7 <1.3.0\".\n */\n export type VersionRange = string;\n\n /** The name of the ipc channel for [[IpcMethods]]\n * @internal\n */\n export type IpcChannel = \"catalogIModel/ipc\";\n\n /** @internal */\n export interface IpcMethods {\n /** create a new container from the BlobContainerService for holding a CatalogIModel. Also uploads the seed file */\n createNewContainer(args: CreateNewContainerArgs): Promise<NewContainerProps>;\n /** Acquire the write lock for a CatalogIModel container. */\n acquireWriteLock(args: { containerId: string, username: string }): Promise<void>;\n /** Release the write lock for a CatalogIModel container. */\n releaseWriteLock(args: { containerId: string, abandon?: true }): Promise<void>;\n /** create a new version of a CatalogIModel from an existing version. */\n createNewVersion(args: CreateNewVersionArgs): Promise<{ oldDb: NameAndVersion, newDb: NameAndVersion }>;\n /** Attempt to open a CatalogIModel readonly*/\n openReadonly(args: OpenArgs): Promise<IModelConnectionProps>;\n /** Attempt to open a CatalogIModel for editing */\n openEditable(args: OpenArgs): Promise<IModelConnectionProps>;\n /** Get the manifest and version number for an open CatalogConnection. */\n getInfo(key: string): Promise<{ manifest?: CatalogIModel.Manifest, version: string }>;\n /** Update the manifest stored in an open EditableCatalog */\n updateCatalogManifest(key: string, manifest: CatalogIModel.Manifest): Promise<void>;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CatalogIModel.js","sourceRoot":"","sources":["../../src/CatalogIModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6D;AAI7D;;;GAGG;AACH,IAAiB,YAAY,CAgB5B;AAhBD,WAAiB,YAAY;IACd,kBAAK,GAAG,eAAe,CAAC;IAMrC,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,KAAc,EAAE,GAAS;QAC/C,OAAO,yBAAU,CAAC,OAAO,CAAa,KAAK,EAAE,aAAA,KAAK,EAAE,GAAG,CAAC,CAAC;IAC3D,CAAC;IAFe,oBAAO,UAEtB,CAAA;IAED,2CAA2C;IAC3C,SAAgB,UAAU,CAAuB,GAAQ,EAAE,CAAmC;QAC5F,yBAAU,CAAC,UAAU,CAAa,EAAE,GAAG,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAL,aAAA,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5E,CAAC;IAFe,uBAAU,aAEzB,CAAA;AACH,CAAC,EAhBgB,YAAY,4BAAZ,YAAY,QAgB5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NativeApp\r\n */\r\n\r\nimport { Id64String, ITwinError } from \"@itwin/core-bentley\";\r\nimport { LocalFileName } from \"./ChangesetProps\";\r\nimport { IModelConnectionProps, SnapshotOpenOptions } from \"./IModel\";\r\n\r\n/**\r\n * Errors produced by the [[CatalogIModel]] API.\r\n * @beta\r\n */\r\nexport namespace CatalogError {\r\n export const scope = \"itwin-Catalog\";\r\n\r\n export type Key =\r\n \"invalid-seed-catalog\" |\r\n \"manifest-missing\";\r\n\r\n /** Determine whether an error object is a CatalogError */\r\n export function isError(error: unknown, key?: Key): error is ITwinError {\r\n return ITwinError.isError<ITwinError>(error, scope, key);\r\n }\r\n\r\n /** Instantiate and throw a CatalogError */\r\n export function throwError<T extends ITwinError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\r\n ITwinError.throwError<ITwinError>({ ...e, iTwinErrorId: { scope, key } });\r\n }\r\n}\r\n\r\n/** A \"catalog iModel\" is an [[IModel]] containing elements (e.g., component definitions) that are intended to be copied into another iModel by applications.\r\n * They can be stored in [BlobContainer]($backend)s managed by a \"reference data service\" that uses [semantic versioning](https://semver.org/), much like [WorkspaceDb]($backend)s.\r\n * @see [CatalogDb]($backend) to interact with catalog iModels on the backend\r\n * @see [CatalogConnection]($frontend) to interact with catalog iModels on the frontend.\r\n * @beta\r\n */\r\nexport namespace CatalogIModel {\r\n\r\n /** Metadata describing a catalog iModel.\r\n * @note Only the [[catalogName]] field is required, and users may add additional fields for their own purposes.\r\n * @note The manifest is stored inside of the CatalogIModel, so it is versioned along with the rest of the catalog's contents.\r\n * @beta\r\n */\r\n export interface Manifest {\r\n /** The iTwinId for the Catalog */\r\n readonly iTwinId?: Id64String;\r\n\r\n /**\r\n * The name of the Catalog to be shown in user interfaces. Organizations should attempt to make this name informative enough\r\n * so that uses may refer to it in conversations. It should also be unique enough that there's no confusion when it appears in\r\n * lists of catalogs.\r\n * @note it is possible and valid to change the catalogName between versions of a CatalogIModel (e.g. incorporating a date).\r\n */\r\n readonly catalogName: string;\r\n /** A description of the contents of this catalog to help users understand its purpose and appropriate usage. */\r\n readonly description?: string;\r\n /** The name of the person to contact with questions about this catalog */\r\n readonly contactName?: string;\r\n /** The name of the person who last modified this catalog. */\r\n lastEditedBy?: string;\r\n }\r\n\r\n /** Arguments for creating a new [BlobContainer]($backend) that holds (versions of) a CatalogIModel. */\r\n export interface CreateNewContainerArgs {\r\n /** supplies the iTwinId for the new container */\r\n readonly iTwinId: Id64String;\r\n /** metadata stored with the new container */\r\n readonly metadata: {\r\n /** a \"name\" for the Catalog container. Should be long enough to be unique, but this is not enforced. */\r\n label: string;\r\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\r\n description?: string;\r\n /** optional properties for the container */\r\n json?: { [key: string]: any };\r\n }\r\n\r\n /** The manifest to be stored in the catalog */\r\n readonly manifest: Manifest;\r\n /** The name for the CatalogIModel database within the container. May not contain a version. Default is \"catalog-db\" */\r\n readonly dbName?: string,\r\n /** version for the catalog created [[localCatalogFile]]. Defaults to \"0.0.0\" */\r\n readonly version?: string;\r\n /** A filename on the local computer of the \"seed\" CatalogIModel to be uploaded into the new container */\r\n readonly localCatalogFile: LocalFileName;\r\n }\r\n\r\n /** Properties of a newly created container created from [[CatalogIModel.CreateNewContainerArgs]]. Most importantly, this holds the ContainerId of the new container. */\r\n export interface NewContainerProps {\r\n /** The ContainerId of the new container (usually a [Guid]($bentley)). Applications should store this value to access the container via the CatalogIModel apis. */\r\n readonly containerId: string;\r\n /** the uri of the BlobContainer service where the new container resides. */\r\n readonly baseUri: string;\r\n /** name of the blob storage provider. */\r\n readonly provider: \"azure\" | \"google\";\r\n }\r\n\r\n /** Properties to identify a specific CatalogIModel within a container. */\r\n export interface NameAndVersion {\r\n /** The name of the catalog database. Defaults to \"catalog-db\" for CatalogIModels stored in cloud containers. */\r\n readonly dbName?: string;\r\n /** The range of acceptable versions of the database of the specified [[dbName]].\r\n * If not present, defaults to the newest available version.\r\n */\r\n readonly version?: VersionRange;\r\n }\r\n\r\n /** Arguments to open an existing version of a CatalogIModel. */\r\n export interface OpenArgs extends NameAndVersion, SnapshotOpenOptions {\r\n /** The ContainerId of the cloud container. If not present, dbName is the name of a file on the local computer. */\r\n containerId?: string;\r\n /** If true, attempt to synchronize the container with any changes in the cloud. Since this automatically happens the first time a\r\n * container is accessed within a session, this is usually not necessary except for tests.\r\n */\r\n syncWithCloud?: boolean;\r\n /** Start a prefetch operation on the CatalogIModel as it is opened. */\r\n prefetch?: boolean;\r\n }\r\n\r\n /** Arguments to create a new version of a CatalogIModel from (a copy of) an existing version in a cloud container. */\r\n export interface CreateNewVersionArgs {\r\n /** The id of cloud container. */\r\n readonly containerId: string;\r\n /** the source version of the CatalogIModel, from which the new version will copied. */\r\n readonly fromDb: NameAndVersion;\r\n /** The type of version increment to apply to the source version. */\r\n readonly versionType: \"major\" | \"minor\" | \"patch\" | \"premajor\" | \"preminor\" | \"prepatch\" | \"prerelease\";\r\n /** For prerelease versions, a string that becomes part of the version name. */\r\n readonly identifier?: string;\r\n }\r\n\r\n /** A [semver string](https://github.com/npm/node-semver?tab=readme-ov-file#ranges) describing a range of acceptable [[CatalogIModel]]s,\r\n * e.g., \">=1.2.7 <1.3.0\".\r\n */\r\n export type VersionRange = string;\r\n\r\n /** The name of the ipc channel for [[IpcMethods]]\r\n * @internal\r\n */\r\n export type IpcChannel = \"catalogIModel/ipc\";\r\n\r\n /** @internal */\r\n export interface IpcMethods {\r\n /** create a new container from the BlobContainerService for holding a CatalogIModel. Also uploads the seed file */\r\n createNewContainer(args: CreateNewContainerArgs): Promise<NewContainerProps>;\r\n /** Acquire the write lock for a CatalogIModel container. */\r\n acquireWriteLock(args: { containerId: string, username: string }): Promise<void>;\r\n /** Release the write lock for a CatalogIModel container. */\r\n releaseWriteLock(args: { containerId: string, abandon?: true }): Promise<void>;\r\n /** create a new version of a CatalogIModel from an existing version. */\r\n createNewVersion(args: CreateNewVersionArgs): Promise<{ oldDb: NameAndVersion, newDb: NameAndVersion }>;\r\n /** Attempt to open a CatalogIModel readonly*/\r\n openReadonly(args: OpenArgs): Promise<IModelConnectionProps>;\r\n /** Attempt to open a CatalogIModel for editing */\r\n openEditable(args: OpenArgs): Promise<IModelConnectionProps>;\r\n /** Get the manifest and version number for an open CatalogConnection. */\r\n getInfo(key: string): Promise<{ manifest?: CatalogIModel.Manifest, version: string }>;\r\n /** Update the manifest stored in an open EditableCatalog */\r\n updateCatalogManifest(key: string, manifest: CatalogIModel.Manifest): Promise<void>;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CesiumIonAssets.js","sourceRoot":"","sources":["../../src/CesiumIonAssets.ts"],"names":[],"mappings":";AACA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,yGAAyG;IACzG,qCAAa,CAAA;IACb,gJAAgJ;IAChJ,8CAAsB,CAAA;AACxB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAED;;GAEG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,oGAAoG;IACpG,0CAAsB,CAAA;AACxB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B","sourcesContent":["\n/*---------------------------------------------------------------------------------------------\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 DisplayStyles\n */\n\n/** Ids of [Cesium ion assets](https://cesium.com/platform/cesium-ion/content/) providing global terrain data.\n * These values are appropriate to use with [[TerrainSettings.dataSource]] when [[TerrainSettings.providerName]] is set to \"CesiumWorldTerrain\".\n * You may alternatively use the Id of any ion asset to which you have access.\n * @see [[TerrainSettings.fromCesiumIonAsset]] to create TerrainSettings that obtain terrain from a specified ion asset.\n * @public\n */\nexport enum CesiumTerrainAssetId {\n /** Default [global 3d terrain](https://cesium.com/platform/cesium-ion/content/cesium-world-terrain/). */\n Default = \"1\",\n /** Global 3d terrain that includes [bathymetry](https://cesium.com/platform/cesium-ion/content/cesium-world-bathymetry/) (seafloor) terrain. */\n Bathymetry = \"2426648\",\n}\n\n/** Ids of [Cesium ion assets](https://cesium.com/platform/cesium-ion/content/) providing data not covered by [[CesiumTerrainAssetId]].\n * @beta\n */\nexport enum CesiumIonAssetId {\n /** [Cesium OSM Buildings](https://cesium.com/platform/cesium-ion/content/cesium-osm-buildings/). */\n OSMBuildings = \"96188\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CesiumIonAssets.js","sourceRoot":"","sources":["../../src/CesiumIonAssets.ts"],"names":[],"mappings":";AACA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,yGAAyG;IACzG,qCAAa,CAAA;IACb,gJAAgJ;IAChJ,8CAAsB,CAAA;AACxB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAED;;GAEG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,oGAAoG;IACpG,0CAAsB,CAAA;AACxB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B","sourcesContent":["\r\n/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\n/** Ids of [Cesium ion assets](https://cesium.com/platform/cesium-ion/content/) providing global terrain data.\r\n * These values are appropriate to use with [[TerrainSettings.dataSource]] when [[TerrainSettings.providerName]] is set to \"CesiumWorldTerrain\".\r\n * You may alternatively use the Id of any ion asset to which you have access.\r\n * @see [[TerrainSettings.fromCesiumIonAsset]] to create TerrainSettings that obtain terrain from a specified ion asset.\r\n * @public\r\n */\r\nexport enum CesiumTerrainAssetId {\r\n /** Default [global 3d terrain](https://cesium.com/platform/cesium-ion/content/cesium-world-terrain/). */\r\n Default = \"1\",\r\n /** Global 3d terrain that includes [bathymetry](https://cesium.com/platform/cesium-ion/content/cesium-world-bathymetry/) (seafloor) terrain. */\r\n Bathymetry = \"2426648\",\r\n}\r\n\r\n/** Ids of [Cesium ion assets](https://cesium.com/platform/cesium-ion/content/) providing data not covered by [[CesiumTerrainAssetId]].\r\n * @beta\r\n */\r\nexport enum CesiumIonAssetId {\r\n /** [Cesium OSM Buildings](https://cesium.com/platform/cesium-ion/content/cesium-osm-buildings/). */\r\n OSMBuildings = \"96188\",\r\n}\r\n"]}
|