@itwin/core-common 5.0.0-dev.8 → 5.0.0-dev.83
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 +50 -1
- package/lib/cjs/AmbientOcclusion.js +17 -9
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.d.ts +0 -3
- package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
- package/lib/cjs/AnalysisStyle.js +20 -4
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js +39 -21
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js +4 -0
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js +19 -0
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/BlobReader.js +8 -6
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.d.ts +2 -2
- package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js +3 -0
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/ChangesetProps.d.ts +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js +31 -5
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.d.ts +0 -5
- package/lib/cjs/Code.d.ts.map +1 -1
- package/lib/cjs/Code.js +16 -11
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorDef.js +11 -10
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts +37 -1
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.js +16 -3
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js +53 -27
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js +40 -5
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +95 -63
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlReader.d.ts +2 -0
- package/lib/cjs/ECSqlReader.d.ts.map +1 -1
- package/lib/cjs/ECSqlReader.js +56 -50
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js +7 -3
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EntityProps.js +31 -0
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/Environment.js +25 -2
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js +15 -6
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts +25 -73
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +88 -103
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.d.ts +6 -108
- package/lib/cjs/FeatureTable.d.ts.map +1 -1
- package/lib/cjs/FeatureTable.js +13 -329
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.d.ts +68 -10
- package/lib/cjs/Fonts.d.ts.map +1 -1
- package/lib/cjs/Fonts.js +19 -4
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js +2 -2
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
- package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +2 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryParams.js +58 -0
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/Gradient.d.ts +3 -4
- package/lib/cjs/Gradient.d.ts.map +1 -1
- package/lib/cjs/Gradient.js +21 -19
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js +14 -12
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js +8 -2
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js +6 -0
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js +6 -0
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.d.ts +17 -18
- package/lib/cjs/HiddenLine.d.ts.map +1 -1
- package/lib/cjs/HiddenLine.js +24 -5
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js +10 -0
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.d.ts +3 -12
- package/lib/cjs/IModel.d.ts.map +1 -1
- package/lib/cjs/IModel.js +47 -23
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.d.ts +0 -2
- package/lib/cjs/IModelError.d.ts.map +1 -1
- package/lib/cjs/IModelError.js +3 -8
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js +4 -0
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinError.d.ts +63 -27
- package/lib/cjs/ITwinError.d.ts.map +1 -1
- package/lib/cjs/ITwinError.js +93 -45
- package/lib/cjs/ITwinError.js.map +1 -1
- package/lib/cjs/Image.d.ts +22 -8
- package/lib/cjs/Image.d.ts.map +1 -1
- package/lib/cjs/Image.js +20 -4
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.d.ts +2 -0
- package/lib/cjs/IpcAppProps.d.ts.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js +39 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/Localization.d.ts +0 -10
- package/lib/cjs/Localization.d.ts.map +1 -1
- package/lib/cjs/Localization.js +0 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js +3 -2
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.d.ts +20 -0
- package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
- package/lib/cjs/MapLayerSettings.js +50 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.d.ts +2 -0
- package/lib/cjs/MassProperties.d.ts.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js +6 -0
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js +4 -0
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
- package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js +8 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.d.ts +0 -12
- package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
- package/lib/cjs/PlanarClipMask.js +24 -2
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.d.ts +5 -5
- package/lib/cjs/QPoint.d.ts.map +1 -1
- package/lib/cjs/QPoint.js +37 -29
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js +81 -4
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.d.ts +0 -43
- package/lib/cjs/RenderMaterial.d.ts.map +1 -1
- package/lib/cjs/RenderMaterial.js +6 -51
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.d.ts +36 -0
- package/lib/cjs/RenderPolyline.d.ts.map +1 -0
- package/lib/cjs/RenderPolyline.js +26 -0
- package/lib/cjs/RenderPolyline.js.map +1 -0
- package/lib/cjs/RenderSchedule.d.ts +1 -2
- package/lib/cjs/RenderSchedule.d.ts.map +1 -1
- package/lib/cjs/RenderSchedule.js +138 -11
- package/lib/cjs/RenderSchedule.js.map +1 -1
- package/lib/cjs/RenderTexture.d.ts +5 -23
- package/lib/cjs/RenderTexture.d.ts.map +1 -1
- package/lib/cjs/RenderTexture.js +13 -16
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js +3 -0
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.d.ts.map +1 -1
- package/lib/cjs/RpcInterface.js +7 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/SkyBox.js +17 -4
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarShadows.js +5 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js +19 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js +35 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js +16 -2
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.d.ts +0 -7
- package/lib/cjs/TerrainSettings.d.ts.map +1 -1
- package/lib/cjs/TerrainSettings.js +19 -0
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.d.ts +17 -14
- package/lib/cjs/TextureMapping.d.ts.map +1 -1
- package/lib/cjs/TextureMapping.js +47 -19
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js +53 -2
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.d.ts +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/Tween.js +28 -19
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/ViewDetails.js +10 -6
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.d.ts +1 -3
- package/lib/cjs/ViewFlags.d.ts.map +1 -1
- package/lib/cjs/ViewFlags.js +86 -5
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.d.ts +0 -4
- package/lib/cjs/ViewProps.d.ts.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js +10 -0
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js +27 -6
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js +65 -19
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.d.ts +1 -2
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +1 -2
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js +12 -0
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js +17 -0
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js +4 -0
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js +23 -20
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +26 -8
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js +1 -0
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js +100 -0
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js +19 -6
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js +10 -0
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js +14 -0
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js +6 -0
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js +75 -0
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js +18 -0
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
- package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
- package/lib/cjs/internal/BackendTypes.js.map +1 -0
- package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
- package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
- package/lib/cjs/internal/PackedFeatureTable.js +359 -0
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
- package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
- package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
- package/lib/cjs/internal/RenderMaterialParams.js +68 -0
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
- package/lib/cjs/internal/RenderMesh.d.ts +52 -0
- package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
- package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
- package/lib/cjs/internal/RenderMesh.js.map +1 -0
- package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
- package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
- package/lib/cjs/internal/RenderTextureParams.js +37 -0
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +5 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +16 -0
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js +1 -0
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.d.ts +3 -0
- package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js +7 -6
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js +1 -4
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js +29 -38
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
- package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js +29 -31
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js +15 -8
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
- package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js +51 -29
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js +2 -0
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
- package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js +7 -0
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js +3 -0
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js +4 -3
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js +8 -0
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
- package/lib/cjs/tile/IModelTileIO.js +26 -3
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js +5 -0
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js +2 -0
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +9 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js +17 -9
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.d.ts +0 -3
- package/lib/esm/AnalysisStyle.d.ts.map +1 -1
- package/lib/esm/AnalysisStyle.js +20 -4
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js +39 -21
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js +4 -0
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js +19 -0
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/BlobReader.js +8 -6
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.d.ts +2 -2
- package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js +3 -0
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/ChangesetProps.d.ts +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js +31 -5
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.d.ts +0 -5
- package/lib/esm/Code.d.ts.map +1 -1
- package/lib/esm/Code.js +16 -11
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorDef.js +11 -10
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +37 -1
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.js +16 -3
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js +53 -27
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js +40 -5
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +95 -63
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlReader.d.ts +2 -0
- package/lib/esm/ECSqlReader.d.ts.map +1 -1
- package/lib/esm/ECSqlReader.js +56 -50
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js +8 -4
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EntityProps.js +31 -0
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/Environment.js +25 -2
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js +15 -6
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts +25 -73
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +88 -103
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.d.ts +6 -108
- package/lib/esm/FeatureTable.d.ts.map +1 -1
- package/lib/esm/FeatureTable.js +11 -324
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.d.ts +68 -10
- package/lib/esm/Fonts.d.ts.map +1 -1
- package/lib/esm/Fonts.js +19 -4
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js +2 -2
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.d.ts +1 -0
- package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/esm/GeoCoordinateServices.js +2 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryParams.js +58 -0
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/Gradient.d.ts +3 -4
- package/lib/esm/Gradient.d.ts.map +1 -1
- package/lib/esm/Gradient.js +21 -19
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js +14 -12
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js +8 -2
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js +6 -0
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js +6 -0
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.d.ts +17 -18
- package/lib/esm/HiddenLine.d.ts.map +1 -1
- package/lib/esm/HiddenLine.js +24 -5
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js +10 -0
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.d.ts +3 -12
- package/lib/esm/IModel.d.ts.map +1 -1
- package/lib/esm/IModel.js +47 -23
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.d.ts +0 -2
- package/lib/esm/IModelError.d.ts.map +1 -1
- package/lib/esm/IModelError.js +2 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js +4 -0
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinError.d.ts +63 -27
- package/lib/esm/ITwinError.d.ts.map +1 -1
- package/lib/esm/ITwinError.js +87 -44
- package/lib/esm/ITwinError.js.map +1 -1
- package/lib/esm/Image.d.ts +22 -8
- package/lib/esm/Image.d.ts.map +1 -1
- package/lib/esm/Image.js +19 -4
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.d.ts +2 -0
- package/lib/esm/IpcAppProps.d.ts.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js +39 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/Localization.d.ts +0 -10
- package/lib/esm/Localization.d.ts.map +1 -1
- package/lib/esm/Localization.js +0 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js +3 -2
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.d.ts +20 -0
- package/lib/esm/MapLayerSettings.d.ts.map +1 -1
- package/lib/esm/MapLayerSettings.js +50 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.d.ts +2 -0
- package/lib/esm/MassProperties.d.ts.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/ModelClipGroup.js +6 -0
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js +4 -0
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.d.ts +1 -2
- package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
- package/lib/esm/PlanProjectionSettings.js +8 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.d.ts +0 -12
- package/lib/esm/PlanarClipMask.d.ts.map +1 -1
- package/lib/esm/PlanarClipMask.js +24 -2
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.d.ts +5 -5
- package/lib/esm/QPoint.d.ts.map +1 -1
- package/lib/esm/QPoint.js +37 -29
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js +81 -4
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.d.ts +0 -43
- package/lib/esm/RenderMaterial.d.ts.map +1 -1
- package/lib/esm/RenderMaterial.js +6 -51
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.d.ts +36 -0
- package/lib/esm/RenderPolyline.d.ts.map +1 -0
- package/lib/esm/RenderPolyline.js +23 -0
- package/lib/esm/RenderPolyline.js.map +1 -0
- package/lib/esm/RenderSchedule.d.ts +1 -2
- package/lib/esm/RenderSchedule.d.ts.map +1 -1
- package/lib/esm/RenderSchedule.js +138 -11
- package/lib/esm/RenderSchedule.js.map +1 -1
- package/lib/esm/RenderTexture.d.ts +5 -23
- package/lib/esm/RenderTexture.d.ts.map +1 -1
- package/lib/esm/RenderTexture.js +13 -16
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js +3 -0
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.d.ts.map +1 -1
- package/lib/esm/RpcInterface.js +8 -2
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/SkyBox.js +17 -4
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarShadows.js +5 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js +19 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js +35 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js +16 -2
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.d.ts +0 -7
- package/lib/esm/TerrainSettings.d.ts.map +1 -1
- package/lib/esm/TerrainSettings.js +19 -0
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.d.ts +17 -14
- package/lib/esm/TextureMapping.d.ts.map +1 -1
- package/lib/esm/TextureMapping.js +47 -19
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/ThematicDisplay.js +53 -2
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.d.ts +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/Tween.js +28 -19
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/ViewDetails.js +10 -6
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.d.ts +1 -3
- package/lib/esm/ViewFlags.d.ts.map +1 -1
- package/lib/esm/ViewFlags.js +86 -5
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.d.ts +0 -4
- package/lib/esm/ViewProps.d.ts.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js +10 -0
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js +27 -6
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js +65 -19
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.d.ts +1 -2
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +1 -2
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js +12 -0
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js +17 -0
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js +4 -0
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js +23 -20
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +26 -8
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js +54 -108
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js +1 -0
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js +100 -0
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js +19 -6
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js +10 -0
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js +14 -0
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js +6 -0
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js +75 -0
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js +18 -0
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
- package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
- package/lib/esm/internal/BackendTypes.js.map +1 -0
- package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
- package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
- package/lib/esm/internal/PackedFeatureTable.js +352 -0
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
- package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
- package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
- package/lib/esm/internal/RenderMaterialParams.js +64 -0
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
- package/lib/esm/internal/RenderMesh.d.ts +52 -0
- package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
- package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
- package/lib/esm/internal/RenderMesh.js.map +1 -0
- package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
- package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
- package/lib/esm/internal/RenderTextureParams.js +33 -0
- package/lib/esm/internal/RenderTextureParams.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +5 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +4 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js +1 -0
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.d.ts +3 -0
- package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js +7 -6
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js +1 -4
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js +29 -38
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +19 -13
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
- package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js +29 -31
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js +32 -30
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js +15 -8
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js +10 -9
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
- package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js +51 -29
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js +2 -0
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js +14 -13
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
- package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js +7 -0
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js +3 -0
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js +4 -3
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js +8 -0
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.d.ts +2 -2
- package/lib/esm/tile/IModelTileIO.js +26 -3
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js +5 -0
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js +2 -0
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js +9 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package.json +14 -14
- package/lib/cjs/BackendTypes.d.ts.map +0 -1
- package/lib/cjs/BackendTypes.js.map +0 -1
- package/lib/cjs/Render.d.ts +0 -85
- package/lib/cjs/Render.d.ts.map +0 -1
- package/lib/cjs/Render.js.map +0 -1
- package/lib/esm/BackendTypes.d.ts.map +0 -1
- package/lib/esm/BackendTypes.js.map +0 -1
- package/lib/esm/Render.d.ts +0 -85
- package/lib/esm/Render.d.ts.map +0 -1
- package/lib/esm/Render.js.map +0 -1
- /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
- /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
# Change Log - @itwin/core-common
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 11 Mar 2025 15:27:53 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.10.10
|
|
6
|
+
Tue, 11 Mar 2025 15:25:11 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Resolves CVE-2025-27152
|
|
11
|
+
|
|
12
|
+
## 4.10.9
|
|
13
|
+
Tue, 11 Mar 2025 05:17:33 GMT
|
|
14
|
+
|
|
15
|
+
_Version update only_
|
|
16
|
+
|
|
17
|
+
## 4.10.8
|
|
18
|
+
Thu, 06 Mar 2025 14:13:37 GMT
|
|
19
|
+
|
|
20
|
+
_Version update only_
|
|
21
|
+
|
|
22
|
+
## 4.10.7
|
|
23
|
+
Tue, 18 Feb 2025 17:27:03 GMT
|
|
24
|
+
|
|
25
|
+
### Updates
|
|
26
|
+
|
|
27
|
+
- Update ECSql reader api to support no stat and error code.
|
|
28
|
+
|
|
29
|
+
## 4.10.6
|
|
30
|
+
Fri, 24 Jan 2025 08:02:40 GMT
|
|
31
|
+
|
|
32
|
+
_Version update only_
|
|
33
|
+
|
|
34
|
+
## 4.10.5
|
|
35
|
+
Tue, 21 Jan 2025 21:56:45 GMT
|
|
36
|
+
|
|
37
|
+
_Version update only_
|
|
38
|
+
|
|
39
|
+
## 4.10.4
|
|
40
|
+
Mon, 13 Jan 2025 14:06:43 GMT
|
|
41
|
+
|
|
42
|
+
_Version update only_
|
|
43
|
+
|
|
44
|
+
## 4.10.3
|
|
45
|
+
Mon, 06 Jan 2025 14:00:13 GMT
|
|
46
|
+
|
|
47
|
+
_Version update only_
|
|
48
|
+
|
|
49
|
+
## 4.10.2
|
|
50
|
+
Thu, 21 Nov 2024 15:22:20 GMT
|
|
51
|
+
|
|
52
|
+
_Version update only_
|
|
4
53
|
|
|
5
54
|
## 4.10.1
|
|
6
55
|
Thu, 14 Nov 2024 18:11:00 GMT
|
|
@@ -16,6 +16,22 @@ var AmbientOcclusion;
|
|
|
16
16
|
(function (AmbientOcclusion) {
|
|
17
17
|
/** Describes the properties with which ambient occlusion should be drawn. These properties correspond to a horizon-based ambient occlusion approach. */
|
|
18
18
|
class Settings {
|
|
19
|
+
static _defaultBias = 0.25;
|
|
20
|
+
static _defaultZLengthCap = 0.0025;
|
|
21
|
+
static _defaultMaxDistance = 10000.0;
|
|
22
|
+
static _defaultIntensity = 1.0;
|
|
23
|
+
static _defaultTexelStepSize = 1;
|
|
24
|
+
static _defaultBlurDelta = 1.0;
|
|
25
|
+
static _defaultBlurSigma = 2.0;
|
|
26
|
+
static _defaultBlurTexelStepSize = 1.0;
|
|
27
|
+
bias;
|
|
28
|
+
zLengthCap;
|
|
29
|
+
maxDistance;
|
|
30
|
+
intensity;
|
|
31
|
+
texelStepSize;
|
|
32
|
+
blurDelta;
|
|
33
|
+
blurSigma;
|
|
34
|
+
blurTexelStepSize;
|
|
19
35
|
constructor(json) {
|
|
20
36
|
if (undefined === json)
|
|
21
37
|
json = {};
|
|
@@ -28,6 +44,7 @@ var AmbientOcclusion;
|
|
|
28
44
|
this.blurSigma = core_bentley_1.JsonUtils.asDouble(json.blurSigma, Settings._defaultBlurSigma);
|
|
29
45
|
this.blurTexelStepSize = core_bentley_1.JsonUtils.asDouble(json.blurTexelStepSize, Settings._defaultBlurTexelStepSize);
|
|
30
46
|
}
|
|
47
|
+
static defaults = new Settings({});
|
|
31
48
|
static fromJSON(json) { return undefined !== json ? new Settings(json) : this.defaults; }
|
|
32
49
|
toJSON() {
|
|
33
50
|
return {
|
|
@@ -42,15 +59,6 @@ var AmbientOcclusion;
|
|
|
42
59
|
};
|
|
43
60
|
}
|
|
44
61
|
}
|
|
45
|
-
Settings._defaultBias = 0.25;
|
|
46
|
-
Settings._defaultZLengthCap = 0.0025;
|
|
47
|
-
Settings._defaultMaxDistance = 10000.0;
|
|
48
|
-
Settings._defaultIntensity = 1.0;
|
|
49
|
-
Settings._defaultTexelStepSize = 1;
|
|
50
|
-
Settings._defaultBlurDelta = 1.0;
|
|
51
|
-
Settings._defaultBlurSigma = 2.0;
|
|
52
|
-
Settings._defaultBlurTexelStepSize = 1.0;
|
|
53
|
-
Settings.defaults = new Settings({});
|
|
54
62
|
AmbientOcclusion.Settings = Settings;
|
|
55
63
|
})(AmbientOcclusion || (exports.AmbientOcclusion = AmbientOcclusion = {}));
|
|
56
64
|
//# sourceMappingURL=AmbientOcclusion.js.map
|
|
@@ -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;
|
|
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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,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"]}
|
|
@@ -28,7 +28,6 @@ export declare class AnalysisStyleDisplacement {
|
|
|
28
28
|
* Default value: 1.
|
|
29
29
|
*/
|
|
30
30
|
readonly scale: number;
|
|
31
|
-
/** @internal */
|
|
32
31
|
private constructor();
|
|
33
32
|
/** Create from JSON representation. */
|
|
34
33
|
static fromJSON(props: AnalysisStyleDisplacementProps): AnalysisStyleDisplacement;
|
|
@@ -68,7 +67,6 @@ export declare class AnalysisStyleThematic {
|
|
|
68
67
|
/** Settings used to produce the [[Gradient]] image. */
|
|
69
68
|
readonly thematicSettings: ThematicGradientSettings;
|
|
70
69
|
private _gradient?;
|
|
71
|
-
/** @internal */
|
|
72
70
|
private constructor();
|
|
73
71
|
/** Create from JSON representation. */
|
|
74
72
|
static fromJSON(props: AnalysisStyleThematicProps): AnalysisStyleThematic;
|
|
@@ -122,7 +120,6 @@ export declare class AnalysisStyle {
|
|
|
122
120
|
* @note AnalysisStyle is an immutable type - use [[clone]] to produce a modified copy.
|
|
123
121
|
*/
|
|
124
122
|
static fromJSON(props?: AnalysisStyleProps): AnalysisStyle;
|
|
125
|
-
/** @internal */
|
|
126
123
|
private constructor();
|
|
127
124
|
/** Convert this style to its JSON representation. */
|
|
128
125
|
toJSON(): AnalysisStyleProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalysisStyle.d.ts","sourceRoot":"","sources":["../../src/AnalysisStyle.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,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AAQ,CAAC,EAAE,qBAAqB,CAAC;IACjD,qHAAqH;IACrH,SAAgB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3C;;OAEG;WACW,QAAQ,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,aAAa;IAWjE,OAAO;IASP,qDAAqD;IAC9C,MAAM,IAAI,kBAAkB;IAiBnC,2GAA2G;IACpG,KAAK,CAAC,YAAY,EAAE,kBAAkB,GAAG,aAAa;IAO7D,0DAA0D;IACnD,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAe5C,gBAAuB,QAAQ,gBAAyB;CACzD"}
|
package/lib/cjs/AnalysisStyle.js
CHANGED
|
@@ -16,7 +16,12 @@ const Gradient_1 = require("./Gradient");
|
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
18
|
class AnalysisStyleDisplacement {
|
|
19
|
-
/**
|
|
19
|
+
/** The name of the [AuxChannel]($core-geometry) supplying the displacements to be applied to the vertices. */
|
|
20
|
+
channelName;
|
|
21
|
+
/** A scale applied to the displacements to adjust the magnitude of the effect.
|
|
22
|
+
* Default value: 1.
|
|
23
|
+
*/
|
|
24
|
+
scale;
|
|
20
25
|
constructor(channelName, scale = 1) {
|
|
21
26
|
this.channelName = channelName;
|
|
22
27
|
this.scale = scale;
|
|
@@ -45,7 +50,15 @@ exports.AnalysisStyleDisplacement = AnalysisStyleDisplacement;
|
|
|
45
50
|
* @public
|
|
46
51
|
*/
|
|
47
52
|
class AnalysisStyleThematic {
|
|
48
|
-
/**
|
|
53
|
+
/** The name of the [AuxChannel]($core-geometry) supplying the values from which the vertex colors are computed. */
|
|
54
|
+
channelName;
|
|
55
|
+
/** The minimum and maximum values that map to colors in the [[Gradient]] image. Vertices with values outside of
|
|
56
|
+
* this range are displayed with the gradient's margin color.
|
|
57
|
+
*/
|
|
58
|
+
range;
|
|
59
|
+
/** Settings used to produce the [[Gradient]] image. */
|
|
60
|
+
thematicSettings;
|
|
61
|
+
_gradient;
|
|
49
62
|
constructor(props) {
|
|
50
63
|
this.channelName = props.channelName;
|
|
51
64
|
this.range = core_geometry_1.Range1d.fromJSON(props.range);
|
|
@@ -109,6 +122,10 @@ function tryConvertLegacyProps(input) {
|
|
|
109
122
|
* @public
|
|
110
123
|
*/
|
|
111
124
|
class AnalysisStyle {
|
|
125
|
+
displacement;
|
|
126
|
+
thematic;
|
|
127
|
+
/** If defined, the name of the [AuxChannel]($core-geometry) from which to obtain normal vectors for the vertices. */
|
|
128
|
+
normalChannelName;
|
|
112
129
|
/** Create an analysis style from its JSON representation.
|
|
113
130
|
* @note AnalysisStyle is an immutable type - use [[clone]] to produce a modified copy.
|
|
114
131
|
*/
|
|
@@ -120,7 +137,6 @@ class AnalysisStyle {
|
|
|
120
137
|
return this.defaults;
|
|
121
138
|
return new AnalysisStyle(props);
|
|
122
139
|
}
|
|
123
|
-
/** @internal */
|
|
124
140
|
constructor(props) {
|
|
125
141
|
this.normalChannelName = props.normalChannelName;
|
|
126
142
|
if (props.displacement)
|
|
@@ -160,7 +176,7 @@ class AnalysisStyle {
|
|
|
160
176
|
return false;
|
|
161
177
|
return undefined === this.thematic || this.thematic.equals(other.thematic);
|
|
162
178
|
}
|
|
179
|
+
static defaults = new AnalysisStyle({});
|
|
163
180
|
}
|
|
164
181
|
exports.AnalysisStyle = AnalysisStyle;
|
|
165
|
-
AnalysisStyle.defaults = new AnalysisStyle({});
|
|
166
182
|
//# sourceMappingURL=AnalysisStyle.js.map
|
|
@@ -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;IAQpC,gBAAgB;IAChB,YAAoB,WAAmB,EAAE,KAAK,GAAG,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,WAAW,CA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QAElD,IAAI,IAAI,CAAC,QAAQ;YACf,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAExC,IAAI,SAAS,KAAK,IAAI,CAAC,iBAAiB;YACtC,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAEnD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,2GAA2G;IACpG,KAAK,CAAC,YAAgC;QAC3C,OAAO,aAAa,CAAC,QAAQ,CAAC;YAC5B,GAAG,IAAI,CAAC,MAAM,EAAE;YAChB,GAAG,YAAY;SAChB,CAAC,CAAC;IACL,CAAC;IAED,0DAA0D;IACnD,MAAM,CAAC,KAAoB;QAChC,IAAI,IAAI,CAAC,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;aACV,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,OAAO,SAAS,KAAK,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAS,CAAC,CAAC;IAC9E,CAAC;;AAtEH,sCAyEC;AADwB,sBAAQ,GAAG,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @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 /** @internal */\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 /** @internal */\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 /** @internal */\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 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 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"],"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AC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,QAAQ,CAAC;YAClE,OAAO,KAAK,CAAC;QAEf,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;;AAvE1D,sCAwEC","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 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 return undefined === this.thematic || this.thematic.equals(other.thematic!);\n }\n\n public static readonly defaults = new AnalysisStyle({});\n}\n"]}
|
package/lib/cjs/Atmosphere.js
CHANGED
|
@@ -31,9 +31,11 @@ const core_bentley_1 = require("@itwin/core-bentley");
|
|
|
31
31
|
*/
|
|
32
32
|
var Atmosphere;
|
|
33
33
|
(function (Atmosphere) {
|
|
34
|
-
var _a;
|
|
35
34
|
/** @internal An immutable container of wavelength values for the red, green and blue pixel components. Values are in nanometers. */
|
|
36
35
|
class Wavelengths {
|
|
36
|
+
r;
|
|
37
|
+
g;
|
|
38
|
+
b;
|
|
37
39
|
/** Constructs from red, green, and blue wavelength values.
|
|
38
40
|
* @param r Wavelength value for red
|
|
39
41
|
* @param g Wavelength value for green
|
|
@@ -68,6 +70,33 @@ var Atmosphere;
|
|
|
68
70
|
Atmosphere.Wavelengths = Wavelengths;
|
|
69
71
|
/** Describes the properties with which the atmospheric scattering effect should be drawn. Theses properties correspond to a physics-based approximation of atmospheric scattering phenomenons. */
|
|
70
72
|
class Settings {
|
|
73
|
+
static _defaultAtmosphereHeightAboveEarth = 100000.0;
|
|
74
|
+
static _defaultExposure = 2.0;
|
|
75
|
+
static _defaultDensityFalloff = 10.0;
|
|
76
|
+
static _defaultMinDensityHeightBelowEarth;
|
|
77
|
+
static _defaultScatteringStrength = 100;
|
|
78
|
+
static _defaultWavelengths = new Wavelengths({ r: 700.0, g: 530.0, b: 440.0 });
|
|
79
|
+
static _defaultNumViewRaySamples = 10;
|
|
80
|
+
static _highQualityNumViewRaySamples = 20;
|
|
81
|
+
static _defaultNumSunRaySamples = 5;
|
|
82
|
+
static defaults = new Settings({});
|
|
83
|
+
static highQuality = new Settings({ numViewRaySamples: this._highQualityNumViewRaySamples });
|
|
84
|
+
/** @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. */
|
|
85
|
+
atmosphereHeightAboveEarth;
|
|
86
|
+
/** 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 */
|
|
87
|
+
exposure;
|
|
88
|
+
/** @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. */
|
|
89
|
+
densityFalloff;
|
|
90
|
+
/** @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. */
|
|
91
|
+
depthBelowEarthForMaxDensity;
|
|
92
|
+
/** 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. */
|
|
93
|
+
numViewRaySamples;
|
|
94
|
+
/** 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. */
|
|
95
|
+
numSunRaySamples;
|
|
96
|
+
/** @internal If defined, controls how strongly the atmosphere's air diverts light. Higher values increase scattering intensity. Defaults to 100.0. */
|
|
97
|
+
scatteringStrength;
|
|
98
|
+
/** @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}. */
|
|
99
|
+
wavelengths;
|
|
71
100
|
equals(other) {
|
|
72
101
|
if (this.atmosphereHeightAboveEarth !== other.atmosphereHeightAboveEarth)
|
|
73
102
|
return false;
|
|
@@ -88,19 +117,19 @@ var Atmosphere;
|
|
|
88
117
|
return true;
|
|
89
118
|
}
|
|
90
119
|
constructor(json) {
|
|
91
|
-
this.atmosphereHeightAboveEarth = core_bentley_1.JsonUtils.asDouble(json.atmosphereHeightAboveEarth,
|
|
92
|
-
this.exposure = core_bentley_1.JsonUtils.asDouble(json.exposure,
|
|
93
|
-
this.densityFalloff = core_bentley_1.JsonUtils.asDouble(json.densityFalloff,
|
|
94
|
-
this.depthBelowEarthForMaxDensity = core_bentley_1.JsonUtils.asDouble(json.depthBelowEarthForMaxDensity,
|
|
95
|
-
this.numViewRaySamples = core_bentley_1.JsonUtils.asDouble(json.numViewRaySamples,
|
|
96
|
-
this.numSunRaySamples = core_bentley_1.JsonUtils.asDouble(json.numSunRaySamples,
|
|
97
|
-
this.scatteringStrength = core_bentley_1.JsonUtils.asDouble(json.scatteringStrength,
|
|
98
|
-
this.wavelengths = Wavelengths.fromJSON(core_bentley_1.JsonUtils.asObject(json.wavelengths) ??
|
|
120
|
+
this.atmosphereHeightAboveEarth = core_bentley_1.JsonUtils.asDouble(json.atmosphereHeightAboveEarth, Settings._defaultAtmosphereHeightAboveEarth);
|
|
121
|
+
this.exposure = core_bentley_1.JsonUtils.asDouble(json.exposure, Settings._defaultExposure);
|
|
122
|
+
this.densityFalloff = core_bentley_1.JsonUtils.asDouble(json.densityFalloff, Settings._defaultDensityFalloff);
|
|
123
|
+
this.depthBelowEarthForMaxDensity = core_bentley_1.JsonUtils.asDouble(json.depthBelowEarthForMaxDensity, Settings._defaultMinDensityHeightBelowEarth);
|
|
124
|
+
this.numViewRaySamples = core_bentley_1.JsonUtils.asDouble(json.numViewRaySamples, Settings._defaultNumViewRaySamples);
|
|
125
|
+
this.numSunRaySamples = core_bentley_1.JsonUtils.asDouble(json.numSunRaySamples, Settings._defaultNumSunRaySamples);
|
|
126
|
+
this.scatteringStrength = core_bentley_1.JsonUtils.asDouble(json.scatteringStrength, Settings._defaultScatteringStrength);
|
|
127
|
+
this.wavelengths = Wavelengths.fromJSON(core_bentley_1.JsonUtils.asObject(json.wavelengths) ?? Settings._defaultWavelengths);
|
|
99
128
|
}
|
|
100
129
|
static fromJSON(json) {
|
|
101
130
|
if (undefined === json)
|
|
102
131
|
return this.defaults;
|
|
103
|
-
return new
|
|
132
|
+
return new Settings(json);
|
|
104
133
|
}
|
|
105
134
|
toJSON(display) {
|
|
106
135
|
const json = {
|
|
@@ -118,17 +147,6 @@ var Atmosphere;
|
|
|
118
147
|
return json;
|
|
119
148
|
}
|
|
120
149
|
}
|
|
121
|
-
_a = Settings;
|
|
122
|
-
Settings._defaultAtmosphereHeightAboveEarth = 100000.0;
|
|
123
|
-
Settings._defaultExposure = 2.0;
|
|
124
|
-
Settings._defaultDensityFalloff = 10.0;
|
|
125
|
-
Settings._defaultScatteringStrength = 100;
|
|
126
|
-
Settings._defaultWavelengths = new Wavelengths({ r: 700.0, g: 530.0, b: 440.0 });
|
|
127
|
-
Settings._defaultNumViewRaySamples = 10;
|
|
128
|
-
Settings._highQualityNumViewRaySamples = 20;
|
|
129
|
-
Settings._defaultNumSunRaySamples = 5;
|
|
130
|
-
Settings.defaults = new _a({});
|
|
131
|
-
Settings.highQuality = new _a({ numViewRaySamples: _a._highQualityNumViewRaySamples });
|
|
132
150
|
Atmosphere.Settings = Settings;
|
|
133
151
|
})(Atmosphere || (exports.Atmosphere = Atmosphere = {}));
|
|
134
152
|
//# sourceMappingURL=Atmosphere.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Atmosphere.js","sourceRoot":"","sources":["../../src/Atmosphere.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAgD;AAEhD;;;;;;;;;;;;;;;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,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;;;IApFc,2CAAkC,GAAW,QAAQ,AAAnB,CAAoB;IACtD,yBAAgB,GAAW,GAAG,AAAd,CAAe;IAC/B,+BAAsB,GAAW,IAAI,AAAf,CAAgB;IAEtC,mCAA0B,GAAW,GAAG,AAAd,CAAe;IACzC,4BAAmB,GAAgB,IAAI,WAAW,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,AAAjE,CAAkE;IAErF,kCAAyB,GAAW,EAAE,AAAb,CAAc;IACvC,sCAA6B,GAAW,EAAE,AAAb,CAAc;IAC3C,iCAAwB,GAAW,CAAC,AAAZ,CAAa;IAE7B,iBAAQ,GAAG,IAAI,EAAQ,CAAC,EAAE,CAAC,AAAnB,CAAoB;IAC5B,oBAAW,GAAG,IAAI,EAAQ,CAAC,EAAE,iBAAiB,EAAE,EAAI,CAAC,6BAA6B,EAAE,CAAC,AAA1E,CAA2E;IAblG,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,C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wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,wBAAwB,CAAC,CAAC;YACrG,IAAI,CAAC,kBAAkB,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,0BAA0B,CAAC,CAAC;YAC3G,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC,QAAQ,CAAC,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAChH,CAAC;QAEM,MAAM,CAAC,QAAQ,CAAC,IAAY;YACjC,IAAI,SAAS,KAAK,IAAI;gBACpB,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":["/*---------------------------------------------------------------------------------------------\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 +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;
|
|
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"]}
|
|
@@ -38,6 +38,25 @@ function normalizeTransparency(trans) {
|
|
|
38
38
|
* @public
|
|
39
39
|
*/
|
|
40
40
|
class BackgroundMapSettings {
|
|
41
|
+
/** Retained strictly for persistence. */
|
|
42
|
+
_provider;
|
|
43
|
+
/** Elevation in meters, relative to WGS84 Ellipsoid.. */
|
|
44
|
+
groundBias;
|
|
45
|
+
/** 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. */
|
|
46
|
+
transparency;
|
|
47
|
+
/** 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. */
|
|
48
|
+
useDepthBuffer;
|
|
49
|
+
/** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */
|
|
50
|
+
applyTerrain;
|
|
51
|
+
/** Settings associated with terrain display. */
|
|
52
|
+
terrainSettings;
|
|
53
|
+
/** Globe display mode. */
|
|
54
|
+
globeMode;
|
|
55
|
+
/** Planar Mask - used to mask the background map to avoid overlapping with other geometry
|
|
56
|
+
* @beta
|
|
57
|
+
*/
|
|
58
|
+
planarClipMask;
|
|
59
|
+
_locatable;
|
|
41
60
|
/** 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
|
|
42
61
|
* allows the user to select elements that are behind the map.
|
|
43
62
|
*/
|