@itwin/core-common 3.6.0-dev.8 → 4.0.0-dev.2

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 (355) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/LICENSE.md +1 -1
  3. package/lib/cjs/AuthorizationClient.d.ts +9 -3
  4. package/lib/cjs/AuthorizationClient.d.ts.map +1 -1
  5. package/lib/cjs/AuthorizationClient.js.map +1 -1
  6. package/lib/cjs/BackendTypes.d.ts +3 -3
  7. package/lib/cjs/BackendTypes.d.ts.map +1 -1
  8. package/lib/cjs/BackendTypes.js.map +1 -1
  9. package/lib/cjs/BackgroundMapSettings.d.ts +2 -2
  10. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  11. package/lib/cjs/CloudStorage.d.ts +5 -5
  12. package/lib/cjs/CloudStorage.js +3 -3
  13. package/lib/cjs/CloudStorage.js.map +1 -1
  14. package/lib/cjs/CloudStorageTileCache.d.ts +1 -1
  15. package/lib/cjs/CloudStorageTileCache.js +1 -1
  16. package/lib/cjs/CloudStorageTileCache.js.map +1 -1
  17. package/lib/cjs/Code.d.ts +31 -10
  18. package/lib/cjs/Code.d.ts.map +1 -1
  19. package/lib/cjs/Code.js +17 -29
  20. package/lib/cjs/Code.js.map +1 -1
  21. package/lib/cjs/ContextRealityModel.d.ts +30 -3
  22. package/lib/cjs/ContextRealityModel.d.ts.map +1 -1
  23. package/lib/cjs/ContextRealityModel.js +23 -8
  24. package/lib/cjs/ContextRealityModel.js.map +1 -1
  25. package/lib/cjs/DisplayStyleSettings.d.ts +4 -0
  26. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  27. package/lib/cjs/DisplayStyleSettings.js +5 -1
  28. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  29. package/lib/cjs/ElementMesh.js +2 -2
  30. package/lib/cjs/ElementMesh.js.map +1 -1
  31. package/lib/cjs/ElementProps.d.ts +5 -1
  32. package/lib/cjs/ElementProps.d.ts.map +1 -1
  33. package/lib/cjs/ElementProps.js.map +1 -1
  34. package/lib/cjs/EntityProps.d.ts +2 -1
  35. package/lib/cjs/EntityProps.d.ts.map +1 -1
  36. package/lib/cjs/EntityProps.js +1 -0
  37. package/lib/cjs/EntityProps.js.map +1 -1
  38. package/lib/cjs/FeatureSymbology.d.ts +3 -3
  39. package/lib/cjs/FeatureSymbology.js +3 -3
  40. package/lib/cjs/FeatureSymbology.js.map +1 -1
  41. package/lib/cjs/IModel.d.ts +1 -1
  42. package/lib/cjs/IModel.js.map +1 -1
  43. package/lib/cjs/IModelError.d.ts +10 -4
  44. package/lib/cjs/IModelError.d.ts.map +1 -1
  45. package/lib/cjs/IModelError.js +3 -4
  46. package/lib/cjs/IModelError.js.map +1 -1
  47. package/lib/cjs/Localization.d.ts +1 -1
  48. package/lib/cjs/Localization.d.ts.map +1 -1
  49. package/lib/cjs/Localization.js +8 -1
  50. package/lib/cjs/Localization.js.map +1 -1
  51. package/lib/cjs/MaterialProps.d.ts +42 -7
  52. package/lib/cjs/MaterialProps.d.ts.map +1 -1
  53. package/lib/cjs/MaterialProps.js +13 -1
  54. package/lib/cjs/MaterialProps.js.map +1 -1
  55. package/lib/cjs/RealityModelDisplaySettings.d.ts +65 -0
  56. package/lib/cjs/RealityModelDisplaySettings.d.ts.map +1 -1
  57. package/lib/cjs/RealityModelDisplaySettings.js +30 -2
  58. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  59. package/lib/cjs/RenderMaterial.d.ts +1 -1
  60. package/lib/cjs/RenderMaterial.d.ts.map +1 -1
  61. package/lib/cjs/RenderMaterial.js +1 -1
  62. package/lib/cjs/RenderMaterial.js.map +1 -1
  63. package/lib/cjs/RenderTexture.d.ts +1 -1
  64. package/lib/cjs/RenderTexture.js +1 -1
  65. package/lib/cjs/RenderTexture.js.map +1 -1
  66. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  67. package/lib/cjs/RpcInterface.js.map +1 -1
  68. package/lib/cjs/RpcManager.d.ts.map +1 -1
  69. package/lib/cjs/RpcManager.js.map +1 -1
  70. package/lib/cjs/TerrainSettings.d.ts +1 -1
  71. package/lib/cjs/TerrainSettings.js.map +1 -1
  72. package/lib/cjs/TextureMapping.d.ts +5 -3
  73. package/lib/cjs/TextureMapping.d.ts.map +1 -1
  74. package/lib/cjs/TextureMapping.js.map +1 -1
  75. package/lib/cjs/ViewFlags.d.ts +2 -6
  76. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  77. package/lib/cjs/ViewFlags.js.map +1 -1
  78. package/lib/cjs/ViewProps.d.ts +2 -2
  79. package/lib/cjs/ViewProps.d.ts.map +1 -1
  80. package/lib/cjs/ViewProps.js.map +1 -1
  81. package/lib/cjs/core-common.d.ts +0 -1
  82. package/lib/cjs/core-common.d.ts.map +1 -1
  83. package/lib/cjs/core-common.js +0 -1
  84. package/lib/cjs/core-common.js.map +1 -1
  85. package/lib/cjs/geometry/BoundingSphere.d.ts +15 -2
  86. package/lib/cjs/geometry/BoundingSphere.d.ts.map +1 -1
  87. package/lib/cjs/geometry/BoundingSphere.js +18 -4
  88. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  89. package/lib/cjs/geometry/FrustumPlanes.d.ts +59 -10
  90. package/lib/cjs/geometry/FrustumPlanes.d.ts.map +1 -1
  91. package/lib/cjs/geometry/FrustumPlanes.js +94 -33
  92. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  93. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  94. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +1 -1
  95. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  96. package/lib/cjs/rpc/IModelReadRpcInterface.js +12 -12
  97. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  98. package/lib/cjs/rpc/IModelTileRpcInterface.d.ts +2 -2
  99. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  100. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  101. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  102. package/lib/cjs/rpc/TestRpcManager.d.ts.map +1 -1
  103. package/lib/cjs/rpc/TestRpcManager.js +1 -0
  104. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  105. package/lib/cjs/rpc/WipRpcInterface.js.map +1 -1
  106. package/lib/cjs/rpc/core/RpcConfiguration.d.ts.map +1 -1
  107. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  108. package/lib/cjs/rpc/core/RpcConstants.d.ts +6 -1
  109. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  110. package/lib/cjs/rpc/core/RpcConstants.js +7 -1
  111. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  112. package/lib/cjs/rpc/core/RpcControl.d.ts.map +1 -1
  113. package/lib/cjs/rpc/core/RpcControl.js +1 -0
  114. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  115. package/lib/cjs/rpc/core/RpcInvocation.d.ts.map +1 -1
  116. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  117. package/lib/cjs/rpc/core/RpcOperation.d.ts.map +1 -1
  118. package/lib/cjs/rpc/core/RpcOperation.js +1 -0
  119. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  120. package/lib/cjs/rpc/core/RpcPendingQueue.d.ts.map +1 -1
  121. package/lib/cjs/rpc/core/RpcPendingQueue.js +1 -0
  122. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  123. package/lib/cjs/rpc/core/RpcProtocol.d.ts.map +1 -1
  124. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  125. package/lib/cjs/rpc/core/RpcPush.d.ts.map +1 -1
  126. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  127. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  128. package/lib/cjs/rpc/core/RpcRegistry.js +1 -0
  129. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  130. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  131. package/lib/cjs/rpc/core/RpcRequest.js +1 -0
  132. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  133. package/lib/cjs/rpc/core/RpcRequestContext.d.ts.map +1 -1
  134. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  135. package/lib/cjs/rpc/core/RpcRoutingToken.d.ts.map +1 -1
  136. package/lib/cjs/rpc/core/RpcRoutingToken.js +1 -0
  137. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  138. package/lib/cjs/rpc/core/RpcSessionInvocation.d.ts.map +1 -1
  139. package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -0
  140. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  141. package/lib/cjs/rpc/web/BentleyCloudRpcManager.d.ts.map +1 -1
  142. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  143. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  144. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +1 -0
  145. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  146. package/lib/cjs/rpc/web/OpenAPI.d.ts +1 -0
  147. package/lib/cjs/rpc/web/OpenAPI.d.ts.map +1 -1
  148. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  149. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  150. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -0
  151. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  152. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +2 -0
  153. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  154. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  155. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  156. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  157. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  158. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +1 -0
  159. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  160. package/lib/cjs/tile/B3dmTileIO.js +5 -5
  161. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  162. package/lib/cjs/tile/CompositeTileIO.js +2 -2
  163. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  164. package/lib/cjs/tile/GltfTileIO.js +5 -5
  165. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  166. package/lib/cjs/tile/I3dmTileIO.js +6 -6
  167. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  168. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  169. package/lib/cjs/tile/IModelTileIO.js +12 -12
  170. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  171. package/lib/cjs/tile/PntsTileIO.js +5 -5
  172. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  173. package/lib/cjs/tile/TileIO.js +3 -3
  174. package/lib/cjs/tile/TileIO.js.map +1 -1
  175. package/lib/esm/AuthorizationClient.d.ts +9 -3
  176. package/lib/esm/AuthorizationClient.d.ts.map +1 -1
  177. package/lib/esm/AuthorizationClient.js.map +1 -1
  178. package/lib/esm/BackendTypes.d.ts +3 -3
  179. package/lib/esm/BackendTypes.d.ts.map +1 -1
  180. package/lib/esm/BackendTypes.js.map +1 -1
  181. package/lib/esm/BackgroundMapSettings.d.ts +2 -2
  182. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  183. package/lib/esm/CloudStorage.d.ts +5 -5
  184. package/lib/esm/CloudStorage.js +3 -3
  185. package/lib/esm/CloudStorage.js.map +1 -1
  186. package/lib/esm/CloudStorageTileCache.d.ts +1 -1
  187. package/lib/esm/CloudStorageTileCache.js +1 -1
  188. package/lib/esm/CloudStorageTileCache.js.map +1 -1
  189. package/lib/esm/Code.d.ts +31 -10
  190. package/lib/esm/Code.d.ts.map +1 -1
  191. package/lib/esm/Code.js +17 -29
  192. package/lib/esm/Code.js.map +1 -1
  193. package/lib/esm/ContextRealityModel.d.ts +30 -3
  194. package/lib/esm/ContextRealityModel.d.ts.map +1 -1
  195. package/lib/esm/ContextRealityModel.js +23 -8
  196. package/lib/esm/ContextRealityModel.js.map +1 -1
  197. package/lib/esm/DisplayStyleSettings.d.ts +4 -0
  198. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  199. package/lib/esm/DisplayStyleSettings.js +5 -1
  200. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  201. package/lib/esm/ElementMesh.js +2 -2
  202. package/lib/esm/ElementMesh.js.map +1 -1
  203. package/lib/esm/ElementProps.d.ts +5 -1
  204. package/lib/esm/ElementProps.d.ts.map +1 -1
  205. package/lib/esm/ElementProps.js.map +1 -1
  206. package/lib/esm/EntityProps.d.ts +2 -1
  207. package/lib/esm/EntityProps.d.ts.map +1 -1
  208. package/lib/esm/EntityProps.js +1 -0
  209. package/lib/esm/EntityProps.js.map +1 -1
  210. package/lib/esm/FeatureSymbology.d.ts +3 -3
  211. package/lib/esm/FeatureSymbology.js +3 -3
  212. package/lib/esm/FeatureSymbology.js.map +1 -1
  213. package/lib/esm/IModel.d.ts +1 -1
  214. package/lib/esm/IModel.js.map +1 -1
  215. package/lib/esm/IModelError.d.ts +10 -4
  216. package/lib/esm/IModelError.d.ts.map +1 -1
  217. package/lib/esm/IModelError.js +3 -2
  218. package/lib/esm/IModelError.js.map +1 -1
  219. package/lib/esm/Localization.d.ts +1 -1
  220. package/lib/esm/Localization.d.ts.map +1 -1
  221. package/lib/esm/Localization.js +8 -1
  222. package/lib/esm/Localization.js.map +1 -1
  223. package/lib/esm/MaterialProps.d.ts +42 -7
  224. package/lib/esm/MaterialProps.d.ts.map +1 -1
  225. package/lib/esm/MaterialProps.js +12 -0
  226. package/lib/esm/MaterialProps.js.map +1 -1
  227. package/lib/esm/RealityModelDisplaySettings.d.ts +65 -0
  228. package/lib/esm/RealityModelDisplaySettings.d.ts.map +1 -1
  229. package/lib/esm/RealityModelDisplaySettings.js +30 -2
  230. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  231. package/lib/esm/RenderMaterial.d.ts +1 -1
  232. package/lib/esm/RenderMaterial.d.ts.map +1 -1
  233. package/lib/esm/RenderMaterial.js +1 -1
  234. package/lib/esm/RenderMaterial.js.map +1 -1
  235. package/lib/esm/RenderTexture.d.ts +1 -1
  236. package/lib/esm/RenderTexture.js +1 -1
  237. package/lib/esm/RenderTexture.js.map +1 -1
  238. package/lib/esm/RpcInterface.d.ts.map +1 -1
  239. package/lib/esm/RpcInterface.js.map +1 -1
  240. package/lib/esm/RpcManager.d.ts.map +1 -1
  241. package/lib/esm/RpcManager.js.map +1 -1
  242. package/lib/esm/TerrainSettings.d.ts +1 -1
  243. package/lib/esm/TerrainSettings.js.map +1 -1
  244. package/lib/esm/TextureMapping.d.ts +5 -3
  245. package/lib/esm/TextureMapping.d.ts.map +1 -1
  246. package/lib/esm/TextureMapping.js.map +1 -1
  247. package/lib/esm/ViewFlags.d.ts +2 -6
  248. package/lib/esm/ViewFlags.d.ts.map +1 -1
  249. package/lib/esm/ViewFlags.js.map +1 -1
  250. package/lib/esm/ViewProps.d.ts +2 -2
  251. package/lib/esm/ViewProps.d.ts.map +1 -1
  252. package/lib/esm/ViewProps.js.map +1 -1
  253. package/lib/esm/core-common.d.ts +0 -1
  254. package/lib/esm/core-common.d.ts.map +1 -1
  255. package/lib/esm/core-common.js +0 -1
  256. package/lib/esm/core-common.js.map +1 -1
  257. package/lib/esm/geometry/BoundingSphere.d.ts +15 -2
  258. package/lib/esm/geometry/BoundingSphere.d.ts.map +1 -1
  259. package/lib/esm/geometry/BoundingSphere.js +18 -4
  260. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  261. package/lib/esm/geometry/FrustumPlanes.d.ts +59 -10
  262. package/lib/esm/geometry/FrustumPlanes.d.ts.map +1 -1
  263. package/lib/esm/geometry/FrustumPlanes.js +94 -33
  264. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  265. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  266. package/lib/esm/rpc/IModelReadRpcInterface.d.ts +1 -1
  267. package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  268. package/lib/esm/rpc/IModelReadRpcInterface.js +12 -12
  269. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  270. package/lib/esm/rpc/IModelTileRpcInterface.d.ts +2 -2
  271. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  272. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  273. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  274. package/lib/esm/rpc/TestRpcManager.d.ts.map +1 -1
  275. package/lib/esm/rpc/TestRpcManager.js +1 -0
  276. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  277. package/lib/esm/rpc/WipRpcInterface.js.map +1 -1
  278. package/lib/esm/rpc/core/RpcConfiguration.d.ts.map +1 -1
  279. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  280. package/lib/esm/rpc/core/RpcConstants.d.ts +6 -1
  281. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  282. package/lib/esm/rpc/core/RpcConstants.js +7 -1
  283. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  284. package/lib/esm/rpc/core/RpcControl.d.ts.map +1 -1
  285. package/lib/esm/rpc/core/RpcControl.js +1 -0
  286. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  287. package/lib/esm/rpc/core/RpcInvocation.d.ts.map +1 -1
  288. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  289. package/lib/esm/rpc/core/RpcOperation.d.ts.map +1 -1
  290. package/lib/esm/rpc/core/RpcOperation.js +1 -0
  291. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  292. package/lib/esm/rpc/core/RpcPendingQueue.d.ts.map +1 -1
  293. package/lib/esm/rpc/core/RpcPendingQueue.js +1 -0
  294. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  295. package/lib/esm/rpc/core/RpcProtocol.d.ts.map +1 -1
  296. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  297. package/lib/esm/rpc/core/RpcPush.d.ts.map +1 -1
  298. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  299. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  300. package/lib/esm/rpc/core/RpcRegistry.js +1 -0
  301. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  302. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  303. package/lib/esm/rpc/core/RpcRequest.js +1 -0
  304. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  305. package/lib/esm/rpc/core/RpcRequestContext.d.ts.map +1 -1
  306. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  307. package/lib/esm/rpc/core/RpcRoutingToken.d.ts.map +1 -1
  308. package/lib/esm/rpc/core/RpcRoutingToken.js +1 -0
  309. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  310. package/lib/esm/rpc/core/RpcSessionInvocation.d.ts.map +1 -1
  311. package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -0
  312. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  313. package/lib/esm/rpc/web/BentleyCloudRpcManager.d.ts.map +1 -1
  314. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  315. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  316. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +1 -0
  317. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  318. package/lib/esm/rpc/web/OpenAPI.d.ts +1 -0
  319. package/lib/esm/rpc/web/OpenAPI.d.ts.map +1 -1
  320. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  321. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  322. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -0
  323. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  324. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +2 -0
  325. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  326. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  327. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  328. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  329. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  330. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +1 -0
  331. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  332. package/lib/esm/tile/B3dmTileIO.js +5 -5
  333. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  334. package/lib/esm/tile/CompositeTileIO.js +2 -2
  335. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  336. package/lib/esm/tile/GltfTileIO.js +5 -5
  337. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  338. package/lib/esm/tile/I3dmTileIO.js +6 -6
  339. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  340. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  341. package/lib/esm/tile/IModelTileIO.js +12 -12
  342. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  343. package/lib/esm/tile/PntsTileIO.js +5 -5
  344. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  345. package/lib/esm/tile/TileIO.js +3 -3
  346. package/lib/esm/tile/TileIO.js.map +1 -1
  347. package/package.json +7 -7
  348. package/lib/cjs/FeatureGates.d.ts +0 -32
  349. package/lib/cjs/FeatureGates.d.ts.map +0 -1
  350. package/lib/cjs/FeatureGates.js +0 -56
  351. package/lib/cjs/FeatureGates.js.map +0 -1
  352. package/lib/esm/FeatureGates.d.ts +0 -32
  353. package/lib/esm/FeatureGates.d.ts.map +0 -1
  354. package/lib/esm/FeatureGates.js +0 -52
  355. package/lib/esm/FeatureGates.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAG6B;AAE7B,oDAAoM;AAA3L,6GAAA,aAAa,OAAA;AAAE,4GAAA,YAAY,OAAA;AAAE,4GAAA,YAAY,OAAA;AAAE,+GAAA,eAAe,OAAA;AAAoC,wGAAA,QAAQ,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AAAE,+GAAA,eAAe,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AAEtK;;GAEG;AACH,MAAa,WAAY,SAAQ,2BAAY;IAC3C,YAAmB,WAAyI,EAAE,OAAe,EAAE,WAAiC;QAC9M,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAJD,kCAIC;AAED,cAAc;AACd,MAAa,WAAY,SAAQ,WAAW;IAC1C,YAAmB,WAAmB,EAAE,OAAe;QACrD,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,WAAW,GAAG,CAAC;IAC9C,CAAC;CACF;AALD,kCAKC;AAED,cAAc;AACd,MAAa,kBAAmB,SAAQ,WAAW;IACjD,YAAmB,OAAe;QAChC,KAAK,CAAC,2BAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AALD,gDAKC;AAED,cAAc;AACd,MAAa,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAAiC;QACtG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AALD,oCAKC;AAED;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,WAAW;IACrD,YAAmB,OAAe,EAAE,WAAiC;QACnE,KAAK,CAAC,+BAAgB,CAAC,0BAA0B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3E,CAAC;CACF;AAJD,wDAIC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,2BAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF;AAJD,wCAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport {\r\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, GetMetaDataFunction, IModelStatus, RepositoryStatus,\r\n RpcInterfaceStatus,\r\n} from \"@itwin/core-bentley\";\r\n\r\nexport { BentleyStatus, BentleyError, IModelStatus, BriefcaseStatus, GetMetaDataFunction, LogFunction, DbResult, RepositoryStatus, ChangeSetStatus, RpcInterfaceStatus } from \"@itwin/core-bentley\";\r\n\r\n/** The error type thrown by this module. See [[IModelStatus]] for `errorNumber` values.\r\n * @public\r\n */\r\nexport class IModelError extends BentleyError {\r\n public constructor(errorNumber: number | IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | RepositoryStatus | ChangeSetStatus | RpcInterfaceStatus, message: string, getMetaData?: GetMetaDataFunction) {\r\n super(errorNumber, message, getMetaData);\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class ServerError extends IModelError {\r\n public constructor(errorNumber: number, message: string) {\r\n super(errorNumber, message);\r\n this.name = `Server error (${errorNumber})`;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class ServerTimeoutError extends ServerError {\r\n public constructor(message: string) {\r\n super(IModelStatus.ServerTimeout, message);\r\n this.name = \"Server timeout error\";\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class BackendError extends IModelError {\r\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: GetMetaDataFunction) {\r\n super(errorNumber, message, getMetaData);\r\n this.name = name;\r\n }\r\n}\r\n\r\n/**\r\n * Channel constraint error\r\n * @alpha\r\n */\r\nexport class ChannelConstraintError extends IModelError {\r\n public constructor(message: string, getMetaData?: GetMetaDataFunction) {\r\n super(RepositoryStatus.ChannelConstraintViolation, message, getMetaData);\r\n }\r\n}\r\n\r\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\r\n * @public\r\n */\r\nexport class NoContentError extends IModelError {\r\n public constructor() {\r\n super(IModelStatus.NoContent, \"No Content\");\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAE7B,oDAE6B;AAD3B,6GAAA,aAAa,OAAA;AAAE,4GAAA,YAAY,OAAA;AAAE,4GAAA,YAAY,OAAA;AAAE,+GAAA,eAAe,OAAA;AAAoC,wGAAA,QAAQ,OAAA;AAAE,+GAAA,eAAe,OAAA;AASzH;;;GAGG;AACH,MAAa,WAAY,SAAQ,2BAAY;IAC3C,YAAmB,WAAuC,EAAE,OAAe,EAAE,WAAiC;QAC5G,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAJD,kCAIC;AAED,cAAc;AACd,MAAa,WAAY,SAAQ,WAAW;IAC1C,YAAmB,WAAmB,EAAE,OAAe;QACrD,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,WAAW,GAAG,CAAC;IAC9C,CAAC;CACF;AALD,kCAKC;AAED,cAAc;AACd,MAAa,kBAAmB,SAAQ,WAAW;IACjD,YAAmB,OAAe;QAChC,KAAK,CAAC,2BAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AALD,gDAKC;AAED,cAAc;AACd,MAAa,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAAiC;QACtG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AALD,oCAKC;AAED;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,WAAW;IACrD,YAAmB,OAAe,EAAE,WAAiC;QACnE,KAAK,CAAC,+BAAgB,CAAC,0BAA0B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3E,CAAC;CACF;AAJD,wDAIC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,2BAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF;AAJD,wCAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport {\r\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, GetMetaDataFunction, IModelStatus, RepositoryStatus,\r\n} from \"@itwin/core-bentley\";\r\n\r\nexport {\r\n BentleyStatus, BentleyError, IModelStatus, BriefcaseStatus, GetMetaDataFunction, LogFunction, DbResult, ChangeSetStatus,\r\n} from \"@itwin/core-bentley\";\r\n\r\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\r\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\r\n * @public\r\n */\r\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\r\n\r\n/** The error type thrown by this module.\r\n * @see [[IModelErrorNumber]] for commonly-used error codes.\r\n * @public\r\n */\r\nexport class IModelError extends BentleyError {\r\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: GetMetaDataFunction) {\r\n super(errorNumber, message, getMetaData);\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class ServerError extends IModelError {\r\n public constructor(errorNumber: number, message: string) {\r\n super(errorNumber, message);\r\n this.name = `Server error (${errorNumber})`;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class ServerTimeoutError extends ServerError {\r\n public constructor(message: string) {\r\n super(IModelStatus.ServerTimeout, message);\r\n this.name = \"Server timeout error\";\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class BackendError extends IModelError {\r\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: GetMetaDataFunction) {\r\n super(errorNumber, message, getMetaData);\r\n this.name = name;\r\n }\r\n}\r\n\r\n/**\r\n * Channel constraint error\r\n * @alpha\r\n */\r\nexport class ChannelConstraintError extends IModelError {\r\n public constructor(message: string, getMetaData?: GetMetaDataFunction) {\r\n super(RepositoryStatus.ChannelConstraintViolation, message, getMetaData);\r\n }\r\n}\r\n\r\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\r\n * @public\r\n */\r\nexport class NoContentError extends IModelError {\r\n public constructor() {\r\n super(IModelStatus.NoContent, \"No Content\");\r\n }\r\n}\r\n"]}
