@itwin/core-common 5.0.0-dev.8 → 5.0.0-dev.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -1
- package/lib/cjs/AmbientOcclusion.js +17 -9
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.d.ts +0 -3
- package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
- package/lib/cjs/AnalysisStyle.js +20 -4
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js +39 -21
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js +4 -0
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js +19 -0
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/BlobReader.js +8 -6
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.d.ts +2 -2
- package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js +3 -0
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/ChangesetProps.d.ts +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js +31 -5
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.d.ts +0 -5
- package/lib/cjs/Code.d.ts.map +1 -1
- package/lib/cjs/Code.js +16 -11
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorDef.js +11 -10
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts +37 -1
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.js +16 -3
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js +53 -27
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js +40 -5
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +95 -63
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlReader.d.ts +2 -0
- package/lib/cjs/ECSqlReader.d.ts.map +1 -1
- package/lib/cjs/ECSqlReader.js +56 -50
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js +7 -3
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EntityProps.js +31 -0
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/Environment.js +25 -2
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js +15 -6
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts +25 -73
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +88 -103
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.d.ts +6 -108
- package/lib/cjs/FeatureTable.d.ts.map +1 -1
- package/lib/cjs/FeatureTable.js +13 -329
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.d.ts +68 -10
- package/lib/cjs/Fonts.d.ts.map +1 -1
- package/lib/cjs/Fonts.js +19 -4
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js +2 -2
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
- package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +2 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryParams.js +58 -0
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/Gradient.d.ts +3 -4
- package/lib/cjs/Gradient.d.ts.map +1 -1
- package/lib/cjs/Gradient.js +21 -19
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js +14 -12
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js +8 -2
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js +6 -0
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js +6 -0
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.d.ts +17 -18
- package/lib/cjs/HiddenLine.d.ts.map +1 -1
- package/lib/cjs/HiddenLine.js +24 -5
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js +10 -0
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.d.ts +3 -12
- package/lib/cjs/IModel.d.ts.map +1 -1
- package/lib/cjs/IModel.js +47 -23
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.d.ts +0 -2
- package/lib/cjs/IModelError.d.ts.map +1 -1
- package/lib/cjs/IModelError.js +3 -8
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js +4 -0
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinError.d.ts +1 -1
- package/lib/cjs/ITwinError.d.ts.map +1 -1
- package/lib/cjs/ITwinError.js +1 -1
- package/lib/cjs/ITwinError.js.map +1 -1
- package/lib/cjs/Image.d.ts +22 -8
- package/lib/cjs/Image.d.ts.map +1 -1
- package/lib/cjs/Image.js +20 -4
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.d.ts +2 -0
- package/lib/cjs/IpcAppProps.d.ts.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js +39 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/Localization.d.ts +0 -10
- package/lib/cjs/Localization.d.ts.map +1 -1
- package/lib/cjs/Localization.js +0 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js +3 -2
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.d.ts +20 -0
- package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
- package/lib/cjs/MapLayerSettings.js +50 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.d.ts +2 -0
- package/lib/cjs/MassProperties.d.ts.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js +6 -0
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js +4 -0
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
- package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js +8 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.d.ts +0 -12
- package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
- package/lib/cjs/PlanarClipMask.js +24 -2
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.d.ts +5 -5
- package/lib/cjs/QPoint.d.ts.map +1 -1
- package/lib/cjs/QPoint.js +37 -29
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js +81 -4
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.d.ts +0 -43
- package/lib/cjs/RenderMaterial.d.ts.map +1 -1
- package/lib/cjs/RenderMaterial.js +6 -51
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.d.ts +36 -0
- package/lib/cjs/RenderPolyline.d.ts.map +1 -0
- package/lib/cjs/RenderPolyline.js +26 -0
- package/lib/cjs/RenderPolyline.js.map +1 -0
- package/lib/cjs/RenderSchedule.d.ts +1 -2
- package/lib/cjs/RenderSchedule.d.ts.map +1 -1
- package/lib/cjs/RenderSchedule.js +138 -11
- package/lib/cjs/RenderSchedule.js.map +1 -1
- package/lib/cjs/RenderTexture.d.ts +5 -23
- package/lib/cjs/RenderTexture.d.ts.map +1 -1
- package/lib/cjs/RenderTexture.js +13 -16
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js +3 -0
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.d.ts.map +1 -1
- package/lib/cjs/RpcInterface.js +7 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/SkyBox.js +17 -4
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarShadows.js +5 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js +19 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js +35 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js +16 -2
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.d.ts +0 -7
- package/lib/cjs/TerrainSettings.d.ts.map +1 -1
- package/lib/cjs/TerrainSettings.js +19 -0
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.d.ts +17 -14
- package/lib/cjs/TextureMapping.d.ts.map +1 -1
- package/lib/cjs/TextureMapping.js +47 -19
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js +53 -2
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.d.ts +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/Tween.js +28 -19
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/ViewDetails.js +10 -6
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.d.ts +1 -3
- package/lib/cjs/ViewFlags.d.ts.map +1 -1
- package/lib/cjs/ViewFlags.js +86 -5
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.d.ts +0 -4
- package/lib/cjs/ViewProps.d.ts.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js +10 -0
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js +27 -6
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js +65 -19
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.d.ts +1 -2
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +1 -2
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js +12 -0
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js +17 -0
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js +4 -0
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js +23 -20
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +26 -8
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js +1 -0
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js +100 -0
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js +19 -6
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js +10 -0
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js +14 -0
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js +6 -0
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js +75 -0
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js +18 -0
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
- package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
- package/lib/cjs/internal/BackendTypes.js.map +1 -0
- package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
- package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
- package/lib/cjs/internal/PackedFeatureTable.js +359 -0
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
- package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
- package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
- package/lib/cjs/internal/RenderMaterialParams.js +68 -0
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
- package/lib/cjs/internal/RenderMesh.d.ts +52 -0
- package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
- package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
- package/lib/cjs/internal/RenderMesh.js.map +1 -0
- package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
- package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
- package/lib/cjs/internal/RenderTextureParams.js +37 -0
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +5 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +16 -0
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js +1 -0
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.d.ts +2 -0
- package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js +7 -6
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js +1 -4
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js +29 -38
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
- package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js +29 -31
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js +15 -8
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
- package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js +51 -29
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js +2 -0
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
- package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js +7 -0
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js +3 -0
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js +4 -3
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js +8 -0
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
- package/lib/cjs/tile/IModelTileIO.js +26 -3
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js +5 -0
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js +2 -0
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +9 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js +17 -9
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.d.ts +0 -3
- package/lib/esm/AnalysisStyle.d.ts.map +1 -1
- package/lib/esm/AnalysisStyle.js +20 -4
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js +39 -21
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js +4 -0
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js +19 -0
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/BlobReader.js +8 -6
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.d.ts +2 -2
- package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js +3 -0
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/ChangesetProps.d.ts +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js +31 -5
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.d.ts +0 -5
- package/lib/esm/Code.d.ts.map +1 -1
- package/lib/esm/Code.js +16 -11
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorDef.js +11 -10
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +37 -1
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.js +16 -3
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js +53 -27
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js +40 -5
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +95 -63
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlReader.d.ts +2 -0
- package/lib/esm/ECSqlReader.d.ts.map +1 -1
- package/lib/esm/ECSqlReader.js +56 -50
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js +8 -4
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EntityProps.js +31 -0
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/Environment.js +25 -2
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js +15 -6
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts +25 -73
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +88 -103
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.d.ts +6 -108
- package/lib/esm/FeatureTable.d.ts.map +1 -1
- package/lib/esm/FeatureTable.js +11 -324
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.d.ts +68 -10
- package/lib/esm/Fonts.d.ts.map +1 -1
- package/lib/esm/Fonts.js +19 -4
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js +2 -2
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.d.ts +1 -0
- package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/esm/GeoCoordinateServices.js +2 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryParams.js +58 -0
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/Gradient.d.ts +3 -4
- package/lib/esm/Gradient.d.ts.map +1 -1
- package/lib/esm/Gradient.js +21 -19
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js +14 -12
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js +8 -2
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js +6 -0
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js +6 -0
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.d.ts +17 -18
- package/lib/esm/HiddenLine.d.ts.map +1 -1
- package/lib/esm/HiddenLine.js +24 -5
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js +10 -0
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.d.ts +3 -12
- package/lib/esm/IModel.d.ts.map +1 -1
- package/lib/esm/IModel.js +47 -23
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.d.ts +0 -2
- package/lib/esm/IModelError.d.ts.map +1 -1
- package/lib/esm/IModelError.js +2 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js +4 -0
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinError.d.ts +1 -1
- package/lib/esm/ITwinError.d.ts.map +1 -1
- package/lib/esm/ITwinError.js +1 -1
- package/lib/esm/ITwinError.js.map +1 -1
- package/lib/esm/Image.d.ts +22 -8
- package/lib/esm/Image.d.ts.map +1 -1
- package/lib/esm/Image.js +19 -4
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.d.ts +2 -0
- package/lib/esm/IpcAppProps.d.ts.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js +39 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/Localization.d.ts +0 -10
- package/lib/esm/Localization.d.ts.map +1 -1
- package/lib/esm/Localization.js +0 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js +3 -2
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.d.ts +20 -0
- package/lib/esm/MapLayerSettings.d.ts.map +1 -1
- package/lib/esm/MapLayerSettings.js +50 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.d.ts +2 -0
- package/lib/esm/MassProperties.d.ts.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/ModelClipGroup.js +6 -0
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js +4 -0
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.d.ts +1 -2
- package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
- package/lib/esm/PlanProjectionSettings.js +8 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.d.ts +0 -12
- package/lib/esm/PlanarClipMask.d.ts.map +1 -1
- package/lib/esm/PlanarClipMask.js +24 -2
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.d.ts +5 -5
- package/lib/esm/QPoint.d.ts.map +1 -1
- package/lib/esm/QPoint.js +37 -29
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js +81 -4
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.d.ts +0 -43
- package/lib/esm/RenderMaterial.d.ts.map +1 -1
- package/lib/esm/RenderMaterial.js +6 -51
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.d.ts +36 -0
- package/lib/esm/RenderPolyline.d.ts.map +1 -0
- package/lib/esm/RenderPolyline.js +23 -0
- package/lib/esm/RenderPolyline.js.map +1 -0
- package/lib/esm/RenderSchedule.d.ts +1 -2
- package/lib/esm/RenderSchedule.d.ts.map +1 -1
- package/lib/esm/RenderSchedule.js +138 -11
- package/lib/esm/RenderSchedule.js.map +1 -1
- package/lib/esm/RenderTexture.d.ts +5 -23
- package/lib/esm/RenderTexture.d.ts.map +1 -1
- package/lib/esm/RenderTexture.js +13 -16
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js +3 -0
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.d.ts.map +1 -1
- package/lib/esm/RpcInterface.js +8 -2
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/SkyBox.js +17 -4
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarShadows.js +5 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js +19 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js +35 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js +16 -2
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.d.ts +0 -7
- package/lib/esm/TerrainSettings.d.ts.map +1 -1
- package/lib/esm/TerrainSettings.js +19 -0
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.d.ts +17 -14
- package/lib/esm/TextureMapping.d.ts.map +1 -1
- package/lib/esm/TextureMapping.js +47 -19
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/ThematicDisplay.js +53 -2
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.d.ts +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/Tween.js +28 -19
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/ViewDetails.js +10 -6
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.d.ts +1 -3
- package/lib/esm/ViewFlags.d.ts.map +1 -1
- package/lib/esm/ViewFlags.js +86 -5
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.d.ts +0 -4
- package/lib/esm/ViewProps.d.ts.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js +10 -0
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js +27 -6
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js +65 -19
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.d.ts +1 -2
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +1 -2
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js +12 -0
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js +17 -0
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js +4 -0
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js +23 -20
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +26 -8
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js +54 -108
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js +1 -0
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js +100 -0
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js +19 -6
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js +10 -0
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js +14 -0
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js +6 -0
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js +75 -0
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js +18 -0
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
- package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
- package/lib/esm/internal/BackendTypes.js.map +1 -0
- package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
- package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
- package/lib/esm/internal/PackedFeatureTable.js +352 -0
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
- package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
- package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
- package/lib/esm/internal/RenderMaterialParams.js +64 -0
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
- package/lib/esm/internal/RenderMesh.d.ts +52 -0
- package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
- package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
- package/lib/esm/internal/RenderMesh.js.map +1 -0
- package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
- package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
- package/lib/esm/internal/RenderTextureParams.js +33 -0
- package/lib/esm/internal/RenderTextureParams.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +5 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +4 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js +1 -0
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.d.ts +2 -0
- package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js +7 -6
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js +1 -4
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js +29 -38
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +19 -13
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
- package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js +29 -31
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js +32 -30
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js +15 -8
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js +10 -9
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
- package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js +51 -29
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js +2 -0
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js +14 -13
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
- package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js +7 -0
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js +3 -0
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js +4 -3
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js +8 -0
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.d.ts +2 -2
- package/lib/esm/tile/IModelTileIO.js +26 -3
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js +5 -0
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js +2 -0
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js +9 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package.json +14 -14
- package/lib/cjs/BackendTypes.d.ts.map +0 -1
- package/lib/cjs/BackendTypes.js.map +0 -1
- package/lib/cjs/Render.d.ts +0 -85
- package/lib/cjs/Render.d.ts.map +0 -1
- package/lib/cjs/Render.js.map +0 -1
- package/lib/esm/BackendTypes.d.ts.map +0 -1
- package/lib/esm/BackendTypes.js.map +0 -1
- package/lib/esm/Render.d.ts +0 -85
- package/lib/esm/Render.d.ts.map +0 -1
- package/lib/esm/Render.js.map +0 -1
- /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
- /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpatialClassification.js","sourceRoot":"","sources":["../../src/SpatialClassification.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AAGzD;;;;GAIG;AACH,IAAY,8BAWX;AAXD,WAAY,8BAA8B;IACxC,qCAAqC;IACrC,iFAAO,CAAA;IACP,oDAAoD;IACpD,+EAAM,CAAA;IACN,gCAAgC;IAChC,uFAAU,CAAA;IACV,wEAAwE;IACxE,uFAAU,CAAA;IACV,yEAAyE;IACzE,mGAAgB,CAAA;AAClB,CAAC,EAXW,8BAA8B,8CAA9B,8BAA8B,QAWzC;AAED;;;;GAIG;AACH,IAAY,+BAOX;AAPD,WAAY,+BAA+B;IACzC,qCAAqC;IACrC,mFAAO,CAAA;IACP,oDAAoD;IACpD,iFAAM,CAAA;IACN,gCAAgC;IAChC,yFAAU,CAAA;AACZ,CAAC,EAPW,+BAA+B,+CAA/B,+BAA+B,QAO1C;AAeD;;GAEG;AACH,MAAa,sBAAsB;IAQjC,2BAA2B;IAC3B,YAAmB,MAAM,GAAG,8BAA8B,CAAC,YAAY,EAAE,OAAO,GAAG,+BAA+B,CAAC,MAAM,EAAE,kBAAkB,GAAG,KAAK;QACnJ,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAC/C,CAAC;IAED,0CAA0C;IACnC,MAAM,CAAC,QAAQ,CAAC,KAAkC;QACvD,OAAO,IAAI,sBAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,KAAK,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACpG,CAAC;IAED,sCAAsC;IAC/B,MAAM;QACX,MAAM,KAAK,GAAgC;YACzC,MAAM,EAAE,IAAI,CAAC,MAAM;YACn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,MAAM,KAAK,CAAC;YACnB,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC;QAErC,IAAI,UAAU,KAAK,IAAI,CAAC,MAAM;YAC5B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAE3B,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,4CAA4C;IACrC,KAAK;QACV,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC3B,CAAC;IAED,IAAY,MAAM;QAChB,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IACpF,CAAC;CACF;AA7LD,gDA6LC;AAED,SAAS,aAAa,CAAC,OAAe;IACpC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,8BAA8B,CAAC,GAAG,CAAC;QACxC,KAAK,8BAA8B,CAAC,EAAE,CAAC;QACvC,KAAK,8BAA8B,CAAC,MAAM,CAAC;QAC3C,KAAK,8BAA8B,CAAC,MAAM,CAAC;QAC3C,KAAK,8BAA8B,CAAC,YAAY;YAC9C,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,8BAA8B,CAAC,YAAY,CAAC;IACvD,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,OAAe;IACrC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,+BAA+B,CAAC,GAAG,CAAC;QACzC,KAAK,+BAA+B,CAAC,EAAE,CAAC;QACxC,KAAK,+BAA+B,CAAC,MAAM;YACzC,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,+BAA+B,CAAC,MAAM,CAAC;IAClD,CAAC;AACH,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 { assert, Id64String } from \"@itwin/core-bentley\";\nimport { ModelMapLayerSettings } from \"./MapLayerSettings\";\n\n/** Describes how a [[SpatialClassifier]] affects the display of classified geometry - that is, geometry intersecting\n * the classifier.\n * @public\n * @extensions\n */\nexport enum SpatialClassifierInsideDisplay {\n /** The geometry is not displayed. */\n Off = 0,\n /** The geometry is displayed without alteration. */\n On = 1,\n /** The geometry is darkened. */\n Dimmed = 2,\n /** The geometry is tinted by the [Viewport.hilite]($frontend) color. */\n Hilite = 3,\n /** The geometry is tinted with the colors of the classifier elements. */\n ElementColor = 4,\n}\n\n/** Describes how a [[SpatialClassifier]] affects the display of unclassified geometry - that is, geometry not intersecting\n * the classifier.\n * @public\n * @extensions\n */\nexport enum SpatialClassifierOutsideDisplay {\n /** The geometry is not displayed. */\n Off = 0,\n /** The geometry is displayed without alteration. */\n On = 1,\n /** The geometry is darkened. */\n Dimmed = 2,\n}\n\n/** JSON representation of a [[SpatialClassifierFlags]].\n * @public\n * @extensions\n */\nexport interface SpatialClassifierFlagsProps {\n /** See [[SpatialClassifierFlags.inside]]. */\n inside: SpatialClassifierInsideDisplay;\n /** See [[SpatialClassifierFlags.outside]]. */\n outside: SpatialClassifierOutsideDisplay;\n /** See [[SpatialClassifierFlags.isVolumeClassifier]]. */\n isVolumeClassifier?: boolean;\n}\n\n/** Flags affecting how a [[SpatialClassifier]] is applied.\n * @public\n */\nexport class SpatialClassifierFlags {\n /** How geometry intersecting the classifier should be displayed. */\n public readonly inside: SpatialClassifierInsideDisplay;\n /** How geometry not intersecting the classifier should be displayed. */\n public readonly outside: SpatialClassifierOutsideDisplay;\n /** True for volume classification; false for planar classification. */\n public readonly isVolumeClassifier: boolean;\n\n /** Construct new flags. */\n public constructor(inside = SpatialClassifierInsideDisplay.ElementColor, outside = SpatialClassifierOutsideDisplay.Dimmed, isVolumeClassifier = false) {\n this.inside = insideDisplay(inside);\n this.outside = outsideDisplay(outside);\n this.isVolumeClassifier = isVolumeClassifier;\n }\n\n /** Construct from JSON representation. */\n public static fromJSON(props: SpatialClassifierFlagsProps): SpatialClassifierFlags {\n return new SpatialClassifierFlags(props.inside, props.outside, true === props.isVolumeClassifier);\n }\n\n /** Convert to JSON representation. */\n public toJSON(): SpatialClassifierFlagsProps {\n const props: SpatialClassifierFlagsProps = {\n inside: this.inside,\n outside: this.outside,\n };\n\n if (this.isVolumeClassifier)\n props.isVolumeClassifier = true;\n\n return props;\n }\n\n /** Create flags indentical to these ones except for any properties explicitly specified by `changedProps`. */\n public clone(changedProps?: Partial<SpatialClassifierFlagsProps>): SpatialClassifierFlags {\n if (!changedProps)\n return this;\n\n return SpatialClassifierFlags.fromJSON({ ...this.toJSON(), ...changedProps });\n }\n\n /** Return true if these flags are equivalent to `other`. */\n public equals(other: SpatialClassifierFlags): boolean {\n if (other === this)\n return true;\n\n return other.inside === this.inside && other.outside === this.outside && other.isVolumeClassifier === this.isVolumeClassifier;\n }\n\n /** Return true if these flags are equivalent to `props`. */\n public equalsProps(props: SpatialClassifierFlagsProps): boolean {\n return this.inside === props.inside && this.outside === props.outside && this.isVolumeClassifier === (true === props.isVolumeClassifier);\n }\n}\n\n/** JSON representation of a [[SpatialClassifier]].\n * @public\n * @extensions\n */\nexport interface SpatialClassifierProps {\n /** See [[SpatialClassifier.modelId]]. */\n modelId: Id64String;\n /** See [[SpatialClassifier.expand]]. */\n expand: number;\n /** See [[SpatialClassifier.flags]]. */\n flags: SpatialClassifierFlagsProps;\n /** See [[SpatialClassifier.name]]. */\n name: string;\n /** Records whether this is the active classifier.\n * See [[SpatialClassifier.active]].\n */\n isActive?: boolean;\n}\n\n/** Describes how to use the geometry of one [GeometricModel]($backend) to classify the contents of other models - most typically, reality models.\n * Applying a classifier divides the geometry of the classified model into two groups:\n * - Classified (intersecting the classifier); and\n * - Unclassified (not intersecting the classifier).\n * For example, a model containing the building footprints for a city block could be used to classify a reality mesh captured from photographs of the\n * real-world block. Then, buildings within the reality mesh can be selected individually, and present the properties of the classifier geometry (e.g.,\n * the address of the building). The appearance of the geometry can also be customized based using [[SpatialClassifierInsideDisplay]] and [[SpatialClassifierOutsideDisplay]].\n * Two types of classification are supported:\n * - Planar classification, in which the geometry of the classifier model is projected onto a plane to classify geometry within a region extruded perpendicular\n * the plane (e.g., the building footprints example); and\n * - Volume classification, in which closed, non-intersecting volumes within the classifier classify geometry that intersects (i.e. is contained within) those same volumes (e.g., imagine using boxes instead\n * of footprints to classify buildings, or floors of buildings).\n * @see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].\n * @see [[SpatialClassifiers]] to define a set of classifiers.\n * @see [[ContextRealityModel.classifiers]] to classify a context reality model.\n * @see [SpatialModelState.classifiers]($frontend) to classify a persistent reality model.\n * @public\n */\nexport class SpatialClassifier {\n /** The Id of the [GeometricModel]($backend) whose geometry is used to produce the classifier. */\n public readonly modelId: Id64String;\n /** A distance in meters by which to expand the classifier geometry. For example, if line strings are used to represent streets,\n * you might expand them to the average width of a street.\n */\n public readonly expand: number;\n /** Flags controlling how to apply the classifier. */\n public readonly flags: SpatialClassifierFlags;\n /** A user-friendly name, useful for identifying individual classifiers within a [[SpatialClassifiers]]. */\n public readonly name: string;\n\n /** Construct a new classifier. */\n public constructor(modelId: Id64String, name: string, flags = new SpatialClassifierFlags(), expand = 0) {\n this.modelId = modelId;\n this.expand = expand;\n this.flags = flags;\n this.name = name;\n }\n\n /** Construct from JSON representation. */\n public static fromJSON(props: SpatialClassifierProps): SpatialClassifier {\n return new SpatialClassifier(props.modelId, props.name, SpatialClassifierFlags.fromJSON(props.flags), props.expand);\n }\n\n /** Convert to JSON representation.\n * @note This method always sets the [[SpatialClassifierProps.isActive]] property to `false`.\n */\n public toJSON(): SpatialClassifierProps {\n return {\n modelId: this.modelId,\n expand: this.expand,\n flags: this.flags.toJSON(),\n name: this.name,\n isActive: false,\n };\n }\n\n /** Construct from Model Map Layer.\n * @beta\n */\n public static fromModelMapLayer(mapLayer: ModelMapLayerSettings): SpatialClassifier {\n const flags = SpatialClassifierFlags.fromJSON({ inside: SpatialClassifierInsideDisplay.Off, outside: SpatialClassifierOutsideDisplay.Off });\n\n return new SpatialClassifier(mapLayer.modelId, mapLayer.name, flags);\n }\n\n /** Create a classifier identical to this one except for any properties explicitly specified by `changedProps`. */\n public clone(changedProps?: Partial<SpatialClassifierProps>): SpatialClassifier {\n if (!changedProps)\n return this;\n\n return SpatialClassifier.fromJSON({ ...this.toJSON(), ...changedProps });\n }\n\n /** Return true if this classifier is equivalent to `other`. */\n public equals(other: SpatialClassifier): boolean {\n if (other === this)\n return true;\n\n return this.modelId === other.modelId && this.expand === other.expand && this.name === other.name && this.flags.equals(other.flags);\n }\n\n /** Return true if this classifier is equivalent to `props`. */\n public equalsProps(props: SpatialClassifierProps): boolean {\n return this.modelId === props.modelId && this.expand === props.expand && this.name === props.name && this.flags.equalsProps(props.flags);\n }\n}\n\n/** An object that can store the JSON representation of a list of [[SpatialClassifier]]s.\n * @see [[SpatialClassifiers]].\n * @public\n * @extensions\n */\nexport interface SpatialClassifiersContainer {\n /** The list of classifiers. */\n classifiers?: SpatialClassifierProps[];\n}\n\n/** A set of [[SpatialClassifier]]s for a given reality model. At most one of the classifiers can be actively classifying the model at any given time.\n * The set of classifiers can be presented to the user, listed by name, so that the active classifier can be changed.\n * The set of classifiers is populated from its JSON representation and that representation is kept in sync as the set of classifiers is modified.\n * @see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].\n * @see [[SpatialClassifier]] for details on how spatial classification works.\n * @see [[ContextRealityModel.classifiers]] to define classifiers for a context reality model.\n * @see [SpatialModelState.classifiers]($frontend) to define classifiers for a persistent reality model.\n * @public\n */\nexport class SpatialClassifiers implements Iterable<SpatialClassifier> {\n private readonly _json: SpatialClassifiersContainer;\n private readonly _classifiers: SpatialClassifier[] = [];\n private _active?: SpatialClassifier;\n\n /** Construct a new set of classifiers from the JSON representation. The set will be initialized from `container.classifiers` and that JSON representation\n * will be kept in sync with changes made to the set. The caller should not directly modify `container.classifiers` or its contents as that will cause the set to become out\n * of sync with the JSON representation.\n * The [[active]] classifier will be determined by the first [[SpatialClassifierProps]] whose `isActive` property is set to `true`, if any.\n */\n public constructor(container: SpatialClassifiersContainer) {\n this._json = container;\n\n const json = this._array;\n if (!json)\n return;\n\n for (const props of json) {\n const classifier = SpatialClassifier.fromJSON(props);\n this._classifiers.push(classifier);\n if (props.isActive) {\n if (!this._active)\n this._active = classifier;\n else\n props.isActive = false;\n }\n }\n }\n\n /** The classifier currently classifying the target reality model. The classifier passed to the setter must be one obtained from this set, or one equivalent to\n * one contained in this set; in the latter case, the equivalent classifier contained in this set becomes active.\n */\n /** The classifier currently classifying the target reality model, if any.\n * @see [[setActive]] to change the active classifier.\n */\n public get active(): SpatialClassifier | undefined {\n return this._active;\n }\n\n /** Change the [[active]] classifier. The input must be a classifier belonging to this set, or equivalent to one in the set.\n * If no equivalent classifier exists in the set, the active classifier remains unchanged.\n * @param The classifier to set as active, or `undefined` to clear the active classifier.\n * @returns the active classifier.\n */\n public setActive(active: SpatialClassifier | undefined): SpatialClassifier | undefined {\n const array = this._array;\n if (!array)\n return this.active;\n\n if (active) {\n active = this.findEquivalent(active);\n if (!active)\n return this.active;\n }\n\n if (active === this.active)\n return this.active;\n\n let propsIndex = -1;\n if (active) {\n propsIndex = array.findIndex((x) => active.equalsProps(x));\n if (-1 === propsIndex)\n return this.active;\n }\n\n this._active = active;\n for (let i = 0; i < array.length; i++)\n array[i].isActive = (i === propsIndex);\n\n return this.active;\n }\n\n /** Obtain an iterator over the classifiers contained in this set. */\n public [Symbol.iterator](): Iterator<SpatialClassifier> {\n return this._classifiers[Symbol.iterator]();\n }\n\n /** The number of classifiers in this set. */\n public get size(): number {\n return this._array?.length ?? 0;\n }\n\n /** Returns the first classifier that satisfies `criterion`, or `undefined` if no classifier satisfies it. */\n public find(criterion: (classifier: SpatialClassifier) => boolean): SpatialClassifier | undefined {\n return this._classifiers.find(criterion);\n }\n\n /** Find the first classifier that is equivalent to the supplied classifier, or `undefined` if no equivalent classifier exists in this set. */\n public findEquivalent(classifier: SpatialClassifier): SpatialClassifier | undefined {\n return this.find((x) => x.equals(classifier));\n }\n\n /** Return true if the specified classifier or one equivalent to it exists in this set. */\n public has(classifier: SpatialClassifier): boolean {\n return undefined !== this.findEquivalent(classifier);\n }\n\n /** Add a classifier to this set. If an equivalent classifier already exists, the supplied classifier is not added.\n * @param classifier The classifier to add.\n * @returns The equivalent pre-existing classifier, if one existed; or the supplied classifier, if it was added to the set.\n */\n public add(classifier: SpatialClassifier): SpatialClassifier {\n const existing = this.findEquivalent(classifier);\n if (existing)\n return existing;\n\n let array = this._array;\n if (!array)\n array = this._json.classifiers = [];\n\n this._classifiers.push(classifier);\n array.push(classifier.toJSON());\n return classifier;\n }\n\n /** Replace an existing classifier with a different one.\n * @param toReplace The classifier to be replaced.\n * @param replacement The classifier to replace `toReplace`.\n * @returns true if a classifier equivalent to `toReplace` existed in the set and was replaced by `replacement`.\n * @note If `toReplace` was the [[active]] classifier, `replacement` will become active.\n */\n public replace(toReplace: SpatialClassifier, replacement: SpatialClassifier): boolean {\n const list = this._array;\n if (!list)\n return false;\n\n const classifierIndex = this._classifiers.findIndex((x) => x.equals(toReplace));\n if (-1 === classifierIndex)\n return false;\n\n const propsIndex = list.findIndex((x) => toReplace.equalsProps(x));\n assert(propsIndex === classifierIndex);\n if (-1 === propsIndex)\n return false;\n\n toReplace = this._classifiers[classifierIndex];\n const wasActive = this.active === toReplace;\n\n this._classifiers[classifierIndex] = replacement;\n const props = list[propsIndex] = replacement.toJSON();\n\n if (wasActive) {\n props.isActive = true;\n this._active = replacement;\n }\n\n return true;\n }\n\n /** Remove the first classifier equivalent to `classifier` from this set.\n * @param classifier The classifier to remove.\n * @returns The classifier that was actually removed, or `undefined` if none was removed.\n */\n public delete(classifier: SpatialClassifier): SpatialClassifier | undefined {\n const list = this._array;\n if (!list)\n return undefined;\n\n const classifierIndex = this._classifiers.findIndex((x) => x.equals(classifier));\n if (-1 === classifierIndex)\n return undefined;\n\n classifier = this._classifiers[classifierIndex];\n const propsIndex = list.findIndex((x) => classifier.equalsProps(x));\n assert(propsIndex === classifierIndex);\n if (-1 === propsIndex)\n return undefined;\n\n list.splice(propsIndex, 1);\n this._classifiers.splice(classifierIndex, 1);\n if (list.length === 0)\n this._json.classifiers = undefined;\n\n if (classifier === this.active)\n this._active = undefined;\n\n return classifier;\n }\n\n /** Remove all classifiers from this set. */\n public clear(): void {\n this._classifiers.length = 0;\n this._json.classifiers = undefined;\n this._active = undefined;\n }\n\n private get _array(): SpatialClassifierProps[] | undefined {\n return Array.isArray(this._json.classifiers) ? this._json.classifiers : undefined;\n }\n}\n\nfunction insideDisplay(display: number): SpatialClassifierInsideDisplay {\n switch (display) {\n case SpatialClassifierInsideDisplay.Off:\n case SpatialClassifierInsideDisplay.On:\n case SpatialClassifierInsideDisplay.Dimmed:\n case SpatialClassifierInsideDisplay.Hilite:\n case SpatialClassifierInsideDisplay.ElementColor:\n return display;\n default:\n return SpatialClassifierInsideDisplay.ElementColor;\n }\n}\n\nfunction outsideDisplay(display: number): SpatialClassifierOutsideDisplay {\n switch (display) {\n case SpatialClassifierOutsideDisplay.Off:\n case SpatialClassifierOutsideDisplay.On:\n case SpatialClassifierOutsideDisplay.Dimmed:\n return display;\n default:\n return SpatialClassifierOutsideDisplay.Dimmed;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SpatialClassification.js","sourceRoot":"","sources":["../../src/SpatialClassification.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AAGzD;;;;GAIG;AACH,IAAY,8BAWX;AAXD,WAAY,8BAA8B;IACxC,qCAAqC;IACrC,iFAAO,CAAA;IACP,oDAAoD;IACpD,+EAAM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------------------------\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 { assert, Id64String } from \"@itwin/core-bentley\";\nimport { ModelMapLayerSettings } from \"./MapLayerSettings\";\n\n/** Describes how a [[SpatialClassifier]] affects the display of classified geometry - that is, geometry intersecting\n * the classifier.\n * @public\n * @extensions\n */\nexport enum SpatialClassifierInsideDisplay {\n /** The geometry is not displayed. */\n Off = 0,\n /** The geometry is displayed without alteration. */\n On = 1,\n /** The geometry is darkened. */\n Dimmed = 2,\n /** The geometry is tinted by the [Viewport.hilite]($frontend) color. */\n Hilite = 3,\n /** The geometry is tinted with the colors of the classifier elements. */\n ElementColor = 4,\n}\n\n/** Describes how a [[SpatialClassifier]] affects the display of unclassified geometry - that is, geometry not intersecting\n * the classifier.\n * @public\n * @extensions\n */\nexport enum SpatialClassifierOutsideDisplay {\n /** The geometry is not displayed. */\n Off = 0,\n /** The geometry is displayed without alteration. */\n On = 1,\n /** The geometry is darkened. */\n Dimmed = 2,\n}\n\n/** JSON representation of a [[SpatialClassifierFlags]].\n * @public\n * @extensions\n */\nexport interface SpatialClassifierFlagsProps {\n /** See [[SpatialClassifierFlags.inside]]. */\n inside: SpatialClassifierInsideDisplay;\n /** See [[SpatialClassifierFlags.outside]]. */\n outside: SpatialClassifierOutsideDisplay;\n /** See [[SpatialClassifierFlags.isVolumeClassifier]]. */\n isVolumeClassifier?: boolean;\n}\n\n/** Flags affecting how a [[SpatialClassifier]] is applied.\n * @public\n */\nexport class SpatialClassifierFlags {\n /** How geometry intersecting the classifier should be displayed. */\n public readonly inside: SpatialClassifierInsideDisplay;\n /** How geometry not intersecting the classifier should be displayed. */\n public readonly outside: SpatialClassifierOutsideDisplay;\n /** True for volume classification; false for planar classification. */\n public readonly isVolumeClassifier: boolean;\n\n /** Construct new flags. */\n public constructor(inside = SpatialClassifierInsideDisplay.ElementColor, outside = SpatialClassifierOutsideDisplay.Dimmed, isVolumeClassifier = false) {\n this.inside = insideDisplay(inside);\n this.outside = outsideDisplay(outside);\n this.isVolumeClassifier = isVolumeClassifier;\n }\n\n /** Construct from JSON representation. */\n public static fromJSON(props: SpatialClassifierFlagsProps): SpatialClassifierFlags {\n return new SpatialClassifierFlags(props.inside, props.outside, true === props.isVolumeClassifier);\n }\n\n /** Convert to JSON representation. */\n public toJSON(): SpatialClassifierFlagsProps {\n const props: SpatialClassifierFlagsProps = {\n inside: this.inside,\n outside: this.outside,\n };\n\n if (this.isVolumeClassifier)\n props.isVolumeClassifier = true;\n\n return props;\n }\n\n /** Create flags indentical to these ones except for any properties explicitly specified by `changedProps`. */\n public clone(changedProps?: Partial<SpatialClassifierFlagsProps>): SpatialClassifierFlags {\n if (!changedProps)\n return this;\n\n return SpatialClassifierFlags.fromJSON({ ...this.toJSON(), ...changedProps });\n }\n\n /** Return true if these flags are equivalent to `other`. */\n public equals(other: SpatialClassifierFlags): boolean {\n if (other === this)\n return true;\n\n return other.inside === this.inside && other.outside === this.outside && other.isVolumeClassifier === this.isVolumeClassifier;\n }\n\n /** Return true if these flags are equivalent to `props`. */\n public equalsProps(props: SpatialClassifierFlagsProps): boolean {\n return this.inside === props.inside && this.outside === props.outside && this.isVolumeClassifier === (true === props.isVolumeClassifier);\n }\n}\n\n/** JSON representation of a [[SpatialClassifier]].\n * @public\n * @extensions\n */\nexport interface SpatialClassifierProps {\n /** See [[SpatialClassifier.modelId]]. */\n modelId: Id64String;\n /** See [[SpatialClassifier.expand]]. */\n expand: number;\n /** See [[SpatialClassifier.flags]]. */\n flags: SpatialClassifierFlagsProps;\n /** See [[SpatialClassifier.name]]. */\n name: string;\n /** Records whether this is the active classifier.\n * See [[SpatialClassifier.active]].\n */\n isActive?: boolean;\n}\n\n/** Describes how to use the geometry of one [GeometricModel]($backend) to classify the contents of other models - most typically, reality models.\n * Applying a classifier divides the geometry of the classified model into two groups:\n * - Classified (intersecting the classifier); and\n * - Unclassified (not intersecting the classifier).\n * For example, a model containing the building footprints for a city block could be used to classify a reality mesh captured from photographs of the\n * real-world block. Then, buildings within the reality mesh can be selected individually, and present the properties of the classifier geometry (e.g.,\n * the address of the building). The appearance of the geometry can also be customized based using [[SpatialClassifierInsideDisplay]] and [[SpatialClassifierOutsideDisplay]].\n * Two types of classification are supported:\n * - Planar classification, in which the geometry of the classifier model is projected onto a plane to classify geometry within a region extruded perpendicular\n * the plane (e.g., the building footprints example); and\n * - Volume classification, in which closed, non-intersecting volumes within the classifier classify geometry that intersects (i.e. is contained within) those same volumes (e.g., imagine using boxes instead\n * of footprints to classify buildings, or floors of buildings).\n * @see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].\n * @see [[SpatialClassifiers]] to define a set of classifiers.\n * @see [[ContextRealityModel.classifiers]] to classify a context reality model.\n * @see [SpatialModelState.classifiers]($frontend) to classify a persistent reality model.\n * @public\n */\nexport class SpatialClassifier {\n /** The Id of the [GeometricModel]($backend) whose geometry is used to produce the classifier. */\n public readonly modelId: Id64String;\n /** A distance in meters by which to expand the classifier geometry. For example, if line strings are used to represent streets,\n * you might expand them to the average width of a street.\n */\n public readonly expand: number;\n /** Flags controlling how to apply the classifier. */\n public readonly flags: SpatialClassifierFlags;\n /** A user-friendly name, useful for identifying individual classifiers within a [[SpatialClassifiers]]. */\n public readonly name: string;\n\n /** Construct a new classifier. */\n public constructor(modelId: Id64String, name: string, flags = new SpatialClassifierFlags(), expand = 0) {\n this.modelId = modelId;\n this.expand = expand;\n this.flags = flags;\n this.name = name;\n }\n\n /** Construct from JSON representation. */\n public static fromJSON(props: SpatialClassifierProps): SpatialClassifier {\n return new SpatialClassifier(props.modelId, props.name, SpatialClassifierFlags.fromJSON(props.flags), props.expand);\n }\n\n /** Convert to JSON representation.\n * @note This method always sets the [[SpatialClassifierProps.isActive]] property to `false`.\n */\n public toJSON(): SpatialClassifierProps {\n return {\n modelId: this.modelId,\n expand: this.expand,\n flags: this.flags.toJSON(),\n name: this.name,\n isActive: false,\n };\n }\n\n /** Construct from Model Map Layer.\n * @beta\n */\n public static fromModelMapLayer(mapLayer: ModelMapLayerSettings): SpatialClassifier {\n const flags = SpatialClassifierFlags.fromJSON({ inside: SpatialClassifierInsideDisplay.Off, outside: SpatialClassifierOutsideDisplay.Off });\n\n return new SpatialClassifier(mapLayer.modelId, mapLayer.name, flags);\n }\n\n /** Create a classifier identical to this one except for any properties explicitly specified by `changedProps`. */\n public clone(changedProps?: Partial<SpatialClassifierProps>): SpatialClassifier {\n if (!changedProps)\n return this;\n\n return SpatialClassifier.fromJSON({ ...this.toJSON(), ...changedProps });\n }\n\n /** Return true if this classifier is equivalent to `other`. */\n public equals(other: SpatialClassifier): boolean {\n if (other === this)\n return true;\n\n return this.modelId === other.modelId && this.expand === other.expand && this.name === other.name && this.flags.equals(other.flags);\n }\n\n /** Return true if this classifier is equivalent to `props`. */\n public equalsProps(props: SpatialClassifierProps): boolean {\n return this.modelId === props.modelId && this.expand === props.expand && this.name === props.name && this.flags.equalsProps(props.flags);\n }\n}\n\n/** An object that can store the JSON representation of a list of [[SpatialClassifier]]s.\n * @see [[SpatialClassifiers]].\n * @public\n * @extensions\n */\nexport interface SpatialClassifiersContainer {\n /** The list of classifiers. */\n classifiers?: SpatialClassifierProps[];\n}\n\n/** A set of [[SpatialClassifier]]s for a given reality model. At most one of the classifiers can be actively classifying the model at any given time.\n * The set of classifiers can be presented to the user, listed by name, so that the active classifier can be changed.\n * The set of classifiers is populated from its JSON representation and that representation is kept in sync as the set of classifiers is modified.\n * @see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].\n * @see [[SpatialClassifier]] for details on how spatial classification works.\n * @see [[ContextRealityModel.classifiers]] to define classifiers for a context reality model.\n * @see [SpatialModelState.classifiers]($frontend) to define classifiers for a persistent reality model.\n * @public\n */\nexport class SpatialClassifiers implements Iterable<SpatialClassifier> {\n private readonly _json: SpatialClassifiersContainer;\n private readonly _classifiers: SpatialClassifier[] = [];\n private _active?: SpatialClassifier;\n\n /** Construct a new set of classifiers from the JSON representation. The set will be initialized from `container.classifiers` and that JSON representation\n * will be kept in sync with changes made to the set. The caller should not directly modify `container.classifiers` or its contents as that will cause the set to become out\n * of sync with the JSON representation.\n * The [[active]] classifier will be determined by the first [[SpatialClassifierProps]] whose `isActive` property is set to `true`, if any.\n */\n public constructor(container: SpatialClassifiersContainer) {\n this._json = container;\n\n const json = this._array;\n if (!json)\n return;\n\n for (const props of json) {\n const classifier = SpatialClassifier.fromJSON(props);\n this._classifiers.push(classifier);\n if (props.isActive) {\n if (!this._active)\n this._active = classifier;\n else\n props.isActive = false;\n }\n }\n }\n\n /** The classifier currently classifying the target reality model. The classifier passed to the setter must be one obtained from this set, or one equivalent to\n * one contained in this set; in the latter case, the equivalent classifier contained in this set becomes active.\n */\n /** The classifier currently classifying the target reality model, if any.\n * @see [[setActive]] to change the active classifier.\n */\n public get active(): SpatialClassifier | undefined {\n return this._active;\n }\n\n /** Change the [[active]] classifier. The input must be a classifier belonging to this set, or equivalent to one in the set.\n * If no equivalent classifier exists in the set, the active classifier remains unchanged.\n * @param The classifier to set as active, or `undefined` to clear the active classifier.\n * @returns the active classifier.\n */\n public setActive(active: SpatialClassifier | undefined): SpatialClassifier | undefined {\n const array = this._array;\n if (!array)\n return this.active;\n\n if (active) {\n active = this.findEquivalent(active);\n if (!active)\n return this.active;\n }\n\n if (active === this.active)\n return this.active;\n\n let propsIndex = -1;\n if (active) {\n propsIndex = array.findIndex((x) => active.equalsProps(x));\n if (-1 === propsIndex)\n return this.active;\n }\n\n this._active = active;\n for (let i = 0; i < array.length; i++)\n array[i].isActive = (i === propsIndex);\n\n return this.active;\n }\n\n /** Obtain an iterator over the classifiers contained in this set. */\n public [Symbol.iterator](): Iterator<SpatialClassifier> {\n return this._classifiers[Symbol.iterator]();\n }\n\n /** The number of classifiers in this set. */\n public get size(): number {\n return this._array?.length ?? 0;\n }\n\n /** Returns the first classifier that satisfies `criterion`, or `undefined` if no classifier satisfies it. */\n public find(criterion: (classifier: SpatialClassifier) => boolean): SpatialClassifier | undefined {\n return this._classifiers.find(criterion);\n }\n\n /** Find the first classifier that is equivalent to the supplied classifier, or `undefined` if no equivalent classifier exists in this set. */\n public findEquivalent(classifier: SpatialClassifier): SpatialClassifier | undefined {\n return this.find((x) => x.equals(classifier));\n }\n\n /** Return true if the specified classifier or one equivalent to it exists in this set. */\n public has(classifier: SpatialClassifier): boolean {\n return undefined !== this.findEquivalent(classifier);\n }\n\n /** Add a classifier to this set. If an equivalent classifier already exists, the supplied classifier is not added.\n * @param classifier The classifier to add.\n * @returns The equivalent pre-existing classifier, if one existed; or the supplied classifier, if it was added to the set.\n */\n public add(classifier: SpatialClassifier): SpatialClassifier {\n const existing = this.findEquivalent(classifier);\n if (existing)\n return existing;\n\n let array = this._array;\n if (!array)\n array = this._json.classifiers = [];\n\n this._classifiers.push(classifier);\n array.push(classifier.toJSON());\n return classifier;\n }\n\n /** Replace an existing classifier with a different one.\n * @param toReplace The classifier to be replaced.\n * @param replacement The classifier to replace `toReplace`.\n * @returns true if a classifier equivalent to `toReplace` existed in the set and was replaced by `replacement`.\n * @note If `toReplace` was the [[active]] classifier, `replacement` will become active.\n */\n public replace(toReplace: SpatialClassifier, replacement: SpatialClassifier): boolean {\n const list = this._array;\n if (!list)\n return false;\n\n const classifierIndex = this._classifiers.findIndex((x) => x.equals(toReplace));\n if (-1 === classifierIndex)\n return false;\n\n const propsIndex = list.findIndex((x) => toReplace.equalsProps(x));\n assert(propsIndex === classifierIndex);\n if (-1 === propsIndex)\n return false;\n\n toReplace = this._classifiers[classifierIndex];\n const wasActive = this.active === toReplace;\n\n this._classifiers[classifierIndex] = replacement;\n const props = list[propsIndex] = replacement.toJSON();\n\n if (wasActive) {\n props.isActive = true;\n this._active = replacement;\n }\n\n return true;\n }\n\n /** Remove the first classifier equivalent to `classifier` from this set.\n * @param classifier The classifier to remove.\n * @returns The classifier that was actually removed, or `undefined` if none was removed.\n */\n public delete(classifier: SpatialClassifier): SpatialClassifier | undefined {\n const list = this._array;\n if (!list)\n return undefined;\n\n const classifierIndex = this._classifiers.findIndex((x) => x.equals(classifier));\n if (-1 === classifierIndex)\n return undefined;\n\n classifier = this._classifiers[classifierIndex];\n const propsIndex = list.findIndex((x) => classifier.equalsProps(x));\n assert(propsIndex === classifierIndex);\n if (-1 === propsIndex)\n return undefined;\n\n list.splice(propsIndex, 1);\n this._classifiers.splice(classifierIndex, 1);\n if (list.length === 0)\n this._json.classifiers = undefined;\n\n if (classifier === this.active)\n this._active = undefined;\n\n return classifier;\n }\n\n /** Remove all classifiers from this set. */\n public clear(): void {\n this._classifiers.length = 0;\n this._json.classifiers = undefined;\n this._active = undefined;\n }\n\n private get _array(): SpatialClassifierProps[] | undefined {\n return Array.isArray(this._json.classifiers) ? this._json.classifiers : undefined;\n }\n}\n\nfunction insideDisplay(display: number): SpatialClassifierInsideDisplay {\n switch (display) {\n case SpatialClassifierInsideDisplay.Off:\n case SpatialClassifierInsideDisplay.On:\n case SpatialClassifierInsideDisplay.Dimmed:\n case SpatialClassifierInsideDisplay.Hilite:\n case SpatialClassifierInsideDisplay.ElementColor:\n return display;\n default:\n return SpatialClassifierInsideDisplay.ElementColor;\n }\n}\n\nfunction outsideDisplay(display: number): SpatialClassifierOutsideDisplay {\n switch (display) {\n case SpatialClassifierOutsideDisplay.Off:\n case SpatialClassifierOutsideDisplay.On:\n case SpatialClassifierOutsideDisplay.Dimmed:\n return display;\n default:\n return SpatialClassifierOutsideDisplay.Dimmed;\n }\n}\n"]}
|
|
@@ -16,6 +16,40 @@ const ColorDef_1 = require("./ColorDef");
|
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
18
|
class SubCategoryAppearance {
|
|
19
|
+
/** The color of the geometry.
|
|
20
|
+
* @note The transparency component of the color is ignored.
|
|
21
|
+
* @see [[SubCategoryAppearance.transparency]].
|
|
22
|
+
*/
|
|
23
|
+
color;
|
|
24
|
+
/** The line width, in pixels.
|
|
25
|
+
* @note The renderer will clamp values to the integer range [1, 32].
|
|
26
|
+
*/
|
|
27
|
+
weight;
|
|
28
|
+
/** The display priority used to control which geometry draws in front of other geometry within a 2D view.
|
|
29
|
+
* The priority is a number in the range [-8388576,8388576].
|
|
30
|
+
* Where two pieces of geometry overlap, the one with the larger priority value draws on top of the one with the smaller priority.
|
|
31
|
+
* If they have equal priorities, the order in which they draw is undefined, and z-fighting may result.
|
|
32
|
+
* @note This property has no effect in 3D views unless [[PlanProjectionSettings]] are in effect.
|
|
33
|
+
*/
|
|
34
|
+
priority;
|
|
35
|
+
/** A value in the range [0, 1] indicating the transparency of the geometry where 0.0 means "fully opaque" and 1.0 means "fully transparent". */
|
|
36
|
+
transparency;
|
|
37
|
+
/** If true, geometry belonging to this SubCategory is not drawn. */
|
|
38
|
+
invisible;
|
|
39
|
+
/** @internal */
|
|
40
|
+
dontPlot;
|
|
41
|
+
/** @internal */
|
|
42
|
+
dontSnap;
|
|
43
|
+
/** @internal */
|
|
44
|
+
dontLocate;
|
|
45
|
+
/** The element ID of the line style used to draw curves, or an invalid ID if no line style is specified. */
|
|
46
|
+
styleId;
|
|
47
|
+
/** The element ID of the material applied to surfaces, or an invalid ID if no material is specified. */
|
|
48
|
+
materialId;
|
|
49
|
+
/** @internal */
|
|
50
|
+
_fillColor;
|
|
51
|
+
/** @internal */
|
|
52
|
+
_fillTransparency;
|
|
19
53
|
/** The fill color of geometry marked as being filled.
|
|
20
54
|
* @note The transparency component of the fill color is ignored.
|
|
21
55
|
* @see [[SubCategoryAppearance.fillTransparency]].
|
|
@@ -91,7 +125,7 @@ class SubCategoryAppearance {
|
|
|
91
125
|
return val;
|
|
92
126
|
}
|
|
93
127
|
clone() { return new SubCategoryAppearance(this.toJSON()); }
|
|
128
|
+
static defaults = new SubCategoryAppearance();
|
|
94
129
|
}
|
|
95
130
|
exports.SubCategoryAppearance = SubCategoryAppearance;
|
|
96
|
-
SubCategoryAppearance.defaults = new SubCategoryAppearance();
|
|
97
131
|
//# sourceMappingURL=SubCategoryAppearance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubCategoryAppearance.js","sourceRoot":"","sources":["../../src/SubCategoryAppearance.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAkE;AAClE,yCAAqD;AAErD;;;;GAIG;AACH,MAAa,qBAAqB;IAoChC;;;OAGG;IACH,IAAW,SAAS,KAAe,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3G,qJAAqJ;IACrJ,IAAW,gBAAgB,KAAa,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAErI,YAAY,KAAmC;QAC7C,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,IAAI,CAAC,KAAK,GAAG,mBAAQ,CAAC,KAAK,CAAC;YAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YAClB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;YACtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;YACzE,IAAI,CAAC,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC;YAC5B,IAAI,CAAC,UAAU,GAAG,mBAAI,CAAC,OAAO,CAAC;YAC/B,OAAO;QACT,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,wBAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;Q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OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;YAC/B,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC;QAEjC,IAAI,GAAG,KAAK,IAAI,CAAC,YAAY;YAC3B,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC;QAEjC,IAAI,IAAI,CAAC,UAAU;YACjB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;QAEtC,IAAI,IAAI,CAAC,iBAAiB;YACxB,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAE1C,OAAO,GAAG,CAAC;IACb,CAAC;IAEM,KAAK,KAA4B,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;;AA9H5F,sDAiIC;AADe,8BAAQ,GAAG,IAAI,qBAAqB,EAAE,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 Symbology\n */\n\nimport { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\n\n/** Parameters that define the way geometry on a [[SubCategory]] appears.\n * SubCategoryAppearance describes the intrinsic appearance of geometry belonging to that SubCategory, independent of a particular [[ViewState]].\n * Aspects of a SubCategory's appearance can be overridden in the context of a particular [[ViewState]] through the use of [[SubCategoryOverride]]s.\n * @public\n */\nexport class SubCategoryAppearance {\n /** The color of the geometry.\n * @note The transparency component of the color is ignored.\n * @see [[SubCategoryAppearance.transparency]].\n */\n public readonly color: ColorDef;\n /** The line width, in pixels.\n * @note The renderer will clamp values to the integer range [1, 32].\n */\n public readonly weight: number;\n /** The display priority used to control which geometry draws in front of other geometry within a 2D view.\n * The priority is a number in the range [-8388576,8388576].\n * Where two pieces of geometry overlap, the one with the larger priority value draws on top of the one with the smaller priority.\n * If they have equal priorities, the order in which they draw is undefined, and z-fighting may result.\n * @note This property has no effect in 3D views unless [[PlanProjectionSettings]] are in effect.\n */\n public readonly priority: number;\n /** A value in the range [0, 1] indicating the transparency of the geometry where 0.0 means \"fully opaque\" and 1.0 means \"fully transparent\". */\n public readonly transparency: number;\n /** If true, geometry belonging to this SubCategory is not drawn. */\n public readonly invisible: boolean;\n /** @internal */\n public readonly dontPlot: boolean;\n /** @internal */\n public readonly dontSnap: boolean;\n /** @internal */\n public readonly dontLocate: boolean;\n /** The element ID of the line style used to draw curves, or an invalid ID if no line style is specified. */\n public readonly styleId: Id64String;\n /** The element ID of the material applied to surfaces, or an invalid ID if no material is specified. */\n public readonly materialId: Id64String;\n /** @internal */\n protected readonly _fillColor?: ColorDef;\n /** @internal */\n protected readonly _fillTransparency?: number;\n\n /** The fill color of geometry marked as being filled.\n * @note The transparency component of the fill color is ignored.\n * @see [[SubCategoryAppearance.fillTransparency]].\n */\n public get fillColor(): ColorDef { return (undefined !== this._fillColor ? this._fillColor : this.color); }\n /** A value in the range [0, 1] indicating the fill transparency of the geometry where 0.0 means \"fully opaque\" and 1.0 means \"fully transparent\". */\n public get fillTransparency(): number { return (undefined !== this._fillTransparency ? this._fillTransparency : this.transparency); }\n\n constructor(props?: SubCategoryAppearance.Props) {\n if (!props) {\n this.color = ColorDef.black;\n this.weight = 0;\n this.priority = 0;\n this.transparency = 0;\n this.invisible = this.dontPlot = this.dontSnap = this.dontLocate = false;\n this.styleId = Id64.invalid;\n this.materialId = Id64.invalid;\n return;\n }\n\n this.invisible = JsonUtils.asBool(props.invisible);\n this.dontSnap = JsonUtils.asBool(props.dontSnap);\n this.dontLocate = JsonUtils.asBool(props.dontLocate);\n this.dontPlot = JsonUtils.asBool(props.dontPlot);\n this.color = ColorDef.fromJSON(props.color);\n this.weight = JsonUtils.asInt(props.weight);\n this.styleId = Id64.fromJSON(props.style);\n this.priority = JsonUtils.asInt(props.priority);\n this.materialId = Id64.fromJSON(props.material);\n this.transparency = JsonUtils.asDouble(props.transp);\n if (props.fill)\n this._fillColor = ColorDef.fromJSON(props.fill);\n if (props.transpFill)\n this._fillTransparency = JsonUtils.asDouble(props.transpFill);\n }\n\n public equals(other: SubCategoryAppearance): boolean {\n return this.invisible === other.invisible &&\n this.dontPlot === other.dontPlot &&\n this.dontSnap === other.dontSnap &&\n this.dontLocate === other.dontLocate &&\n this.color.equals(other.color) &&\n this.weight === other.weight &&\n this.priority === other.priority &&\n this.styleId === other.styleId &&\n this.materialId === other.materialId &&\n this.transparency === other.transparency &&\n this.fillColor.equals(other.fillColor) &&\n this.fillTransparency === other.fillTransparency;\n }\n\n /** @internal */\n public toJSON(): SubCategoryAppearance.Props {\n const val: SubCategoryAppearance.Props = { color: this.color.toJSON() };\n if (this.invisible)\n val.invisible = true;\n\n if (this.dontPlot)\n val.dontPlot = true;\n\n if (this.dontSnap)\n val.dontSnap = true;\n\n if (this.dontLocate)\n val.dontLocate = true;\n\n if (0 !== this.weight)\n val.weight = this.weight;\n\n if (0 !== this.priority)\n val.priority = this.priority;\n\n if (Id64.isValid(this.styleId))\n val.style = this.styleId;\n\n if (Id64.isValid(this.materialId))\n val.material = this.materialId;\n\n if (0.0 !== this.transparency)\n val.transp = this.transparency;\n\n if (this._fillColor)\n val.fill = this._fillColor.toJSON();\n\n if (this._fillTransparency)\n val.transpFill = this._fillTransparency;\n\n return val;\n }\n\n public clone(): SubCategoryAppearance { return new SubCategoryAppearance(this.toJSON()); }\n\n public static defaults = new SubCategoryAppearance();\n}\n\n/** @public */\nexport namespace SubCategoryAppearance {\n /** Properties used to create a SubCategoryAppearance\n * See [[SubCategoryAppearance]]\n */\n export interface Props {\n /** See [[SubCategoryAppearance.color]]. Defaults to black. */\n color?: ColorDefProps;\n /** See [[SubCategoryAppearance.fillColor]]. Defaults to [[SubCategoryAppearance.color]]. */\n fill?: ColorDefProps;\n /** See [[SubCategoryAppearance.invisible]]. Defaults to false. */\n invisible?: boolean;\n /** @internal */\n dontPlot?: boolean;\n /** @internal */\n dontSnap?: boolean;\n /** @internal */\n dontLocate?: boolean;\n /** See [[SubCategoryAppearance.weight]]. Defaults to 0. */\n weight?: number;\n /** See [[SubCategoryAppearance.styleId]]. Defaults to an invalid ID indicating \"no line style\". */\n style?: Id64String;\n /** See [[SubCategoryAppearance.priority]]. Defaults to 0. */\n priority?: number;\n /** See [[SubCategoryAppearance.materialId]]. Defaults to an invalid ID indicating \"no material\". */\n material?: Id64String;\n /** See [[SubCategoryAppearance.transparency]]. Defaults to 0. */\n transp?: number;\n /** See [[SubCategoryAppearance.fillTransparency]]. Defaults to [[SubCategoryAppearance.transparency]]. */\n transpFill?: number;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SubCategoryAppearance.js","sourceRoot":"","sources":["../../src/SubCategoryAppearance.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAkE;AAClE,yCAAqD;AAErD;;;;GAIG;AACH,MAAa,qBAAqB;IAChC;;;OAGG;IACa,KAAK,CAAW;IAChC;;OAEG;IACa,MAAM,CAAS;IAC/B;;;;;OAKG;IACa,QAAQ,CAAS;IACjC,gJAAgJ;IAChI,YAAY,CAAS;IACrC,oEAAoE;IACpD,SAAS,CAAU;IACnC,gBAAgB;IACA,QAAQ,CAAU;IAClC,gBAAgB;IACA,QAAQ,CAAU;IAClC,gBAAgB;IACA,UAAU,CAAU;IACpC,4GAA4G;IAC5F,OAAO,CAAa;IACpC,wGAAwG;IACxF,UAAU,CAAa;IACvC,gBAAgB;IACG,UAAU,CAAY;IACzC,gBAAgB;IACG,iBAAiB,CAAU;IAE9C;;;OAGG;IACH,IAAW,SAAS,KAAe,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3G,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CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAEnF,MAAM,CAAC,QAAQ,GAAG,IAAI,qBAAqB,EAAE,CAAC;;AAhIvD,sDAiIC","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 Symbology\n */\n\nimport { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\n\n/** Parameters that define the way geometry on a [[SubCategory]] appears.\n * SubCategoryAppearance describes the intrinsic appearance of geometry belonging to that SubCategory, independent of a particular [[ViewState]].\n * Aspects of a SubCategory's appearance can be overridden in the context of a particular [[ViewState]] through the use of [[SubCategoryOverride]]s.\n * @public\n */\nexport class SubCategoryAppearance {\n /** The color of the geometry.\n * @note The transparency component of the color is ignored.\n * @see [[SubCategoryAppearance.transparency]].\n */\n public readonly color: ColorDef;\n /** The line width, in pixels.\n * @note The renderer will clamp values to the integer range [1, 32].\n */\n public readonly weight: number;\n /** The display priority used to control which geometry draws in front of other geometry within a 2D view.\n * The priority is a number in the range [-8388576,8388576].\n * Where two pieces of geometry overlap, the one with the larger priority value draws on top of the one with the smaller priority.\n * If they have equal priorities, the order in which they draw is undefined, and z-fighting may result.\n * @note This property has no effect in 3D views unless [[PlanProjectionSettings]] are in effect.\n */\n public readonly priority: number;\n /** A value in the range [0, 1] indicating the transparency of the geometry where 0.0 means \"fully opaque\" and 1.0 means \"fully transparent\". */\n public readonly transparency: number;\n /** If true, geometry belonging to this SubCategory is not drawn. */\n public readonly invisible: boolean;\n /** @internal */\n public readonly dontPlot: boolean;\n /** @internal */\n public readonly dontSnap: boolean;\n /** @internal */\n public readonly dontLocate: boolean;\n /** The element ID of the line style used to draw curves, or an invalid ID if no line style is specified. */\n public readonly styleId: Id64String;\n /** The element ID of the material applied to surfaces, or an invalid ID if no material is specified. */\n public readonly materialId: Id64String;\n /** @internal */\n protected readonly _fillColor?: ColorDef;\n /** @internal */\n protected readonly _fillTransparency?: number;\n\n /** The fill color of geometry marked as being filled.\n * @note The transparency component of the fill color is ignored.\n * @see [[SubCategoryAppearance.fillTransparency]].\n */\n public get fillColor(): ColorDef { return (undefined !== this._fillColor ? this._fillColor : this.color); }\n /** A value in the range [0, 1] indicating the fill transparency of the geometry where 0.0 means \"fully opaque\" and 1.0 means \"fully transparent\". */\n public get fillTransparency(): number { return (undefined !== this._fillTransparency ? this._fillTransparency : this.transparency); }\n\n constructor(props?: SubCategoryAppearance.Props) {\n if (!props) {\n this.color = ColorDef.black;\n this.weight = 0;\n this.priority = 0;\n this.transparency = 0;\n this.invisible = this.dontPlot = this.dontSnap = this.dontLocate = false;\n this.styleId = Id64.invalid;\n this.materialId = Id64.invalid;\n return;\n }\n\n this.invisible = JsonUtils.asBool(props.invisible);\n this.dontSnap = JsonUtils.asBool(props.dontSnap);\n this.dontLocate = JsonUtils.asBool(props.dontLocate);\n this.dontPlot = JsonUtils.asBool(props.dontPlot);\n this.color = ColorDef.fromJSON(props.color);\n this.weight = JsonUtils.asInt(props.weight);\n this.styleId = Id64.fromJSON(props.style);\n this.priority = JsonUtils.asInt(props.priority);\n this.materialId = Id64.fromJSON(props.material);\n this.transparency = JsonUtils.asDouble(props.transp);\n if (props.fill)\n this._fillColor = ColorDef.fromJSON(props.fill);\n if (props.transpFill)\n this._fillTransparency = JsonUtils.asDouble(props.transpFill);\n }\n\n public equals(other: SubCategoryAppearance): boolean {\n return this.invisible === other.invisible &&\n this.dontPlot === other.dontPlot &&\n this.dontSnap === other.dontSnap &&\n this.dontLocate === other.dontLocate &&\n this.color.equals(other.color) &&\n this.weight === other.weight &&\n this.priority === other.priority &&\n this.styleId === other.styleId &&\n this.materialId === other.materialId &&\n this.transparency === other.transparency &&\n this.fillColor.equals(other.fillColor) &&\n this.fillTransparency === other.fillTransparency;\n }\n\n /** @internal */\n public toJSON(): SubCategoryAppearance.Props {\n const val: SubCategoryAppearance.Props = { color: this.color.toJSON() };\n if (this.invisible)\n val.invisible = true;\n\n if (this.dontPlot)\n val.dontPlot = true;\n\n if (this.dontSnap)\n val.dontSnap = true;\n\n if (this.dontLocate)\n val.dontLocate = true;\n\n if (0 !== this.weight)\n val.weight = this.weight;\n\n if (0 !== this.priority)\n val.priority = this.priority;\n\n if (Id64.isValid(this.styleId))\n val.style = this.styleId;\n\n if (Id64.isValid(this.materialId))\n val.material = this.materialId;\n\n if (0.0 !== this.transparency)\n val.transp = this.transparency;\n\n if (this._fillColor)\n val.fill = this._fillColor.toJSON();\n\n if (this._fillTransparency)\n val.transpFill = this._fillTransparency;\n\n return val;\n }\n\n public clone(): SubCategoryAppearance { return new SubCategoryAppearance(this.toJSON()); }\n\n public static defaults = new SubCategoryAppearance();\n}\n\n/** @public */\nexport namespace SubCategoryAppearance {\n /** Properties used to create a SubCategoryAppearance\n * See [[SubCategoryAppearance]]\n */\n export interface Props {\n /** See [[SubCategoryAppearance.color]]. Defaults to black. */\n color?: ColorDefProps;\n /** See [[SubCategoryAppearance.fillColor]]. Defaults to [[SubCategoryAppearance.color]]. */\n fill?: ColorDefProps;\n /** See [[SubCategoryAppearance.invisible]]. Defaults to false. */\n invisible?: boolean;\n /** @internal */\n dontPlot?: boolean;\n /** @internal */\n dontSnap?: boolean;\n /** @internal */\n dontLocate?: boolean;\n /** See [[SubCategoryAppearance.weight]]. Defaults to 0. */\n weight?: number;\n /** See [[SubCategoryAppearance.styleId]]. Defaults to an invalid ID indicating \"no line style\". */\n style?: Id64String;\n /** See [[SubCategoryAppearance.priority]]. Defaults to 0. */\n priority?: number;\n /** See [[SubCategoryAppearance.materialId]]. Defaults to an invalid ID indicating \"no material\". */\n material?: Id64String;\n /** See [[SubCategoryAppearance.transparency]]. Defaults to 0. */\n transp?: number;\n /** See [[SubCategoryAppearance.fillTransparency]]. Defaults to [[SubCategoryAppearance.transparency]]. */\n transpFill?: number;\n }\n}\n"]}
|
|
@@ -21,6 +21,20 @@ const SubCategoryAppearance_1 = require("./SubCategoryAppearance");
|
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
23
|
class SubCategoryOverride {
|
|
24
|
+
/** See [[SubCategoryAppearance.color]] */
|
|
25
|
+
color;
|
|
26
|
+
/** See [[SubCategoryAppearance.invisible]] */
|
|
27
|
+
invisible;
|
|
28
|
+
/** See [[SubCategoryAppearance.weight]] */
|
|
29
|
+
weight;
|
|
30
|
+
/** @internal Overriding with arbitrary custom line style is not supported - overriding with LinePixels enum could be. */
|
|
31
|
+
style;
|
|
32
|
+
/** See [[SubCategoryAppearance.priority]] */
|
|
33
|
+
priority;
|
|
34
|
+
/** See [[SubCategoryAppearance.materialId]] */
|
|
35
|
+
material;
|
|
36
|
+
/** See [[SubCategoryAppearance.transparency]] */
|
|
37
|
+
transparency;
|
|
24
38
|
/** Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). */
|
|
25
39
|
get anyOverridden() {
|
|
26
40
|
return undefined !== this.invisible || undefined !== this.color || undefined !== this.weight || undefined !== this.style || undefined !== this.priority || undefined !== this.material || undefined !== this.transparency;
|
|
@@ -98,8 +112,8 @@ class SubCategoryOverride {
|
|
|
98
112
|
if (undefined !== props.transp)
|
|
99
113
|
this.transparency = core_bentley_1.JsonUtils.asDouble(props.transp);
|
|
100
114
|
}
|
|
115
|
+
/** A default SubCategoryOverride which overrides nothing. */
|
|
116
|
+
static defaults = new SubCategoryOverride({});
|
|
101
117
|
}
|
|
102
118
|
exports.SubCategoryOverride = SubCategoryOverride;
|
|
103
|
-
/** A default SubCategoryOverride which overrides nothing. */
|
|
104
|
-
SubCategoryOverride.defaults = new SubCategoryOverride({});
|
|
105
119
|
//# sourceMappingURL=SubCategoryOverride.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubCategoryOverride.js","sourceRoot":"","sources":["../../src/SubCategoryOverride.ts"],"names":[],"mappings":";AAAA;;;+FAG+F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CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM;YAC5B,IAAI,CAAC,MAAM,GAAG,wBAAS,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,SAAS,KAAK,KAAK,CAAC,KAAK;YAC3B,IAAI,CAAC,KAAK,GAAG,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,SAAS,KAAK,KAAK,CAAC,QAAQ;YAC9B,IAAI,CAAC,QAAQ,GAAG,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChD,IAAI,SAAS,KAAK,KAAK,CAAC,QAAQ;YAC9B,IAAI,CAAC,QAAQ,GAAG,wBAAS,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM;YAC5B,IAAI,CAAC,YAAY,GAAG,wBAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IAED,6DAA6D;IACtD,MAAM,CAAC,QAAQ,GAAG,IAAI,mBAAmB,CAAC,EAAE,CAAC,CAAC;;AA9GvD,kDA+GC","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 { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { ColorDef } from \"./ColorDef\";\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\n\n/** Overrides selected aspects of a [[SubCategoryAppearance]] in the context of a [[DisplayStyleState]].\n * When determining how geometry belonging to a [[SubCategory]] will appear when drawn within a view:\n * 1. The base [[SubCategoryAppearance]] associated with that subcategory is obtained.\n * 2. The [[SubCategoryOverride]] associated with that subcategory in the [[DisplayStyleState]] is obtained.\n * 3. Any aspects of the appearance overridden by the SubCategoryOverride are replaced with the values from the SubCategoryOverride.\n * An aspect is overridden by virtue of not being set to \"undefined\" in the SubCategoryOverride.\n * @see [[DisplayStyleState.overrideSubCategory]]\n * @public\n */\nexport class SubCategoryOverride {\n /** See [[SubCategoryAppearance.color]] */\n public readonly color?: ColorDef;\n /** See [[SubCategoryAppearance.invisible]] */\n public readonly invisible?: boolean;\n /** See [[SubCategoryAppearance.weight]] */\n public readonly weight?: number;\n /** @internal Overriding with arbitrary custom line style is not supported - overriding with LinePixels enum could be. */\n public readonly style?: Id64String;\n /** See [[SubCategoryAppearance.priority]] */\n public readonly priority?: number;\n /** See [[SubCategoryAppearance.materialId]] */\n public readonly material?: Id64String;\n /** See [[SubCategoryAppearance.transparency]] */\n public readonly transparency?: number;\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 {\n return undefined !== this.invisible || undefined !== this.color || undefined !== this.weight || undefined !== this.style || undefined !== this.priority || undefined !== this.material || undefined !== this.transparency;\n }\n\n /** Returns a SubCategoryAppearance overridden to match the properties defined by this SubCategoryOverride. */\n public override(appearance: SubCategoryAppearance): SubCategoryAppearance {\n if (!this.anyOverridden)\n return appearance;\n\n const props = appearance.toJSON();\n const ovrProps = this.toJSON();\n if (undefined !== ovrProps.invisible)\n props.invisible = ovrProps.invisible;\n if (undefined !== ovrProps.weight)\n props.weight = ovrProps.weight;\n if (undefined !== ovrProps.style)\n props.style = ovrProps.style;\n if (undefined !== ovrProps.material)\n props.material = ovrProps.material;\n if (undefined !== ovrProps.priority)\n props.priority = ovrProps.priority;\n if (undefined !== ovrProps.transp)\n props.transp = ovrProps.transp;\n if (undefined !== ovrProps.color)\n props.color = ovrProps.color;\n\n return new SubCategoryAppearance(props);\n }\n\n /** Convert this SubCategoryOverride to a JSON object\n * @internal\n */\n public toJSON(): SubCategoryAppearance.Props {\n const props: SubCategoryAppearance.Props = {};\n if (undefined !== this.invisible)\n props.invisible = this.invisible;\n\n if (undefined !== this.weight)\n props.weight = this.weight;\n\n if (undefined !== this.style)\n props.style = this.style;\n\n if (undefined !== this.material)\n props.material = this.material;\n\n if (undefined !== this.priority)\n props.priority = this.priority;\n\n if (undefined !== this.transparency)\n props.transp = this.transparency;\n\n if (undefined !== this.color)\n props.color = this.color.toJSON();\n\n return props;\n }\n\n /** Perform equality comparison against another SubCategoryOverride. */\n public equals(other: SubCategoryOverride): boolean {\n if (this.invisible !== other.invisible || this.weight !== other.weight || this.style !== other.style\n || this.priority !== other.priority || this.material !== other.material || this.transparency !== other.transparency)\n return false;\n\n if (undefined !== this.color && undefined !== other.color)\n return this.color.tbgr === other.color.tbgr;\n else\n return undefined === this.color && undefined === other.color;\n }\n\n /** Create a new SubCategoryOverride from a JSON object */\n public static fromJSON(json?: SubCategoryAppearance.Props): SubCategoryOverride {\n return undefined !== json ? new SubCategoryOverride(json) : this.defaults;\n }\n\n private constructor(props: SubCategoryAppearance.Props) {\n if (undefined !== props.invisible)\n this.invisible = JsonUtils.asBool(props.invisible);\n if (undefined !== props.color)\n this.color = ColorDef.fromJSON(props.color);\n if (undefined !== props.weight)\n this.weight = JsonUtils.asInt(props.weight);\n if (undefined !== props.style)\n this.style = Id64.fromJSON(props.style);\n if (undefined !== props.material)\n this.material = Id64.fromJSON(props.material);\n if (undefined !== props.priority)\n this.priority = JsonUtils.asInt(props.priority);\n if (undefined !== props.transp)\n this.transparency = JsonUtils.asDouble(props.transp);\n }\n\n /** A default SubCategoryOverride which overrides nothing. */\n public static defaults = new SubCategoryOverride({});\n}\n"]}
|
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
* @module DisplayStyles
|
|
3
3
|
*/
|
|
4
4
|
import { BackgroundMapProps } from "./BackgroundMapSettings";
|
|
5
|
-
/** Identifies a [TerrainProvider]($frontend).
|
|
6
|
-
* @see [[TerrainSettings.providerName]] and [[TerrainProps.providerName]].
|
|
7
|
-
* @public
|
|
8
|
-
* @extensions
|
|
9
|
-
* @deprecated in 3.x. Use string instead.
|
|
10
|
-
*/
|
|
11
|
-
export type TerrainProviderName = string;
|
|
12
5
|
/** Ids of [Cesium ION assets](https://cesium.com/platform/cesium-ion/content/) providing global terrain data.
|
|
13
6
|
* These values are appropriate to use with [[TerrainSettings.dataSource]] when [[TerrainSettings.providerName]] is set to "CesiumWorldTerrain".
|
|
14
7
|
* You may alternatively use the Id of any ION asset to which you have access.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainSettings.d.ts","sourceRoot":"","sources":["../../src/TerrainSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"TerrainSettings.d.ts","sourceRoot":"","sources":["../../src/TerrainSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;;;GAKG;AACH,oBAAY,oBAAoB;IAC9B,yGAAyG;IACzG,OAAO,MAAM;IACb,gJAAgJ;IAChJ,UAAU,YAAY;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8IAA8I;IAC9I,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0HAA0H;IAC1H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mGAAmG;IACnG,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,oBAAY,uBAAuB;IACjC,sHAAs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
|
class TerrainSettings {
|
|
42
|
+
_nonLocatable;
|
|
43
|
+
/** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.
|
|
44
|
+
* Defaults to "CesiumWorldTerrain".
|
|
45
|
+
*/
|
|
46
|
+
providerName;
|
|
47
|
+
/** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],
|
|
48
|
+
* for those providers that support multiple data sources.
|
|
49
|
+
* For example, the "CesiumWorldTerrain" provider uses this field to store a [[CesiumTerrainAssetId]].
|
|
50
|
+
* Default value: an empty string.
|
|
51
|
+
*/
|
|
52
|
+
dataSource;
|
|
53
|
+
/** A value greater than one will cause terrain height to be exaggerated/scaled. 1.0 indicates no exaggeration. Default value: 1.0 */
|
|
54
|
+
exaggeration;
|
|
55
|
+
/** Applying lighting can help to visualize subtle terrain variations. Default value: false */
|
|
56
|
+
applyLighting;
|
|
57
|
+
/** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value 0.0 */
|
|
58
|
+
heightOrigin;
|
|
59
|
+
/** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */
|
|
60
|
+
heightOriginMode;
|
|
42
61
|
/** Optionally overrides [[BackgroundMapSettings.locatable]]. For backwards compatibility only.
|
|
43
62
|
* @see [[TerrainProps.nonLocatable]].
|
|
44
63
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainSettings.js","sourceRoot":"","sources":["../../src/TerrainSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH;;;;;GAKG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,yGAAyG;IACzG,qCAAa,CAAA;IACb,gJAAgJ;IAChJ,8CAAsB,CAAA;AACxB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAiCD;;;;GAIG;AACH,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,sHAAsH;IACtH,6EAAY,CAAA;IACZ,0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,YAAY,IAAI,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC5K,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,gBAAgB,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,CAAC;IAChJ,CAAC;IAED,mFAAmF;IAC5E,UAAU,CAAC,IAAyB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAA2B;QACtC,IAAI,SAAS,KAAK,YAAY;YAC5B,OAAO,IAAI,CAAC;QAEd,MAAM,KAAK,GAAG;YACZ,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,UAAU,EAAE,YAAY,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU;YACtD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,aAAa,EAAE,YAAY,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;YAC/D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;SACzE,CAAC;QAEF,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AA/HD,0CA+HC","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 { BackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** Identifies a [TerrainProvider]($frontend).\n * @see [[TerrainSettings.providerName]] and [[TerrainProps.providerName]].\n * @public\n * @extensions\n * @deprecated in 3.x. Use string instead.\n */\nexport type TerrainProviderName = string;\n\n/** Ids of [Cesium ION assets](https://cesium.com/platform/cesium-ion/content/) providing global terrain data.\n * These values are appropriate to use with [[TerrainSettings.dataSource]] when [[TerrainSettings.providerName]] is set to \"CesiumWorldTerrain\".\n * You may alternatively use the Id of any ION asset to which you have access.\n * @see [[TerrainSettings.fromCesiumIonAsset]] to create TerrainSettings that obtain terrain from a specified ION asset.\n * @public\n */\nexport enum CesiumTerrainAssetId {\n /** Default [global 3d terrain](https://cesium.com/platform/cesium-ion/content/cesium-world-terrain/). */\n Default = \"1\",\n /** Global 3d terrain that includes [bathymetry](https://cesium.com/platform/cesium-ion/content/cesium-world-bathymetry/) (seafloor) terrain. */\n Bathymetry = \"2426648\",\n}\n\n/** JSON representation of the settings of the terrain applied to background map display by a [[DisplayStyle]].\n * @see [[DisplayStyleSettingsProps]]\n * @see [[BackgroundMapProps]]\n * @public\n * @extensions\n */\nexport interface TerrainProps {\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * If omitted, it defaults to \"CesiumWorldTerrain\".\n */\n providerName?: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n dataSource?: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled.false (or 1.0) indicate no exaggeration. Default value: 1.0 */\n exaggeration?: number;\n /** Applying lighting can help to visualize subtle terrain variation. Default value: true */\n applyLighting?: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value: 0.0 */\n heightOrigin?: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n heightOriginMode?: TerrainHeightOriginMode;\n /** If true, the terrain will not be locatable. Otherwise, [[BackgroundMapProps.nonLocatable]] will determine whether terrain is locatable.\n * @internal use [[BackgroundMapProps.nonLocatable]]. Retained for backwards compatibility only.\n */\n nonLocatable?: boolean;\n}\n\n/** Correction modes for terrain height\n * @see [[TerrainProps]]\n * @public\n * @extensions\n */\nexport enum TerrainHeightOriginMode {\n /** Height value indicates the geodetic height of the IModel origin (also referred to as ellipsoidal or GPS height) */\n Geodetic = 0,\n /** Height value indicates the geoidal height of the IModel origin (commonly referred to as sea level). */\n Geoid = 1,\n /** Height value indicates the height of the IModel origin relative to ground level at project center. */\n Ground = 2,\n}\n\n/** Normalized version of [[TerrainProps]] for which provider has been validated and default values of all members are used.\n * @public\n */\nexport class TerrainSettings {\n private _nonLocatable: true | undefined;\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * Defaults to \"CesiumWorldTerrain\".\n */\n public readonly providerName: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n public readonly dataSource: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled. 1.0 indicates no exaggeration. Default value: 1.0 */\n public readonly exaggeration: number;\n /** Applying lighting can help to visualize subtle terrain variations. Default value: false */\n public readonly applyLighting: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value 0.0 */\n public readonly heightOrigin: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n public readonly heightOriginMode: TerrainHeightOriginMode;\n /** Optionally overrides [[BackgroundMapSettings.locatable]]. For backwards compatibility only.\n * @see [[TerrainProps.nonLocatable]].\n * @internal\n */\n public get nonLocatable(): true | undefined {\n return this._nonLocatable;\n }\n\n /** @deprecated in 4.5.x. Use the overload that takes [[TerrainProps]]. */\n constructor(providerName?: string, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode);\n\n constructor(props?: TerrainProps);\n\n /** @internal */\n constructor(providerNameOrProps: string | TerrainProps | undefined, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode) {\n let providerName;\n let dataSource;\n let nonLocatable;\n if (typeof providerNameOrProps === \"string\") {\n providerName = providerNameOrProps;\n } else if (providerNameOrProps) {\n ({ providerName, dataSource, exaggeration, applyLighting, heightOrigin, heightOriginMode, nonLocatable } = providerNameOrProps);\n }\n\n this.providerName = providerName ?? \"CesiumWorldTerrain\";\n this.dataSource = dataSource ?? \"\";\n this.exaggeration = Math.min(100, Math.max(0.1, exaggeration ?? 1.0));\n this.applyLighting = applyLighting ?? false;\n this.heightOrigin = heightOrigin ?? 0.0;\n\n if (true === nonLocatable)\n this._nonLocatable = true;\n\n switch (heightOriginMode) {\n case TerrainHeightOriginMode.Ground:\n case TerrainHeightOriginMode.Geoid:\n this.heightOriginMode = heightOriginMode;\n break;\n default:\n this.heightOriginMode = TerrainHeightOriginMode.Geodetic;\n break;\n }\n }\n\n public static fromJSON(json?: TerrainProps) {\n return new TerrainSettings(json);\n }\n\n /** Create settings that obtain terrain from a [Cesium ION asset](https://cesium.com/platform/cesium-ion/content/) such as\n * one of those defined by [[CesiumTerrainAssetId]].\n * @note You must ensure your Cesium ION account has access to the specified asset.\n */\n public static fromCesiumIonAsset(assetId: string = CesiumTerrainAssetId.Default, options?: Omit<TerrainProps, \"providerName\" | \"dataSource\">): TerrainSettings {\n return TerrainSettings.fromJSON({\n ...options,\n dataSource: assetId,\n });\n }\n\n public toJSON(): TerrainProps {\n const props: TerrainProps = { heightOriginMode: this.heightOriginMode };\n if (\"CesiumWorldTerrain\" !== this.providerName)\n props.providerName = this.providerName;\n if (this.dataSource)\n props.dataSource = this.dataSource;\n if (1 !== this.exaggeration)\n props.exaggeration = this.exaggeration;\n if (this.nonLocatable)\n props.nonLocatable = true;\n if (this.applyLighting)\n props.applyLighting = true;\n if (0 !== this.heightOrigin)\n props.heightOrigin = this.heightOrigin;\n\n return props;\n }\n\n public equals(other: TerrainSettings): boolean {\n return this.providerName === other.providerName && this.dataSource === other.dataSource && this.exaggeration === other.exaggeration && this.applyLighting === other.applyLighting\n && this.heightOrigin === other.heightOrigin && this.heightOriginMode === other.heightOriginMode && this.nonLocatable === other.nonLocatable;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(TerrainSettings.fromJSON(json));\n }\n\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A TerrainSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: TerrainProps): TerrainSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n providerName: changedProps.providerName ?? this.providerName,\n dataSource: changedProps.dataSource ?? this.dataSource,\n exaggeration: changedProps.exaggeration ?? this.exaggeration,\n nonLocatable: changedProps.nonLocatable ?? this.nonLocatable,\n applyLighting: changedProps.applyLighting ?? this.applyLighting,\n heightOrigin: changedProps.heightOrigin ?? this.heightOrigin,\n heightOriginMode: changedProps.heightOriginMode ?? this.heightOriginMode,\n };\n\n return TerrainSettings.fromJSON(props);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TerrainSettings.js","sourceRoot":"","sources":["../../src/TerrainSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;;GAKG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,yGAAyG;IACzG,qCAAa,CAAA;IACb,gJAAgJ;IAChJ,8CAAsB,CAAA;AACxB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAiCD;;;;GAIG;AACH,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,sHAAsH;IACtH,6EAAY,CAAA;IACZ,0GAA0G;IAC1G,uEAAS,CAAA;IACT,yGAAyG;IACzG,yEAAU,C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AM,CAAC,KAAsB;QAClC,OAAO,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC5K,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,gBAAgB,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,CAAC;IAChJ,CAAC;IAED,mFAAmF;IAC5E,UAAU,CAAC,IAAyB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAA2B;QACtC,IAAI,SAAS,KAAK,YAAY;YAC5B,OAAO,IAAI,CAAC;QAEd,MAAM,KAAK,GAAG;YACZ,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,UAAU,EAAE,YAAY,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU;YACtD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,aAAa,EAAE,YAAY,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;YAC/D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;SACzE,CAAC;QAEF,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AA/HD,0CA+HC","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 { BackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** Ids of [Cesium ION assets](https://cesium.com/platform/cesium-ion/content/) providing global terrain data.\n * These values are appropriate to use with [[TerrainSettings.dataSource]] when [[TerrainSettings.providerName]] is set to \"CesiumWorldTerrain\".\n * You may alternatively use the Id of any ION asset to which you have access.\n * @see [[TerrainSettings.fromCesiumIonAsset]] to create TerrainSettings that obtain terrain from a specified ION asset.\n * @public\n */\nexport enum CesiumTerrainAssetId {\n /** Default [global 3d terrain](https://cesium.com/platform/cesium-ion/content/cesium-world-terrain/). */\n Default = \"1\",\n /** Global 3d terrain that includes [bathymetry](https://cesium.com/platform/cesium-ion/content/cesium-world-bathymetry/) (seafloor) terrain. */\n Bathymetry = \"2426648\",\n}\n\n/** JSON representation of the settings of the terrain applied to background map display by a [[DisplayStyle]].\n * @see [[DisplayStyleSettingsProps]]\n * @see [[BackgroundMapProps]]\n * @public\n * @extensions\n */\nexport interface TerrainProps {\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * If omitted, it defaults to \"CesiumWorldTerrain\".\n */\n providerName?: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n dataSource?: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled.false (or 1.0) indicate no exaggeration. Default value: 1.0 */\n exaggeration?: number;\n /** Applying lighting can help to visualize subtle terrain variation. Default value: true */\n applyLighting?: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value: 0.0 */\n heightOrigin?: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n heightOriginMode?: TerrainHeightOriginMode;\n /** If true, the terrain will not be locatable. Otherwise, [[BackgroundMapProps.nonLocatable]] will determine whether terrain is locatable.\n * @internal use [[BackgroundMapProps.nonLocatable]]. Retained for backwards compatibility only.\n */\n nonLocatable?: boolean;\n}\n\n/** Correction modes for terrain height\n * @see [[TerrainProps]]\n * @public\n * @extensions\n */\nexport enum TerrainHeightOriginMode {\n /** Height value indicates the geodetic height of the IModel origin (also referred to as ellipsoidal or GPS height) */\n Geodetic = 0,\n /** Height value indicates the geoidal height of the IModel origin (commonly referred to as sea level). */\n Geoid = 1,\n /** Height value indicates the height of the IModel origin relative to ground level at project center. */\n Ground = 2,\n}\n\n/** Normalized version of [[TerrainProps]] for which provider has been validated and default values of all members are used.\n * @public\n */\nexport class TerrainSettings {\n private _nonLocatable: true | undefined;\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * Defaults to \"CesiumWorldTerrain\".\n */\n public readonly providerName: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n public readonly dataSource: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled. 1.0 indicates no exaggeration. Default value: 1.0 */\n public readonly exaggeration: number;\n /** Applying lighting can help to visualize subtle terrain variations. Default value: false */\n public readonly applyLighting: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value 0.0 */\n public readonly heightOrigin: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n public readonly heightOriginMode: TerrainHeightOriginMode;\n /** Optionally overrides [[BackgroundMapSettings.locatable]]. For backwards compatibility only.\n * @see [[TerrainProps.nonLocatable]].\n * @internal\n */\n public get nonLocatable(): true | undefined {\n return this._nonLocatable;\n }\n\n /** @deprecated in 4.5.x. Use the overload that takes [[TerrainProps]]. */\n constructor(providerName?: string, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode);\n\n constructor(props?: TerrainProps);\n\n /** @internal */\n constructor(providerNameOrProps: string | TerrainProps | undefined, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode) {\n let providerName;\n let dataSource;\n let nonLocatable;\n if (typeof providerNameOrProps === \"string\") {\n providerName = providerNameOrProps;\n } else if (providerNameOrProps) {\n ({ providerName, dataSource, exaggeration, applyLighting, heightOrigin, heightOriginMode, nonLocatable } = providerNameOrProps);\n }\n\n this.providerName = providerName ?? \"CesiumWorldTerrain\";\n this.dataSource = dataSource ?? \"\";\n this.exaggeration = Math.min(100, Math.max(0.1, exaggeration ?? 1.0));\n this.applyLighting = applyLighting ?? false;\n this.heightOrigin = heightOrigin ?? 0.0;\n\n if (true === nonLocatable)\n this._nonLocatable = true;\n\n switch (heightOriginMode) {\n case TerrainHeightOriginMode.Ground:\n case TerrainHeightOriginMode.Geoid:\n this.heightOriginMode = heightOriginMode;\n break;\n default:\n this.heightOriginMode = TerrainHeightOriginMode.Geodetic;\n break;\n }\n }\n\n public static fromJSON(json?: TerrainProps) {\n return new TerrainSettings(json);\n }\n\n /** Create settings that obtain terrain from a [Cesium ION asset](https://cesium.com/platform/cesium-ion/content/) such as\n * one of those defined by [[CesiumTerrainAssetId]].\n * @note You must ensure your Cesium ION account has access to the specified asset.\n */\n public static fromCesiumIonAsset(assetId: string = CesiumTerrainAssetId.Default, options?: Omit<TerrainProps, \"providerName\" | \"dataSource\">): TerrainSettings {\n return TerrainSettings.fromJSON({\n ...options,\n dataSource: assetId,\n });\n }\n\n public toJSON(): TerrainProps {\n const props: TerrainProps = { heightOriginMode: this.heightOriginMode };\n if (\"CesiumWorldTerrain\" !== this.providerName)\n props.providerName = this.providerName;\n if (this.dataSource)\n props.dataSource = this.dataSource;\n if (1 !== this.exaggeration)\n props.exaggeration = this.exaggeration;\n if (this.nonLocatable)\n props.nonLocatable = true;\n if (this.applyLighting)\n props.applyLighting = true;\n if (0 !== this.heightOrigin)\n props.heightOrigin = this.heightOrigin;\n\n return props;\n }\n\n public equals(other: TerrainSettings): boolean {\n return this.providerName === other.providerName && this.dataSource === other.dataSource && this.exaggeration === other.exaggeration && this.applyLighting === other.applyLighting\n && this.heightOrigin === other.heightOrigin && this.heightOriginMode === other.heightOriginMode && this.nonLocatable === other.nonLocatable;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(TerrainSettings.fromJSON(json));\n }\n\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A TerrainSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: TerrainProps): TerrainSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n providerName: changedProps.providerName ?? this.providerName,\n dataSource: changedProps.dataSource ?? this.dataSource,\n exaggeration: changedProps.exaggeration ?? this.exaggeration,\n nonLocatable: changedProps.nonLocatable ?? this.nonLocatable,\n applyLighting: changedProps.applyLighting ?? this.applyLighting,\n heightOrigin: changedProps.heightOrigin ?? this.heightOrigin,\n heightOriginMode: changedProps.heightOriginMode ?? this.heightOriginMode,\n };\n\n return TerrainSettings.fromJSON(props);\n }\n}\n"]}
|
|
@@ -31,8 +31,12 @@ export declare class TextureMapping {
|
|
|
31
31
|
/** The parameters describing how the textures are mapped to the surface. */
|
|
32
32
|
readonly params: TextureMapping.Params;
|
|
33
33
|
constructor(tx: RenderTexture, params: TextureMapping.Params);
|
|
34
|
-
/**
|
|
35
|
-
|
|
34
|
+
/** Compute texture coordinates for a polyface.
|
|
35
|
+
* @param visitor The polyface for which to compute UV coordinates based on this texture mapping.
|
|
36
|
+
* @param localToWorld The polyface's local-to-world transform, used for [[TextureMapping.Mode.ElevationDrape]].
|
|
37
|
+
* @returns the texture coordinates, or undefined if computation failed.
|
|
38
|
+
*/
|
|
39
|
+
computeUVParams(visitor: PolyfaceVisitor, localToWorld?: Transform): Point2d[] | undefined;
|
|
36
40
|
/** An [OrderedComparator]($bentley) that compares this mapping against `other`. */
|
|
37
41
|
compare(other: TextureMapping): number;
|
|
38
42
|
}
|
|
@@ -44,17 +48,17 @@ export declare namespace TextureMapping {
|
|
|
44
48
|
Parametric = 0,
|
|
45
49
|
ElevationDrape = 1,
|
|
46
50
|
Planar = 2,
|
|
47
|
-
/**
|
|
51
|
+
/** Currently unsupported. */
|
|
48
52
|
DirectionalDrape = 3,
|
|
49
|
-
/**
|
|
53
|
+
/** Currently unsupported. */
|
|
50
54
|
Cubic = 4,
|
|
51
|
-
/**
|
|
55
|
+
/** Currently unsupported. */
|
|
52
56
|
Spherical = 5,
|
|
53
|
-
/**
|
|
57
|
+
/** Currently unsupported. */
|
|
54
58
|
Cylindrical = 6,
|
|
55
|
-
/**
|
|
59
|
+
/** Currently unsupported. */
|
|
56
60
|
Solid = 7,
|
|
57
|
-
/**
|
|
61
|
+
/** Currently unsupported. */
|
|
58
62
|
FrontProject = 8
|
|
59
63
|
}
|
|
60
64
|
/** A 2x3 matrix for mapping a texture image to a surface. */
|
|
@@ -116,7 +120,6 @@ export declare namespace TextureMapping {
|
|
|
116
120
|
* @note Defaults to [[TextureMapping.Mode.Parametric]].
|
|
117
121
|
*/
|
|
118
122
|
mapMode?: TextureMapping.Mode;
|
|
119
|
-
/** @internal */
|
|
120
123
|
worldMapping?: boolean;
|
|
121
124
|
/** True if want to use constant LOD texture mapping for the surface texture. */
|
|
122
125
|
useConstantLod?: boolean;
|
|
@@ -133,7 +136,6 @@ export declare namespace TextureMapping {
|
|
|
133
136
|
weight: number;
|
|
134
137
|
/** The mode by which to map the image to a surface. */
|
|
135
138
|
mode: TextureMapping.Mode;
|
|
136
|
-
/** @internal */
|
|
137
139
|
worldMapping: boolean;
|
|
138
140
|
/** True if want to use constant LOD texture mapping for the surface texture. */
|
|
139
141
|
useConstantLod: boolean;
|
|
@@ -142,11 +144,12 @@ export declare namespace TextureMapping {
|
|
|
142
144
|
constructor(props?: TextureMapping.ParamProps);
|
|
143
145
|
/** An [OrderedComparator]($bentley) that compares these Params against `other`. */
|
|
144
146
|
compare(other: Params): number;
|
|
145
|
-
/**
|
|
146
|
-
*
|
|
147
|
-
* @
|
|
147
|
+
/** Compute texture coordinates for a polyface.
|
|
148
|
+
* @param visitor The polyface for which to compute UV coordinates based on this texture mapping.
|
|
149
|
+
* @param localToWorld The polyface's local-to-world transform, used for [[TextureMapping.Mode.ElevationDrape]].
|
|
150
|
+
* @returns the texture coordinates, or undefined if computation failed.
|
|
148
151
|
*/
|
|
149
|
-
computeUVParams(visitor: IndexedPolyfaceVisitor,
|
|
152
|
+
computeUVParams(visitor: IndexedPolyfaceVisitor, localToWorld?: Transform): Point2d[] | undefined;
|
|
150
153
|
/** Computes UV parameters given a texture mapping mode of parametric. */
|
|
151
154
|
private computeParametricUVParams;
|
|
152
155
|
/** Computes UV parameters given a texture mapping mode of planar. The result is stored in the Point2d array given. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextureMapping.d.ts","sourceRoot":"","sources":["../../src/TextureMapping.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAY,OAAO,EAAW,eAAe,EAAE,SAAS,EAAY,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACvI,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oHAAoH;IACpH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAQD;;GAEG;AACH,qBAAa,cAAc;IACzB,gLAAgL;IAChL,SAAgB,OAAO,EAAE,aAAa,CAAC;IACvC;;OAEG;I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