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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/lib/cjs/AmbientOcclusion.js +9 -9
  3. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  4. package/lib/cjs/AnalysisStyle.js +1 -1
  5. package/lib/cjs/AnalysisStyle.js.map +1 -1
  6. package/lib/cjs/Atmosphere.js +19 -21
  7. package/lib/cjs/Atmosphere.js.map +1 -1
  8. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  9. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  11. package/lib/cjs/ClipStyle.js +5 -5
  12. package/lib/cjs/ClipStyle.js.map +1 -1
  13. package/lib/cjs/ColorDef.js +10 -10
  14. package/lib/cjs/ColorDef.js.map +1 -1
  15. package/lib/cjs/ConcurrentQuery.d.ts +5 -1
  16. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  17. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  18. package/lib/cjs/ContourDisplay.js +5 -5
  19. package/lib/cjs/ContourDisplay.js.map +1 -1
  20. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  21. package/lib/cjs/ECSqlReader.js +3 -1
  22. package/lib/cjs/ECSqlReader.js.map +1 -1
  23. package/lib/cjs/ElementProps.d.ts.map +1 -1
  24. package/lib/cjs/ElementProps.js +3 -3
  25. package/lib/cjs/ElementProps.js.map +1 -1
  26. package/lib/cjs/Environment.js +2 -2
  27. package/lib/cjs/Environment.js.map +1 -1
  28. package/lib/cjs/FeatureSymbology.js +3 -3
  29. package/lib/cjs/FeatureSymbology.js.map +1 -1
  30. package/lib/cjs/Fonts.d.ts +69 -11
  31. package/lib/cjs/Fonts.d.ts.map +1 -1
  32. package/lib/cjs/Fonts.js +20 -5
  33. package/lib/cjs/Fonts.js.map +1 -1
  34. package/lib/cjs/Gradient.js +9 -9
  35. package/lib/cjs/Gradient.js.map +1 -1
  36. package/lib/cjs/GroundPlane.js +2 -2
  37. package/lib/cjs/GroundPlane.js.map +1 -1
  38. package/lib/cjs/HiddenLine.js +4 -4
  39. package/lib/cjs/HiddenLine.js.map +1 -1
  40. package/lib/cjs/IModel.d.ts +3 -12
  41. package/lib/cjs/IModel.d.ts.map +1 -1
  42. package/lib/cjs/IModel.js +6 -6
  43. package/lib/cjs/IModel.js.map +1 -1
  44. package/lib/cjs/IModelError.d.ts +0 -2
  45. package/lib/cjs/IModelError.d.ts.map +1 -1
  46. package/lib/cjs/IModelError.js +1 -8
  47. package/lib/cjs/IModelError.js.map +1 -1
  48. package/lib/cjs/ITwinError.d.ts +1 -1
  49. package/lib/cjs/ITwinError.d.ts.map +1 -1
  50. package/lib/cjs/ITwinError.js +1 -1
  51. package/lib/cjs/ITwinError.js.map +1 -1
  52. package/lib/cjs/LightSettings.js +1 -1
  53. package/lib/cjs/LightSettings.js.map +1 -1
  54. package/lib/cjs/PlanarClipMask.js +2 -2
  55. package/lib/cjs/PlanarClipMask.js.map +1 -1
  56. package/lib/cjs/RealityModelDisplaySettings.js +4 -4
  57. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  58. package/lib/cjs/RenderMaterial.js +3 -3
  59. package/lib/cjs/RenderMaterial.js.map +1 -1
  60. package/lib/cjs/RpcInterface.js +1 -1
  61. package/lib/cjs/RpcInterface.js.map +1 -1
  62. package/lib/cjs/SkyBox.js +4 -4
  63. package/lib/cjs/SkyBox.js.map +1 -1
  64. package/lib/cjs/SolarShadows.js +1 -1
  65. package/lib/cjs/SolarShadows.js.map +1 -1
  66. package/lib/cjs/SubCategoryAppearance.js +1 -1
  67. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  68. package/lib/cjs/SubCategoryOverride.js +2 -2
  69. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  70. package/lib/cjs/TextureMapping.js +2 -2
  71. package/lib/cjs/TextureMapping.js.map +1 -1
  72. package/lib/cjs/ThematicDisplay.js +2 -2
  73. package/lib/cjs/ThematicDisplay.js.map +1 -1
  74. package/lib/cjs/ViewDetails.js +2 -2
  75. package/lib/cjs/ViewDetails.js.map +1 -1
  76. package/lib/cjs/ViewFlags.js +2 -2
  77. package/lib/cjs/ViewFlags.js.map +1 -1
  78. package/lib/cjs/WhiteOnWhiteReversalSettings.js +2 -2
  79. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  80. package/lib/cjs/annotation/TextStyle.js +19 -19
  81. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  82. package/lib/cjs/core-common.d.ts +0 -1
  83. package/lib/cjs/core-common.d.ts.map +1 -1
  84. package/lib/cjs/core-common.js +0 -1
  85. package/lib/cjs/core-common.js.map +1 -1
  86. package/lib/cjs/geometry/Cartographic.js +13 -13
  87. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  88. package/lib/cjs/ipc/IpcWebSocket.js +1 -1
  89. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  90. package/lib/cjs/ipc/IpcWebSocketTransport.js +1 -1
  91. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  92. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  93. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  94. package/lib/cjs/rpc/IModelReadRpcInterface.js +5 -5
  95. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  96. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  97. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  98. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  99. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  100. package/lib/cjs/rpc/core/RpcConfiguration.js +32 -34
  101. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  102. package/lib/cjs/rpc/core/RpcControl.js +8 -15
  103. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  104. package/lib/cjs/rpc/core/RpcInvocation.js +3 -5
  105. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  106. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +0 -3
  107. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  108. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  109. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  110. package/lib/cjs/rpc/core/RpcOperation.js +2 -2
  111. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  112. package/lib/cjs/rpc/core/RpcProtocol.js +4 -4
  113. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  114. package/lib/cjs/rpc/core/RpcPush.js +5 -5
  115. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  116. package/lib/cjs/rpc/core/RpcRequest.js +5 -5
  117. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  118. package/lib/cjs/rpc/core/RpcRoutingToken.js +2 -2
  119. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  120. package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -1
  121. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  122. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +6 -6
  123. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  124. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  125. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  126. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  127. package/lib/cjs/rpc/web/WebAppRpcRequest.js +17 -19
  128. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  129. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  130. package/lib/cjs/tile/IModelTileIO.js +3 -3
  131. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  132. package/lib/esm/AmbientOcclusion.js +9 -9
  133. package/lib/esm/AmbientOcclusion.js.map +1 -1
  134. package/lib/esm/AnalysisStyle.js +1 -1
  135. package/lib/esm/AnalysisStyle.js.map +1 -1
  136. package/lib/esm/Atmosphere.js +19 -21
  137. package/lib/esm/Atmosphere.js.map +1 -1
  138. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  139. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  140. package/lib/esm/BriefcaseTypes.js.map +1 -1
  141. package/lib/esm/ClipStyle.js +5 -5
  142. package/lib/esm/ClipStyle.js.map +1 -1
  143. package/lib/esm/ColorDef.js +10 -10
  144. package/lib/esm/ColorDef.js.map +1 -1
  145. package/lib/esm/ConcurrentQuery.d.ts +5 -1
  146. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  147. package/lib/esm/ConcurrentQuery.js.map +1 -1
  148. package/lib/esm/ContourDisplay.js +5 -5
  149. package/lib/esm/ContourDisplay.js.map +1 -1
  150. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  151. package/lib/esm/ECSqlReader.js +3 -1
  152. package/lib/esm/ECSqlReader.js.map +1 -1
  153. package/lib/esm/ElementProps.d.ts.map +1 -1
  154. package/lib/esm/ElementProps.js +4 -4
  155. package/lib/esm/ElementProps.js.map +1 -1
  156. package/lib/esm/Environment.js +2 -2
  157. package/lib/esm/Environment.js.map +1 -1
  158. package/lib/esm/FeatureSymbology.js +3 -3
  159. package/lib/esm/FeatureSymbology.js.map +1 -1
  160. package/lib/esm/Fonts.d.ts +69 -11
  161. package/lib/esm/Fonts.d.ts.map +1 -1
  162. package/lib/esm/Fonts.js +20 -5
  163. package/lib/esm/Fonts.js.map +1 -1
  164. package/lib/esm/Gradient.js +9 -9
  165. package/lib/esm/Gradient.js.map +1 -1
  166. package/lib/esm/GroundPlane.js +2 -2
  167. package/lib/esm/GroundPlane.js.map +1 -1
  168. package/lib/esm/HiddenLine.js +4 -4
  169. package/lib/esm/HiddenLine.js.map +1 -1
  170. package/lib/esm/IModel.d.ts +3 -12
  171. package/lib/esm/IModel.d.ts.map +1 -1
  172. package/lib/esm/IModel.js +6 -6
  173. package/lib/esm/IModel.js.map +1 -1
  174. package/lib/esm/IModelError.d.ts +0 -2
  175. package/lib/esm/IModelError.d.ts.map +1 -1
  176. package/lib/esm/IModelError.js +0 -1
  177. package/lib/esm/IModelError.js.map +1 -1
  178. package/lib/esm/ITwinError.d.ts +1 -1
  179. package/lib/esm/ITwinError.d.ts.map +1 -1
  180. package/lib/esm/ITwinError.js +1 -1
  181. package/lib/esm/ITwinError.js.map +1 -1
  182. package/lib/esm/LightSettings.js +1 -1
  183. package/lib/esm/LightSettings.js.map +1 -1
  184. package/lib/esm/PlanarClipMask.js +2 -2
  185. package/lib/esm/PlanarClipMask.js.map +1 -1
  186. package/lib/esm/RealityModelDisplaySettings.js +4 -4
  187. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  188. package/lib/esm/RenderMaterial.js +3 -3
  189. package/lib/esm/RenderMaterial.js.map +1 -1
  190. package/lib/esm/RpcInterface.js +2 -2
  191. package/lib/esm/RpcInterface.js.map +1 -1
  192. package/lib/esm/SkyBox.js +4 -4
  193. package/lib/esm/SkyBox.js.map +1 -1
  194. package/lib/esm/SolarShadows.js +1 -1
  195. package/lib/esm/SolarShadows.js.map +1 -1
  196. package/lib/esm/SubCategoryAppearance.js +1 -1
  197. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  198. package/lib/esm/SubCategoryOverride.js +2 -2
  199. package/lib/esm/SubCategoryOverride.js.map +1 -1
  200. package/lib/esm/TextureMapping.js +2 -2
  201. package/lib/esm/TextureMapping.js.map +1 -1
  202. package/lib/esm/ThematicDisplay.js +2 -2
  203. package/lib/esm/ThematicDisplay.js.map +1 -1
  204. package/lib/esm/ViewDetails.js +2 -2
  205. package/lib/esm/ViewDetails.js.map +1 -1
  206. package/lib/esm/ViewFlags.js +2 -2
  207. package/lib/esm/ViewFlags.js.map +1 -1
  208. package/lib/esm/WhiteOnWhiteReversalSettings.js +2 -2
  209. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  210. package/lib/esm/annotation/TextStyle.js +19 -19
  211. package/lib/esm/annotation/TextStyle.js.map +1 -1
  212. package/lib/esm/core-common.d.ts +0 -1
  213. package/lib/esm/core-common.d.ts.map +1 -1
  214. package/lib/esm/core-common.js +0 -1
  215. package/lib/esm/core-common.js.map +1 -1
  216. package/lib/esm/geometry/Cartographic.js +13 -13
  217. package/lib/esm/geometry/Cartographic.js.map +1 -1
  218. package/lib/esm/ipc/IpcWebSocket.js +1 -1
  219. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  220. package/lib/esm/ipc/IpcWebSocketTransport.js +1 -1
  221. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  222. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  223. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  224. package/lib/esm/rpc/IModelReadRpcInterface.js +5 -5
  225. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  226. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  227. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  228. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  229. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  230. package/lib/esm/rpc/core/RpcConfiguration.js +32 -34
  231. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  232. package/lib/esm/rpc/core/RpcControl.js +8 -15
  233. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  234. package/lib/esm/rpc/core/RpcInvocation.js +3 -5
  235. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  236. package/lib/esm/rpc/core/RpcMarshaling.d.ts +0 -3
  237. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  238. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  239. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  240. package/lib/esm/rpc/core/RpcOperation.js +2 -2
  241. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  242. package/lib/esm/rpc/core/RpcProtocol.js +4 -4
  243. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  244. package/lib/esm/rpc/core/RpcPush.js +5 -5
  245. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  246. package/lib/esm/rpc/core/RpcRequest.js +5 -5
  247. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  248. package/lib/esm/rpc/core/RpcRoutingToken.js +2 -2
  249. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  250. package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -1
  251. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  252. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +6 -6
  253. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  254. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  255. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  256. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  257. package/lib/esm/rpc/web/WebAppRpcRequest.js +17 -19
  258. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  259. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  260. package/lib/esm/tile/IModelTileIO.js +3 -3
  261. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  262. package/package.json +9 -9
  263. package/lib/cjs/rpc/WipRpcInterface.d.ts +0 -31
  264. package/lib/cjs/rpc/WipRpcInterface.d.ts.map +0 -1
  265. package/lib/cjs/rpc/WipRpcInterface.js +0 -42
  266. package/lib/cjs/rpc/WipRpcInterface.js.map +0 -1
  267. package/lib/esm/rpc/WipRpcInterface.d.ts +0 -31
  268. package/lib/esm/rpc/WipRpcInterface.d.ts.map +0 -1
  269. package/lib/esm/rpc/WipRpcInterface.js +0 -38
  270. package/lib/esm/rpc/WipRpcInterface.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ThematicDisplay.js","sourceRoot":"","sources":["../../src/ThematicDisplay.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAgB,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAN,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,kDAAkD;IAClD,mEAAU,CAAA;IACV,mDAAmD;IACnD,qEAAW,CAAA;IACX,yJAAyJ;IACzJ,+FAAwB,CAAA;IACxB,uIAAuI;IACvI,uEAAY,CAAA;AACd,CAAC,EATW,oBAAoB,KAApB,oBAAoB,QAS/B;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,gCAQX;AARD,WAAY,gCAAgC;IAC1C,wFAAwF;IACxF,qGAAe,CAAA;IACf;;;OAGG;IACH,mIAA8B,CAAA;AAChC,CAAC,EARW,gCAAgC,KAAhC,gCAAgC,QAQ3C;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,2BAeX;AAfD,WAAY,2BAA2B;IACrC,uEAAuE;IACvE,mFAAW,CAAA;IACX,uEAAuE;IACvE,mFAAW,CAAA;IACX,uFAAuF;IACvF,yFAAc,CAAA;IACd,kEAAkE;IAClE,2FAAe,CAAA;IACf,mEAAmE;IACnE,2FAAe,CAAA;IACf;;OAEG;IACH,iFAAU,CAAA;AACZ,CAAC,EAfW,2BAA2B,KAA3B,2BAA2B,QAetC;AAuBD;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAuB5B,MAAM,KAAK,MAAM,KAA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B,GAAG,wBAAwB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;YAClF,CAAC;YACD,IAAI,mBAAmB,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;gBACnD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG;oBACtB,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;gBACvB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI;oBACxB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAA2B;QAChD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAEM,MAAM;QACX,MAAM,IAAI,GAAyB;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE;YAChD,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACxB,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;SAC3B,CAAC;QAEF,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;YACxC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QAErD,OAAO,IAAI,CAAC;IACd,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 { compareNumbers } from \"@itwin/core-bentley\";\nimport { Point3d, Range1d, Range1dProps, Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { Gradient } from \"./Gradient\";\nimport { TextureTransparency } from \"./TextureProps\";\n\n/** A thematic gradient mode used to generate and apply a thematic effect to a scene.\n * @see [[ThematicGradientSettings.mode]]\n * @public\n * @extensions\n */\nexport enum ThematicGradientMode {\n /** Apply a smooth color gradient to the scene. */\n Smooth = 0,\n /** Apply a stepped color gradient to the scene. */\n Stepped = 1,\n /** Apply a stepped color gradient to the scene with delimiters (lines between the color steps). Can only be used with [[ThematicDisplayMode.Height]]. */\n SteppedWithDelimiter = 2,\n /** Apply isolines to the scene to achieve an effect similar to a contour map. Can only be used with [[ThematicDisplayMode.Height]]. */\n IsoLines = 3,\n}\n\n/** Describes how transparency is computed when applying a thematic gradient to a surface.\n * Each [[Gradient.KeyColor]] in [[ThematicGradientSettings.customKeys]] has a transparency value.\n * Each surface to which the gradient is applied has its own transparency.\n * The transparency mode determines how these two values are combined to compute the final transparency.\n * @see [[ThematicGradientSettings.transparencyMode]].\n * @public\n * @extensions\n */\nexport enum ThematicGradientTransparencyMode {\n /** Ignore the gradient's transparency, applying only the surface's own transparency. */\n SurfaceOnly = 0,\n /** The final transparency is computed from the product of the surface and gradient alpha channels.\n * (Alpha is the inverse of transparency, where `alpha = (255 - transparency) / 255`).\n * If the gradient color is opaque, this produces the same result as [[SurfaceOnly]].\n */\n MultiplySurfaceAndGradient = 1,\n}\n\n/** A color scheme used to generate the colors of a thematic gradient within an applied range.\n * @see [[ThematicGradientSettings.colorScheme]]\n * @see [[ThematicDisplay.range]]\n * @public\n * @extensions\n */\nexport enum ThematicGradientColorScheme {\n /** A color gradient scheme that represents a blue-to-red gradation. */\n BlueRed = 0,\n /** A color gradient scheme that represents a red-to-blue gradation. */\n RedBlue = 1,\n /** A color gradient scheme that represents a monochrome (black-to-white) gradation. */\n Monochrome = 2,\n /** A color gradient scheme that suits a topographic gradation. */\n Topographic = 3,\n /** A color gradient scheme that suits a sea-mountain gradation. */\n SeaMountain = 4,\n /** A custom color gradient scheme configured by the user.\n * @see [[ThematicGradientSettings.customKeys]]\n */\n Custom = 5,\n}\n\n/** JSON representation of a [[ThematicGradientSettings]].\n * @public\n * @extensions\n **/\nexport interface ThematicGradientSettingsProps {\n /** See [[ThematicGradientSettings.mode]]. */\n mode?: ThematicGradientMode;\n /** See [[ThematicGradientSettings.stepCount]]. */\n stepCount?: number;\n /** See [[ThematicGradientSettings.marginColor]]. */\n marginColor?: ColorDefProps;\n /** See [[ThematicGradientSettings.colorScheme]]. */\n colorScheme?: ThematicGradientColorScheme;\n /** See [[ThematicGradientSettings.customKeys. */\n customKeys?: Gradient.KeyColorProps[];\n /** See [[ThematicGradientSettings.colorMix]]. */\n colorMix?: number;\n /** See [[ThematicGradientSettings.transparencyMode]]. */\n transparencyMode?: ThematicGradientTransparencyMode;\n}\n\n/** Thematic settings specific to creating a color gradient used by [[ThematicDisplay]].\n * @public\n */\nexport class ThematicGradientSettings {\n /** The thematic image mode used to generate the gradient. Defaults to [[ThematicGradientMode.Smooth]]. */\n public readonly mode: ThematicGradientMode;\n /** The step count value used for [[ThematicGradientMode.Stepped]], [[ThematicGradientMode.SteppedWithDelimiter]], and [[ThematicGradientMode.IsoLines]]. Defaults to 10. Cannot be less than 2. */\n public readonly stepCount: number;\n /** The margin color used at the extremes of the gradient, when outside the applied range. Defaults to a black color using [[ColorDef.fromJSON]] with no arguments. */\n public readonly marginColor: ColorDef;\n /** The color scheme used to generate the colors of the gradient color within the applied range. Defaults to [[ThematicGradientColorScheme.BlueRed]]. */\n public readonly colorScheme: ThematicGradientColorScheme;\n /** The key color values that must be provided when using a custom thematic color scheme.\n * Defaults to empty, unless using a custom thematic color scheme. In that case, this defaults to two key colors going from white to black.\n * When using a custom thematic color scheme, there must be at least two entries in here. If there are not, it will revert to the default settings.\n */\n public readonly customKeys: Gradient.KeyColor[];\n /** The percentage to mix in the original color with the thematic display gradient color (0-1).\n * Applies to background map terrain and point clouds only. Defaults to 0. */\n public readonly colorMix: number;\n /** Specifies how the transparency is computed. Defaults to [[ThematicGradientTransparencyMode.SurfaceOnly]].\n * @note This property is ignored for gradients applied using an [[AnalysisStyle]] via [[AnalysisStyleThematic]] - in that case, only the color and\n * transparency of the thematic gradient are applied.\n */\n public readonly transparencyMode: ThematicGradientTransparencyMode;\n\n public static get margin(): number { return .001; } // A fixed portion of the gradient for out of range values.\n public static get contentRange(): number { return 1.0 - 2.0 * ThematicGradientSettings.margin; }\n public static get contentMax(): number { return 1.0 - ThematicGradientSettings.margin; }\n\n public static readonly defaults = new ThematicGradientSettings({});\n\n private static _defaultCustomKeys = [[0.0, 255, 255, 255], [1.0, 0, 0, 0]];\n\n /** @alpha */\n public get textureTransparency(): TextureTransparency {\n let transp = TextureTransparency.Opaque;\n if (ThematicGradientColorScheme.Custom === this.colorScheme) {\n let haveOpaque = false;\n let haveTransparent = false;\n for (const key of this.customKeys) {\n const isOpaque = key.color.isOpaque;\n haveOpaque = haveOpaque || isOpaque;\n haveTransparent = haveTransparent || !isOpaque;\n }\n\n if (haveTransparent)\n transp = haveOpaque ? TextureTransparency.Mixed : TextureTransparency.Translucent;\n }\n\n if (transp !== TextureTransparency.Mixed)\n if (this.marginColor.isOpaque !== (transp === TextureTransparency.Opaque))\n transp = TextureTransparency.Mixed;\n\n return transp;\n }\n\n public equals(other: ThematicGradientSettings): boolean {\n if (this.mode !== other.mode || this.stepCount !== other.stepCount || !this.marginColor.equals(other.marginColor)\n || this.colorScheme !== other.colorScheme || this.customKeys.length !== other.customKeys.length\n || this.colorMix !== other.colorMix || this.transparencyMode !== other.transparencyMode) {\n return false;\n }\n\n return this.customKeys.every((key, index) => Gradient.keyColorEquals(key, other.customKeys[index]));\n }\n\n /** Compares two sets of thematic gradient settings.\n * @param lhs First set of thematic gradient settings to compare\n * @param rhs Second set of thematic gradient settings 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 compare(lhs: ThematicGradientSettings, rhs: ThematicGradientSettings): number {\n let diff = 0;\n if ((diff = compareNumbers(lhs.mode, rhs.mode)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.stepCount, rhs.stepCount)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.marginColor.tbgr, rhs.marginColor.tbgr)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.colorScheme, rhs.colorScheme)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.colorMix, rhs.colorMix)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.customKeys.length, rhs.customKeys.length)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.transparencyMode, rhs.transparencyMode)) !== 0)\n return diff;\n\n for (let i = 0; i < lhs.customKeys.length; i++)\n if ((diff = compareNumbers(lhs.customKeys[i].color.tbgr, rhs.customKeys[i].color.tbgr)) !== 0)\n return diff;\n\n return diff;\n }\n\n private constructor(json?: ThematicGradientSettingsProps) {\n this.customKeys = [];\n if (undefined === json) {\n this.mode = ThematicGradientMode.Smooth;\n this.stepCount = 10;\n this.marginColor = ColorDef.fromJSON();\n this.colorScheme = ThematicGradientColorScheme.BlueRed;\n this.colorMix = 0.0;\n this.transparencyMode = ThematicGradientTransparencyMode.SurfaceOnly;\n } else {\n this.mode = (json.mode !== undefined && json.mode !== null) ? json.mode : ThematicGradientMode.Smooth;\n if (this.mode < ThematicGradientMode.Smooth || this.mode > ThematicGradientMode.IsoLines)\n this.mode = ThematicGradientMode.Smooth;\n\n this.stepCount = (typeof json.stepCount === \"number\") ? json.stepCount : 10;\n if (this.stepCount < 2)\n this.stepCount = 2;\n\n this.marginColor = ColorDef.fromJSON(json.marginColor);\n\n this.colorScheme = (json.colorScheme !== undefined && json.colorScheme !== null) ? json.colorScheme : ThematicGradientColorScheme.BlueRed;\n if (this.colorScheme < ThematicGradientColorScheme.BlueRed || this.colorScheme > ThematicGradientColorScheme.Custom)\n this.colorScheme = ThematicGradientColorScheme.BlueRed;\n\n if (json.customKeys !== undefined && json.customKeys !== null)\n json.customKeys.forEach((key) => this.customKeys.push(new Gradient.KeyColor(key)));\n\n // Enforce 2 entries in custom color keys if violated\n if (this.colorScheme === ThematicGradientColorScheme.Custom && this.customKeys.length < 2) {\n this.customKeys = [];\n for (const keyValue of ThematicGradientSettings._defaultCustomKeys)\n this.customKeys.push(new Gradient.KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n }\n\n this.colorMix = json.colorMix ?? 0.0;\n this.transparencyMode = json.transparencyMode ?? ThematicGradientTransparencyMode.SurfaceOnly;\n }\n }\n\n public static fromJSON(json?: ThematicGradientSettingsProps) {\n return json ? new ThematicGradientSettings(json) : this.defaults;\n }\n\n public toJSON(): ThematicGradientSettingsProps {\n const props: ThematicGradientSettingsProps = {};\n if (ThematicGradientMode.Smooth !== this.mode)\n props.mode = this.mode;\n\n if (10 !== this.stepCount)\n props.stepCount = this.stepCount;\n\n const marginColor = this.marginColor.toJSON();\n if (0 !== marginColor)\n props.marginColor = marginColor;\n\n if (ThematicGradientColorScheme.BlueRed !== this.colorScheme)\n props.colorScheme = this.colorScheme;\n\n if (0 !== this.colorMix)\n props.colorMix = this.colorMix;\n\n if (ThematicGradientTransparencyMode.SurfaceOnly !== this.transparencyMode)\n props.transparencyMode = this.transparencyMode;\n\n if (this.customKeys.length > 0)\n props.customKeys = this.customKeys.map((key) => { return { value: key.value, color: key.color.toJSON() }; });\n\n return props;\n }\n\n /** Create a copy of this ThematicGradientSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A ThematicGradientSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: ThematicGradientSettingsProps): ThematicGradientSettings {\n if (undefined === changedProps)\n return ThematicGradientSettings.fromJSON(this.toJSON());\n\n const props: ThematicGradientSettingsProps = {\n mode: undefined !== changedProps.mode ? changedProps.mode : this.mode,\n stepCount: undefined !== changedProps.stepCount ? changedProps.stepCount : this.stepCount,\n marginColor: undefined !== changedProps.marginColor ? changedProps.marginColor : this.marginColor.tbgr,\n colorScheme: undefined !== changedProps.colorScheme ? changedProps.colorScheme : this.colorScheme,\n customKeys: undefined !== changedProps.customKeys ? changedProps.customKeys : this.customKeys.map((key) => ({ value: key.value, color: key.color.tbgr })),\n colorMix: undefined !== changedProps.colorMix ? changedProps.colorMix : this.colorMix,\n transparencyMode: changedProps.transparencyMode ?? this.transparencyMode,\n };\n\n return ThematicGradientSettings.fromJSON(props);\n }\n}\n\n/** JSON representation of a [[ThematicDisplaySensor]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplaySensorProps {\n /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */\n position?: XYZProps;\n /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */\n value?: number;\n}\n\n/** A sensor in world space, used for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n */\nexport class ThematicDisplaySensor {\n /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */\n public position: Readonly<Point3d>;\n /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */\n public readonly value: number;\n\n private constructor(json?: ThematicDisplaySensorProps) {\n if (undefined === json) {\n this.position = Point3d.fromJSON();\n this.value = 0;\n } else {\n this.position = Point3d.fromJSON(json.position);\n this.value = (typeof json.value !== \"number\") ? 0 : json.value;\n if (this.value < 0)\n this.value = 0;\n else if (this.value > 1)\n this.value = 1;\n }\n }\n\n public equals(other: ThematicDisplaySensor): boolean {\n return (this.value === other.value) && this.position.isAlmostEqual(other.position);\n }\n\n public static fromJSON(json?: ThematicDisplaySensorProps) {\n return new ThematicDisplaySensor(json);\n }\n\n public toJSON(): ThematicDisplaySensorProps {\n return {\n position: this.position.toJSON(),\n value: this.value,\n };\n }\n}\n\n/** JSON representation of a [[ThematicDisplaySensorSettings]] for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplaySensorSettingsProps {\n /** This is the list of sensors. Defaults to an empty array. */\n sensors?: ThematicDisplaySensorProps[];\n /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.\n * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).\n * Defaults to zero.\n * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.\n */\n distanceCutoff?: number;\n}\n\n/** Settings for sensor-based thematic display for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n */\nexport class ThematicDisplaySensorSettings {\n /** This is the list of sensors. Defaults to an empty array. */\n public readonly sensors: ThematicDisplaySensor[];\n /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.\n * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).\n * Defaults to zero.\n * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.\n */\n public readonly distanceCutoff: number;\n\n private constructor(json?: ThematicDisplaySensorSettingsProps) {\n this.sensors = [];\n if (undefined !== json) {\n if (json.sensors !== undefined && json.sensors !== null) {\n json.sensors.forEach((sensorJSON) => this.sensors.push(ThematicDisplaySensor.fromJSON(sensorJSON)));\n }\n this.distanceCutoff = (typeof json.distanceCutoff === \"number\") ? json.distanceCutoff : 0;\n } else {\n this.distanceCutoff = 0;\n }\n }\n\n public equals(other: ThematicDisplaySensorSettings): boolean {\n if (this.distanceCutoff !== other.distanceCutoff)\n return false;\n\n const thisSensors = this.sensors;\n const otherSensors = other.sensors;\n\n if (thisSensors.length !== otherSensors.length)\n return false;\n\n for (let i = 0; i < thisSensors.length; i++) {\n if (!thisSensors[i].equals(otherSensors[i]))\n return false;\n }\n\n return true;\n }\n\n public static fromJSON(json?: ThematicDisplaySensorSettingsProps) {\n return new ThematicDisplaySensorSettings(json);\n }\n\n public toJSON(): ThematicDisplaySensorSettingsProps {\n const json: ThematicDisplaySensorSettingsProps = {};\n\n json.sensors = [];\n this.sensors.forEach((sensor) => json.sensors!.push(sensor.toJSON()));\n\n json.distanceCutoff = this.distanceCutoff;\n\n return json;\n }\n}\n\n/** The thematic display mode. This determines how to apply the thematic color gradient to the geometry.\n * @public\n * @extensions\n */\nexport enum ThematicDisplayMode {\n /** The color gradient will be mapped to surface geometry and point clouds based on world height in meters. */\n Height = 0,\n /** The color gradient will be mapped to surface geometry and point clouds using inverse distance weighting based on world positions and corresponding values from a list of sensors.\n * @note Performance will decrease as more sensors are added.\n */\n InverseDistanceWeightedSensors = 1,\n /** The color gradient will be mapped to surface geometry based on the slope of the surface. The slope value is calculated based on the angle between the surface and the axis specified in the associated [[ThematicDisplay]] object.\n * @note This display mode does not affect point clouds.\n */\n Slope = 2,\n /** The color gradient will be mapped to surface geometry based on the direction of a sun shining on the surface.\n * @note This display mode does not affect point clouds.\n */\n HillShade = 3,\n}\n\n/** JSON representation of the thematic display setup of a [[DisplayStyle3d]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplayProps {\n /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */\n displayMode?: ThematicDisplayMode;\n /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */\n gradientSettings?: ThematicGradientSettingsProps;\n /** The range to use when applying the thematic gradient for height and slope mode.\n * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.\n * For [[ThematicDisplayMode.Slope]], this is a range in degrees with a minimum low value of 0 degrees and a maximum high value of 90 degrees.\n * Defaults to a null range.\n */\n range?: Range1dProps;\n /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], calculating the slope of a surface is done in relation to the axis. Defaults to {0,0,0}. */\n axis?: XYZProps;\n /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */\n sunDirection?: XYZProps;\n /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.\n * @public\n */\n sensorSettings?: ThematicDisplaySensorSettingsProps;\n}\n\n/** The thematic display setup of a [[DisplayStyle3d]].\n * Thematic display allows a user to colorize a scene using a color gradient in a way that provides a visual cue about certain attributes of the rendered geometry. This scene colorization will be done based on certain geometric attributes like height, surface slope, position of surfaces relative to a sun position, or geometric position relative to a list of sensors.\n * The documentation for [[ThematicDisplayMode]] describes how each mode colorizes the scene.\n * @note Applying thematic display to geometry prevents shadows from applying to the same geometry.\n * @public\n */\nexport class ThematicDisplay {\n /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */\n public readonly displayMode: ThematicDisplayMode;\n /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */\n public readonly gradientSettings: ThematicGradientSettings;\n /** The range to use when applying the thematic gradient for height and slope mode.\n * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.\n * For [[ThematicDisplayMode.Slope]], this is a range in radians with a minimum low value of 0 degrees and a maximum high value of 90 degrees.\n * Defaults to a null range.\n */\n public readonly range: Range1d;\n /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], the slope of a surface is calculated in relation to this axis. Defaults to {0,0,0}. */\n public readonly axis: Vector3d;\n /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */\n public readonly sunDirection: Vector3d;\n /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.\n * @public\n */\n public readonly sensorSettings: ThematicDisplaySensorSettings;\n\n public equals(other: ThematicDisplay): boolean {\n if (this.displayMode !== other.displayMode)\n return false;\n if (!this.gradientSettings.equals(other.gradientSettings))\n return false;\n if (!this.range.isAlmostEqual(other.range))\n return false;\n if (!this.axis.isAlmostEqual(other.axis))\n return false;\n if (!this.sunDirection.isAlmostEqual(other.sunDirection))\n return false;\n if (!this.sensorSettings.equals(other.sensorSettings))\n return false;\n\n return true;\n }\n\n private constructor(json?: ThematicDisplayProps) {\n if (undefined === json) {\n this.displayMode = ThematicDisplayMode.Height;\n this.gradientSettings = ThematicGradientSettings.fromJSON();\n this.axis = Vector3d.fromJSON();\n this.range = Range1d.fromJSON();\n this.sunDirection = Vector3d.fromJSON();\n this.sensorSettings = ThematicDisplaySensorSettings.fromJSON();\n } else {\n this.displayMode = (json.displayMode !== undefined && json.displayMode !== null) ? json.displayMode : ThematicDisplayMode.Height;\n if (this.displayMode < ThematicDisplayMode.Height || this.displayMode > ThematicDisplayMode.HillShade)\n this.displayMode = ThematicDisplayMode.Height;\n this.gradientSettings = ThematicGradientSettings.fromJSON(json.gradientSettings);\n this.axis = Vector3d.fromJSON(json.axis);\n this.range = Range1d.fromJSON(json.range);\n this.sunDirection = Vector3d.fromJSON(json.sunDirection);\n this.sensorSettings = ThematicDisplaySensorSettings.fromJSON(json.sensorSettings);\n }\n if (ThematicDisplayMode.Height !== this.displayMode) {\n // Disallow isoline and stepped-with-delimiter gradient modes in any mode other than height.\n if (ThematicGradientMode.IsoLines === this.gradientSettings.mode || ThematicGradientMode.SteppedWithDelimiter === this.gradientSettings.mode) {\n const gradientSettingsJSON = this.gradientSettings.toJSON();\n gradientSettingsJSON.mode = ThematicGradientMode.Smooth;\n this.gradientSettings = ThematicGradientSettings.fromJSON(gradientSettingsJSON);\n }\n if (ThematicDisplayMode.Slope === this.displayMode) {\n if (this.range.low < 0.0)\n this.range.low = 0.0;\n if (this.range.high > 90.0)\n this.range.high = 90.0;\n }\n }\n }\n\n public static fromJSON(json?: ThematicDisplayProps) {\n return new ThematicDisplay(json);\n }\n\n public toJSON(): ThematicDisplayProps {\n const json: ThematicDisplayProps = {\n displayMode: this.displayMode,\n gradientSettings: this.gradientSettings.toJSON(),\n axis: this.axis.toJSON(),\n sunDirection: this.sunDirection.toJSON(),\n range: this.range.toJSON(),\n };\n\n if (this.sensorSettings.sensors.length > 0)\n json.sensorSettings = this.sensorSettings.toJSON();\n\n return json;\n }\n}\n"]}
