@itwin/core-common 5.2.0-dev.8 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  3. package/lib/cjs/AnalysisStyle.js.map +1 -1
  4. package/lib/cjs/Atmosphere.js.map +1 -1
  5. package/lib/cjs/AuthorizationClient.js.map +1 -1
  6. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  7. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  8. package/lib/cjs/Base64EncodedString.js.map +1 -1
  9. package/lib/cjs/BlobReader.js.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.d.ts +2 -0
  11. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  12. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  13. package/lib/cjs/Camera.js.map +1 -1
  14. package/lib/cjs/CatalogIModel.js.map +1 -1
  15. package/lib/cjs/CesiumIonAssets.js.map +1 -1
  16. package/lib/cjs/ChangedElements.js.map +1 -1
  17. package/lib/cjs/ChangedEntities.js.map +1 -1
  18. package/lib/cjs/ChangesetProps.js.map +1 -1
  19. package/lib/cjs/ClipStyle.js.map +1 -1
  20. package/lib/cjs/Code.js.map +1 -1
  21. package/lib/cjs/ColorByName.js.map +1 -1
  22. package/lib/cjs/ColorDef.js.map +1 -1
  23. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  24. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  25. package/lib/cjs/ContextRealityModel.js.map +1 -1
  26. package/lib/cjs/ContourDisplay.js.map +1 -1
  27. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  28. package/lib/cjs/ECSchemaProps.js.map +1 -1
  29. package/lib/cjs/ECSqlReader.js.map +1 -1
  30. package/lib/cjs/ECSqlTypes.js.map +1 -1
  31. package/lib/cjs/ElementMesh.js.map +1 -1
  32. package/lib/cjs/ElementProps.d.ts +32 -6
  33. package/lib/cjs/ElementProps.d.ts.map +1 -1
  34. package/lib/cjs/ElementProps.js.map +1 -1
  35. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  36. package/lib/cjs/EntityProps.js.map +1 -1
  37. package/lib/cjs/EntityReference.js.map +1 -1
  38. package/lib/cjs/Environment.js.map +1 -1
  39. package/lib/cjs/FeatureIndex.js.map +1 -1
  40. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  41. package/lib/cjs/FeatureSymbology.js +0 -2
  42. package/lib/cjs/FeatureSymbology.js.map +1 -1
  43. package/lib/cjs/FeatureTable.js.map +1 -1
  44. package/lib/cjs/Fonts.js.map +1 -1
  45. package/lib/cjs/Frustum.js.map +1 -1
  46. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  47. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  48. package/lib/cjs/GeometryContainment.js.map +1 -1
  49. package/lib/cjs/GeometryParams.js.map +1 -1
  50. package/lib/cjs/GeometrySummary.js.map +1 -1
  51. package/lib/cjs/Gradient.js.map +1 -1
  52. package/lib/cjs/GraphicParams.js.map +1 -1
  53. package/lib/cjs/GroundPlane.js.map +1 -1
  54. package/lib/cjs/HSLColor.js.map +1 -1
  55. package/lib/cjs/HSVColor.js.map +1 -1
  56. package/lib/cjs/HiddenLine.js.map +1 -1
  57. package/lib/cjs/Hilite.js.map +1 -1
  58. package/lib/cjs/IModel.js.map +1 -1
  59. package/lib/cjs/IModelError.js.map +1 -1
  60. package/lib/cjs/IModelVersion.js.map +1 -1
  61. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  62. package/lib/cjs/Image.js.map +1 -1
  63. package/lib/cjs/IpcAppProps.js.map +1 -1
  64. package/lib/cjs/LightSettings.js.map +1 -1
  65. package/lib/cjs/LinePixels.js.map +1 -1
  66. package/lib/cjs/Localization.js.map +1 -1
  67. package/lib/cjs/MapImagerySettings.js.map +1 -1
  68. package/lib/cjs/MapLayerSettings.js.map +1 -1
  69. package/lib/cjs/MassProperties.js.map +1 -1
  70. package/lib/cjs/MaterialProps.js.map +1 -1
  71. package/lib/cjs/ModelClipGroup.js.map +1 -1
  72. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  73. package/lib/cjs/ModelProps.js.map +1 -1
  74. package/lib/cjs/NativeAppProps.js.map +1 -1
  75. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  76. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  77. package/lib/cjs/PlanarClipMask.js.map +1 -1
  78. package/lib/cjs/QPoint.js.map +1 -1
  79. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  80. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  81. package/lib/cjs/RenderMaterial.js.map +1 -1
  82. package/lib/cjs/RenderPolyline.js.map +1 -1
  83. package/lib/cjs/RenderTexture.js.map +1 -1
  84. package/lib/cjs/RgbColor.js.map +1 -1
  85. package/lib/cjs/RpcInterface.js.map +1 -1
  86. package/lib/cjs/RpcManager.js.map +1 -1
  87. package/lib/cjs/SessionProps.js.map +1 -1
  88. package/lib/cjs/SkyBox.js.map +1 -1
  89. package/lib/cjs/SolarCalculate.js.map +1 -1
  90. package/lib/cjs/SolarShadows.js.map +1 -1
  91. package/lib/cjs/SpatialClassification.js.map +1 -1
  92. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  93. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  94. package/lib/cjs/TerrainSettings.js.map +1 -1
  95. package/lib/cjs/TextureMapping.js.map +1 -1
  96. package/lib/cjs/TextureProps.js.map +1 -1
  97. package/lib/cjs/ThematicDisplay.js.map +1 -1
  98. package/lib/cjs/Thumbnail.js.map +1 -1
  99. package/lib/cjs/TileProps.js.map +1 -1
  100. package/lib/cjs/Tween.js.map +1 -1
  101. package/lib/cjs/TxnAction.js.map +1 -1
  102. package/lib/cjs/ViewDetails.js.map +1 -1
  103. package/lib/cjs/ViewFlags.js.map +1 -1
  104. package/lib/cjs/ViewProps.js.map +1 -1
  105. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  106. package/lib/cjs/annotation/TextAnnotation.d.ts +1 -1
  107. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  108. package/lib/cjs/annotation/TextAnnotation.js +1 -1
  109. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  110. package/lib/cjs/annotation/TextBlock.d.ts +111 -126
  111. package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
  112. package/lib/cjs/annotation/TextBlock.js +234 -142
  113. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  114. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  115. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts +3 -5
  116. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  117. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  118. package/lib/cjs/annotation/TextField.d.ts +86 -0
  119. package/lib/cjs/annotation/TextField.d.ts.map +1 -0
  120. package/lib/cjs/annotation/TextField.js +10 -0
  121. package/lib/cjs/annotation/TextField.js.map +1 -0
  122. package/lib/cjs/annotation/TextStyle.d.ts +125 -35
  123. package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
  124. package/lib/cjs/annotation/TextStyle.js +105 -46
  125. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  126. package/lib/cjs/core-common.d.ts +1 -0
  127. package/lib/cjs/core-common.d.ts.map +1 -1
  128. package/lib/cjs/core-common.js +1 -0
  129. package/lib/cjs/core-common.js.map +1 -1
  130. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  131. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  132. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  133. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  134. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  135. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  136. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  137. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  138. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  139. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  140. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  141. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  142. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  143. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  144. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  145. package/lib/cjs/geometry/Placement.js.map +1 -1
  146. package/lib/cjs/geometry/Projection.js.map +1 -1
  147. package/lib/cjs/geometry/TextString.js.map +1 -1
  148. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  149. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  150. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  151. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  152. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  153. package/lib/cjs/internal/Snapping.js.map +1 -1
  154. package/lib/cjs/internal/annotations/FieldFormatter.d.ts +18 -0
  155. package/lib/cjs/internal/annotations/FieldFormatter.d.ts.map +1 -0
  156. package/lib/cjs/internal/annotations/FieldFormatter.js +66 -0
  157. package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -0
  158. package/lib/cjs/internal/cross-package.d.ts +1 -0
  159. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  160. package/lib/cjs/internal/cross-package.js +4 -1
  161. package/lib/cjs/internal/cross-package.js.map +1 -1
  162. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  163. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  164. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  165. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  166. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  167. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  168. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  169. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  170. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  171. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  172. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  173. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  174. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  175. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  176. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  177. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  178. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  179. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  180. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  181. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  182. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  183. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  184. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  185. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  186. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  187. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  188. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  189. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  190. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  191. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  192. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  193. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  194. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  195. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  196. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  197. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  198. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  199. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  200. package/lib/cjs/tile/TileIO.js.map +1 -1
  201. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  202. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  203. package/lib/esm/AmbientOcclusion.js.map +1 -1
  204. package/lib/esm/AnalysisStyle.js.map +1 -1
  205. package/lib/esm/Atmosphere.js.map +1 -1
  206. package/lib/esm/AuthorizationClient.js.map +1 -1
  207. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  208. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  209. package/lib/esm/Base64EncodedString.js.map +1 -1
  210. package/lib/esm/BlobReader.js.map +1 -1
  211. package/lib/esm/BriefcaseTypes.d.ts +2 -0
  212. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  213. package/lib/esm/BriefcaseTypes.js.map +1 -1
  214. package/lib/esm/Camera.js.map +1 -1
  215. package/lib/esm/CatalogIModel.js.map +1 -1
  216. package/lib/esm/CesiumIonAssets.js.map +1 -1
  217. package/lib/esm/ChangedElements.js.map +1 -1
  218. package/lib/esm/ChangedEntities.js.map +1 -1
  219. package/lib/esm/ChangesetProps.js.map +1 -1
  220. package/lib/esm/ClipStyle.js.map +1 -1
  221. package/lib/esm/Code.js.map +1 -1
  222. package/lib/esm/ColorByName.js.map +1 -1
  223. package/lib/esm/ColorDef.js.map +1 -1
  224. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  225. package/lib/esm/ConcurrentQuery.js.map +1 -1
  226. package/lib/esm/ContextRealityModel.js.map +1 -1
  227. package/lib/esm/ContourDisplay.js.map +1 -1
  228. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  229. package/lib/esm/ECSchemaProps.js.map +1 -1
  230. package/lib/esm/ECSqlReader.js.map +1 -1
  231. package/lib/esm/ECSqlTypes.js.map +1 -1
  232. package/lib/esm/ElementMesh.js.map +1 -1
  233. package/lib/esm/ElementProps.d.ts +32 -6
  234. package/lib/esm/ElementProps.d.ts.map +1 -1
  235. package/lib/esm/ElementProps.js.map +1 -1
  236. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  237. package/lib/esm/EntityProps.js.map +1 -1
  238. package/lib/esm/EntityReference.js.map +1 -1
  239. package/lib/esm/Environment.js.map +1 -1
  240. package/lib/esm/FeatureIndex.js.map +1 -1
  241. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  242. package/lib/esm/FeatureSymbology.js +0 -2
  243. package/lib/esm/FeatureSymbology.js.map +1 -1
  244. package/lib/esm/FeatureTable.js.map +1 -1
  245. package/lib/esm/Fonts.js.map +1 -1
  246. package/lib/esm/Frustum.js.map +1 -1
  247. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  248. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  249. package/lib/esm/GeometryContainment.js.map +1 -1
  250. package/lib/esm/GeometryParams.js.map +1 -1
  251. package/lib/esm/GeometrySummary.js.map +1 -1
  252. package/lib/esm/Gradient.js.map +1 -1
  253. package/lib/esm/GraphicParams.js.map +1 -1
  254. package/lib/esm/GroundPlane.js.map +1 -1
  255. package/lib/esm/HSLColor.js.map +1 -1
  256. package/lib/esm/HSVColor.js.map +1 -1
  257. package/lib/esm/HiddenLine.js.map +1 -1
  258. package/lib/esm/Hilite.js.map +1 -1
  259. package/lib/esm/IModel.js.map +1 -1
  260. package/lib/esm/IModelError.js.map +1 -1
  261. package/lib/esm/IModelVersion.js.map +1 -1
  262. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  263. package/lib/esm/Image.js.map +1 -1
  264. package/lib/esm/IpcAppProps.js.map +1 -1
  265. package/lib/esm/LightSettings.js.map +1 -1
  266. package/lib/esm/LinePixels.js.map +1 -1
  267. package/lib/esm/Localization.js.map +1 -1
  268. package/lib/esm/MapImagerySettings.js.map +1 -1
  269. package/lib/esm/MapLayerSettings.js.map +1 -1
  270. package/lib/esm/MassProperties.js.map +1 -1
  271. package/lib/esm/MaterialProps.js.map +1 -1
  272. package/lib/esm/ModelClipGroup.js.map +1 -1
  273. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  274. package/lib/esm/ModelProps.js.map +1 -1
  275. package/lib/esm/NativeAppProps.js.map +1 -1
  276. package/lib/esm/OctEncodedNormal.js.map +1 -1
  277. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  278. package/lib/esm/PlanarClipMask.js.map +1 -1
  279. package/lib/esm/QPoint.js.map +1 -1
  280. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  281. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  282. package/lib/esm/RenderMaterial.js.map +1 -1
  283. package/lib/esm/RenderPolyline.js.map +1 -1
  284. package/lib/esm/RenderTexture.js.map +1 -1
  285. package/lib/esm/RgbColor.js.map +1 -1
  286. package/lib/esm/RpcInterface.js.map +1 -1
  287. package/lib/esm/RpcManager.js.map +1 -1
  288. package/lib/esm/SessionProps.js.map +1 -1
  289. package/lib/esm/SkyBox.js.map +1 -1
  290. package/lib/esm/SolarCalculate.js.map +1 -1
  291. package/lib/esm/SolarShadows.js.map +1 -1
  292. package/lib/esm/SpatialClassification.js.map +1 -1
  293. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  294. package/lib/esm/SubCategoryOverride.js.map +1 -1
  295. package/lib/esm/TerrainSettings.js.map +1 -1
  296. package/lib/esm/TextureMapping.js.map +1 -1
  297. package/lib/esm/TextureProps.js.map +1 -1
  298. package/lib/esm/ThematicDisplay.js.map +1 -1
  299. package/lib/esm/Thumbnail.js.map +1 -1
  300. package/lib/esm/TileProps.js.map +1 -1
  301. package/lib/esm/Tween.js.map +1 -1
  302. package/lib/esm/TxnAction.js.map +1 -1
  303. package/lib/esm/ViewDetails.js.map +1 -1
  304. package/lib/esm/ViewFlags.js.map +1 -1
  305. package/lib/esm/ViewProps.js.map +1 -1
  306. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  307. package/lib/esm/annotation/TextAnnotation.d.ts +1 -1
  308. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  309. package/lib/esm/annotation/TextAnnotation.js +1 -1
  310. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  311. package/lib/esm/annotation/TextBlock.d.ts +111 -126
  312. package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
  313. package/lib/esm/annotation/TextBlock.js +230 -141
  314. package/lib/esm/annotation/TextBlock.js.map +1 -1
  315. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  316. package/lib/esm/annotation/TextBlockLayoutResult.d.ts +3 -5
  317. package/lib/esm/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  318. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  319. package/lib/esm/annotation/TextField.d.ts +86 -0
  320. package/lib/esm/annotation/TextField.d.ts.map +1 -0
  321. package/lib/esm/annotation/TextField.js +9 -0
  322. package/lib/esm/annotation/TextField.js.map +1 -0
  323. package/lib/esm/annotation/TextStyle.d.ts +125 -35
  324. package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
  325. package/lib/esm/annotation/TextStyle.js +104 -45
  326. package/lib/esm/annotation/TextStyle.js.map +1 -1
  327. package/lib/esm/core-common.d.ts +1 -0
  328. package/lib/esm/core-common.d.ts.map +1 -1
  329. package/lib/esm/core-common.js +1 -0
  330. package/lib/esm/core-common.js.map +1 -1
  331. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  332. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  333. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  334. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  335. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  336. package/lib/esm/geometry/Cartographic.js.map +1 -1
  337. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  338. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  339. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  340. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  341. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  342. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  343. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  344. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  345. package/lib/esm/geometry/LineStyle.js.map +1 -1
  346. package/lib/esm/geometry/Placement.js.map +1 -1
  347. package/lib/esm/geometry/Projection.js.map +1 -1
  348. package/lib/esm/geometry/TextString.js.map +1 -1
  349. package/lib/esm/internal/BackendTypes.js.map +1 -1
  350. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  351. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  352. package/lib/esm/internal/RenderMesh.js.map +1 -1
  353. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  354. package/lib/esm/internal/Snapping.js.map +1 -1
  355. package/lib/esm/internal/annotations/FieldFormatter.d.ts +18 -0
  356. package/lib/esm/internal/annotations/FieldFormatter.d.ts.map +1 -0
  357. package/lib/esm/internal/annotations/FieldFormatter.js +62 -0
  358. package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -0
  359. package/lib/esm/internal/cross-package.d.ts +1 -0
  360. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  361. package/lib/esm/internal/cross-package.js +1 -0
  362. package/lib/esm/internal/cross-package.js.map +1 -1
  363. package/lib/esm/ipc/IpcSession.js.map +1 -1
  364. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  365. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  366. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  367. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  368. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  369. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  370. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  371. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  372. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  373. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  374. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  375. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  376. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  377. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  378. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  379. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  380. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  381. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  382. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  383. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  384. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  385. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  386. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  387. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  388. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  389. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  390. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  391. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  392. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  393. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  394. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  395. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  396. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  397. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  398. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  399. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  400. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  401. package/lib/esm/tile/TileIO.js.map +1 -1
  402. package/lib/esm/tile/TileMetadata.js.map +1 -1
  403. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  404. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAc,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAiC,MAAM,mBAAmB,CAAC;AAE/I;;;;GAIG;AACH,MAAM,KAAW,QAAQ,CA2fxB;AA3fD,WAAiB,QAAQ;IACvB,4CAA4C;IAC5C,IAAY,KAOX;IAPD,WAAY,KAAK;QACf,gBAAgB;QAChB,iCAAQ,CAAA;QACR,8CAA8C;QAC9C,qCAAU,CAAA;QACV,2EAA2E;QAC3E,uCAAW,CAAA;IACb,CAAC,EAPW,KAAK,GAAL,cAAK,KAAL,cAAK,QAOhB;IAED,+FAA+F;IAC/F,IAAY,IASX;IATD,WAAY,IAAI;QACd,+BAAQ,CAAA;QACR,mCAAU,CAAA;QACV,mCAAU,CAAA;QACV,6CAAe,CAAA;QACf,yCAAa,CAAA;QACb,iDAAiB,CAAA;QACjB,4DAA4D;QAC5D,uCAAY,CAAA;IACd,CAAC,EATW,IAAI,GAAJ,aAAI,KAAJ,aAAI,QASf;IAUD;;OAEG;IACH,MAAa,QAAQ;QACZ,KAAK,CAAS;QACd,KAAK,CAAW;QACvB,YAAmB,IAAmB;YACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC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K,CAAC,0BAA0B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;oCAClG,CAAC;oCACD,MAAM;gCACR,CAAC;gCACD,KAAK,oBAAoB,CAAC,MAAM;oCAC9B,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oCACzB,MAAM;4BACV,CAAC;wBACH,CAAC;wBAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;4BAC/B,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;4BACvC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;4BACrC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;4BACrC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;wBACvC,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAED,MAAM,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC;YAC1B,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC7E,MAAM,CAAC,SAAS,KAAK,WAAW,CAAC,CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAraU,aAAI,OAsahB,CAAA;AACH,CAAC,EA3fgB,QAAQ,KAAR,QAAQ,QA2fxB","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 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\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 /** Produce an image suitable for use for thematic rendering.\n * This function is chiefly useful for the WebGL renderer.\n * @see [[Gradient.Symb.getImage]] to obtain a generally useful image instead.\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 } else {\n throw new Error(`Thematic gradient mode ${String(settings.mode)} requires at least two steps.`);\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,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAc,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAiC,MAAM,mBAAmB,CAAC;AAE/I;;;;GAIG;AACH,MAAM,KAAW,QAAQ,CA2fxB;AA3fD,WAAiB,QAAQ;IACvB,4CAA4C;IAC5C,IAAY,KAOX;IAPD,WAAY,KAAK;QACf,gBAAgB;QAChB,iCAAQ,CAAA;QACR,8CAA8C;QAC9C,qCAAU,CAAA;QACV,2EAA2E;QAC3E,uCAAW,CAAA;IACb,CAAC,EAPW,KAAK,GAAL,cAAK,KAAL,cAAK,QAOhB;IAED,+FAA+F;IAC/F,IAAY,IASX;IATD,WAAY,IAAI;QACd,+BAAQ,CAAA;QACR,mCAAU,CAAA;QACV,mCAAU,CAAA;QACV,6CAAe,CAAA;QACf,yCAAa,CAAA;QACb,iDAAiB,CAAA;QACjB,4DAA4D;QAC5D,uCAAY,CAAA;IACd,CAAC,EATW,IAAI,GAAJ,aAAI,KAAJ,aAAI,QASf;IAUD;;OAEG;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C,CAAC,CAAC;wCACtF,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oCAC/B,CAAC;yCAAM,CAAC;wCACN,MAAM,IAAI,KAAK,CAAC,0BAA0B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;oCAClG,CAAC;oCACD,MAAM;gCACR,CAAC;gCACD,KAAK,oBAAoB,CAAC,MAAM;oCAC9B,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oCACzB,MAAM;4BACV,CAAC;wBACH,CAAC;wBAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;4BAC/B,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;4BACvC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;4BACrC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;4BACrC,KAAK,CAAC,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;wBACvC,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAED,MAAM,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC;YAC1B,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC7E,MAAM,CAAC,SAAS,KAAK,WAAW,CAAC,CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAraU,aAAI,OAsahB,CAAA;AACH,CAAC,EA3fgB,QAAQ,KAAR,QAAQ,QA2fxB","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 Symbology\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\r\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\r\n\r\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\r\n * @see [[GeometryParams]]\r\n * @see [[GraphicParams]]\r\n * @public\r\n */\r\nexport namespace Gradient {\r\n /** Flags applied to a [[Gradient.Symb]]. */\r\n export enum Flags {\r\n /** No flags. */\r\n None = 0,\r\n /** Reverse the order of the gradient keys. */\r\n Invert = 1,\r\n /** Draw an outline around the surface to which the gradient is applied. */\r\n Outline = 2,\r\n }\r\n\r\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\r\n export enum Mode {\r\n None = 0,\r\n Linear = 1,\r\n Curved = 2,\r\n Cylindrical = 3,\r\n Spherical = 4,\r\n Hemispherical = 5,\r\n /** For a gradient created based for [[ThematicDisplay]]. */\r\n Thematic = 6,\r\n }\r\n\r\n /** Gradient fraction value to [[ColorDef]] pair */\r\n export interface KeyColorProps {\r\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\r\n value: number;\r\n /** Color value for given fraction */\r\n color: ColorDefProps;\r\n }\r\n\r\n /** Gradient fraction value to [[ColorDef]] pair\r\n * @see [[Gradient.KeyColorProps]]\r\n */\r\n export class KeyColor {\r\n public value: number;\r\n public color: ColorDef;\r\n public constructor(json: KeyColorProps) {\r\n this.value = json.value;\r\n this.color = ColorDef.fromJSON(json.color);\r\n }\r\n }\r\n\r\n /** Compare two KeyColor objects for equality. Returns true if equal. */\r\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\r\n return (a.value === b.value) && a.color.equals(b.color);\r\n }\r\n\r\n /** Multi-color area fill defined by a range of colors that vary by position */\r\n export interface SymbProps {\r\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\r\n mode: Mode;\r\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\r\n flags?: Flags;\r\n /** Gradient rotation angle, 0.0 if undefined */\r\n angle?: AngleProps;\r\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\r\n tint?: number;\r\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\r\n shift?: number;\r\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\r\n keys: KeyColorProps[];\r\n /** Settings applicable to [[ThematicDisplay]]. */\r\n thematicSettings?: ThematicGradientSettingsProps;\r\n }\r\n\r\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\r\n * @public\r\n */\r\n export interface ProduceImageArgs {\r\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\r\n width: number;\r\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\r\n height: number;\r\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\r\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\r\n */\r\n includeThematicMargin?: boolean;\r\n }\r\n\r\n /** Multi-color area fill defined by a range of colors that vary by position.\r\n * Gradient fill can be applied to planar regions.\r\n * @see [[Gradient.SymbProps]]\r\n */\r\n export class Symb {\r\n public mode = Mode.None;\r\n public flags: Flags = Flags.None;\r\n public angle?: Angle;\r\n public tint?: number;\r\n public shift: number = 0;\r\n public thematicSettings?: ThematicGradientSettings;\r\n public keys: KeyColor[] = [];\r\n\r\n /** create a GradientSymb from a json object. */\r\n public static fromJSON(json?: SymbProps) {\r\n const result = new Symb();\r\n if (!json)\r\n return result;\r\n result.mode = json.mode;\r\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\r\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\r\n result.tint = json.tint;\r\n result.shift = json.shift ? json.shift : 0;\r\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\r\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\r\n\r\n return result;\r\n }\r\n\r\n private static _fixedSchemeKeys = [\r\n // NB: these color values are ordered as rbg. Note how the components are applied below.\r\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.\r\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.\r\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\r\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.\r\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.\r\n ];\r\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\r\n\r\n /** Create for [[ThematicDisplay]]. */\r\n public static createThematic(settings: ThematicGradientSettings) {\r\n const result = new Symb();\r\n result.mode = Mode.Thematic;\r\n result.thematicSettings = settings;\r\n\r\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\r\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\r\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\r\n } else { // custom color scheme; must use custom keys\r\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\r\n if (settings.customKeys.length > 1) {\r\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\r\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\r\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\r\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n public toJSON(): SymbProps {\r\n return {\r\n ...this,\r\n thematicSettings: this.thematicSettings?.toJSON(),\r\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\r\n };\r\n }\r\n\r\n public clone(): Symb {\r\n return Symb.fromJSON(this.toJSON());\r\n }\r\n\r\n /** Returns true if this symbology is equal to another, false otherwise. */\r\n public equals(other: Symb): boolean {\r\n return Symb.compareSymb(this, other) === 0;\r\n }\r\n\r\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\r\n * @param lhs First gradient to compare\r\n * @param rhs Second gradient to compare\r\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.\r\n */\r\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\r\n if (lhs === rhs)\r\n return 0; // Same pointer\r\n if (lhs.mode !== rhs.mode)\r\n return lhs.mode - rhs.mode;\r\n if (lhs.flags !== rhs.flags)\r\n if (lhs.flags === undefined)\r\n return -1;\r\n else if (rhs.flags === undefined)\r\n return 1;\r\n else\r\n return lhs.flags - rhs.flags;\r\n if (lhs.tint !== rhs.tint)\r\n if (lhs.tint === undefined)\r\n return -1;\r\n else if (rhs.tint === undefined)\r\n return 1;\r\n else\r\n return lhs.tint - rhs.tint;\r\n if (lhs.shift !== rhs.shift)\r\n if (lhs.shift === undefined)\r\n return -1;\r\n else if (rhs.shift === undefined)\r\n return 1;\r\n else\r\n return lhs.shift - rhs.shift;\r\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\r\n if (lhs.angle === undefined)\r\n return -1;\r\n else\r\n return 1;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n return lhs.angle.radians - rhs.angle!.radians;\r\n if (lhs.keys.length !== rhs.keys.length)\r\n return lhs.keys.length - rhs.keys.length;\r\n for (let i = 0; i < lhs.keys.length; i++) {\r\n if (lhs.keys[i].value !== rhs.keys[i].value)\r\n return lhs.keys[i].value - rhs.keys[i].value;\r\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\r\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\r\n }\r\n if (lhs.thematicSettings !== rhs.thematicSettings)\r\n if (undefined === lhs.thematicSettings)\r\n return -1;\r\n else if (undefined === rhs.thematicSettings)\r\n return 1;\r\n else {\r\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\r\n if (0 !== thematicCompareResult)\r\n return thematicCompareResult;\r\n }\r\n return 0;\r\n }\r\n\r\n /** Compare this symbology to another.\r\n * @see [[Gradient.Symb.compareSymb]]\r\n */\r\n public compare(other: Symb): number {\r\n return Gradient.Symb.compareSymb(this, other);\r\n }\r\n\r\n /**\r\n * Ensure the value given is within the range of 0 to 255,\r\n * and truncate the value to only the 8 least significant bits.\r\n */\r\n private roundToByte(num: number): number {\r\n return Math.min(num + .5, 255.0) & 0xFF;\r\n }\r\n\r\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\r\n public mapColor(value: number) {\r\n if (value < 0)\r\n value = 0;\r\n else if (value > 1)\r\n value = 1;\r\n\r\n if ((this.flags & Flags.Invert) !== 0)\r\n value = 1 - value;\r\n\r\n let idx = 0;\r\n let d;\r\n let w0;\r\n let w1;\r\n if (this.keys.length <= 2) {\r\n w0 = 1.0 - value;\r\n w1 = value;\r\n } else { // locate value in map, blend corresponding colors\r\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\r\n idx++;\r\n\r\n d = this.keys[idx + 1].value - this.keys[idx].value;\r\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\r\n w0 = 1.0 - w1;\r\n }\r\n\r\n const color0 = this.keys[idx].color;\r\n const color1 = this.keys[idx + 1].color;\r\n const colors0 = color0.colors;\r\n const colors1 = color1.colors;\r\n const red = w0 * colors0.r + w1 * colors1.r;\r\n const green = w0 * colors0.g + w1 * colors1.g;\r\n const blue = w0 * colors0.b + w1 * colors1.b;\r\n const transparency = w0 * colors0.t + w1 * colors1.t;\r\n\r\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\r\n }\r\n\r\n public get hasTranslucency(): boolean {\r\n for (const key of this.keys) {\r\n if (!key.color.isOpaque)\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\r\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\r\n\r\n /** Produce an image suitable for use for thematic rendering.\r\n * This function is chiefly useful for the WebGL renderer.\r\n * @see [[Gradient.Symb.getImage]] to obtain a generally useful image instead.\r\n */\r\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\r\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\r\n\r\n let settings = this.thematicSettings;\r\n if (settings === undefined) {\r\n settings = ThematicGradientSettings.defaults;\r\n }\r\n\r\n const stepCount = Math.min(settings.stepCount, maxDimension);\r\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\r\n const image = new Uint8Array(1 * dimension * 4);\r\n let currentIdx = image.length - 1;\r\n\r\n function addColor(color: ColorDef) {\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n\r\n switch (settings.mode) {\r\n case ThematicGradientMode.Smooth: {\r\n for (let j = 0; j < dimension; j++) {\r\n const f = (1 - j / (dimension));\r\n addColor(this.mapColor(f));\r\n }\r\n break;\r\n }\r\n\r\n case ThematicGradientMode.SteppedWithDelimiter:\r\n case ThematicGradientMode.IsoLines:\r\n // The work to generate the delimiter lines and isolines is done completely in the shader.\r\n // Therefore, we just fall through here and use a regular stepped gradient.\r\n case ThematicGradientMode.Stepped: {\r\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\r\n for (let j = 0; j < dimension; j++) {\r\n // If we use Smooth's approach to generate the gradient...\r\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\r\n // We really want these values: 0 .25 .5 .75 1\r\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\r\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\r\n const f = (1 - j / (dimension - 1));\r\n addColor(this.mapColor(f));\r\n }\r\n break;\r\n }\r\n }\r\n\r\n assert(-1 === currentIdx);\r\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\r\n assert(undefined !== imageBuffer);\r\n return imageBuffer;\r\n }\r\n\r\n /** Produces a bitmap image from this gradient.\r\n * @param width Width of the image\r\n * @param height Height of the image\r\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.\r\n * @see [[produceImage]] for more customization.\r\n */\r\n public getImage(width: number, height: number): ImageBuffer {\r\n if (this.mode === Mode.Thematic)\r\n width = 1;\r\n\r\n return this.produceImage({ width, height, includeThematicMargin: true });\r\n }\r\n\r\n /** Produces a bitmap image from this gradient. */\r\n public produceImage(args: ProduceImageArgs): ImageBuffer {\r\n const { width, height, includeThematicMargin } = { ...args };\r\n\r\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\r\n const cosA = Math.cos(thisAngle);\r\n const sinA = Math.sin(thisAngle);\r\n const image = new Uint8Array(width * height * 4);\r\n let currentIdx = image.length - 1;\r\n const shift = Math.min(1.0, Math.abs(this.shift));\r\n\r\n switch (this.mode) {\r\n case Mode.Linear:\r\n case Mode.Cylindrical: {\r\n const xs = 0.5 - 0.25 * shift * cosA;\r\n const ys = 0.5 - 0.25 * shift * sinA;\r\n let dMax;\r\n let dMin = dMax = 0.0;\r\n let d;\r\n for (let j = 0; j < 2; j++) {\r\n for (let i = 0; i < 2; i++) {\r\n d = (i - xs) * cosA + (j - ys) * sinA;\r\n if (d < dMin)\r\n dMin = d;\r\n if (d > dMax)\r\n dMax = d;\r\n }\r\n }\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n d = x * cosA + y * sinA;\r\n let f;\r\n if (this.mode === Mode.Linear) {\r\n if (d > 0)\r\n f = 0.5 + 0.5 * d / dMax;\r\n else\r\n f = 0.5 - 0.5 * d / dMin;\r\n } else {\r\n if (d > 0)\r\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\r\n else\r\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\r\n }\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Curved: {\r\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\r\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n const xr = 0.8 * (x * cosA + y * sinA);\r\n const yr = y * cosA - x * sinA;\r\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Spherical: {\r\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\r\n const xs = 0.5 * shift * (cosA + sinA) * r;\r\n const ys = 0.5 * shift * (sinA - cosA) * r;\r\n for (let j = 0; j < height; j++) {\r\n const y = ys + j / height - 0.5;\r\n for (let i = 0; i < width; i++) {\r\n const x = xs + i / width - 0.5;\r\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Hemispherical: {\r\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\r\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\r\n for (let j = 0; j < height; j++) {\r\n const y = j / height - ys;\r\n for (let i = 0; i < width; i++) {\r\n const x = i / width - xs;\r\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\r\n const color = this.mapColor(f);\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n break;\r\n }\r\n case Mode.Thematic: {\r\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\r\n\r\n for (let j = 0; j < height; j++) {\r\n let f = 1 - j / height;\r\n let color: ColorDef;\r\n\r\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\r\n color = settings.marginColor;\r\n } else {\r\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\r\n switch (settings.mode) {\r\n case ThematicGradientMode.SteppedWithDelimiter:\r\n case ThematicGradientMode.IsoLines:\r\n case ThematicGradientMode.Stepped: {\r\n if (settings.stepCount > 1) {\r\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\r\n color = this.mapColor(fStep);\r\n } else {\r\n throw new Error(`Thematic gradient mode ${String(settings.mode)} requires at least two steps.`);\r\n }\r\n break;\r\n }\r\n case ThematicGradientMode.Smooth:\r\n color = this.mapColor(f);\r\n break;\r\n }\r\n }\r\n\r\n for (let i = 0; i < width; i++) {\r\n image[currentIdx--] = color.getAlpha();\r\n image[currentIdx--] = color.colors.b;\r\n image[currentIdx--] = color.colors.g;\r\n image[currentIdx--] = color.colors.r;\r\n }\r\n }\r\n }\r\n }\r\n\r\n assert(-1 === currentIdx);\r\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\r\n assert(undefined !== imageBuffer);\r\n return imageBuffer;\r\n }\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicParams.js","sourceRoot":"","sources":["../../src/GraphicParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,MAAM,CAAN,IAAY,SAgBX;AAhBD,WAAY,SAAS;IACnB,cAAc;IACd,yCAAQ,CAAA;IACR,qFAAqF;IACrF,6CAAe,CAAA;IACf,2FAA2F;IAC3F,6CAAe,CAAA;IACf;;;OAGG;IACH,6CAAe,CAAA;IACf,wCAAwC;IACxC,iDAA0B,CAAA;IAC1B,2EAA2E;IAC3E,qDAAmB,CAAA;AACrB,CAAC,EAhBW,SAAS,KAAT,SAAS,QAgBpB;AAED;;;GAGG;AACH,MAAM,OAAO,aAAa;IACxB,yEAAyE;IAClE,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;IAClC,oDAAoD;IAC7C,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC;IACrC,gGAAgG;IACzF,WAAW,GAAG,CAAC,CAAC;IACvB,qCAAqC;IAC9B,SAAS,GAAG,QAAQ,CAAC,KAAK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C,UAAU,GAAG,UAAU,CAAC;QACtC,OAAO,aAAa,CAAC;IACvB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,gBAAgB,CAAC,SAAmB;QAChD,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC7C,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { ColorDef } from \"./ColorDef\";\nimport { Gradient } from \"./Gradient\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RenderMaterial } from \"./RenderMaterial\";\n\n/** Flags indicating whether and how the interiors of closed planar regions is displayed within a view.\n * @public\n * @extensions\n */\nexport enum FillFlags {\n /** No fill */\n None = 0,\n /** Use the element's fill color when fill is enabled in the view's [[ViewFlags]]. */\n ByView = 1 << 0,\n /** Use the element's fill color even when fill is disabled in the view's [[ViewFlags]]. */\n Always = 1 << 1,\n /** Render the fill behind other geometry belonging to the same element.\n * For example if an element's geometry contains text with background fill, the text always renders in front of the fill.\n * @note [GraphicBuilder]($frontend) will not produce edge geometry for shapes with this fill flag. If you want an outline, add it separately.\n */\n Behind = 1 << 2,\n /** Combines Behind and Always flags. */\n Blanking = Behind | Always,\n /** Use the view's background color instead of the element's fill color. */\n Background = 1 << 3,\n}\n\n/** The \"cooked\" material and symbology for a [[RenderGraphic]]. This determines the appearance\n * (e.g. texture, color, width, linestyle, etc.) used to draw Geometry.\n * @public\n */\nexport class GraphicParams {\n /** Describes how fill is applied to planar regions in wireframe mode. */\n public fillFlags = FillFlags.None;\n /** The line pattern applied to curves and edges. */\n public linePixels = LinePixels.Solid;\n /** The width, in pixels, of curves and edges. Values are clamped to [1..31] at display time. */\n public rasterWidth = 1;\n /** The color of curves and edges. */\n public lineColor = ColorDef.black;\n /** The color of surfaces. */\n public fillColor = ColorDef.black;\n /** Material applied to surfaces. */\n public material?: RenderMaterial;\n /** Gradient fill applied to surfaces. */\n public gradient?: Gradient.Symb;\n\n /** Set the transparency of the line color, where 0=fully opaque and 255=full transparent. */\n public setLineTransparency(transparency: number) { this.lineColor = this.lineColor.withTransparency(transparency); }\n\n /** Set the transparency of the fill color, where 0=fully opaque and 255=full transparent. */\n public setFillTransparency(transparency: number) { this.fillColor = this.fillColor.withTransparency(transparency); }\n\n public clone(out?: GraphicParams): GraphicParams {\n out = out ?? new GraphicParams();\n\n out.fillFlags = this.fillFlags;\n out.linePixels = this.linePixels;\n out.rasterWidth = this.rasterWidth;\n out.lineColor = this.lineColor;\n out.fillColor = this.fillColor;\n out.material = this.material;\n out.gradient = this.gradient;\n\n return out;\n }\n\n /** Conveniently create a GraphicParams the most commonly-used properties. */\n public static fromSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels = LinePixels.Solid): GraphicParams {\n const graphicParams = new GraphicParams();\n graphicParams.lineColor = lineColor;\n graphicParams.fillColor = fillColor;\n graphicParams.rasterWidth = lineWidth;\n graphicParams.linePixels = linePixels;\n return graphicParams;\n }\n\n /** Create a GraphicParams with blanking fill of the specified color.\n * @see [[FillFlags.Blanking]].\n */\n public static fromBlankingFill(fillColor: ColorDef): GraphicParams {\n const graphicParams = new GraphicParams();\n graphicParams.fillColor = fillColor;\n graphicParams.fillFlags = FillFlags.Blanking;\n return graphicParams;\n }\n}\n"]}
1
+ {"version":3,"file":"GraphicParams.js","sourceRoot":"","sources":["../../src/GraphicParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AAC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AG,IAAI,CAAC,SAAS,CAAC;QAC/B,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/B,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE7B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,6EAA6E;IACtE,MAAM,CAAC,aAAa,CAAC,SAAmB,EAAE,SAAmB,EAAE,SAAiB,EAAE,UAAU,GAAG,UAAU,CAAC,KAAK;QACpH,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,WAAW,GAAG,SAAS,CAAC;QACtC,aAAa,CAAC,UAAU,GAAG,UAAU,CAAC;QACtC,OAAO,aAAa,CAAC;IACvB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,gBAAgB,CAAC,SAAmB;QAChD,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC7C,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\nimport { Gradient } from \"./Gradient\";\r\nimport { LinePixels } from \"./LinePixels\";\r\nimport { RenderMaterial } from \"./RenderMaterial\";\r\n\r\n/** Flags indicating whether and how the interiors of closed planar regions is displayed within a view.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum FillFlags {\r\n /** No fill */\r\n None = 0,\r\n /** Use the element's fill color when fill is enabled in the view's [[ViewFlags]]. */\r\n ByView = 1 << 0,\r\n /** Use the element's fill color even when fill is disabled in the view's [[ViewFlags]]. */\r\n Always = 1 << 1,\r\n /** Render the fill behind other geometry belonging to the same element.\r\n * For example if an element's geometry contains text with background fill, the text always renders in front of the fill.\r\n * @note [GraphicBuilder]($frontend) will not produce edge geometry for shapes with this fill flag. If you want an outline, add it separately.\r\n */\r\n Behind = 1 << 2,\r\n /** Combines Behind and Always flags. */\r\n Blanking = Behind | Always,\r\n /** Use the view's background color instead of the element's fill color. */\r\n Background = 1 << 3,\r\n}\r\n\r\n/** The \"cooked\" material and symbology for a [[RenderGraphic]]. This determines the appearance\r\n * (e.g. texture, color, width, linestyle, etc.) used to draw Geometry.\r\n * @public\r\n */\r\nexport class GraphicParams {\r\n /** Describes how fill is applied to planar regions in wireframe mode. */\r\n public fillFlags = FillFlags.None;\r\n /** The line pattern applied to curves and edges. */\r\n public linePixels = LinePixels.Solid;\r\n /** The width, in pixels, of curves and edges. Values are clamped to [1..31] at display time. */\r\n public rasterWidth = 1;\r\n /** The color of curves and edges. */\r\n public lineColor = ColorDef.black;\r\n /** The color of surfaces. */\r\n public fillColor = ColorDef.black;\r\n /** Material applied to surfaces. */\r\n public material?: RenderMaterial;\r\n /** Gradient fill applied to surfaces. */\r\n public gradient?: Gradient.Symb;\r\n\r\n /** Set the transparency of the line color, where 0=fully opaque and 255=full transparent. */\r\n public setLineTransparency(transparency: number) { this.lineColor = this.lineColor.withTransparency(transparency); }\r\n\r\n /** Set the transparency of the fill color, where 0=fully opaque and 255=full transparent. */\r\n public setFillTransparency(transparency: number) { this.fillColor = this.fillColor.withTransparency(transparency); }\r\n\r\n public clone(out?: GraphicParams): GraphicParams {\r\n out = out ?? new GraphicParams();\r\n\r\n out.fillFlags = this.fillFlags;\r\n out.linePixels = this.linePixels;\r\n out.rasterWidth = this.rasterWidth;\r\n out.lineColor = this.lineColor;\r\n out.fillColor = this.fillColor;\r\n out.material = this.material;\r\n out.gradient = this.gradient;\r\n\r\n return out;\r\n }\r\n\r\n /** Conveniently create a GraphicParams the most commonly-used properties. */\r\n public static fromSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels = LinePixels.Solid): GraphicParams {\r\n const graphicParams = new GraphicParams();\r\n graphicParams.lineColor = lineColor;\r\n graphicParams.fillColor = fillColor;\r\n graphicParams.rasterWidth = lineWidth;\r\n graphicParams.linePixels = linePixels;\r\n return graphicParams;\r\n }\r\n\r\n /** Create a GraphicParams with blanking fill of the specified color.\r\n * @see [[FillFlags.Blanking]].\r\n */\r\n public static fromBlankingFill(fillColor: ColorDef): GraphicParams {\r\n const graphicParams = new GraphicParams();\r\n graphicParams.fillColor = fillColor;\r\n graphicParams.fillFlags = FillFlags.Blanking;\r\n return graphicParams;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GroundPlane.js","sourceRoot":"","sources":["../../src/GroundPlane.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAwBrD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACnE,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,OAAO,WAAW;IACtB,yDAAyD;IACzC,SAAS,CAAS;IAClC,0EAA0E;IAC1D,UAAU,CAAW;IACrC,0EAA0E;IAC1D,UAAU,CAAW;IAErC,YAAsB,KAAqC;QACzD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,iBAAiB,CAAC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C,CAAC;QAEF,IAAI,SAAS,KAAK,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAE1B,OAAO,KAAK,CAAC;IACf,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"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAwBrD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACnE,MAAM,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS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Q,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","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 { ColorByName } from \"./ColorByName\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\n\r\n/** JSON representation of a [[GroundPlane]].\r\n * @see [[EnvironmentProps.ground]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GroundPlaneProps {\r\n /** Whether the ground plane should be displayed. Defaults to false. */\r\n display?: boolean;\r\n /** The Z height at which to draw the ground plane. */\r\n elevation?: number;\r\n /** The color in which to draw the ground plane when viewed from above. */\r\n aboveColor?: ColorDefProps;\r\n /** The color in which to draw the ground plane when viewed from below. */\r\n belowColor?: ColorDefProps;\r\n}\r\n\r\n/** A type containing all of the properties and none of the methods of [[GroundPlane]], with `readonly` modifiers removed.\r\n * @see [[GroundPlane.create]] and [[GroundPlane.clone]].\r\n * @public\r\n */\r\nexport type GroundPlaneProperties = NonFunctionPropertiesOf<GroundPlane>;\r\n\r\nconst defaultAboveColor = ColorDef.fromTbgr(ColorByName.darkGreen);\r\nconst defaultBelowColor = ColorDef.fromTbgr(ColorByName.darkBrown);\r\n\r\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.\r\n * @see [[Environment.ground]].\r\n * @public\r\n */\r\nexport class GroundPlane {\r\n /** The Z height in meters at which to draw the plane. */\r\n public readonly elevation: number;\r\n /** The color in which to draw the ground plane when viewed from above. */\r\n public readonly aboveColor: ColorDef;\r\n /** The color in which to draw the ground plane when viewed from below. */\r\n public readonly belowColor: ColorDef;\r\n\r\n protected constructor(props: Partial<GroundPlaneProperties>) {\r\n this.elevation = props.elevation ?? -0.01;\r\n this.aboveColor = props.aboveColor ?? defaultAboveColor;\r\n this.belowColor = props.belowColor ?? defaultBelowColor;\r\n }\r\n\r\n /** Default settings with a dark green \"above\" color, dark brown \"below\" color, and elevation of -0.01 meters. */\r\n public static readonly defaults = new GroundPlane({});\r\n\r\n /** Create a new GroundPlane. Any properties not specified by `props` will be initialized to their default values. */\r\n public static create(props?: Partial<GroundPlaneProperties>) {\r\n return props ? new this(props) : this.defaults;\r\n }\r\n\r\n /** Create a copy of this ground plane, identical except for any properties explicitly specified by `changedProps`.\r\n * Any properties of `changedProps` explicitly set to `undefined` will be initialized to their default values.\r\n */\r\n public clone(changedProps?: Partial<GroundPlaneProperties>): GroundPlane {\r\n if (!changedProps)\r\n return this;\r\n\r\n return GroundPlane.create({ ...this, ...changedProps });\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props?: GroundPlaneProps): GroundPlane {\r\n if (!props)\r\n return this.defaults;\r\n\r\n return new this({\r\n elevation: props.elevation,\r\n aboveColor: undefined !== props.aboveColor ? ColorDef.fromJSON(props.aboveColor) : undefined,\r\n belowColor: undefined !== props.belowColor ? ColorDef.fromJSON(props.belowColor) : undefined,\r\n });\r\n }\r\n\r\n /** Convert to JSON representation.\r\n * @param display If defined, the value to use for [[GroundPlaneProps.display]]; otherwise, that property will be left undefined.\r\n */\r\n public toJSON(display?: boolean): GroundPlaneProps {\r\n const props: GroundPlaneProps = {\r\n elevation: this.elevation,\r\n aboveColor: this.aboveColor.toJSON(),\r\n belowColor: this.belowColor.toJSON(),\r\n };\r\n\r\n if (undefined !== display)\r\n props.display = display;\r\n\r\n return props;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HSLColor.js","sourceRoot":"","sources":["../../src/HSLColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACnB,UAAU;IACM,CAAC,CAAS;IAC1B,iBAAiB;IACD,CAAC,CAAS;IAC1B,gBAAgB;IACA,CAAC,CAAS;IAE1B,YAAmB,GAAG,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC;QACvD,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;QACb,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC;QACpB,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,GAAY,EAAE,UAAmB,EAAE,SAAkB;QAChE,OAAO,IAAI,QAAQ,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,UAAU,CAAC,YAAY,GAAG,CAAC;QAChC,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAChE,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,GAAa;QACtC,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/** An immutable color defined by Hue, Saturation, and Lightness.\n * @see [here](https://en.wikipedia.org/wiki/HSL_and_HSV) for difference between HSL and HSV\n * @public\n */\nexport class HSLColor {\n /** Hue */\n public readonly h: number;\n /** Saturation */\n public readonly s: number;\n /** Lightness */\n public readonly l: number;\n\n public constructor(hue = 0, saturation = 0, lightness = 0) {\n this.h = hue;\n this.s = saturation;\n this.l = lightness;\n }\n\n public clone(hue?: number, saturation?: number, lightness?: number): HSLColor {\n return new HSLColor(hue ?? this.h, saturation ?? this.s, lightness ?? this.l);\n }\n\n public toColorDef(transparency = 0): ColorDef {\n return ColorDef.fromHSL(this.h, this.s, this.l, transparency);\n }\n\n public static fromColorDef(val: ColorDef) {\n return val.toHSL();\n }\n}\n"]}
1
+ {"version":3,"file":"HSLColor.js","sourceRoot":"","sources":["../../src/HSLColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACnB,UAAU;IACM,CAAC,CAAS;IAC1B,iBAAiB;IACD,CAAC,CAAS;IAC1B,gBAAgB;IACA,CAAC,CAAS;IAE1B,YAAmB,GAAG,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC;QACvD,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;QACb,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC;QACpB,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,GAAY,EAAE,UAAmB,EAAE,SAAkB;QAChE,OAAO,IAAI,QAAQ,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,UAAU,CAAC,YAAY,GAAG,CAAC;QAChC,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAChE,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,GAAa;QACtC,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** An immutable color defined by Hue, Saturation, and Lightness.\r\n * @see [here](https://en.wikipedia.org/wiki/HSL_and_HSV) for difference between HSL and HSV\r\n * @public\r\n */\r\nexport class HSLColor {\r\n /** Hue */\r\n public readonly h: number;\r\n /** Saturation */\r\n public readonly s: number;\r\n /** Lightness */\r\n public readonly l: number;\r\n\r\n public constructor(hue = 0, saturation = 0, lightness = 0) {\r\n this.h = hue;\r\n this.s = saturation;\r\n this.l = lightness;\r\n }\r\n\r\n public clone(hue?: number, saturation?: number, lightness?: number): HSLColor {\r\n return new HSLColor(hue ?? this.h, saturation ?? this.s, lightness ?? this.l);\r\n }\r\n\r\n public toColorDef(transparency = 0): ColorDef {\r\n return ColorDef.fromHSL(this.h, this.s, this.l, transparency);\r\n }\r\n\r\n public static fromColorDef(val: ColorDef) {\r\n return val.toHSL();\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HSVColor.js","sourceRoot":"","sources":["../../src/HSVColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH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AC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;YAE9D,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,CAAC;YAChD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,CAAC;QAED,aAAa,GAAG,KAAK,GAAG,YAAY,CAAC,qBAAqB,CAAC;QAC3D,IAAI,IAAI,CAAC,CAAC,IAAI,aAAa;YACzB,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAE9D,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,CAAC;QAChD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/**\n * @public\n * @extensions\n */\nexport enum HSVConstants {\n VISIBILITY_GOAL = 40,\n HSV_SATURATION_WEIGHT = 4,\n HSV_VALUE_WEIGHT = 2,\n}\n\n/** An immutable color defined by Hue, Saturation, and Value\n * @see [here](https://en.wikipedia.org/wiki/HSL_and_HSV) for difference between HSL and HSV\n * @public\n */\nexport class HSVColor {\n /** Hue */\n public readonly h: number;\n /** Saturation */\n public readonly s: number;\n /** Value */\n public readonly v: number;\n\n public constructor(hue = 0, saturation = 0, value = 0) {\n this.h = hue;\n this.s = saturation;\n this.v = value;\n }\n\n public clone(hue?: number, saturation?: number, value?: number): HSVColor {\n return new HSVColor(hue ?? this.h, saturation ?? this.s, value ?? this.v);\n }\n\n public toColorDef(transparency = 0): ColorDef {\n return ColorDef.fromHSV(this, transparency);\n }\n\n public static fromColorDef(val: ColorDef): HSVColor {\n return val.toHSV();\n }\n\n public adjusted(darkenColor: boolean, delta: number): HSVColor {\n let weightedDelta;\n if (darkenColor) {\n weightedDelta = delta * HSVConstants.HSV_VALUE_WEIGHT;\n if (this.v >= weightedDelta)\n return new HSVColor(this.h, this.s, this.v - weightedDelta);\n\n weightedDelta -= this.v;\n const s = Math.min(this.s + weightedDelta, 100);\n return new HSVColor(this.h, s, 0);\n }\n\n weightedDelta = delta * HSVConstants.HSV_SATURATION_WEIGHT;\n if (this.s >= weightedDelta)\n return new HSVColor(this.h, this.s - weightedDelta, this.v);\n\n weightedDelta -= this.s;\n const v = Math.min(this.v + weightedDelta, 100);\n return new HSVColor(this.h, 0, v);\n }\n}\n"]}
1
+ {"version":3,"file":"HSVColor.js","sourceRoot":"","sources":["../../src/HSVColor.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,sEAAoB,CAAA;IACpB,iFAAyB,CAAA;IACzB,uEAAoB,CAAA;AACtB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACnB,UAAU;IACM,CAAC,CAAS;IAC1B,iBAAiB;IACD,CAAC,CAAS;IAC1B,YAAY;IACI,CAAC,CAAS;IAE1B,YAAmB,GAAG,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC;QACnD,IA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IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAE9D,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,CAAC;QAChD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport enum HSVConstants {\r\n VISIBILITY_GOAL = 40,\r\n HSV_SATURATION_WEIGHT = 4,\r\n HSV_VALUE_WEIGHT = 2,\r\n}\r\n\r\n/** An immutable color defined by Hue, Saturation, and Value\r\n * @see [here](https://en.wikipedia.org/wiki/HSL_and_HSV) for difference between HSL and HSV\r\n * @public\r\n */\r\nexport class HSVColor {\r\n /** Hue */\r\n public readonly h: number;\r\n /** Saturation */\r\n public readonly s: number;\r\n /** Value */\r\n public readonly v: number;\r\n\r\n public constructor(hue = 0, saturation = 0, value = 0) {\r\n this.h = hue;\r\n this.s = saturation;\r\n this.v = value;\r\n }\r\n\r\n public clone(hue?: number, saturation?: number, value?: number): HSVColor {\r\n return new HSVColor(hue ?? this.h, saturation ?? this.s, value ?? this.v);\r\n }\r\n\r\n public toColorDef(transparency = 0): ColorDef {\r\n return ColorDef.fromHSV(this, transparency);\r\n }\r\n\r\n public static fromColorDef(val: ColorDef): HSVColor {\r\n return val.toHSV();\r\n }\r\n\r\n public adjusted(darkenColor: boolean, delta: number): HSVColor {\r\n let weightedDelta;\r\n if (darkenColor) {\r\n weightedDelta = delta * HSVConstants.HSV_VALUE_WEIGHT;\r\n if (this.v >= weightedDelta)\r\n return new HSVColor(this.h, this.s, this.v - weightedDelta);\r\n\r\n weightedDelta -= this.v;\r\n const s = Math.min(this.s + weightedDelta, 100);\r\n return new HSVColor(this.h, s, 0);\r\n }\r\n\r\n weightedDelta = delta * HSVConstants.HSV_SATURATION_WEIGHT;\r\n if (this.s >= weightedDelta)\r\n return new HSVColor(this.h, this.s - weightedDelta, this.v);\r\n\r\n weightedDelta -= this.s;\r\n const v = Math.min(this.v + weightedDelta, 100);\r\n return new HSVColor(this.h, 0, v);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HiddenLine.js","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,KAAW,UAAU,CAiO1B;AAjOD,WAAiB,UAAU;IA2BzB,gEAAgE;IAChE,MAAa,KAAK;QAChB,IAAW,QAAQ,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,kHAAkH;QAClG,KAAK,CAAY;QACjC,4HAA4H;QAC5G,OAAO,CAAc;QACrC;;WAEG;QACa,KAAK,CAAU;QAE/B,YAAoB,IAAiB,EAAE,MAAa;YAClD,IAAI,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7C,IAAI,MAAM;oBACR,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC;gBAEvC,OAAO;YACT,CAAC;YAED,IAAI,GAAG,IAAkB,CAAC,CAAC,2CAA2C;YACtE,IAAI,S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zG,CAAC,CAAC;QACL,CAAC;QAEM,MAAM,CAAC,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,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;;IArEU,mBAAQ,WAsEpB,CAAA;AACH,CAAC,EAjOgB,UAAU,KAAV,UAAU,QAiO1B","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 * 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 export interface StyleProps {\n /** If true, and [[color]] is defined, then the edge color is overridden. */\n ovrColor?: boolean;\n /** If defined, and [[ovrColor]] is not `false`, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n color?: ColorDefProps;\n /** If defined and not equal to [[LinePixels.Invalid]], 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 and non-zero, 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 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 if ((undefined === this.color) !== (undefined === other.color))\n return false;\n else\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\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.isNonEmptyObject(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,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,KAAW,UAAU,CAiO1B;AAjOD,WAAiB,UAAU;IA2BzB,gEAAgE;IAChE,MAAa,KAAK;QAChB,IAAW,QAAQ,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,kHAAkH;QAClG,KAAK,CAAY;QACjC,4HAA4H;QAC5G,OAAO,CAAc;QACrC;;WAEG;QACa,KAAK,CAAU;QAE/B,YAAoB,IAAiB,EAAE,MAAa;YAClD,IAAI,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7C,IAAI,MAAM;oBACR,IAAI,CAAC,OAAO,GAAG,UAAU,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,QAAQ,CAAC,QAAQ,CAAC,IAAI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C,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,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;;IArEU,mBAAQ,WAsEpB,CAAA;AACH,CAAC,EAjOgB,UAAU,KAAV,UAAU,QAiO1B","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 { JsonUtils } from \"@itwin/core-bentley\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { LinePixels } from \"./LinePixels\";\r\n\r\n/** Namespace containing types controlling how edges and surfaces should be drawn in \"hidden line\" and \"solid fill\" [[RenderMode]]s.\r\n * @public\r\n */\r\nexport namespace HiddenLine {\r\n /** Describes the symbology with which edges should be drawn.\r\n * This JSON representation is awkward, but it must match that used in the db.\r\n * If the JSON came from the db then all members are present and:\r\n * - color is overridden only if ovrColor = true.\r\n * - width is overridden only if width != 0\r\n * - pattern is overridden only if pattern != LinePixels.Invalid\r\n * The 'public' JSON representation is more sensible:\r\n * - Color, width, and pattern are each overridden iff they are not undefined.\r\n * To make this work for both scenarios, the rules are:\r\n * - color is overridden if color != undefined and ovrColor != false\r\n * - width is overridden if width != undefined and width != 0\r\n * - pattern is overridden if pattern != undefined and pattern != LinePixels.Invalid\r\n */\r\n export interface StyleProps {\r\n /** If true, and [[color]] is defined, then the edge color is overridden. */\r\n ovrColor?: boolean;\r\n /** If defined, and [[ovrColor]] is not `false`, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\r\n color?: ColorDefProps;\r\n /** If defined and not equal to [[LinePixels.Invalid]], the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\r\n pattern?: LinePixels;\r\n /** If defined and non-zero, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\r\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\r\n */\r\n width?: number;\r\n }\r\n\r\n /** Describes the symbology with which edges should be drawn. */\r\n export class Style {\r\n public get ovrColor(): boolean { return undefined !== this.color; }\r\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\r\n public readonly color?: ColorDef;\r\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\r\n public readonly pattern?: LinePixels;\r\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\r\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\r\n */\r\n public readonly width?: number;\r\n\r\n private constructor(json?: StyleProps, hidden?: true) {\r\n if (JsonUtils.isEmptyObjectOrUndefined(json)) {\r\n if (hidden)\r\n this.pattern = LinePixels.HiddenLine;\r\n\r\n return;\r\n }\r\n\r\n json = json as StyleProps; // per JsonUtils.isEmptyObjectOrUndefined()\r\n if (undefined !== json.color && false !== json.ovrColor)\r\n this.color = ColorDef.fromJSON(json.color);\r\n\r\n if (undefined !== json.pattern) {\r\n const pattern = JsonUtils.asInt(json.pattern, hidden ? LinePixels.HiddenLine : LinePixels.Invalid);\r\n if (LinePixels.Invalid !== pattern)\r\n this.pattern = pattern;\r\n } else if (hidden) {\r\n this.pattern = LinePixels.HiddenLine;\r\n }\r\n\r\n if (undefined !== json.width) {\r\n let width = JsonUtils.asInt(json.width, 0);\r\n if (0 !== width) {\r\n width = Math.max(1, width);\r\n this.width = Math.min(32, width);\r\n }\r\n }\r\n }\r\n\r\n public static readonly defaultVisible = new Style({});\r\n public static readonly defaultHidden = new Style({}, true);\r\n\r\n public static fromJSON(json?: StyleProps, hidden?: true): Style {\r\n if (undefined !== json)\r\n return new Style(json, hidden);\r\n\r\n return hidden ? this.defaultHidden : this.defaultVisible;\r\n }\r\n\r\n /** Create a Style equivalent to this one but with the specified color override. */\r\n public overrideColor(color: ColorDef | undefined): Style {\r\n if (undefined === this.color && undefined === color)\r\n return this;\r\n\r\n if (undefined !== this.color && undefined !== color && this.color.equals(color))\r\n return this;\r\n\r\n return Style.fromJSON({\r\n color: color?.toJSON(),\r\n ovrColor: undefined !== color,\r\n pattern: this.pattern,\r\n width: this.width,\r\n });\r\n }\r\n\r\n /** Create a Style equivalent to this one but with the specified pattern override. */\r\n public overridePattern(pattern: LinePixels | undefined): Style {\r\n if (pattern === this.pattern)\r\n return this;\r\n\r\n return Style.fromJSON({\r\n color: this.color?.toJSON(),\r\n ovrColor: this.ovrColor,\r\n pattern,\r\n width: this.width,\r\n });\r\n }\r\n\r\n /** Create a Style equivalent to this one but with the specified width override. */\r\n public overrideWidth(width: number | undefined): Style {\r\n if (width === this.width)\r\n return this;\r\n\r\n return Style.fromJSON({\r\n color: this.color?.toJSON(),\r\n ovrColor: this.ovrColor,\r\n pattern: this.pattern,\r\n width,\r\n });\r\n }\r\n\r\n /** Returns true if this Style is equivalent to the supplied Style. */\r\n public equals(other: Style): boolean {\r\n if (this === other)\r\n return true;\r\n else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)\r\n return false;\r\n else if ((undefined === this.color) !== (undefined === other.color))\r\n return false;\r\n else\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n return undefined === this.color || this.color.equals(other.color!);\r\n }\r\n\r\n public toJSON(): StyleProps {\r\n return {\r\n ovrColor: this.ovrColor,\r\n color: this.color ? this.color.toJSON() : ColorDef.white.toJSON(),\r\n pattern: undefined !== this.pattern ? this.pattern : LinePixels.Invalid,\r\n width: undefined !== this.width ? this.width : 0,\r\n };\r\n }\r\n }\r\n\r\n /** The JSON representation of a [[HiddenLine.Settings]]. */\r\n export interface SettingsProps {\r\n /** See [[HiddenLine.Settings.visible]]. */\r\n visible?: StyleProps;\r\n /** See [[HiddenLine.Settings.hidden]]. */\r\n hidden?: StyleProps;\r\n /** See [[HiddenLine.Settings.transparencyThreshold. */\r\n transThreshold?: number;\r\n }\r\n\r\n /** Describes how visible and hidden edges and transparent surfaces should be rendered in \"hidden line\" and \"solid fill\" [[RenderMode]]s. */\r\n export class Settings {\r\n /** Describes how visible edges (those unobscured by other geometry) should be displayed. */\r\n public readonly visible: Style;\r\n /** Describes how hidden edges (those obscured by other geometry) should be displayed. */\r\n public readonly hidden: Style;\r\n /** A value in the range [0.0, 1.0] specifying a threshold below which transparent surfaces should not be drawn.\r\n * A value of 0.0 indicates any surface that is not 100% opaque should not be drawn.\r\n * A value of 0.25 indicates any surface that is less than 25% opaque should not be drawn.\r\n * A value of 1.0 indicates that all surfaces should be drawn regardless of transparency.\r\n * @note values will be clamped to the range [0.0, 1.0].\r\n * @note Defaults to 1.0.\r\n */\r\n public readonly transparencyThreshold: number;\r\n\r\n /** An alias for [[transparencyThreshold]]. */\r\n public get transThreshold(): number { return this.transparencyThreshold; }\r\n\r\n /** The default display settings. */\r\n public static defaults = new Settings({});\r\n\r\n /** Create a DisplaySettings from its JSON representation. */\r\n public static fromJSON(json?: SettingsProps): Settings {\r\n if (!JsonUtils.isNonEmptyObject(json))\r\n return this.defaults;\r\n else if (json instanceof Settings)\r\n return json;\r\n else\r\n return new Settings(json);\r\n }\r\n\r\n public toJSON(): SettingsProps {\r\n const props: SettingsProps = {\r\n visible: this.visible.toJSON(),\r\n hidden: this.hidden.toJSON(),\r\n transThreshold: this.transThreshold,\r\n };\r\n\r\n return props;\r\n }\r\n\r\n /** Create a Settings equivalent to this one with the exception of those properties defined in the supplied JSON. */\r\n public override(props: SettingsProps): Settings {\r\n const visible = props.visible;\r\n const hidden = props.hidden;\r\n const transparencyThreshold = props.transThreshold;\r\n return Settings.fromJSON({\r\n visible: undefined !== visible ? visible : this.visible.toJSON(),\r\n hidden: undefined !== hidden ? hidden : this.hidden.toJSON(),\r\n transThreshold: undefined !== transparencyThreshold ? transparencyThreshold : this.transparencyThreshold,\r\n });\r\n }\r\n\r\n public equals(other: Settings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.visible.equals(other.visible)\r\n && this.hidden.equals(other.hidden)\r\n && this.transparencyThreshold === other.transparencyThreshold;\r\n }\r\n\r\n public get matchesDefaults(): boolean {\r\n return this.equals(Settings.defaults);\r\n }\r\n\r\n private constructor(json: SettingsProps) {\r\n this.visible = Style.fromJSON(json.visible);\r\n this.hidden = Style.fromJSON(json.hidden, true);\r\n this.transparencyThreshold = JsonUtils.asDouble(json.transThreshold, 1.0);\r\n }\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Hilite.js","sourceRoot":"","sources":["../../src/Hilite.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,MAAM,KAAW,MAAM,CA2DtB;AA3DD,WAAiB,MAAM;IACrB;;OAEG;IACH,IAAY,UAOX;IAPD,WAAY,UAAU;QACpB,kBAAkB;QAClB,2CAAI,CAAA;QACJ,4BAA4B;QAC5B,2CAAI,CAAA;QACJ,4BAA4B;QAC5B,6CAAK,CAAA;IACP,CAAC,EAPW,UAAU,GAAV,iBAAU,KAAV,iBAAU,QAOrB;IAED;;;;;;;;;;;OAWG;IAC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,CAAC,UAAU,CAAC,CAAC;IACxG,CAAC;IAFe,oBAAa,gBAE5B,CAAA;AACH,CAAC,EA3DgB,MAAM,KAAN,MAAM,QA2DtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { ColorDef } from \"./ColorDef\";\n\n/** Contains types related to display of hilited elements within a [[Viewport]].\n * @public\n */\nexport namespace Hilite {\n /** Describes the width of the outline applied to hilited geometry. The outline is drawn around the union of all hilited geometry and is visible behind non-hilited geometry.\n * @see [[Hilite.Settings]]\n */\n export enum Silhouette {\n /** No outline. */\n None,\n /** 1-pixel-wide outline. */\n Thin,\n /** 2-pixel-wide outline. */\n Thick,\n }\n\n /**\n * Describes how the hilite effect is applied to elements within a [[Viewport]].\n * The hilite effect is applied to elements contained in the [[IModelConnection]]'s [[SelectionSet]].\n * It is designed to draw attention to those elements. The effect is produced as follows:\n * 1. All hilited elements are drawn as normal, except that their element color is mixed with the hilite color.\n * 2. The union of the regions of the screen corresponding to hilited elements is computed.\n * 3. A silhouette is drawn using the hilite color around the boundaries of the hilited region. This silhouette is visible behind other geometry.\n * 4. The hilite color is mixed with the color of each pixel within the hilited region. This enables surfaces of hilited geometry to be visible behind other geometry.\n *\n * The Settings allow an application to customize how this effect is applied.\n * @see [[Viewport.hilite]]\n */\n export class Settings {\n /** The color that is used to draw the outline and which is mixed with element color. */\n public readonly color: ColorDef;\n /** The ratio of hilite color to element color used when drawing unobscured portions of hilited geometry, in the range [0, 1].\n * A ratio of 0.0 uses only the element color. A ratio of 1.0 uses only the hilite color. A ratio of 0.5 mixes the hilite color and element color evenly.\n */\n public readonly visibleRatio: number;\n /** The ratio of hilite color to screen color used when drawing the hilited region overtop of the screen contents, in the range [0, 1]. */\n public readonly hiddenRatio: number;\n /** The type of outline to be drawn around the boundaries of the hilited region. */\n public silhouette: Silhouette;\n\n private static clamp(value: number) { return Math.min(1.0, Math.max(0.0, value)); }\n\n public constructor(color = ColorDef.from(0x23, 0xbb, 0xfc), visibleRatio = 0.25, hiddenRatio = 0.0, silhouette = Silhouette.Thin) {\n this.color = color;\n this.silhouette = silhouette;\n this.visibleRatio = Settings.clamp(visibleRatio);\n this.hiddenRatio = Settings.clamp(hiddenRatio);\n }\n }\n\n /** Compare two Settings objects for equivalence. */\n export function equalSettings(lhs: Settings, rhs: Settings): boolean {\n return lhs.color.equals(rhs.color)\n && lhs.visibleRatio === rhs.visibleRatio\n && lhs.hiddenRatio === rhs.hiddenRatio\n && lhs.silhouette === rhs.silhouette;\n }\n\n /** Create a copy of a Settings object. */\n export function cloneSettings(settings: Settings): Settings {\n return new Settings(settings.color, settings.visibleRatio, settings.hiddenRatio, settings.silhouette);\n }\n}\n"]}
1
+ {"version":3,"file":"Hilite.js","sourceRoot":"","sources":["../../src/Hilite.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,MAAM,KAAW,MAAM,CA2DtB;AA3DD,WAAiB,MAAM;IACrB;;OAEG;IACH,IAAY,UAOX;IAPD,WAAY,UAAU;QACpB,kBAAkB;QAClB,2CAAI,CAAA;QACJ,4BAA4B;QAC5B,2CAAI,CAAA;QACJ,4BAA4B;QAC5B,6CAAK,CAAA;IACP,CAAC,EAPW,UAAU,GAAV,iBAAU,KAAV,iBAAU,QAOrB;IAED;;;;;;;;;;;OAWG;IACH,MAAa,QAAQ;QACnB,wFAAwF;QACxE,KAAK,CAAW;QAChC;;WAEG;QACa,YAAY,CAAS;QACrC,0IAA0I;QAC1H,WAAW,CAAS;QACpC,mFAAmF;QAC5E,UAAU,CAAa;QAEtB,MAAM,CAAC,KAAK,CAAC,KAAa,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEnF,YAAmB,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,WAAW,GAAG,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC,IAAI;YAC9H,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;YAC7B,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YACjD,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjD,CAAC;KACF;IApBY,eAAQ,WAoBpB,CAAA;IAED,oDAAoD;IACpD,SAAgB,aAAa,CAAC,GAAa,EAAE,GAAa;QACxD,OAAO,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;eAC7B,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY;eACrC,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC,WAAW;eACnC,GAAG,CAAC,UAAU,KAAK,GAAG,CAAC,UAAU,CAAC;IACzC,CAAC;IALe,oBAAa,gBAK5B,CAAA;IAED,0CAA0C;IAC1C,SAAgB,aAAa,CAAC,QAAkB;QAC9C,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IACxG,CAAC;IAFe,oBAAa,gBAE5B,CAAA;AACH,CAAC,EA3DgB,MAAM,KAAN,MAAM,QA2DtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** Contains types related to display of hilited elements within a [[Viewport]].\r\n * @public\r\n */\r\nexport namespace Hilite {\r\n /** Describes the width of the outline applied to hilited geometry. The outline is drawn around the union of all hilited geometry and is visible behind non-hilited geometry.\r\n * @see [[Hilite.Settings]]\r\n */\r\n export enum Silhouette {\r\n /** No outline. */\r\n None,\r\n /** 1-pixel-wide outline. */\r\n Thin,\r\n /** 2-pixel-wide outline. */\r\n Thick,\r\n }\r\n\r\n /**\r\n * Describes how the hilite effect is applied to elements within a [[Viewport]].\r\n * The hilite effect is applied to elements contained in the [[IModelConnection]]'s [[SelectionSet]].\r\n * It is designed to draw attention to those elements. The effect is produced as follows:\r\n * 1. All hilited elements are drawn as normal, except that their element color is mixed with the hilite color.\r\n * 2. The union of the regions of the screen corresponding to hilited elements is computed.\r\n * 3. A silhouette is drawn using the hilite color around the boundaries of the hilited region. This silhouette is visible behind other geometry.\r\n * 4. The hilite color is mixed with the color of each pixel within the hilited region. This enables surfaces of hilited geometry to be visible behind other geometry.\r\n *\r\n * The Settings allow an application to customize how this effect is applied.\r\n * @see [[Viewport.hilite]]\r\n */\r\n export class Settings {\r\n /** The color that is used to draw the outline and which is mixed with element color. */\r\n public readonly color: ColorDef;\r\n /** The ratio of hilite color to element color used when drawing unobscured portions of hilited geometry, in the range [0, 1].\r\n * A ratio of 0.0 uses only the element color. A ratio of 1.0 uses only the hilite color. A ratio of 0.5 mixes the hilite color and element color evenly.\r\n */\r\n public readonly visibleRatio: number;\r\n /** The ratio of hilite color to screen color used when drawing the hilited region overtop of the screen contents, in the range [0, 1]. */\r\n public readonly hiddenRatio: number;\r\n /** The type of outline to be drawn around the boundaries of the hilited region. */\r\n public silhouette: Silhouette;\r\n\r\n private static clamp(value: number) { return Math.min(1.0, Math.max(0.0, value)); }\r\n\r\n public constructor(color = ColorDef.from(0x23, 0xbb, 0xfc), visibleRatio = 0.25, hiddenRatio = 0.0, silhouette = Silhouette.Thin) {\r\n this.color = color;\r\n this.silhouette = silhouette;\r\n this.visibleRatio = Settings.clamp(visibleRatio);\r\n this.hiddenRatio = Settings.clamp(hiddenRatio);\r\n }\r\n }\r\n\r\n /** Compare two Settings objects for equivalence. */\r\n export function equalSettings(lhs: Settings, rhs: Settings): boolean {\r\n return lhs.color.equals(rhs.color)\r\n && lhs.visibleRatio === rhs.visibleRatio\r\n && lhs.hiddenRatio === rhs.hiddenRatio\r\n && lhs.silhouette === rhs.silhouette;\r\n }\r\n\r\n /** Create a copy of a Settings object. */\r\n export function cloneSettings(settings: Settings): Settings {\r\n return new Settings(settings.color, settings.visibleRatio, settings.hiddenRatio, settings.silhouette);\r\n }\r\n}\r\n"]}