@itwin/core-common 5.0.0-dev.4 → 5.0.0-dev.40

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.
Files changed (270) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/lib/cjs/AmbientOcclusion.js +9 -9
  3. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  4. package/lib/cjs/AnalysisStyle.js +1 -1
  5. package/lib/cjs/AnalysisStyle.js.map +1 -1
  6. package/lib/cjs/Atmosphere.js +19 -21
  7. package/lib/cjs/Atmosphere.js.map +1 -1
  8. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  9. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  11. package/lib/cjs/ClipStyle.js +5 -5
  12. package/lib/cjs/ClipStyle.js.map +1 -1
  13. package/lib/cjs/ColorDef.js +10 -10
  14. package/lib/cjs/ColorDef.js.map +1 -1
  15. package/lib/cjs/ConcurrentQuery.d.ts +5 -1
  16. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  17. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  18. package/lib/cjs/ContourDisplay.js +5 -5
  19. package/lib/cjs/ContourDisplay.js.map +1 -1
  20. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  21. package/lib/cjs/ECSqlReader.js +3 -1
  22. package/lib/cjs/ECSqlReader.js.map +1 -1
  23. package/lib/cjs/ElementProps.d.ts.map +1 -1
  24. package/lib/cjs/ElementProps.js +3 -3
  25. package/lib/cjs/ElementProps.js.map +1 -1
  26. package/lib/cjs/Environment.js +2 -2
  27. package/lib/cjs/Environment.js.map +1 -1
  28. package/lib/cjs/FeatureSymbology.js +3 -3
  29. package/lib/cjs/FeatureSymbology.js.map +1 -1
  30. package/lib/cjs/Fonts.d.ts +69 -11
  31. package/lib/cjs/Fonts.d.ts.map +1 -1
  32. package/lib/cjs/Fonts.js +20 -5
  33. package/lib/cjs/Fonts.js.map +1 -1
  34. package/lib/cjs/Gradient.js +9 -9
  35. package/lib/cjs/Gradient.js.map +1 -1
  36. package/lib/cjs/GroundPlane.js +2 -2
  37. package/lib/cjs/GroundPlane.js.map +1 -1
  38. package/lib/cjs/HiddenLine.js +4 -4
  39. package/lib/cjs/HiddenLine.js.map +1 -1
  40. package/lib/cjs/IModel.d.ts +3 -12
  41. package/lib/cjs/IModel.d.ts.map +1 -1
  42. package/lib/cjs/IModel.js +6 -6
  43. package/lib/cjs/IModel.js.map +1 -1
  44. package/lib/cjs/IModelError.d.ts +0 -2
  45. package/lib/cjs/IModelError.d.ts.map +1 -1
  46. package/lib/cjs/IModelError.js +1 -8
  47. package/lib/cjs/IModelError.js.map +1 -1
  48. package/lib/cjs/ITwinError.d.ts +1 -1
  49. package/lib/cjs/ITwinError.d.ts.map +1 -1
  50. package/lib/cjs/ITwinError.js +1 -1
  51. package/lib/cjs/ITwinError.js.map +1 -1
  52. package/lib/cjs/LightSettings.js +1 -1
  53. package/lib/cjs/LightSettings.js.map +1 -1
  54. package/lib/cjs/PlanarClipMask.js +2 -2
  55. package/lib/cjs/PlanarClipMask.js.map +1 -1
  56. package/lib/cjs/RealityModelDisplaySettings.js +4 -4
  57. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  58. package/lib/cjs/RenderMaterial.js +3 -3
  59. package/lib/cjs/RenderMaterial.js.map +1 -1
  60. package/lib/cjs/RpcInterface.js +1 -1
  61. package/lib/cjs/RpcInterface.js.map +1 -1
  62. package/lib/cjs/SkyBox.js +4 -4
  63. package/lib/cjs/SkyBox.js.map +1 -1
  64. package/lib/cjs/SolarShadows.js +1 -1
  65. package/lib/cjs/SolarShadows.js.map +1 -1
  66. package/lib/cjs/SubCategoryAppearance.js +1 -1
  67. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  68. package/lib/cjs/SubCategoryOverride.js +2 -2
  69. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  70. package/lib/cjs/TextureMapping.js +2 -2
  71. package/lib/cjs/TextureMapping.js.map +1 -1
  72. package/lib/cjs/ThematicDisplay.js +2 -2
  73. package/lib/cjs/ThematicDisplay.js.map +1 -1
  74. package/lib/cjs/ViewDetails.js +2 -2
  75. package/lib/cjs/ViewDetails.js.map +1 -1
  76. package/lib/cjs/ViewFlags.js +2 -2
  77. package/lib/cjs/ViewFlags.js.map +1 -1
  78. package/lib/cjs/WhiteOnWhiteReversalSettings.js +2 -2
  79. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  80. package/lib/cjs/annotation/TextStyle.js +19 -19
  81. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  82. package/lib/cjs/core-common.d.ts +0 -1
  83. package/lib/cjs/core-common.d.ts.map +1 -1
  84. package/lib/cjs/core-common.js +0 -1
  85. package/lib/cjs/core-common.js.map +1 -1
  86. package/lib/cjs/geometry/Cartographic.js +13 -13
  87. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  88. package/lib/cjs/ipc/IpcWebSocket.js +1 -1
  89. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  90. package/lib/cjs/ipc/IpcWebSocketTransport.js +1 -1
  91. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  92. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  93. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  94. package/lib/cjs/rpc/IModelReadRpcInterface.js +5 -5
  95. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  96. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  97. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  98. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  99. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  100. package/lib/cjs/rpc/core/RpcConfiguration.js +32 -34
  101. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  102. package/lib/cjs/rpc/core/RpcControl.js +8 -15
  103. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  104. package/lib/cjs/rpc/core/RpcInvocation.js +3 -5
  105. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  106. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +0 -3
  107. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  108. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  109. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  110. package/lib/cjs/rpc/core/RpcOperation.js +2 -2
  111. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  112. package/lib/cjs/rpc/core/RpcProtocol.js +4 -4
  113. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  114. package/lib/cjs/rpc/core/RpcPush.js +5 -5
  115. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  116. package/lib/cjs/rpc/core/RpcRequest.js +5 -5
  117. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  118. package/lib/cjs/rpc/core/RpcRoutingToken.js +2 -2
  119. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  120. package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -1
  121. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  122. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +6 -6
  123. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  124. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  125. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  126. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  127. package/lib/cjs/rpc/web/WebAppRpcRequest.js +17 -19
  128. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  129. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  130. package/lib/cjs/tile/IModelTileIO.js +3 -3
  131. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  132. package/lib/esm/AmbientOcclusion.js +9 -9
  133. package/lib/esm/AmbientOcclusion.js.map +1 -1
  134. package/lib/esm/AnalysisStyle.js +1 -1
  135. package/lib/esm/AnalysisStyle.js.map +1 -1
  136. package/lib/esm/Atmosphere.js +19 -21
  137. package/lib/esm/Atmosphere.js.map +1 -1
  138. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  139. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  140. package/lib/esm/BriefcaseTypes.js.map +1 -1
  141. package/lib/esm/ClipStyle.js +5 -5
  142. package/lib/esm/ClipStyle.js.map +1 -1
  143. package/lib/esm/ColorDef.js +10 -10
  144. package/lib/esm/ColorDef.js.map +1 -1
  145. package/lib/esm/ConcurrentQuery.d.ts +5 -1
  146. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  147. package/lib/esm/ConcurrentQuery.js.map +1 -1
  148. package/lib/esm/ContourDisplay.js +5 -5
  149. package/lib/esm/ContourDisplay.js.map +1 -1
  150. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  151. package/lib/esm/ECSqlReader.js +3 -1
  152. package/lib/esm/ECSqlReader.js.map +1 -1
  153. package/lib/esm/ElementProps.d.ts.map +1 -1
  154. package/lib/esm/ElementProps.js +4 -4
  155. package/lib/esm/ElementProps.js.map +1 -1
  156. package/lib/esm/Environment.js +2 -2
  157. package/lib/esm/Environment.js.map +1 -1
  158. package/lib/esm/FeatureSymbology.js +3 -3
  159. package/lib/esm/FeatureSymbology.js.map +1 -1
  160. package/lib/esm/Fonts.d.ts +69 -11
  161. package/lib/esm/Fonts.d.ts.map +1 -1
  162. package/lib/esm/Fonts.js +20 -5
  163. package/lib/esm/Fonts.js.map +1 -1
  164. package/lib/esm/Gradient.js +9 -9
  165. package/lib/esm/Gradient.js.map +1 -1
  166. package/lib/esm/GroundPlane.js +2 -2
  167. package/lib/esm/GroundPlane.js.map +1 -1
  168. package/lib/esm/HiddenLine.js +4 -4
  169. package/lib/esm/HiddenLine.js.map +1 -1
  170. package/lib/esm/IModel.d.ts +3 -12
  171. package/lib/esm/IModel.d.ts.map +1 -1
  172. package/lib/esm/IModel.js +6 -6
  173. package/lib/esm/IModel.js.map +1 -1
  174. package/lib/esm/IModelError.d.ts +0 -2
  175. package/lib/esm/IModelError.d.ts.map +1 -1
  176. package/lib/esm/IModelError.js +0 -1
  177. package/lib/esm/IModelError.js.map +1 -1
  178. package/lib/esm/ITwinError.d.ts +1 -1
  179. package/lib/esm/ITwinError.d.ts.map +1 -1
  180. package/lib/esm/ITwinError.js +1 -1
  181. package/lib/esm/ITwinError.js.map +1 -1
  182. package/lib/esm/LightSettings.js +1 -1
  183. package/lib/esm/LightSettings.js.map +1 -1
  184. package/lib/esm/PlanarClipMask.js +2 -2
  185. package/lib/esm/PlanarClipMask.js.map +1 -1
  186. package/lib/esm/RealityModelDisplaySettings.js +4 -4
  187. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  188. package/lib/esm/RenderMaterial.js +3 -3
  189. package/lib/esm/RenderMaterial.js.map +1 -1
  190. package/lib/esm/RpcInterface.js +2 -2
  191. package/lib/esm/RpcInterface.js.map +1 -1
  192. package/lib/esm/SkyBox.js +4 -4
  193. package/lib/esm/SkyBox.js.map +1 -1
  194. package/lib/esm/SolarShadows.js +1 -1
  195. package/lib/esm/SolarShadows.js.map +1 -1
  196. package/lib/esm/SubCategoryAppearance.js +1 -1
  197. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  198. package/lib/esm/SubCategoryOverride.js +2 -2
  199. package/lib/esm/SubCategoryOverride.js.map +1 -1
  200. package/lib/esm/TextureMapping.js +2 -2
  201. package/lib/esm/TextureMapping.js.map +1 -1
  202. package/lib/esm/ThematicDisplay.js +2 -2
  203. package/lib/esm/ThematicDisplay.js.map +1 -1
  204. package/lib/esm/ViewDetails.js +2 -2
  205. package/lib/esm/ViewDetails.js.map +1 -1
  206. package/lib/esm/ViewFlags.js +2 -2
  207. package/lib/esm/ViewFlags.js.map +1 -1
  208. package/lib/esm/WhiteOnWhiteReversalSettings.js +2 -2
  209. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  210. package/lib/esm/annotation/TextStyle.js +19 -19
  211. package/lib/esm/annotation/TextStyle.js.map +1 -1
  212. package/lib/esm/core-common.d.ts +0 -1
  213. package/lib/esm/core-common.d.ts.map +1 -1
  214. package/lib/esm/core-common.js +0 -1
  215. package/lib/esm/core-common.js.map +1 -1
  216. package/lib/esm/geometry/Cartographic.js +13 -13
  217. package/lib/esm/geometry/Cartographic.js.map +1 -1
  218. package/lib/esm/ipc/IpcWebSocket.js +1 -1
  219. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  220. package/lib/esm/ipc/IpcWebSocketTransport.js +1 -1
  221. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  222. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  223. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  224. package/lib/esm/rpc/IModelReadRpcInterface.js +5 -5
  225. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  226. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  227. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  228. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  229. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  230. package/lib/esm/rpc/core/RpcConfiguration.js +32 -34
  231. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  232. package/lib/esm/rpc/core/RpcControl.js +8 -15
  233. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  234. package/lib/esm/rpc/core/RpcInvocation.js +3 -5
  235. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  236. package/lib/esm/rpc/core/RpcMarshaling.d.ts +0 -3
  237. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  238. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  239. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  240. package/lib/esm/rpc/core/RpcOperation.js +2 -2
  241. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  242. package/lib/esm/rpc/core/RpcProtocol.js +4 -4
  243. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  244. package/lib/esm/rpc/core/RpcPush.js +5 -5
  245. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  246. package/lib/esm/rpc/core/RpcRequest.js +5 -5
  247. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  248. package/lib/esm/rpc/core/RpcRoutingToken.js +2 -2
  249. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  250. package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -1
  251. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  252. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +6 -6
  253. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  254. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  255. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  256. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  257. package/lib/esm/rpc/web/WebAppRpcRequest.js +17 -19
  258. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  259. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  260. package/lib/esm/tile/IModelTileIO.js +3 -3
  261. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  262. package/package.json +9 -9
  263. package/lib/cjs/rpc/WipRpcInterface.d.ts +0 -31
  264. package/lib/cjs/rpc/WipRpcInterface.d.ts.map +0 -1
  265. package/lib/cjs/rpc/WipRpcInterface.js +0 -42
  266. package/lib/cjs/rpc/WipRpcInterface.js.map +0 -1
  267. package/lib/esm/rpc/WipRpcInterface.d.ts +0 -31
  268. package/lib/esm/rpc/WipRpcInterface.d.ts.map +0 -1
  269. package/lib/esm/rpc/WipRpcInterface.js +0 -38
  270. package/lib/esm/rpc/WipR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,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,0DAA0D;KACzL,AAP8B,CAO7B;IACa,qBAAgB,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,AAAvC,CAAwC;IAjC5D,aAAI,OAmahB,CAAA;AACH,CAAC,EAxfgB,QAAQ,wBAAR,QAAQ,QAwfxB","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 { assert } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\n\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\n * @see [[GeometryParams]]\n * @see [[GraphicParams]]\n * @public\n */\nexport namespace Gradient {\n /** Flags applied to a [[Gradient.Symb]]. */\n export enum Flags {\n /** No flags. */\n None = 0,\n /** Reverse the order of the gradient keys. */\n Invert = 1,\n /** Draw an outline around the surface to which the gradient is applied. */\n Outline = 2,\n }\n\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\n export enum Mode {\n None = 0,\n Linear = 1,\n Curved = 2,\n Cylindrical = 3,\n Spherical = 4,\n Hemispherical = 5,\n /** For a gradient created based for [[ThematicDisplay]]. */\n Thematic = 6,\n }\n\n /** Gradient fraction value to [[ColorDef]] pair */\n export interface KeyColorProps {\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\n value: number;\n /** Color value for given fraction */\n color: ColorDefProps;\n }\n\n /** Gradient fraction value to [[ColorDef]] pair\n * @see [[Gradient.KeyColorProps]]\n */\n export class KeyColor {\n public value: number;\n public color: ColorDef;\n public constructor(json: KeyColorProps) {\n this.value = json.value;\n this.color = ColorDef.fromJSON(json.color);\n }\n }\n\n /** Compare two KeyColor objects for equality. Returns true if equal. */\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\n return (a.value === b.value) && a.color.equals(b.color);\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position */\n export interface SymbProps {\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\n mode: Mode;\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\n flags?: Flags;\n /** Gradient rotation angle, 0.0 if undefined */\n angle?: AngleProps;\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\n tint?: number;\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\n shift?: number;\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\n keys: KeyColorProps[];\n /** Settings applicable to [[ThematicDisplay]]. */\n thematicSettings?: ThematicGradientSettingsProps;\n }\n\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\n * @public\n */\n export interface ProduceImageArgs {\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\n width: number;\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\n height: number;\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\n */\n includeThematicMargin?: boolean;\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position.\n * Gradient fill can be applied to planar regions.\n * @see [[Gradient.SymbProps]]\n */\n export class Symb {\n public mode = Mode.None;\n public flags: Flags = Flags.None;\n public angle?: Angle;\n public tint?: number;\n public shift: number = 0;\n public thematicSettings?: ThematicGradientSettings;\n public keys: KeyColor[] = [];\n\n /** create a GradientSymb from a json object. */\n public static fromJSON(json?: SymbProps) {\n const result = new Symb();\n if (!json)\n return result;\n result.mode = json.mode;\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n result.tint = json.tint;\n result.shift = json.shift ? json.shift : 0;\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\n\n return result;\n }\n\n private static _fixedSchemeKeys = [\n // NB: these color values are ordered as rbg. Note how the components are applied below.\n [[0.0, 0, 255, 0], [0.25, 0, 255, 255], [0.5, 0, 0, 255], [0.75, 255, 0, 255], [1.0, 255, 0, 0]], // Blue Red.\n [[0.0, 255, 0, 0], [0.25, 255, 0, 255], [0.5, 0, 0, 255], [0.75, 0, 255, 255], [1.0, 0, 255, 0]], // Red blue.\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\n [[0.0, 152, 148, 188], [0.5, 204, 160, 204], [1.0, 152, 72, 128]], // Based off of the topographic gradients in Point Clouds.\n [[0.0, 0, 255, 0], [0.2, 72, 96, 160], [0.4, 152, 96, 160], [0.6, 128, 32, 104], [0.7, 148, 180, 128], [1.0, 240, 240, 240]], // Based off of the sea-mountain gradient in Point Clouds.\n ];\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\n\n /** Create for [[ThematicDisplay]]. */\n public static createThematic(settings: ThematicGradientSettings) {\n const result = new Symb();\n result.mode = Mode.Thematic;\n result.thematicSettings = settings;\n\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n } else { // custom color scheme; must use custom keys\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\n if (settings.customKeys.length > 1) {\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\n }\n }\n return result;\n }\n\n public toJSON(): SymbProps {\n return {\n ...this,\n thematicSettings: this.thematicSettings?.toJSON(),\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\n };\n }\n\n public clone(): Symb {\n return Symb.fromJSON(this.toJSON());\n }\n\n /** Returns true if this symbology is equal to another, false otherwise. */\n public equals(other: Symb): boolean {\n return Symb.compareSymb(this, other) === 0;\n }\n\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\n * @param lhs First gradient to compare\n * @param rhs Second gradient to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\n if (lhs === rhs)\n return 0; // Same pointer\n if (lhs.mode !== rhs.mode)\n return lhs.mode - rhs.mode;\n if (lhs.flags !== rhs.flags)\n if (lhs.flags === undefined)\n return -1;\n else if (rhs.flags === undefined)\n return 1;\n else\n return lhs.flags - rhs.flags;\n if (lhs.tint !== rhs.tint)\n if (lhs.tint === undefined)\n return -1;\n else if (rhs.tint === undefined)\n return 1;\n else\n return lhs.tint - rhs.tint;\n if (lhs.shift !== rhs.shift)\n if (lhs.shift === undefined)\n return -1;\n else if (rhs.shift === undefined)\n return 1;\n else\n return lhs.shift - rhs.shift;\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\n if (lhs.angle === undefined)\n return -1;\n else\n return 1;\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\n return lhs.angle.radians - rhs.angle!.radians;\n if (lhs.keys.length !== rhs.keys.length)\n return lhs.keys.length - rhs.keys.length;\n for (let i = 0; i < lhs.keys.length; i++) {\n if (lhs.keys[i].value !== rhs.keys[i].value)\n return lhs.keys[i].value - rhs.keys[i].value;\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\n }\n if (lhs.thematicSettings !== rhs.thematicSettings)\n if (undefined === lhs.thematicSettings)\n return -1;\n else if (undefined === rhs.thematicSettings)\n return 1;\n else {\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\n if (0 !== thematicCompareResult)\n return thematicCompareResult;\n }\n return 0;\n }\n\n /** Compare this symbology to another.\n * @see [[Gradient.Symb.compareSymb]]\n */\n public compare(other: Symb): number {\n return Gradient.Symb.compareSymb(this, other);\n }\n\n /**\n * Ensure the value given is within the range of 0 to 255,\n * and truncate the value to only the 8 least significant bits.\n */\n private roundToByte(num: number): number {\n return Math.min(num + .5, 255.0) & 0xFF;\n }\n\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\n public mapColor(value: number) {\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n\n if ((this.flags & Flags.Invert) !== 0)\n value = 1 - value;\n\n let idx = 0;\n let d;\n let w0;\n let w1;\n if (this.keys.length <= 2) {\n w0 = 1.0 - value;\n w1 = value;\n } else { // locate value in map, blend corresponding colors\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\n idx++;\n\n d = this.keys[idx + 1].value - this.keys[idx].value;\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\n w0 = 1.0 - w1;\n }\n\n const color0 = this.keys[idx].color;\n const color1 = this.keys[idx + 1].color;\n const colors0 = color0.colors;\n const colors1 = color1.colors;\n const red = w0 * colors0.r + w1 * colors1.r;\n const green = w0 * colors0.g + w1 * colors1.g;\n const blue = w0 * colors0.b + w1 * colors1.b;\n const transparency = w0 * colors0.t + w1 * colors1.t;\n\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\n }\n\n public get hasTranslucency(): boolean {\n for (const key of this.keys) {\n if (!key.color.isOpaque)\n return true;\n }\n\n return false;\n }\n\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\n\n /** This function (for internal use only) provides the WebGL renderer with a thematic image that its shaders\n * can use properly with various thematic rendering techniques.\n * If you want a regular gradient image, use the method [[Gradient.Symb.getImage]].\n * @internal\n */\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\n\n let settings = this.thematicSettings;\n if (settings === undefined) {\n settings = ThematicGradientSettings.defaults;\n }\n\n const stepCount = Math.min(settings.stepCount, maxDimension);\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\n const image = new Uint8Array(1 * dimension * 4);\n let currentIdx = image.length - 1;\n\n function addColor(color: ColorDef) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n\n switch (settings.mode) {\n case ThematicGradientMode.Smooth: {\n for (let j = 0; j < dimension; j++) {\n const f = (1 - j / (dimension));\n addColor(this.mapColor(f));\n }\n break;\n }\n\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n // The work to generate the delimiter lines and isolines is done completely in the shader.\n // Therefore, we just fall through here and use a regular stepped gradient.\n case ThematicGradientMode.Stepped: {\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\n for (let j = 0; j < dimension; j++) {\n // If we use Smooth's approach to generate the gradient...\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\n // We really want these values: 0 .25 .5 .75 1\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\n const f = (1 - j / (dimension - 1));\n addColor(this.mapColor(f));\n }\n break;\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n\n /** Produces a bitmap image from this gradient.\n * @param width Width of the image\n * @param height Height of the image\n * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.\n * @see [[produceImage]] for more customization.\n */\n public getImage(width: number, height: number): ImageBuffer {\n if (this.mode === Mode.Thematic)\n width = 1;\n\n return this.produceImage({ width, height, includeThematicMargin: true });\n }\n\n /** Produces a bitmap image from this gradient. */\n public produceImage(args: ProduceImageArgs): ImageBuffer {\n const { width, height, includeThematicMargin } = { ...args };\n\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\n const cosA = Math.cos(thisAngle);\n const sinA = Math.sin(thisAngle);\n const image = new Uint8Array(width * height * 4);\n let currentIdx = image.length - 1;\n const shift = Math.min(1.0, Math.abs(this.shift));\n\n switch (this.mode) {\n case Mode.Linear:\n case Mode.Cylindrical: {\n const xs = 0.5 - 0.25 * shift * cosA;\n const ys = 0.5 - 0.25 * shift * sinA;\n let dMax;\n let dMin = dMax = 0.0;\n let d;\n for (let j = 0; j < 2; j++) {\n for (let i = 0; i < 2; i++) {\n d = (i - xs) * cosA + (j - ys) * sinA;\n if (d < dMin)\n dMin = d;\n if (d > dMax)\n dMax = d;\n }\n }\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n d = x * cosA + y * sinA;\n let f;\n if (this.mode === Mode.Linear) {\n if (d > 0)\n f = 0.5 + 0.5 * d / dMax;\n else\n f = 0.5 - 0.5 * d / dMin;\n } else {\n if (d > 0)\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\n else\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\n }\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Curved: {\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const xr = 0.8 * (x * cosA + y * sinA);\n const yr = y * cosA - x * sinA;\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Spherical: {\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\n const xs = 0.5 * shift * (cosA + sinA) * r;\n const ys = 0.5 * shift * (sinA - cosA) * r;\n for (let j = 0; j < height; j++) {\n const y = ys + j / height - 0.5;\n for (let i = 0; i < width; i++) {\n const x = xs + i / width - 0.5;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Hemispherical: {\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Thematic: {\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\n\n for (let j = 0; j < height; j++) {\n let f = 1 - j / height;\n let color: ColorDef;\n\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\n color = settings.marginColor;\n } else {\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\n switch (settings.mode) {\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n case ThematicGradientMode.Stepped: {\n if (settings.stepCount > 1) {\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\n color = this.mapColor(fStep);\n }\n break;\n }\n case ThematicGradientMode.Smooth:\n color = this.mapColor(f);\n break;\n }\n }\n\n for (let i = 0; i < width; i++) {\n image[currentIdx--] = color!.getAlpha();\n image[currentIdx--] = color!.colors.b;\n image[currentIdx--] = color!.colors.g;\n image[currentIdx--] = color!.colors.r;\n }\n }\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAyD;AACzD,yCAAqD;AACrD,mCAAyD;AACzD,uDAA+I;AAE/I;;;;GAIG;AACH,IAAiB,QAAQ,CAwfxB;AAxfD,WAAiB,QAAQ;IACvB,4CAA4C;IAC5C,IAAY,KAOX;IAPD,WAAY,KAAK;QACf,gBAAgB;QAChB,iCAAQ,CAAA;QACR,8CAA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C,CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAlaU,aAAI,OAmahB,CAAA;AACH,CAAC,EAxfgB,QAAQ,wBAAR,QAAQ,QAwfxB","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 { assert } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\n\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\n * @see [[GeometryParams]]\n * @see [[GraphicParams]]\n * @public\n */\nexport namespace Gradient {\n /** Flags applied to a [[Gradient.Symb]]. */\n export enum Flags {\n /** No flags. */\n None = 0,\n /** Reverse the order of the gradient keys. */\n Invert = 1,\n /** Draw an outline around the surface to which the gradient is applied. */\n Outline = 2,\n }\n\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\n export enum Mode {\n None = 0,\n Linear = 1,\n Curved = 2,\n Cylindrical = 3,\n Spherical = 4,\n Hemispherical = 5,\n /** For a gradient created based for [[ThematicDisplay]]. */\n Thematic = 6,\n }\n\n /** Gradient fraction value to [[ColorDef]] pair */\n export interface KeyColorProps {\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\n value: number;\n /** Color value for given fraction */\n color: ColorDefProps;\n }\n\n /** Gradient fraction value to [[ColorDef]] pair\n * @see [[Gradient.KeyColorProps]]\n */\n export class KeyColor {\n public value: number;\n public color: ColorDef;\n public constructor(json: KeyColorProps) {\n this.value = json.value;\n this.color = ColorDef.fromJSON(json.color);\n }\n }\n\n /** Compare two KeyColor objects for equality. Returns true if equal. */\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\n return (a.value === b.value) && a.color.equals(b.color);\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position */\n export interface SymbProps {\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\n mode: Mode;\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\n flags?: Flags;\n /** Gradient rotation angle, 0.0 if undefined */\n angle?: AngleProps;\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\n tint?: number;\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\n shift?: number;\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\n keys: KeyColorProps[];\n /** Settings applicable to [[ThematicDisplay]]. */\n thematicSettings?: ThematicGradientSettingsProps;\n }\n\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\n * @public\n */\n export interface ProduceImageArgs {\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\n width: number;\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\n height: number;\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\n */\n includeThematicMargin?: boolean;\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position.\n * Gradient fill can be applied to planar regions.\n * @see [[Gradient.SymbProps]]\n */\n export class Symb {\n public mode = Mode.None;\n public flags: Flags = Flags.None;\n public angle?: Angle;\n public tint?: number;\n public shift: number = 0;\n public thematicSettings?: ThematicGradientSettings;\n public keys: KeyColor[] = [];\n\n /** create a GradientSymb from a json object. */\n public static fromJSON(json?: SymbProps) {\n const result = new Symb();\n if (!json)\n return result;\n result.mode = json.mode;\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n result.tint = json.tint;\n result.shift = json.shift ? json.shift : 0;\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\n\n return result;\n }\n\n private static _fixedSchemeKeys = [\n // NB: these color values are ordered as rbg. Note how the components are applied below.\n [[0.0, 0, 255, 0], [0.25, 0, 255, 255], [0.5, 0, 0, 255], [0.75, 255, 0, 255], [1.0, 255, 0, 0]], // Blue Red.\n [[0.0, 255, 0, 0], [0.25, 255, 0, 255], [0.5, 0, 0, 255], [0.75, 0, 255, 255], [1.0, 0, 255, 0]], // Red blue.\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\n [[0.0, 152, 148, 188], [0.5, 204, 160, 204], [1.0, 152, 72, 128]], // Based off of the topographic gradients in Point Clouds.\n [[0.0, 0, 255, 0], [0.2, 72, 96, 160], [0.4, 152, 96, 160], [0.6, 128, 32, 104], [0.7, 148, 180, 128], [1.0, 240, 240, 240]], // Based off of the sea-mountain gradient in Point Clouds.\n ];\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\n\n /** Create for [[ThematicDisplay]]. */\n public static createThematic(settings: ThematicGradientSettings) {\n const result = new Symb();\n result.mode = Mode.Thematic;\n result.thematicSettings = settings;\n\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n } else { // custom color scheme; must use custom keys\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\n if (settings.customKeys.length > 1) {\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\n }\n }\n return result;\n }\n\n public toJSON(): SymbProps {\n return {\n ...this,\n thematicSettings: this.thematicSettings?.toJSON(),\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\n };\n }\n\n public clone(): Symb {\n return Symb.fromJSON(this.toJSON());\n }\n\n /** Returns true if this symbology is equal to another, false otherwise. */\n public equals(other: Symb): boolean {\n return Symb.compareSymb(this, other) === 0;\n }\n\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\n * @param lhs First gradient to compare\n * @param rhs Second gradient to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\n if (lhs === rhs)\n return 0; // Same pointer\n if (lhs.mode !== rhs.mode)\n return lhs.mode - rhs.mode;\n if (lhs.flags !== rhs.flags)\n if (lhs.flags === undefined)\n return -1;\n else if (rhs.flags === undefined)\n return 1;\n else\n return lhs.flags - rhs.flags;\n if (lhs.tint !== rhs.tint)\n if (lhs.tint === undefined)\n return -1;\n else if (rhs.tint === undefined)\n return 1;\n else\n return lhs.tint - rhs.tint;\n if (lhs.shift !== rhs.shift)\n if (lhs.shift === undefined)\n return -1;\n else if (rhs.shift === undefined)\n return 1;\n else\n return lhs.shift - rhs.shift;\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\n if (lhs.angle === undefined)\n return -1;\n else\n return 1;\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\n return lhs.angle.radians - rhs.angle!.radians;\n if (lhs.keys.length !== rhs.keys.length)\n return lhs.keys.length - rhs.keys.length;\n for (let i = 0; i < lhs.keys.length; i++) {\n if (lhs.keys[i].value !== rhs.keys[i].value)\n return lhs.keys[i].value - rhs.keys[i].value;\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\n }\n if (lhs.thematicSettings !== rhs.thematicSettings)\n if (undefined === lhs.thematicSettings)\n return -1;\n else if (undefined === rhs.thematicSettings)\n return 1;\n else {\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\n if (0 !== thematicCompareResult)\n return thematicCompareResult;\n }\n return 0;\n }\n\n /** Compare this symbology to another.\n * @see [[Gradient.Symb.compareSymb]]\n */\n public compare(other: Symb): number {\n return Gradient.Symb.compareSymb(this, other);\n }\n\n /**\n * Ensure the value given is within the range of 0 to 255,\n * and truncate the value to only the 8 least significant bits.\n */\n private roundToByte(num: number): number {\n return Math.min(num + .5, 255.0) & 0xFF;\n }\n\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\n public mapColor(value: number) {\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n\n if ((this.flags & Flags.Invert) !== 0)\n value = 1 - value;\n\n let idx = 0;\n let d;\n let w0;\n let w1;\n if (this.keys.length <= 2) {\n w0 = 1.0 - value;\n w1 = value;\n } else { // locate value in map, blend corresponding colors\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\n idx++;\n\n d = this.keys[idx + 1].value - this.keys[idx].value;\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\n w0 = 1.0 - w1;\n }\n\n const color0 = this.keys[idx].color;\n const color1 = this.keys[idx + 1].color;\n const colors0 = color0.colors;\n const colors1 = color1.colors;\n const red = w0 * colors0.r + w1 * colors1.r;\n const green = w0 * colors0.g + w1 * colors1.g;\n const blue = w0 * colors0.b + w1 * colors1.b;\n const transparency = w0 * colors0.t + w1 * colors1.t;\n\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\n }\n\n public get hasTranslucency(): boolean {\n for (const key of this.keys) {\n if (!key.color.isOpaque)\n return true;\n }\n\n return false;\n }\n\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\n\n /** This function (for internal use only) provides the WebGL renderer with a thematic image that its shaders\n * can use properly with various thematic rendering techniques.\n * If you want a regular gradient image, use the method [[Gradient.Symb.getImage]].\n * @internal\n */\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\n\n let settings = this.thematicSettings;\n if (settings === undefined) {\n settings = ThematicGradientSettings.defaults;\n }\n\n const stepCount = Math.min(settings.stepCount, maxDimension);\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\n const image = new Uint8Array(1 * dimension * 4);\n let currentIdx = image.length - 1;\n\n function addColor(color: ColorDef) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n\n switch (settings.mode) {\n case ThematicGradientMode.Smooth: {\n for (let j = 0; j < dimension; j++) {\n const f = (1 - j / (dimension));\n addColor(this.mapColor(f));\n }\n break;\n }\n\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n // The work to generate the delimiter lines and isolines is done completely in the shader.\n // Therefore, we just fall through here and use a regular stepped gradient.\n case ThematicGradientMode.Stepped: {\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\n for (let j = 0; j < dimension; j++) {\n // If we use Smooth's approach to generate the gradient...\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\n // We really want these values: 0 .25 .5 .75 1\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\n const f = (1 - j / (dimension - 1));\n addColor(this.mapColor(f));\n }\n break;\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n\n /** Produces a bitmap image from this gradient.\n * @param width Width of the image\n * @param height Height of the image\n * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.\n * @see [[produceImage]] for more customization.\n */\n public getImage(width: number, height: number): ImageBuffer {\n if (this.mode === Mode.Thematic)\n width = 1;\n\n return this.produceImage({ width, height, includeThematicMargin: true });\n }\n\n /** Produces a bitmap image from this gradient. */\n public produceImage(args: ProduceImageArgs): ImageBuffer {\n const { width, height, includeThematicMargin } = { ...args };\n\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\n const cosA = Math.cos(thisAngle);\n const sinA = Math.sin(thisAngle);\n const image = new Uint8Array(width * height * 4);\n let currentIdx = image.length - 1;\n const shift = Math.min(1.0, Math.abs(this.shift));\n\n switch (this.mode) {\n case Mode.Linear:\n case Mode.Cylindrical: {\n const xs = 0.5 - 0.25 * shift * cosA;\n const ys = 0.5 - 0.25 * shift * sinA;\n let dMax;\n let dMin = dMax = 0.0;\n let d;\n for (let j = 0; j < 2; j++) {\n for (let i = 0; i < 2; i++) {\n d = (i - xs) * cosA + (j - ys) * sinA;\n if (d < dMin)\n dMin = d;\n if (d > dMax)\n dMax = d;\n }\n }\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n d = x * cosA + y * sinA;\n let f;\n if (this.mode === Mode.Linear) {\n if (d > 0)\n f = 0.5 + 0.5 * d / dMax;\n else\n f = 0.5 - 0.5 * d / dMin;\n } else {\n if (d > 0)\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\n else\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\n }\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Curved: {\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const xr = 0.8 * (x * cosA + y * sinA);\n const yr = y * cosA - x * sinA;\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Spherical: {\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\n const xs = 0.5 * shift * (cosA + sinA) * r;\n const ys = 0.5 * shift * (sinA - cosA) * r;\n for (let j = 0; j < height; j++) {\n const y = ys + j / height - 0.5;\n for (let i = 0; i < width; i++) {\n const x = xs + i / width - 0.5;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Hemispherical: {\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Thematic: {\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\n\n for (let j = 0; j < height; j++) {\n let f = 1 - j / height;\n let color: ColorDef;\n\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\n color = settings.marginColor;\n } else {\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\n switch (settings.mode) {\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n case ThematicGradientMode.Stepped: {\n if (settings.stepCount > 1) {\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\n color = this.mapColor(fStep);\n }\n break;\n }\n case ThematicGradientMode.Smooth:\n color = this.mapColor(f);\n break;\n }\n }\n\n for (let i = 0; i < width; i++) {\n image[currentIdx--] = color!.getAlpha();\n image[currentIdx--] = color!.colors.b;\n image[currentIdx--] = color!.colors.g;\n image[currentIdx--] = color!.colors.r;\n }\n }\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n }\n}\n"]}
@@ -22,6 +22,8 @@ class GroundPlane {
22
22
  this.aboveColor = props.aboveColor ?? defaultAboveColor;
23
23
  this.belowColor = props.belowColor ?? defaultBelowColor;
24
24
  }
25
+ /** Default settings with a dark green "above" color, dark brown "below" color, and elevation of -0.01 meters. */
26
+ static { this.defaults = new GroundPlane({}); }
25
27
  /** Create a new GroundPlane. Any properties not specified by `props` will be initialized to their default values. */
26
28
  static create(props) {
27
29
  return props ? new this(props) : this.defaults;
@@ -59,6 +61,4 @@ class GroundPlane {
59
61
  }
60
62
  }
61
63
  exports.GroundPlane = GroundPlane;
62
- /** Default settings with a dark green "above" color, dark brown "below" color, and elevation of -0.01 meters. */
63
- GroundPlane.defaults = new GroundPlane({});
64
64
  //# sourceMappingURL=GroundPlane.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroundPlane.js","sourceRoot":"","sources":["../../src/GroundPlane.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,+CAA4C;AAC5C,yCAAqD;AAwBrD,MAAM,iBAAiB,GAAG,mBAAQ,CAAC,QAAQ,CAAC,yBAAW,CAAC,SAAS,CAA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;;OAEG;IACI,MAAM,CAAC,OAAiB;QAC7B,MAAM,KAAK,GAAqB;YAC9B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;SACrC,CAAC;QAEF,IAAI,SAAS,KAAK,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAE1B,OAAO,KAAK,CAAC;IACf,CAAC;;AA1DH,kCA2DC;AA7CC,iHAAiH;AAC1F,oBAAQ,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\nimport { ColorByName } from \"./ColorByName\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\n\n/** JSON representation of a [[GroundPlane]].\n * @see [[EnvironmentProps.ground]].\n * @public\n * @extensions\n */\nexport interface GroundPlaneProps {\n /** Whether the ground plane should be displayed. Defaults to false. */\n display?: boolean;\n /** The Z height at which to draw the ground plane. */\n elevation?: number;\n /** The color in which to draw the ground plane when viewed from above. */\n aboveColor?: ColorDefProps;\n /** The color in which to draw the ground plane when viewed from below. */\n belowColor?: ColorDefProps;\n}\n\n/** A type containing all of the properties and none of the methods of [[GroundPlane]], with `readonly` modifiers removed.\n * @see [[GroundPlane.create]] and [[GroundPlane.clone]].\n * @public\n */\nexport type GroundPlaneProperties = NonFunctionPropertiesOf<GroundPlane>;\n\nconst defaultAboveColor = ColorDef.fromTbgr(ColorByName.darkGreen);\nconst defaultBelowColor = ColorDef.fromTbgr(ColorByName.darkBrown);\n\n/** A circle drawn at a Z elevation, whose diameter is the the XY diagonal of the project extents, used to represent the ground as a reference point within a spatial view.\n * @see [[Environment.ground]].\n * @public\n */\nexport class GroundPlane {\n /** The Z height in meters at which to draw the plane. */\n public readonly elevation: number;\n /** The color in which to draw the ground plane when viewed from above. */\n public readonly aboveColor: ColorDef;\n /** The color in which to draw the ground plane when viewed from below. */\n public readonly belowColor: ColorDef;\n\n protected constructor(props: Partial<GroundPlaneProperties>) {\n this.elevation = props.elevation ?? -0.01;\n this.aboveColor = props.aboveColor ?? defaultAboveColor;\n this.belowColor = props.belowColor ?? defaultBelowColor;\n }\n\n /** Default settings with a dark green \"above\" color, dark brown \"below\" color, and elevation of -0.01 meters. */\n public static readonly defaults = new GroundPlane({});\n\n /** Create a new GroundPlane. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<GroundPlaneProperties>) {\n return props ? new this(props) : this.defaults;\n }\n\n /** Create a copy of this ground plane, identical except for any properties explicitly specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be initialized to their default values.\n */\n public clone(changedProps?: Partial<GroundPlaneProperties>): GroundPlane {\n if (!changedProps)\n return this;\n\n return GroundPlane.create({ ...this, ...changedProps });\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props?: GroundPlaneProps): GroundPlane {\n if (!props)\n return this.defaults;\n\n return new this({\n elevation: props.elevation,\n aboveColor: undefined !== props.aboveColor ? ColorDef.fromJSON(props.aboveColor) : undefined,\n belowColor: undefined !== props.belowColor ? ColorDef.fromJSON(props.belowColor) : undefined,\n });\n }\n\n /** Convert to JSON representation.\n * @param display If defined, the value to use for [[GroundPlaneProps.display]]; otherwise, that property will be left undefined.\n */\n public toJSON(display?: boolean): GroundPlaneProps {\n const props: GroundPlaneProps = {\n elevation: this.elevation,\n aboveColor: this.aboveColor.toJSON(),\n belowColor: this.belowColor.toJSON(),\n };\n\n if (undefined !== display)\n props.display = display;\n\n return props;\n }\n}\n"]}
1
+ {"version":3,"file":"GroundPlane.js","sourceRoot":"","sources":["../../src/GroundPlane.ts"],"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,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;YAC5F,UAAU,EAAE,SAAS,KAAK,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;SAC7F,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAAiB;QAC7B,MAAM,KAAK,GAAqB;YAC9B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;SACrC,CAAC;QAEF,IAAI,SAAS,KAAK,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAE1B,OAAO,KAAK,CAAC;IACf,CAAC;;AA1DH,kCA2DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\nimport { ColorByName } from \"./ColorByName\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\n\n/** JSON representation of a [[GroundPlane]].\n * @see [[EnvironmentProps.ground]].\n * @public\n * @extensions\n */\nexport interface GroundPlaneProps {\n /** Whether the ground plane should be displayed. Defaults to false. */\n display?: boolean;\n /** The Z height at which to draw the ground plane. */\n elevation?: number;\n /** The color in which to draw the ground plane when viewed from above. */\n aboveColor?: ColorDefProps;\n /** The color in which to draw the ground plane when viewed from below. */\n belowColor?: ColorDefProps;\n}\n\n/** A type containing all of the properties and none of the methods of [[GroundPlane]], with `readonly` modifiers removed.\n * @see [[GroundPlane.create]] and [[GroundPlane.clone]].\n * @public\n */\nexport type GroundPlaneProperties = NonFunctionPropertiesOf<GroundPlane>;\n\nconst defaultAboveColor = ColorDef.fromTbgr(ColorByName.darkGreen);\nconst defaultBelowColor = ColorDef.fromTbgr(ColorByName.darkBrown);\n\n/** A circle drawn at a Z elevation, whose diameter is the the XY diagonal of the project extents, used to represent the ground as a reference point within a spatial view.\n * @see [[Environment.ground]].\n * @public\n */\nexport class GroundPlane {\n /** The Z height in meters at which to draw the plane. */\n public readonly elevation: number;\n /** The color in which to draw the ground plane when viewed from above. */\n public readonly aboveColor: ColorDef;\n /** The color in which to draw the ground plane when viewed from below. */\n public readonly belowColor: ColorDef;\n\n protected constructor(props: Partial<GroundPlaneProperties>) {\n this.elevation = props.elevation ?? -0.01;\n this.aboveColor = props.aboveColor ?? defaultAboveColor;\n this.belowColor = props.belowColor ?? defaultBelowColor;\n }\n\n /** Default settings with a dark green \"above\" color, dark brown \"below\" color, and elevation of -0.01 meters. */\n public static readonly defaults = new GroundPlane({});\n\n /** Create a new GroundPlane. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<GroundPlaneProperties>) {\n return props ? new this(props) : this.defaults;\n }\n\n /** Create a copy of this ground plane, identical except for any properties explicitly specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be initialized to their default values.\n */\n public clone(changedProps?: Partial<GroundPlaneProperties>): GroundPlane {\n if (!changedProps)\n return this;\n\n return GroundPlane.create({ ...this, ...changedProps });\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props?: GroundPlaneProps): GroundPlane {\n if (!props)\n return this.defaults;\n\n return new this({\n elevation: props.elevation,\n aboveColor: undefined !== props.aboveColor ? ColorDef.fromJSON(props.aboveColor) : undefined,\n belowColor: undefined !== props.belowColor ? ColorDef.fromJSON(props.belowColor) : undefined,\n });\n }\n\n /** Convert to JSON representation.\n * @param display If defined, the value to use for [[GroundPlaneProps.display]]; otherwise, that property will be left undefined.\n */\n public toJSON(display?: boolean): GroundPlaneProps {\n const props: GroundPlaneProps = {\n elevation: this.elevation,\n aboveColor: this.aboveColor.toJSON(),\n belowColor: this.belowColor.toJSON(),\n };\n\n if (undefined !== display)\n props.display = display;\n\n return props;\n }\n}\n"]}
@@ -45,6 +45,8 @@ var HiddenLine;
45
45
  }
46
46
  }
47
47
  }