1
+ {"version":3,"file":"ThematicDisplay.js","sourceRoot":"","sources":["../../src/ThematicDisplay.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAgB,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAN,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,kDAAkD;IAClD,mEAAU,CAAA;IACV,mDAAmD;IACnD,qEAAW,CAAA;IACX,yJAAyJ;IACzJ,+FAAwB,CAAA;IACxB,uIAAuI;IACvI,uEAAY,CAAA;AACd,CAAC,EATW,oBAAoB,KAApB,oBAAoB,QAS/B;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,gCAQX;AARD,WAAY,gCAAgC;IAC1C,wFAAwF;IACxF,qGAAe,CAAA;IACf;;;OAGG;IACH,mIAA8B,CAAA;AAChC,CAAC,EARW,gCAAgC,KAAhC,gCAAgC,QAQ3C;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,2BAeX;AAfD,WAAY,2BAA2B;IACrC,uEAAuE;IACvE,mFAAW,CAAA;IACX,uEAAuE;IACvE,mFAAW,CAAA;IACX,uFAAuF;IACvF,yFAAc,CAAA;IACd,kEAAkE;IAClE,2FAAe,CAAA;IACf,mEAA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CAAC;gBAC7I,MAAM,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;gBAC5D,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,MAAM,CAAC;gBACxD,IAAI,CAAC,gBAAgB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;YAClF,CAAC;YACD,IAAI,mBAAmB,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;gBACnD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG;oBACtB,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;gBACvB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI;oBACxB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAA2B;QAChD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAEM,MAAM;QACX,MAAM,IAAI,GAAyB;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE;YAChD,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACxB,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;SAC3B,CAAC;QAEF,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;YACxC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QAErD,OAAO,IAAI,CAAC;IACd,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 { compareNumbers } from \"@itwin/core-bentley\";\nimport { Point3d, Range1d, Range1dProps, Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { Gradient } from \"./Gradient\";\nimport { TextureTransparency } from \"./TextureProps\";\n\n/** A thematic gradient mode used to generate and apply a thematic effect to a scene.\n * @see [[ThematicGradientSettings.mode]]\n * @public\n * @extensions\n */\nexport enum ThematicGradientMode {\n /** Apply a smooth color gradient to the scene. */\n Smooth = 0,\n /** Apply a stepped color gradient to the scene. */\n Stepped = 1,\n /** Apply a stepped color gradient to the scene with delimiters (lines between the color steps). Can only be used with [[ThematicDisplayMode.Height]]. */\n SteppedWithDelimiter = 2,\n /** Apply isolines to the scene to achieve an effect similar to a contour map. Can only be used with [[ThematicDisplayMode.Height]]. */\n IsoLines = 3,\n}\n\n/** Describes how transparency is computed when applying a thematic gradient to a surface.\n * Each [[Gradient.KeyColor]] in [[ThematicGradientSettings.customKeys]] has a transparency value.\n * Each surface to which the gradient is applied has its own transparency.\n * The transparency mode determines how these two values are combined to compute the final transparency.\n * @see [[ThematicGradientSettings.transparencyMode]].\n * @public\n * @extensions\n */\nexport enum ThematicGradientTransparencyMode {\n /** Ignore the gradient's transparency, applying only the surface's own transparency. */\n SurfaceOnly = 0,\n /** The final transparency is computed from the product of the surface and gradient alpha channels.\n * (Alpha is the inverse of transparency, where `alpha = (255 - transparency) / 255`).\n * If the gradient color is opaque, this produces the same result as [[SurfaceOnly]].\n */\n MultiplySurfaceAndGradient = 1,\n}\n\n/** A color scheme used to generate the colors of a thematic gradient within an applied range.\n * @see [[ThematicGradientSettings.colorScheme]]\n * @see [[ThematicDisplay.range]]\n * @public\n * @extensions\n */\nexport enum ThematicGradientColorScheme {\n /** A color gradient scheme that represents a blue-to-red gradation. */\n BlueRed = 0,\n /** A color gradient scheme that represents a red-to-blue gradation. */\n RedBlue = 1,\n /** A color gradient scheme that represents a monochrome (black-to-white) gradation. */\n Monochrome = 2,\n /** A color gradient scheme that suits a topographic gradation. */\n Topographic = 3,\n /** A color gradient scheme that suits a sea-mountain gradation. */\n SeaMountain = 4,\n /** A custom color gradient scheme configured by the user.\n * @see [[ThematicGradientSettings.customKeys]]\n */\n Custom = 5,\n}\n\n/** JSON representation of a [[ThematicGradientSettings]].\n * @public\n * @extensions\n **/\nexport interface ThematicGradientSettingsProps {\n /** See [[ThematicGradientSettings.mode]]. */\n mode?: ThematicGradientMode;\n /** See [[ThematicGradientSettings.stepCount]]. */\n stepCount?: number;\n /** See [[ThematicGradientSettings.marginColor]]. */\n marginColor?: ColorDefProps;\n /** See [[ThematicGradientSettings.colorScheme]]. */\n colorScheme?: ThematicGradientColorScheme;\n /** See [[ThematicGradientSettings.customKeys. */\n customKeys?: Gradient.KeyColorProps[];\n /** See [[ThematicGradientSettings.colorMix]]. */\n colorMix?: number;\n /** See [[ThematicGradientSettings.transparencyMode]]. */\n transparencyMode?: ThematicGradientTransparencyMode;\n}\n\n/** Thematic settings specific to creating a color gradient used by [[ThematicDisplay]].\n * @public\n */\nexport class ThematicGradientSettings {\n /** The thematic image mode used to generate the gradient. Defaults to [[ThematicGradientMode.Smooth]]. */\n public readonly mode: ThematicGradientMode;\n /** The step count value used for [[ThematicGradientMode.Stepped]], [[ThematicGradientMode.SteppedWithDelimiter]], and [[ThematicGradientMode.IsoLines]]. Defaults to 10. Cannot be less than 2. */\n public readonly stepCount: number;\n /** The margin color used at the extremes of the gradient, when outside the applied range. Defaults to a black color using [[ColorDef.fromJSON]] with no arguments. */\n public readonly marginColor: ColorDef;\n /** The color scheme used to generate the colors of the gradient color within the applied range. Defaults to [[ThematicGradientColorScheme.BlueRed]]. */\n public readonly colorScheme: ThematicGradientColorScheme;\n /** The key color values that must be provided when using a custom thematic color scheme.\n * Defaults to empty, unless using a custom thematic color scheme. In that case, this defaults to two key colors going from white to black.\n * When using a custom thematic color scheme, there must be at least two entries in here. If there are not, it will revert to the default settings.\n */\n public readonly customKeys: Gradient.KeyColor[];\n /** The percentage to mix in the original color with the thematic display gradient color (0-1).\n * Applies to background map terrain and point clouds only. Defaults to 0. */\n public readonly colorMix: number;\n /** Specifies how the transparency is computed. Defaults to [[ThematicGradientTransparencyMode.SurfaceOnly]].\n * @note This property is ignored for gradients applied using an [[AnalysisStyle]] via [[AnalysisStyleThematic]] - in that case, only the color and\n * transparency of the thematic gradient are applied.\n */\n public readonly transparencyMode: ThematicGradientTransparencyMode;\n\n public static get margin(): number { return .001; } // A fixed portion of the gradient for out of range values.\n public static get contentRange(): number { return 1.0 - 2.0 * ThematicGradientSettings.margin; }\n public static get contentMax(): number { return 1.0 - ThematicGradientSettings.margin; }\n\n public static readonly defaults = new ThematicGradientSettings({});\n\n private static _defaultCustomKeys = [[0.0, 255, 255, 255], [1.0, 0, 0, 0]];\n\n /** @alpha */\n public get textureTransparency(): TextureTransparency {\n let transp = TextureTransparency.Opaque;\n if (ThematicGradientColorScheme.Custom === this.colorScheme) {\n let haveOpaque = false;\n let haveTransparent = false;\n for (const key of this.customKeys) {\n const isOpaque = key.color.isOpaque;\n haveOpaque = haveOpaque || isOpaque;\n haveTransparent = haveTransparent || !isOpaque;\n }\n\n if (haveTransparent)\n transp = haveOpaque ? TextureTransparency.Mixed : TextureTransparency.Translucent;\n }\n\n if (transp !== TextureTransparency.Mixed)\n if (this.marginColor.isOpaque !== (transp === TextureTransparency.Opaque))\n transp = TextureTransparency.Mixed;\n\n return transp;\n }\n\n public equals(other: ThematicGradientSettings): boolean {\n if (this.mode !== other.mode || this.stepCount !== other.stepCount || !this.marginColor.equals(other.marginColor)\n || this.colorScheme !== other.colorScheme || this.customKeys.length !== other.customKeys.length\n || this.colorMix !== other.colorMix || this.transparencyMode !== other.transparencyMode) {\n return false;\n }\n\n return this.customKeys.every((key, index) => Gradient.keyColorEquals(key, other.customKeys[index]));\n }\n\n /** Compares two sets of thematic gradient settings.\n * @param lhs First set of thematic gradient settings to compare\n * @param rhs Second set of thematic gradient settings 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 compare(lhs: ThematicGradientSettings, rhs: ThematicGradientSettings): number {\n let diff = 0;\n if ((diff = compareNumbers(lhs.mode, rhs.mode)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.stepCount, rhs.stepCount)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.marginColor.tbgr, rhs.marginColor.tbgr)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.colorScheme, rhs.colorScheme)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.colorMix, rhs.colorMix)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.customKeys.length, rhs.customKeys.length)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.transparencyMode, rhs.transparencyMode)) !== 0)\n return diff;\n\n for (let i = 0; i < lhs.customKeys.length; i++)\n if ((diff = compareNumbers(lhs.customKeys[i].color.tbgr, rhs.customKeys[i].color.tbgr)) !== 0)\n return diff;\n\n return diff;\n }\n\n private constructor(json?: ThematicGradientSettingsProps) {\n this.customKeys = [];\n if (undefined === json) {\n this.mode = ThematicGradientMode.Smooth;\n this.stepCount = 10;\n this.marginColor = ColorDef.fromJSON();\n this.colorScheme = ThematicGradientColorScheme.BlueRed;\n this.colorMix = 0.0;\n this.transparencyMode = ThematicGradientTransparencyMode.SurfaceOnly;\n } else {\n this.mode = (json.mode !== undefined && json.mode !== null) ? json.mode : ThematicGradientMode.Smooth;\n if (this.mode < ThematicGradientMode.Smooth || this.mode > ThematicGradientMode.IsoLines)\n this.mode = ThematicGradientMode.Smooth;\n\n this.stepCount = (typeof json.stepCount === \"number\") ? json.stepCount : 10;\n if (this.stepCount < 2)\n this.stepCount = 2;\n\n this.marginColor = ColorDef.fromJSON(json.marginColor);\n\n this.colorScheme = (json.colorScheme !== undefined && json.colorScheme !== null) ? json.colorScheme : ThematicGradientColorScheme.BlueRed;\n if (this.colorScheme < ThematicGradientColorScheme.BlueRed || this.colorScheme > ThematicGradientColorScheme.Custom)\n this.colorScheme = ThematicGradientColorScheme.BlueRed;\n\n if (json.customKeys !== undefined && json.customKeys !== null)\n json.customKeys.forEach((key) => this.customKeys.push(new Gradient.KeyColor(key)));\n\n // Enforce 2 entries in custom color keys if violated\n if (this.colorScheme === ThematicGradientColorScheme.Custom && this.customKeys.length < 2) {\n this.customKeys = [];\n for (const keyValue of ThematicGradientSettings._defaultCustomKeys)\n this.customKeys.push(new Gradient.KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n }\n\n this.colorMix = json.colorMix ?? 0.0;\n this.transparencyMode = json.transparencyMode ?? ThematicGradientTransparencyMode.SurfaceOnly;\n }\n }\n\n public static fromJSON(json?: ThematicGradientSettingsProps) {\n return json ? new ThematicGradientSettings(json) : this.defaults;\n }\n\n public toJSON(): ThematicGradientSettingsProps {\n const props: ThematicGradientSettingsProps = {};\n if (ThematicGradientMode.Smooth !== this.mode)\n props.mode = this.mode;\n\n if (10 !== this.stepCount)\n props.stepCount = this.stepCount;\n\n const marginColor = this.marginColor.toJSON();\n if (0 !== marginColor)\n props.marginColor = marginColor;\n\n if (ThematicGradientColorScheme.BlueRed !== this.colorScheme)\n props.colorScheme = this.colorScheme;\n\n if (0 !== this.colorMix)\n props.colorMix = this.colorMix;\n\n if (ThematicGradientTransparencyMode.SurfaceOnly !== this.transparencyMode)\n props.transparencyMode = this.transparencyMode;\n\n if (this.customKeys.length > 0)\n props.customKeys = this.customKeys.map((key) => { return { value: key.value, color: key.color.toJSON() }; });\n\n return props;\n }\n\n /** Create a copy of this ThematicGradientSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A ThematicGradientSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: ThematicGradientSettingsProps): ThematicGradientSettings {\n if (undefined === changedProps)\n return ThematicGradientSettings.fromJSON(this.toJSON());\n\n const props: ThematicGradientSettingsProps = {\n mode: undefined !== changedProps.mode ? changedProps.mode : this.mode,\n stepCount: undefined !== changedProps.stepCount ? changedProps.stepCount : this.stepCount,\n marginColor: undefined !== changedProps.marginColor ? changedProps.marginColor : this.marginColor.tbgr,\n colorScheme: undefined !== changedProps.colorScheme ? changedProps.colorScheme : this.colorScheme,\n customKeys: undefined !== changedProps.customKeys ? changedProps.customKeys : this.customKeys.map((key) => ({ value: key.value, color: key.color.tbgr })),\n colorMix: undefined !== changedProps.colorMix ? changedProps.colorMix : this.colorMix,\n transparencyMode: changedProps.transparencyMode ?? this.transparencyMode,\n };\n\n return ThematicGradientSettings.fromJSON(props);\n }\n}\n\n/** JSON representation of a [[ThematicDisplaySensor]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplaySensorProps {\n /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */\n position?: XYZProps;\n /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */\n value?: number;\n}\n\n/** A sensor in world space, used for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n */\nexport class ThematicDisplaySensor {\n /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */\n public position: Readonly<Point3d>;\n /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */\n public readonly value: number;\n\n private constructor(json?: ThematicDisplaySensorProps) {\n if (undefined === json) {\n this.position = Point3d.fromJSON();\n this.value = 0;\n } else {\n this.position = Point3d.fromJSON(json.position);\n this.value = (typeof json.value !== \"number\") ? 0 : json.value;\n if (this.value < 0)\n this.value = 0;\n else if (this.value > 1)\n this.value = 1;\n }\n }\n\n public equals(other: ThematicDisplaySensor): boolean {\n return (this.value === other.value) && this.position.isAlmostEqual(other.position);\n }\n\n public static fromJSON(json?: ThematicDisplaySensorProps) {\n return new ThematicDisplaySensor(json);\n }\n\n public toJSON(): ThematicDisplaySensorProps {\n return {\n position: this.position.toJSON(),\n value: this.value,\n };\n }\n}\n\n/** JSON representation of a [[ThematicDisplaySensorSettings]] for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplaySensorSettingsProps {\n /** This is the list of sensors. Defaults to an empty array. */\n sensors?: ThematicDisplaySensorProps[];\n /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.\n * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).\n * Defaults to zero.\n * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.\n */\n distanceCutoff?: number;\n}\n\n/** Settings for sensor-based thematic display for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n */\nexport class ThematicDisplaySensorSettings {\n /** This is the list of sensors. Defaults to an empty array. */\n public readonly sensors: ThematicDisplaySensor[];\n /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.\n * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).\n * Defaults to zero.\n * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.\n */\n public readonly distanceCutoff: number;\n\n private constructor(json?: ThematicDisplaySensorSettingsProps) {\n this.sensors = [];\n if (undefined !== json) {\n if (json.sensors !== undefined && json.sensors !== null) {\n json.sensors.forEach((sensorJSON) => this.sensors.push(ThematicDisplaySensor.fromJSON(sensorJSON)));\n }\n this.distanceCutoff = (typeof json.distanceCutoff === \"number\") ? json.distanceCutoff : 0;\n } else {\n this.distanceCutoff = 0;\n }\n }\n\n public equals(other: ThematicDisplaySensorSettings): boolean {\n if (this.distanceCutoff !== other.distanceCutoff)\n return false;\n\n const thisSensors = this.sensors;\n const otherSensors = other.sensors;\n\n if (thisSensors.length !== otherSensors.length)\n return false;\n\n for (let i = 0; i < thisSensors.length; i++) {\n if (!thisSensors[i].equals(otherSensors[i]))\n return false;\n }\n\n return true;\n }\n\n public static fromJSON(json?: ThematicDisplaySensorSettingsProps) {\n return new ThematicDisplaySensorSettings(json);\n }\n\n public toJSON(): ThematicDisplaySensorSettingsProps {\n const json: ThematicDisplaySensorSettingsProps = {};\n\n json.sensors = [];\n this.sensors.forEach((sensor) => json.sensors!.push(sensor.toJSON()));\n\n json.distanceCutoff = this.distanceCutoff;\n\n return json;\n }\n}\n\n/** The thematic display mode. This determines how to apply the thematic color gradient to the geometry.\n * @public\n * @extensions\n */\nexport enum ThematicDisplayMode {\n /** The color gradient will be mapped to surface geometry and point clouds based on world height in meters. */\n Height = 0,\n /** The color gradient will be mapped to surface geometry and point clouds using inverse distance weighting based on world positions and corresponding values from a list of sensors.\n * @note Performance will decrease as more sensors are added.\n */\n InverseDistanceWeightedSensors = 1,\n /** The color gradient will be mapped to surface geometry based on the slope of the surface. The slope value is calculated based on the angle between the surface and the axis specified in the associated [[ThematicDisplay]] object.\n * @note This display mode does not affect point clouds.\n */\n Slope = 2,\n /** The color gradient will be mapped to surface geometry based on the direction of a sun shining on the surface.\n * @note This display mode does not affect point clouds.\n */\n HillShade = 3,\n}\n\n/** JSON representation of the thematic display setup of a [[DisplayStyle3d]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplayProps {\n /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */\n displayMode?: ThematicDisplayMode;\n /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */\n gradientSettings?: ThematicGradientSettingsProps;\n /** The range to use when applying the thematic gradient for height and slope mode.\n * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.\n * For [[ThematicDisplayMode.Slope]], this is a range in degrees with a minimum low value of 0 degrees and a maximum high value of 90 degrees.\n * Defaults to a null range.\n */\n range?: Range1dProps;\n /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], calculating the slope of a surface is done in relation to the axis. Defaults to {0,0,0}. */\n axis?: XYZProps;\n /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */\n sunDirection?: XYZProps;\n /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.\n * @public\n */\n sensorSettings?: ThematicDisplaySensorSettingsProps;\n}\n\n/** The thematic display setup of a [[DisplayStyle3d]].\n * Thematic display allows a user to colorize a scene using a color gradient in a way that provides a visual cue about certain attributes of the rendered geometry. This scene colorization will be done based on certain geometric attributes like height, surface slope, position of surfaces relative to a sun position, or geometric position relative to a list of sensors.\n * The documentation for [[ThematicDisplayMode]] describes how each mode colorizes the scene.\n * @note Applying thematic display to geometry prevents shadows from applying to the same geometry.\n * @public\n */\nexport class ThematicDisplay {\n /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */\n public readonly displayMode: ThematicDisplayMode;\n /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */\n public readonly gradientSettings: ThematicGradientSettings;\n /** The range to use when applying the thematic gradient for height and slope mode.\n * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.\n * For [[ThematicDisplayMode.Slope]], this is a range in radians with a minimum low value of 0 degrees and a maximum high value of 90 degrees.\n * Defaults to a null range.\n */\n public readonly range: Range1d;\n /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], the slope of a surface is calculated in relation to this axis. Defaults to {0,0,0}. */\n public readonly axis: Vector3d;\n /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */\n public readonly sunDirection: Vector3d;\n /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.\n * @public\n */\n public readonly sensorSettings: ThematicDisplaySensorSettings;\n\n public equals(other: ThematicDisplay): boolean {\n if (this.displayMode !== other.displayMode)\n return false;\n if (!this.gradientSettings.equals(other.gradientSettings))\n return false;\n if (!this.range.isAlmostEqual(other.range))\n return false;\n if (!this.axis.isAlmostEqual(other.axis))\n return false;\n if (!this.sunDirection.isAlmostEqual(other.sunDirection))\n return false;\n if (!this.sensorSettings.equals(other.sensorSettings))\n return false;\n\n return true;\n }\n\n private constructor(json?: ThematicDisplayProps) {\n if (undefined === json) {\n this.displayMode = ThematicDisplayMode.Height;\n this.gradientSettings = ThematicGradientSettings.fromJSON();\n this.axis = Vector3d.fromJSON();\n this.range = Range1d.fromJSON();\n this.sunDirection = Vector3d.fromJSON();\n this.sensorSettings = ThematicDisplaySensorSettings.fromJSON();\n } else {\n this.displayMode = (json.displayMode !== undefined && json.displayMode !== null) ? json.displayMode : ThematicDisplayMode.Height;\n if (this.displayMode < ThematicDisplayMode.Height || this.displayMode > ThematicDisplayMode.HillShade)\n this.displayMode = ThematicDisplayMode.Height;\n this.gradientSettings = ThematicGradientSettings.fromJSON(json.gradientSettings);\n this.axis = Vector3d.fromJSON(json.axis);\n this.range = Range1d.fromJSON(json.range);\n this.sunDirection = Vector3d.fromJSON(json.sunDirection);\n this.sensorSettings = ThematicDisplaySensorSettings.fromJSON(json.sensorSettings);\n }\n if (ThematicDisplayMode.Height !== this.displayMode) {\n // Disallow isoline and stepped-with-delimiter gradient modes in any mode other than height.\n if (ThematicGradientMode.IsoLines === this.gradientSettings.mode || ThematicGradientMode.SteppedWithDelimiter === this.gradientSettings.mode) {\n const gradientSettingsJSON = this.gradientSettings.toJSON();\n gradientSettingsJSON.mode = ThematicGradientMode.Smooth;\n this.gradientSettings = ThematicGradientSettings.fromJSON(gradientSettingsJSON);\n }\n if (ThematicDisplayMode.Slope === this.displayMode) {\n if (this.range.low < 0.0)\n this.range.low = 0.0;\n if (this.range.high > 90.0)\n this.range.high = 90.0;\n }\n }\n }\n\n public static fromJSON(json?: ThematicDisplayProps) {\n return new ThematicDisplay(json);\n }\n\n public toJSON(): ThematicDisplayProps {\n const json: ThematicDisplayProps = {\n displayMode: this.displayMode,\n gradientSettings: this.gradientSettings.toJSON(),\n axis: this.axis.toJSON(),\n sunDirection: this.sunDirection.toJSON(),\n range: this.range.toJSON(),\n };\n\n if (this.sensorSettings.sensors.length > 0)\n json.sensorSettings = this.sensorSettings.toJSON();\n\n return json;\n }\n}\n"]}
@@ -46,6 +46,8 @@ export class ViewDetails {
46
46
  set auxiliaryCoordinateSystemId(id) {
47
47
  this._json.acs = Id64.isValidId64(id) ? id : undefined;
48
48
  }
49
+ /** Maximum aspect ratio skew. Apps can override this by changing its value. */
50
+ static { this.maxSkew = 25; }
49
51
  /** The aspect ratio skew (x/y, usually 1.0) used to exaggerate the y axis of the view. */
50
52
  get aspectRatioSkew() {
51
53
  const maxSkew = ViewDetails.maxSkew;
@@ -114,8 +116,6 @@ export class ViewDetails {
114
116
  return this._json;
115
117
  }
116
118
  }
117
- /** Maximum aspect ratio skew. Apps can override this by changing its value. */
118
- ViewDetails.maxSkew = 25;
119
119
  /** Encapsulates access to optional 3d view details stored in JSON properties.
120
120
  * @see [[ViewDetails3dProps]] for the JSON representation.
121
121
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"ViewDetails.js","sourceRoot":"","sources":["../../src/ViewDetails.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAmB,QAAQ,EAAS,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAuB,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAyBxE;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAWX;AAX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,mBAAO,GAAG,EAAE,AAAL,CAAM;AAkF7B;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAG5C,IAAY,OAAO;QACjB,OAAO,IAAI,CAAC,KAA2B,CAAC;IAC1C,CAAC;IAKD,gBAAgB;IAChB,YAAmB,cAAoD;QACrE,KAAK,CAAC,cAAc,CAAC,CAAC;QALxB,oFAAoF;QACpE,6BAAwB,GAAG,IAAI,OAAO,EAAwC,CAAC;IAK/F,CAAC;IAED,yFAAyF;IACzF,IAAW,oBAAoB;QAC7B,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC;IACD,IAAW,oBAAoB,CAAC,KAAc;QAC5C,IAAI,CAAC,OAAO,CAAC,sBAAsB,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACH,IAAW,eAAe;QACxB,IAAI,CAAC,IAAI,CAAC,gBAAgB;YACxB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAEjF,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IACD,IAAW,eAAe,CAAC,MAAuB;QAChD,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACa,OAAO;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,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 Views\n */\n\nimport { assert, BeEvent, Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { ClipVector, ClipVectorProps, Geometry, XAndY } from \"@itwin/core-geometry\";\nimport { ModelClipGroupProps, ModelClipGroups } from \"./ModelClipGroup\";\n\n/** Properties of a [[ViewDefinitionProps]] stored as JSON.\n * @see [[ViewDefinitionProps.jsonProperties]].\n * @see [[ViewDetails3dProps]] for additional properties specific to 3d views.\n * @public\n * @extensions\n */\nexport interface ViewDetailsProps {\n /** Id of the aux coord system. Default: invalid. */\n acs?: Id64String;\n /** Aspect ratio skew (x/y) used to exaggerate the y axis of the view. Default: 1.0. */\n aspectSkew?: number;\n /** Grid orientation. Default: WorldXY. */\n gridOrient?: GridOrientationType;\n /** Default: 10. */\n gridPerRef?: number;\n /** Default: 1.0. */\n gridSpaceX?: number;\n /** Default: same as gridSpaceX. */\n gridSpaceY?: number;\n /** Describes the [ClipVector]($core-geometry) applied to the view. */\n clip?: ClipVectorProps;\n}\n\n/** Describes the orientation of the grid displayed within a [Viewport]($frontend).\n * @public\n * @extensions\n */\nexport enum GridOrientationType {\n /** Oriented with the view. */\n View = 0,\n /** Top */\n WorldXY = 1,\n /** Right */\n WorldYZ = 2,\n /** Front */\n WorldXZ = 3,\n /** Oriented by the auxiliary coordinate system. */\n AuxCoord = 4,\n}\n\n/** Properties of a [[ViewDefinition3dProps]] stored as JSON.\n * @see [[ViewDefinition3dProps.jsonProperties]].\n * @public\n * @extensions\n */\nexport interface ViewDetails3dProps extends ViewDetailsProps {\n /** Whether viewing tools are prohibited from operating in 3 dimensions on this view. Default: false. */\n disable3dManipulations?: boolean;\n /** Defines how to clip groups of models. */\n modelClipGroups?: ModelClipGroupProps[];\n}\n\n/** Encapsulates access to optional view details stored in JSON properties.\n * @see [[ViewDetailsProps]] for the JSON representation.\n * @see [ViewDefinition.details]($backend) and [ViewState.details]($frontend).\n * @public\n */\nexport class ViewDetails {\n /** @internal */\n protected readonly _json: ViewDetailsProps;\n private _clipVector?: ClipVector;\n\n /** Event raised just before assignment to the [[clipVector]] property. */\n public readonly onClipVectorChanged = new BeEvent<(newClip: ClipVector | undefined) => void>();\n\n /** @internal */\n public constructor(jsonProperties: { viewDetails?: ViewDetailsProps }) {\n if (!jsonProperties.viewDetails)\n jsonProperties.viewDetails = {};\n\n this._json = jsonProperties.viewDetails;\n }\n\n /** The Id of the auxiliary coordinate system for the view. */\n public get auxiliaryCoordinateSystemId(): Id64String {\n return Id64.fromJSON(this._json.acs);\n }\n public set auxiliaryCoordinateSystemId(id: Id64String) {\n this._json.acs = Id64.isValidId64(id) ? id : undefined;\n }\n\n /** Maximum aspect ratio skew. Apps can override this by changing its value. */\n public static maxSkew = 25;\n\n /** The aspect ratio skew (x/y, usually 1.0) used to exaggerate the y axis of the view. */\n public get aspectRatioSkew(): number {\n const maxSkew = ViewDetails.maxSkew;\n const skew = JsonUtils.asDouble(this._json.aspectSkew, 1.0);\n return Geometry.clamp(skew, 1 / maxSkew, maxSkew);\n }\n public set aspectRatioSkew(skew: number) {\n this._json.aspectSkew = 1.0 !== skew ? skew : undefined;\n }\n\n /** The orientation of the view's grid. */\n public get gridOrientation(): GridOrientationType {\n return JsonUtils.asInt(this._json.gridOrient, GridOrientationType.WorldXY);\n }\n public set gridOrientation(orientation: GridOrientationType) {\n this._json.gridOrient = GridOrientationType.WorldXY === orientation ? undefined : orientation;\n }\n\n /** The number of grids per ref for the view. */\n public get gridsPerRef(): number {\n return JsonUtils.asInt(this._json.gridPerRef, 10);\n }\n public set gridsPerRef(gridsPerRef: number) {\n this._json.gridPerRef = 10 === gridsPerRef ? undefined : gridsPerRef;\n }\n\n /** The grid spacing for the view. */\n public get gridSpacing(): XAndY {\n const x = JsonUtils.asDouble(this._json.gridSpaceX, 1.0);\n const y = JsonUtils.asDouble(this._json.gridSpaceY, x);\n return { x, y };\n }\n public set gridSpacing(spacing: XAndY) {\n this._json.gridSpaceX = 1.0 !== spacing.x ? spacing.x : undefined;\n this._json.gridSpaceY = spacing.x !== spacing.y ? spacing.y : undefined;\n }\n\n /** Clipping volume for the view.\n * @note Do *not* modify the returned ClipVector. If you wish to change the ClipVector, clone the returned ClipVector, modify it as desired, and pass the clone back to the setter.\n */\n public get clipVector(): ClipVector | undefined {\n if (undefined === this._clipVector) {\n const clip = this._json.clip;\n this._clipVector = (undefined !== clip ? ClipVector.fromJSON(clip) : ClipVector.createEmpty());\n }\n\n return this._clipVector.isValid ? this._clipVector : undefined;\n }\n public set clipVector(clip: ClipVector | undefined) {\n const curClip = this.clipVector;\n if (curClip === clip)\n return;\n\n if (!curClip) {\n assert(undefined !== clip);\n\n // An empty clip is equivalent to no clip.\n if (!clip.isValid)\n return;\n }\n\n clip = clip ?? ClipVector.createEmpty();\n\n this.onClipVectorChanged.raiseEvent(clip.isValid ? clip : undefined);\n\n this._clipVector = clip;\n if (clip.isValid)\n this._json.clip = clip.toJSON();\n else\n delete this._json.clip;\n }\n\n /** Returns the internal JSON representation. This is *not* a copy.\n * @internal\n */\n public getJSON(): Readonly<ViewDetailsProps> {\n return this._json;\n }\n}\n\n/** Encapsulates access to optional 3d view details stored in JSON properties.\n * @see [[ViewDetails3dProps]] for the JSON representation.\n * @public\n */\nexport class ViewDetails3d extends ViewDetails {\n private _modelClipGroups?: ModelClipGroups;\n\n private get _json3d(): ViewDetails3dProps {\n return this._json as ViewDetails3dProps;\n }\n\n /** Event raised when just before assignment to the [[modelClipGroups]] property. */\n public readonly onModelClipGroupsChanged = new BeEvent<(newGroups: ModelClipGroups) => void>();\n\n /** @internal */\n public constructor(jsonProperties: { viewDetails?: ViewDetails3dProps }) {\n super(jsonProperties);\n }\n\n /** Controls whether viewing tools are allowed to operate on the view in 3 dimensions. */\n public get allow3dManipulations(): boolean {\n return !JsonUtils.asBool(this._json3d.disable3dManipulations, false);\n }\n public set allow3dManipulations(allow: boolean) {\n this._json3d.disable3dManipulations = allow ? undefined : true;\n }\n\n /** Groups of models associated with [ClipVector]($core-geometry)s by which those models should be clipped.\n * If the view and the model both have a clip vector defined, geometry in the model will be clipped by the intersection of the two clip vectors.\n * [[ViewFlags.clipVolume]] has no effect on model clips, only the view clip - model clips are always applied.\n * @note Do **not** modify the returned object directly. Instead, clone it, modify the clone, and pass the clone to the property setter.\n */\n public get modelClipGroups(): ModelClipGroups {\n if (!this._modelClipGroups)\n this._modelClipGroups = ModelClipGroups.fromJSON(this._json3d.modelClipGroups);\n\n return this._modelClipGroups;\n }\n public set modelClipGroups(groups: ModelClipGroups) {\n this.onModelClipGroupsChanged.raiseEvent(groups);\n this._modelClipGroups = groups;\n this._json3d.modelClipGroups = groups.toJSON();\n }\n\n /** Returns the internal JSON representation. This is *not* a copy.\n * @internal\n */\n public override getJSON(): Readonly<ViewDetails3dProps> {\n return this._json3d;\n }\n}\n"]}
1
+ {"version":3,"file":"ViewDetails.js","sourceRoot":"","sources":["../../src/ViewDetails.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAmB,QAAQ,EAAS,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAuB,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAyBxE;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAWX;AAXD,WAAY,mBAAmB;IAC7B,8BAA8B;IAC9B,6DAAQ,CAAA;IACR,UAAU;IACV,mEAAW,CAAA;IACX,YAAY;IACZ,mEAAW,CAAA;IACX,YAAY;IACZ,mEAAW,CAAA;IACX,mDAAmD;IACnD,qEAAY,CAAA;AACd,CAAC,EAXW,mBAAmB,KAAnB,mBAAmB,QAW9B;AAcD;;;;GAIG;AACH,MAAM,OAAO,WAAW;IAQtB,gBAAgB;IAChB,YAAmB,cAAkD;QAJrE,0EAA0E;QAC1D,wBAAmB,GAAG,IAAI,OAAO,EAA6C,C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AC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC;IACD,IAAW,oBAAoB,CAAC,KAAc;QAC5C,IAAI,CAAC,OAAO,CAAC,sBAAsB,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACH,IAAW,eAAe;QACxB,IAAI,CAAC,IAAI,CAAC,gBAAgB;YACxB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAEjF,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IACD,IAAW,eAAe,CAAC,MAAuB;QAChD,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACa,OAAO;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,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 Views\n */\n\nimport { assert, BeEvent, Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { ClipVector, ClipVectorProps, Geometry, XAndY } from \"@itwin/core-geometry\";\nimport { ModelClipGroupProps, ModelClipGroups } from \"./ModelClipGroup\";\n\n/** Properties of a [[ViewDefinitionProps]] stored as JSON.\n * @see [[ViewDefinitionProps.jsonProperties]].\n * @see [[ViewDetails3dProps]] for additional properties specific to 3d views.\n * @public\n * @extensions\n */\nexport interface ViewDetailsProps {\n /** Id of the aux coord system. Default: invalid. */\n acs?: Id64String;\n /** Aspect ratio skew (x/y) used to exaggerate the y axis of the view. Default: 1.0. */\n aspectSkew?: number;\n /** Grid orientation. Default: WorldXY. */\n gridOrient?: GridOrientationType;\n /** Default: 10. */\n gridPerRef?: number;\n /** Default: 1.0. */\n gridSpaceX?: number;\n /** Default: same as gridSpaceX. */\n gridSpaceY?: number;\n /** Describes the [ClipVector]($core-geometry) applied to the view. */\n clip?: ClipVectorProps;\n}\n\n/** Describes the orientation of the grid displayed within a [Viewport]($frontend).\n * @public\n * @extensions\n */\nexport enum GridOrientationType {\n /** Oriented with the view. */\n View = 0,\n /** Top */\n WorldXY = 1,\n /** Right */\n WorldYZ = 2,\n /** Front */\n WorldXZ = 3,\n /** Oriented by the auxiliary coordinate system. */\n AuxCoord = 4,\n}\n\n/** Properties of a [[ViewDefinition3dProps]] stored as JSON.\n * @see [[ViewDefinition3dProps.jsonProperties]].\n * @public\n * @extensions\n */\nexport interface ViewDetails3dProps extends ViewDetailsProps {\n /** Whether viewing tools are prohibited from operating in 3 dimensions on this view. Default: false. */\n disable3dManipulations?: boolean;\n /** Defines how to clip groups of models. */\n modelClipGroups?: ModelClipGroupProps[];\n}\n\n/** Encapsulates access to optional view details stored in JSON properties.\n * @see [[ViewDetailsProps]] for the JSON representation.\n * @see [ViewDefinition.details]($backend) and [ViewState.details]($frontend).\n * @public\n */\nexport class ViewDetails {\n /** @internal */\n protected readonly _json: ViewDetailsProps;\n private _clipVector?: ClipVector;\n\n /** Event raised just before assignment to the [[clipVector]] property. */\n public readonly onClipVectorChanged = new BeEvent<(newClip: ClipVector | undefined) => void>();\n\n /** @internal */\n public constructor(jsonProperties: { viewDetails?: ViewDetailsProps }) {\n if (!jsonProperties.viewDetails)\n jsonProperties.viewDetails = {};\n\n this._json = jsonProperties.viewDetails;\n }\n\n /** The Id of the auxiliary coordinate system for the view. */\n public get auxiliaryCoordinateSystemId(): Id64String {\n return Id64.fromJSON(this._json.acs);\n }\n public set auxiliaryCoordinateSystemId(id: Id64String) {\n this._json.acs = Id64.isValidId64(id) ? id : undefined;\n }\n\n /** Maximum aspect ratio skew. Apps can override this by changing its value. */\n public static maxSkew = 25;\n\n /** The aspect ratio skew (x/y, usually 1.0) used to exaggerate the y axis of the view. */\n public get aspectRatioSkew(): number {\n const maxSkew = ViewDetails.maxSkew;\n const skew = JsonUtils.asDouble(this._json.aspectSkew, 1.0);\n return Geometry.clamp(skew, 1 / maxSkew, maxSkew);\n }\n public set aspectRatioSkew(skew: number) {\n this._json.aspectSkew = 1.0 !== skew ? skew : undefined;\n }\n\n /** The orientation of the view's grid. */\n public get gridOrientation(): GridOrientationType {\n return JsonUtils.asInt(this._json.gridOrient, GridOrientationType.WorldXY);\n }\n public set gridOrientation(orientation: GridOrientationType) {\n this._json.gridOrient = GridOrientationType.WorldXY === orientation ? undefined : orientation;\n }\n\n /** The number of grids per ref for the view. */\n public get gridsPerRef(): number {\n return JsonUtils.asInt(this._json.gridPerRef, 10);\n }\n public set gridsPerRef(gridsPerRef: number) {\n this._json.gridPerRef = 10 === gridsPerRef ? undefined : gridsPerRef;\n }\n\n /** The grid spacing for the view. */\n public get gridSpacing(): XAndY {\n const x = JsonUtils.asDouble(this._json.gridSpaceX, 1.0);\n const y = JsonUtils.asDouble(this._json.gridSpaceY, x);\n return { x, y };\n }\n public set gridSpacing(spacing: XAndY) {\n this._json.gridSpaceX = 1.0 !== spacing.x ? spacing.x : undefined;\n this._json.gridSpaceY = spacing.x !== spacing.y ? spacing.y : undefined;\n }\n\n /** Clipping volume for the view.\n * @note Do *not* modify the returned ClipVector. If you wish to change the ClipVector, clone the returned ClipVector, modify it as desired, and pass the clone back to the setter.\n */\n public get clipVector(): ClipVector | undefined {\n if (undefined === this._clipVector) {\n const clip = this._json.clip;\n this._clipVector = (undefined !== clip ? ClipVector.fromJSON(clip) : ClipVector.createEmpty());\n }\n\n return this._clipVector.isValid ? this._clipVector : undefined;\n }\n public set clipVector(clip: ClipVector | undefined) {\n const curClip = this.clipVector;\n if (curClip === clip)\n return;\n\n if (!curClip) {\n assert(undefined !== clip);\n\n // An empty clip is equivalent to no clip.\n if (!clip.isValid)\n return;\n }\n\n clip = clip ?? ClipVector.createEmpty();\n\n this.onClipVectorChanged.raiseEvent(clip.isValid ? clip : undefined);\n\n this._clipVector = clip;\n if (clip.isValid)\n this._json.clip = clip.toJSON();\n else\n delete this._json.clip;\n }\n\n /** Returns the internal JSON representation. This is *not* a copy.\n * @internal\n */\n public getJSON(): Readonly<ViewDetailsProps> {\n return this._json;\n }\n}\n\n/** Encapsulates access to optional 3d view details stored in JSON properties.\n * @see [[ViewDetails3dProps]] for the JSON representation.\n * @public\n */\nexport class ViewDetails3d extends ViewDetails {\n private _modelClipGroups?: ModelClipGroups;\n\n private get _json3d(): ViewDetails3dProps {\n return this._json as ViewDetails3dProps;\n }\n\n /** Event raised when just before assignment to the [[modelClipGroups]] property. */\n public readonly onModelClipGroupsChanged = new BeEvent<(newGroups: ModelClipGroups) => void>();\n\n /** @internal */\n public constructor(jsonProperties: { viewDetails?: ViewDetails3dProps }) {\n super(jsonProperties);\n }\n\n /** Controls whether viewing tools are allowed to operate on the view in 3 dimensions. */\n public get allow3dManipulations(): boolean {\n return !JsonUtils.asBool(this._json3d.disable3dManipulations, false);\n }\n public set allow3dManipulations(allow: boolean) {\n this._json3d.disable3dManipulations = allow ? undefined : true;\n }\n\n /** Groups of models associated with [ClipVector]($core-geometry)s by which those models should be clipped.\n * If the view and the model both have a clip vector defined, geometry in the model will be clipped by the intersection of the two clip vectors.\n * [[ViewFlags.clipVolume]] has no effect on model clips, only the view clip - model clips are always applied.\n * @note Do **not** modify the returned object directly. Instead, clone it, modify the clone, and pass the clone to the property setter.\n */\n public get modelClipGroups(): ModelClipGroups {\n if (!this._modelClipGroups)\n this._modelClipGroups = ModelClipGroups.fromJSON(this._json3d.modelClipGroups);\n\n return this._modelClipGroups;\n }\n public set modelClipGroups(groups: ModelClipGroups) {\n this.onModelClipGroupsChanged.raiseEvent(groups);\n this._modelClipGroups = groups;\n this._json3d.modelClipGroups = groups.toJSON();\n }\n\n /** Returns the internal JSON representation. This is *not* a copy.\n * @internal\n */\n public override getJSON(): Readonly<ViewDetails3dProps> {\n return this._json3d;\n }\n}\n"]}
@@ -276,6 +276,8 @@ export class ViewFlags {
276
276
  noWhiteOnWhiteReversal: !this.whiteOnWhiteReversal,
277
277
  };