@@ -58,7 +58,7 @@ export interface Localization {
58
58
  * @param key - the key that matches a property in the JSON localization file.
59
59
  * @returns The string corresponding to the first key that resolves.
60
60
  * @throws Error if no keys resolve to a string.
61
- * @deprecated Use `getLocalizedString` instead; providing either a key with a namespace `<namespace>:<key>` or
61
+ * @deprecated in 3.x. Use `getLocalizedString` instead; providing either a key with a namespace `<namespace>:<key>` or
62
62
  * including `{ ns: <namespace> }` in the options.
63
63
  */
64
64
  getLocalizedStringWithNamespace(namespace: string, key: string | string[], options?: TranslationOptions): string;
@@ -1 +1 @@
1
- {"version":3,"file":"Localization.d.ts","sourceRoot":"","sources":["../../src/Localization.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC;IACjF;;;;;;;OAOG;IACH,+BAA+B,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC;IACjH,wCAAwC;IACxC,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC;IAClG;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAE9C;;;;;;;OAOG;IACH,i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D;AAED;;GAEG;AACH,qBAAa,iBAAkB,YAAW,YAAY;IACvC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IACjC,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IAQlD,+BAA+B,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IACnF,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IACpE,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IACvC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IACxC,mBAAmB,IAAI,IAAI;IAC3B,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS;IAChD,eAAe,IAAI,SAAS,MAAM,EAAE;IAC9B,cAAc;CAC5B"}
@@ -13,7 +13,14 @@ exports.EmptyLocalization = void 0;
13
13
  */
14
14
  class EmptyLocalization {
15
15
  async initialize() { }
16
- getLocalizedString(key) { return typeof (key) == "string" ? key : key[0]; }
16
+ getLocalizedString(key) {
17
+ if (typeof (key) !== "string") {
18
+ key = key[0];
19
+ }
20
+ // Simulate correct and simple usage of i18next's translation function
21
+ // Namely, remove the leading namespace substring if there is one
22
+ return key.split(":", 2).pop();
23
+ }
17
24
  getLocalizedStringWithNamespace(_namespace, key) { return this.getLocalizedString(key); }
18
25
  getEnglishString(_namespace, key) { return this.getLocalizedString(key); }
19
26
  getLocalizedKeys(inputString) { return inputString; }
@@ -1 +1 @@
1
- {"version":3,"file":"Localization.js","sourceRoot":"","sources":["../../src/Localization.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqGH;;GAEG;AACH,MAAa,iBAAiB;IACrB,KAAK,CAAC,UAAU,KAAoB,CAAC;IACrC,kBAAkB,CAAC,GAAsB,IAAY,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,+BAA+B,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5H,gBAAgB,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,gBAAgB,CAAC,WAAmB,IAAY,OAAO,WAAW,CAAC,CAAC,CAAC;IACrE,KAAK,CAAC,iBAAiB,KAAoB,CAAC;IAC5C,mBAAmB,KAAW,CAAC;IAC/B,mBAAmB,KAAgC,OAAO,SAAS,CAAC,CAAC,CAAC;IACtE,eAAe,KAAwB,OAAO,EAAE,CAAC,CAAC,CAAC;IACnD,KAAK,CAAC,cAAc,KAAK,CAAC;CAClC;AAXD,8CAWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\n/** Options for Localization\r\n * @public\r\n */\r\nexport interface TranslationOptions {\r\n /** for interpolation values */\r\n [key: string]: any;\r\n /**\r\n * defaultValue to return if a translation was not found\r\n */\r\n defaultValue?: any;\r\n /**\r\n * count value used for plurals\r\n */\r\n count?: number;\r\n /**\r\n * used for contexts (eg. male\\female)\r\n */\r\n context?: any;\r\n /**\r\n * override languages to use\r\n */\r\n lngs?: string[];\r\n /**\r\n * override language to lookup key if not found see fallbacks for details\r\n */\r\n fallbackLng?: string;\r\n}\r\n\r\n/** The interface defining the localization requirements of [IModelApp]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Localization {\r\n /** This method must be called and awaited before using an instance of Localization.\r\n * @param namespaces an array of namespaces to load. There must be at least one namespace, and it\r\n * becomes the default namespace.\r\n * @note IModelApp.startup calls this internally, so you should not call this method directly\r\n * except for Localization instances outside of IModelApp (e.g., for tests.)\r\n */\r\n initialize(namespaces: string[]): Promise<void>;\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n */\r\n getLocalizedString(key: string | string[], options?: TranslationOptions): string;\r\n /** Similar to `getLocalizedString` but the namespace is a separate param and the key does not include the namespace.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @deprecated Use `getLocalizedString` instead; providing either a key with a namespace `<namespace>:<key>` or\r\n * including `{ ns: <namespace> }` in the options.\r\n */\r\n getLocalizedStringWithNamespace(namespace: string, key: string | string[], options?: TranslationOptions): string;\r\n /** get the English string for a key. */\r\n getEnglishString(namespace: string, key: string | string[], options?: TranslationOptions): string;\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * getLocalizedKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n */\r\n getLocalizedKeys(inputString: string): string;\r\n\r\n /** Register a new Namespace and return a Promise that is fulfilled when the content is loaded.\r\n * If the namespace is already registered, its Promise will be returned.\r\n * @param name - the name of the namespace.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of returned Promise.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n */\r\n registerNamespace(namespace: string): Promise<void>;\r\n /** @internal */\r\n unregisterNamespace(namespace: string): void;\r\n /** @internal */\r\n getNamespacePromise(name: string): Promise<void> | undefined;\r\n /** Get the list of available languages for translations */\r\n getLanguageList(): readonly string[];\r\n /** Change the language for translations. This overrides the language from the browser, for tests. */\r\n changeLanguage(language: string): Promise<void>;\r\n}\r\n\r\n/** An empty [[Localization]] used if one is not provided to [IModelApp]($frontend). Does not perform localizations (merely returns the key.)\r\n * @public\r\n */\r\nexport class EmptyLocalization implements Localization {\r\n public async initialize(): Promise<void> { }\r\n public getLocalizedString(key: string | string[]): string { return typeof (key) == \"string\" ? key : key[0]; }\r\n public getLocalizedStringWithNamespace(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getEnglishString(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getLocalizedKeys(inputString: string): string { return inputString; }\r\n public async registerNamespace(): Promise<void> { }\r\n public unregisterNamespace(): void { }\r\n public getNamespacePromise(): Promise<void> | undefined { return undefined; }\r\n public getLanguageList(): readonly string[] { return []; }\r\n public async changeLanguage() { }\r\n}\r\n"]}
1
+ {"version":3,"file":"Localization.js","sourceRoot":"","sources":["../../src/Localization.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqGH;;GAEG;AACH,MAAa,iBAAiB;IACrB,KAAK,CAAC,UAAU,KAAoB,CAAC;IACrC,kBAAkB,CAAC,GAAsB;QAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YAC7B,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;SACd;QACD,sEAAsE;QACtE,iEAAiE;QACjE,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,EAAG,CAAC;IAClC,CAAC;IACM,+BAA+B,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5H,gBAAgB,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,gBAAgB,CAAC,WAAmB,IAAY,OAAO,WAAW,CAAC,CAAC,CAAC;IACrE,KAAK,CAAC,iBAAiB,KAAoB,CAAC;IAC5C,mBAAmB,KAAW,CAAC;IAC/B,mBAAmB,KAAgC,OAAO,SAAS,CAAC,CAAC,CAAC;IACtE,eAAe,KAAwB,OAAO,EAAE,CAAC,CAAC,CAAC;IACnD,KAAK,CAAC,cAAc,KAAK,CAAC;CAClC;AAlBD,8CAkBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\n/** Options for Localization\r\n * @public\r\n */\r\nexport interface TranslationOptions {\r\n /** for interpolation values */\r\n [key: string]: any;\r\n /**\r\n * defaultValue to return if a translation was not found\r\n */\r\n defaultValue?: any;\r\n /**\r\n * count value used for plurals\r\n */\r\n count?: number;\r\n /**\r\n * used for contexts (eg. male\\female)\r\n */\r\n context?: any;\r\n /**\r\n * override languages to use\r\n */\r\n lngs?: string[];\r\n /**\r\n * override language to lookup key if not found see fallbacks for details\r\n */\r\n fallbackLng?: string;\r\n}\r\n\r\n/** The interface defining the localization requirements of [IModelApp]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Localization {\r\n /** This method must be called and awaited before using an instance of Localization.\r\n * @param namespaces an array of namespaces to load. There must be at least one namespace, and it\r\n * becomes the default namespace.\r\n * @note IModelApp.startup calls this internally, so you should not call this method directly\r\n * except for Localization instances outside of IModelApp (e.g., for tests.)\r\n */\r\n initialize(namespaces: string[]): Promise<void>;\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n */\r\n getLocalizedString(key: string | string[], options?: TranslationOptions): string;\r\n /** Similar to `getLocalizedString` but the namespace is a separate param and the key does not include the namespace.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @deprecated in 3.x. Use `getLocalizedString` instead; providing either a key with a namespace `<namespace>:<key>` or\r\n * including `{ ns: <namespace> }` in the options.\r\n */\r\n getLocalizedStringWithNamespace(namespace: string, key: string | string[], options?: TranslationOptions): string;\r\n /** get the English string for a key. */\r\n getEnglishString(namespace: string, key: string | string[], options?: TranslationOptions): string;\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * getLocalizedKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n */\r\n getLocalizedKeys(inputString: string): string;\r\n\r\n /** Register a new Namespace and return a Promise that is fulfilled when the content is loaded.\r\n * If the namespace is already registered, its Promise will be returned.\r\n * @param name - the name of the namespace.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of returned Promise.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n */\r\n registerNamespace(namespace: string): Promise<void>;\r\n /** @internal */\r\n unregisterNamespace(namespace: string): void;\r\n /** @internal */\r\n getNamespacePromise(name: string): Promise<void> | undefined;\r\n /** Get the list of available languages for translations */\r\n getLanguageList(): readonly string[];\r\n /** Change the language for translations. This overrides the language from the browser, for tests. */\r\n changeLanguage(language: string): Promise<void>;\r\n}\r\n\r\n/** An empty [[Localization]] used if one is not provided to [IModelApp]($frontend). Does not perform localizations (merely returns the key.)\r\n * @public\r\n */\r\nexport class EmptyLocalization implements Localization {\r\n public async initialize(): Promise<void> { }\r\n public getLocalizedString(key: string | string[]): string {\r\n if (typeof (key) !== \"string\") {\r\n key = key[0];\r\n }\r\n // Simulate correct and simple usage of i18next's translation function\r\n // Namely, remove the leading namespace substring if there is one\r\n return key.split(\":\", 2).pop()!;\r\n }\r\n public getLocalizedStringWithNamespace(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getEnglishString(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getLocalizedKeys(inputString: string): string { return inputString; }\r\n public async registerNamespace(): Promise<void> { }\r\n public unregisterNamespace(): void { }\r\n public getNamespacePromise(): Promise<void> | undefined { return undefined; }\r\n public getLanguageList(): readonly string[] { return []; }\r\n public async changeLanguage() { }\r\n}\r\n"]}
@@ -30,6 +30,7 @@ export declare enum TextureMapUnits {
30
30
  Inches = 6
31
31
  }
32
32
  /** As part of a [[RenderMaterialAssetProps]], describes how to map a [[RenderTexture]]'s image to the triangles of a mesh to which the material is applied.
33
+ * @see [[RenderMaterialAssetMapsProps]] for the supported types of texture mappings.
33
34
  * @public
34
35
  * @extensions
35
36
  */
@@ -53,7 +54,42 @@ export interface TextureMapProps {
53
54
  /** The Id of the persistent [Texture]($backend) element defining the texture image. */
54
55
  TextureId: Id64String;
55
56
  }
57
+ /** Flags applied to a [[NormalMapProps]]. The enum values can be combined using bitwise operators.
58
+ * @public
59
+ */
60
+ export declare enum NormalMapFlags {
61
+ /** No special flags. */
62
+ None = 0,
63
+ /** Indicates that the Y component of each vector - stored in the texture's green channel - points upward along the positive Y axis and should
64
+ * be negated. By default it points downward.
65
+ */
66
+ GreenUp = 1
67
+ }
68
+ /** Describes how to apply [normal mapping](https://en.wikipedia.org/wiki/Normal_mapping) to a surface material.
69
+ * @see [[RenderMaterialAssetMapsProps.Normal]] to define a normal map for a [[RenderMaterialAssetProps]].
70
+ * @public
71
+ */
72
+ export interface NormalMapProps extends TextureMapProps {
73
+ /** Flags controlling how the normal map is applied. Default: [[NormalMapFlags.None]]. */
74
+ NormalFlags?: NormalMapFlags;
75
+ }
76
+ /** Describes different types of textures to be applied to a surface material to alter its appearance.
77
+ * @note While technically both [[Pattern]] and [[Normal]] can define their own mapping parameters (`pattern_angle`, `pattern_mapping`, etc), in practice
78
+ * if both maps are present they are expected to have identical mapping parameters, with the exception of `TextureId`.
79
+ * @see [[RenderMaterialAssetProps.Map]] to define the texture maps for a material asset.
80
+ * @public
81
+ */
82
+ export interface RenderMaterialAssetMapsProps {
83
+ /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */
84
+ Pattern?: TextureMapProps;
85
+ /** Maps a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to the surface, simulating more complex surface details than are
86
+ * present in the surface's geometry.
87
+ */
88
+ Normal?: NormalMapProps;
89
+ }
56
90
  /** Describes the graphical properties of a [RenderMaterialElement]($backend) as part of a [[RenderMaterialProps]].
91
+ * This representation is used to persist the material properties into the [IModelDb]($backend), but is unwieldy and verbose.
92
+ * @see [RenderMaterialElementParams]($backend) for a somewhat more ergonomic representation.
57
93
  * @public
58
94
  * @extensions
59
95
  */
@@ -68,7 +104,7 @@ export interface RenderMaterialAssetProps {
68
104
  specular_color?: RgbFactorProps;
69
105
  /** If true, this material has a specular exponent; if undefined, defaults to false */
70
106
  HasFinish?: boolean;
71
- /** Specular exponent (surface shininess); range is 0 to 128; if undefined, defaults to 15.0 * 0.9 */
107
+ /** Specular exponent (surface shininess); range is 0 to 128; if undefined, defaults to 13.5 */
72
108
  finish?: number;
73
109
  /** If true, this material has surface transparency; if undefined, defaults to false */
74
110
  HasTransmit?: boolean;
@@ -90,13 +126,12 @@ export interface RenderMaterialAssetProps {
90
126
  HasReflectColor?: boolean;
91
127
  /** Surface reflectance color; if undefined, defaults to black */
92
128
  reflect_color?: RgbFactorProps;
93
- /** An optional set of texture maps associated with this material.
94
- * A large variety of map types may be present (e.g., bump maps, specular maps, fur, etc), but currently only the pattern map is used.
129
+ /** A scale by which to multiply the components of the normals read from [[Map.Normal]], if a normal map is defined.
130
+ * Default: 1.0
95
131
  */
96
- Map?: {
97
- /** Optional pattern map. */
98
- Pattern?: TextureMapProps;
99
- };
132
+ pbr_normal?: number;
133
+ /** An optional set of texture maps associated with this material. */
134
+ Map?: RenderMaterialAssetMapsProps;
100
135
  }
101
136
  /** Properties that define a [RenderMaterialElement]($backend).
102
137
  * @see [[RenderMaterial]] for the representation used by the display system.
@@ -1 +1 @@
1
- {"version":3,"file":"MaterialProps.d.ts","sourceRoot":"","sources":["../../src/MaterialProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;GAKG;AACH,oBAAY,cAAc,GAAG,MAAM,EAAE,CAAC;AAEtC;;;;GAIG;AACH,oBAAY,YAAY,GAAG,MAAM,EAAE,CAAC;AAEpC;;;GAGG;AACH,oBAAY,eAAe;IACzB,wCAAwC;IACxC,QAAQ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AAmG;IACnG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sJAAsJ;IACtJ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yGAAyG;IACzG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+HAA+H;IAC/H,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8JAA8J;IAC9J,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iEAAiE;IACjE,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,GAAG,CAAC,EAAE,4BAA4B,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IACjE,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE;QACf,2EAA2E;QAC3E,cAAc,CAAC,EAAE;YACf,iEAAiE;YACjE,cAAc,CAAC,EAAE,wBAAwB,CAAC;SAC3C,CAAC;KACH,CAAC;CACH"}
@@ -7,7 +7,7 @@
7
7
  * @module Rendering
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.TextureMapUnits = void 0;
10
+ exports.NormalMapFlags = exports.TextureMapUnits = void 0;
11
11
  /** Describes the units in which a [[TextureMapProps]]' scale is expressed.
12
12
  * @public
13
13
  * @extensions
@@ -21,4 +21,16 @@ var TextureMapUnits;
21
21
  TextureMapUnits[TextureMapUnits["Feet"] = 5] = "Feet";
22
22
  TextureMapUnits[TextureMapUnits["Inches"] = 6] = "Inches";
23
23
  })(TextureMapUnits = exports.TextureMapUnits || (exports.TextureMapUnits = {}));
24
+ /** Flags applied to a [[NormalMapProps]]. The enum values can be combined using bitwise operators.
25
+ * @public
26
+ */
27
+ var NormalMapFlags;
28
+ (function (NormalMapFlags) {
29
+ /** No special flags. */
30
+ NormalMapFlags[NormalMapFlags["None"] = 0] = "None";
31
+ /** Indicates that the Y component of each vector - stored in the texture's green channel - points upward along the positive Y axis and should
32
+ * be negated. By default it points downward.
33
+ */
34
+ NormalMapFlags[NormalMapFlags["GreenUp"] = 1] = "GreenUp";
35
+ })(NormalMapFlags = exports.NormalMapFlags || (exports.NormalMapFlags = {}));
24
36
  //# sourceMappingURL=MaterialProps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MaterialProps.js","sourceRoot":"","sources":["../../src/MaterialProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqBH;;;GAGG;AACH,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wCAAwC;IACxC,6DAAY,CAAA;IACZ,yDAAU,CAAA;IACV,mEAAe,CAAA;IACf,qDAAQ,CAAA;IACR,yDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAO1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { DefinitionElementProps } from \"./ElementProps\";\r\nimport { TextureMapping } from \"./TextureMapping\";\r\n\r\n/** Describes a color as an array of three numbers ranging from 0 to 1 where the first entry corresponds to the color's red component,\r\n * the second to green, and the third to blue.\r\n * @see usage in [[RenderMaterialAssetProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type RgbFactorProps = number[];\r\n\r\n/** A 2d point specified as an array of 2 numbers [x, y].\r\n * @see usage in [[TextureMapProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type Point2dProps = number[];\r\n\r\n/** Describes the units in which a [[TextureMapProps]]' scale is expressed.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum TextureMapUnits {\r\n /** Indicates the scale has no units. */\r\n Relative = 0,\r\n Meters = 3,\r\n Millimeters = 4,\r\n Feet = 5,\r\n Inches = 6,\r\n}\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** As part of a [[RenderMaterialAssetProps]], describes how to map a [[RenderTexture]]'s image to the triangles of a mesh to which the material is applied.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextureMapProps {\r\n /** Angle in degrees to rotate texture when applying; defaults to 0.0 if undefined */\r\n pattern_angle?: number;\r\n /** If true, flip the pattern map in U; if undefined, defaults to false */\r\n pattern_u_flip?: boolean;\r\n /** If true, flip the pattern map in V; if undefined, defaults to false */\r\n pattern_flip?: boolean;\r\n /** X, Y scale to apply to the pattern map; if undefined, defaults to {0,0}, which is almost never useful. */\r\n pattern_scale?: Point2dProps;\r\n /** X, Y offset to apply to the pattern map; if undefined, defaults to {0,0} */\r\n pattern_offset?: Point2dProps;\r\n /** Units to use when applying the scaling; if undefined, defaults to [[TextureMapUnits.Relative]] */\r\n pattern_scalemode?: TextureMapUnits;\r\n /** Mapping mode to use for the texture application; if undefined, defaults to [[TextureMapping.Mode.Parametric]] */\r\n pattern_mapping?: TextureMapping.Mode;\r\n /** Weight at which to combine diffuse image and color; if undefined, defaults to 1.0 */\r\n pattern_weight?: number;\r\n /** The Id of the persistent [Texture]($backend) element defining the texture image. */\r\n TextureId: Id64String;\r\n}\r\n\r\n/** Describes the graphical properties of a [RenderMaterialElement]($backend) as part of a [[RenderMaterialProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderMaterialAssetProps {\r\n /** If true, this material has a fill/diffuse color; if undefined, defaults to false */\r\n HasBaseColor?: boolean;\r\n /** Surface color used for fill or diffuse illumination; if undefined, defaults to black */\r\n color?: RgbFactorProps;\r\n /** If true, this material has a specular color; if undefined, defaults to false */\r\n HasSpecularColor?: boolean;\r\n /** Surface color used for specular illumination; if undefined, defaults to black */\r\n specular_color?: RgbFactorProps;\r\n /** If true, this material has a specular exponent; if undefined, defaults to false */\r\n HasFinish?: boolean;\r\n /** Specular exponent (surface shininess); range is 0 to 128; if undefined, defaults to 15.0 * 0.9 */\r\n finish?: number;\r\n /** If true, this material has surface transparency; if undefined, defaults to false */\r\n HasTransmit?: boolean;\r\n /** Surface transparency; if undefined, defaults to 0.0 */\r\n transmit?: number;\r\n /** If true, this material has a value for diffuse reflectivity; if undefined, defaults to false */\r\n HasDiffuse?: boolean;\r\n /** Surface diffuse reflectivity; if undefined, defaults to 0.6 */\r\n diffuse?: number;\r\n /** If true, this material has a value for specular reflectivity; if undefined, defaults to false. If false, specular value is actually set to 0.0 */\r\n HasSpecular?: boolean;\r\n /** Surface specular reflectivity; if undefined, defaults to 0.4 */\r\n specular?: number;\r\n /** If true, this material has a value for environmental reflectivity; if undefined, defaults to false */\r\n HasReflect?: boolean;\r\n /** Surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined defaults to 0.0 */\r\n reflect?: number;\r\n /** If true, this material has a surface reflectance color; if undefined, defaults to false. If false, reflectance color is actually set to specular color */\r\n HasReflectColor?: boolean;\r\n /** Surface reflectance color; if undefined, defaults to black */\r\n reflect_color?: RgbFactorProps;\r\n /** An optional set of texture maps associated with this material.\r\n * A large variety of map types may be present (e.g., bump maps, specular maps, fur, etc), but currently only the pattern map is used.\r\n */\r\n Map?: {\r\n /** Optional pattern map. */\r\n Pattern?: TextureMapProps;\r\n };\r\n}\r\n\r\n/** Properties that define a [RenderMaterialElement]($backend).\r\n * @see [[RenderMaterial]] for the representation used by the display system.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderMaterialProps extends DefinitionElementProps {\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n paletteName: string;\r\n /** An optional description of the material. */\r\n description?: string;\r\n jsonProperties?: {\r\n /** A container for various \"assets\" describing aspects of the material. */\r\n materialAssets?: {\r\n /** Properties of the material describing how it is displayed. */\r\n renderMaterial?: RenderMaterialAssetProps;\r\n };\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"MaterialProps.js","sourceRoot":"","sources":["../../src/MaterialProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqBH;;;GAGG;AACH,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wCAAwC;IACxC,6DAAY,CAAA;IACZ,yDAAU,CAAA;IACV,mEAAe,CAAA;IACf,qDAAQ,CAAA;IACR,yDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAO1B;AA8BD;;GAEG;AACH,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,wBAAwB;IACxB,mDAAQ,CAAA;IACR;;OAEG;IACH,yDAAgB,CAAA;AAClB,CAAC,EAPW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAOzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { DefinitionElementProps } from \"./ElementProps\";\r\nimport { TextureMapping } from \"./TextureMapping\";\r\n\r\n/** Describes a color as an array of three numbers ranging from 0 to 1 where the first entry corresponds to the color's red component,\r\n * the second to green, and the third to blue.\r\n * @see usage in [[RenderMaterialAssetProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type RgbFactorProps = number[];\r\n\r\n/** A 2d point specified as an array of 2 numbers [x, y].\r\n * @see usage in [[TextureMapProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type Point2dProps = number[];\r\n\r\n/** Describes the units in which a [[TextureMapProps]]' scale is expressed.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum TextureMapUnits {\r\n /** Indicates the scale has no units. */\r\n Relative = 0,\r\n Meters = 3,\r\n Millimeters = 4,\r\n Feet = 5,\r\n Inches = 6,\r\n}\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** As part of a [[RenderMaterialAssetProps]], describes how to map a [[RenderTexture]]'s image to the triangles of a mesh to which the material is applied.\r\n * @see [[RenderMaterialAssetMapsProps]] for the supported types of texture mappings.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextureMapProps {\r\n /** Angle in degrees to rotate texture when applying; defaults to 0.0 if undefined */\r\n pattern_angle?: number;\r\n /** If true, flip the pattern map in U; if undefined, defaults to false */\r\n pattern_u_flip?: boolean;\r\n /** If true, flip the pattern map in V; if undefined, defaults to false */\r\n pattern_flip?: boolean;\r\n /** X, Y scale to apply to the pattern map; if undefined, defaults to {0,0}, which is almost never useful. */\r\n pattern_scale?: Point2dProps;\r\n /** X, Y offset to apply to the pattern map; if undefined, defaults to {0,0} */\r\n pattern_offset?: Point2dProps;\r\n /** Units to use when applying the scaling; if undefined, defaults to [[TextureMapUnits.Relative]] */\r\n pattern_scalemode?: TextureMapUnits;\r\n /** Mapping mode to use for the texture application; if undefined, defaults to [[TextureMapping.Mode.Parametric]] */\r\n pattern_mapping?: TextureMapping.Mode;\r\n /** Weight at which to combine diffuse image and color; if undefined, defaults to 1.0 */\r\n pattern_weight?: number;\r\n /** The Id of the persistent [Texture]($backend) element defining the texture image. */\r\n TextureId: Id64String;\r\n}\r\n\r\n/** Flags applied to a [[NormalMapProps]]. The enum values can be combined using bitwise operators.\r\n * @public\r\n */\r\nexport enum NormalMapFlags {\r\n /** No special flags. */\r\n None = 0,\r\n /** Indicates that the Y component of each vector - stored in the texture's green channel - points upward along the positive Y axis and should\r\n * be negated. By default it points downward.\r\n */\r\n GreenUp = 1 << 0,\r\n}\r\n\r\n/** Describes how to apply [normal mapping](https://en.wikipedia.org/wiki/Normal_mapping) to a surface material.\r\n * @see [[RenderMaterialAssetMapsProps.Normal]] to define a normal map for a [[RenderMaterialAssetProps]].\r\n * @public\r\n */\r\nexport interface NormalMapProps extends TextureMapProps {\r\n /** Flags controlling how the normal map is applied. Default: [[NormalMapFlags.None]]. */\r\n NormalFlags?: NormalMapFlags;\r\n}\r\n\r\n/** Describes different types of textures to be applied to a surface material to alter its appearance.\r\n * @note While technically both [[Pattern]] and [[Normal]] can define their own mapping parameters (`pattern_angle`, `pattern_mapping`, etc), in practice\r\n * if both maps are present they are expected to have identical mapping parameters, with the exception of `TextureId`.\r\n * @see [[RenderMaterialAssetProps.Map]] to define the texture maps for a material asset.\r\n * @public\r\n */\r\nexport interface RenderMaterialAssetMapsProps {\r\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\r\n Pattern?: TextureMapProps;\r\n /** Maps a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to the surface, simulating more complex surface details than are\r\n * present in the surface's geometry.\r\n */\r\n Normal?: NormalMapProps;\r\n}\r\n\r\n/** Describes the graphical properties of a [RenderMaterialElement]($backend) as part of a [[RenderMaterialProps]].\r\n * This representation is used to persist the material properties into the [IModelDb]($backend), but is unwieldy and verbose.\r\n * @see [RenderMaterialElementParams]($backend) for a somewhat more ergonomic representation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderMaterialAssetProps {\r\n /** If true, this material has a fill/diffuse color; if undefined, defaults to false */\r\n HasBaseColor?: boolean;\r\n /** Surface color used for fill or diffuse illumination; if undefined, defaults to black */\r\n color?: RgbFactorProps;\r\n /** If true, this material has a specular color; if undefined, defaults to false */\r\n HasSpecularColor?: boolean;\r\n /** Surface color used for specular illumination; if undefined, defaults to black */\r\n specular_color?: RgbFactorProps;\r\n /** If true, this material has a specular exponent; if undefined, defaults to false */\r\n HasFinish?: boolean;\r\n /** Specular exponent (surface shininess); range is 0 to 128; if undefined, defaults to 13.5 */\r\n finish?: number;\r\n /** If true, this material has surface transparency; if undefined, defaults to false */\r\n HasTransmit?: boolean;\r\n /** Surface transparency; if undefined, defaults to 0.0 */\r\n transmit?: number;\r\n /** If true, this material has a value for diffuse reflectivity; if undefined, defaults to false */\r\n HasDiffuse?: boolean;\r\n /** Surface diffuse reflectivity; if undefined, defaults to 0.6 */\r\n diffuse?: number;\r\n /** If true, this material has a value for specular reflectivity; if undefined, defaults to false. If false, specular value is actually set to 0.0 */\r\n HasSpecular?: boolean;\r\n /** Surface specular reflectivity; if undefined, defaults to 0.4 */\r\n specular?: number;\r\n /** If true, this material has a value for environmental reflectivity; if undefined, defaults to false */\r\n HasReflect?: boolean;\r\n /** Surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined defaults to 0.0 */\r\n reflect?: number;\r\n /** If true, this material has a surface reflectance color; if undefined, defaults to false. If false, reflectance color is actually set to specular color */\r\n HasReflectColor?: boolean;\r\n /** Surface reflectance color; if undefined, defaults to black */\r\n reflect_color?: RgbFactorProps;\r\n /** A scale by which to multiply the components of the normals read from [[Map.Normal]], if a normal map is defined.\r\n * Default: 1.0\r\n */\r\n pbr_normal?: number;\r\n /** An optional set of texture maps associated with this material. */\r\n Map?: RenderMaterialAssetMapsProps;\r\n}\r\n\r\n/** Properties that define a [RenderMaterialElement]($backend).\r\n * @see [[RenderMaterial]] for the representation used by the display system.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderMaterialProps extends DefinitionElementProps {\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n paletteName: string;\r\n /** An optional description of the material. */\r\n description?: string;\r\n jsonProperties?: {\r\n /** A container for various \"assets\" describing aspects of the material. */\r\n materialAssets?: {\r\n /** Properties of the material describing how it is displayed. */\r\n renderMaterial?: RenderMaterialAssetProps;\r\n };\r\n };\r\n}\r\n"]}
@@ -15,6 +15,14 @@ export declare type PointCloudSizeMode = "voxel" | "pixel";
15
15
  * @beta
16
16
  */
17
17
  export declare type PointCloudShape = "square" | "round";
18
+ /** Specifies the Eye-Dome Lighting mode used for a point cloud.
19
+ * - "off": EDL is not calculated
20
+ * - "on": EDL is calculated using a single pass.
21
+ * - "full" EDL is calculated with full algorithm including optional filtering
22
+ * @see [[PointCloudDisplaySettings.edlMode]].
23
+ * @beta
24
+ */
25
+ export declare type PointCloudEDLMode = "off" | "on" | "full";
18
26
  /** The JSON representation of [[PointCloudDisplaySettings]].
19
27
  * @beta
20
28
  */
@@ -31,6 +39,20 @@ export interface PointCloudDisplayProps {
31
39
  pixelSize?: number;
32
40
  /** See [[PointCloudDisplaySettings.shape]]. */
33
41
  shape?: PointCloudShape;
42
+ /** See [[PointCloudDisplaySettings.edlMode]]. */
43
+ edlMode?: PointCloudEDLMode;
44
+ /** See [[PointCloudDisplaySettings.edlStrength]]. */
45
+ edlStrength?: number;
46
+ /** See [[PointCloudDisplaySettings.edlRadius]]. */
47
+ edlRadius?: number;
48
+ /** See [[PointCloudDisplaySettings.edlFilter]]. */
49
+ edlFilter?: number;
50
+ /** See [[PointCloudDisplaySettings.edlMixWts1]]. */
51
+ edlMixWts1?: number;
52
+ /** See [[PointCloudDisplaySettings.edlMixWts2]]. */
53
+ edlMixWts2?: number;
54
+ /** See [[PointCloudDisplaySettings.edlMixWts4]]. */
55
+ edlMixWts4?: number;
34
56
  }
35
57
  /** The JSON representation of [[RealityModelDisplaySettings]].
36
58
  * @beta
@@ -43,6 +65,10 @@ export interface RealityModelDisplayProps {
43
65
  }
44
66
  /** Settings that control how a point cloud reality model is displayed within a [Viewport]($frontend).
45
67
  * @note This is an immutable type - to modify its properties, use [[clone]].
68
+ * Eye-Dome Lighting (EDL) is a non-photorealistic, image-based shading technique that was designed to improve depth
69
+ * perception in scientific visualization. It is particularly useful for visualizing monochrome point cloud data, but
70
+ * also can be useful for point clouds with color information.
71
+ * @note EDL mode is ignored (off) if the view is not perspective (camera is off)
46
72
  * @see [[RealityModelDisplaySettings.pointCloud]].
47
73
  * @beta
48
74
  */
@@ -75,6 +101,45 @@ export declare class PointCloudDisplaySettings {
75
101
  * Default: 20.
76
102
  */
77
103
  readonly maxPixelsPerVoxel: number;
104
+ /** The mode for the Eye-Dome Lighting (EDL) effect.
105
+ * Default: "off"
106
+ * @note EDL mode is ignored (off) if the view is not perspective (camera is off)
107
+ */
108
+ readonly edlMode: PointCloudEDLMode;
109
+ /** A strength value for the Eye Dome Lighting (EDL) effect.
110
+ * The strength is expected to be a positive floating point number.
111
+ * Default: 5.0
112
+ */
113
+ readonly edlStrength: number;
114
+ /** A radius value for the Eye Dome Lighting (EDL) effect.
115
+ * The radius is expected to be a positive floating point number
116
+ * It is used to deterimine how far away in pixels to sample for depth change
117
+ * Default: 2.0
118
+ */
119
+ readonly edlRadius: number;
120
+ /** A flag for whether or not to apply filtering pass in the Eye Dome Lighting (EDL) effect.
121
+ * It only applies if edlMode is "full"
122
+ * Default: 1.0
123
+ */
124
+ readonly edlFilter?: number;
125
+ /** A weighting value to apply to the full image when combining it with the half and quarter sized ones
126
+ * It only applies if edlMode is "full"
127
+ * The strength is expected to be a floating point number between 0 and 1 inclusive.
128
+ * Default: 1.0
129
+ */
130
+ readonly edlMixWts1?: number;
131
+ /** A weighting value to apply to the half sized image when combining it with the full and quarter sized ones
132
+ * It only applies if edlMode is "full"
133
+ * The strength is expected to be a floating point number between 0 and 1 inclusive.
134
+ * Default: 0.5
135
+ */
136
+ readonly edlMixWts2?: number;
137
+ /** A weighting value to apply to the quarter sized image when combining it with the full and half sized ones
138
+ * It only applies if edlMode is "full"
139
+ * The strength is expected to be a floating point number between 0 and 1 inclusive.
140
+ * Default: 0.25
141
+ */
142
+ readonly edlMixWts4?: number;
78
143
  /** Settings with all properties initialized to their default values. */
79
144
  static defaults: PointCloudDisplaySettings;
80
145
  private constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"RealityModelDisplaySettings.d.ts","sourceRoot":"","sources":["../../src/RealityModelDisplaySettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;GAKG;AACH,oBAAY,kBAAkB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEnD;;;;;GAKG;AACH,oBAAY,eAAe,GAAG,QAAQ,GAAG,OAAO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,CAAC,KAAK,CAAC,EAAE,sBAAsB,GAAG,yBAAyB;IAIjF,2DAA2D;IACpD,MAAM,IAAI,sBAAsB,GAAG,SAAS;IAgDnD,mHAAmH;IAC5G,KAAK,CAAC,YAAY,EAAE,sBAAsB,GAAG,yBAAyB;IAO7E,+DAA+D;IACxD,MAAM,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO;CAWzD;AAED;;;;;GAKG;AACH,qBAAa,2BAA2B;IACtC;;;;OAIG;IACH,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAC3C;;OAEG;IACH,SAAgB,UAAU,EAAE,yBAAyB,CAAC;IAEtD,wEAAwE;IACxE,OAAc,QAAQ,8BAAkF;IAExG,OAAO;IAKP,4HAA4H;WAC9G,QAAQ,CAAC,KAAK,CAAC,EAAE,wBAAwB,GAAG,2BAA2B;IAOrF,uIAAuI;IAChI,MAAM,IAAI,wBAAwB,GAAG,SAAS;IAiBrD,+DAA+D;IACxD,MAAM,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO;IAO1D,mHAAmH;IAC5G,KAAK,CAAC,YAAY,EAAE,wBAAwB,GAAG,2BAA2B;CAKlF"}
@@ -10,12 +10,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.RealityModelDisplaySettings = exports.PointCloudDisplaySettings = void 0;
11
11
  /** Settings that control how a point cloud reality model is displayed within a [Viewport]($frontend).
12
12
  * @note This is an immutable type - to modify its properties, use [[clone]].
13
+ * Eye-Dome Lighting (EDL) is a non-photorealistic, image-based shading technique that was designed to improve depth
14
+ * perception in scientific visualization. It is particularly useful for visualizing monochrome point cloud data, but
15
+ * also can be useful for point clouds with color information.
16
+ * @note EDL mode is ignored (off) if the view is not perspective (camera is off)
13
17
  * @see [[RealityModelDisplaySettings.pointCloud]].
14
18
  * @beta
15
19
  */
16
20
  class PointCloudDisplaySettings {
17
21
  constructor(props) {
18
- var _a, _b, _c, _d, _e, _f;
22
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19
23
  this.shape = (_a = props === null || props === void 0 ? void 0 : props.shape) !== null && _a !== void 0 ? _a : "round";
20
24
  this.sizeMode = (_b = props === null || props === void 0 ? void 0 : props.sizeMode) !== null && _b !== void 0 ? _b : "voxel";
21
25
  // No sanity checks here - e.g., min < max, pixelSize and voxelScale > 0, etc.
@@ -23,6 +27,13 @@ class PointCloudDisplaySettings {
23
27
  this.voxelScale = (_d = props === null || props === void 0 ? void 0 : props.voxelScale) !== null && _d !== void 0 ? _d : 1;
24
28
  this.minPixelsPerVoxel = (_e = props === null || props === void 0 ? void 0 : props.minPixelsPerVoxel) !== null && _e !== void 0 ? _e : 2;
25
29
  this.maxPixelsPerVoxel = (_f = props === null || props === void 0 ? void 0 : props.maxPixelsPerVoxel) !== null && _f !== void 0 ? _f : 20;
30
+ this.edlMode = (_g = props === null || props === void 0 ? void 0 : props.edlMode) !== null && _g !== void 0 ? _g : "off";
31
+ this.edlStrength = (_h = props === null || props === void 0 ? void 0 : props.edlStrength) !== null && _h !== void 0 ? _h : 5;
32
+ this.edlRadius = (_j = props === null || props === void 0 ? void 0 : props.edlRadius) !== null && _j !== void 0 ? _j : 2;
33
+ this.edlFilter = (_k = props === null || props === void 0 ? void 0 : props.edlFilter) !== null && _k !== void 0 ? _k : 1;
34
+ this.edlMixWts1 = (_l = props === null || props === void 0 ? void 0 : props.edlMixWts1) !== null && _l !== void 0 ? _l : 1.0;
35
+ this.edlMixWts2 = (_m = props === null || props === void 0 ? void 0 : props.edlMixWts2) !== null && _m !== void 0 ? _m : 0.5;
36
+ this.edlMixWts4 = (_o = props === null || props === void 0 ? void 0 : props.edlMixWts4) !== null && _o !== void 0 ? _o : 0.25;
26
37
  }
27
38
  /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */
28
39
  static fromJSON(props) {
@@ -46,6 +57,20 @@ class PointCloudDisplaySettings {
46
57
  props.minPixelsPerVoxel = this.minPixelsPerVoxel;
47
58
  if (this.maxPixelsPerVoxel !== defs.maxPixelsPerVoxel)
48
59
  props.maxPixelsPerVoxel = this.maxPixelsPerVoxel;
60
+ if (this.edlMode !== defs.edlMode)
61
+ props.edlMode = this.edlMode;
62
+ if (this.edlStrength !== defs.edlStrength)
63
+ props.edlStrength = this.edlStrength;
64
+ if (this.edlRadius !== defs.edlRadius)
65
+ props.edlRadius = this.edlRadius;
66
+ if (this.edlFilter !== defs.edlFilter)
67
+ props.edlFilter = this.edlFilter;
68
+ if (this.edlMixWts1 !== defs.edlMixWts1)
69
+ props.edlMixWts1 = this.edlMixWts1;
70
+ if (this.edlMixWts2 !== defs.edlMixWts2)
71
+ props.edlMixWts2 = this.edlMixWts2;
72
+ if (this.edlMixWts4 !== defs.edlMixWts4)
73
+ props.edlMixWts4 = this.edlMixWts4;
49
74
  return props;
50
75
  }
51
76
  /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */
@@ -60,7 +85,10 @@ class PointCloudDisplaySettings {
60
85
  if (this === other)
61
86
  return true;
62
87
  return this.shape === other.shape && this.sizeMode === other.sizeMode && this.pixelSize === other.pixelSize
63
- && this.voxelScale === other.voxelScale && this.minPixelsPerVoxel === other.minPixelsPerVoxel && this.maxPixelsPerVoxel === other.maxPixelsPerVoxel;
88
+ && this.voxelScale === other.voxelScale && this.minPixelsPerVoxel === other.minPixelsPerVoxel && this.maxPixelsPerVoxel === other.maxPixelsPerVoxel
89
+ && this.edlMode === other.edlMode && this.edlStrength === other.edlStrength && this.edlRadius === other.edlRadius
90
+ && this.edlFilter === other.edlFilter
91
+ && this.edlMixWts1 === other.edlMixWts1 && this.edlMixWts2 === other.edlMixWts2 && this.edlMixWts4 === other.edlMixWts4;
64
92
  }
65
93
  }
66
94
  exports.PointCloudDisplaySettings = PointCloudDisplaySettings;
@@ -1 +1 @@
1
- {"version":3,"file":"RealityModelDisplaySettings.js","sourceRoot":"","sources":["../../src/RealityModelDisplaySettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAE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;IAC1G,CAAC;IAED,mHAAmH;IAC5G,KAAK,CAAC,YAAsC;QACjD,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;QAC9G,MAAM,UAAU,GAAG,YAAY,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;QACjI,OAAO,IAAI,2BAA2B,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACjE,CAAC;;AA3DH,kEA4DC;AAhDC,wEAAwE;AAC1D,oCAAQ,GAAG,IAAI,2BAA2B,CAAC,SAAS,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\n/** Specifies how the sizes of the individual points within a point cloud are computed.\r\n * - \"pixel\": Each point is an exact number of pixels in diameter, as specified by [[PointCloudDisplaySettings.pixelSize]].\r\n * - \"voxel\": Each point is the size of a \"voxel\" in meters, as specified by the [Tile]($frontend) to which the point belongs.\r\n * @see [[PointCloudDisplaySettings.sizeMode]].\r\n * @beta\r\n */\r\nexport type PointCloudSizeMode = \"voxel\" | \"pixel\";\r\n\r\n/** Specifies the shape drawn for each individual point within a point cloud.\r\n * - \"round\": Each point is drawn as a circle.\r\n * - \"square\": Each point is drawn as a square.\r\n * @see [[PointCloudDisplaySettings.shape]].\r\n * @beta\r\n */\r\nexport type PointCloudShape = \"square\" | \"round\";\r\n\r\n/** The JSON representation of [[PointCloudDisplaySettings]].\r\n * @beta\r\n */\r\nexport interface PointCloudDisplayProps {\r\n /** See [[PointCloudDisplaySettings.sizeMode]]. */\r\n sizeMode?: PointCloudSizeMode;\r\n /** See [[PointCloudDisplaySettings.voxelScale]]. */\r\n voxelScale?: number;\r\n /** See [[PointCloudDisplaySettings.minPixelsPerVoxel]]. */\r\n minPixelsPerVoxel?: number;\r\n /** See [[PointCloudDisplaySettings.maxPixelsPerVoxel]]. */\r\n maxPixelsPerVoxel?: number;\r\n /** See [[PointCloudDisplaySettings.pixelSize]]. */\r\n pixelSize?: number;\r\n /** See [[PointCloudDisplaySettings.shape]]. */\r\n shape?: PointCloudShape;\r\n}\r\n\r\n/** The JSON representation of [[RealityModelDisplaySettings]].\r\n * @beta\r\n */\r\nexport interface RealityModelDisplayProps {\r\n /** See [[RealityModelDisplaySettings.pointCloud]]. */\r\n pointCloud?: PointCloudDisplayProps;\r\n /** See [[RealityModelDisplaySettings.overrideColorRatio]]. */\r\n overrideColorRatio?: number;\r\n // ###TODO when we need it: mesh?: RealityMeshDisplayProps;\r\n}\r\n\r\n/** Settings that control how a point cloud reality model is displayed within a [Viewport]($frontend).\r\n * @note This is an immutable type - to modify its properties, use [[clone]].\r\n * @see [[RealityModelDisplaySettings.pointCloud]].\r\n * @beta\r\n */\r\nexport class PointCloudDisplaySettings {\r\n /** The shape drawn for each point in the cloud.\r\n * Default: \"round\".\r\n */\r\n public readonly shape: PointCloudShape;\r\n /** The method by which the size of each individual point is computed.\r\n * Default: \"voxel\".\r\n * @see [[pixelSize]] to configure the size for \"pixel\" mode.\r\n * @see [[voxelScale]], [[minPixelsPerVoxel]], and [[maxPixelsPerVoxel]] to configure the size for \"voxel\" mode.\r\n */\r\n public readonly sizeMode: PointCloudSizeMode;\r\n /** The radius of each point in pixels, when [[sizeMode]] is \"pixel\".\r\n * The size is expected to be a positive integer. The maximum size will vary based on the graphics hardware in use, but typically is limited to 32 or 64 pixels.\r\n * Default: 1\r\n */\r\n public readonly pixelSize: number;\r\n /** A scale factor applied to the size of each point, when [[sizeMode]] is \"voxel\".\r\n * The scale is expected to be a positive floating point number.\r\n * Default: 1.0\r\n */\r\n public readonly voxelScale: number;\r\n /** If [[sizeMode]] is \"voxel\", the minimum radius of each point in pixels. It is expected to be a positive integer no greater than [[maxPixelsPerVoxel]].\r\n * Default: 2\r\n */\r\n public readonly minPixelsPerVoxel: number;\r\n /** If [[sizeMode]] is \"voxel\", the maximum radius of each point in pixels. It is expected to be a positive integer no less than [[minPixelsPerVoxel]].\r\n * Default: 20.\r\n */\r\n public readonly maxPixelsPerVoxel: number;\r\n\r\n /** Settings with all properties initialized to their default values. */\r\n public static defaults = new PointCloudDisplaySettings();\r\n\r\n private constructor(props?: PointCloudDisplayProps) {\r\n this.shape = props?.shape ?? \"round\";\r\n this.sizeMode = props?.sizeMode ?? \"voxel\";\r\n\r\n // No sanity checks here - e.g., min < max, pixelSize and voxelScale > 0, etc.\r\n this.pixelSize = props?.pixelSize ?? 1;\r\n this.voxelScale = props?.voxelScale ?? 1;\r\n this.minPixelsPerVoxel = props?.minPixelsPerVoxel ?? 2;\r\n this.maxPixelsPerVoxel = props?.maxPixelsPerVoxel ?? 20;\r\n }\r\n\r\n /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */\r\n public static fromJSON(props?: PointCloudDisplayProps): PointCloudDisplaySettings {\r\n return props ? new PointCloudDisplaySettings(props) : this.defaults;\r\n }\r\n\r\n /** Convert these settings to their JSON representation. */\r\n public toJSON(): PointCloudDisplayProps | undefined {\r\n const defs = PointCloudDisplaySettings.defaults;\r\n if (this.equals(defs))\r\n return undefined;\r\n\r\n const props: PointCloudDisplayProps = { };\r\n if (this.shape !== defs.shape)\r\n props.shape = this.shape;\r\n\r\n if (this.sizeMode !== defs.sizeMode)\r\n props.sizeMode = this.sizeMode;\r\n\r\n if (this.pixelSize !== defs.pixelSize)\r\n props.pixelSize = this.pixelSize;\r\n\r\n if (this.voxelScale !== defs.voxelScale)\r\n props.voxelScale = this.voxelScale;\r\n\r\n if (this.minPixelsPerVoxel !== defs.minPixelsPerVoxel)\r\n props.minPixelsPerVoxel = this.minPixelsPerVoxel;\r\n\r\n if (this.maxPixelsPerVoxel !== defs.maxPixelsPerVoxel)\r\n props.maxPixelsPerVoxel = this.maxPixelsPerVoxel;\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps: PointCloudDisplayProps): PointCloudDisplaySettings {\r\n return PointCloudDisplaySettings.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n\r\n /** Returns true if these settings are identical to `other`. */\r\n public equals(other: PointCloudDisplaySettings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.shape === other.shape && this.sizeMode === other.sizeMode && this.pixelSize === other.pixelSize\r\n && this.voxelScale === other.voxelScale && this.minPixelsPerVoxel === other.minPixelsPerVoxel && this.maxPixelsPerVoxel === other.maxPixelsPerVoxel;\r\n }\r\n}\r\n\r\n/** Settings that control how a reality model - whether a [[ContextRealityModel]] or a persistent reality [Model]($backend) - is displayed within a [Viewport]($frontend).\r\n * @see [[ContextRealityModel.displaySettings]] to apply these settings to a context reality model.\r\n * @see [[DisplayStyleSettings.setRealityModelDisplaySettings]] to apply these settings to a persistent reality model.\r\n * @note This is an immutable type - to modify its properties, use [[clone]].\r\n * @beta\r\n */\r\nexport class RealityModelDisplaySettings {\r\n /** If the reality model's color is overridden with another color, a ratio in [0..1] with which to mix the two colors together.\r\n * A ratio of 0 uses only the reality model's color, a ratio of 1 uses only the override color, and a ratio of 0.5 mixes the two colors equally.\r\n * The color may be overridden using [[FeatureOverrides]] such as those supplied by a [FeatureOverrideProvider]($frontend), or by applying a [[SpatialClassifier]].\r\n * Default: 0.5\r\n */\r\n public readonly overrideColorRatio: number;\r\n /** Settings that apply specifically to point cloud reality models.\r\n * Default: [[PointCloudDisplaySettings.defaults]].\r\n */\r\n public readonly pointCloud: PointCloudDisplaySettings;\r\n\r\n /** Settings with all properties initialized to their default values. */\r\n public static defaults = new RealityModelDisplaySettings(undefined, PointCloudDisplaySettings.defaults);\r\n\r\n private constructor(overrideColorRatio: number | undefined, pointCloud: PointCloudDisplaySettings) {\r\n this.overrideColorRatio = overrideColorRatio ?? 0.5;\r\n this.pointCloud = pointCloud;\r\n }\r\n\r\n /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */\r\n public static fromJSON(props?: RealityModelDisplayProps): RealityModelDisplaySettings {\r\n if (!props)\r\n return this.defaults;\r\n\r\n return new RealityModelDisplaySettings(props.overrideColorRatio, PointCloudDisplaySettings.fromJSON(props.pointCloud));\r\n }\r\n\r\n /** Convert these settings to their JSON representation, which is `undefined` if all of their properties match the default settings. */\r\n public toJSON(): RealityModelDisplayProps | undefined {\r\n const pointCloud = this.pointCloud.toJSON();\r\n const overrideColorRatio = this.overrideColorRatio === RealityModelDisplaySettings.defaults.overrideColorRatio ? undefined : this.overrideColorRatio;\r\n\r\n if (undefined === pointCloud && undefined === overrideColorRatio)\r\n return undefined;\r\n\r\n const props: RealityModelDisplayProps = { };\r\n if (undefined !== pointCloud)\r\n props.pointCloud = pointCloud;\r\n\r\n if (undefined !== overrideColorRatio)\r\n props.overrideColorRatio = overrideColorRatio;\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if these settings are identical to `other`. */\r\n public equals(other: RealityModelDisplaySettings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.overrideColorRatio === other.overrideColorRatio && this.pointCloud.equals(other.pointCloud);\r\n }\r\n\r\n /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps: RealityModelDisplayProps): RealityModelDisplaySettings {\r\n const pointCloud = changedProps.pointCloud ? this.pointCloud.clone(changedProps.pointCloud) : this.pointCloud;\r\n const colorRatio = changedProps.hasOwnProperty(\"overrideColorRatio\") ? changedProps.overrideColorRatio : this.overrideColorRatio;\r\n return new RealityModelDisplaySettings(colorRatio, pointCloud);\r\n }\r\n}\r\n"]}
1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AAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\n/** Specifies how the sizes of the individual points within a point cloud are computed.\r\n * - \"pixel\": Each point is an exact number of pixels in diameter, as specified by [[PointCloudDisplaySettings.pixelSize]].\r\n * - \"voxel\": Each point is the size of a \"voxel\" in meters, as specified by the [Tile]($frontend) to which the point belongs.\r\n * @see [[PointCloudDisplaySettings.sizeMode]].\r\n * @beta\r\n */\r\nexport type PointCloudSizeMode = \"voxel\" | \"pixel\";\r\n\r\n/** Specifies the shape drawn for each individual point within a point cloud.\r\n * - \"round\": Each point is drawn as a circle.\r\n * - \"square\": Each point is drawn as a square.\r\n * @see [[PointCloudDisplaySettings.shape]].\r\n * @beta\r\n */\r\nexport type PointCloudShape = \"square\" | \"round\";\r\n\r\n/** Specifies the Eye-Dome Lighting mode used for a point cloud.\r\n * - \"off\": EDL is not calculated\r\n * - \"on\": EDL is calculated using a single pass.\r\n * - \"full\" EDL is calculated with full algorithm including optional filtering\r\n * @see [[PointCloudDisplaySettings.edlMode]].\r\n * @beta\r\n */\r\nexport type PointCloudEDLMode = \"off\" | \"on\" | \"full\";\r\n\r\n/** The JSON representation of [[PointCloudDisplaySettings]].\r\n * @beta\r\n */\r\nexport interface PointCloudDisplayProps {\r\n /** See [[PointCloudDisplaySettings.sizeMode]]. */\r\n sizeMode?: PointCloudSizeMode;\r\n /** See [[PointCloudDisplaySettings.voxelScale]]. */\r\n voxelScale?: number;\r\n /** See [[PointCloudDisplaySettings.minPixelsPerVoxel]]. */\r\n minPixelsPerVoxel?: number;\r\n /** See [[PointCloudDisplaySettings.maxPixelsPerVoxel]]. */\r\n maxPixelsPerVoxel?: number;\r\n /** See [[PointCloudDisplaySettings.pixelSize]]. */\r\n pixelSize?: number;\r\n /** See [[PointCloudDisplaySettings.shape]]. */\r\n shape?: PointCloudShape;\r\n /** See [[PointCloudDisplaySettings.edlMode]]. */\r\n edlMode?: PointCloudEDLMode;\r\n /** See [[PointCloudDisplaySettings.edlStrength]]. */\r\n edlStrength?: number;\r\n /** See [[PointCloudDisplaySettings.edlRadius]]. */\r\n edlRadius?: number;\r\n /** See [[PointCloudDisplaySettings.edlFilter]]. */\r\n edlFilter?: number;\r\n /** See [[PointCloudDisplaySettings.edlMixWts1]]. */\r\n edlMixWts1?: number;\r\n /** See [[PointCloudDisplaySettings.edlMixWts2]]. */\r\n edlMixWts2?: number;\r\n /** See [[PointCloudDisplaySettings.edlMixWts4]]. */\r\n edlMixWts4?: number;\r\n}\r\n\r\n/** The JSON representation of [[RealityModelDisplaySettings]].\r\n * @beta\r\n */\r\nexport interface RealityModelDisplayProps {\r\n /** See [[RealityModelDisplaySettings.pointCloud]]. */\r\n pointCloud?: PointCloudDisplayProps;\r\n /** See [[RealityModelDisplaySettings.overrideColorRatio]]. */\r\n overrideColorRatio?: number;\r\n // ###TODO when we need it: mesh?: RealityMeshDisplayProps;\r\n}\r\n\r\n/** Settings that control how a point cloud reality model is displayed within a [Viewport]($frontend).\r\n * @note This is an immutable type - to modify its properties, use [[clone]].\r\n * Eye-Dome Lighting (EDL) is a non-photorealistic, image-based shading technique that was designed to improve depth\r\n * perception in scientific visualization. It is particularly useful for visualizing monochrome point cloud data, but\r\n * also can be useful for point clouds with color information.\r\n * @note EDL mode is ignored (off) if the view is not perspective (camera is off)\r\n * @see [[RealityModelDisplaySettings.pointCloud]].\r\n * @beta\r\n */\r\nexport class PointCloudDisplaySettings {\r\n /** The shape drawn for each point in the cloud.\r\n * Default: \"round\".\r\n */\r\n public readonly shape: PointCloudShape;\r\n /** The method by which the size of each individual point is computed.\r\n * Default: \"voxel\".\r\n * @see [[pixelSize]] to configure the size for \"pixel\" mode.\r\n * @see [[voxelScale]], [[minPixelsPerVoxel]], and [[maxPixelsPerVoxel]] to configure the size for \"voxel\" mode.\r\n */\r\n public readonly sizeMode: PointCloudSizeMode;\r\n /** The radius of each point in pixels, when [[sizeMode]] is \"pixel\".\r\n * The size is expected to be a positive integer. The maximum size will vary based on the graphics hardware in use, but typically is limited to 32 or 64 pixels.\r\n * Default: 1\r\n */\r\n public readonly pixelSize: number;\r\n /** A scale factor applied to the size of each point, when [[sizeMode]] is \"voxel\".\r\n * The scale is expected to be a positive floating point number.\r\n * Default: 1.0\r\n */\r\n public readonly voxelScale: number;\r\n /** If [[sizeMode]] is \"voxel\", the minimum radius of each point in pixels. It is expected to be a positive integer no greater than [[maxPixelsPerVoxel]].\r\n * Default: 2\r\n */\r\n public readonly minPixelsPerVoxel: number;\r\n /** If [[sizeMode]] is \"voxel\", the maximum radius of each point in pixels. It is expected to be a positive integer no less than [[minPixelsPerVoxel]].\r\n * Default: 20.\r\n */\r\n public readonly maxPixelsPerVoxel: number;\r\n /** The mode for the Eye-Dome Lighting (EDL) effect.\r\n * Default: \"off\"\r\n * @note EDL mode is ignored (off) if the view is not perspective (camera is off)\r\n */\r\n public readonly edlMode: PointCloudEDLMode;\r\n /** A strength value for the Eye Dome Lighting (EDL) effect.\r\n * The strength is expected to be a positive floating point number.\r\n * Default: 5.0\r\n */\r\n public readonly edlStrength: number;\r\n /** A radius value for the Eye Dome Lighting (EDL) effect.\r\n * The radius is expected to be a positive floating point number\r\n * It is used to deterimine how far away in pixels to sample for depth change\r\n * Default: 2.0\r\n */\r\n public readonly edlRadius: number;\r\n /** A flag for whether or not to apply filtering pass in the Eye Dome Lighting (EDL) effect.\r\n * It only applies if edlMode is \"full\"\r\n * Default: 1.0\r\n */\r\n public readonly edlFilter?: number;\r\n /** A weighting value to apply to the full image when combining it with the half and quarter sized ones\r\n * It only applies if edlMode is \"full\"\r\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\r\n * Default: 1.0\r\n */\r\n public readonly edlMixWts1?: number;\r\n /** A weighting value to apply to the half sized image when combining it with the full and quarter sized ones\r\n * It only applies if edlMode is \"full\"\r\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\r\n * Default: 0.5\r\n */\r\n public readonly edlMixWts2?: number;\r\n /** A weighting value to apply to the quarter sized image when combining it with the full and half sized ones\r\n * It only applies if edlMode is \"full\"\r\n * The strength is expected to be a floating point number between 0 and 1 inclusive.\r\n * Default: 0.25\r\n */\r\n public readonly edlMixWts4?: number;\r\n\r\n /** Settings with all properties initialized to their default values. */\r\n public static defaults = new PointCloudDisplaySettings();\r\n\r\n private constructor(props?: PointCloudDisplayProps) {\r\n this.shape = props?.shape ?? \"round\";\r\n this.sizeMode = props?.sizeMode ?? \"voxel\";\r\n\r\n // No sanity checks here - e.g., min < max, pixelSize and voxelScale > 0, etc.\r\n this.pixelSize = props?.pixelSize ?? 1;\r\n this.voxelScale = props?.voxelScale ?? 1;\r\n this.minPixelsPerVoxel = props?.minPixelsPerVoxel ?? 2;\r\n this.maxPixelsPerVoxel = props?.maxPixelsPerVoxel ?? 20;\r\n this.edlMode = props?.edlMode ?? \"off\";\r\n this.edlStrength = props?.edlStrength ?? 5;\r\n this.edlRadius = props?.edlRadius ?? 2;\r\n this.edlFilter = props?.edlFilter ?? 1;\r\n this.edlMixWts1 = props?.edlMixWts1 ?? 1.0;\r\n this.edlMixWts2 = props?.edlMixWts2 ?? 0.5;\r\n this.edlMixWts4 = props?.edlMixWts4 ?? 0.25;\r\n }\r\n\r\n /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */\r\n public static fromJSON(props?: PointCloudDisplayProps): PointCloudDisplaySettings {\r\n return props ? new PointCloudDisplaySettings(props) : this.defaults;\r\n }\r\n\r\n /** Convert these settings to their JSON representation. */\r\n public toJSON(): PointCloudDisplayProps | undefined {\r\n const defs = PointCloudDisplaySettings.defaults;\r\n if (this.equals(defs))\r\n return undefined;\r\n\r\n const props: PointCloudDisplayProps = { };\r\n if (this.shape !== defs.shape)\r\n props.shape = this.shape;\r\n\r\n if (this.sizeMode !== defs.sizeMode)\r\n props.sizeMode = this.sizeMode;\r\n\r\n if (this.pixelSize !== defs.pixelSize)\r\n props.pixelSize = this.pixelSize;\r\n\r\n if (this.voxelScale !== defs.voxelScale)\r\n props.voxelScale = this.voxelScale;\r\n\r\n if (this.minPixelsPerVoxel !== defs.minPixelsPerVoxel)\r\n props.minPixelsPerVoxel = this.minPixelsPerVoxel;\r\n\r\n if (this.maxPixelsPerVoxel !== defs.maxPixelsPerVoxel)\r\n props.maxPixelsPerVoxel = this.maxPixelsPerVoxel;\r\n\r\n if (this.edlMode !== defs.edlMode)\r\n props.edlMode = this.edlMode;\r\n\r\n if (this.edlStrength !== defs.edlStrength)\r\n props.edlStrength = this.edlStrength;\r\n\r\n if (this.edlRadius !== defs.edlRadius)\r\n props.edlRadius = this.edlRadius;\r\n\r\n if (this.edlFilter !== defs.edlFilter)\r\n props.edlFilter = this.edlFilter;\r\n\r\n if (this.edlMixWts1 !== defs.edlMixWts1)\r\n props.edlMixWts1 = this.edlMixWts1;\r\n\r\n if (this.edlMixWts2 !== defs.edlMixWts2)\r\n props.edlMixWts2 = this.edlMixWts2;\r\n\r\n if (this.edlMixWts4 !== defs.edlMixWts4)\r\n props.edlMixWts4 = this.edlMixWts4;\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps: PointCloudDisplayProps): PointCloudDisplaySettings {\r\n return PointCloudDisplaySettings.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n\r\n /** Returns true if these settings are identical to `other`. */\r\n public equals(other: PointCloudDisplaySettings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.shape === other.shape && this.sizeMode === other.sizeMode && this.pixelSize === other.pixelSize\r\n && this.voxelScale === other.voxelScale && this.minPixelsPerVoxel === other.minPixelsPerVoxel && this.maxPixelsPerVoxel === other.maxPixelsPerVoxel\r\n && this.edlMode === other.edlMode && this.edlStrength === other.edlStrength && this.edlRadius === other.edlRadius\r\n && this.edlFilter === other.edlFilter\r\n && this.edlMixWts1 === other.edlMixWts1 && this.edlMixWts2 === other.edlMixWts2 && this.edlMixWts4 === other.edlMixWts4\r\n ;\r\n }\r\n}\r\n\r\n/** Settings that control how a reality model - whether a [[ContextRealityModel]] or a persistent reality [Model]($backend) - is displayed within a [Viewport]($frontend).\r\n * @see [[ContextRealityModel.displaySettings]] to apply these settings to a context reality model.\r\n * @see [[DisplayStyleSettings.setRealityModelDisplaySettings]] to apply these settings to a persistent reality model.\r\n * @note This is an immutable type - to modify its properties, use [[clone]].\r\n * @beta\r\n */\r\nexport class RealityModelDisplaySettings {\r\n /** If the reality model's color is overridden with another color, a ratio in [0..1] with which to mix the two colors together.\r\n * A ratio of 0 uses only the reality model's color, a ratio of 1 uses only the override color, and a ratio of 0.5 mixes the two colors equally.\r\n * The color may be overridden using [[FeatureOverrides]] such as those supplied by a [FeatureOverrideProvider]($frontend), or by applying a [[SpatialClassifier]].\r\n * Default: 0.5\r\n */\r\n public readonly overrideColorRatio: number;\r\n /** Settings that apply specifically to point cloud reality models.\r\n * Default: [[PointCloudDisplaySettings.defaults]].\r\n */\r\n public readonly pointCloud: PointCloudDisplaySettings;\r\n\r\n /** Settings with all properties initialized to their default values. */\r\n public static defaults = new RealityModelDisplaySettings(undefined, PointCloudDisplaySettings.defaults);\r\n\r\n private constructor(overrideColorRatio: number | undefined, pointCloud: PointCloudDisplaySettings) {\r\n this.overrideColorRatio = overrideColorRatio ?? 0.5;\r\n this.pointCloud = pointCloud;\r\n }\r\n\r\n /** Create display settings from their JSON representation. If `props` is `undefined`, the default settings are returned. */\r\n public static fromJSON(props?: RealityModelDisplayProps): RealityModelDisplaySettings {\r\n if (!props)\r\n return this.defaults;\r\n\r\n return new RealityModelDisplaySettings(props.overrideColorRatio, PointCloudDisplaySettings.fromJSON(props.pointCloud));\r\n }\r\n\r\n /** Convert these settings to their JSON representation, which is `undefined` if all of their properties match the default settings. */\r\n public toJSON(): RealityModelDisplayProps | undefined {\r\n const pointCloud = this.pointCloud.toJSON();\r\n const overrideColorRatio = this.overrideColorRatio === RealityModelDisplaySettings.defaults.overrideColorRatio ? undefined : this.overrideColorRatio;\r\n\r\n if (undefined === pointCloud && undefined === overrideColorRatio)\r\n return undefined;\r\n\r\n const props: RealityModelDisplayProps = { };\r\n if (undefined !== pointCloud)\r\n props.pointCloud = pointCloud;\r\n\r\n if (undefined !== overrideColorRatio)\r\n props.overrideColorRatio = overrideColorRatio;\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if these settings are identical to `other`. */\r\n public equals(other: RealityModelDisplaySettings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.overrideColorRatio === other.overrideColorRatio && this.pointCloud.equals(other.pointCloud);\r\n }\r\n\r\n /** Create a copy of these settings, identical except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps: RealityModelDisplayProps): RealityModelDisplaySettings {\r\n const pointCloud = changedProps.pointCloud ? this.pointCloud.clone(changedProps.pointCloud) : this.pointCloud;\r\n const colorRatio = changedProps.hasOwnProperty(\"overrideColorRatio\") ? changedProps.overrideColorRatio : this.overrideColorRatio;\r\n return new RealityModelDisplaySettings(colorRatio, pointCloud);\r\n }\r\n}\r\n"]}
@@ -16,7 +16,7 @@ export declare abstract class RenderMaterial {
16
16
  }
17
17
  /** @public */
18
18
  export declare namespace RenderMaterial {
19
- /** @deprecated Use [CreateRenderMaterialArgs]($frontend). */
19
+ /** @deprecated in 3.x. Use [CreateRenderMaterialArgs]($frontend). */
20
20
  class Params {
21
21
  /** If the material originates from a Material element in the [[IModel]], the Id of that element. */
22
22
  key?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"RenderMaterial.d.ts","sourceRoot":"","sources":["../../src/RenderMaterial.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;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QAC5B,+BAA+B;QACxB,OAAO,UAAQ;QACtB,OAAO,CAAC,MAAM,CAAC,CAAS;oBAEL,GAAG,CAAC,EAAE,MAAM;QAE/B,oFAAoF;QAEpF,gBAAuB,QAAQ,SAAgB;QAE/C;;WAEG;QACH,IAAW,KAAK,IAAI,MAAM,GAAG,SAAS,CAAwB;QAC9D,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAEzC;QAED,6HAA6H;eAE/G,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,cAAc,GAAG,MAAM;KAWlL;CACF"}
@@ -28,7 +28,7 @@ exports.RenderMaterial = RenderMaterial;
28
28
  function clampToNormalizedRange(value) {
29
29
  return Math.max(0.0, Math.min(1.0, value));
30
30
  }
31
- /** @deprecated Use [CreateRenderMaterialArgs]($frontend). */
31
+ /** @deprecated in 3.x. Use [CreateRenderMaterialArgs]($frontend). */
32
32
  class Params {
33
33
  constructor(key) {
34
34
  /** Diffuse weight in [0..1] */
@@ -1 +1 @@
1
- {"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../src/RenderMaterial.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;GAEG;AACH,MAAsB,cAAc;IAMlC,mDAAmD;IACnD,YAAsB,MAA6B;QACjD,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC9C,CAAC;IAED,IAAW,UAAU;;QACnB,OAAO,SAAS,MAAK,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,CAAA,CAAC;IACpD,CAAC;CACF;AAfD,wCAeC;AAED,cAAc;AACd,WAAiB,cAAc;IAC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cAAc,CAAC,cAAc,GAAG,UAAU,CAAC;YAC3C,OAAO,cAAc,CAAC;QACxB,CAAC;;IAxBD,oFAAoF;IACpF,mDAAmD;IAC5B,eAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;IAhCpC,qBAAM,SAuDlB,CAAA;AACH,CAAC,EA9DgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8D9B;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\nimport { TextureMapping } from \"./TextureMapping\";\r\n\r\n/** Represents a material which can be applied to a surface to control aspects of its appearance such as color, reflectivity, texture, and so on.\r\n * @public\r\n */\r\nexport abstract class RenderMaterial {\r\n /** If the material originated from a Material element in the [[IModelDb]], the Id of that element. */\r\n public readonly key?: string;\r\n /** Describes how to map an image to a surface to which this material is applied. */\r\n public readonly textureMapping?: TextureMapping;\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n protected constructor(params: RenderMaterial.Params) {\r\n this.key = params.key;\r\n this.textureMapping = params.textureMapping;\r\n }\r\n\r\n public get hasTexture(): boolean {\r\n return undefined !== this.textureMapping?.texture;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterial { // eslint-disable-line no-redeclare\r\n function clampToNormalizedRange(value: number): number {\r\n return Math.max(0.0, Math.min(1.0, value));\r\n }\r\n\r\n /** @deprecated Use [CreateRenderMaterialArgs]($frontend). */\r\n export class Params {\r\n /** If the material originates from a Material element in the [[IModel]], the Id of that element. */\r\n public key?: string;\r\n /** Diffuse color, or undefined if this material does not override the surface's own color. */\r\n public diffuseColor?: ColorDef;\r\n /** Specular color. Defaults to white if undefined. */\r\n public specularColor?: ColorDef;\r\n /** Currently unused. @alpha */\r\n public emissiveColor?: ColorDef;\r\n /** Currently unused. @alpha */\r\n public reflectColor?: ColorDef;\r\n /** Optional pattern mapping applied to the surface. */\r\n public textureMapping?: TextureMapping;\r\n /** Diffuse weight in [0..1] */\r\n public diffuse: number = 0.6;\r\n /** Specular weight in [0..1] */\r\n public specular: number = 0.4;\r\n public specularExponent: number = 13.5;\r\n /** Currently unused. @alpha */\r\n public reflect: number = 0.0;\r\n /** Currently unused. @alpha */\r\n public refract: number = 1.0;\r\n /** Currently unused. @alpha */\r\n public ambient: number = .3;\r\n /** Currently unused. @alpha */\r\n public shadows = true;\r\n private _alpha?: number;\r\n\r\n public constructor(key?: string) { this.key = key; }\r\n\r\n /** Obtain an immutable instance of a RenderMaterial with all default properties. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public static readonly defaults = new Params();\r\n\r\n /** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;\r\n * or undefined if this material does not override surface transparency.\r\n */\r\n public get alpha(): number | undefined { return this._alpha; }\r\n public set alpha(alpha: number | undefined) {\r\n this._alpha = undefined !== alpha ? clampToNormalizedRange(alpha) : undefined;\r\n }\r\n\r\n /** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public static fromColors(key?: string, diffuseColor?: ColorDef, specularColor?: ColorDef, emissiveColor?: ColorDef, reflectColor?: ColorDef, textureMap?: TextureMapping): Params {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const materialParams = new Params();\r\n materialParams.key = key;\r\n materialParams.diffuseColor = diffuseColor;\r\n materialParams.specularColor = specularColor;\r\n materialParams.emissiveColor = emissiveColor;\r\n materialParams.reflectColor = reflectColor;\r\n materialParams.textureMapping = textureMap;\r\n return materialParams;\r\n }\r\n }\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nObject.freeze(RenderMaterial.Params.defaults);\r\n"]}
1
+ {"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../src/RenderMaterial.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;GAEG;AACH,MAAsB,cAAc;IAMlC,mDAAmD;IACnD,YAAsB,MAA6B;QACjD,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC9C,CAAC;IAED,IAAW,UAAU;;QACnB,OAAO,SAAS,MAAK,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,CAAA,CAAC;IACpD,CAAC;CACF;AAfD,wCAeC;AAED,cAAc;AACd,WAAiB,cAAc;IAC7B,SAAS,sBAAsB,CAAC,KAAa;QAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,qEAAqE;IACrE,MAAa,MAAM;QA4BjB,YAAmB,GAAY;YAf/B,+BAA+B;YACxB,YAAO,GAAW,GAAG,CAAC;YAC7B,gCAAgC;YACzB,aAAQ,GAAW,GAAG,CAAC;YACvB,qBAAgB,GAAW,IAAI,CAAC;YACvC,+BAA+B;YACxB,YAAO,GAAW,GAAG,CAAC;YAC7B,+BAA+B;YACxB,YAAO,GAAW,GAAG,CAAC;YAC7B,+BAA+B;YACxB,YAAO,GAAW,EAAE,CAAC;YAC5B,+BAA+B;YACxB,YAAO,GAAG,IAAI,CAAC;YAGa,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QAAC,CAAC;QAMpD;;WAEG;QACH,IAAW,KAAK,KAAyB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9D,IAAW,KAAK,CAAC,KAAyB;YACxC,IAAI,CAAC,MAAM,GAAG,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAChF,CAAC;QAED,6HAA6H;QAC7H,mDAAmD;QAC5C,MAAM,CAAC,UAAU,CAAC,GAAY,EAAE,YAAuB,EAAE,aAAwB,EAAE,aAAwB,EAAE,YAAuB,EAAE,UAA2B;YACtK,mDAAmD;YACnD,MAAM,cAAc,GAAG,IAAI,MAAM,EAAE,CAAC;YACpC,cAAc,CAAC,GAAG,GAAG,GAAG,CAAC;YACzB,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;YAC3C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;YAC7C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;YAC7C,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;YAC3C,cAAc,CAAC,cAAc,GAAG,UAAU,CAAC;YAC3C,OAAO,cAAc,CAAC;QACxB,CAAC;;IAxBD,oFAAoF;IACpF,mDAAmD;IAC5B,eAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;IAhCpC,qBAAM,SAuDlB,CAAA;AACH,CAAC,EA9DgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8D9B;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\nimport { TextureMapping } from \"./TextureMapping\";\r\n\r\n/** Represents a material which can be applied to a surface to control aspects of its appearance such as color, reflectivity, texture, and so on.\r\n * @public\r\n */\r\nexport abstract class RenderMaterial {\r\n /** If the material originated from a Material element in the [[IModelDb]], the Id of that element. */\r\n public readonly key?: string;\r\n /** Describes how to map an image to a surface to which this material is applied. */\r\n public readonly textureMapping?: TextureMapping;\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n protected constructor(params: RenderMaterial.Params) {\r\n this.key = params.key;\r\n this.textureMapping = params.textureMapping;\r\n }\r\n\r\n public get hasTexture(): boolean {\r\n return undefined !== this.textureMapping?.texture;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterial { // eslint-disable-line no-redeclare\r\n function clampToNormalizedRange(value: number): number {\r\n return Math.max(0.0, Math.min(1.0, value));\r\n }\r\n\r\n /** @deprecated in 3.x. Use [CreateRenderMaterialArgs]($frontend). */\r\n export class Params {\r\n /** If the material originates from a Material element in the [[IModel]], the Id of that element. */\r\n public key?: string;\r\n /** Diffuse color, or undefined if this material does not override the surface's own color. */\r\n public diffuseColor?: ColorDef;\r\n /** Specular color. Defaults to white if undefined. */\r\n public specularColor?: ColorDef;\r\n /** Currently unused. @alpha */\r\n public emissiveColor?: ColorDef;\r\n /** Currently unused. @alpha */\r\n public reflectColor?: ColorDef;\r\n /** Optional pattern mapping applied to the surface. */\r\n public textureMapping?: TextureMapping;\r\n /** Diffuse weight in [0..1] */\r\n public diffuse: number = 0.6;\r\n /** Specular weight in [0..1] */\r\n public specular: number = 0.4;\r\n public specularExponent: number = 13.5;\r\n /** Currently unused. @alpha */\r\n public reflect: number = 0.0;\r\n /** Currently unused. @alpha */\r\n public refract: number = 1.0;\r\n /** Currently unused. @alpha */\r\n public ambient: number = .3;\r\n /** Currently unused. @alpha */\r\n public shadows = true;\r\n private _alpha?: number;\r\n\r\n public constructor(key?: string) { this.key = key; }\r\n\r\n /** Obtain an immutable instance of a RenderMaterial with all default properties. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public static readonly defaults = new Params();\r\n\r\n /** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;\r\n * or undefined if this material does not override surface transparency.\r\n */\r\n public get alpha(): number | undefined { return this._alpha; }\r\n public set alpha(alpha: number | undefined) {\r\n this._alpha = undefined !== alpha ? clampToNormalizedRange(alpha) : undefined;\r\n }\r\n\r\n /** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public static fromColors(key?: string, diffuseColor?: ColorDef, specularColor?: ColorDef, emissiveColor?: ColorDef, reflectColor?: ColorDef, textureMap?: TextureMapping): Params {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const materialParams = new Params();\r\n materialParams.key = key;\r\n materialParams.diffuseColor = diffuseColor;\r\n materialParams.specularColor = specularColor;\r\n materialParams.emissiveColor = emissiveColor;\r\n materialParams.reflectColor = reflectColor;\r\n materialParams.textureMapping = textureMap;\r\n return materialParams;\r\n }\r\n }\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nObject.freeze(RenderMaterial.Params.defaults);\r\n"]}
@@ -48,7 +48,7 @@ export declare namespace RenderTexture {
48
48
  ThematicGradient = 5
49
49
  }
50
50
  /** Parameters used to construct a [[RenderTexture]].
51
- * @deprecated use RenderSystem.createTexture and TextureCreateArgs.
51
+ * @deprecated in 3.x. use RenderSystem.createTexture and TextureCreateArgs.
52
52
  * @public
53
53
  */
54
54
  class Params {
@@ -42,7 +42,7 @@ exports.RenderTexture = RenderTexture;
42
42
  Type[Type["ThematicGradient"] = 5] = "ThematicGradient";
43
43
  })(Type = RenderTexture.Type || (RenderTexture.Type = {}));
44
44
  /** Parameters used to construct a [[RenderTexture]].
45
- * @deprecated use RenderSystem.createTexture and TextureCreateArgs.
45
+ * @deprecated in 3.x. use RenderSystem.createTexture and TextureCreateArgs.
46
46
  * @public
47
47
  */
48
48
  class Params {