48
+ static { this.defaultVisible = new Style({}); }
49
+ static { this.defaultHidden = new Style({}, true); }
48
50
  static fromJSON(json, hidden) {
49
51
  if (undefined !== json)
50
52
  return new Style(json, hidden);
@@ -103,13 +105,13 @@ var HiddenLine;
103
105
  };
104
106
  }
105
107
  }
106
- Style.defaultVisible = new Style({});
107
- Style.defaultHidden = new Style({}, true);
108
108
  HiddenLine.Style = Style;
109
109
  /** Describes how visible and hidden edges and transparent surfaces should be rendered in "hidden line" and "solid fill" [[RenderMode]]s. */
110
110
  class Settings {
111
111
  /** An alias for [[transparencyThreshold]]. */
112
112
  get transThreshold() { return this.transparencyThreshold; }
113
+ /** The default display settings. */
114
+ static { this.defaults = new Settings({}); }
113
115
  /** Create a DisplaySettings from its JSON representation. */
114
116
  static fromJSON(json) {
115
117
  if (core_bentley_1.JsonUtils.isEmptyObjectOrUndefined(json))
@@ -154,8 +156,6 @@ var HiddenLine;
154
156
  this.transparencyThreshold = core_bentley_1.JsonUtils.asDouble(json.transThreshold, 1.0);
155
157
  }
156
158
  }