278
278
  }
279
+ /** A ViewFlags object with all properties initialized to their default values. */
280
+ static { this.defaults = new ViewFlags(); }
279
281
  /** Create a ViewFlags.
280
282
  * @param flags The properties to initialize. Any properties not specified are initialized to their default values.
281
283
  */
@@ -359,6 +361,4 @@ export class ViewFlags {
359
361
  && this.whiteOnWhiteReversal === other.whiteOnWhiteReversal;
360
362
  }
361
363
  }
362
- /** A ViewFlags object with all properties initialized to their default values. */
363
- ViewFlags.defaults = new ViewFlags();
364
364
  //# sourceMappingURL=ViewFlags.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewFlags.js","sourceRoot":"","sources":["../../src/ViewFlags.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,qBAAqB;AAErB,OAAO,EAAE,SAAS,EAAoC,MAAM,qBAAqB,CAAC;AAElF;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAyBX;AAzBD,WAAY,UAAU;IACpB;;;;OAIG;IACH,qDAAa,CAAA;IACb;;;;OAIG;IACH,yDAAe,CAAA;IACf;;;;;OAKG;IACH,qDAAa,CAAA;IACb;;;OAGG;IACH,uDAAc,CAAA;AAChB,CAAC,EAzBW,UAAU,KAAV,UAAU,QAyBrB;AA0ED,SAAS,aAAa,CAAC,UAAsB,EAAE,YAAqB;IAClE,OAAO,YAAY,IAAI,UAAU,CAAC,WAAW,KAAK,UAAU,CAAC;AAC/D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,SAAS;IAsFpB;;OAEG;IACH,YAAmB,KAAoC;QACrD,IAAI,CAAC,UAAU,G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AmB;eACtD,IAAI,CAAC,oBAAoB,KAAK,KAAK,CAAC,oBAAoB,CAAC;IAChE,CAAC;;AAzFD,kFAAkF;AAC3D,kBAAQ,GAAG,IAAI,SAAS,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\n// cspell:ignore ovrs\n\nimport { JsonUtils, Mutable, NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\n\n/** Enumerates the available basic rendering modes, as part of a [DisplayStyle]($backend)'s [[ViewFlags]].\n * The rendering mode broadly affects various aspects of the display style - in particular, whether and how surfaces and their edges are drawn.\n * @public\n * @extensions\n */\nexport enum RenderMode {\n /** Renders only the edges of surfaces, with exceptions for planar regions based on their [[FillFlags]].\n * Lighting (and by extension, shadows) is not applied.\n * [[HiddenLine.Settings]] are not applied - edges use the elements' width, style, and color.\n * [[ViewFlags.hiddenEdges]] is ignored - hidden edges are never displayed in wireframe mode.\n */\n Wireframe = 0,\n /** By default, renders surfaces without their edges.\n * Lighting and shadows can be applied using [[ViewFlags.lighting]] and [[ViewFlags.shadows]].\n * Edges can be enabled using [[ViewFlags.visibleEdges]] and [[ViewFlags.hiddenEdges]], and their appearance customized using [[HiddenLine.Settings]].\n * Surfaces can be drawn with transparency, based on [[ViewFlags.transparency]].\n */\n SmoothShade = 6,\n /** Renders surfaces and their edges. By default, edges are drawn in white; this can be overridden using [[HiddenLine.Settings]].\n * All surfaces are rendered opaque. If a surface's transparency is below that specified by [[HiddenLine.Settings.transparencyThreshold]], it is not rendered.\n * Materials and textures are not applied - surfaces are drawn in their actual colors.\n * [[ViewFlags.visibleEdges]] is ignored - visible edges are always drawn. Hidden edges can be enabled using [[ViewFlags.hiddenEdges]].\n * Lighting (and by extension, shadows) is not applied.\n */\n SolidFill = 4,\n /** Identical to [[RenderMode.SolidFill]], except:\n * - Surfaces are drawn using the [DisplayStyle]($backend)'s background color.\n * - Edges are drawn using their surface's colors; this can be overridden using [[HiddenLine.Settings]].\n */\n HiddenLine = 3,\n}\n\n/** JSON representation of [[ViewFlags]].\n * This is a persistence format with some unfortunate quirks that have been retained for backwards compatibility.\n * In particular, it supplies three separate flags intended to control lighting - [[noCameraLights]], [[noSourceLights]], and [[noSolarLight]] -\n * but there exists only a single [[ViewFlags.lighting]] flag. [[ViewFlags.lighting]] is set to true unless all three of the \"no lighting\" flags are true.\n * It also uses awkward negative ([[noConstruct]], [[noTransp]]) and/or abbreviated ([[clipVol]], [[visEdges]]) property names that differ from\n * those of the corresponding [[ViewFlags]] properties, making usage of this type in code error-prone.\n * Prefer to use [[ViewFlagsProperties]] unless you need to work directly with the persistence format.\n * @public\n * @extensions\n */\nexport interface ViewFlagProps {\n /** If true, don't display geometry of class [[GeometryClass.Construction]]. */\n noConstruct?: boolean;\n /** If true, don't display geometry of class [[GeometryClass.Dimension]]. */\n noDim?: boolean;\n /** If true, don't display geometry of class [[GeometryClass.Pattern]]. */\n noPattern?: boolean;\n /** If true, all lines are drawn with a width of 1 pixel. */\n noWeight?: boolean;\n /** If true, don't apply [[LinePixels]] styles. */\n noStyle?: boolean;\n /** If true, display transparency geometry as opaque. */\n noTransp?: boolean;\n /** If true, don't show filled planar regions, unless they use [[FillFlags.Always]]. */\n noFill?: boolean;\n /** If true, display a grid in the view. */\n grid?: boolean;\n /** If true, display graphics representing the [AuxCoordSystem]($backend). */\n acs?: boolean;\n /** If true, don't apply [[RenderTexture]]s to surfaces. */\n noTexture?: boolean;\n /** If true, don't apply [[RenderMaterial]]s to surfaces. */\n noMaterial?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noCameraLights?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noSourceLights?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noSolarLight?: boolean;\n /** If true, display the edges of surfaces. */\n visEdges?: boolean;\n /** If true, display the edges of surfaces, even if they are behind other geometry. */\n hidEdges?: boolean;\n /** If true, display shadows. */\n shadows?: boolean;\n /** If true, apply the view's clipping volume. Has no effect on other types of clips like [[ModelClipGroups]]. */\n clipVol?: boolean;\n /** If true, apply the view's [[DisplayStyleSettings.monochromeColor]] and [[DisplayStyleSettings.monochromeMode]] to produce a monochrome image. */\n monochrome?: boolean;\n /** The basic rendering mode, which affects the behavior of other flags. */\n renderMode?: RenderMode;\n /** Display a background map. */\n backgroundMap?: boolean;\n /** If true, apply [[AmbientOcclusion]]. */\n ambientOcclusion?: boolean;\n /** If true, apply [[ThematicDisplay]]. */\n thematicDisplay?: boolean;\n /** If true, overlay surfaces with wiremesh to reveal their triangulation. */\n wiremesh?: boolean;\n /** Controls whether surface discard is always applied regardless of other ViewFlags.\n * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with\n * non-planar surfaces always draw in front of those non-planar surfaces.\n * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed),\n * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute.\n */\n forceSurfaceDiscard?: boolean;\n /** Disables the \"white-on-white reversal\" employed by some CAD applications.\n * @see [[ViewFlags.whiteOnWhiteReversal]].\n */\n noWhiteOnWhiteReversal?: boolean;\n}\n\nfunction edgesRequired(renderMode: RenderMode, visibleEdges: boolean): boolean {\n return visibleEdges || RenderMode.SmoothShade !== renderMode;\n}\n\n/** Flags controlling how graphics appear within a view.\n * A [[ViewFlags]] object is immutable. There are several ways to produce a modified copy of a ViewFlags object:\n * ```ts\n * // Start with the default values for all properties.\n * let vf = ViewFlags.defaults;\n * // Change a single boolean property:\n * vf = vf.with(\"visibleEdges\", true);\n * // Change only the render mode:\n * vf = vf.withRenderMode(RenderMode.HiddenLine);\n * // Change multiple properties:\n * vf = vf.copy({ renderMode: RenderMode.SmoothShade, visibleEdges: true });\n * // Reset multiple properties to their default values:\n * vf = vf.copy({ renderMode: undefined, visibleEdges: undefined });\n *\n * ```\n * [[with]] and [[withRenderMode]] should be preferred if you only need to change a single property, as they will not create a new object unless\n * the new value differs from the current value.\n * [[copy]] and [[override]] should be preferred if you need to change multiple properties, as they will create no more than one new object, vs\n * each call to [[with]] or [[withRenderMode]] potentially creating a new object.\n * @see [[DisplayStyleSettings.viewFlags]] to define the view flags for a [DisplayStyle]($backend).\n * @public\n */\nexport class ViewFlags {\n /** The basic rendering mode applied to the view. This modulates the behavior of some of the other flags.\n * Default: [[RenderMode.Wireframe]].\n * @see [[RenderMode]] for details.\n */\n public readonly renderMode: RenderMode;\n /** Whether to display geometry of class [[GeometryClass.Dimension]]. Default: true. */\n public readonly dimensions: boolean;\n /** Whether to display geometry of class [[GeometryClass.Pattern]]. Default: true. */\n public readonly patterns: boolean;\n /** Whether to allow lines and edges to draw with width greater than one pixel. Default: true. */\n public readonly weights: boolean;\n /** Whether [[LinePixels]] are allowed to apply patterns to lines and edges. If false, they all draw as solid lines. Default: true. */\n public readonly styles: boolean;\n /** Whether element transparency is applied. If false, transparent geometry is drawn opaque. Default: true.\n * @see [[RenderMode]] for render mode-specific behavior.\n */\n public readonly transparency: boolean;\n /** In [[RenderMode.Wireframe]] only, whether to display the interiors of planar regions with [[FillFlags.ByView]]. Default: true. */\n public readonly fill: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[RenderTexture]]s to surfaces. Default: true. */\n public readonly textures: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[RenderMaterial]]s to surfaces. Default: true. */\n public readonly materials: boolean;\n /** Whether to display a graphical representation of the view's [AuxCoordSystem]($backend). Default: false. */\n public readonly acsTriad: boolean;\n /** Whether to display a grid. Default: false. */\n public readonly grid: boolean;\n /** In [[RenderMode.SmoothShade]], whether to display the edges of surfaces. Default: false.\n * @see [[HiddenLine.Settings]] to customize the appearance of the edges.\n */\n public readonly visibleEdges: boolean;\n /** In any mode except [[RenderMode.Wireframe]], whether to display the edges of surfaces occluded by other geometry.\n * This has no effect unless [[visibleEdges]] is also true.\n * Default: false.\n * @see [[HiddenLine.Settings]] to customize the appearance of the edges.\n */\n public readonly hiddenEdges: boolean;\n /** In [[RenderMode.SmoothShade]], whether to display solar shadows. This has no effect unless [[lighting]] is also true. Default: false.\n * @note Rendering shadows can reduce framerate, particularly on less capable graphics hardware or in complex scenes.\n */\n public readonly shadows: boolean;\n /** Whether to apply the view's clip volume to the geometry in the scene.\n * Default: true, except when using [[fromJSON]].\n * @see [[ViewDetails.clipVector]] to define the view's clip volume.\n */\n public readonly clipVolume: boolean;\n /** Whether to display geometry of class [[GeometryClass.Construction]].\n * Default: false, except when using [[fromJSON]].\n */\n public readonly constructions: boolean;\n /** Whether to produce a monochrome image. Default: false.\n * @see [DisplayStyleSettings.monochromeColor]($common) to define the monochrome color.\n * @see [DisplayStyleSettings.monochromeMode]($common) to define how the monochrome image is produced.\n */\n public readonly monochrome: boolean;\n /** Whether to display background map imagery. Default: false.\n * @see [[DisplayStyleSettings.backgroundMap]] to customize the map settings.\n */\n public readonly backgroundMap: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[AmbientOcclusion]]. Default: false. */\n public readonly ambientOcclusion: boolean;\n /** Whether to apply [[ThematicDisplay]]. Default: false. */\n public readonly thematicDisplay: boolean;\n /** If true, overlay surfaces with wiremesh to reveal their triangulation. */\n public readonly wiremesh: boolean;\n /** Controls whether surface discard is always applied regardless of other ViewFlags.\n * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with\n * non-planar surfaces always draw in front of those non-planar surfaces.\n * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed),\n * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute.\n */\n public readonly forceSurfaceDiscard: boolean;\n /** Whether to apply white-on-white reversal.\n * Some CAD applications use this to cause white geometry to be drawn as black if the view's background color is white.\n * When enabled, the [[DisplayStyleSettings]]' [[WhiteOnWhiteReversalSettings]] control how white-on-white reversal is applied.\n * Default: true.\n */\n public readonly whiteOnWhiteReversal: boolean;\n\n /** In [[RenderMode.SmoothShade]], whether to apply lighting to surfaces.\n * Default: false, except when using [[fromJSON]].\n * @see [[DisplayStyleSettings.lights]] to customize the light settings.\n */\n public readonly lighting: boolean;\n\n /** Create a new ViewFlags.\n * @param flags The properties to initialize. Any properties not specified are initialized to their default values.\n */\n public constructor(flags?: Partial<ViewFlagsProperties>) {\n this.renderMode = flags?.renderMode ?? RenderMode.Wireframe;\n this.dimensions = flags?.dimensions ?? true;\n this.patterns = flags?.patterns ?? true;\n this.weights = flags?.weights ?? true;\n this.styles = flags?.styles ?? true;\n this.transparency = flags?.transparency ?? true;\n this.fill = flags?.fill ?? true;\n this.textures = flags?.textures ?? true;\n this.materials = flags?.materials ?? true;\n this.acsTriad = flags?.acsTriad ?? false;\n this.grid = flags?.grid ?? false;\n this.visibleEdges = flags?.visibleEdges ?? false;\n this.hiddenEdges = flags?.hiddenEdges ?? false;\n this.shadows = flags?.shadows ?? false;\n this.clipVolume = flags?.clipVolume ?? true;\n this.constructions = flags?.constructions ?? false;\n this.monochrome = flags?.monochrome ?? false;\n this.backgroundMap = flags?.backgroundMap ?? false;\n this.ambientOcclusion = flags?.ambientOcclusion ?? false;\n this.thematicDisplay = flags?.thematicDisplay ?? false;\n this.wiremesh = flags?.wiremesh ?? false;\n this.forceSurfaceDiscard = flags?.forceSurfaceDiscard ?? false;\n this.whiteOnWhiteReversal = flags?.whiteOnWhiteReversal ?? true;\n this.lighting = flags?.lighting ?? false;\n }\n\n /** Produce a copy of these ViewFlags with some modified properties. Any properties not explicitly specified by `changedFlags` will retain their current values.\n * @param changedFlags Properties to modify.\n * @returns A copy of these ViewFlags modified according to the supplied properties.\n * @note Any explicitly `undefined` property of `changedFlags` will be set to its default value in the returned ViewFlags.\n * @see [[override]] to have `undefined` properties retain their current values.\n */\n public copy(changedFlags: Partial<ViewFlagsProperties>): ViewFlags {\n return JsonUtils.isNonEmptyObject(changedFlags) ? new ViewFlags({ ...this, ...changedFlags }) : this;\n }\n\n /** Produce a copy of these ViewFlags, overriding some of its properties. Any properties not explicitly specified by `overrides` will retain their current values,\n * as will any property explicitly set to `undefined`.\n * @param overrides The properties to override.\n * @see [[copy]] to have `undefined` properties reset to their default values.\n */\n public override(overrides: Partial<ViewFlagsProperties>): ViewFlags {\n // This method can get called very frequently when a RenderTimeline script is applied to the view. Often `overrides` will be an empty object.\n // To optimize:\n // - Bail as quickly as possible if nothing is actually overridden, without allocating a new ViewFlags.\n // - Only make a copy of the input if at least one property is explicitly `undefined`.\n let copied = false;\n let anyOverridden = false;\n\n for (const propName of Object.keys(overrides)) {\n const key = propName as keyof Partial<ViewFlagsProperties>;\n const overrideValue = overrides[key];\n if (undefined === overrideValue) {\n if (!copied) {\n // Don't modify input...\n overrides = { ...overrides };\n copied = true;\n }\n\n // `undefined` means \"retain existing value\".\n delete overrides[key];\n } else if (overrideValue !== this[key]) {\n anyOverridden = true;\n }\n }\n\n return anyOverridden ? this.copy(overrides) : this;\n }\n\n /** Produce a copy of these ViewFlags with a single boolean property changed.\n * @param flag The name of the property.\n * @param value The value to change the property to.\n * @returns A new ViewFlags with the property changed as specified, or `this` if the property already has the specified value.\n * @see [[withRenderMode]] to change the [[renderMode]] property.\n * @see [[copy]] and [[override]] to change multiple properties.\n */\n public with(flag: keyof Omit<ViewFlagsProperties, \"renderMode\">, value: boolean): ViewFlags {\n if (this[flag] === value)\n return this;\n\n const props: ViewFlagsProperties = { ...this };\n props[flag] = value;\n return new ViewFlags(props);\n }\n\n /** Produce a copy of these ViewFlags with a different [[renderMode]].\n * @param renderMode The new render mode.\n * @returns A new ViewFlags with the render mode changed as specified, or `this` if the render mode is already set to the requested value.\n * @see [[copy]] and [[override]] to change multiple properties.\n */\n public withRenderMode(renderMode: RenderMode): ViewFlags {\n return renderMode === this.renderMode ? this : this.copy({ renderMode });\n }\n\n /** Adjust view flags for renderer.\n * @internal\n */\n public normalize(): ViewFlags {\n switch (this.renderMode) {\n case RenderMode.Wireframe:\n if (this.visibleEdges || this.hiddenEdges)\n return this.copy({ visibleEdges: false, hiddenEdges: false });\n break;\n case RenderMode.SmoothShade:\n if (!this.visibleEdges)\n return this.copy({ hiddenEdges: false });\n break;\n case RenderMode.HiddenLine:\n case RenderMode.SolidFill:\n if (!this.visibleEdges || this.transparency)\n return this.copy({ visibleEdges: true, transparency: false });\n break;\n }\n\n return this;\n }\n\n /** Returns true if edges that could be occluded by other geometry are visible for the current [[RenderMode]]. */\n public hiddenEdgesVisible(): boolean {\n switch (this.renderMode) {\n case RenderMode.SolidFill:\n case RenderMode.HiddenLine:\n return this.hiddenEdges;\n case RenderMode.SmoothShade:\n return this.visibleEdges && this.hiddenEdges;\n }\n return true;\n }\n\n /** Returns true if the edges of surfaces should be displayed, based on [[RenderMode]] and the [[visibleEdges]] flag. */\n public edgesRequired(): boolean {\n return edgesRequired(this.renderMode, this.visibleEdges);\n }\n\n /** Convert to JSON representation.\n * Properties are omitted if they match the default values.\n */\n public toJSON(): ViewFlagProps {\n const out: ViewFlagProps = {};\n if (!this.constructions)\n out.noConstruct = true;\n if (!this.dimensions)\n out.noDim = true;\n if (!this.patterns)\n out.noPattern = true;\n if (!this.weights)\n out.noWeight = true;\n if (!this.styles)\n out.noStyle = true;\n if (!this.transparency)\n out.noTransp = true;\n if (!this.fill)\n out.noFill = true;\n if (this.grid)\n out.grid = true;\n if (this.acsTriad)\n out.acs = true;\n if (!this.textures)\n out.noTexture = true;\n if (!this.materials)\n out.noMaterial = true;\n if (!this.lighting)\n out.noCameraLights = out.noSourceLights = out.noSolarLight = true;\n if (this.visibleEdges)\n out.visEdges = true;\n if (this.hiddenEdges)\n out.hidEdges = true;\n if (this.shadows)\n out.shadows = true;\n if (this.clipVolume)\n out.clipVol = true;\n if (this.monochrome)\n out.monochrome = true;\n if (this.backgroundMap)\n out.backgroundMap = true;\n if (this.ambientOcclusion)\n out.ambientOcclusion = true;\n if (this.thematicDisplay)\n out.thematicDisplay = true;\n if (this.wiremesh)\n out.wiremesh = true;\n if (this.forceSurfaceDiscard)\n out.forceSurfaceDiscard = true;\n if (!this.whiteOnWhiteReversal)\n out.noWhiteOnWhiteReversal = true;\n\n out.renderMode = this.renderMode;\n return out;\n }\n\n /** Like [[toJSON]], but no properties are omitted. */\n public toFullyDefinedJSON(): Required<ViewFlagProps> {\n return {\n renderMode: this.renderMode,\n noConstruct: !this.constructions,\n noDim: !this.dimensions,\n noPattern: !this.patterns,\n noWeight: !this.weights,\n noStyle: !this.styles,\n noTransp: !this.transparency,\n noFill: !this.fill,\n grid: this.grid,\n acs: this.acsTriad,\n noTexture: !this.textures,\n noMaterial: !this.materials,\n noCameraLights: !this.lighting,\n noSourceLights: !this.lighting,\n noSolarLight: !this.lighting,\n visEdges: this.visibleEdges,\n hidEdges: this.hiddenEdges,\n shadows: this.shadows,\n clipVol: this.clipVolume,\n monochrome: this.monochrome,\n backgroundMap: this.backgroundMap,\n ambientOcclusion: this.ambientOcclusion,\n thematicDisplay: this.thematicDisplay,\n wiremesh: this.wiremesh,\n forceSurfaceDiscard: this.forceSurfaceDiscard,\n noWhiteOnWhiteReversal: !this.whiteOnWhiteReversal,\n };\n }\n\n /** A ViewFlags object with all properties initialized to their default values. */\n public static readonly defaults = new ViewFlags();\n\n /** Create a ViewFlags.\n * @param flags The properties to initialize. Any properties not specified are initialized to their default values.\n */\n public static create(flags?: Partial<ViewFlagsProperties>): ViewFlags {\n return flags && !JsonUtils.isEmptyObject(flags) ? new ViewFlags(flags) : this.defaults;\n }\n\n /** Create a ViewFlags from its JSON representation.\n * @note As described in [[ViewFlagProps]], the JSON representation is awkward and error-prone. Prefer to use [[create]] unless you\n * need to deal with the persistence format directly.\n * @note The default values differ slightly from those used by the constructor and [[create]]:\n * - [[clipVolume]] defaults to false.\n * - [[constructions]] defaults to true.\n * - [[lighting]] defaults to true unless all of [[ViewFlagProps.noSolarLight]], [[ViewFlagProps.noCameraLights]], and [[ViewFlagProps.noSourceLights]] are true.\n */\n public static fromJSON(json?: ViewFlagProps): ViewFlags {\n if (!json)\n return this.defaults;\n\n let renderMode: RenderMode;\n const renderModeValue = JsonUtils.asInt(json.renderMode);\n if (renderModeValue < RenderMode.HiddenLine)\n renderMode = RenderMode.Wireframe;\n else if (renderModeValue > RenderMode.SolidFill)\n renderMode = RenderMode.SmoothShade;\n else\n renderMode = renderModeValue;\n\n const lighting = !JsonUtils.asBool(json.noCameraLights) || !JsonUtils.asBool(json.noSourceLights) || !JsonUtils.asBool(json.noSolarLight);\n return new ViewFlags({\n renderMode,\n lighting,\n constructions: !JsonUtils.asBool(json.noConstruct),\n dimensions: !JsonUtils.asBool(json.noDim),\n patterns: !JsonUtils.asBool(json.noPattern),\n weights: !JsonUtils.asBool(json.noWeight),\n styles: !JsonUtils.asBool(json.noStyle),\n transparency: !JsonUtils.asBool(json.noTransp),\n fill: !JsonUtils.asBool(json.noFill),\n grid: JsonUtils.asBool(json.grid),\n acsTriad: JsonUtils.asBool(json.acs),\n textures: !JsonUtils.asBool(json.noTexture),\n materials: !JsonUtils.asBool(json.noMaterial),\n visibleEdges: JsonUtils.asBool(json.visEdges),\n hiddenEdges: JsonUtils.asBool(json.hidEdges),\n shadows: JsonUtils.asBool(json.shadows),\n clipVolume: JsonUtils.asBool(json.clipVol),\n monochrome: JsonUtils.asBool(json.monochrome),\n backgroundMap: JsonUtils.asBool(json.backgroundMap),\n ambientOcclusion: JsonUtils.asBool(json.ambientOcclusion),\n thematicDisplay: JsonUtils.asBool(json.thematicDisplay),\n wiremesh: JsonUtils.asBool(json.wiremesh),\n forceSurfaceDiscard: JsonUtils.asBool(json.forceSurfaceDiscard),\n whiteOnWhiteReversal: !JsonUtils.asBool(json.noWhiteOnWhiteReversal),\n });\n }\n\n /** Returns true if `this` and `other` are equivalent. */\n public equals(other: Readonly<ViewFlagsProperties>): boolean {\n if (this === other)\n return true;\n\n return this.renderMode === other.renderMode\n && this.dimensions === other.dimensions\n && this.patterns === other.patterns\n && this.weights === other.weights\n && this.styles === other.styles\n && this.transparency === other.transparency\n && this.fill === other.fill\n && this.textures === other.textures\n && this.materials === other.materials\n && this.acsTriad === other.acsTriad\n && this.grid === other.grid\n && this.visibleEdges === other.visibleEdges\n && this.hiddenEdges === other.hiddenEdges\n && this.lighting === other.lighting\n && this.shadows === other.shadows\n && this.clipVolume === other.clipVolume\n && this.constructions === other.constructions\n && this.monochrome === other.monochrome\n && this.backgroundMap === other.backgroundMap\n && this.ambientOcclusion === other.ambientOcclusion\n && this.thematicDisplay === other.thematicDisplay\n && this.wiremesh === other.wiremesh\n && this.forceSurfaceDiscard === other.forceSurfaceDiscard\n && this.whiteOnWhiteReversal === other.whiteOnWhiteReversal;\n }\n}\n\n/** A type containing all of the properties of [[ViewFlags]] with none of the methods and with the `readonly` modifiers removed.\n * @see [[ViewFlags.create]], [[ViewFlags.copy]], and [[ViewFlags.override]] for methods accepting an object of this type.\n * @public\n * @extensions\n */\nexport type ViewFlagsProperties = Mutable<NonFunctionPropertiesOf<ViewFlags>>;\n\n/** A type that describes how to override selected properties of a [[ViewFlags]].\n * @see [[ViewFlags.override]] to apply the overrides to a ViewFlags object.\n * @public\n * @extensions\n */\nexport type ViewFlagOverrides = Partial<ViewFlagsProperties>;\n"]}
