@itwin/core-common 5.2.0-dev.8 → 5.2.0
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 +52 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.d.ts +2 -0
- package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +32 -6
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +0 -2
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.d.ts +111 -126
- package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
- package/lib/cjs/annotation/TextBlock.js +234 -142
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.d.ts +3 -5
- package/lib/cjs/annotation/TextBlockLayoutResult.d.ts.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.d.ts +86 -0
- package/lib/cjs/annotation/TextField.d.ts.map +1 -0
- package/lib/cjs/annotation/TextField.js +10 -0
- package/lib/cjs/annotation/TextField.js.map +1 -0
- package/lib/cjs/annotation/TextStyle.d.ts +125 -35
- package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
- package/lib/cjs/annotation/TextStyle.js +105 -46
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.d.ts +1 -0
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +1 -0
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.d.ts +18 -0
- package/lib/cjs/internal/annotations/FieldFormatter.d.ts.map +1 -0
- package/lib/cjs/internal/annotations/FieldFormatter.js +66 -0
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +1 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +4 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.d.ts +2 -0
- package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +32 -6
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +0 -2
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.d.ts +111 -126
- package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
- package/lib/esm/annotation/TextBlock.js +230 -141
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.d.ts +3 -5
- package/lib/esm/annotation/TextBlockLayoutResult.d.ts.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.d.ts +86 -0
- package/lib/esm/annotation/TextField.d.ts.map +1 -0
- package/lib/esm/annotation/TextField.js +9 -0
- package/lib/esm/annotation/TextField.js.map +1 -0
- package/lib/esm/annotation/TextStyle.d.ts +125 -35
- package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
- package/lib/esm/annotation/TextStyle.js +104 -45
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.d.ts +1 -0
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +1 -0
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.d.ts +18 -0
- package/lib/esm/internal/annotations/FieldFormatter.d.ts.map +1 -0
- package/lib/esm/internal/annotations/FieldFormatter.js +62 -0
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +1 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +1 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityReference.js","sourceRoot":"","sources":["../../src/EntityReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,yCAAkB,CAAA;AACpB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED;;;GAGG;AACH,WAAiB,mBAAmB;IAClC,MAAM,6BAA6B,GAAG;QACpC,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,eAAe;QAC5C,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,iBAAiB;QAChD,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,uBAAuB;QAC5D,CAAC,mBAAmB,CAAC,YAAY,CAAC,EAAE,sBAAsB;KAClD,CAAC;IAEX;;OAEG;IACH,SAAgB,0BAA0B,CAAC,IAAyB;QAClE,OAAO,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAFe,8CAA0B,6BAEzC,CAAA;AACH,CAAC,EAdgB,mBAAmB,KAAnB,mBAAmB,QAcnC;AAUD;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,GAAoB;IACnD,UAAU,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAChD,SAAS,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACjD,eAAe,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;CAC/D","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 Schema\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\n\n/**\n * Types of concrete entities. Used for storing strings in JavaScript reference-equality containers which encode\n * low-level entity information.\n * @note the values of this enum are unstable, do not depend upon their values between versions of iTwin.js\n * (e.g. do not serialize them and load them in another version of iTwin.js and expect them to work)\n * CodeSpecs are excepted since their JavaScript representation does not derive from [Entity]($backend)\n * @note the string value of each variant is required/guaranteed to be 1 character\n * @see EntityReference\n * @alpha\n */\nexport enum ConcreteEntityTypes {\n Model = \"m\",\n Element = \"e\",\n ElementAspect = \"a\",\n Relationship = \"r\",\n}\n\n/**\n * Adds some utilities to the [[ConcreteEntityTypes]] enum\n * @alpha\n */\nexport namespace ConcreteEntityTypes {\n const toBisCoreRootClassFullNameMap = {\n [ConcreteEntityTypes.Model]: \"BisCore:Model\",\n [ConcreteEntityTypes.Element]: \"BisCore:Element\",\n [ConcreteEntityTypes.ElementAspect]: \"BisCore:ElementAspect\",\n [ConcreteEntityTypes.Relationship]: \"BisCore:Relationship\",\n } as const;\n\n /** used by the transformer to figure out where to check for the existence in a db of a concrete element id\n * @internal\n */\n export function toBisCoreRootClassFullName(type: ConcreteEntityTypes): string {\n return toBisCoreRootClassFullNameMap[type];\n }\n}\n\n/**\n * This id format can be used for storing a unique key for an entity in containers like `Map`.\n * Elements and non-element entities have different id sequences, they can collide with each other, but not within themselves.\n * @note for utilities that require runtime backend classes, see [EntityReferences]($backend)\n * @alpha\n */\nexport type EntityReference = `${ConcreteEntityTypes}${Id64String}`;\n\n/** A set of concrete entity ids, with additional functions to more literately add ids where you have the raw id and know what type it is\n * @alpha\n */\nexport class EntityReferenceSet extends Set<EntityReference> {\n public addElement(id: Id64String) { this.add(`e${id}`); }\n public addModel(id: Id64String) { this.add(`m${id}`); }\n public addAspect(id: Id64String) { this.add(`a${id}`); }\n public addRelationship(id: Id64String) { this.add(`r${id}`); }\n}\n\n/** @internal entity reference type information of a relationship */\nexport interface RelTypeInfo {\n source: ConcreteEntityTypes;\n target: ConcreteEntityTypes;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"EntityReference.js","sourceRoot":"","sources":["../../src/EntityReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,yCAAkB,CAAA;AACpB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED;;;GAGG;AACH,WAAiB,mBAAmB;IAClC,MAAM,6BAA6B,GAAG;QACpC,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,eAAe;QAC5C,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,iBAAiB;QAChD,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,uBAAuB;QAC5D,CAAC,mBAAmB,CAAC,YAAY,CAAC,EAAE,sBAAsB;KAClD,CAAC;IAEX;;OAEG;IACH,SAAgB,0BAA0B,CAAC,IAAyB;QAClE,OAAO,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAFe,8CAA0B,6BAEzC,CAAA;AACH,CAAC,EAdgB,mBAAmB,KAAnB,mBAAmB,QAcnC;AAUD;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,GAAoB;IACnD,UAAU,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAChD,SAAS,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACjD,eAAe,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;CAC/D","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Schema\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * Types of concrete entities. Used for storing strings in JavaScript reference-equality containers which encode\r\n * low-level entity information.\r\n * @note the values of this enum are unstable, do not depend upon their values between versions of iTwin.js\r\n * (e.g. do not serialize them and load them in another version of iTwin.js and expect them to work)\r\n * CodeSpecs are excepted since their JavaScript representation does not derive from [Entity]($backend)\r\n * @note the string value of each variant is required/guaranteed to be 1 character\r\n * @see EntityReference\r\n * @alpha\r\n */\r\nexport enum ConcreteEntityTypes {\r\n Model = \"m\",\r\n Element = \"e\",\r\n ElementAspect = \"a\",\r\n Relationship = \"r\",\r\n}\r\n\r\n/**\r\n * Adds some utilities to the [[ConcreteEntityTypes]] enum\r\n * @alpha\r\n */\r\nexport namespace ConcreteEntityTypes {\r\n const toBisCoreRootClassFullNameMap = {\r\n [ConcreteEntityTypes.Model]: \"BisCore:Model\",\r\n [ConcreteEntityTypes.Element]: \"BisCore:Element\",\r\n [ConcreteEntityTypes.ElementAspect]: \"BisCore:ElementAspect\",\r\n [ConcreteEntityTypes.Relationship]: \"BisCore:Relationship\",\r\n } as const;\r\n\r\n /** used by the transformer to figure out where to check for the existence in a db of a concrete element id\r\n * @internal\r\n */\r\n export function toBisCoreRootClassFullName(type: ConcreteEntityTypes): string {\r\n return toBisCoreRootClassFullNameMap[type];\r\n }\r\n}\r\n\r\n/**\r\n * This id format can be used for storing a unique key for an entity in containers like `Map`.\r\n * Elements and non-element entities have different id sequences, they can collide with each other, but not within themselves.\r\n * @note for utilities that require runtime backend classes, see [EntityReferences]($backend)\r\n * @alpha\r\n */\r\nexport type EntityReference = `${ConcreteEntityTypes}${Id64String}`;\r\n\r\n/** A set of concrete entity ids, with additional functions to more literately add ids where you have the raw id and know what type it is\r\n * @alpha\r\n */\r\nexport class EntityReferenceSet extends Set<EntityReference> {\r\n public addElement(id: Id64String) { this.add(`e${id}`); }\r\n public addModel(id: Id64String) { this.add(`m${id}`); }\r\n public addAspect(id: Id64String) { this.add(`a${id}`); }\r\n public addRelationship(id: Id64String) { this.add(`r${id}`); }\r\n}\r\n\r\n/** @internal entity reference type information of a relationship */\r\nexport interface RelTypeInfo {\r\n source: ConcreteEntityTypes;\r\n target: ConcreteEntityTypes;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/Environment.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAsB/C;;;;GAIG;AACH,MAAM,OAAO,WAAW;IACtB;;;OAGG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,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;SAC3F,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAA6C;QACxD,IAAI,CAAC,YAAY;YACf,OAAO,IAAI,CAAC;QAEd,OAAO,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IAC1D,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 { NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\nimport { Atmosphere } from \"./Atmosphere\";\nimport { GroundPlane, GroundPlaneProps } from \"./GroundPlane\";\nimport { SkyBox, SkyBoxProps } from \"./SkyBox\";\n\n/** JSON representation of an [[Environment]].\n * @see [[DisplayStyle3dSettingsProps.environment]].\n * @public\n * @extensions\n */\nexport interface EnvironmentProps {\n /** See [[Environment.ground]] and [[Environment.displayGround]]. */\n ground?: GroundPlaneProps;\n /** See [[Environment.sky]] and [[Environment.displaySky]]. */\n sky?: SkyBoxProps;\n /** @beta See [[Environment.atmosphere]] and [[Environment.displayAtmosphere]]. */\n atmosphere?: Atmosphere.Props;\n}\n\n/** A type containing all of the properties of [[Environment]] with none of the methods and with the `readonly` modifiers removed.\n * @see [[Environment.create]] and [[Environment.clone]].\n * @public\n */\nexport type EnvironmentProperties = NonFunctionPropertiesOf<Environment>;\n\n/** As part of a [[DisplayStyle3dSettings]], controls the display of a [[SkyBox]] and [[GroundPlane]] to simulate the\n * outdoor environment.\n * @see [[DisplayStyle3dSettings.environment]].\n * @public\n */\nexport class Environment {\n /** If true, the sky box will be displayed.\n * Default: false.\n * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleSkyBox]] to change this.\n */\n public readonly displaySky: boolean;\n /** If true, the ground plane will be displayed.\n * Default: false.\n * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleGroundPlane]] to change this.\n */\n public readonly displayGround: boolean;\n /**\n * @beta\n * If true, the atmosphere will be displayed. Enabling this will override any color information provided to the sky box.\n * Default: false.\n * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleAtmosphere]] to change this.\n */\n public readonly displayAtmosphere: boolean;\n\n /** Describes how the sky box should be drawn. */\n public readonly sky: SkyBox;\n /** Describes how the ground plane should be drawn. */\n public readonly ground: GroundPlane;\n /** @beta Describes how the atmosphere should be drawn */\n public readonly atmosphere: Atmosphere.Settings;\n\n protected constructor(props?: Partial<EnvironmentProperties>) {\n this.displaySky = props?.displaySky ?? false;\n this.displayGround = props?.displayGround ?? false;\n this.displayAtmosphere = props?.displayAtmosphere ?? false;\n this.sky = props?.sky ?? SkyBox.defaults;\n this.ground = props?.ground ?? GroundPlane.defaults;\n this.atmosphere = props?.atmosphere ?? Atmosphere.Settings.defaults;\n }\n\n /** Default settings without a ground plane, sky box, or atmosphere displayed. */\n public static readonly defaults = new Environment();\n\n /** Create a new Environment. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<EnvironmentProperties>): Environment {\n return props ? new this(props) : this.defaults;\n }\n\n /** Create a copy of this environment, changing the `displayGround`, `displaySky` and/or `displayAtmosphere` flags. */\n public withDisplay(display: { sky?: boolean, ground?: boolean, atmosphere?: boolean }): Environment {\n const displaySky = display.sky ?? this.displaySky;\n const displayGround = display.ground ?? this.displayGround;\n const displayAtmosphere = display.atmosphere ?? this.displayAtmosphere;\n if (displaySky === this.displaySky && displayGround === this.displayGround && displayAtmosphere === this.displayAtmosphere)\n return this;\n\n return Environment.create({\n ...this,\n displaySky: displaySky ?? this.displaySky,\n displayGround: displayGround ?? this.displayGround,\n displayAtmosphere: displayAtmosphere ?? this.displayAtmosphere,\n });\n }\n\n /** Convert to JSON representation. */\n public toJSON(): EnvironmentProps {\n return {\n sky: this.sky.toJSON(this.displaySky),\n ground: this.ground.toJSON(this.displayGround),\n atmosphere: this.atmosphere.toJSON(this.displayAtmosphere),\n };\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props?: EnvironmentProps): Environment {\n if (!props)\n return this.defaults;\n\n return new this({\n displaySky: props?.sky?.display,\n displayGround: props?.ground?.display,\n displayAtmosphere: props?.atmosphere?.display,\n sky: props?.sky ? SkyBox.fromJSON(props.sky) : undefined,\n ground: props?.ground ? GroundPlane.fromJSON(props.ground) : undefined,\n atmosphere: props?.atmosphere ? Atmosphere.Settings.fromJSON(props.atmosphere) : undefined,\n });\n }\n\n /** Create a copy of this environment, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<EnvironmentProperties>): Environment {\n if (!changedProps)\n return this;\n\n return Environment.create({ ...this, ...changedProps });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/Environment.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAsB/C;;;;GAIG;AACH,MAAM,OAAO,WAAW;IACtB;;;OAGG;IACa,UAAU,CAAU;IACpC;;;OAGG;IACa,aAAa,CAAU;IACvC;;;;;OAKG;IACa,iBAAiB,CAAU;IAE3C,iDAAiD;IACjC,GAAG,CAAS;IAC5B,sDAAsD;IACtC,MAAM,CAAc;IACpC,yDAAyD;IACzC,UAAU,CAAsB;IAEhD,YAAsB,KAAsC;QAC1D,IAAI,CAAC,UAAU,GAAG,KAAK,EAAE,UAAU,IAAI,KAAK,CAAC;QAC7C,IAAI,CAAC,aAAa,GAAG,KAAK,EAAE,aAAa,IAAI,KAAK,CA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n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\r\nimport { Atmosphere } from \"./Atmosphere\";\r\nimport { GroundPlane, GroundPlaneProps } from \"./GroundPlane\";\r\nimport { SkyBox, SkyBoxProps } from \"./SkyBox\";\r\n\r\n/** JSON representation of an [[Environment]].\r\n * @see [[DisplayStyle3dSettingsProps.environment]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EnvironmentProps {\r\n /** See [[Environment.ground]] and [[Environment.displayGround]]. */\r\n ground?: GroundPlaneProps;\r\n /** See [[Environment.sky]] and [[Environment.displaySky]]. */\r\n sky?: SkyBoxProps;\r\n /** @beta See [[Environment.atmosphere]] and [[Environment.displayAtmosphere]]. */\r\n atmosphere?: Atmosphere.Props;\r\n}\r\n\r\n/** A type containing all of the properties of [[Environment]] with none of the methods and with the `readonly` modifiers removed.\r\n * @see [[Environment.create]] and [[Environment.clone]].\r\n * @public\r\n */\r\nexport type EnvironmentProperties = NonFunctionPropertiesOf<Environment>;\r\n\r\n/** As part of a [[DisplayStyle3dSettings]], controls the display of a [[SkyBox]] and [[GroundPlane]] to simulate the\r\n * outdoor environment.\r\n * @see [[DisplayStyle3dSettings.environment]].\r\n * @public\r\n */\r\nexport class Environment {\r\n /** If true, the sky box will be displayed.\r\n * Default: false.\r\n * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleSkyBox]] to change this.\r\n */\r\n public readonly displaySky: boolean;\r\n /** If true, the ground plane will be displayed.\r\n * Default: false.\r\n * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleGroundPlane]] to change this.\r\n */\r\n public readonly displayGround: boolean;\r\n /**\r\n * @beta\r\n * If true, the atmosphere will be displayed. Enabling this will override any color information provided to the sky box.\r\n * Default: false.\r\n * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleAtmosphere]] to change this.\r\n */\r\n public readonly displayAtmosphere: boolean;\r\n\r\n /** Describes how the sky box should be drawn. */\r\n public readonly sky: SkyBox;\r\n /** Describes how the ground plane should be drawn. */\r\n public readonly ground: GroundPlane;\r\n /** @beta Describes how the atmosphere should be drawn */\r\n public readonly atmosphere: Atmosphere.Settings;\r\n\r\n protected constructor(props?: Partial<EnvironmentProperties>) {\r\n this.displaySky = props?.displaySky ?? false;\r\n this.displayGround = props?.displayGround ?? false;\r\n this.displayAtmosphere = props?.displayAtmosphere ?? false;\r\n this.sky = props?.sky ?? SkyBox.defaults;\r\n this.ground = props?.ground ?? GroundPlane.defaults;\r\n this.atmosphere = props?.atmosphere ?? Atmosphere.Settings.defaults;\r\n }\r\n\r\n /** Default settings without a ground plane, sky box, or atmosphere displayed. */\r\n public static readonly defaults = new Environment();\r\n\r\n /** Create a new Environment. Any properties not specified by `props` will be initialized to their default values. */\r\n public static create(props?: Partial<EnvironmentProperties>): Environment {\r\n return props ? new this(props) : this.defaults;\r\n }\r\n\r\n /** Create a copy of this environment, changing the `displayGround`, `displaySky` and/or `displayAtmosphere` flags. */\r\n public withDisplay(display: { sky?: boolean, ground?: boolean, atmosphere?: boolean }): Environment {\r\n const displaySky = display.sky ?? this.displaySky;\r\n const displayGround = display.ground ?? this.displayGround;\r\n const displayAtmosphere = display.atmosphere ?? this.displayAtmosphere;\r\n if (displaySky === this.displaySky && displayGround === this.displayGround && displayAtmosphere === this.displayAtmosphere)\r\n return this;\r\n\r\n return Environment.create({\r\n ...this,\r\n displaySky: displaySky ?? this.displaySky,\r\n displayGround: displayGround ?? this.displayGround,\r\n displayAtmosphere: displayAtmosphere ?? this.displayAtmosphere,\r\n });\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): EnvironmentProps {\r\n return {\r\n sky: this.sky.toJSON(this.displaySky),\r\n ground: this.ground.toJSON(this.displayGround),\r\n atmosphere: this.atmosphere.toJSON(this.displayAtmosphere),\r\n };\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props?: EnvironmentProps): Environment {\r\n if (!props)\r\n return this.defaults;\r\n\r\n return new this({\r\n displaySky: props?.sky?.display,\r\n displayGround: props?.ground?.display,\r\n displayAtmosphere: props?.atmosphere?.display,\r\n sky: props?.sky ? SkyBox.fromJSON(props.sky) : undefined,\r\n ground: props?.ground ? GroundPlane.fromJSON(props.ground) : undefined,\r\n atmosphere: props?.atmosphere ? Atmosphere.Settings.fromJSON(props.atmosphere) : undefined,\r\n });\r\n }\r\n\r\n /** Create a copy of this environment, identical except for any properties specified by `changedProps`.\r\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\r\n */\r\n public clone(changedProps?: Partial<EnvironmentProperties>): Environment {\r\n if (!changedProps)\r\n return this;\r\n\r\n return Environment.create({ ...this, ...changedProps });\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureIndex.js","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAC1B,uFAAuF;IACvE,MAAM,CAAc;IACpC,qFAAqF;IACrE,OAAO,CAAc;IACrC;;OAEG;IACa,QAAQ,CAAU;IAElC;;;;OAIG;IACH,YAAmB,MAAmB,EAAE,OAAiB,EAAE,QAAiB;QAC1E,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,CAAC,QAAQ,CAAC;IAC5B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,UAAU;IACb,MAAM,CAA6B;IAE3C,4D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;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,qDAAqD;IACrD,yDAAK,CAAA;IACL,6DAA6D;IAC7D,6DAAO,CAAA;IACP,+DAA+D;IAC/D,mEAAU,CAAA;AACZ,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B;AAED;;;;GAIG;AACH,MAAM,OAAO,YAAY;IACvB,sFAAsF;IAC/E,IAAI,GAAqB,gBAAgB,CAAC,KAAK,CAAC;IAEvD,iFAAiF;IAC1E,SAAS,GAAW,CAAC,CAAC;IAC7B,oIAAoI;IAC7H,UAAU,CAAe;IAEhC,wDAAwD;IACxD,IAAW,SAAS,KAAc,OAAO,gBAAgB,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAElF,sDAAsD;IACtD,IAAW,OAAO,KAAc,OAAO,gBAAgB,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,KAAK;QACV,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].\n * @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater\n * than zero, all of them must have a transparency greater than zero.\n * @public\n */\nexport class NonUniformColor {\n /** An array of 32-bit [[ColorDef]] values in `tbgr` format, indexed by [[indices]]. */\n public readonly colors: Uint32Array;\n /** For each vertex, an index into [[colors]] indicating the color of that vertex. */\n public readonly indices: Uint16Array;\n /** If `true`, indicates none of the [[colors]] have a transparency greater than zero; otherwise, all of\n * the colors have a transparency greater than zero.\n */\n public readonly isOpaque: boolean;\n\n /** Constructor.\n * @param colors See [[colors]].\n * @param indices See [[indices]]\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\n */\n public constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\n this.colors = new Uint32Array(colors.buffer);\n this.indices = Uint16Array.from(indices);\n this.isOpaque = !hasAlpha;\n }\n}\n\n/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.\n * @public\n */\nexport class ColorIndex {\n private _color: ColorDef | NonUniformColor;\n\n /** Whether the color(s) in this index have transparency. */\n public get hasAlpha() { return !this._color.isOpaque; }\n /** Whether this index specifies a single uniform color for the entire mesh or polyline. */\n public get isUniform() { return this._color instanceof ColorDef; }\n // Note: this.nonUniform will always return a value if this.isUniform is false.\n /** The number of colors in this index. */\n public get numColors(): number { return this.isUniform ? 1 : this.nonUniform!.colors.length; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\n\n /** Construct a default index specifying a uniform white color. */\n public constructor() { this._color = ColorDef.white; }\n\n /** Reset this index to specify a uniform white color. */\n public reset() { this._color = ColorDef.white; }\n\n /** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */\n public get uniform(): ColorDef | undefined {\n return this.isUniform ? this._color as ColorDef : undefined;\n }\n\n /** Set the specified color to be applied to all vertices. */\n public initUniform(color: ColorDef | number) {\n this._color = typeof color === \"number\" ? ColorDef.fromJSON(color) : color;\n }\n\n /** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */\n public get nonUniform(): NonUniformColor | undefined {\n return !this.isUniform ? this._color as NonUniformColor : undefined;\n }\n\n /** Set the per-vertex colors.\n * @param colors See [[NonUniformColor.colors]].\n * @param indices See [[NonUniformColor.indices]].\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\n */\n public initNonUniform(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\n this._color = new NonUniformColor(colors, indices, hasAlpha);\n }\n}\n\n/** Describes the type of a [[FeatureIndex]].\n * @public\n */\nexport enum FeatureIndexType {\n /** Indicates that the index contains no features. */\n Empty,\n /** Indicates that the index contains exactly one feature. */\n Uniform,\n /** Indicates that the index contains more than one feature. */\n NonUniform,\n}\n\n/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\n * The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.\n * The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].\n * @public\n */\nexport class FeatureIndex {\n /** Describes the quantity (zero, one, or more than one) of features in this index. */\n public type: FeatureIndexType = FeatureIndexType.Empty;\n\n /** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */\n public featureID: number = 0;\n /** If [[type]] is [[FeatureIndexType.NonUniform]], the per-vertex feature Ids, indexed by the mesh or polyline's vertex indices. */\n public featureIDs?: Uint32Array;\n\n /** True if [[type]] is [[FeatureIndexType.Uniform]]. */\n public get isUniform(): boolean { return FeatureIndexType.Uniform === this.type; }\n\n /** True if [[type]] is [[FeatureIndexType.Empty]]. */\n public get isEmpty(): boolean { return FeatureIndexType.Empty === this.type; }\n\n /** Reset to an empty index. */\n public reset(): void {\n this.type = FeatureIndexType.Empty;\n this.featureID = 0;\n this.featureIDs = undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureIndex.js","sourceRoot":"","sources":["../../src/FeatureIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MA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AAC;QACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** As part of a [[ColorIndex]], describes per-vertex colors for a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * The [[colors]] array holds the set of unique colors. The [[indices]] array describes the color of each vertex as an index into [[colors]].\r\n * @note A `NonUniformColor` table cannot contain a mix of opaque and translucent colors. If any color in [[colors]] has a transparency greater\r\n * than zero, all of them must have a transparency greater than zero.\r\n * @public\r\n */\r\nexport class NonUniformColor {\r\n /** An array of 32-bit [[ColorDef]] values in `tbgr` format, indexed by [[indices]]. */\r\n public readonly colors: Uint32Array;\r\n /** For each vertex, an index into [[colors]] indicating the color of that vertex. */\r\n public readonly indices: Uint16Array;\r\n /** If `true`, indicates none of the [[colors]] have a transparency greater than zero; otherwise, all of\r\n * the colors have a transparency greater than zero.\r\n */\r\n public readonly isOpaque: boolean;\r\n\r\n /** Constructor.\r\n * @param colors See [[colors]].\r\n * @param indices See [[indices]]\r\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\r\n */\r\n public constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\r\n this.colors = new Uint32Array(colors.buffer);\r\n this.indices = Uint16Array.from(indices);\r\n this.isOpaque = !hasAlpha;\r\n }\r\n}\r\n\r\n/** Describes the color(s) of the vertices of a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * This may be a uniform color to be applied to every vertex, or a table specifying individual per-vertex colors.\r\n * @public\r\n */\r\nexport class ColorIndex {\r\n private _color: ColorDef | NonUniformColor;\r\n\r\n /** Whether the color(s) in this index have transparency. */\r\n public get hasAlpha() { return !this._color.isOpaque; }\r\n /** Whether this index specifies a single uniform color for the entire mesh or polyline. */\r\n public get isUniform() { return this._color instanceof ColorDef; }\r\n // Note: this.nonUniform will always return a value if this.isUniform is false.\r\n /** The number of colors in this index. */\r\n public get numColors(): number { return this.isUniform ? 1 : this.nonUniform!.colors.length; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n\r\n /** Construct a default index specifying a uniform white color. */\r\n public constructor() { this._color = ColorDef.white; }\r\n\r\n /** Reset this index to specify a uniform white color. */\r\n public reset() { this._color = ColorDef.white; }\r\n\r\n /** Returns the single color to be applied to all vertices, if [[isUniform]] is `true`; or `undefined` otherwise. */\r\n public get uniform(): ColorDef | undefined {\r\n return this.isUniform ? this._color as ColorDef : undefined;\r\n }\r\n\r\n /** Set the specified color to be applied to all vertices. */\r\n public initUniform(color: ColorDef | number) {\r\n this._color = typeof color === \"number\" ? ColorDef.fromJSON(color) : color;\r\n }\r\n\r\n /** Returns the per-vertex colors, if [[isUniform]] is `false`; or `undefined` otherwise. */\r\n public get nonUniform(): NonUniformColor | undefined {\r\n return !this.isUniform ? this._color as NonUniformColor : undefined;\r\n }\r\n\r\n /** Set the per-vertex colors.\r\n * @param colors See [[NonUniformColor.colors]].\r\n * @param indices See [[NonUniformColor.indices]].\r\n * @param hasAlpha `true` if all `colors` have a transparency greater than zero, or `false` if they all have a transparency of zero.\r\n */\r\n public initNonUniform(colors: Uint32Array, indices: number[], hasAlpha: boolean) {\r\n this._color = new NonUniformColor(colors, indices, hasAlpha);\r\n }\r\n}\r\n\r\n/** Describes the type of a [[FeatureIndex]].\r\n * @public\r\n */\r\nexport enum FeatureIndexType {\r\n /** Indicates that the index contains no features. */\r\n Empty,\r\n /** Indicates that the index contains exactly one feature. */\r\n Uniform,\r\n /** Indicates that the index contains more than one feature. */\r\n NonUniform,\r\n}\r\n\r\n/** Describes the set of [[Feature]]s associated with a [MeshArgs]($frontend) or [PolylineArgs]($frontend).\r\n * The mesh or polyline may have zero or one features; or, individual vertices may be associated with different features.\r\n * The features are expressed as unsigned 32-bit integer Ids of [[Feature]]s within a [[FeatureTable]].\r\n * @public\r\n */\r\nexport class FeatureIndex {\r\n /** Describes the quantity (zero, one, or more than one) of features in this index. */\r\n public type: FeatureIndexType = FeatureIndexType.Empty;\r\n\r\n /** If [[type]] is [[FeatureIndexType.Uniform]], the Id of the single feature. */\r\n public featureID: number = 0;\r\n /** If [[type]] is [[FeatureIndexType.NonUniform]], the per-vertex feature Ids, indexed by the mesh or polyline's vertex indices. */\r\n public featureIDs?: Uint32Array;\r\n\r\n /** True if [[type]] is [[FeatureIndexType.Uniform]]. */\r\n public get isUniform(): boolean { return FeatureIndexType.Uniform === this.type; }\r\n\r\n /** True if [[type]] is [[FeatureIndexType.Empty]]. */\r\n public get isEmpty(): boolean { return FeatureIndexType.Empty === this.type; }\r\n\r\n /** Reset to an empty index. */\r\n public reset(): void {\r\n this.type = FeatureIndexType.Empty;\r\n this.featureID = 0;\r\n this.featureIDs = undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureSymbology.d.ts","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,IAAI,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAc5D;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,qCAAqC;IACrC,GAAG,CA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AAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;gBACzH,OAAO,GAAG,CAAC,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YAC/C,CAAC;SACF,CAAC;IACJ,CAAC;IAPe,oCAAU,aAOzB,CAAA;IAED;;;OAGG;IACH,SAAgB,KAAK,CAAC,KAAgC,EAAE,MAAiC;QACvF,IAAI,KAAK,KAAK,MAAM;YAClB,OAAO,KAAK,CAAC;QAEf,OAAO;YACL,oBAAoB,EAAE,CAAC,MAA+B,EAAE,MAAc,EAAE,MAAc,EAAE,QAAgB,EAAE,QAAgB,EAAE,SAAwB,EAAE,OAAe,EAAE,OAAe,EAAE,IAAe,EAAE,eAAuB,EAAE,EAAE;gBAClO,OAAO,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;YAClJ,CAAC;SACF,CAAC;IACJ,CAAC;IATe,+BAAK,QASpB,CAAA;AACH,CAAC,EArCgB,yBAAyB,KAAzB,yBAAyB,QAqCzC","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 Rendering\n */\n\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { BatchType, Feature } from \"./FeatureTable\";\nimport { ColorDef } from \"./ColorDef\";\nimport { GeometryClass } from \"./GeometryParams\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\nimport { SubCategoryOverride } from \"./SubCategoryOverride\";\n\nfunction copyIdSetToUint32Set(dst: Id64.Uint32Set, src: Iterable<string>): void {\n dst.clear();\n if (typeof src === \"string\") {\n dst.addId(src);\n } else {\n for (const id of src)\n dst.addId(id);\n }\n}\n\n// cspell:ignore subcat subcats\n\n/** JSON representation of a [[FeatureAppearance]].\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceProps {\n /** See [[FeatureAppearance.rgb]]. */\n rgb?: RgbColorProps;\n /** See [[FeatureAppearance.lineRgb]]. */\n lineRgb?: RgbColorProps | false;\n /** See [[FeatureAppearance.weight]]. */\n weight?: number;\n /** See [[FeatureAppearance.transparency]]. */\n transparency?: number;\n /** See [[FeatureAppearance.lineTransparency]]. */\n lineTransparency?: number | false;\n /** See [[FeatureAppearance.viewDependentTransparency]]. */\n viewDependentTransparency?: true;\n /** See [[FeatureAppearance.linePixels]]. */\n linePixels?: LinePixels;\n /** See [[FeatureAppearance.ignoresMaterial]]. */\n ignoresMaterial?: true;\n /** See [[FeatureAppearance.nonLocatable]]. */\n nonLocatable?: true;\n /** See [[FeatureAppearance.emphasized]]. */\n emphasized?: true;\n}\n\nfunction propsMatchDefaults(props: FeatureAppearanceProps): boolean {\n return !props.rgb && !props.lineRgb\n && undefined === props.weight && undefined === props.linePixels\n && undefined === props.transparency && undefined === props.lineTransparency\n && !props.ignoresMaterial && !props.nonLocatable && !props.emphasized;\n}\n\nfunction equalRgb(a: RgbColor | undefined, b: RgbColor | undefined): boolean {\n if (a === b) {\n return true;\n } else if (!a || !b) {\n return false;\n } else {\n return a.equals(b);\n }\n}\n\nfunction equalLineRgb(a: RgbColor | false | undefined, b: RgbColor | false | undefined): boolean {\n if (a === b) {\n return true;\n } else if (a instanceof RgbColor && b instanceof RgbColor) {\n return equalRgb(a, b);\n } else {\n assert(a === undefined || a === false);\n assert(b === undefined || b === false);\n return false;\n }\n}\n\nfunction equalTransparency(a: number | undefined, b: number | undefined): boolean {\n if (a === b) {\n return true;\n } else if (undefined === a || undefined === b) {\n return false;\n } else {\n return Math.floor(a * 0xff) === Math.floor(b * 0xff);\n }\n}\n\nfunction equalLineTransparency(a: number | false | undefined, b: number | false | undefined): boolean {\n if (a === b) {\n return true;\n } else if (typeof a === \"number\" && typeof b === \"number\") {\n return equalTransparency(a, b);\n } else {\n assert(a === undefined || a === false);\n assert(b === undefined || b === false);\n return false;\n }\n}\n\nfunction transparencyFromJSON(transp: number | undefined): number | undefined {\n if (undefined === transp) {\n return undefined;\n }\n\n transp = Math.max(0, Math.min(transp, 1));\n\n // Fix up rounding errors...\n const smallDelta = 0.0001;\n if (1.0 - transp < smallDelta) {\n transp = 1.0;\n } else if (transp < smallDelta) {\n transp = 0.0;\n }\n\n return transp;\n}\n\n/** Defines overrides for selected aspects of a [[Feature]]'s symbology.\n * Any member defined in the appearance overrides that aspect of symbology for all [[Feature]]s to which the appearance is applied.\n *\n * The [[rgb]] and [[transparency]] overrides, if defined, apply to all geometry by default.\n * However, the color and transparency of \"linear\" geometry can optionally be controlled independently from the rest of the geometry via [[lineRgb]] and [[lineTransparency]].\n * Linear geometry consists of any of the following:\n * - Curves and line strings;\n * - Points and point strings; and\n * - The outlines of planar regions.\n * The edges of 3d surfaces like spheres are not considered linear geometry.\n *\n * @see [[FeatureOverrides]] to customize the appearance of multiple features.\n * @public\n */\nexport class FeatureAppearance {\n /** Overrides the feature's color.\n * If [[lineRgb]] is `undefined`, this color also applies to linear geometry.\n */\n public readonly rgb?: RgbColor;\n /** If defined, overrides the color of linear geometry independently of [[rgb]].\n * If `false`, linear geometry draws using its normal color; otherwise, it uses the specified color.\n */\n public readonly lineRgb?: RgbColor | false;\n /** The width of lines and edges in pixels as an integer in [1, 31]. */\n public readonly weight?: number;\n /** The transparency in the range [0, 1] where 0 indicates fully opaque and 1 indicates fully transparent.\n * If [[lineTransparency]] is `undefined`, this transparency also applies to linear geometry.\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\n */\n public readonly transparency?: number;\n /** If defined, overrides the transparency of linear geometry independently of [[transparency]].\n * If `false`, linear geometry draws using its normal transparency; otherwise, it uses the specified transparency.\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\n */\n public readonly lineTransparency?: number | false;\n /** The pixel pattern applied to lines and edges. */\n public readonly linePixels?: LinePixels;\n /** If true, don't apply the [[RenderMaterial]] to the feature's surfaces. */\n public readonly ignoresMaterial?: true;\n /** If true, the feature will not be drawn when using [Viewport.readPixels]($frontend), meaning [Tool]($frontend)s will not be able to interact with it. */\n public readonly nonLocatable?: true;\n /** If true, the feature will be rendered using the [[Hilite.Settings]] defined by [Viewport.emphasisSettings]($frontend) to make it stand out. */\n public readonly emphasized?: true;\n /** If true, then [[transparency]] and/or [[lineTransparency]] will only be applied if [[ViewFlags.transparency]] is enabled and the current [[RenderMode]] supports transparency.\n * Default: false, meaning the transparency will be applied regardless of view flags or render mode.\n * This property has no effect if this appearance does not override transparency.\n */\n public readonly viewDependentTransparency?: true;\n\n /** An appearance that overrides nothing. */\n public static readonly defaults = new FeatureAppearance({});\n\n public static fromJSON(props?: FeatureAppearanceProps) {\n if (!props || propsMatchDefaults(props)) {\n return this.defaults;\n }\n\n return new FeatureAppearance(props);\n }\n\n /** Create a FeatureAppearance that overrides only the RGB color.\n * @note The transparency component of the ColorDef is ignored.\n */\n public static fromRgb(color: ColorDef): FeatureAppearance {\n return new FeatureAppearance({ rgb: RgbColor.fromColorDef(color) });\n }\n\n /** Create a FeatureAppearance that overrides the RGB and transparency.\n * The appearance's transparency is derived from the transparency component of the ColorDef.\n */\n public static fromRgba(color: ColorDef, viewDependentTransparency = false): FeatureAppearance {\n return new FeatureAppearance({\n rgb: RgbColor.fromColorDef(color),\n transparency: color.colors.t / 255,\n viewDependentTransparency: viewDependentTransparency ? true : undefined,\n });\n }\n /** Create a FeatureAppearance that overrides only the transparency */\n public static fromTransparency(transparencyValue: number, viewDependent = false): FeatureAppearance {\n return new FeatureAppearance({\n transparency: transparencyValue,\n viewDependentTransparency: viewDependent ? true : undefined,\n });\n }\n\n /** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.\n * @note Subcategory overrides set [[viewDependentTransparency]] to `true`.\n */\n public static fromSubCategoryOverride(ovr: SubCategoryOverride): FeatureAppearance {\n const rgb = undefined !== ovr.color ? RgbColor.fromColorDef(ovr.color) : undefined;\n const transparency = ovr.transparency;\n const weight = ovr.weight;\n const ignoresMaterial = undefined !== ovr.material && Id64.isValid(ovr.material) ? true : undefined;\n return this.fromJSON({ rgb, transparency, weight, ignoresMaterial, viewDependentTransparency: true });\n }\n\n /** Returns true if this appearance does not override any aspects of symbology. */\n public get matchesDefaults(): boolean {\n return this.equals(FeatureAppearance.defaults);\n }\n\n public get overridesRgb(): boolean { return undefined !== this.rgb; }\n public get overridesTransparency(): boolean { return undefined !== this.transparency; }\n public get overridesLinePixels(): boolean { return undefined !== this.linePixels; }\n public get overridesWeight(): boolean { return undefined !== this.weight; }\n\n /** Get the color that will be applied to linear geometry, or undefined if not overridden.\n * This is the same as [[rgb]] if [[lineRgb]] is `undefined`.\n */\n public getLineRgb(): RgbColor | undefined {\n return false !== this.lineRgb ? (this.lineRgb ?? this.rgb) : undefined;\n }\n\n /** Get the transparency that will be applied to linear geometry, or undefined if not overridden.\n * This is the same as [[transparency]] if [[lineTransparency]] is `undefined`.\n */\n public getLineTransparency(): number | undefined {\n return false !== this.lineTransparency ? (this.lineTransparency ?? this.transparency) : undefined;\n }\n\n public get overridesSymbology(): boolean {\n return this.overridesRgb || this.overridesTransparency || this.overridesWeight || this.overridesLinePixels || !!this.ignoresMaterial\n || this.emphasized || this.overridesNonLocatable\n || undefined !== this.getLineRgb() || undefined !== this.getLineTransparency();\n }\n\n public get overridesNonLocatable(): boolean { return undefined !== this.nonLocatable; }\n\n public get isFullyTransparent(): boolean {\n const surf = this.transparency ?? 0;\n const line = this.getLineTransparency() ?? 0;\n return surf >= 1 && line >= 1;\n }\n\n /** Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). */\n public get anyOverridden(): boolean { return this.overridesSymbology || this.overridesNonLocatable; }\n\n public equals(other: FeatureAppearance): boolean {\n if (this === other)\n return true;\n\n return equalRgb(this.rgb, other.rgb)\n && this.weight === other.weight\n && equalTransparency(this.transparency, other.transparency)\n && this.linePixels === other.linePixels\n && this.ignoresMaterial === other.ignoresMaterial\n && this.nonLocatable === other.nonLocatable\n && this.emphasized === other.emphasized\n && this.viewDependentTransparency === other.viewDependentTransparency\n && equalLineTransparency(this.lineTransparency, other.lineTransparency)\n && equalLineRgb(this.lineRgb, other.lineRgb);\n }\n\n public toJSON(): FeatureAppearanceProps {\n const props: FeatureAppearanceProps = {};\n if (this.rgb)\n props.rgb = this.rgb.toJSON();\n\n if (undefined !== this.weight)\n props.weight = this.weight;\n\n if (undefined !== this.transparency) {\n props.transparency = this.transparency;\n if (this.viewDependentTransparency)\n props.viewDependentTransparency = true;\n }\n\n if (undefined !== this.linePixels)\n props.linePixels = this.linePixels;\n\n if (true === this.ignoresMaterial)\n props.ignoresMaterial = true;\n\n if (true === this.nonLocatable)\n props.nonLocatable = true;\n\n if (true === this.emphasized)\n props.emphasized = true;\n\n if (undefined !== this.lineTransparency)\n props.lineTransparency = this.lineTransparency;\n\n if (this.lineRgb) {\n props.lineRgb = this.lineRgb;\n if (this.viewDependentTransparency)\n props.viewDependentTransparency = true;\n }\n\n return props;\n }\n\n /** Convert this appearance to JSON, and override any properties explicitly specified by `changedProps` in the result.\n * Example:\n * ```ts\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\n * const clone = base.cloneProps({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\n * ```\n * @see [[FeatureAppearance.clone]].\n */\n public cloneProps(changedProps: FeatureAppearanceProps): FeatureAppearanceProps {\n return {\n ...this.toJSON(),\n ...changedProps,\n };\n }\n\n /** Create a copy of this appearance, overriding any properties explicitly specified by `changedProps`.\n * Example:\n * ```ts\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\n * const clone = base.clone({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\n * ```\n * @see [[FeatureAppearance.cloneProps]].\n */\n public clone(changedProps: FeatureAppearanceProps): FeatureAppearance {\n return FeatureAppearance.fromJSON(this.cloneProps(changedProps));\n }\n\n /** Produce a FeatureAppearance from the supplied appearance in which any aspect not defined by the base appearance is overridden by this appearance. */\n public extendAppearance(base: FeatureAppearance): FeatureAppearance {\n if (!this.overridesSymbology)\n return base;\n\n const props = base.toJSON();\n if (undefined === props.rgb)\n props.rgb = this.rgb;\n if (undefined === props.transparency)\n props.transparency = this.transparency;\n if (undefined === props.linePixels)\n props.linePixels = this.linePixels;\n if (undefined === props.weight)\n props.weight = this.weight;\n if (undefined === props.ignoresMaterial && this.ignoresMaterial)\n props.ignoresMaterial = true;\n if (undefined === props.nonLocatable && this.nonLocatable)\n props.nonLocatable = true;\n if (undefined === props.emphasized && this.emphasized)\n props.emphasized = true;\n if (!props.lineRgb)\n props.lineRgb = this.lineRgb;\n if (undefined === props.lineTransparency)\n props.lineTransparency = this.lineTransparency;\n\n if (this.viewDependentTransparency && (undefined !== props.transparency || undefined !== props.lineTransparency))\n props.viewDependentTransparency = true;\n\n return FeatureAppearance.fromJSON(props);\n }\n\n protected constructor(props: FeatureAppearanceProps) {\n this.rgb = undefined !== props.rgb ? RgbColor.fromJSON(props.rgb) : undefined;\n this.lineRgb = typeof props.lineRgb === \"object\" ? RgbColor.fromJSON(props.lineRgb) : (false === props.lineRgb ? false : undefined);\n\n this.transparency = transparencyFromJSON(props.transparency);\n this.lineTransparency = typeof props.lineTransparency === \"number\" ? transparencyFromJSON(props.lineTransparency) : (false === props.lineTransparency ? false : undefined);\n\n this.weight = props.weight;\n this.linePixels = props.linePixels;\n\n this.ignoresMaterial = props.ignoresMaterial;\n this.nonLocatable = props.nonLocatable;\n this.emphasized = props.emphasized;\n\n if (undefined !== this.weight) {\n this.weight = Math.max(1, Math.min(this.weight, 32));\n }\n\n if (props.viewDependentTransparency && (undefined !== this.transparency || undefined !== this.getLineTransparency())) {\n this.viewDependentTransparency = true;\n }\n }\n}\n\n/** Interface adopted by an object that can supply a [[FeatureAppearance]] given a low-level description of a [[Feature]].\n * @see [[FeatureOverrides]] for the commonly-used implementation.\n * @see [[FeatureAppearanceProvider]] to supplement the appearance supplied by this interface.\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceSource {\n /** Supplies the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\n * The feature is described by its components for efficiency reasons.\n * @param elemLo The lower 32 bits of the feature's element Id.\n * @param elemHi The upper 32 bits of the feature's element Id.\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\n * @param geomClass The geometry class of the feature.\n * @param modelLo The lower 32 bits of the feature's model Id.\n * @param modelHi The upper 32 bits of the feature's model Id.\n * @param type The type of batch to which the feature belongs.\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\n */\n getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\n}\n\n/** Common options for [[FeatureOverrides.override]].\n * @public\n */\nexport interface OverrideFeatureAppearanceOptions {\n /** Specifies the aspects of the [[Feature]]'s appearance to be overridden. */\n appearance: FeatureAppearance;\n /** Specifies what to do if a [[FeatureAppearance]] has already been configured for the specified element, model, or subcategory by a previous call to [[FeatureOverrides.override]].\n * - \"subsume\" (the default): Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by the existing appearance will be overwritten\n * if also overridden by [[appearance]].\n * - The resulting appearance is computed as `existingAppearance.extendAppearance(newAppearance)`.\n * - \"extend\": Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by [[appearance]] will only\n * apply if that aspect is not already overridden by a previous appearance.\n * - The resulting appearance is computed as `newAppearance.extendAppearance(existingAppearance)`.\n * - \"replace\": Completely replace the existing appearance with [[appearance]].\n * - \"skip\": Keep the existing appearance.\n */\n onConflict?: \"extend\" | \"subsume\" | \"replace\" | \"skip\";\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricModel]($backend).\n * @public\n */\nexport interface OverrideModelAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the model whose appearance is to be overridden. */\n modelId: Id64String;\n elementId?: never;\n subCategoryId?: never;\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricElement]($backend).\n * @public\n */\nexport interface OverrideElementAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the element whose appearance is to be overridden. */\n elementId: Id64String;\n modelId?: never;\n subCategoryId?: never;\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [SubCategory]($backend).\n * @public\n */\nexport interface OverrideSubCategoryAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the subcategory whose appearance is to be overridden. */\n subCategoryId: Id64String;\n modelId?: never;\n elementId?: never;\n}\n\n/** Arguments supplied to [[FeatureOverrides.override]].\n * @public\n */\nexport type OverrideFeatureAppearanceArgs = OverrideElementAppearanceOptions | OverrideModelAppearanceOptions | OverrideSubCategoryAppearanceOptions;\n\n/** Arguments provided to a function of type [[IgnoreAnimationOverrides]].\n * @see [[FeatureOverrides.ignoreAnimationOverrides]] to register such a function.\n * @public\n */\nexport interface IgnoreAnimationOverridesArgs {\n /** The Id of the element under consideration.\n * @see [Id64.fromUint32Pair]($bentley) to convert a Uint32Pair into an [Id64String]($bentley), if needed.\n */\n readonly elementId: Readonly<Id64.Uint32Pair>;\n /** The [[RenderSchedule.ElementTimeline.batchId]] identifying the [[RenderSchedule.ElementTimeline]] to which the element under consideration belongs. */\n readonly animationNodeId: number;\n}\n\n/** A function that can be supplied to [[FeatureOverrides.ignoreAnimationOverrides]] to indicate whether the color or transparency overrides defined\n * by the view's [[RenderSchedule.Script]] should be ignored. The arguments describe the element under consideration. The function should return true if that\n * element should not have its color or transparency modified by the schedule script.\n * @public\n */\nexport type IgnoreAnimationOverrides = (args: IgnoreAnimationOverridesArgs) => boolean;\n\nconst scratchIgnoreAnimationOverridesArgs = {\n elementId: { lower: 0, upper: 0 },\n animationNodeId: 0,\n};\n\n/** Specifies how to customize the appearance of individual [[Feature]]s, typically within the context of a [Viewport]($frontend).\n * Individual aspects of a feature's appearance - like visibility, color, and transparency - are overridden by supplying a [[FeatureAppearance]].\n * Those overrides can be specified on the basis of the feature's model, element, and/or subcategory. A default set of overrides can also be specified to\n * apply to the appearance of any feature not otherwise overridden.\n *\n * It is possible to override multiple aspects of a feature on different bases. For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red,\n * and that all features belonging to model \"B\" should be drawn 50% transparent. In this case, a feature belonging to both subcategory \"A\" and model \"B\" will be drawn as 50% transparent red -\n * the separate overrides are combined to produce the feature's overall appearance.\n *\n * In the case of conflicts, there is an order of precedence:\n * - Model overrides take highest precedence.\n * - Element overrides are of higher precedence than subcategory and animation overrides.\n * - Overrides applied by a [[RenderSchedule.Script]]'s [[RenderSchedule.ElementTimeline]] are of higher precedence than subcategory overrides, but can be suppressed on a per-element basis via [[ignoreAnimationOverrides]].\n * - Subcategory overrides have lowest precedence.\n *\n * For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red, and all those belonging to model \"B\" should be drawn in green.\n * Then a feature belonging to subcategory \"A\" and model \"B\" will be drawn in green, because the model overrides take precedence.\n *\n * Instances of this class are not typically instantiated by an application directly; instead, an application can implement a [FeatureOverrideProvider]($frontend)\n * that augments the overrides supplied by a viewport.\n *\n * @see [FeatureSymbology.Overrides]($frontend) to create overrides specific to a [Viewport]($frontend) or [ViewState]($frontend).\n * @see [FeatureOverrideProvider]($frontend) to customize the appearance of features within a [Viewport]($frontend).\n * @public\n */\nexport class FeatureOverrides implements FeatureAppearanceSource {\n /** @internal */\n private readonly _ignoreAnimationOverrides: IgnoreAnimationOverrides[] = [];\n /** Ids of elements that should never be drawn. This takes precedence over [[alwaysDrawn]]. @internal */\n private readonly _neverDrawn = new Id64.Uint32Set();\n /** Ids of elements that should always be drawn. [[neverDrawn]] takes precedence over this set. @internal */\n private readonly _alwaysDrawn = new Id64.Uint32Set();\n /** If true, no elements *except* those defined in the \"always drawn\" set will be drawn.\n * @see [[setAlwaysDrawn]]\n */\n public isAlwaysDrawnExclusive = false;\n /** If true, the always-drawn elements are drawn even if their subcategories are not visible.\n * @see [[setAlwaysDrawn]]\n */\n public alwaysDrawnIgnoresSubCategory = true;\n /** If true, all subcategories are considered visible. This is used for drawing sheets via section callouts in the absence of an actual sheet view.\n */\n public ignoreSubCategory = false;\n\n /** Overrides applied to any feature not explicitly overridden. @internal */\n private _defaultOverrides = FeatureAppearance.defaults;\n /** Whether construction geometry should be drawn. */\n protected _constructions = false;\n /** Whether dimensions should be drawn. */\n protected _dimensions = false;\n /** Whether area patterns should be drawn. */\n protected _patterns = false;\n /** Whether line weights should be applied. If false, all lines are rendered 1-pixel wide. */\n protected _lineWeights = true;\n\n /** Overrides applied to all elements belonging to each model. @internal */\n private readonly _modelOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** Overrides applied to specific elements. */\n protected readonly _elementOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** Overrides applied to geometry belonging to each subcategory. */\n protected readonly _subCategoryOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** The set of displayed subcategories. Geometry belonging to subcategories not included in this set will not be drawn. */\n protected readonly _visibleSubCategories = new Id64.Uint32Set();\n /** Display priorities assigned to subcategories, possibly overridden by display style. Only applicable for plan projection models. */\n protected readonly _subCategoryPriorities = new Id64.Uint32Map<number>();\n\n /** Per-model, a set of subcategories whose visibility should be inverted for elements within that model.\n * Populated by Viewport.\n */\n protected readonly _modelSubCategoryOverrides = new Id64.Uint32Map<Id64.Uint32Set>();\n\n /** Ids of animation nodes that should never be drawn. */\n public readonly neverDrawnAnimationNodes = new Set<number>();\n /** Mapping of animation node Ids to overrides applied to the corresponding animation nodes.\n * @internal\n */\n public readonly animationNodeOverrides = new Map<number, FeatureAppearance>();\n\n /** Accepts a criterion that determines whether color and transparency overrides originating from the view's [[RenderSchedule.Script]] should be ignored for a given element.\n * The function receives a description of the element in question and returns `true` if the script's overrides should be ignored.\n * Any number of such functions can be registered; if any one of them returns `true`, the script's overrides are not applied to the specified element.\n *\n * For example, applications commonly emphasize a set of elements by applying a [[FeatureAppearance.emphasized]] override to them, and specifying a highly-transparent\n * default appearance to de-emphasize the rest of the elements in the view. If some of the de-emphasized elements' appearances are also being overridden by the schedule script, then\n * they won't appear de-emphasized, making it difficult for the emphasized elements to stand out. In situations like this, [FeatureOverrideProvider]($frontend)s like [EmphasizeElements]($frontend) can register an [[IgnoreAnimationOverrides]] function that returns true if the element in question is not in the set of emphasized elements.\n */\n public ignoreAnimationOverrides(ignore: IgnoreAnimationOverrides): void {\n this._ignoreAnimationOverrides.push(ignore);\n }\n\n /** Overrides applied to features for which no other overrides are defined */\n public get defaultOverrides(): FeatureAppearance { return this._defaultOverrides; }\n /** Whether or not line weights are applied. If false, all lines are drawn with a weight of 1. */\n public get lineWeights(): boolean { return this._lineWeights; }\n\n /** A set of elements that are always invisible.\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\n */\n public get neverDrawn() { return this._neverDrawn; }\n /** A set of elements that are unconditionally displayed.\n * @see [[isAlwaysDrawnExclusive]] to specify that *only* elements in this set will be displayed.\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\n */\n public get alwaysDrawn() { return this._alwaysDrawn; }\n\n private isNeverDrawn(elemIdLo: number, elemIdHi: number, animationNodeId: number): boolean {\n if (this._neverDrawn.has(elemIdLo, elemIdHi))\n return true;\n else\n return this.neverDrawnAnimationNodes.has(animationNodeId);\n }\n\n private isAlwaysDrawn(idLo: number, idHi: number): boolean { return this._alwaysDrawn.has(idLo, idHi); }\n\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories. */\n public isSubCategoryVisible(idLo: number, idHi: number): boolean { return this._visibleSubCategories.has(idLo, idHi); }\n\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories in the context of the specified model. */\n public isSubCategoryVisibleInModel(subcatLo: number, subcatHi: number, modelLo: number, modelHi: number): boolean {\n if (this.ignoreSubCategory)\n return true;\n\n let vis = this.isSubCategoryVisible(subcatLo, subcatHi);\n const modelOvr = this._modelSubCategoryOverrides.get(modelLo, modelHi);\n if (undefined !== modelOvr && modelOvr.has(subcatLo, subcatHi))\n vis = !vis;\n\n return vis;\n }\n\n private getModelOverrides(idLo: number, idHi: number): FeatureAppearance | undefined {\n return this._modelOverrides.get(idLo, idHi);\n }\n\n private getElementAnimationOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\n if (this.animationNodeOverrides.size === 0)\n return undefined;\n\n // NB: An animation node Id of zero means \"not animated\". Some providers like EmphasizeElements may provide an appearance override for unanimated nodes.\n // That should be preserved.\n const app = this.animationNodeOverrides.get(animationNodeId);\n if (!app || 0 === animationNodeId || this._ignoreAnimationOverrides.length === 0)\n return app;\n\n const args = scratchIgnoreAnimationOverridesArgs;\n args.elementId.lower = idLo;\n args.elementId.upper = idHi;\n args.animationNodeId = animationNodeId;\n return this._ignoreAnimationOverrides.some((ignore) => ignore(args)) ? undefined : app;\n }\n\n private getElementOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\n const elemApp = this._elementOverrides.get(idLo, idHi);\n const nodeApp = this.getElementAnimationOverrides(idLo, idHi, animationNodeId);\n if (elemApp)\n return nodeApp ? nodeApp.extendAppearance(elemApp) : elemApp;\n\n return nodeApp;\n }\n\n private getSubCategoryOverrides(idLo: number, idHi: number): FeatureAppearance | undefined { return this._subCategoryOverrides.get(idLo, idHi); }\n\n /** Add a [SubCategory]($backend) to the set of visible subcategories. */\n public setVisibleSubCategory(id: Id64String): void { this._visibleSubCategories.addId(id); }\n /** Specify the Id of an element that should never be drawn. */\n public setNeverDrawn(id: Id64String): void { this._neverDrawn.addId(id); }\n /** Specify the Id of an element that should always be drawn. */\n public setAlwaysDrawn(id: Id64String): void { this._alwaysDrawn.addId(id); }\n /** Specify the Id of a animation node that should never be drawn. */\n public setAnimationNodeNeverDrawn(id: number): void { this.neverDrawnAnimationNodes.add(id); }\n /** Specify the Ids of elements that should never be drawn. */\n public setNeverDrawnSet(ids: Iterable<Id64String>) { copyIdSetToUint32Set(this._neverDrawn, ids); }\n /** Specify the Ids of elements that should always be drawn. */\n public setAlwaysDrawnSet(ids: Iterable<Id64String>, exclusive: boolean, ignoreSubCategory = true) {\n copyIdSetToUint32Set(this._alwaysDrawn, ids);\n this.isAlwaysDrawnExclusive = exclusive;\n this.alwaysDrawnIgnoresSubCategory = ignoreSubCategory;\n }\n\n /** Returns the feature's appearance overrides, or undefined if the feature is not visible. */\n public getFeatureAppearance(feature: Feature, modelId: Id64String, type: BatchType = BatchType.Primary, animationNodeId = 0): FeatureAppearance | undefined {\n return this.getAppearance(\n Id64.getLowerUint32(feature.elementId), Id64.getUpperUint32(feature.elementId),\n Id64.getLowerUint32(feature.subCategoryId), Id64.getUpperUint32(feature.subCategoryId),\n feature.geometryClass,\n Id64.getLowerUint32(modelId), Id64.getUpperUint32(modelId),\n type, animationNodeId);\n }\n\n private static readonly _weight1Appearance = FeatureAppearance.fromJSON({ weight: 1 });\n\n /** Returns a feature's appearance overrides, or undefined if the feature is not visible.\n * Takes Id64s as pairs of unsigned 32-bit integers for efficiency, because that is how they are stored by the PackedFeatureTable associated with each batch of graphics.\n * @see [[getFeatureAppearance]] for an equivalent function that accepts [Id64String]($core-bentley)s instead of integer pairs.\n */\n public getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined {\n if (BatchType.VolumeClassifier === type || BatchType.PlanarClassifier === type)\n return this.getClassifierAppearance(elemLo, elemHi, subcatLo, subcatHi, modelLo, modelHi, animationNodeId);\n\n let app = !this._lineWeights ? FeatureOverrides._weight1Appearance : FeatureAppearance.defaults;\n const modelApp = this.getModelOverrides(modelLo, modelHi);\n if (undefined !== modelApp)\n app = modelApp.extendAppearance(app);\n\n // Is the element visible?\n let elemApp, alwaysDrawn = false;\n\n if (Id64.isValidUint32Pair(elemLo, elemHi)) {\n if (this.isNeverDrawn(elemLo, elemHi, animationNodeId))\n return undefined;\n\n alwaysDrawn = this.isAlwaysDrawn(elemLo, elemHi);\n if (!alwaysDrawn && this.isAlwaysDrawnExclusive)\n return undefined;\n\n // Element overrides take precedence\n elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\n if (undefined !== elemApp)\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\n }\n\n let subCatApp;\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\n if ((!alwaysDrawn || !this.alwaysDrawnIgnoresSubCategory) && !this.isSubCategoryVisibleInModel(subcatLo, subcatHi, modelLo, modelHi))\n return undefined;\n\n subCatApp = this.getSubCategoryOverrides(subcatLo, subcatHi);\n if (undefined !== subCatApp)\n app = subCatApp.extendAppearance(app);\n }\n\n // Only apply default if *no* appearance was explicitly registered (doesn't matter if registered appearance does not actually override anything)\n if (undefined === elemApp && undefined === modelApp && undefined === subCatApp)\n app = this._defaultOverrides.extendAppearance(app);\n\n let visible = alwaysDrawn || this.isClassVisible(geomClass);\n if (visible && app.isFullyTransparent)\n visible = false; // don't bother rendering something with full transparency...\n\n return visible ? app : undefined;\n }\n\n /** Classifiers behave totally differently...in particular they are never invisible unless fully-transparent. */\n private getClassifierAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, modelLo: number, modelHi: number, animationNodeId: number): FeatureAppearance | undefined {\n let app = FeatureAppearance.defaults;\n const modelApp = this.getModelOverrides(modelLo, modelHi);\n if (undefined !== modelApp)\n app = modelApp.extendAppearance(app);\n\n const elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\n if (undefined !== elemApp)\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\n\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\n const subCat = this.getSubCategoryOverrides(subcatLo, subcatHi);\n if (undefined !== subCat)\n app = subCat.extendAppearance(app);\n }\n\n if (undefined === elemApp && undefined === modelApp)\n app = this._defaultOverrides.extendAppearance(app);\n\n // NB: A fully-transparent classifier means the classifier is a clip mask - classified pixels will be discarded.\n return app;\n }\n\n /** Return whether geometry of the specified class should be drawn.\n * @see [[ViewFlags.constructions]], [[ViewFlags.dimensions]], and [[ViewFlags.patterns]].\n */\n public isClassVisible(geomClass: GeometryClass): boolean {\n switch (geomClass) {\n case GeometryClass.Construction: return this._constructions;\n case GeometryClass.Dimension: return this._dimensions;\n case GeometryClass.Pattern: return this._patterns;\n default: return true;\n }\n }\n\n /** Specify overrides for all elements belonging to a specified [GeometricModel]($backend), or all geometry belonging to a specified [GeometricElement]($backend) or [SubCategory]($backend). */\n public override(args: OverrideFeatureAppearanceArgs): void {\n let id: Id64String;\n let map: Id64.Uint32Map<FeatureAppearance>;\n if (undefined !== args.elementId) {\n id = args.elementId;\n map = this._elementOverrides;\n } else if (undefined !== args.modelId) {\n id = args.modelId;\n map = this._modelOverrides;\n } else {\n id = args.subCategoryId;\n map = this._subCategoryOverrides;\n }\n\n let app = args.appearance;\n const idLo = Id64.getLowerUint32(id);\n const idHi = Id64.getUpperUint32(id);\n\n if (undefined !== args.elementId && this.isNeverDrawn(idLo, idHi, 0))\n return;\n\n const replace = \"replace\" === args.onConflict;\n const existing = replace ? undefined : map.get(idLo, idHi);\n if (existing) {\n assert(\"replace\" !== args.onConflict);\n switch (args.onConflict) {\n case \"skip\":\n return;\n case \"extend\":\n app = app.extendAppearance(existing);\n break;\n default:\n app = existing.extendAppearance(app);\n break;\n }\n }\n\n map.set(idLo, idHi, app);\n }\n\n /** Specify overrides for all geometry originating from the specified animation node.\n * @param id The Id of the animation node.\n * @param app The symbology overrides.\n * @note These overrides do not take precedence over element overrides.\n */\n public overrideAnimationNode(id: number, app: FeatureAppearance): void {\n this.animationNodeOverrides.set(id, app);\n }\n\n /** Defines a default appearance to be applied to any [[Feature]] *not* explicitly overridden.\n * @param appearance The symbology overrides.\n * @param replaceExisting Specifies whether to replace the current default overrides if they are already defined.\n */\n public setDefaultOverrides(appearance: FeatureAppearance, replaceExisting: boolean = true): void {\n if (replaceExisting || !appearance.overridesSymbology)\n this._defaultOverrides = appearance;\n }\n\n /** Get the display priority of a subcategory. This is only relevant when using [[PlanProjectionSettings]]. */\n public getSubCategoryPriority(idLo: number, idHi: number): number {\n return this._subCategoryPriorities.get(idLo, idHi) ?? 0;\n }\n\n /** Adds all fully transparent elements to the _neverDrawn set. This is used for BatchedModels planar masks. */\n public addInvisibleElementOverridesToNeverDrawn(): void {\n this._elementOverrides.forEach((lo, hi) => {\n const app = this.getElementOverrides(lo, hi, 0);\n if (app?.isFullyTransparent)\n this._neverDrawn.add(lo, hi);\n });\n }\n\n /** Construct a new Overrides that overrides nothing.\n * @see [FeatureSymbology.Overrides]($frontend) to construct overrides based on a [ViewState]($frontend) or [Viewport]($frontend).\n */\n public constructor() {\n //\n }\n\n /** Returns true if geometry belonging to the specified subcategory will be drawn. */\n public isSubCategoryIdVisible(id: Id64String): boolean { return this.isSubCategoryVisible(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n /** Returns the overrides applied to geometry belonging to the specified model, if any such are defined. */\n public getModelOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getModelOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n /** Returns the overrides applied to geometry belonging to the specified element, if any such are defined. */\n public getElementOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getElementOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id), 0); }\n /** Returns the overrides applied to geometry belonging to the specified subcategory, if any such are defined. */\n public getSubCategoryOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getSubCategoryOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n\n /** Returns true if the specified Feature will be drawn. */\n public isFeatureVisible(feature: Feature): boolean {\n const { elementId, subCategoryId, geometryClass } = feature;\n const isValidElemId = !Id64.isInvalid(elementId);\n const elemIdParts = isValidElemId ? Id64.getUint32Pair(elementId) : undefined;\n\n if (undefined !== elemIdParts && this.isNeverDrawn(elemIdParts.lower, elemIdParts.upper, 0))\n return false;\n\n const alwaysDrawn = undefined !== elemIdParts && this.isAlwaysDrawn(elemIdParts.lower, elemIdParts.upper);\n if (alwaysDrawn || this.isAlwaysDrawnExclusive)\n return alwaysDrawn;\n\n // NB: This ignores per-model subcategory visibility overrides, because caller did not specify a model.\n if (!this.isSubCategoryIdVisible(subCategoryId))\n return false;\n\n return this.isClassVisible(geometryClass);\n }\n}\n\n/** Interface adopted by an object that can supply the [[FeatureAppearance]] supplied by a [[FeatureAppearanceSource]].\n * This is useful for selectively overriding or agumenting a [Viewport]($frontend)'s symbology overrides.\n * A typical implementation will invoke [[FeatureAppearanceSource.getAppearance]] and customize the returned appearance.\n * @see [[FeatureAppearanceProvider.chain]] to chain two providers together.\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceProvider {\n /** Supply the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\n * The feature is described by its components for efficiency reasons.\n * @param source The base symbology overrides, e.g., typically defined by a [Viewport]($frontend).\n * @param elemLo The lower 32 bits of the feature's element Id.\n * @param elemHi The upper 32 bits of the feature's element Id.\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\n * @param geomClass The geometry class of the feature.\n * @param modelLo The lower 32 bits of the feature's model Id.\n * @param modelHi The upper 32 bits of the feature's model Id.\n * @param type The type of batch to which the feature belongs.\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\n * @see [[FeatureAppearanceSource.getAppearance]] to forward the request to the source.\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\n */\n getFeatureAppearance(source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\n}\n\n/** @public */\nexport namespace FeatureAppearanceProvider {\n /** Produce a FeatureAppearanceSource for which `getAppearance()` returns the appearance specified in `source`, potentially modified by `provider`. */\n function wrap(source: FeatureAppearanceSource, provider: FeatureAppearanceProvider): FeatureAppearanceSource {\n return {\n getAppearance: (elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n return provider.getFeatureAppearance(source, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n },\n };\n }\n\n /** Create a provider that obtains each feature's appearance from the source, and if the feature is visible, modifies the appearance.\n * @param supplementAppearance A function accepting the feature's base appearance and returning a supplemental appearance.\n * @public\n */\n export function supplement(supplementAppearance: (appearance: FeatureAppearance) => FeatureAppearance): FeatureAppearanceProvider {\n return {\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n const app = source.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n return app ? supplementAppearance(app) : app;\n },\n };\n }\n\n /** Chain two FeatureAppearanceProviders together such that `first`'s `getFeatureAppearance` function is applied before `second`'s.\n * If `second` invokes `source.getAppearance()`, the returned appearance will include any modifications applied by `first`.\n * @public\n */\n export function chain(first: FeatureAppearanceProvider, second: FeatureAppearanceProvider): FeatureAppearanceProvider {\n if (first === second)\n return first;\n\n return {\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n return second.getFeatureAppearance(wrap(source, first), elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n },\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAW,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAGrD,SAAS,oBAAoB,CAAC,GAAmB,EAAE,GAAqB;IACtE,GAAG,CAAC,KAAK,EAAE,CAAC;IACZ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,EAAE,IAAI,GAAG;YAClB,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AA+BD,SAAS,kBAAkB,CAAC,KAA6B;IACvD,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO;WAC9B,SAAS,KAAK,KAAK,CAAC,MAAM,IAAI,SAAS,KAAK,KAAK,CAAC,UAAU;WAC5D,SAAS,KAAK,K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C/C,CAAC;SACF,CAAC;IACJ,CAAC;IAPe,oCAAU,aAOzB,CAAA;IAED;;;OAGG;IACH,SAAgB,KAAK,CAAC,KAAgC,EAAE,MAAiC;QACvF,IAAI,KAAK,KAAK,MAAM;YAClB,OAAO,KAAK,CAAC;QAEf,OAAO;YACL,oBAAoB,EAAE,CAAC,MAA+B,EAAE,MAAc,EAAE,MAAc,EAAE,QAAgB,EAAE,QAAgB,EAAE,SAAwB,EAAE,OAAe,EAAE,OAAe,EAAE,IAAe,EAAE,eAAuB,EAAE,EAAE;gBAClO,OAAO,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;YAClJ,CAAC;SACF,CAAC;IACJ,CAAC;IATe,+BAAK,QASpB,CAAA;AACH,CAAC,EArCgB,yBAAyB,KAAzB,yBAAyB,QAqCzC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature } from \"./FeatureTable\";\r\nimport { ColorDef } from \"./ColorDef\";\r\nimport { GeometryClass } from \"./GeometryParams\";\r\nimport { LinePixels } from \"./LinePixels\";\r\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\r\nimport { SubCategoryOverride } from \"./SubCategoryOverride\";\r\n\r\nfunction copyIdSetToUint32Set(dst: Id64.Uint32Set, src: Iterable<string>): void {\r\n dst.clear();\r\n if (typeof src === \"string\") {\r\n dst.addId(src);\r\n } else {\r\n for (const id of src)\r\n dst.addId(id);\r\n }\r\n}\r\n\r\n// cspell:ignore subcat subcats\r\n\r\n/** JSON representation of a [[FeatureAppearance]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FeatureAppearanceProps {\r\n /** See [[FeatureAppearance.rgb]]. */\r\n rgb?: RgbColorProps;\r\n /** See [[FeatureAppearance.lineRgb]]. */\r\n lineRgb?: RgbColorProps | false;\r\n /** See [[FeatureAppearance.weight]]. */\r\n weight?: number;\r\n /** See [[FeatureAppearance.transparency]]. */\r\n transparency?: number;\r\n /** See [[FeatureAppearance.lineTransparency]]. */\r\n lineTransparency?: number | false;\r\n /** See [[FeatureAppearance.viewDependentTransparency]]. */\r\n viewDependentTransparency?: true;\r\n /** See [[FeatureAppearance.linePixels]]. */\r\n linePixels?: LinePixels;\r\n /** See [[FeatureAppearance.ignoresMaterial]]. */\r\n ignoresMaterial?: true;\r\n /** See [[FeatureAppearance.nonLocatable]]. */\r\n nonLocatable?: true;\r\n /** See [[FeatureAppearance.emphasized]]. */\r\n emphasized?: true;\r\n}\r\n\r\nfunction propsMatchDefaults(props: FeatureAppearanceProps): boolean {\r\n return !props.rgb && !props.lineRgb\r\n && undefined === props.weight && undefined === props.linePixels\r\n && undefined === props.transparency && undefined === props.lineTransparency\r\n && !props.ignoresMaterial && !props.nonLocatable && !props.emphasized;\r\n}\r\n\r\nfunction equalRgb(a: RgbColor | undefined, b: RgbColor | undefined): boolean {\r\n if (a === b) {\r\n return true;\r\n } else if (!a || !b) {\r\n return false;\r\n } else {\r\n return a.equals(b);\r\n }\r\n}\r\n\r\nfunction equalLineRgb(a: RgbColor | false | undefined, b: RgbColor | false | undefined): boolean {\r\n if (a === b) {\r\n return true;\r\n } else if (a instanceof RgbColor && b instanceof RgbColor) {\r\n return equalRgb(a, b);\r\n } else {\r\n return false;\r\n }\r\n}\r\n\r\nfunction equalTransparency(a: number | undefined, b: number | undefined): boolean {\r\n if (a === b) {\r\n return true;\r\n } else if (undefined === a || undefined === b) {\r\n return false;\r\n } else {\r\n return Math.floor(a * 0xff) === Math.floor(b * 0xff);\r\n }\r\n}\r\n\r\nfunction equalLineTransparency(a: number | false | undefined, b: number | false | undefined): boolean {\r\n if (a === b) {\r\n return true;\r\n } else if (typeof a === \"number\" && typeof b === \"number\") {\r\n return equalTransparency(a, b);\r\n } else {\r\n assert(a === undefined || a === false);\r\n assert(b === undefined || b === false);\r\n return false;\r\n }\r\n}\r\n\r\nfunction transparencyFromJSON(transp: number | undefined): number | undefined {\r\n if (undefined === transp) {\r\n return undefined;\r\n }\r\n\r\n transp = Math.max(0, Math.min(transp, 1));\r\n\r\n // Fix up rounding errors...\r\n const smallDelta = 0.0001;\r\n if (1.0 - transp < smallDelta) {\r\n transp = 1.0;\r\n } else if (transp < smallDelta) {\r\n transp = 0.0;\r\n }\r\n\r\n return transp;\r\n}\r\n\r\n/** Defines overrides for selected aspects of a [[Feature]]'s symbology.\r\n * Any member defined in the appearance overrides that aspect of symbology for all [[Feature]]s to which the appearance is applied.\r\n *\r\n * The [[rgb]] and [[transparency]] overrides, if defined, apply to all geometry by default.\r\n * However, the color and transparency of \"linear\" geometry can optionally be controlled independently from the rest of the geometry via [[lineRgb]] and [[lineTransparency]].\r\n * Linear geometry consists of any of the following:\r\n * - Curves and line strings;\r\n * - Points and point strings; and\r\n * - The outlines of planar regions.\r\n * The edges of 3d surfaces like spheres are not considered linear geometry.\r\n *\r\n * @see [[FeatureOverrides]] to customize the appearance of multiple features.\r\n * @public\r\n */\r\nexport class FeatureAppearance {\r\n /** Overrides the feature's color.\r\n * If [[lineRgb]] is `undefined`, this color also applies to linear geometry.\r\n */\r\n public readonly rgb?: RgbColor;\r\n /** If defined, overrides the color of linear geometry independently of [[rgb]].\r\n * If `false`, linear geometry draws using its normal color; otherwise, it uses the specified color.\r\n */\r\n public readonly lineRgb?: RgbColor | false;\r\n /** The width of lines and edges in pixels as an integer in [1, 31]. */\r\n public readonly weight?: number;\r\n /** The transparency in the range [0, 1] where 0 indicates fully opaque and 1 indicates fully transparent.\r\n * If [[lineTransparency]] is `undefined`, this transparency also applies to linear geometry.\r\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\r\n */\r\n public readonly transparency?: number;\r\n /** If defined, overrides the transparency of linear geometry independently of [[transparency]].\r\n * If `false`, linear geometry draws using its normal transparency; otherwise, it uses the specified transparency.\r\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\r\n */\r\n public readonly lineTransparency?: number | false;\r\n /** The pixel pattern applied to lines and edges. */\r\n public readonly linePixels?: LinePixels;\r\n /** If true, don't apply the [[RenderMaterial]] to the feature's surfaces. */\r\n public readonly ignoresMaterial?: true;\r\n /** If true, the feature will not be drawn when using [Viewport.readPixels]($frontend), meaning [Tool]($frontend)s will not be able to interact with it. */\r\n public readonly nonLocatable?: true;\r\n /** If true, the feature will be rendered using the [[Hilite.Settings]] defined by [Viewport.emphasisSettings]($frontend) to make it stand out. */\r\n public readonly emphasized?: true;\r\n /** If true, then [[transparency]] and/or [[lineTransparency]] will only be applied if [[ViewFlags.transparency]] is enabled and the current [[RenderMode]] supports transparency.\r\n * Default: false, meaning the transparency will be applied regardless of view flags or render mode.\r\n * This property has no effect if this appearance does not override transparency.\r\n */\r\n public readonly viewDependentTransparency?: true;\r\n\r\n /** An appearance that overrides nothing. */\r\n public static readonly defaults = new FeatureAppearance({});\r\n\r\n public static fromJSON(props?: FeatureAppearanceProps) {\r\n if (!props || propsMatchDefaults(props)) {\r\n return this.defaults;\r\n }\r\n\r\n return new FeatureAppearance(props);\r\n }\r\n\r\n /** Create a FeatureAppearance that overrides only the RGB color.\r\n * @note The transparency component of the ColorDef is ignored.\r\n */\r\n public static fromRgb(color: ColorDef): FeatureAppearance {\r\n return new FeatureAppearance({ rgb: RgbColor.fromColorDef(color) });\r\n }\r\n\r\n /** Create a FeatureAppearance that overrides the RGB and transparency.\r\n * The appearance's transparency is derived from the transparency component of the ColorDef.\r\n */\r\n public static fromRgba(color: ColorDef, viewDependentTransparency = false): FeatureAppearance {\r\n return new FeatureAppearance({\r\n rgb: RgbColor.fromColorDef(color),\r\n transparency: color.colors.t / 255,\r\n viewDependentTransparency: viewDependentTransparency ? true : undefined,\r\n });\r\n }\r\n /** Create a FeatureAppearance that overrides only the transparency */\r\n public static fromTransparency(transparencyValue: number, viewDependent = false): FeatureAppearance {\r\n return new FeatureAppearance({\r\n transparency: transparencyValue,\r\n viewDependentTransparency: viewDependent ? true : undefined,\r\n });\r\n }\r\n\r\n /** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.\r\n * @note Subcategory overrides set [[viewDependentTransparency]] to `true`.\r\n */\r\n public static fromSubCategoryOverride(ovr: SubCategoryOverride): FeatureAppearance {\r\n const rgb = undefined !== ovr.color ? RgbColor.fromColorDef(ovr.color) : undefined;\r\n const transparency = ovr.transparency;\r\n const weight = ovr.weight;\r\n const ignoresMaterial = undefined !== ovr.material && Id64.isValid(ovr.material) ? true : undefined;\r\n return this.fromJSON({ rgb, transparency, weight, ignoresMaterial, viewDependentTransparency: true });\r\n }\r\n\r\n /** Returns true if this appearance does not override any aspects of symbology. */\r\n public get matchesDefaults(): boolean {\r\n return this.equals(FeatureAppearance.defaults);\r\n }\r\n\r\n public get overridesRgb(): boolean { return undefined !== this.rgb; }\r\n public get overridesTransparency(): boolean { return undefined !== this.transparency; }\r\n public get overridesLinePixels(): boolean { return undefined !== this.linePixels; }\r\n public get overridesWeight(): boolean { return undefined !== this.weight; }\r\n\r\n /** Get the color that will be applied to linear geometry, or undefined if not overridden.\r\n * This is the same as [[rgb]] if [[lineRgb]] is `undefined`.\r\n */\r\n public getLineRgb(): RgbColor | undefined {\r\n return false !== this.lineRgb ? (this.lineRgb ?? this.rgb) : undefined;\r\n }\r\n\r\n /** Get the transparency that will be applied to linear geometry, or undefined if not overridden.\r\n * This is the same as [[transparency]] if [[lineTransparency]] is `undefined`.\r\n */\r\n public getLineTransparency(): number | undefined {\r\n return false !== this.lineTransparency ? (this.lineTransparency ?? this.transparency) : undefined;\r\n }\r\n\r\n public get overridesSymbology(): boolean {\r\n return this.overridesRgb || this.overridesTransparency || this.overridesWeight || this.overridesLinePixels || !!this.ignoresMaterial\r\n || this.emphasized || this.overridesNonLocatable\r\n || undefined !== this.getLineRgb() || undefined !== this.getLineTransparency();\r\n }\r\n\r\n public get overridesNonLocatable(): boolean { return undefined !== this.nonLocatable; }\r\n\r\n public get isFullyTransparent(): boolean {\r\n const surf = this.transparency ?? 0;\r\n const line = this.getLineTransparency() ?? 0;\r\n return surf >= 1 && line >= 1;\r\n }\r\n\r\n /** Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). */\r\n public get anyOverridden(): boolean { return this.overridesSymbology || this.overridesNonLocatable; }\r\n\r\n public equals(other: FeatureAppearance): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return equalRgb(this.rgb, other.rgb)\r\n && this.weight === other.weight\r\n && equalTransparency(this.transparency, other.transparency)\r\n && this.linePixels === other.linePixels\r\n && this.ignoresMaterial === other.ignoresMaterial\r\n && this.nonLocatable === other.nonLocatable\r\n && this.emphasized === other.emphasized\r\n && this.viewDependentTransparency === other.viewDependentTransparency\r\n && equalLineTransparency(this.lineTransparency, other.lineTransparency)\r\n && equalLineRgb(this.lineRgb, other.lineRgb);\r\n }\r\n\r\n public toJSON(): FeatureAppearanceProps {\r\n const props: FeatureAppearanceProps = {};\r\n if (this.rgb)\r\n props.rgb = this.rgb.toJSON();\r\n\r\n if (undefined !== this.weight)\r\n props.weight = this.weight;\r\n\r\n if (undefined !== this.transparency) {\r\n props.transparency = this.transparency;\r\n if (this.viewDependentTransparency)\r\n props.viewDependentTransparency = true;\r\n }\r\n\r\n if (undefined !== this.linePixels)\r\n props.linePixels = this.linePixels;\r\n\r\n if (true === this.ignoresMaterial)\r\n props.ignoresMaterial = true;\r\n\r\n if (true === this.nonLocatable)\r\n props.nonLocatable = true;\r\n\r\n if (true === this.emphasized)\r\n props.emphasized = true;\r\n\r\n if (undefined !== this.lineTransparency)\r\n props.lineTransparency = this.lineTransparency;\r\n\r\n if (this.lineRgb) {\r\n props.lineRgb = this.lineRgb;\r\n if (this.viewDependentTransparency)\r\n props.viewDependentTransparency = true;\r\n }\r\n\r\n return props;\r\n }\r\n\r\n /** Convert this appearance to JSON, and override any properties explicitly specified by `changedProps` in the result.\r\n * Example:\r\n * ```ts\r\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\r\n * const clone = base.cloneProps({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\r\n * ```\r\n * @see [[FeatureAppearance.clone]].\r\n */\r\n public cloneProps(changedProps: FeatureAppearanceProps): FeatureAppearanceProps {\r\n return {\r\n ...this.toJSON(),\r\n ...changedProps,\r\n };\r\n }\r\n\r\n /** Create a copy of this appearance, overriding any properties explicitly specified by `changedProps`.\r\n * Example:\r\n * ```ts\r\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\r\n * const clone = base.clone({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\r\n * ```\r\n * @see [[FeatureAppearance.cloneProps]].\r\n */\r\n public clone(changedProps: FeatureAppearanceProps): FeatureAppearance {\r\n return FeatureAppearance.fromJSON(this.cloneProps(changedProps));\r\n }\r\n\r\n /** Produce a FeatureAppearance from the supplied appearance in which any aspect not defined by the base appearance is overridden by this appearance. */\r\n public extendAppearance(base: FeatureAppearance): FeatureAppearance {\r\n if (!this.overridesSymbology)\r\n return base;\r\n\r\n const props = base.toJSON();\r\n if (undefined === props.rgb)\r\n props.rgb = this.rgb;\r\n if (undefined === props.transparency)\r\n props.transparency = this.transparency;\r\n if (undefined === props.linePixels)\r\n props.linePixels = this.linePixels;\r\n if (undefined === props.weight)\r\n props.weight = this.weight;\r\n if (undefined === props.ignoresMaterial && this.ignoresMaterial)\r\n props.ignoresMaterial = true;\r\n if (undefined === props.nonLocatable && this.nonLocatable)\r\n props.nonLocatable = true;\r\n if (undefined === props.emphasized && this.emphasized)\r\n props.emphasized = true;\r\n if (!props.lineRgb)\r\n props.lineRgb = this.lineRgb;\r\n if (undefined === props.lineTransparency)\r\n props.lineTransparency = this.lineTransparency;\r\n\r\n if (this.viewDependentTransparency && (undefined !== props.transparency || undefined !== props.lineTransparency))\r\n props.viewDependentTransparency = true;\r\n\r\n return FeatureAppearance.fromJSON(props);\r\n }\r\n\r\n protected constructor(props: FeatureAppearanceProps) {\r\n this.rgb = undefined !== props.rgb ? RgbColor.fromJSON(props.rgb) : undefined;\r\n this.lineRgb = typeof props.lineRgb === \"object\" ? RgbColor.fromJSON(props.lineRgb) : (false === props.lineRgb ? false : undefined);\r\n\r\n this.transparency = transparencyFromJSON(props.transparency);\r\n this.lineTransparency = typeof props.lineTransparency === \"number\" ? transparencyFromJSON(props.lineTransparency) : (false === props.lineTransparency ? false : undefined);\r\n\r\n this.weight = props.weight;\r\n this.linePixels = props.linePixels;\r\n\r\n this.ignoresMaterial = props.ignoresMaterial;\r\n this.nonLocatable = props.nonLocatable;\r\n this.emphasized = props.emphasized;\r\n\r\n if (undefined !== this.weight) {\r\n this.weight = Math.max(1, Math.min(this.weight, 32));\r\n }\r\n\r\n if (props.viewDependentTransparency && (undefined !== this.transparency || undefined !== this.getLineTransparency())) {\r\n this.viewDependentTransparency = true;\r\n }\r\n }\r\n}\r\n\r\n/** Interface adopted by an object that can supply a [[FeatureAppearance]] given a low-level description of a [[Feature]].\r\n * @see [[FeatureOverrides]] for the commonly-used implementation.\r\n * @see [[FeatureAppearanceProvider]] to supplement the appearance supplied by this interface.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FeatureAppearanceSource {\r\n /** Supplies the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\r\n * The feature is described by its components for efficiency reasons.\r\n * @param elemLo The lower 32 bits of the feature's element Id.\r\n * @param elemHi The upper 32 bits of the feature's element Id.\r\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\r\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\r\n * @param geomClass The geometry class of the feature.\r\n * @param modelLo The lower 32 bits of the feature's model Id.\r\n * @param modelHi The upper 32 bits of the feature's model Id.\r\n * @param type The type of batch to which the feature belongs.\r\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\r\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\r\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\r\n */\r\n getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\r\n}\r\n\r\n/** Common options for [[FeatureOverrides.override]].\r\n * @public\r\n */\r\nexport interface OverrideFeatureAppearanceOptions {\r\n /** Specifies the aspects of the [[Feature]]'s appearance to be overridden. */\r\n appearance: FeatureAppearance;\r\n /** Specifies what to do if a [[FeatureAppearance]] has already been configured for the specified element, model, or subcategory by a previous call to [[FeatureOverrides.override]].\r\n * - \"subsume\" (the default): Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by the existing appearance will be overwritten\r\n * if also overridden by [[appearance]].\r\n * - The resulting appearance is computed as `existingAppearance.extendAppearance(newAppearance)`.\r\n * - \"extend\": Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by [[appearance]] will only\r\n * apply if that aspect is not already overridden by a previous appearance.\r\n * - The resulting appearance is computed as `newAppearance.extendAppearance(existingAppearance)`.\r\n * - \"replace\": Completely replace the existing appearance with [[appearance]].\r\n * - \"skip\": Keep the existing appearance.\r\n */\r\n onConflict?: \"extend\" | \"subsume\" | \"replace\" | \"skip\";\r\n}\r\n\r\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricModel]($backend).\r\n * @public\r\n */\r\nexport interface OverrideModelAppearanceOptions extends OverrideFeatureAppearanceOptions {\r\n /** The Id of the model whose appearance is to be overridden. */\r\n modelId: Id64String;\r\n elementId?: never;\r\n subCategoryId?: never;\r\n}\r\n\r\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricElement]($backend).\r\n * @public\r\n */\r\nexport interface OverrideElementAppearanceOptions extends OverrideFeatureAppearanceOptions {\r\n /** The Id of the element whose appearance is to be overridden. */\r\n elementId: Id64String;\r\n modelId?: never;\r\n subCategoryId?: never;\r\n}\r\n\r\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [SubCategory]($backend).\r\n * @public\r\n */\r\nexport interface OverrideSubCategoryAppearanceOptions extends OverrideFeatureAppearanceOptions {\r\n /** The Id of the subcategory whose appearance is to be overridden. */\r\n subCategoryId: Id64String;\r\n modelId?: never;\r\n elementId?: never;\r\n}\r\n\r\n/** Arguments supplied to [[FeatureOverrides.override]].\r\n * @public\r\n */\r\nexport type OverrideFeatureAppearanceArgs = OverrideElementAppearanceOptions | OverrideModelAppearanceOptions | OverrideSubCategoryAppearanceOptions;\r\n\r\n/** Arguments provided to a function of type [[IgnoreAnimationOverrides]].\r\n * @see [[FeatureOverrides.ignoreAnimationOverrides]] to register such a function.\r\n * @public\r\n */\r\nexport interface IgnoreAnimationOverridesArgs {\r\n /** The Id of the element under consideration.\r\n * @see [Id64.fromUint32Pair]($bentley) to convert a Uint32Pair into an [Id64String]($bentley), if needed.\r\n */\r\n readonly elementId: Readonly<Id64.Uint32Pair>;\r\n /** The [[RenderSchedule.ElementTimeline.batchId]] identifying the [[RenderSchedule.ElementTimeline]] to which the element under consideration belongs. */\r\n readonly animationNodeId: number;\r\n}\r\n\r\n/** A function that can be supplied to [[FeatureOverrides.ignoreAnimationOverrides]] to indicate whether the color or transparency overrides defined\r\n * by the view's [[RenderSchedule.Script]] should be ignored. The arguments describe the element under consideration. The function should return true if that\r\n * element should not have its color or transparency modified by the schedule script.\r\n * @public\r\n */\r\nexport type IgnoreAnimationOverrides = (args: IgnoreAnimationOverridesArgs) => boolean;\r\n\r\nconst scratchIgnoreAnimationOverridesArgs = {\r\n elementId: { lower: 0, upper: 0 },\r\n animationNodeId: 0,\r\n};\r\n\r\n/** Specifies how to customize the appearance of individual [[Feature]]s, typically within the context of a [Viewport]($frontend).\r\n * Individual aspects of a feature's appearance - like visibility, color, and transparency - are overridden by supplying a [[FeatureAppearance]].\r\n * Those overrides can be specified on the basis of the feature's model, element, and/or subcategory. A default set of overrides can also be specified to\r\n * apply to the appearance of any feature not otherwise overridden.\r\n *\r\n * It is possible to override multiple aspects of a feature on different bases. For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red,\r\n * and that all features belonging to model \"B\" should be drawn 50% transparent. In this case, a feature belonging to both subcategory \"A\" and model \"B\" will be drawn as 50% transparent red -\r\n * the separate overrides are combined to produce the feature's overall appearance.\r\n *\r\n * In the case of conflicts, there is an order of precedence:\r\n * - Model overrides take highest precedence.\r\n * - Element overrides are of higher precedence than subcategory and animation overrides.\r\n * - Overrides applied by a [[RenderSchedule.Script]]'s [[RenderSchedule.ElementTimeline]] are of higher precedence than subcategory overrides, but can be suppressed on a per-element basis via [[ignoreAnimationOverrides]].\r\n * - Subcategory overrides have lowest precedence.\r\n *\r\n * For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red, and all those belonging to model \"B\" should be drawn in green.\r\n * Then a feature belonging to subcategory \"A\" and model \"B\" will be drawn in green, because the model overrides take precedence.\r\n *\r\n * Instances of this class are not typically instantiated by an application directly; instead, an application can implement a [FeatureOverrideProvider]($frontend)\r\n * that augments the overrides supplied by a viewport.\r\n *\r\n * @see [FeatureSymbology.Overrides]($frontend) to create overrides specific to a [Viewport]($frontend) or [ViewState]($frontend).\r\n * @see [FeatureOverrideProvider]($frontend) to customize the appearance of features within a [Viewport]($frontend).\r\n * @public\r\n */\r\nexport class FeatureOverrides implements FeatureAppearanceSource {\r\n /** @internal */\r\n private readonly _ignoreAnimationOverrides: IgnoreAnimationOverrides[] = [];\r\n /** Ids of elements that should never be drawn. This takes precedence over [[alwaysDrawn]]. @internal */\r\n private readonly _neverDrawn = new Id64.Uint32Set();\r\n /** Ids of elements that should always be drawn. [[neverDrawn]] takes precedence over this set. @internal */\r\n private readonly _alwaysDrawn = new Id64.Uint32Set();\r\n /** If true, no elements *except* those defined in the \"always drawn\" set will be drawn.\r\n * @see [[setAlwaysDrawn]]\r\n */\r\n public isAlwaysDrawnExclusive = false;\r\n /** If true, the always-drawn elements are drawn even if their subcategories are not visible.\r\n * @see [[setAlwaysDrawn]]\r\n */\r\n public alwaysDrawnIgnoresSubCategory = true;\r\n /** If true, all subcategories are considered visible. This is used for drawing sheets via section callouts in the absence of an actual sheet view.\r\n */\r\n public ignoreSubCategory = false;\r\n\r\n /** Overrides applied to any feature not explicitly overridden. @internal */\r\n private _defaultOverrides = FeatureAppearance.defaults;\r\n /** Whether construction geometry should be drawn. */\r\n protected _constructions = false;\r\n /** Whether dimensions should be drawn. */\r\n protected _dimensions = false;\r\n /** Whether area patterns should be drawn. */\r\n protected _patterns = false;\r\n /** Whether line weights should be applied. If false, all lines are rendered 1-pixel wide. */\r\n protected _lineWeights = true;\r\n\r\n /** Overrides applied to all elements belonging to each model. @internal */\r\n private readonly _modelOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** Overrides applied to specific elements. */\r\n protected readonly _elementOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** Overrides applied to geometry belonging to each subcategory. */\r\n protected readonly _subCategoryOverrides = new Id64.Uint32Map<FeatureAppearance>();\r\n /** The set of displayed subcategories. Geometry belonging to subcategories not included in this set will not be drawn. */\r\n protected readonly _visibleSubCategories = new Id64.Uint32Set();\r\n /** Display priorities assigned to subcategories, possibly overridden by display style. Only applicable for plan projection models. */\r\n protected readonly _subCategoryPriorities = new Id64.Uint32Map<number>();\r\n\r\n /** Per-model, a set of subcategories whose visibility should be inverted for elements within that model.\r\n * Populated by Viewport.\r\n */\r\n protected readonly _modelSubCategoryOverrides = new Id64.Uint32Map<Id64.Uint32Set>();\r\n\r\n /** Ids of animation nodes that should never be drawn. */\r\n public readonly neverDrawnAnimationNodes = new Set<number>();\r\n /** Mapping of animation node Ids to overrides applied to the corresponding animation nodes.\r\n * @internal\r\n */\r\n public readonly animationNodeOverrides = new Map<number, FeatureAppearance>();\r\n\r\n /** Accepts a criterion that determines whether color and transparency overrides originating from the view's [[RenderSchedule.Script]] should be ignored for a given element.\r\n * The function receives a description of the element in question and returns `true` if the script's overrides should be ignored.\r\n * Any number of such functions can be registered; if any one of them returns `true`, the script's overrides are not applied to the specified element.\r\n *\r\n * For example, applications commonly emphasize a set of elements by applying a [[FeatureAppearance.emphasized]] override to them, and specifying a highly-transparent\r\n * default appearance to de-emphasize the rest of the elements in the view. If some of the de-emphasized elements' appearances are also being overridden by the schedule script, then\r\n * they won't appear de-emphasized, making it difficult for the emphasized elements to stand out. In situations like this, [FeatureOverrideProvider]($frontend)s like [EmphasizeElements]($frontend) can register an [[IgnoreAnimationOverrides]] function that returns true if the element in question is not in the set of emphasized elements.\r\n */\r\n public ignoreAnimationOverrides(ignore: IgnoreAnimationOverrides): void {\r\n this._ignoreAnimationOverrides.push(ignore);\r\n }\r\n\r\n /** Overrides applied to features for which no other overrides are defined */\r\n public get defaultOverrides(): FeatureAppearance { return this._defaultOverrides; }\r\n /** Whether or not line weights are applied. If false, all lines are drawn with a weight of 1. */\r\n public get lineWeights(): boolean { return this._lineWeights; }\r\n\r\n /** A set of elements that are always invisible.\r\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\r\n */\r\n public get neverDrawn() { return this._neverDrawn; }\r\n /** A set of elements that are unconditionally displayed.\r\n * @see [[isAlwaysDrawnExclusive]] to specify that *only* elements in this set will be displayed.\r\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\r\n */\r\n public get alwaysDrawn() { return this._alwaysDrawn; }\r\n\r\n private isNeverDrawn(elemIdLo: number, elemIdHi: number, animationNodeId: number): boolean {\r\n if (this._neverDrawn.has(elemIdLo, elemIdHi))\r\n return true;\r\n else\r\n return this.neverDrawnAnimationNodes.has(animationNodeId);\r\n }\r\n\r\n private isAlwaysDrawn(idLo: number, idHi: number): boolean { return this._alwaysDrawn.has(idLo, idHi); }\r\n\r\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories. */\r\n public isSubCategoryVisible(idLo: number, idHi: number): boolean { return this._visibleSubCategories.has(idLo, idHi); }\r\n\r\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories in the context of the specified model. */\r\n public isSubCategoryVisibleInModel(subcatLo: number, subcatHi: number, modelLo: number, modelHi: number): boolean {\r\n if (this.ignoreSubCategory)\r\n return true;\r\n\r\n let vis = this.isSubCategoryVisible(subcatLo, subcatHi);\r\n const modelOvr = this._modelSubCategoryOverrides.get(modelLo, modelHi);\r\n if (undefined !== modelOvr && modelOvr.has(subcatLo, subcatHi))\r\n vis = !vis;\r\n\r\n return vis;\r\n }\r\n\r\n private getModelOverrides(idLo: number, idHi: number): FeatureAppearance | undefined {\r\n return this._modelOverrides.get(idLo, idHi);\r\n }\r\n\r\n private getElementAnimationOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\r\n if (this.animationNodeOverrides.size === 0)\r\n return undefined;\r\n\r\n // NB: An animation node Id of zero means \"not animated\". Some providers like EmphasizeElements may provide an appearance override for unanimated nodes.\r\n // That should be preserved.\r\n const app = this.animationNodeOverrides.get(animationNodeId);\r\n if (!app || 0 === animationNodeId || this._ignoreAnimationOverrides.length === 0)\r\n return app;\r\n\r\n const args = scratchIgnoreAnimationOverridesArgs;\r\n args.elementId.lower = idLo;\r\n args.elementId.upper = idHi;\r\n args.animationNodeId = animationNodeId;\r\n return this._ignoreAnimationOverrides.some((ignore) => ignore(args)) ? undefined : app;\r\n }\r\n\r\n private getElementOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\r\n const elemApp = this._elementOverrides.get(idLo, idHi);\r\n const nodeApp = this.getElementAnimationOverrides(idLo, idHi, animationNodeId);\r\n if (elemApp)\r\n return nodeApp ? nodeApp.extendAppearance(elemApp) : elemApp;\r\n\r\n return nodeApp;\r\n }\r\n\r\n private getSubCategoryOverrides(idLo: number, idHi: number): FeatureAppearance | undefined { return this._subCategoryOverrides.get(idLo, idHi); }\r\n\r\n /** Add a [SubCategory]($backend) to the set of visible subcategories. */\r\n public setVisibleSubCategory(id: Id64String): void { this._visibleSubCategories.addId(id); }\r\n /** Specify the Id of an element that should never be drawn. */\r\n public setNeverDrawn(id: Id64String): void { this._neverDrawn.addId(id); }\r\n /** Specify the Id of an element that should always be drawn. */\r\n public setAlwaysDrawn(id: Id64String): void { this._alwaysDrawn.addId(id); }\r\n /** Specify the Id of a animation node that should never be drawn. */\r\n public setAnimationNodeNeverDrawn(id: number): void { this.neverDrawnAnimationNodes.add(id); }\r\n /** Specify the Ids of elements that should never be drawn. */\r\n public setNeverDrawnSet(ids: Iterable<Id64String>) { copyIdSetToUint32Set(this._neverDrawn, ids); }\r\n /** Specify the Ids of elements that should always be drawn. */\r\n public setAlwaysDrawnSet(ids: Iterable<Id64String>, exclusive: boolean, ignoreSubCategory = true) {\r\n copyIdSetToUint32Set(this._alwaysDrawn, ids);\r\n this.isAlwaysDrawnExclusive = exclusive;\r\n this.alwaysDrawnIgnoresSubCategory = ignoreSubCategory;\r\n }\r\n\r\n /** Returns the feature's appearance overrides, or undefined if the feature is not visible. */\r\n public getFeatureAppearance(feature: Feature, modelId: Id64String, type: BatchType = BatchType.Primary, animationNodeId = 0): FeatureAppearance | undefined {\r\n return this.getAppearance(\r\n Id64.getLowerUint32(feature.elementId), Id64.getUpperUint32(feature.elementId),\r\n Id64.getLowerUint32(feature.subCategoryId), Id64.getUpperUint32(feature.subCategoryId),\r\n feature.geometryClass,\r\n Id64.getLowerUint32(modelId), Id64.getUpperUint32(modelId),\r\n type, animationNodeId);\r\n }\r\n\r\n private static readonly _weight1Appearance = FeatureAppearance.fromJSON({ weight: 1 });\r\n\r\n /** Returns a feature's appearance overrides, or undefined if the feature is not visible.\r\n * Takes Id64s as pairs of unsigned 32-bit integers for efficiency, because that is how they are stored by the PackedFeatureTable associated with each batch of graphics.\r\n * @see [[getFeatureAppearance]] for an equivalent function that accepts [Id64String]($core-bentley)s instead of integer pairs.\r\n */\r\n public getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined {\r\n if (BatchType.VolumeClassifier === type || BatchType.PlanarClassifier === type)\r\n return this.getClassifierAppearance(elemLo, elemHi, subcatLo, subcatHi, modelLo, modelHi, animationNodeId);\r\n\r\n let app = !this._lineWeights ? FeatureOverrides._weight1Appearance : FeatureAppearance.defaults;\r\n const modelApp = this.getModelOverrides(modelLo, modelHi);\r\n if (undefined !== modelApp)\r\n app = modelApp.extendAppearance(app);\r\n\r\n // Is the element visible?\r\n let elemApp, alwaysDrawn = false;\r\n\r\n if (Id64.isValidUint32Pair(elemLo, elemHi)) {\r\n if (this.isNeverDrawn(elemLo, elemHi, animationNodeId))\r\n return undefined;\r\n\r\n alwaysDrawn = this.isAlwaysDrawn(elemLo, elemHi);\r\n if (!alwaysDrawn && this.isAlwaysDrawnExclusive)\r\n return undefined;\r\n\r\n // Element overrides take precedence\r\n elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\r\n if (undefined !== elemApp)\r\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\r\n }\r\n\r\n let subCatApp;\r\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\r\n if ((!alwaysDrawn || !this.alwaysDrawnIgnoresSubCategory) && !this.isSubCategoryVisibleInModel(subcatLo, subcatHi, modelLo, modelHi))\r\n return undefined;\r\n\r\n subCatApp = this.getSubCategoryOverrides(subcatLo, subcatHi);\r\n if (undefined !== subCatApp)\r\n app = subCatApp.extendAppearance(app);\r\n }\r\n\r\n // Only apply default if *no* appearance was explicitly registered (doesn't matter if registered appearance does not actually override anything)\r\n if (undefined === elemApp && undefined === modelApp && undefined === subCatApp)\r\n app = this._defaultOverrides.extendAppearance(app);\r\n\r\n let visible = alwaysDrawn || this.isClassVisible(geomClass);\r\n if (visible && app.isFullyTransparent)\r\n visible = false; // don't bother rendering something with full transparency...\r\n\r\n return visible ? app : undefined;\r\n }\r\n\r\n /** Classifiers behave totally differently...in particular they are never invisible unless fully-transparent. */\r\n private getClassifierAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, modelLo: number, modelHi: number, animationNodeId: number): FeatureAppearance | undefined {\r\n let app = FeatureAppearance.defaults;\r\n const modelApp = this.getModelOverrides(modelLo, modelHi);\r\n if (undefined !== modelApp)\r\n app = modelApp.extendAppearance(app);\r\n\r\n const elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\r\n if (undefined !== elemApp)\r\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\r\n\r\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\r\n const subCat = this.getSubCategoryOverrides(subcatLo, subcatHi);\r\n if (undefined !== subCat)\r\n app = subCat.extendAppearance(app);\r\n }\r\n\r\n if (undefined === elemApp && undefined === modelApp)\r\n app = this._defaultOverrides.extendAppearance(app);\r\n\r\n // NB: A fully-transparent classifier means the classifier is a clip mask - classified pixels will be discarded.\r\n return app;\r\n }\r\n\r\n /** Return whether geometry of the specified class should be drawn.\r\n * @see [[ViewFlags.constructions]], [[ViewFlags.dimensions]], and [[ViewFlags.patterns]].\r\n */\r\n public isClassVisible(geomClass: GeometryClass): boolean {\r\n switch (geomClass) {\r\n case GeometryClass.Construction: return this._constructions;\r\n case GeometryClass.Dimension: return this._dimensions;\r\n case GeometryClass.Pattern: return this._patterns;\r\n default: return true;\r\n }\r\n }\r\n\r\n /** Specify overrides for all elements belonging to a specified [GeometricModel]($backend), or all geometry belonging to a specified [GeometricElement]($backend) or [SubCategory]($backend). */\r\n public override(args: OverrideFeatureAppearanceArgs): void {\r\n let id: Id64String;\r\n let map: Id64.Uint32Map<FeatureAppearance>;\r\n if (undefined !== args.elementId) {\r\n id = args.elementId;\r\n map = this._elementOverrides;\r\n } else if (undefined !== args.modelId) {\r\n id = args.modelId;\r\n map = this._modelOverrides;\r\n } else {\r\n id = args.subCategoryId;\r\n map = this._subCategoryOverrides;\r\n }\r\n\r\n let app = args.appearance;\r\n const idLo = Id64.getLowerUint32(id);\r\n const idHi = Id64.getUpperUint32(id);\r\n\r\n if (undefined !== args.elementId && this.isNeverDrawn(idLo, idHi, 0))\r\n return;\r\n\r\n const replace = \"replace\" === args.onConflict;\r\n const existing = replace ? undefined : map.get(idLo, idHi);\r\n if (existing) {\r\n assert(\"replace\" !== args.onConflict);\r\n switch (args.onConflict) {\r\n case \"skip\":\r\n return;\r\n case \"extend\":\r\n app = app.extendAppearance(existing);\r\n break;\r\n default:\r\n app = existing.extendAppearance(app);\r\n break;\r\n }\r\n }\r\n\r\n map.set(idLo, idHi, app);\r\n }\r\n\r\n /** Specify overrides for all geometry originating from the specified animation node.\r\n * @param id The Id of the animation node.\r\n * @param app The symbology overrides.\r\n * @note These overrides do not take precedence over element overrides.\r\n */\r\n public overrideAnimationNode(id: number, app: FeatureAppearance): void {\r\n this.animationNodeOverrides.set(id, app);\r\n }\r\n\r\n /** Defines a default appearance to be applied to any [[Feature]] *not* explicitly overridden.\r\n * @param appearance The symbology overrides.\r\n * @param replaceExisting Specifies whether to replace the current default overrides if they are already defined.\r\n */\r\n public setDefaultOverrides(appearance: FeatureAppearance, replaceExisting: boolean = true): void {\r\n if (replaceExisting || !appearance.overridesSymbology)\r\n this._defaultOverrides = appearance;\r\n }\r\n\r\n /** Get the display priority of a subcategory. This is only relevant when using [[PlanProjectionSettings]]. */\r\n public getSubCategoryPriority(idLo: number, idHi: number): number {\r\n return this._subCategoryPriorities.get(idLo, idHi) ?? 0;\r\n }\r\n\r\n /** Adds all fully transparent elements to the _neverDrawn set. This is used for BatchedModels planar masks. */\r\n public addInvisibleElementOverridesToNeverDrawn(): void {\r\n this._elementOverrides.forEach((lo, hi) => {\r\n const app = this.getElementOverrides(lo, hi, 0);\r\n if (app?.isFullyTransparent)\r\n this._neverDrawn.add(lo, hi);\r\n });\r\n }\r\n\r\n /** Construct a new Overrides that overrides nothing.\r\n * @see [FeatureSymbology.Overrides]($frontend) to construct overrides based on a [ViewState]($frontend) or [Viewport]($frontend).\r\n */\r\n public constructor() {\r\n //\r\n }\r\n\r\n /** Returns true if geometry belonging to the specified subcategory will be drawn. */\r\n public isSubCategoryIdVisible(id: Id64String): boolean { return this.isSubCategoryVisible(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\r\n /** Returns the overrides applied to geometry belonging to the specified model, if any such are defined. */\r\n public getModelOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getModelOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\r\n /** Returns the overrides applied to geometry belonging to the specified element, if any such are defined. */\r\n public getElementOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getElementOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id), 0); }\r\n /** Returns the overrides applied to geometry belonging to the specified subcategory, if any such are defined. */\r\n public getSubCategoryOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getSubCategoryOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\r\n\r\n /** Returns true if the specified Feature will be drawn. */\r\n public isFeatureVisible(feature: Feature): boolean {\r\n const { elementId, subCategoryId, geometryClass } = feature;\r\n const isValidElemId = !Id64.isInvalid(elementId);\r\n const elemIdParts = isValidElemId ? Id64.getUint32Pair(elementId) : undefined;\r\n\r\n if (undefined !== elemIdParts && this.isNeverDrawn(elemIdParts.lower, elemIdParts.upper, 0))\r\n return false;\r\n\r\n const alwaysDrawn = undefined !== elemIdParts && this.isAlwaysDrawn(elemIdParts.lower, elemIdParts.upper);\r\n if (alwaysDrawn || this.isAlwaysDrawnExclusive)\r\n return alwaysDrawn;\r\n\r\n // NB: This ignores per-model subcategory visibility overrides, because caller did not specify a model.\r\n if (!this.isSubCategoryIdVisible(subCategoryId))\r\n return false;\r\n\r\n return this.isClassVisible(geometryClass);\r\n }\r\n}\r\n\r\n/** Interface adopted by an object that can supply the [[FeatureAppearance]] supplied by a [[FeatureAppearanceSource]].\r\n * This is useful for selectively overriding or agumenting a [Viewport]($frontend)'s symbology overrides.\r\n * A typical implementation will invoke [[FeatureAppearanceSource.getAppearance]] and customize the returned appearance.\r\n * @see [[FeatureAppearanceProvider.chain]] to chain two providers together.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FeatureAppearanceProvider {\r\n /** Supply the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\r\n * The feature is described by its components for efficiency reasons.\r\n * @param source The base symbology overrides, e.g., typically defined by a [Viewport]($frontend).\r\n * @param elemLo The lower 32 bits of the feature's element Id.\r\n * @param elemHi The upper 32 bits of the feature's element Id.\r\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\r\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\r\n * @param geomClass The geometry class of the feature.\r\n * @param modelLo The lower 32 bits of the feature's model Id.\r\n * @param modelHi The upper 32 bits of the feature's model Id.\r\n * @param type The type of batch to which the feature belongs.\r\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\r\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\r\n * @see [[FeatureAppearanceSource.getAppearance]] to forward the request to the source.\r\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\r\n */\r\n getFeatureAppearance(source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\r\n}\r\n\r\n/** @public */\r\nexport namespace FeatureAppearanceProvider {\r\n /** Produce a FeatureAppearanceSource for which `getAppearance()` returns the appearance specified in `source`, potentially modified by `provider`. */\r\n function wrap(source: FeatureAppearanceSource, provider: FeatureAppearanceProvider): FeatureAppearanceSource {\r\n return {\r\n getAppearance: (elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\r\n return provider.getFeatureAppearance(source, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n },\r\n };\r\n }\r\n\r\n /** Create a provider that obtains each feature's appearance from the source, and if the feature is visible, modifies the appearance.\r\n * @param supplementAppearance A function accepting the feature's base appearance and returning a supplemental appearance.\r\n * @public\r\n */\r\n export function supplement(supplementAppearance: (appearance: FeatureAppearance) => FeatureAppearance): FeatureAppearanceProvider {\r\n return {\r\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\r\n const app = source.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n return app ? supplementAppearance(app) : app;\r\n },\r\n };\r\n }\r\n\r\n /** Chain two FeatureAppearanceProviders together such that `first`'s `getFeatureAppearance` function is applied before `second`'s.\r\n * If `second` invokes `source.getAppearance()`, the returned appearance will include any modifications applied by `first`.\r\n * @public\r\n */\r\n export function chain(first: FeatureAppearanceProvider, second: FeatureAppearanceProvider): FeatureAppearanceProvider {\r\n if (first === second)\r\n return first;\r\n\r\n return {\r\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\r\n return second.getFeatureAppearance(wrap(source, first), elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n },\r\n };\r\n }\r\n}\r\n"]}
|