157
- /** The default display settings. */
158
- Settings.defaults = new Settings({});
159
159
  HiddenLine.Settings = Settings;
160
160
  })(HiddenLine || (exports.HiddenLine = HiddenLine = {}));
161
161
  //# sourceMappingURL=HiddenLine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HiddenLine.js","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,yCAAqD;AACrD,6CAA0C;AAE1C;;GAEG;AACH,IAAiB,UAAU,CA+N1B;AA/ND,WAAiB,UAAU;IA2BzB,gEAAgE;IAChE,MAAa,KAAK;QAChB,gBAAgB;QAChB,IAAW,QAAQ,KAAc,OA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C,KAAe;YAC3B,IAAI,IAAI,KAAK,KAAK;gBAChB,OAAO,IAAI,CAAC;YAEd,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;mBACpC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;mBAChC,IAAI,CAAC,qBAAqB,KAAK,KAAK,CAAC,qBAAqB,CAAC;QAClE,CAAC;QAED,IAAW,eAAe;YACxB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QAED,YAAoB,IAAmB;YACrC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAChD,IAAI,CAAC,qBAAqB,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;;IApDD,oCAAoC;IACtB,iBAAQ,GAAG,IAAI,QAAQ,CAAC,EAAE,CAAC,CAAC;IAlB/B,mBAAQ,WAsEpB,CAAA;AACH,CAAC,EA/NgB,UAAU,0BAAV,UAAU,QA+N1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { JsonUtils } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { LinePixels } from \"./LinePixels\";\n\n/** Namespace containing types controlling how edges and surfaces should be drawn in \"hidden line\" and \"solid fill\" [[RenderMode]]s.\n * @public\n */\nexport namespace HiddenLine {\n /** Describes the symbology with which edges should be drawn. */\n export interface StyleProps {\n /** @internal\n * This JSON representation is awkward, but it must match that used in the db.\n * If the JSON came from the db then all members are present and:\n * - color is overridden only if ovrColor = true.\n * - width is overridden only if width != 0\n * - pattern is overridden only if pattern != LinePixels.Invalid\n * The 'public' JSON representation is more sensible:\n * - Color, width, and pattern are each overridden iff they are not undefined.\n * To make this work for both scenarios, the rules are:\n * - color is overridden if color != undefined and ovrColor != false\n * - width is overridden if width != undefined and width != 0\n * - pattern is overridden if pattern != undefined and pattern != LinePixels.Invalid\n */\n ovrColor?: boolean;\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n color?: ColorDefProps;\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n pattern?: LinePixels;\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n width?: number;\n }\n\n /** Describes the symbology with which edges should be drawn. */\n export class Style {\n /** @internal */\n public get ovrColor(): boolean { return undefined !== this.color; }\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n public readonly color?: ColorDef;\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n public readonly pattern?: LinePixels;\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n public readonly width?: number;\n\n private constructor(json?: StyleProps, hidden?: true) {\n if (JsonUtils.isEmptyObjectOrUndefined(json)) {\n if (hidden)\n this.pattern = LinePixels.HiddenLine;\n\n return;\n }\n\n json = json as StyleProps; // per JsonUtils.isEmptyObjectOrUndefined()\n if (undefined !== json.color && false !== json.ovrColor)\n this.color = ColorDef.fromJSON(json.color);\n\n if (undefined !== json.pattern) {\n const pattern = JsonUtils.asInt(json.pattern, hidden ? LinePixels.HiddenLine : LinePixels.Invalid);\n if (LinePixels.Invalid !== pattern)\n this.pattern = pattern;\n } else if (hidden) {\n this.pattern = LinePixels.HiddenLine;\n }\n\n if (undefined !== json.width) {\n let width = JsonUtils.asInt(json.width, 0);\n if (0 !== width) {\n width = Math.max(1, width);\n this.width = Math.min(32, width);\n }\n }\n }\n\n public static readonly defaultVisible = new Style({});\n public static readonly defaultHidden = new Style({}, true);\n\n public static fromJSON(json?: StyleProps, hidden?: true): Style {\n if (undefined !== json)\n return new Style(json, hidden);\n\n return hidden ? this.defaultHidden : this.defaultVisible;\n }\n\n /** Create a Style equivalent to this one but with the specified color override. */\n public overrideColor(color: ColorDef | undefined): Style {\n if (undefined === this.color && undefined === color)\n return this;\n\n if (undefined !== this.color && undefined !== color && this.color.equals(color))\n return this;\n\n return Style.fromJSON({\n color: color?.toJSON(),\n ovrColor: undefined !== color,\n pattern: this.pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified pattern override. */\n public overridePattern(pattern: LinePixels | undefined): Style {\n if (pattern === this.pattern)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified width override. */\n public overrideWidth(width: number | undefined): Style {\n if (width === this.width)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern: this.pattern,\n width,\n });\n }\n\n /** Returns true if this Style is equivalent to the supplied Style. */\n public equals(other: Style): boolean {\n if (this === other)\n return true;\n else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)\n return false;\n else\n return undefined === this.color || this.color.equals(other.color!);\n }\n\n public toJSON(): StyleProps {\n return {\n ovrColor: this.ovrColor,\n color: this.color ? this.color.toJSON() : ColorDef.white.toJSON(),\n pattern: undefined !== this.pattern ? this.pattern : LinePixels.Invalid,\n width: undefined !== this.width ? this.width : 0,\n };\n }\n }\n\n /** The JSON representation of a [[HiddenLine.Settings]]. */\n export interface SettingsProps {\n /** See [[HiddenLine.Settings.visible]]. */\n visible?: StyleProps;\n /** See [[HiddenLine.Settings.hidden]]. */\n hidden?: StyleProps;\n /** See [[HiddenLine.Settings.transparencyThreshold. */\n transThreshold?: number;\n }\n\n /** Describes how visible and hidden edges and transparent surfaces should be rendered in \"hidden line\" and \"solid fill\" [[RenderMode]]s. */\n export class Settings {\n /** Describes how visible edges (those unobscured by other geometry) should be displayed. */\n public readonly visible: Style;\n /** Describes how hidden edges (those obscured by other geometry) should be displayed. */\n public readonly hidden: Style;\n /** A value in the range [0.0, 1.0] specifying a threshold below which transparent surfaces should not be drawn.\n * A value of 0.0 indicates any surface that is not 100% opaque should not be drawn.\n * A value of 0.25 indicates any surface that is less than 25% opaque should not be drawn.\n * A value of 1.0 indicates that all surfaces should be drawn regardless of transparency.\n * @note values will be clamped to the range [0.0, 1.0].\n * @note Defaults to 1.0.\n */\n public readonly transparencyThreshold: number;\n\n /** An alias for [[transparencyThreshold]]. */\n public get transThreshold(): number { return this.transparencyThreshold; }\n\n /** The default display settings. */\n public static defaults = new Settings({});\n\n /** Create a DisplaySettings from its JSON representation. */\n public static fromJSON(json?: SettingsProps): Settings {\n if (JsonUtils.isEmptyObjectOrUndefined(json))\n return this.defaults;\n else if (json instanceof Settings)\n return json;\n else\n return new Settings(json!);\n }\n\n public toJSON(): SettingsProps {\n const props: SettingsProps = {\n visible: this.visible.toJSON(),\n hidden: this.hidden.toJSON(),\n transThreshold: this.transThreshold,\n };\n\n return props;\n }\n\n /** Create a Settings equivalent to this one with the exception of those properties defined in the supplied JSON. */\n public override(props: SettingsProps): Settings {\n const visible = props.visible;\n const hidden = props.hidden;\n const transparencyThreshold = props.transThreshold;\n return Settings.fromJSON({\n visible: undefined !== visible ? visible : this.visible.toJSON(),\n hidden: undefined !== hidden ? hidden : this.hidden.toJSON(),\n transThreshold: undefined !== transparencyThreshold ? transparencyThreshold : this.transparencyThreshold,\n });\n }\n\n public equals(other: Settings): boolean {\n if (this === other)\n return true;\n\n return this.visible.equals(other.visible)\n && this.hidden.equals(other.hidden)\n && this.transparencyThreshold === other.transparencyThreshold;\n }\n\n public get matchesDefaults(): boolean {\n return this.equals(Settings.defaults);\n }\n\n private constructor(json: SettingsProps) {\n this.visible = Style.fromJSON(json.visible);\n this.hidden = Style.fromJSON(json.hidden, true);\n this.transparencyThreshold = JsonUtils.asDouble(json.transThreshold, 1.0);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"HiddenLine.js","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,yCAAqD;AACrD,6CAA0C;AAE1C;;GAEG;AACH,IAAiB,UAAU,CA+N1B;AA/ND,WAAiB,UAAU;IA2BzB,gEAAgE;IAChE,MAAa,KAAK;QAChB,gBAAgB;QAChB,IAAW,QAAQ,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAUnE,YAAoB,IAAiB,EAAE,MAAa;YAClD,IAAI,wBAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7C,IAAI,MAAM;oBACR,IAAI,CAAC,OAAO,GAAG,uBAAU,CAAC,UAAU,CAAC;gBAEvC,OAAO;YACT,CAAC;YAED,IAAI,GAAG,IAAkB,CAAC,CAAC,2CAA2C;YACtE,IAAI,SAAS,KAAK,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI,CAAC,QAAQ;gBACrD,IAAI,CAAC,KAAK,GAAG,mBAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAE7C,IAAI,SAAS,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC/B,MAAM,OAAO,GAAG,wBAAS,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAU,CAAC,UAAU,CAAC,CAAC,CAAC,uBAAU,CAAC,OAAO,CAAC,CAAC;gBACnG,IAAI,uBAAU,CAAC,OAAO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CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;;IArEU,mBAAQ,WAsEpB,CAAA;AACH,CAAC,EA/NgB,UAAU,0BAAV,UAAU,QA+N1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { JsonUtils } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { LinePixels } from \"./LinePixels\";\n\n/** Namespace containing types controlling how edges and surfaces should be drawn in \"hidden line\" and \"solid fill\" [[RenderMode]]s.\n * @public\n */\nexport namespace HiddenLine {\n /** Describes the symbology with which edges should be drawn. */\n export interface StyleProps {\n /** @internal\n * This JSON representation is awkward, but it must match that used in the db.\n * If the JSON came from the db then all members are present and:\n * - color is overridden only if ovrColor = true.\n * - width is overridden only if width != 0\n * - pattern is overridden only if pattern != LinePixels.Invalid\n * The 'public' JSON representation is more sensible:\n * - Color, width, and pattern are each overridden iff they are not undefined.\n * To make this work for both scenarios, the rules are:\n * - color is overridden if color != undefined and ovrColor != false\n * - width is overridden if width != undefined and width != 0\n * - pattern is overridden if pattern != undefined and pattern != LinePixels.Invalid\n */\n ovrColor?: boolean;\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n color?: ColorDefProps;\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n pattern?: LinePixels;\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n width?: number;\n }\n\n /** Describes the symbology with which edges should be drawn. */\n export class Style {\n /** @internal */\n public get ovrColor(): boolean { return undefined !== this.color; }\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n public readonly color?: ColorDef;\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n public readonly pattern?: LinePixels;\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n public readonly width?: number;\n\n private constructor(json?: StyleProps, hidden?: true) {\n if (JsonUtils.isEmptyObjectOrUndefined(json)) {\n if (hidden)\n this.pattern = LinePixels.HiddenLine;\n\n return;\n }\n\n json = json as StyleProps; // per JsonUtils.isEmptyObjectOrUndefined()\n if (undefined !== json.color && false !== json.ovrColor)\n this.color = ColorDef.fromJSON(json.color);\n\n if (undefined !== json.pattern) {\n const pattern = JsonUtils.asInt(json.pattern, hidden ? LinePixels.HiddenLine : LinePixels.Invalid);\n if (LinePixels.Invalid !== pattern)\n this.pattern = pattern;\n } else if (hidden) {\n this.pattern = LinePixels.HiddenLine;\n }\n\n if (undefined !== json.width) {\n let width = JsonUtils.asInt(json.width, 0);\n if (0 !== width) {\n width = Math.max(1, width);\n this.width = Math.min(32, width);\n }\n }\n }\n\n public static readonly defaultVisible = new Style({});\n public static readonly defaultHidden = new Style({}, true);\n\n public static fromJSON(json?: StyleProps, hidden?: true): Style {\n if (undefined !== json)\n return new Style(json, hidden);\n\n return hidden ? this.defaultHidden : this.defaultVisible;\n }\n\n /** Create a Style equivalent to this one but with the specified color override. */\n public overrideColor(color: ColorDef | undefined): Style {\n if (undefined === this.color && undefined === color)\n return this;\n\n if (undefined !== this.color && undefined !== color && this.color.equals(color))\n return this;\n\n return Style.fromJSON({\n color: color?.toJSON(),\n ovrColor: undefined !== color,\n pattern: this.pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified pattern override. */\n public overridePattern(pattern: LinePixels | undefined): Style {\n if (pattern === this.pattern)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified width override. */\n public overrideWidth(width: number | undefined): Style {\n if (width === this.width)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern: this.pattern,\n width,\n });\n }\n\n /** Returns true if this Style is equivalent to the supplied Style. */\n public equals(other: Style): boolean {\n if (this === other)\n return true;\n else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)\n return false;\n else\n return undefined === this.color || this.color.equals(other.color!);\n }\n\n public toJSON(): StyleProps {\n return {\n ovrColor: this.ovrColor,\n color: this.color ? this.color.toJSON() : ColorDef.white.toJSON(),\n pattern: undefined !== this.pattern ? this.pattern : LinePixels.Invalid,\n width: undefined !== this.width ? this.width : 0,\n };\n }\n }\n\n /** The JSON representation of a [[HiddenLine.Settings]]. */\n export interface SettingsProps {\n /** See [[HiddenLine.Settings.visible]]. */\n visible?: StyleProps;\n /** See [[HiddenLine.Settings.hidden]]. */\n hidden?: StyleProps;\n /** See [[HiddenLine.Settings.transparencyThreshold. */\n transThreshold?: number;\n }\n\n /** Describes how visible and hidden edges and transparent surfaces should be rendered in \"hidden line\" and \"solid fill\" [[RenderMode]]s. */\n export class Settings {\n /** Describes how visible edges (those unobscured by other geometry) should be displayed. */\n public readonly visible: Style;\n /** Describes how hidden edges (those obscured by other geometry) should be displayed. */\n public readonly hidden: Style;\n /** A value in the range [0.0, 1.0] specifying a threshold below which transparent surfaces should not be drawn.\n * A value of 0.0 indicates any surface that is not 100% opaque should not be drawn.\n * A value of 0.25 indicates any surface that is less than 25% opaque should not be drawn.\n * A value of 1.0 indicates that all surfaces should be drawn regardless of transparency.\n * @note values will be clamped to the range [0.0, 1.0].\n * @note Defaults to 1.0.\n */\n public readonly transparencyThreshold: number;\n\n /** An alias for [[transparencyThreshold]]. */\n public get transThreshold(): number { return this.transparencyThreshold; }\n\n /** The default display settings. */\n public static defaults = new Settings({});\n\n /** Create a DisplaySettings from its JSON representation. */\n public static fromJSON(json?: SettingsProps): Settings {\n if (JsonUtils.isEmptyObjectOrUndefined(json))\n return this.defaults;\n else if (json instanceof Settings)\n return json;\n else\n return new Settings(json!);\n }\n\n public toJSON(): SettingsProps {\n const props: SettingsProps = {\n visible: this.visible.toJSON(),\n hidden: this.hidden.toJSON(),\n transThreshold: this.transThreshold,\n };\n\n return props;\n }\n\n /** Create a Settings equivalent to this one with the exception of those properties defined in the supplied JSON. */\n public override(props: SettingsProps): Settings {\n const visible = props.visible;\n const hidden = props.hidden;\n const transparencyThreshold = props.transThreshold;\n return Settings.fromJSON({\n visible: undefined !== visible ? visible : this.visible.toJSON(),\n hidden: undefined !== hidden ? hidden : this.hidden.toJSON(),\n transThreshold: undefined !== transparencyThreshold ? transparencyThreshold : this.transparencyThreshold,\n });\n }\n\n public equals(other: Settings): boolean {\n if (this === other)\n return true;\n\n return this.visible.equals(other.visible)\n && this.hidden.equals(other.hidden)\n && this.transparencyThreshold === other.transparencyThreshold;\n }\n\n public get matchesDefaults(): boolean {\n return this.equals(Settings.defaults);\n }\n\n private constructor(json: SettingsProps) {\n this.visible = Style.fromJSON(json.visible);\n this.hidden = Style.fromJSON(json.hidden, true);\n this.transparencyThreshold = JsonUtils.asDouble(json.transThreshold, 1.0);\n }\n }\n}\n"]}