1
+ {"version":3,"file":"ViewFlags.js","sourceRoot":"","sources":["../../src/ViewFlags.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,qBAAqB;AAErB,OAAO,EAAE,SAAS,EAAoC,MAAM,qBAAqB,CAAC;AAElF;;;;GAIG;AACH,MAAM,C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K,CAAC,WAAW;eACtC,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;eAChC,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO;eAC9B,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;eACpC,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC1C,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;eACpC,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC1C,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,gBAAgB;eAChD,IAAI,CAAC,eAAe,KAAK,KAAK,CAAC,eAAe;eAC9C,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;eAChC,IAAI,CAAC,mBAAmB,KAAK,KAAK,CAAC,mBAAmB;eACtD,IAAI,CAAC,oBAAoB,KAAK,KAAK,CAAC,oBAAoB,CAAC;IAChE,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\n// cspell:ignore ovrs\n\nimport { JsonUtils, Mutable, NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\n\n/** Enumerates the available basic rendering modes, as part of a [DisplayStyle]($backend)'s [[ViewFlags]].\n * The rendering mode broadly affects various aspects of the display style - in particular, whether and how surfaces and their edges are drawn.\n * @public\n * @extensions\n */\nexport enum RenderMode {\n /** Renders only the edges of surfaces, with exceptions for planar regions based on their [[FillFlags]].\n * Lighting (and by extension, shadows) is not applied.\n * [[HiddenLine.Settings]] are not applied - edges use the elements' width, style, and color.\n * [[ViewFlags.hiddenEdges]] is ignored - hidden edges are never displayed in wireframe mode.\n */\n Wireframe = 0,\n /** By default, renders surfaces without their edges.\n * Lighting and shadows can be applied using [[ViewFlags.lighting]] and [[ViewFlags.shadows]].\n * Edges can be enabled using [[ViewFlags.visibleEdges]] and [[ViewFlags.hiddenEdges]], and their appearance customized using [[HiddenLine.Settings]].\n * Surfaces can be drawn with transparency, based on [[ViewFlags.transparency]].\n */\n SmoothShade = 6,\n /** Renders surfaces and their edges. By default, edges are drawn in white; this can be overridden using [[HiddenLine.Settings]].\n * All surfaces are rendered opaque. If a surface's transparency is below that specified by [[HiddenLine.Settings.transparencyThreshold]], it is not rendered.\n * Materials and textures are not applied - surfaces are drawn in their actual colors.\n * [[ViewFlags.visibleEdges]] is ignored - visible edges are always drawn. Hidden edges can be enabled using [[ViewFlags.hiddenEdges]].\n * Lighting (and by extension, shadows) is not applied.\n */\n SolidFill = 4,\n /** Identical to [[RenderMode.SolidFill]], except:\n * - Surfaces are drawn using the [DisplayStyle]($backend)'s background color.\n * - Edges are drawn using their surface's colors; this can be overridden using [[HiddenLine.Settings]].\n */\n HiddenLine = 3,\n}\n\n/** JSON representation of [[ViewFlags]].\n * This is a persistence format with some unfortunate quirks that have been retained for backwards compatibility.\n * In particular, it supplies three separate flags intended to control lighting - [[noCameraLights]], [[noSourceLights]], and [[noSolarLight]] -\n * but there exists only a single [[ViewFlags.lighting]] flag. [[ViewFlags.lighting]] is set to true unless all three of the \"no lighting\" flags are true.\n * It also uses awkward negative ([[noConstruct]], [[noTransp]]) and/or abbreviated ([[clipVol]], [[visEdges]]) property names that differ from\n * those of the corresponding [[ViewFlags]] properties, making usage of this type in code error-prone.\n * Prefer to use [[ViewFlagsProperties]] unless you need to work directly with the persistence format.\n * @public\n * @extensions\n */\nexport interface ViewFlagProps {\n /** If true, don't display geometry of class [[GeometryClass.Construction]]. */\n noConstruct?: boolean;\n /** If true, don't display geometry of class [[GeometryClass.Dimension]]. */\n noDim?: boolean;\n /** If true, don't display geometry of class [[GeometryClass.Pattern]]. */\n noPattern?: boolean;\n /** If true, all lines are drawn with a width of 1 pixel. */\n noWeight?: boolean;\n /** If true, don't apply [[LinePixels]] styles. */\n noStyle?: boolean;\n /** If true, display transparency geometry as opaque. */\n noTransp?: boolean;\n /** If true, don't show filled planar regions, unless they use [[FillFlags.Always]]. */\n noFill?: boolean;\n /** If true, display a grid in the view. */\n grid?: boolean;\n /** If true, display graphics representing the [AuxCoordSystem]($backend). */\n acs?: boolean;\n /** If true, don't apply [[RenderTexture]]s to surfaces. */\n noTexture?: boolean;\n /** If true, don't apply [[RenderMaterial]]s to surfaces. */\n noMaterial?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noCameraLights?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noSourceLights?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noSolarLight?: boolean;\n /** If true, display the edges of surfaces. */\n visEdges?: boolean;\n /** If true, display the edges of surfaces, even if they are behind other geometry. */\n hidEdges?: boolean;\n /** If true, display shadows. */\n shadows?: boolean;\n /** If true, apply the view's clipping volume. Has no effect on other types of clips like [[ModelClipGroups]]. */\n clipVol?: boolean;\n /** If true, apply the view's [[DisplayStyleSettings.monochromeColor]] and [[DisplayStyleSettings.monochromeMode]] to produce a monochrome image. */\n monochrome?: boolean;\n /** The basic rendering mode, which affects the behavior of other flags. */\n renderMode?: RenderMode;\n /** Display a background map. */\n backgroundMap?: boolean;\n /** If true, apply [[AmbientOcclusion]]. */\n ambientOcclusion?: boolean;\n /** If true, apply [[ThematicDisplay]]. */\n thematicDisplay?: boolean;\n /** If true, overlay surfaces with wiremesh to reveal their triangulation. */\n wiremesh?: boolean;\n /** Controls whether surface discard is always applied regardless of other ViewFlags.\n * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with\n * non-planar surfaces always draw in front of those non-planar surfaces.\n * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed),\n * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute.\n */\n forceSurfaceDiscard?: boolean;\n /** Disables the \"white-on-white reversal\" employed by some CAD applications.\n * @see [[ViewFlags.whiteOnWhiteReversal]].\n */\n noWhiteOnWhiteReversal?: boolean;\n}\n\nfunction edgesRequired(renderMode: RenderMode, visibleEdges: boolean): boolean {\n return visibleEdges || RenderMode.SmoothShade !== renderMode;\n}\n\n/** Flags controlling how graphics appear within a view.\n * A [[ViewFlags]] object is immutable. There are several ways to produce a modified copy of a ViewFlags object:\n * ```ts\n * // Start with the default values for all properties.\n * let vf = ViewFlags.defaults;\n * // Change a single boolean property:\n * vf = vf.with(\"visibleEdges\", true);\n * // Change only the render mode:\n * vf = vf.withRenderMode(RenderMode.HiddenLine);\n * // Change multiple properties:\n * vf = vf.copy({ renderMode: RenderMode.SmoothShade, visibleEdges: true });\n * // Reset multiple properties to their default values:\n * vf = vf.copy({ renderMode: undefined, visibleEdges: undefined });\n *\n * ```\n * [[with]] and [[withRenderMode]] should be preferred if you only need to change a single property, as they will not create a new object unless\n * the new value differs from the current value.\n * [[copy]] and [[override]] should be preferred if you need to change multiple properties, as they will create no more than one new object, vs\n * each call to [[with]] or [[withRenderMode]] potentially creating a new object.\n * @see [[DisplayStyleSettings.viewFlags]] to define the view flags for a [DisplayStyle]($backend).\n * @public\n */\nexport class ViewFlags {\n /** The basic rendering mode applied to the view. This modulates the behavior of some of the other flags.\n * Default: [[RenderMode.Wireframe]].\n * @see [[RenderMode]] for details.\n */\n public readonly renderMode: RenderMode;\n /** Whether to display geometry of class [[GeometryClass.Dimension]]. Default: true. */\n public readonly dimensions: boolean;\n /** Whether to display geometry of class [[GeometryClass.Pattern]]. Default: true. */\n public readonly patterns: boolean;\n /** Whether to allow lines and edges to draw with width greater than one pixel. Default: true. */\n public readonly weights: boolean;\n /** Whether [[LinePixels]] are allowed to apply patterns to lines and edges. If false, they all draw as solid lines. Default: true. */\n public readonly styles: boolean;\n /** Whether element transparency is applied. If false, transparent geometry is drawn opaque. Default: true.\n * @see [[RenderMode]] for render mode-specific behavior.\n */\n public readonly transparency: boolean;\n /** In [[RenderMode.Wireframe]] only, whether to display the interiors of planar regions with [[FillFlags.ByView]]. Default: true. */\n public readonly fill: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[RenderTexture]]s to surfaces. Default: true. */\n public readonly textures: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[RenderMaterial]]s to surfaces. Default: true. */\n public readonly materials: boolean;\n /** Whether to display a graphical representation of the view's [AuxCoordSystem]($backend). Default: false. */\n public readonly acsTriad: boolean;\n /** Whether to display a grid. Default: false. */\n public readonly grid: boolean;\n /** In [[RenderMode.SmoothShade]], whether to display the edges of surfaces. Default: false.\n * @see [[HiddenLine.Settings]] to customize the appearance of the edges.\n */\n public readonly visibleEdges: boolean;\n /** In any mode except [[RenderMode.Wireframe]], whether to display the edges of surfaces occluded by other geometry.\n * This has no effect unless [[visibleEdges]] is also true.\n * Default: false.\n * @see [[HiddenLine.Settings]] to customize the appearance of the edges.\n */\n public readonly hiddenEdges: boolean;\n /** In [[RenderMode.SmoothShade]], whether to display solar shadows. This has no effect unless [[lighting]] is also true. Default: false.\n * @note Rendering shadows can reduce framerate, particularly on less capable graphics hardware or in complex scenes.\n */\n public readonly shadows: boolean;\n /** Whether to apply the view's clip volume to the geometry in the scene.\n * Default: true, except when using [[fromJSON]].\n * @see [[ViewDetails.clipVector]] to define the view's clip volume.\n */\n public readonly clipVolume: boolean;\n /** Whether to display geometry of class [[GeometryClass.Construction]].\n * Default: false, except when using [[fromJSON]].\n */\n public readonly constructions: boolean;\n /** Whether to produce a monochrome image. Default: false.\n * @see [DisplayStyleSettings.monochromeColor]($common) to define the monochrome color.\n * @see [DisplayStyleSettings.monochromeMode]($common) to define how the monochrome image is produced.\n */\n public readonly monochrome: boolean;\n /** Whether to display background map imagery. Default: false.\n * @see [[DisplayStyleSettings.backgroundMap]] to customize the map settings.\n */\n public readonly backgroundMap: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[AmbientOcclusion]]. Default: false. */\n public readonly ambientOcclusion: boolean;\n /** Whether to apply [[ThematicDisplay]]. Default: false. */\n public readonly thematicDisplay: boolean;\n /** If true, overlay surfaces with wiremesh to reveal their triangulation. */\n public readonly wiremesh: boolean;\n /** Controls whether surface discard is always applied regardless of other ViewFlags.\n * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with\n * non-planar surfaces always draw in front of those non-planar surfaces.\n * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed),\n * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute.\n */\n public readonly forceSurfaceDiscard: boolean;\n /** Whether to apply white-on-white reversal.\n * Some CAD applications use this to cause white geometry to be drawn as black if the view's background color is white.\n * When enabled, the [[DisplayStyleSettings]]' [[WhiteOnWhiteReversalSettings]] control how white-on-white reversal is applied.\n * Default: true.\n */\n public readonly whiteOnWhiteReversal: boolean;\n\n /** In [[RenderMode.SmoothShade]], whether to apply lighting to surfaces.\n * Default: false, except when using [[fromJSON]].\n * @see [[DisplayStyleSettings.lights]] to customize the light settings.\n */\n public readonly lighting: boolean;\n\n /** Create a new ViewFlags.\n * @param flags The properties to initialize. Any properties not specified are initialized to their default values.\n */\n public constructor(flags?: Partial<ViewFlagsProperties>) {\n this.renderMode = flags?.renderMode ?? RenderMode.Wireframe;\n this.dimensions = flags?.dimensions ?? true;\n this.patterns = flags?.patterns ?? true;\n this.weights = flags?.weights ?? true;\n this.styles = flags?.styles ?? true;\n this.transparency = flags?.transparency ?? true;\n this.fill = flags?.fill ?? true;\n this.textures = flags?.textures ?? true;\n this.materials = flags?.materials ?? true;\n this.acsTriad = flags?.acsTriad ?? false;\n this.grid = flags?.grid ?? false;\n this.visibleEdges = flags?.visibleEdges ?? false;\n this.hiddenEdges = flags?.hiddenEdges ?? false;\n this.shadows = flags?.shadows ?? false;\n this.clipVolume = flags?.clipVolume ?? true;\n this.constructions = flags?.constructions ?? false;\n this.monochrome = flags?.monochrome ?? false;\n this.backgroundMap = flags?.backgroundMap ?? false;\n this.ambientOcclusion = flags?.ambientOcclusion ?? false;\n this.thematicDisplay = flags?.thematicDisplay ?? false;\n this.wiremesh = flags?.wiremesh ?? false;\n this.forceSurfaceDiscard = flags?.forceSurfaceDiscard ?? false;\n this.whiteOnWhiteReversal = flags?.whiteOnWhiteReversal ?? true;\n this.lighting = flags?.lighting ?? false;\n }\n\n /** Produce a copy of these ViewFlags with some modified properties. Any properties not explicitly specified by `changedFlags` will retain their current values.\n * @param changedFlags Properties to modify.\n * @returns A copy of these ViewFlags modified according to the supplied properties.\n * @note Any explicitly `undefined` property of `changedFlags` will be set to its default value in the returned ViewFlags.\n * @see [[override]] to have `undefined` properties retain their current values.\n */\n public copy(changedFlags: Partial<ViewFlagsProperties>): ViewFlags {\n return JsonUtils.isNonEmptyObject(changedFlags) ? new ViewFlags({ ...this, ...changedFlags }) : this;\n }\n\n /** Produce a copy of these ViewFlags, overriding some of its properties. Any properties not explicitly specified by `overrides` will retain their current values,\n * as will any property explicitly set to `undefined`.\n * @param overrides The properties to override.\n * @see [[copy]] to have `undefined` properties reset to their default values.\n */\n public override(overrides: Partial<ViewFlagsProperties>): ViewFlags {\n // This method can get called very frequently when a RenderTimeline script is applied to the view. Often `overrides` will be an empty object.\n // To optimize:\n // - Bail as quickly as possible if nothing is actually overridden, without allocating a new ViewFlags.\n // - Only make a copy of the input if at least one property is explicitly `undefined`.\n let copied = false;\n let anyOverridden = false;\n\n for (const propName of Object.keys(overrides)) {\n const key = propName as keyof Partial<ViewFlagsProperties>;\n const overrideValue = overrides[key];\n if (undefined === overrideValue) {\n if (!copied) {\n // Don't modify input...\n overrides = { ...overrides };\n copied = true;\n }\n\n // `undefined` means \"retain existing value\".\n delete overrides[key];\n } else if (overrideValue !== this[key]) {\n anyOverridden = true;\n }\n }\n\n return anyOverridden ? this.copy(overrides) : this;\n }\n\n /** Produce a copy of these ViewFlags with a single boolean property changed.\n * @param flag The name of the property.\n * @param value The value to change the property to.\n * @returns A new ViewFlags with the property changed as specified, or `this` if the property already has the specified value.\n * @see [[withRenderMode]] to change the [[renderMode]] property.\n * @see [[copy]] and [[override]] to change multiple properties.\n */\n public with(flag: keyof Omit<ViewFlagsProperties, \"renderMode\">, value: boolean): ViewFlags {\n if (this[flag] === value)\n return this;\n\n const props: ViewFlagsProperties = { ...this };\n props[flag] = value;\n return new ViewFlags(props);\n }\n\n /** Produce a copy of these ViewFlags with a different [[renderMode]].\n * @param renderMode The new render mode.\n * @returns A new ViewFlags with the render mode changed as specified, or `this` if the render mode is already set to the requested value.\n * @see [[copy]] and [[override]] to change multiple properties.\n */\n public withRenderMode(renderMode: RenderMode): ViewFlags {\n return renderMode === this.renderMode ? this : this.copy({ renderMode });\n }\n\n /** Adjust view flags for renderer.\n * @internal\n */\n public normalize(): ViewFlags {\n switch (this.renderMode) {\n case RenderMode.Wireframe:\n if (this.visibleEdges || this.hiddenEdges)\n return this.copy({ visibleEdges: false, hiddenEdges: false });\n break;\n case RenderMode.SmoothShade:\n if (!this.visibleEdges)\n return this.copy({ hiddenEdges: false });\n break;\n case RenderMode.HiddenLine:\n case RenderMode.SolidFill:\n if (!this.visibleEdges || this.transparency)\n return this.copy({ visibleEdges: true, transparency: false });\n break;\n }\n\n return this;\n }\n\n /** Returns true if edges that could be occluded by other geometry are visible for the current [[RenderMode]]. */\n public hiddenEdgesVisible(): boolean {\n switch (this.renderMode) {\n case RenderMode.SolidFill:\n case RenderMode.HiddenLine:\n return this.hiddenEdges;\n case RenderMode.SmoothShade:\n return this.visibleEdges && this.hiddenEdges;\n }\n return true;\n }\n\n /** Returns true if the edges of surfaces should be displayed, based on [[RenderMode]] and the [[visibleEdges]] flag. */\n public edgesRequired(): boolean {\n return edgesRequired(this.renderMode, this.visibleEdges);\n }\n\n /** Convert to JSON representation.\n * Properties are omitted if they match the default values.\n */\n public toJSON(): ViewFlagProps {\n const out: ViewFlagProps = {};\n if (!this.constructions)\n out.noConstruct = true;\n if (!this.dimensions)\n out.noDim = true;\n if (!this.patterns)\n out.noPattern = true;\n if (!this.weights)\n out.noWeight = true;\n if (!this.styles)\n out.noStyle = true;\n if (!this.transparency)\n out.noTransp = true;\n if (!this.fill)\n out.noFill = true;\n if (this.grid)\n out.grid = true;\n if (this.acsTriad)\n out.acs = true;\n if (!this.textures)\n out.noTexture = true;\n if (!this.materials)\n out.noMaterial = true;\n if (!this.lighting)\n out.noCameraLights = out.noSourceLights = out.noSolarLight = true;\n if (this.visibleEdges)\n out.visEdges = true;\n if (this.hiddenEdges)\n out.hidEdges = true;\n if (this.shadows)\n out.shadows = true;\n if (this.clipVolume)\n out.clipVol = true;\n if (this.monochrome)\n out.monochrome = true;\n if (this.backgroundMap)\n out.backgroundMap = true;\n if (this.ambientOcclusion)\n out.ambientOcclusion = true;\n if (this.thematicDisplay)\n out.thematicDisplay = true;\n if (this.wiremesh)\n out.wiremesh = true;\n if (this.forceSurfaceDiscard)\n out.forceSurfaceDiscard = true;\n if (!this.whiteOnWhiteReversal)\n out.noWhiteOnWhiteReversal = true;\n\n out.renderMode = this.renderMode;\n return out;\n }\n\n /** Like [[toJSON]], but no properties are omitted. */\n public toFullyDefinedJSON(): Required<ViewFlagProps> {\n return {\n renderMode: this.renderMode,\n noConstruct: !this.constructions,\n noDim: !this.dimensions,\n noPattern: !this.patterns,\n noWeight: !this.weights,\n noStyle: !this.styles,\n noTransp: !this.transparency,\n noFill: !this.fill,\n grid: this.grid,\n acs: this.acsTriad,\n noTexture: !this.textures,\n noMaterial: !this.materials,\n noCameraLights: !this.lighting,\n noSourceLights: !this.lighting,\n noSolarLight: !this.lighting,\n visEdges: this.visibleEdges,\n hidEdges: this.hiddenEdges,\n shadows: this.shadows,\n clipVol: this.clipVolume,\n monochrome: this.monochrome,\n backgroundMap: this.backgroundMap,\n ambientOcclusion: this.ambientOcclusion,\n thematicDisplay: this.thematicDisplay,\n wiremesh: this.wiremesh,\n forceSurfaceDiscard: this.forceSurfaceDiscard,\n noWhiteOnWhiteReversal: !this.whiteOnWhiteReversal,\n };\n }\n\n /** A ViewFlags object with all properties initialized to their default values. */\n public static readonly defaults = new ViewFlags();\n\n /** Create a ViewFlags.\n * @param flags The properties to initialize. Any properties not specified are initialized to their default values.\n */\n public static create(flags?: Partial<ViewFlagsProperties>): ViewFlags {\n return flags && !JsonUtils.isEmptyObject(flags) ? new ViewFlags(flags) : this.defaults;\n }\n\n /** Create a ViewFlags from its JSON representation.\n * @note As described in [[ViewFlagProps]], the JSON representation is awkward and error-prone. Prefer to use [[create]] unless you\n * need to deal with the persistence format directly.\n * @note The default values differ slightly from those used by the constructor and [[create]]:\n * - [[clipVolume]] defaults to false.\n * - [[constructions]] defaults to true.\n * - [[lighting]] defaults to true unless all of [[ViewFlagProps.noSolarLight]], [[ViewFlagProps.noCameraLights]], and [[ViewFlagProps.noSourceLights]] are true.\n */\n public static fromJSON(json?: ViewFlagProps): ViewFlags {\n if (!json)\n return this.defaults;\n\n let renderMode: RenderMode;\n const renderModeValue = JsonUtils.asInt(json.renderMode);\n if (renderModeValue < RenderMode.HiddenLine)\n renderMode = RenderMode.Wireframe;\n else if (renderModeValue > RenderMode.SolidFill)\n renderMode = RenderMode.SmoothShade;\n else\n renderMode = renderModeValue;\n\n const lighting = !JsonUtils.asBool(json.noCameraLights) || !JsonUtils.asBool(json.noSourceLights) || !JsonUtils.asBool(json.noSolarLight);\n return new ViewFlags({\n renderMode,\n lighting,\n constructions: !JsonUtils.asBool(json.noConstruct),\n dimensions: !JsonUtils.asBool(json.noDim),\n patterns: !JsonUtils.asBool(json.noPattern),\n weights: !JsonUtils.asBool(json.noWeight),\n styles: !JsonUtils.asBool(json.noStyle),\n transparency: !JsonUtils.asBool(json.noTransp),\n fill: !JsonUtils.asBool(json.noFill),\n grid: JsonUtils.asBool(json.grid),\n acsTriad: JsonUtils.asBool(json.acs),\n textures: !JsonUtils.asBool(json.noTexture),\n materials: !JsonUtils.asBool(json.noMaterial),\n visibleEdges: JsonUtils.asBool(json.visEdges),\n hiddenEdges: JsonUtils.asBool(json.hidEdges),\n shadows: JsonUtils.asBool(json.shadows),\n clipVolume: JsonUtils.asBool(json.clipVol),\n monochrome: JsonUtils.asBool(json.monochrome),\n backgroundMap: JsonUtils.asBool(json.backgroundMap),\n ambientOcclusion: JsonUtils.asBool(json.ambientOcclusion),\n thematicDisplay: JsonUtils.asBool(json.thematicDisplay),\n wiremesh: JsonUtils.asBool(json.wiremesh),\n forceSurfaceDiscard: JsonUtils.asBool(json.forceSurfaceDiscard),\n whiteOnWhiteReversal: !JsonUtils.asBool(json.noWhiteOnWhiteReversal),\n });\n }\n\n /** Returns true if `this` and `other` are equivalent. */\n public equals(other: Readonly<ViewFlagsProperties>): boolean {\n if (this === other)\n return true;\n\n return this.renderMode === other.renderMode\n && this.dimensions === other.dimensions\n && this.patterns === other.patterns\n && this.weights === other.weights\n && this.styles === other.styles\n && this.transparency === other.transparency\n && this.fill === other.fill\n && this.textures === other.textures\n && this.materials === other.materials\n && this.acsTriad === other.acsTriad\n && this.grid === other.grid\n && this.visibleEdges === other.visibleEdges\n && this.hiddenEdges === other.hiddenEdges\n && this.lighting === other.lighting\n && this.shadows === other.shadows\n && this.clipVolume === other.clipVolume\n && this.constructions === other.constructions\n && this.monochrome === other.monochrome\n && this.backgroundMap === other.backgroundMap\n && this.ambientOcclusion === other.ambientOcclusion\n && this.thematicDisplay === other.thematicDisplay\n && this.wiremesh === other.wiremesh\n && this.forceSurfaceDiscard === other.forceSurfaceDiscard\n && this.whiteOnWhiteReversal === other.whiteOnWhiteReversal;\n }\n}\n\n/** A type containing all of the properties of [[ViewFlags]] with none of the methods and with the `readonly` modifiers removed.\n * @see [[ViewFlags.create]], [[ViewFlags.copy]], and [[ViewFlags.override]] for methods accepting an object of this type.\n * @public\n * @extensions\n */\nexport type ViewFlagsProperties = Mutable<NonFunctionPropertiesOf<ViewFlags>>;\n\n/** A type that describes how to override selected properties of a [[ViewFlags]].\n * @see [[ViewFlags.override]] to apply the overrides to a ViewFlags object.\n * @public\n * @extensions\n */\nexport type ViewFlagOverrides = Partial<ViewFlagsProperties>;\n"]}
@@ -16,6 +16,8 @@ export class WhiteOnWhiteReversalSettings {
16
16
  constructor(ignoreBackground) {
17
17
  this.ignoreBackgroundColor = ignoreBackground;
18
18
  }
19
+ static { this._noIgnore = new WhiteOnWhiteReversalSettings(true); }
20
+ static { this._ignore = new WhiteOnWhiteReversalSettings(false); }
19
21
  /** Create from JSON representation. */
20
22
  static fromJSON(props) {
21
23
  return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;
@@ -29,6 +31,4 @@ export class WhiteOnWhiteReversalSettings {
29
31
  return this === other;
30
32
  }
31
33
  }
32
- WhiteOnWhiteReversalSettings._noIgnore = new WhiteOnWhiteReversalSettings(true);
33
- WhiteOnWhiteReversalSettings._ignore = new WhiteOnWhiteReversalSettings(false);
34
34
  //# sourceMappingURL=WhiteOnWhiteReversalSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WhiteOnWhiteReversalSettings.js","sourceRoot":"","sources":["../../src/WhiteOnWhiteReversalSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IAOvC,YAAoB,gBAAyB;QAC3C,IAAI,CAAC,qBAAqB,GAAG,gBAAgB,CAAC;IAChD,CAAC;IAKD,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,OAAO,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED,mHAAmH;IAC5G,MAAM;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,uDAAuD;IAChD,MAAM,CAAC,KAAmC;QAC/C,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,CAAC;;AAhBc,sCAAS,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;AACnD,oCAAO,GAAG,IAAI,4BAA4B,CAAC,KAAK,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\n/** JSON representation of a [[WhiteOnWhiteReversalSettings]].\n * @public\n * @extensions\n */\nexport interface WhiteOnWhiteReversalProps {\n /** Default: false.\n * @see [[WhiteOnWhiteReversalSettings.ignoreBackgroundColor]].\n */\n ignoreBackgroundColor?: boolean;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more\n * visible in the view.\n * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.\n * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.\n * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.\n * @public\n */\nexport class WhiteOnWhiteReversalSettings {\n /** If true, white-on-white reversal ignores the display style's background color; otherwise, white-on-white reversal applies only\n * if the background color is pure white.\n * @see [[DisplayStyleSettings.backgroundColor]] to change the background color.\n */\n public readonly ignoreBackgroundColor: boolean;\n\n private constructor(ignoreBackground: boolean) {\n this.ignoreBackgroundColor = ignoreBackground;\n }\n\n private static _noIgnore = new WhiteOnWhiteReversalSettings(true);\n private static _ignore = new WhiteOnWhiteReversalSettings(false);\n\n /** Create from JSON representation. */\n public static fromJSON(props?: WhiteOnWhiteReversalProps): WhiteOnWhiteReversalSettings {\n return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;\n }\n\n /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */\n public toJSON(): WhiteOnWhiteReversalProps | undefined {\n return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: WhiteOnWhiteReversalSettings): boolean {\n return this === other;\n }\n}\n"]}
1
+ {"version":3,"file":"WhiteOnWhiteReversalSettings.js","sourceRoot":"","sources":["../../src/WhiteOnWhiteReversalSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IAOvC,YAAoB,gBAAyB;QAC3C,IAAI,CAAC,qBAAqB,GAAG,gBAAgB,CAAC;IAChD,CAAC;aAEc,cAAS,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;aACnD,YAAO,GAAG,IAAI,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAEjE,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,OAAO,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED,mHAAmH;IAC5G,MAAM;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,uDAAuD;IAChD,MAAM,CAAC,KAAmC;QAC/C,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,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\n/** JSON representation of a [[WhiteOnWhiteReversalSettings]].\n * @public\n * @extensions\n */\nexport interface WhiteOnWhiteReversalProps {\n /** Default: false.\n * @see [[WhiteOnWhiteReversalSettings.ignoreBackgroundColor]].\n */\n ignoreBackgroundColor?: boolean;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more\n * visible in the view.\n * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.\n * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.\n * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.\n * @public\n */\nexport class WhiteOnWhiteReversalSettings {\n /** If true, white-on-white reversal ignores the display style's background color; otherwise, white-on-white reversal applies only\n * if the background color is pure white.\n * @see [[DisplayStyleSettings.backgroundColor]] to change the background color.\n */\n public readonly ignoreBackgroundColor: boolean;\n\n private constructor(ignoreBackground: boolean) {\n this.ignoreBackgroundColor = ignoreBackground;\n }\n\n private static _noIgnore = new WhiteOnWhiteReversalSettings(true);\n private static _ignore = new WhiteOnWhiteReversalSettings(false);\n\n /** Create from JSON representation. */\n public static fromJSON(props?: WhiteOnWhiteReversalProps): WhiteOnWhiteReversalSettings {\n return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;\n }\n\n /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */\n public toJSON(): WhiteOnWhiteReversalProps | undefined {\n return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: WhiteOnWhiteReversalSettings): boolean {\n return this === other;\n }\n}\n"]}
@@ -12,6 +12,25 @@
12
12
  * @beta
13
13
  */
14
14
  export class TextStyleSettings {
15
+ /** A fully-populated JSON representation of the default settings. */
16
+ static { this.defaultProps = {
17
+ color: "subcategory",
18
+ fontName: "",
19
+ lineHeight: 1,
20
+ lineSpacingFactor: 0.5,
21
+ isBold: false,
22
+ isItalic: false,
23
+ isUnderlined: false,
24
+ stackedFractionScale: 0.7,
25
+ stackedFractionType: "horizontal",
26
+ subScriptOffsetFactor: -0.15,
27
+ subScriptScale: 2 / 3,
28
+ superScriptOffsetFactor: 0.5,
29
+ superScriptScale: 2 / 3,
30
+ widthFactor: 1,
31
+ }; }
32
+ /** Settings initialized to all default values. */
33
+ static { this.defaults = new TextStyleSettings({}); }
15
34
  constructor(props, defaults) {
16
35
  if (!defaults) {
17
36
  defaults = TextStyleSettings.defaultProps;
@@ -51,25 +70,6 @@ export class TextStyleSettings {
51
70
  && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale;
52
71
  }
53
72
  }
54
- /** A fully-populated JSON representation of the default settings. */
55
- TextStyleSettings.defaultProps = {
56
- color: "subcategory",
57
- fontName: "",
58
- lineHeight: 1,
59
- lineSpacingFactor: 0.5,
60
- isBold: false,
61
- isItalic: false,
62
- isUnderlined: false,
63
- stackedFractionScale: 0.7,
64
- stackedFractionType: "horizontal",
65
- subScriptOffsetFactor: -0.15,
66
- subScriptScale: 2 / 3,
67
- superScriptOffsetFactor: 0.5,
68
- superScriptScale: 2 / 3,
69
- widthFactor: 1,
70
- };
71
- /** Settings initialized to all default values. */
72
- TextStyleSettings.defaults = new TextStyleSettings({});
73
73
  Object.freeze(TextStyleSettings.defaultProps);
74
74
  Object.freeze(TextStyleSettings.defaults);
75
75
  /** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).