@itwin/core-common 3.0.0-dev.98 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +158 -17
- package/LICENSE.md +1 -1
- package/lib/cjs/BackgroundMapSettings.d.ts +1 -1
- package/lib/cjs/BackgroundMapSettings.d.ts.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts +28 -11
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.js +26 -12
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.d.ts +36 -16
- package/lib/cjs/ContextRealityModel.d.ts.map +1 -1
- package/lib/cjs/ContextRealityModel.js +46 -7
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.d.ts +30 -24
- package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +43 -16
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlReader.d.ts +17 -5
- package/lib/cjs/ECSqlReader.d.ts.map +1 -1
- package/lib/cjs/ECSqlReader.js +55 -22
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.d.ts +3 -3
- package/lib/cjs/ECSqlTypes.js +3 -3
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/EntityProps.d.ts +8 -1
- package/lib/cjs/EntityProps.d.ts.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/Environment.d.ts +61 -0
- package/lib/cjs/Environment.d.ts.map +1 -0
- package/lib/cjs/Environment.js +74 -0
- package/lib/cjs/Environment.js.map +1 -0
- package/lib/cjs/FeatureSymbology.d.ts +97 -18
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +83 -27
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.d.ts +66 -1
- package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +39 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/Gradient.d.ts.map +1 -1
- package/lib/cjs/Gradient.js +10 -0
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GroundPlane.d.ts +26 -15
- package/lib/cjs/GroundPlane.d.ts.map +1 -1
- package/lib/cjs/GroundPlane.js +40 -39
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/IModel.d.ts +33 -4
- package/lib/cjs/IModel.d.ts.map +1 -1
- package/lib/cjs/IModel.js +27 -10
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/Localization.d.ts +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapLayerSettings.d.ts +2 -2
- package/lib/cjs/MapLayerSettings.js +2 -2
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/NativeAppProps.d.ts +2 -36
- package/lib/cjs/NativeAppProps.d.ts.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/PlanarClipMask.d.ts +73 -8
- package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
- package/lib/cjs/PlanarClipMask.js +17 -24
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.d.ts +42 -0
- package/lib/cjs/RealityDataAccessProps.d.ts.map +1 -0
- package/lib/cjs/RealityDataAccessProps.js +20 -0
- package/lib/cjs/RealityDataAccessProps.js.map +1 -0
- package/lib/cjs/RenderSchedule.d.ts +4 -0
- package/lib/cjs/RenderSchedule.d.ts.map +1 -1
- package/lib/cjs/RenderSchedule.js +5 -1
- package/lib/cjs/RenderSchedule.js.map +1 -1
- package/lib/cjs/RenderTexture.d.ts +8 -1
- package/lib/cjs/RenderTexture.d.ts.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/SkyBox.d.ts +142 -34
- package/lib/cjs/SkyBox.d.ts.map +1 -1
- package/lib/cjs/SkyBox.js +192 -6
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/TextureProps.d.ts +21 -2
- package/lib/cjs/TextureProps.d.ts.map +1 -1
- package/lib/cjs/TextureProps.js +19 -0
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.d.ts +6 -0
- package/lib/cjs/ThematicDisplay.d.ts.map +1 -1
- package/lib/cjs/ThematicDisplay.js +26 -0
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/TileProps.d.ts +6 -0
- package/lib/cjs/TileProps.d.ts.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/ViewFlags.d.ts +8 -0
- package/lib/cjs/ViewFlags.d.ts.map +1 -1
- package/lib/cjs/ViewFlags.js +30 -10
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/core-common.d.ts +7 -0
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +7 -0
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.d.ts +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.d.ts +25 -10
- package/lib/cjs/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js +9 -7
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.d.ts +1 -1
- package/lib/cjs/geometry/FrustumPlanes.d.ts.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js +26 -13
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.d.ts +3 -3
- package/lib/cjs/geometry/GeometryStream.d.ts.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.d.ts +12 -5
- package/lib/cjs/ipc/IpcWebSocket.d.ts.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js +32 -8
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.d.ts +15 -0
- package/lib/cjs/ipc/IpcWebSocketTransport.d.ts.map +1 -0
- package/lib/cjs/ipc/IpcWebSocketTransport.js +142 -0
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -0
- package/lib/cjs/rpc/core/RpcInvocation.d.ts +4 -4
- package/lib/cjs/rpc/core/RpcInvocation.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +3 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.d.ts +5 -1
- package/lib/cjs/tile/ElementGraphics.d.ts.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.d.ts +16 -79
- package/lib/cjs/tile/GltfTileIO.d.ts.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js +72 -153
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.d.ts +20 -8
- package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +50 -53
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.d.ts +1 -1
- package/lib/esm/BackgroundMapSettings.d.ts.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +28 -11
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.js +26 -12
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.d.ts +36 -16
- package/lib/esm/ContextRealityModel.d.ts.map +1 -1
- package/lib/esm/ContextRealityModel.js +45 -6
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.d.ts +30 -24
- package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +43 -16
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlReader.d.ts +17 -5
- package/lib/esm/ECSqlReader.d.ts.map +1 -1
- package/lib/esm/ECSqlReader.js +56 -23
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.d.ts +3 -3
- package/lib/esm/ECSqlTypes.js +3 -3
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/EntityProps.d.ts +8 -1
- package/lib/esm/EntityProps.d.ts.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/Environment.d.ts +61 -0
- package/lib/esm/Environment.d.ts.map +1 -0
- package/lib/esm/Environment.js +70 -0
- package/lib/esm/Environment.js.map +1 -0
- package/lib/esm/FeatureSymbology.d.ts +97 -18
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +84 -28
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.d.ts +66 -1
- package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
- package/lib/esm/GeoCoordinateServices.js +39 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/Gradient.d.ts.map +1 -1
- package/lib/esm/Gradient.js +10 -0
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GroundPlane.d.ts +26 -15
- package/lib/esm/GroundPlane.d.ts.map +1 -1
- package/lib/esm/GroundPlane.js +40 -39
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/IModel.d.ts +33 -4
- package/lib/esm/IModel.d.ts.map +1 -1
- package/lib/esm/IModel.js +27 -10
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/Localization.d.ts +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapLayerSettings.d.ts +2 -2
- package/lib/esm/MapLayerSettings.js +2 -2
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/NativeAppProps.d.ts +2 -36
- package/lib/esm/NativeAppProps.d.ts.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/PlanarClipMask.d.ts +73 -8
- package/lib/esm/PlanarClipMask.d.ts.map +1 -1
- package/lib/esm/PlanarClipMask.js +17 -24
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.d.ts +42 -0
- package/lib/esm/RealityDataAccessProps.d.ts.map +1 -0
- package/lib/esm/RealityDataAccessProps.js +17 -0
- package/lib/esm/RealityDataAccessProps.js.map +1 -0
- package/lib/esm/RenderSchedule.d.ts +4 -0
- package/lib/esm/RenderSchedule.d.ts.map +1 -1
- package/lib/esm/RenderSchedule.js +5 -1
- package/lib/esm/RenderSchedule.js.map +1 -1
- package/lib/esm/RenderTexture.d.ts +8 -1
- package/lib/esm/RenderTexture.d.ts.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/SkyBox.d.ts +142 -34
- package/lib/esm/SkyBox.d.ts.map +1 -1
- package/lib/esm/SkyBox.js +187 -5
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/TextureProps.d.ts +21 -2
- package/lib/esm/TextureProps.d.ts.map +1 -1
- package/lib/esm/TextureProps.js +18 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.d.ts +6 -0
- package/lib/esm/ThematicDisplay.d.ts.map +1 -1
- package/lib/esm/ThematicDisplay.js +26 -0
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/TileProps.d.ts +6 -0
- package/lib/esm/TileProps.d.ts.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/ViewFlags.d.ts +8 -0
- package/lib/esm/ViewFlags.d.ts.map +1 -1
- package/lib/esm/ViewFlags.js +30 -10
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/core-common.d.ts +7 -0
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +7 -0
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.d.ts +1 -1
- package/lib/esm/geometry/AdditionalTransform.js +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.d.ts +25 -10
- package/lib/esm/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js +9 -7
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.d.ts +1 -1
- package/lib/esm/geometry/FrustumPlanes.d.ts.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js +26 -13
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.d.ts +3 -3
- package/lib/esm/geometry/GeometryStream.d.ts.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.d.ts +12 -5
- package/lib/esm/ipc/IpcWebSocket.d.ts.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js +31 -6
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.d.ts +15 -0
- package/lib/esm/ipc/IpcWebSocketTransport.d.ts.map +1 -0
- package/lib/esm/ipc/IpcWebSocketTransport.js +138 -0
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -0
- package/lib/esm/rpc/core/RpcInvocation.d.ts +4 -4
- package/lib/esm/rpc/core/RpcInvocation.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +3 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.d.ts +5 -1
- package/lib/esm/tile/ElementGraphics.d.ts.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.d.ts +16 -79
- package/lib/esm/tile/GltfTileIO.d.ts.map +1 -1
- package/lib/esm/tile/GltfTileIO.js +70 -149
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.d.ts +20 -8
- package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
- package/lib/esm/tile/TileMetadata.js +50 -53
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package.json +10 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/Environment.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAmB/C;;;;GAIG;AACH,MAAM,OAAO,WAAW;IAgBtB,YAAsB,KAAsC;;QAC1D,IAAI,CAAC,UAAU,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,mCAAI,KAAK,CAAC;QAC7C,IAAI,CAAC,aAAa,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,mCAAI,KAAK,CAAC;QACnD,IAAI,CAAC,GAAG,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,mCAAI,MAAM,CAAC,QAAQ,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,mCAAI,WAAW,CAAC,QAAQ,CAAC;IACtD,CAAC;IAKD,qHAAqH;IAC9G,MAAM,CAAC,MAAM,CAAC,KAAsC;QAC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AE,GAAG,EAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;YACxD,MAAM,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;SACvE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAA6C;QACxD,IAAI,CAAC,YAAY;YACf,OAAO,IAAI,CAAC;QAEd,OAAO,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IAC1D,CAAC;;AAnDD,wEAAwE;AACjD,oBAAQ,GAAG,IAAI,WAAW,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\r\nimport { GroundPlane, GroundPlaneProps } from \"./GroundPlane\";\r\nimport { SkyBox, SkyBoxProps } from \"./SkyBox\";\r\n\r\n/** JSON representation of an [[Environment]].\r\n * @see [[DisplayStyle3dSettingsProps.environment]].\r\n * @public\r\n */\r\nexport interface EnvironmentProps {\r\n /** @see [[Environment.ground]] and [[Environment.displayGround]]. */\r\n ground?: GroundPlaneProps;\r\n /** @see [[Environment.sky]] and [[Environment.displaySky]]. */\r\n sky?: SkyBoxProps;\r\n}\r\n\r\n/** A type containing all of the properties of [[Environment]] with none of the methods and with the `readonly` modifiers removed.\r\n * @see [[Environment.create]] and [[Environment.clone]].\r\n * @public\r\n */\r\nexport type EnvironmentProperties = NonFunctionPropertiesOf<Environment>;\r\n\r\n/** As part of a [[DisplayStyle3dSettings]], controls the display of a [[SkyBox]] and [[GroundPlane]] to simulate the\r\n * outdoor environment.\r\n * @see [[DisplayStyle3dSettings.environment]].\r\n * @public\r\n */\r\nexport class Environment {\r\n /** If true, the sky box will be displayed.\r\n * Default: false.\r\n * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleSkyBox]] to change this.\r\n */\r\n public readonly displaySky: boolean;\r\n /** If true, the ground plane will be displayed.\r\n * Default: false.\r\n * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleGroundPlane]] to change this.\r\n */\r\n public readonly displayGround: boolean;\r\n /** Describes how the sky box should be drawn. */\r\n public readonly sky: SkyBox;\r\n /** Describes how the ground plane should be drawn. */\r\n public readonly ground: GroundPlane;\r\n\r\n protected constructor(props?: Partial<EnvironmentProperties>) {\r\n this.displaySky = props?.displaySky ?? false;\r\n this.displayGround = props?.displayGround ?? false;\r\n this.sky = props?.sky ?? SkyBox.defaults;\r\n this.ground = props?.ground ?? GroundPlane.defaults;\r\n }\r\n\r\n /** Default settings with neither ground plane nor sky box displayed. */\r\n public static readonly defaults = new Environment();\r\n\r\n /** Create a new Environment. Any properties not specified by `props` will be initialized to their default values. */\r\n public static create(props?: Partial<EnvironmentProperties>): Environment {\r\n return props ? new this(props) : this.defaults;\r\n }\r\n\r\n /** Create a copy of this environment, changing the `displayGround` and/or `displaySky` flags. */\r\n public withDisplay(display: { sky?: boolean, ground?: boolean }): Environment {\r\n const displaySky = display.sky ?? this.displaySky;\r\n const displayGround = display.ground ?? this.displayGround;\r\n if (displaySky === this.displaySky && displayGround === this.displayGround)\r\n return this;\r\n\r\n return Environment.create({\r\n ...this,\r\n displaySky: displaySky ?? this.displaySky,\r\n displayGround: displayGround ?? this.displayGround,\r\n });\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): EnvironmentProps {\r\n return {\r\n sky: this.sky.toJSON(this.displaySky),\r\n ground: this.ground.toJSON(this.displayGround),\r\n };\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props?: EnvironmentProps): Environment {\r\n if (!props)\r\n return this.defaults;\r\n\r\n return new this({\r\n displaySky: props?.sky?.display,\r\n displayGround: props?.ground?.display,\r\n sky: props?.sky ? SkyBox.fromJSON(props.sky) : undefined,\r\n ground: props?.ground ? GroundPlane.fromJSON(props.ground) : undefined,\r\n });\r\n }\r\n\r\n /** Create a copy of this environment, identical except for any properties specified by `changedProps`.\r\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\r\n */\r\n public clone(changedProps?: Partial<EnvironmentProperties>): Environment {\r\n if (!changedProps)\r\n return this;\r\n\r\n return Environment.create({ ...this, ...changedProps });\r\n }\r\n}\r\n"]}
|
|
@@ -8,38 +8,54 @@ import { GeometryClass } from "./GeometryParams";
|
|
|
8
8
|
import { LinePixels } from "./LinePixels";
|
|
9
9
|
import { RgbColor, RgbColorProps } from "./RgbColor";
|
|
10
10
|
import { SubCategoryOverride } from "./SubCategoryOverride";
|
|
11
|
-
/**
|
|
11
|
+
/** JSON representation of a [[FeatureAppearance]].
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
14
|
export interface FeatureAppearanceProps {
|
|
15
|
-
/**
|
|
15
|
+
/** @see [[FeatureAppearance.rgb]]. */
|
|
16
16
|
rgb?: RgbColorProps;
|
|
17
|
-
/**
|
|
17
|
+
/** @see [[FeatureAppearance.weight]]. */
|
|
18
18
|
weight?: number;
|
|
19
|
-
/**
|
|
19
|
+
/** @see [[FeatureAppearance.transparency]]. */
|
|
20
20
|
transparency?: number;
|
|
21
|
-
/**
|
|
21
|
+
/** @see [[FeatureAppearance.viewDependentTransparency]]. */
|
|
22
|
+
viewDependentTransparency?: true;
|
|
23
|
+
/** @see [[FeatureAppearance.linePixels]]. */
|
|
22
24
|
linePixels?: LinePixels;
|
|
23
|
-
/**
|
|
24
|
-
ignoresMaterial?: true
|
|
25
|
-
/**
|
|
26
|
-
nonLocatable?: true
|
|
27
|
-
/**
|
|
28
|
-
emphasized?: true
|
|
25
|
+
/** @see [[FeatureAppearance.ignoresMaterial]]. */
|
|
26
|
+
ignoresMaterial?: true;
|
|
27
|
+
/** @see [[FeatureAppearance.nonLocatable]]. */
|
|
28
|
+
nonLocatable?: true;
|
|
29
|
+
/** @see [[FeatureAppearance.emphasized]]. */
|
|
30
|
+
emphasized?: true;
|
|
29
31
|
}
|
|
30
32
|
/** Defines overrides for selected aspects of a [[Feature]]'s symbology.
|
|
31
33
|
* Any member defined in the appearance overrides that aspect of symbology for all [[Feature]]s to which the appearance is applied.
|
|
32
34
|
* @see [[FeatureOverrides]] to customize the appearance of multiple features.
|
|
33
35
|
* @public
|
|
34
36
|
*/
|
|
35
|
-
export declare class FeatureAppearance
|
|
37
|
+
export declare class FeatureAppearance {
|
|
38
|
+
/** Overrides the feature's color. */
|
|
36
39
|
readonly rgb?: RgbColor;
|
|
40
|
+
/** The width of lines and edges in pixels as an integer in [1, 31]. */
|
|
37
41
|
readonly weight?: number;
|
|
42
|
+
/** The transparency in the range [0, 1] where 0 indicates fully opaque and 1 indicates fully transparent.
|
|
43
|
+
* @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).
|
|
44
|
+
*/
|
|
38
45
|
readonly transparency?: number;
|
|
46
|
+
/** The pixel pattern applied to lines and edges. */
|
|
39
47
|
readonly linePixels?: LinePixels;
|
|
40
|
-
|
|
41
|
-
readonly
|
|
42
|
-
|
|
48
|
+
/** If true, don't apply the [[RenderMaterial]] to the feature's surfaces. */
|
|
49
|
+
readonly ignoresMaterial?: true;
|
|
50
|
+
/** If true, the feature will not be drawn when using [Viewport.readPixels]($frontend), meaning [Tool]($frontend)s will not be able to interact with it. */
|
|
51
|
+
readonly nonLocatable?: true;
|
|
52
|
+
/** If true, the feature will be rendered using the [[Hilite.Settings]] defined by [Viewport.emphasisSettings]($frontend) to make it stand out. */
|
|
53
|
+
readonly emphasized?: true;
|
|
54
|
+
/** If true, then [[transparency]] will only be applied if [[ViewFlags.transparency]] is enabled and the current [[RenderMode]] supports transparency.
|
|
55
|
+
* Default: false, meaning the transparency will be applied regardless of view flags or render mode.
|
|
56
|
+
* This property has no effect if [[transparency]] is `undefined`.
|
|
57
|
+
*/
|
|
58
|
+
readonly viewDependentTransparency?: true;
|
|
43
59
|
/** An appearance that overrides nothing. */
|
|
44
60
|
static readonly defaults: FeatureAppearance;
|
|
45
61
|
static fromJSON(props?: FeatureAppearanceProps): FeatureAppearance;
|
|
@@ -50,10 +66,12 @@ export declare class FeatureAppearance implements FeatureAppearanceProps {
|
|
|
50
66
|
/** Create a FeatureAppearance that overrides the RGB and transparency.
|
|
51
67
|
* The appearance's transparency is derived from the transparency component of the ColorDef.
|
|
52
68
|
*/
|
|
53
|
-
static fromRgba(color: ColorDef): FeatureAppearance;
|
|
69
|
+
static fromRgba(color: ColorDef, viewDependentTransparency?: boolean): FeatureAppearance;
|
|
54
70
|
/** Create a FeatureAppearance that overrides only the transparency */
|
|
55
|
-
static fromTransparency(transparencyValue: number): FeatureAppearance;
|
|
56
|
-
/** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.
|
|
71
|
+
static fromTransparency(transparencyValue: number, viewDependent?: boolean): FeatureAppearance;
|
|
72
|
+
/** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.
|
|
73
|
+
* @note Subcategory overrides set [[viewDependentTransparency]] to `true`.
|
|
74
|
+
*/
|
|
57
75
|
static fromSubCategoryOverride(ovr: SubCategoryOverride): FeatureAppearance;
|
|
58
76
|
/** Returns true if this appearance does not override any aspects of symbology. */
|
|
59
77
|
get matchesDefaults(): boolean;
|
|
@@ -90,6 +108,7 @@ export declare class FeatureAppearance implements FeatureAppearanceProps {
|
|
|
90
108
|
extendAppearance(base: FeatureAppearance): FeatureAppearance;
|
|
91
109
|
protected constructor(props: FeatureAppearanceProps);
|
|
92
110
|
private rgbIsEqual;
|
|
111
|
+
private transparencyIsEqual;
|
|
93
112
|
}
|
|
94
113
|
/** Interface adopted by an object that can supply a [[FeatureAppearance]] given a low-level description of a [[Feature]].
|
|
95
114
|
* @see [[FeatureOverrides]] for the commonly-used implementation.
|
|
@@ -113,6 +132,61 @@ export interface FeatureAppearanceSource {
|
|
|
113
132
|
*/
|
|
114
133
|
getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;
|
|
115
134
|
}
|
|
135
|
+
/** Common options for [[FeatureOverrides.override]].
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
export interface OverrideFeatureAppearanceOptions {
|
|
139
|
+
/** Specifies the aspects of the [[Feature]]'s appearance to be overridden. */
|
|
140
|
+
appearance: FeatureAppearance;
|
|
141
|
+
/** Specifies what to do if a [[FeatureAppearance]] has already been configured for the specified element, model, or subcategory by a previous call to [[FeatureOverrides.override]].
|
|
142
|
+
* - "subsume" (the default): Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by the existing appearance will be overwritten
|
|
143
|
+
* if also overridden by [[appearance]].
|
|
144
|
+
* - The resulting appearance is computed as `existingAppearance.extendAppearance(newAppearance)`.
|
|
145
|
+
* - "extend": Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by [[appearance]] will only
|
|
146
|
+
* apply if that aspect is not already overridden by a previous appearance.
|
|
147
|
+
* - The resulting appearance is computed as `newAppearance.extendAppearance(existingAppearance)`.
|
|
148
|
+
* - "replace": Completely replace the existing appearance with [[appearance]].
|
|
149
|
+
* - "skip": Keep the existing appearance.
|
|
150
|
+
*/
|
|
151
|
+
onConflict?: "extend" | "subsume" | "replace" | "skip";
|
|
152
|
+
}
|
|
153
|
+
/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricModel]($backend).
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
export interface OverrideModelAppearanceOptions extends OverrideFeatureAppearanceOptions {
|
|
157
|
+
/** The Id of the model whose appearance is to be overridden. */
|
|
158
|
+
modelId: Id64String;
|
|
159
|
+
/** @internal */
|
|
160
|
+
elementId?: never;
|
|
161
|
+
/** @internal */
|
|
162
|
+
subCategoryId?: never;
|
|
163
|
+
}
|
|
164
|
+
/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricElement]($backend).
|
|
165
|
+
* @public
|
|
166
|
+
*/
|
|
167
|
+
export interface OverrideElementAppearanceOptions extends OverrideFeatureAppearanceOptions {
|
|
168
|
+
/** The Id of the element whose appearance is to be overridden. */
|
|
169
|
+
elementId: Id64String;
|
|
170
|
+
/** @internal */
|
|
171
|
+
modelId?: never;
|
|
172
|
+
/** @internal */
|
|
173
|
+
subCategoryId?: never;
|
|
174
|
+
}
|
|
175
|
+
/** Options for using [[FeatureOverrides.override]] to override the appearance of a [SubCategory]($backend).
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
export interface OverrideSubCategoryAppearanceOptions extends OverrideFeatureAppearanceOptions {
|
|
179
|
+
/** The Id of the subcategory whose appearance is to be overridden. */
|
|
180
|
+
subCategoryId: Id64String;
|
|
181
|
+
/** @internal */
|
|
182
|
+
modelId?: never;
|
|
183
|
+
/** @internal */
|
|
184
|
+
elementId?: never;
|
|
185
|
+
}
|
|
186
|
+
/** Arguments supplied to [[FeatureOverrides.override]].
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
export declare type OverrideFeatureAppearanceArgs = OverrideElementAppearanceOptions | OverrideModelAppearanceOptions | OverrideSubCategoryAppearanceOptions;
|
|
116
190
|
/** Specifies how to customize the appearance of individual [[Feature]]s, typically within the context of a [Viewport]($frontend).
|
|
117
191
|
* Individual aspects of a feature's appearance - like visibility, color, and transparency - are overridden by supplying a [[FeatureAppearance]].
|
|
118
192
|
* Those overrides can be specified on the basis of the feature's model, element, and/or subcategory. A default set of overrides can also be specified to
|
|
@@ -237,12 +311,15 @@ export declare class FeatureOverrides implements FeatureAppearanceSource {
|
|
|
237
311
|
* @see [[ViewFlags.constructions]], [[ViewFlags.dimensions]], and [[ViewFlags.patterns]].
|
|
238
312
|
*/
|
|
239
313
|
isClassVisible(geomClass: GeometryClass): boolean;
|
|
314
|
+
/** Specify overrides for all elements belonging to a specified [GeometricModel]($backend), or all geometry belonging to a specified [GeometricElement]($backend) or [SubCategory]($backend). */
|
|
315
|
+
override(args: OverrideFeatureAppearanceArgs): void;
|
|
240
316
|
/** Specify overrides for all elements within the specified model.
|
|
241
317
|
* @param id The Id of the model.
|
|
242
318
|
* @param app The symbology overrides.
|
|
243
319
|
* @param replaceExisting Specifies whether to replace a pre-existing override for the same model.
|
|
244
320
|
* @note These overrides take priority over all other overrides.
|
|
245
321
|
* @note If [[defaultOverrides]] are defined, they will not apply to any element within this model, even if the supplied appearance overrides nothing.
|
|
322
|
+
* @deprecated Use [[FeatureOverrides.override]].
|
|
246
323
|
*/
|
|
247
324
|
overrideModel(id: Id64String, app: FeatureAppearance, replaceExisting?: boolean): void;
|
|
248
325
|
/** Specify overrides for all geometry belonging to the specified [SubCategory]($backend).
|
|
@@ -251,6 +328,7 @@ export declare class FeatureOverrides implements FeatureAppearanceSource {
|
|
|
251
328
|
* @param replaceExisting Specifies whether to replace a pre-existing override for the same subcategory.
|
|
252
329
|
* @note These overrides have lower priority than element and model overrides.
|
|
253
330
|
* @note If [[defaultOverrides]] are defined, they will not apply to any geometry within this subcategory, even if the supplied appearance overrides nothing.
|
|
331
|
+
* @deprecated Use [[FeatureOverrides.override]].
|
|
254
332
|
*/
|
|
255
333
|
overrideSubCategory(id: Id64String, app: FeatureAppearance, replaceExisting?: boolean): void;
|
|
256
334
|
/** Specify overrides for all geometry originating from the specified element.
|
|
@@ -259,6 +337,7 @@ export declare class FeatureOverrides implements FeatureAppearanceSource {
|
|
|
259
337
|
* @param replaceExisting Specifies whether to replace a pre-existing override for the same element.
|
|
260
338
|
* @note These overrides take precedence over subcategory overrides, but not over model overrides.
|
|
261
339
|
* @note If [[defaultOverrides]] are defined, they will not apply to this element, even if the supplied appearance overrides nothing.
|
|
340
|
+
* @deprecated Use [[FeatureOverrides.override]].
|
|
262
341
|
*/
|
|
263
342
|
overrideElement(id: Id64String, app: FeatureAppearance, replaceExisting?: boolean): void;
|
|
264
343
|
/** Specify overrides for all geometry originating from the specified animation node.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureSymbology.d.ts","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"FeatureSymbology.d.ts","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,IAAI,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAc5D;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,sCAAsC;IACtC,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,yBAAyB,CAAC,EAAE,IAAI,CAAC;IACjC,6CAA6C;IAC7C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,kDAAkD;IAClD,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,6CAA6C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uBAAuB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;CAChQ;AAED,cAAc;AACd,yBAAiB,yBAAyB,CAAC;IAUzC;;;OAGG;IACH,SAAgB,UAAU,CAAC,oBAAoB,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,iBAAiB,GAAG,yBAAyB,CAOhI;IAED;;;OAGG;IACH,SAAgB,KAAK,CAAC,KAAK,EAAE,yBAAyB,EAAE,MAAM,EAAE,yBAAyB,GAAG,yBAAyB,CASpH;CACF"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Rendering
|
|
7
7
|
*/
|
|
8
|
-
import { Id64 } from "@itwin/core-bentley";
|
|
8
|
+
import { assert, Id64 } from "@itwin/core-bentley";
|
|
9
9
|
import { BatchType } from "./FeatureTable";
|
|
10
10
|
import { GeometryClass } from "./GeometryParams";
|
|
11
11
|
import { RgbColor } from "./RgbColor";
|
|
@@ -36,6 +36,8 @@ export class FeatureAppearance {
|
|
|
36
36
|
if (undefined !== this.weight)
|
|
37
37
|
this.weight = Math.max(1, Math.min(this.weight, 32));
|
|
38
38
|
if (undefined !== this.transparency) {
|
|
39
|
+
if (props.viewDependentTransparency)
|
|
40
|
+
this.viewDependentTransparency = true;
|
|
39
41
|
this.transparency = Math.max(0, Math.min(this.transparency, 1));
|
|
40
42
|
// Fix up rounding errors...
|
|
41
43
|
const smallDelta = 0.0001;
|
|
@@ -60,23 +62,29 @@ export class FeatureAppearance {
|
|
|
60
62
|
/** Create a FeatureAppearance that overrides the RGB and transparency.
|
|
61
63
|
* The appearance's transparency is derived from the transparency component of the ColorDef.
|
|
62
64
|
*/
|
|
63
|
-
static fromRgba(color) {
|
|
65
|
+
static fromRgba(color, viewDependentTransparency = false) {
|
|
64
66
|
return this.fromJSON({
|
|
65
67
|
rgb: RgbColor.fromColorDef(color),
|
|
66
68
|
transparency: color.colors.t / 255,
|
|
69
|
+
viewDependentTransparency: viewDependentTransparency ? true : undefined,
|
|
67
70
|
});
|
|
68
71
|
}
|
|
69
72
|
/** Create a FeatureAppearance that overrides only the transparency */
|
|
70
|
-
static fromTransparency(transparencyValue) {
|
|
71
|
-
return this.fromJSON({
|
|
73
|
+
static fromTransparency(transparencyValue, viewDependent = false) {
|
|
74
|
+
return this.fromJSON({
|
|
75
|
+
transparency: transparencyValue,
|
|
76
|
+
viewDependentTransparency: viewDependent ? true : undefined,
|
|
77
|
+
});
|
|
72
78
|
}
|
|
73
|
-
/** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.
|
|
79
|
+
/** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.
|
|
80
|
+
* @note Subcategory overrides set [[viewDependentTransparency]] to `true`.
|
|
81
|
+
*/
|
|
74
82
|
static fromSubCategoryOverride(ovr) {
|
|
75
83
|
const rgb = undefined !== ovr.color ? RgbColor.fromColorDef(ovr.color) : undefined;
|
|
76
84
|
const transparency = ovr.transparency;
|
|
77
85
|
const weight = ovr.weight;
|
|
78
86
|
const ignoresMaterial = undefined !== ovr.material && Id64.isValid(ovr.material) ? true : undefined;
|
|
79
|
-
return this.fromJSON({ rgb, transparency, weight, ignoresMaterial });
|
|
87
|
+
return this.fromJSON({ rgb, transparency, weight, ignoresMaterial, viewDependentTransparency: true });
|
|
80
88
|
}
|
|
81
89
|
/** Returns true if this appearance does not override any aspects of symbology. */
|
|
82
90
|
get matchesDefaults() {
|
|
@@ -99,11 +107,12 @@ export class FeatureAppearance {
|
|
|
99
107
|
return true;
|
|
100
108
|
return this.rgbIsEqual(other.rgb)
|
|
101
109
|
&& this.weight === other.weight
|
|
102
|
-
&& this.
|
|
110
|
+
&& this.transparencyIsEqual(other.transparency)
|
|
103
111
|
&& this.linePixels === other.linePixels
|
|
104
112
|
&& this.ignoresMaterial === other.ignoresMaterial
|
|
105
113
|
&& this.nonLocatable === other.nonLocatable
|
|
106
|
-
&& this.emphasized === other.emphasized
|
|
114
|
+
&& this.emphasized === other.emphasized
|
|
115
|
+
&& this.viewDependentTransparency === other.viewDependentTransparency;
|
|
107
116
|
}
|
|
108
117
|
toJSON() {
|
|
109
118
|
const props = {};
|
|
@@ -111,8 +120,11 @@ export class FeatureAppearance {
|
|
|
111
120
|
props.rgb = this.rgb.toJSON();
|
|
112
121
|
if (undefined !== this.weight)
|
|
113
122
|
props.weight = this.weight;
|
|
114
|
-
if (undefined !== this.transparency)
|
|
123
|
+
if (undefined !== this.transparency) {
|
|
115
124
|
props.transparency = this.transparency;
|
|
125
|
+
if (this.viewDependentTransparency)
|
|
126
|
+
props.viewDependentTransparency = true;
|
|
127
|
+
}
|
|
116
128
|
if (undefined !== this.linePixels)
|
|
117
129
|
props.linePixels = this.linePixels;
|
|
118
130
|
if (true === this.ignoresMaterial)
|
|
@@ -167,10 +179,25 @@ export class FeatureAppearance {
|
|
|
167
179
|
props.nonLocatable = true;
|
|
168
180
|
if (undefined === props.emphasized && this.emphasized)
|
|
169
181
|
props.emphasized = true;
|
|
182
|
+
if (undefined !== props.transparency && this.viewDependentTransparency)
|
|
183
|
+
props.viewDependentTransparency = true;
|
|
170
184
|
return FeatureAppearance.fromJSON(props);
|
|
171
185
|
}
|
|
172
186
|
rgbIsEqual(rgb) {
|
|
173
|
-
|
|
187
|
+
if (undefined === this.rgb)
|
|
188
|
+
return undefined === rgb;
|
|
189
|
+
else if (undefined === rgb)
|
|
190
|
+
return false;
|
|
191
|
+
else
|
|
192
|
+
return this.rgb.equals(rgb);
|
|
193
|
+
}
|
|
194
|
+
transparencyIsEqual(transp) {
|
|
195
|
+
if (undefined === this.transparency)
|
|
196
|
+
return undefined === transp;
|
|
197
|
+
else if (undefined === transp)
|
|
198
|
+
return false;
|
|
199
|
+
else
|
|
200
|
+
return Math.floor(this.transparency * 0xff) === Math.floor(transp * 0xff);
|
|
174
201
|
}
|
|
175
202
|
}
|
|
176
203
|
/** An appearance that overrides nothing. */
|
|
@@ -387,18 +414,54 @@ export class FeatureOverrides {
|
|
|
387
414
|
default: return true;
|
|
388
415
|
}
|
|
389
416
|
}
|
|
417
|
+
/** Specify overrides for all elements belonging to a specified [GeometricModel]($backend), or all geometry belonging to a specified [GeometricElement]($backend) or [SubCategory]($backend). */
|
|
418
|
+
override(args) {
|
|
419
|
+
let id;
|
|
420
|
+
let map;
|
|
421
|
+
if (undefined !== args.elementId) {
|
|
422
|
+
id = args.elementId;
|
|
423
|
+
map = this._elementOverrides;
|
|
424
|
+
}
|
|
425
|
+
else if (undefined !== args.modelId) {
|
|
426
|
+
id = args.modelId;
|
|
427
|
+
map = this._modelOverrides;
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
id = args.subCategoryId;
|
|
431
|
+
map = this._subCategoryOverrides;
|
|
432
|
+
}
|
|
433
|
+
let app = args.appearance;
|
|
434
|
+
const idLo = Id64.getLowerUint32(id);
|
|
435
|
+
const idHi = Id64.getUpperUint32(id);
|
|
436
|
+
if (undefined !== args.elementId && this.isNeverDrawn(idLo, idHi, 0))
|
|
437
|
+
return;
|
|
438
|
+
const replace = "replace" === args.onConflict;
|
|
439
|
+
const existing = replace ? undefined : map.get(idLo, idHi);
|
|
440
|
+
if (existing) {
|
|
441
|
+
assert("replace" !== args.onConflict);
|
|
442
|
+
switch (args.onConflict) {
|
|
443
|
+
case "skip":
|
|
444
|
+
return;
|
|
445
|
+
case "extend":
|
|
446
|
+
app = app.extendAppearance(existing);
|
|
447
|
+
break;
|
|
448
|
+
default:
|
|
449
|
+
app = existing.extendAppearance(app);
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
map.set(idLo, idHi, app);
|
|
454
|
+
}
|
|
390
455
|
/** Specify overrides for all elements within the specified model.
|
|
391
456
|
* @param id The Id of the model.
|
|
392
457
|
* @param app The symbology overrides.
|
|
393
458
|
* @param replaceExisting Specifies whether to replace a pre-existing override for the same model.
|
|
394
459
|
* @note These overrides take priority over all other overrides.
|
|
395
460
|
* @note If [[defaultOverrides]] are defined, they will not apply to any element within this model, even if the supplied appearance overrides nothing.
|
|
461
|
+
* @deprecated Use [[FeatureOverrides.override]].
|
|
396
462
|
*/
|
|
397
463
|
overrideModel(id, app, replaceExisting = true) {
|
|
398
|
-
|
|
399
|
-
const idHi = Id64.getUpperUint32(id);
|
|
400
|
-
if (replaceExisting || undefined === this.getModelOverrides(idLo, idHi))
|
|
401
|
-
this._modelOverrides.set(idLo, idHi, app);
|
|
464
|
+
this.override({ modelId: id, appearance: app, onConflict: replaceExisting ? "replace" : "skip" });
|
|
402
465
|
}
|
|
403
466
|
/** Specify overrides for all geometry belonging to the specified [SubCategory]($backend).
|
|
404
467
|
* @param id The Id of the subcategory.
|
|
@@ -406,14 +469,10 @@ export class FeatureOverrides {
|
|
|
406
469
|
* @param replaceExisting Specifies whether to replace a pre-existing override for the same subcategory.
|
|
407
470
|
* @note These overrides have lower priority than element and model overrides.
|
|
408
471
|
* @note If [[defaultOverrides]] are defined, they will not apply to any geometry within this subcategory, even if the supplied appearance overrides nothing.
|
|
472
|
+
* @deprecated Use [[FeatureOverrides.override]].
|
|
409
473
|
*/
|
|
410
474
|
overrideSubCategory(id, app, replaceExisting = true) {
|
|
411
|
-
|
|
412
|
-
const idLo = Id64.getLowerUint32(id);
|
|
413
|
-
const idHi = Id64.getUpperUint32(id);
|
|
414
|
-
// NB: Appearance may specify no overridden symbology - this means "don't apply the default overrides to this subcategory"
|
|
415
|
-
if (replaceExisting || undefined === this.getSubCategoryOverrides(idLo, idHi))
|
|
416
|
-
this._subCategoryOverrides.set(idLo, idHi, app);
|
|
475
|
+
this.override({ subCategoryId: id, appearance: app, onConflict: replaceExisting ? "replace" : "skip" });
|
|
417
476
|
}
|
|
418
477
|
/** Specify overrides for all geometry originating from the specified element.
|
|
419
478
|
* @param id The Id of the element.
|
|
@@ -421,22 +480,19 @@ export class FeatureOverrides {
|
|
|
421
480
|
* @param replaceExisting Specifies whether to replace a pre-existing override for the same element.
|
|
422
481
|
* @note These overrides take precedence over subcategory overrides, but not over model overrides.
|
|
423
482
|
* @note If [[defaultOverrides]] are defined, they will not apply to this element, even if the supplied appearance overrides nothing.
|
|
483
|
+
* @deprecated Use [[FeatureOverrides.override]].
|
|
424
484
|
*/
|
|
425
485
|
overrideElement(id, app, replaceExisting = true) {
|
|
426
|
-
|
|
427
|
-
const idHi = Id64.getUpperUint32(id);
|
|
428
|
-
if (this.isNeverDrawn(idLo, idHi, 0))
|
|
429
|
-
return;
|
|
430
|
-
// NB: Appearance may specify no overridden symbology - this means "don't apply the default overrides to this element"
|
|
431
|
-
if (replaceExisting || undefined === this.getElementOverrides(idLo, idHi, 0))
|
|
432
|
-
this._elementOverrides.set(idLo, idHi, app);
|
|
486
|
+
this.override({ elementId: id, appearance: app, onConflict: replaceExisting ? "replace" : "skip" });
|
|
433
487
|
}
|
|
434
488
|
/** Specify overrides for all geometry originating from the specified animation node.
|
|
435
489
|
* @param id The Id of the animation node.
|
|
436
490
|
* @param app The symbology overrides.
|
|
437
491
|
* @note These overrides do not take precedence over element overrides.
|
|
438
492
|
*/
|
|
439
|
-
overrideAnimationNode(id, app) {
|
|
493
|
+
overrideAnimationNode(id, app) {
|
|
494
|
+
this.animationNodeOverrides.set(id, app);
|
|
495
|
+
}
|
|
440
496
|
/** Defines a default appearance to be applied to any [[Feature]] *not* explicitly overridden.
|
|
441
497
|
* @param appearance The symbology overrides.
|
|
442
498
|
* @param replaceExisting Specifies whether to replace the current default overrides if they are already defined.
|