@@ -107,15 +107,6 @@ export interface CreateIModelProps extends IModelProps {
107
107
  */
108
108
  readonly thumbnail?: ThumbnailProps;
109
109
  }
110
- /**
111
- * Encryption-related properties that can be supplied when creating or opening snapshot iModels.
112
- * @public
113
- * @deprecated in 3.x. **NOTE**, encrypted iModels are no longer supported since they require licensed code.
114
- */
115
- export interface IModelEncryptionProps {
116
- /** The password used to encrypt/decrypt the snapshot iModel. */
117
- readonly password?: string;
118
- }
119
110
  /**
120
111
  * Sqlite options.
121
112
  * @public
@@ -146,7 +137,7 @@ export interface CloudContainerUri {
146
137
  /** Options to open a [SnapshotDb]($backend).
147
138
  * @public
148
139
  */
149
- export interface SnapshotOpenOptions extends IModelEncryptionProps, OpenDbKey {
140
+ export interface SnapshotOpenOptions extends OpenDbKey {
150
141
  /**
151
142
  * The "base" name that can be used for creating temporary files related to this Db.
152
143
  * The string should be a name related to the current Db filename using some known pattern so that all files named "baseName*" can be deleted externally during cleanup.
@@ -164,7 +155,7 @@ export type StandaloneOpenOptions = OpenDbKey;
164
155
  /** Options that can be supplied when creating snapshot iModels.
165
156
  * @public
166
157
  */
167
- export interface CreateSnapshotIModelProps extends IModelEncryptionProps {
158
+ export interface CreateSnapshotIModelProps {
168
159
  /** If true, then create SQLite views for Model, Element, ElementAspect, and Relationship classes.
169
160
  * These database views can often be useful for interoperability workflows.
170
161
  */
@@ -178,7 +169,7 @@ export type CreateEmptySnapshotIModelProps = CreateIModelProps & CreateSnapshotI
178
169
  /** Options that can be supplied when creating standalone iModels.
179
170
  * @internal
180
171
  */
181
- export interface CreateStandaloneIModelProps extends IModelEncryptionProps {
172
+ export interface CreateStandaloneIModelProps {
182
173
  /** If present, file will allow local editing, but cannot be used to create changesets */
183
174
  readonly allowEdit?: string;
184
175
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IModel.d.ts","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAAoB,UAAU,EAAQ,UAAU,EAAyB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvI,OAAO,EACL,KAAK,EAAsD,OAAO,EAAW,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAChJ,kBAAkB,EAAE,iBAAiB,EACtC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,aA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el {
132
+ /** The Id of the repository model. */
133
+ static { this.repositoryModelId = "0x1"; }
134
+ /** The Id of the root subject element. */
135
+ static { this.rootSubjectId = "0x1"; }
136
+ /** The Id of the dictionary model. */
137
+ static { this.dictionaryId = "0x10"; }
132
138
  /** Name of the iModel */
133
139
  get name() {
134
140
  (0, core_bentley_1.assert)(this._name !== undefined);
@@ -369,10 +375,4 @@ class IModel {
369
375
  cartographicToSpatialFromEcef(cartographic, result) { return this.ecefToSpatial(cartographic.toEcef(result), result); }
370
376
  }
371
377
  exports.IModel = IModel;
372
- /** The Id of the repository model. */
373
- IModel.repositoryModelId = "0x1";
374
- /** The Id of the root subject element. */
375
- IModel.rootSubjectId = "0x1";
376
- /** The Id of the dictionary model. */
377
- IModel.dictionaryId = "0x10";
378
378
  //# sourceMappingURL=IModel.js.map