@itwin/core-common 5.0.0-dev.9 → 5.0.0-dev.90

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 (806) hide show
  1. package/CHANGELOG.md +55 -1
  2. package/lib/cjs/AmbientOcclusion.js +17 -9
  3. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  4. package/lib/cjs/AnalysisStyle.d.ts +0 -3
  5. package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
  6. package/lib/cjs/AnalysisStyle.js +20 -4
  7. package/lib/cjs/AnalysisStyle.js.map +1 -1
  8. package/lib/cjs/Atmosphere.js +39 -21
  9. package/lib/cjs/Atmosphere.js.map +1 -1
  10. package/lib/cjs/AuthorizationClient.js.map +1 -1
  11. package/lib/cjs/BackgroundMapProvider.js +4 -0
  12. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  13. package/lib/cjs/BackgroundMapSettings.js +19 -0
  14. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  15. package/lib/cjs/Base64EncodedString.js.map +1 -1
  16. package/lib/cjs/BlobReader.js +8 -6
  17. package/lib/cjs/BlobReader.js.map +1 -1
  18. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  19. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  20. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  21. package/lib/cjs/Camera.js +3 -0
  22. package/lib/cjs/Camera.js.map +1 -1
  23. package/lib/cjs/ChangedElements.js.map +1 -1
  24. package/lib/cjs/ChangedEntities.js.map +1 -1
  25. package/lib/cjs/ChangesetProps.d.ts +1 -1
  26. package/lib/cjs/ChangesetProps.js.map +1 -1
  27. package/lib/cjs/ClipStyle.js +31 -5
  28. package/lib/cjs/ClipStyle.js.map +1 -1
  29. package/lib/cjs/Code.d.ts +0 -5
  30. package/lib/cjs/Code.d.ts.map +1 -1
  31. package/lib/cjs/Code.js +16 -11
  32. package/lib/cjs/Code.js.map +1 -1
  33. package/lib/cjs/ColorByName.js.map +1 -1
  34. package/lib/cjs/ColorDef.js +11 -10
  35. package/lib/cjs/ColorDef.js.map +1 -1
  36. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  37. package/lib/cjs/ConcurrentQuery.d.ts +37 -1
  38. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  39. package/lib/cjs/ConcurrentQuery.js +16 -3
  40. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  41. package/lib/cjs/ContextRealityModel.js +53 -27
  42. package/lib/cjs/ContextRealityModel.js.map +1 -1
  43. package/lib/cjs/ContourDisplay.js +40 -5
  44. package/lib/cjs/ContourDisplay.js.map +1 -1
  45. package/lib/cjs/DisplayStyleSettings.js +95 -63
  46. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  47. package/lib/cjs/ECSchemaProps.js.map +1 -1
  48. package/lib/cjs/ECSqlReader.d.ts +2 -0
  49. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  50. package/lib/cjs/ECSqlReader.js +56 -50
  51. package/lib/cjs/ECSqlReader.js.map +1 -1
  52. package/lib/cjs/ECSqlTypes.js.map +1 -1
  53. package/lib/cjs/ElementMesh.js.map +1 -1
  54. package/lib/cjs/ElementProps.d.ts.map +1 -1
  55. package/lib/cjs/ElementProps.js +7 -3
  56. package/lib/cjs/ElementProps.js.map +1 -1
  57. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  58. package/lib/cjs/EntityProps.d.ts +25 -2
  59. package/lib/cjs/EntityProps.d.ts.map +1 -1
  60. package/lib/cjs/EntityProps.js +39 -0
  61. package/lib/cjs/EntityProps.js.map +1 -1
  62. package/lib/cjs/EntityReference.js.map +1 -1
  63. package/lib/cjs/Environment.js +25 -2
  64. package/lib/cjs/Environment.js.map +1 -1
  65. package/lib/cjs/FeatureIndex.js +15 -6
  66. package/lib/cjs/FeatureIndex.js.map +1 -1
  67. package/lib/cjs/FeatureSymbology.d.ts +25 -73
  68. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  69. package/lib/cjs/FeatureSymbology.js +88 -103
  70. package/lib/cjs/FeatureSymbology.js.map +1 -1
  71. package/lib/cjs/FeatureTable.d.ts +6 -108
  72. package/lib/cjs/FeatureTable.d.ts.map +1 -1
  73. package/lib/cjs/FeatureTable.js +13 -329
  74. package/lib/cjs/FeatureTable.js.map +1 -1
  75. package/lib/cjs/Fonts.d.ts +68 -10
  76. package/lib/cjs/Fonts.d.ts.map +1 -1
  77. package/lib/cjs/Fonts.js +19 -4
  78. package/lib/cjs/Fonts.js.map +1 -1
  79. package/lib/cjs/Frustum.js +2 -2
  80. package/lib/cjs/Frustum.js.map +1 -1
  81. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  82. package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
  83. package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
  84. package/lib/cjs/GeoCoordinateServices.js +2 -1
  85. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  86. package/lib/cjs/GeometryContainment.js.map +1 -1
  87. package/lib/cjs/GeometryParams.js +58 -0
  88. package/lib/cjs/GeometryParams.js.map +1 -1
  89. package/lib/cjs/GeometrySummary.js.map +1 -1
  90. package/lib/cjs/Gradient.d.ts +3 -4
  91. package/lib/cjs/Gradient.d.ts.map +1 -1
  92. package/lib/cjs/Gradient.js +21 -19
  93. package/lib/cjs/Gradient.js.map +1 -1
  94. package/lib/cjs/GraphicParams.js +14 -12
  95. package/lib/cjs/GraphicParams.js.map +1 -1
  96. package/lib/cjs/GroundPlane.js +8 -2
  97. package/lib/cjs/GroundPlane.js.map +1 -1
  98. package/lib/cjs/HSLColor.js +6 -0
  99. package/lib/cjs/HSLColor.js.map +1 -1
  100. package/lib/cjs/HSVColor.js +6 -0
  101. package/lib/cjs/HSVColor.js.map +1 -1
  102. package/lib/cjs/HiddenLine.d.ts +17 -18
  103. package/lib/cjs/HiddenLine.d.ts.map +1 -1
  104. package/lib/cjs/HiddenLine.js +24 -5
  105. package/lib/cjs/HiddenLine.js.map +1 -1
  106. package/lib/cjs/Hilite.js +10 -0
  107. package/lib/cjs/Hilite.js.map +1 -1
  108. package/lib/cjs/IModel.d.ts +3 -12
  109. package/lib/cjs/IModel.d.ts.map +1 -1
  110. package/lib/cjs/IModel.js +47 -23
  111. package/lib/cjs/IModel.js.map +1 -1
  112. package/lib/cjs/IModelError.d.ts +0 -2
  113. package/lib/cjs/IModelError.d.ts.map +1 -1
  114. package/lib/cjs/IModelError.js +3 -8
  115. package/lib/cjs/IModelError.js.map +1 -1
  116. package/lib/cjs/IModelVersion.js +4 -0
  117. package/lib/cjs/IModelVersion.js.map +1 -1
  118. package/lib/cjs/ITwinError.d.ts +63 -27
  119. package/lib/cjs/ITwinError.d.ts.map +1 -1
  120. package/lib/cjs/ITwinError.js +93 -45
  121. package/lib/cjs/ITwinError.js.map +1 -1
  122. package/lib/cjs/Image.d.ts +22 -8
  123. package/lib/cjs/Image.d.ts.map +1 -1
  124. package/lib/cjs/Image.js +20 -4
  125. package/lib/cjs/Image.js.map +1 -1
  126. package/lib/cjs/IpcAppProps.d.ts +2 -0
  127. package/lib/cjs/IpcAppProps.d.ts.map +1 -1
  128. package/lib/cjs/IpcAppProps.js.map +1 -1
  129. package/lib/cjs/LightSettings.js +39 -1
  130. package/lib/cjs/LightSettings.js.map +1 -1
  131. package/lib/cjs/LinePixels.js.map +1 -1
  132. package/lib/cjs/Localization.d.ts +0 -10
  133. package/lib/cjs/Localization.d.ts.map +1 -1
  134. package/lib/cjs/Localization.js +0 -1
  135. package/lib/cjs/Localization.js.map +1 -1
  136. package/lib/cjs/MapImagerySettings.js +3 -2
  137. package/lib/cjs/MapImagerySettings.js.map +1 -1
  138. package/lib/cjs/MapLayerSettings.d.ts +20 -0
  139. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  140. package/lib/cjs/MapLayerSettings.js +50 -1
  141. package/lib/cjs/MapLayerSettings.js.map +1 -1
  142. package/lib/cjs/MassProperties.d.ts +2 -0
  143. package/lib/cjs/MassProperties.d.ts.map +1 -1
  144. package/lib/cjs/MassProperties.js.map +1 -1
  145. package/lib/cjs/MaterialProps.js.map +1 -1
  146. package/lib/cjs/ModelClipGroup.js +6 -0
  147. package/lib/cjs/ModelClipGroup.js.map +1 -1
  148. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  149. package/lib/cjs/ModelProps.js.map +1 -1
  150. package/lib/cjs/NativeAppProps.js.map +1 -1
  151. package/lib/cjs/OctEncodedNormal.js +4 -0
  152. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  153. package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
  154. package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
  155. package/lib/cjs/PlanProjectionSettings.js +8 -1
  156. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  157. package/lib/cjs/PlanarClipMask.d.ts +0 -12
  158. package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
  159. package/lib/cjs/PlanarClipMask.js +24 -2
  160. package/lib/cjs/PlanarClipMask.js.map +1 -1
  161. package/lib/cjs/QPoint.d.ts +5 -5
  162. package/lib/cjs/QPoint.d.ts.map +1 -1
  163. package/lib/cjs/QPoint.js +37 -29
  164. package/lib/cjs/QPoint.js.map +1 -1
  165. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  166. package/lib/cjs/RealityModelDisplaySettings.js +81 -4
  167. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  168. package/lib/cjs/RenderMaterial.d.ts +0 -43
  169. package/lib/cjs/RenderMaterial.d.ts.map +1 -1
  170. package/lib/cjs/RenderMaterial.js +6 -51
  171. package/lib/cjs/RenderMaterial.js.map +1 -1
  172. package/lib/cjs/RenderPolyline.d.ts +36 -0
  173. package/lib/cjs/RenderPolyline.d.ts.map +1 -0
  174. package/lib/cjs/RenderPolyline.js +26 -0
  175. package/lib/cjs/RenderPolyline.js.map +1 -0
  176. package/lib/cjs/RenderSchedule.d.ts +1 -2
  177. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  178. package/lib/cjs/RenderSchedule.js +138 -11
  179. package/lib/cjs/RenderSchedule.js.map +1 -1
  180. package/lib/cjs/RenderTexture.d.ts +5 -23
  181. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  182. package/lib/cjs/RenderTexture.js +13 -16
  183. package/lib/cjs/RenderTexture.js.map +1 -1
  184. package/lib/cjs/RgbColor.js +3 -0
  185. package/lib/cjs/RgbColor.js.map +1 -1
  186. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  187. package/lib/cjs/RpcInterface.js +7 -1
  188. package/lib/cjs/RpcInterface.js.map +1 -1
  189. package/lib/cjs/RpcManager.js.map +1 -1
  190. package/lib/cjs/SessionProps.js.map +1 -1
  191. package/lib/cjs/SkyBox.js +17 -4
  192. package/lib/cjs/SkyBox.js.map +1 -1
  193. package/lib/cjs/SolarCalculate.js.map +1 -1
  194. package/lib/cjs/SolarShadows.js +5 -1
  195. package/lib/cjs/SolarShadows.js.map +1 -1
  196. package/lib/cjs/SpatialClassification.js +19 -1
  197. package/lib/cjs/SpatialClassification.js.map +1 -1
  198. package/lib/cjs/SubCategoryAppearance.js +35 -1
  199. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  200. package/lib/cjs/SubCategoryOverride.js +16 -2
  201. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  202. package/lib/cjs/TerrainSettings.d.ts +0 -7
  203. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  204. package/lib/cjs/TerrainSettings.js +19 -0
  205. package/lib/cjs/TerrainSettings.js.map +1 -1
  206. package/lib/cjs/TextureMapping.d.ts +17 -14
  207. package/lib/cjs/TextureMapping.d.ts.map +1 -1
  208. package/lib/cjs/TextureMapping.js +47 -19
  209. package/lib/cjs/TextureMapping.js.map +1 -1
  210. package/lib/cjs/TextureProps.js.map +1 -1
  211. package/lib/cjs/ThematicDisplay.js +53 -2
  212. package/lib/cjs/ThematicDisplay.js.map +1 -1
  213. package/lib/cjs/Thumbnail.d.ts +1 -1
  214. package/lib/cjs/Thumbnail.js.map +1 -1
  215. package/lib/cjs/TileProps.js.map +1 -1
  216. package/lib/cjs/Tween.js +28 -19
  217. package/lib/cjs/Tween.js.map +1 -1
  218. package/lib/cjs/TxnAction.js.map +1 -1
  219. package/lib/cjs/ViewDetails.js +10 -6
  220. package/lib/cjs/ViewDetails.js.map +1 -1
  221. package/lib/cjs/ViewFlags.d.ts +1 -3
  222. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  223. package/lib/cjs/ViewFlags.js +86 -5
  224. package/lib/cjs/ViewFlags.js.map +1 -1
  225. package/lib/cjs/ViewProps.d.ts +2 -6
  226. package/lib/cjs/ViewProps.d.ts.map +1 -1
  227. package/lib/cjs/ViewProps.js.map +1 -1
  228. package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
  229. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  230. package/lib/cjs/annotation/TextAnnotation.d.ts +3 -2
  231. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  232. package/lib/cjs/annotation/TextAnnotation.js +13 -2
  233. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  234. package/lib/cjs/annotation/TextBlock.d.ts +17 -0
  235. package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
  236. package/lib/cjs/annotation/TextBlock.js +41 -6
  237. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  238. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  239. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  240. package/lib/cjs/annotation/TextStyle.js +65 -19
  241. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  242. package/lib/cjs/core-common.d.ts +1 -2
  243. package/lib/cjs/core-common.d.ts.map +1 -1
  244. package/lib/cjs/core-common.js +1 -2
  245. package/lib/cjs/core-common.js.map +1 -1
  246. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  247. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  248. package/lib/cjs/geometry/AdditionalTransform.js +12 -0
  249. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  250. package/lib/cjs/geometry/AreaPattern.js +17 -0
  251. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  252. package/lib/cjs/geometry/BoundingSphere.js +4 -0
  253. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  254. package/lib/cjs/geometry/Cartographic.js +23 -20
  255. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  256. package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
  257. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  258. package/lib/cjs/geometry/ElementGeometry.js +26 -8
  259. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  260. package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
  261. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  262. package/lib/cjs/geometry/FrustumPlanes.js +1 -0
  263. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  264. package/lib/cjs/geometry/GeodeticDatum.js +100 -0
  265. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  266. package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
  267. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  268. package/lib/cjs/geometry/GeometryStream.js +19 -6
  269. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  270. package/lib/cjs/geometry/ImageGraphic.js +10 -0
  271. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  272. package/lib/cjs/geometry/LineStyle.js +14 -0
  273. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  274. package/lib/cjs/geometry/Placement.js +6 -0
  275. package/lib/cjs/geometry/Placement.js.map +1 -1
  276. package/lib/cjs/geometry/Projection.js +75 -0
  277. package/lib/cjs/geometry/Projection.js.map +1 -1
  278. package/lib/cjs/geometry/TextString.js +18 -0
  279. package/lib/cjs/geometry/TextString.js.map +1 -1
  280. package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  281. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
  282. package/lib/cjs/internal/BackendTypes.js.map +1 -0
  283. package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
  284. package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
  285. package/lib/cjs/internal/PackedFeatureTable.js +359 -0
  286. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
  287. package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
  288. package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
  289. package/lib/cjs/internal/RenderMaterialParams.js +68 -0
  290. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
  291. package/lib/cjs/internal/RenderMesh.d.ts +52 -0
  292. package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
  293. package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
  294. package/lib/cjs/internal/RenderMesh.js.map +1 -0
  295. package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
  296. package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
  297. package/lib/cjs/internal/RenderTextureParams.js +37 -0
  298. package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
  299. package/lib/cjs/internal/Snapping.js.map +1 -1
  300. package/lib/cjs/internal/cross-package.d.ts +5 -0
  301. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  302. package/lib/cjs/internal/cross-package.js +16 -0
  303. package/lib/cjs/internal/cross-package.js.map +1 -1
  304. package/lib/cjs/ipc/IpcSession.js +1 -0
  305. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  306. package/lib/cjs/ipc/IpcSocket.d.ts +3 -0
  307. package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
  308. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  309. package/lib/cjs/ipc/IpcWebSocket.js +7 -6
  310. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  311. package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
  312. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  313. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  314. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  315. package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
  316. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  317. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  318. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  319. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  320. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  321. package/lib/cjs/rpc/TestRpcManager.js +1 -4
  322. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  323. package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
  324. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  325. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  326. package/lib/cjs/rpc/core/RpcControl.js +29 -38
  327. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  328. package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
  329. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  330. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
  331. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  332. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  333. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  334. package/lib/cjs/rpc/core/RpcOperation.js +29 -31
  335. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  336. package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
  337. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  338. package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
  339. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  340. package/lib/cjs/rpc/core/RpcPush.js +15 -8
  341. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  342. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  343. package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
  344. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  345. package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
  346. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  347. package/lib/cjs/rpc/core/RpcRequest.js +51 -29
  348. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  349. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  350. package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
  351. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  352. package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
  353. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  354. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
  355. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  356. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  357. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  358. package/lib/cjs/rpc/web/OpenAPI.js +2 -0
  359. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  360. package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
  361. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  362. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  363. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  364. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
  365. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  366. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
  367. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  368. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  369. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  370. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
  371. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  372. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  373. package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
  374. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  375. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  376. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  377. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
  378. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  379. package/lib/cjs/tile/B3dmTileIO.js +7 -0
  380. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  381. package/lib/cjs/tile/CompositeTileIO.js +3 -0
  382. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  383. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  384. package/lib/cjs/tile/GltfTileIO.js +4 -3
  385. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  386. package/lib/cjs/tile/I3dmTileIO.js +8 -0
  387. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  388. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  389. package/lib/cjs/tile/IModelTileIO.js +26 -3
  390. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  391. package/lib/cjs/tile/PntsTileIO.js +5 -0
  392. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  393. package/lib/cjs/tile/TileIO.js +2 -0
  394. package/lib/cjs/tile/TileIO.js.map +1 -1
  395. package/lib/cjs/tile/TileMetadata.js +9 -1
  396. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  397. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  398. package/lib/esm/AmbientOcclusion.js +17 -9
  399. package/lib/esm/AmbientOcclusion.js.map +1 -1
  400. package/lib/esm/AnalysisStyle.d.ts +0 -3
  401. package/lib/esm/AnalysisStyle.d.ts.map +1 -1
  402. package/lib/esm/AnalysisStyle.js +20 -4
  403. package/lib/esm/AnalysisStyle.js.map +1 -1
  404. package/lib/esm/Atmosphere.js +39 -21
  405. package/lib/esm/Atmosphere.js.map +1 -1
  406. package/lib/esm/AuthorizationClient.js.map +1 -1
  407. package/lib/esm/BackgroundMapProvider.js +4 -0
  408. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  409. package/lib/esm/BackgroundMapSettings.js +19 -0
  410. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  411. package/lib/esm/Base64EncodedString.js.map +1 -1
  412. package/lib/esm/BlobReader.js +8 -6
  413. package/lib/esm/BlobReader.js.map +1 -1
  414. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  415. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  416. package/lib/esm/BriefcaseTypes.js.map +1 -1
  417. package/lib/esm/Camera.js +3 -0
  418. package/lib/esm/Camera.js.map +1 -1
  419. package/lib/esm/ChangedElements.js.map +1 -1
  420. package/lib/esm/ChangedEntities.js.map +1 -1
  421. package/lib/esm/ChangesetProps.d.ts +1 -1
  422. package/lib/esm/ChangesetProps.js.map +1 -1
  423. package/lib/esm/ClipStyle.js +31 -5
  424. package/lib/esm/ClipStyle.js.map +1 -1
  425. package/lib/esm/Code.d.ts +0 -5
  426. package/lib/esm/Code.d.ts.map +1 -1
  427. package/lib/esm/Code.js +16 -11
  428. package/lib/esm/Code.js.map +1 -1
  429. package/lib/esm/ColorByName.js.map +1 -1
  430. package/lib/esm/ColorDef.js +11 -10
  431. package/lib/esm/ColorDef.js.map +1 -1
  432. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  433. package/lib/esm/ConcurrentQuery.d.ts +37 -1
  434. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  435. package/lib/esm/ConcurrentQuery.js +16 -3
  436. package/lib/esm/ConcurrentQuery.js.map +1 -1
  437. package/lib/esm/ContextRealityModel.js +53 -27
  438. package/lib/esm/ContextRealityModel.js.map +1 -1
  439. package/lib/esm/ContourDisplay.js +40 -5
  440. package/lib/esm/ContourDisplay.js.map +1 -1
  441. package/lib/esm/DisplayStyleSettings.js +95 -63
  442. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  443. package/lib/esm/ECSchemaProps.js.map +1 -1
  444. package/lib/esm/ECSqlReader.d.ts +2 -0
  445. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  446. package/lib/esm/ECSqlReader.js +56 -50
  447. package/lib/esm/ECSqlReader.js.map +1 -1
  448. package/lib/esm/ECSqlTypes.js.map +1 -1
  449. package/lib/esm/ElementMesh.js.map +1 -1
  450. package/lib/esm/ElementProps.d.ts.map +1 -1
  451. package/lib/esm/ElementProps.js +8 -4
  452. package/lib/esm/ElementProps.js.map +1 -1
  453. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  454. package/lib/esm/EntityProps.d.ts +25 -2
  455. package/lib/esm/EntityProps.d.ts.map +1 -1
  456. package/lib/esm/EntityProps.js +39 -0
  457. package/lib/esm/EntityProps.js.map +1 -1
  458. package/lib/esm/EntityReference.js.map +1 -1
  459. package/lib/esm/Environment.js +25 -2
  460. package/lib/esm/Environment.js.map +1 -1
  461. package/lib/esm/FeatureIndex.js +15 -6
  462. package/lib/esm/FeatureIndex.js.map +1 -1
  463. package/lib/esm/FeatureSymbology.d.ts +25 -73
  464. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  465. package/lib/esm/FeatureSymbology.js +88 -103
  466. package/lib/esm/FeatureSymbology.js.map +1 -1
  467. package/lib/esm/FeatureTable.d.ts +6 -108
  468. package/lib/esm/FeatureTable.d.ts.map +1 -1
  469. package/lib/esm/FeatureTable.js +11 -324
  470. package/lib/esm/FeatureTable.js.map +1 -1
  471. package/lib/esm/Fonts.d.ts +68 -10
  472. package/lib/esm/Fonts.d.ts.map +1 -1
  473. package/lib/esm/Fonts.js +19 -4
  474. package/lib/esm/Fonts.js.map +1 -1
  475. package/lib/esm/Frustum.js +2 -2
  476. package/lib/esm/Frustum.js.map +1 -1
  477. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  478. package/lib/esm/GeoCoordinateServices.d.ts +1 -0
  479. package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
  480. package/lib/esm/GeoCoordinateServices.js +2 -1
  481. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  482. package/lib/esm/GeometryContainment.js.map +1 -1
  483. package/lib/esm/GeometryParams.js +58 -0
  484. package/lib/esm/GeometryParams.js.map +1 -1
  485. package/lib/esm/GeometrySummary.js.map +1 -1
  486. package/lib/esm/Gradient.d.ts +3 -4
  487. package/lib/esm/Gradient.d.ts.map +1 -1
  488. package/lib/esm/Gradient.js +21 -19
  489. package/lib/esm/Gradient.js.map +1 -1
  490. package/lib/esm/GraphicParams.js +14 -12
  491. package/lib/esm/GraphicParams.js.map +1 -1
  492. package/lib/esm/GroundPlane.js +8 -2
  493. package/lib/esm/GroundPlane.js.map +1 -1
  494. package/lib/esm/HSLColor.js +6 -0
  495. package/lib/esm/HSLColor.js.map +1 -1
  496. package/lib/esm/HSVColor.js +6 -0
  497. package/lib/esm/HSVColor.js.map +1 -1
  498. package/lib/esm/HiddenLine.d.ts +17 -18
  499. package/lib/esm/HiddenLine.d.ts.map +1 -1
  500. package/lib/esm/HiddenLine.js +24 -5
  501. package/lib/esm/HiddenLine.js.map +1 -1
  502. package/lib/esm/Hilite.js +10 -0
  503. package/lib/esm/Hilite.js.map +1 -1
  504. package/lib/esm/IModel.d.ts +3 -12
  505. package/lib/esm/IModel.d.ts.map +1 -1
  506. package/lib/esm/IModel.js +47 -23
  507. package/lib/esm/IModel.js.map +1 -1
  508. package/lib/esm/IModelError.d.ts +0 -2
  509. package/lib/esm/IModelError.d.ts.map +1 -1
  510. package/lib/esm/IModelError.js +2 -1
  511. package/lib/esm/IModelError.js.map +1 -1
  512. package/lib/esm/IModelVersion.js +4 -0
  513. package/lib/esm/IModelVersion.js.map +1 -1
  514. package/lib/esm/ITwinError.d.ts +63 -27
  515. package/lib/esm/ITwinError.d.ts.map +1 -1
  516. package/lib/esm/ITwinError.js +87 -44
  517. package/lib/esm/ITwinError.js.map +1 -1
  518. package/lib/esm/Image.d.ts +22 -8
  519. package/lib/esm/Image.d.ts.map +1 -1
  520. package/lib/esm/Image.js +19 -4
  521. package/lib/esm/Image.js.map +1 -1
  522. package/lib/esm/IpcAppProps.d.ts +2 -0
  523. package/lib/esm/IpcAppProps.d.ts.map +1 -1
  524. package/lib/esm/IpcAppProps.js.map +1 -1
  525. package/lib/esm/LightSettings.js +39 -1
  526. package/lib/esm/LightSettings.js.map +1 -1
  527. package/lib/esm/LinePixels.js.map +1 -1
  528. package/lib/esm/Localization.d.ts +0 -10
  529. package/lib/esm/Localization.d.ts.map +1 -1
  530. package/lib/esm/Localization.js +0 -1
  531. package/lib/esm/Localization.js.map +1 -1
  532. package/lib/esm/MapImagerySettings.js +3 -2
  533. package/lib/esm/MapImagerySettings.js.map +1 -1
  534. package/lib/esm/MapLayerSettings.d.ts +20 -0
  535. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  536. package/lib/esm/MapLayerSettings.js +50 -1
  537. package/lib/esm/MapLayerSettings.js.map +1 -1
  538. package/lib/esm/MassProperties.d.ts +2 -0
  539. package/lib/esm/MassProperties.d.ts.map +1 -1
  540. package/lib/esm/MassProperties.js.map +1 -1
  541. package/lib/esm/MaterialProps.js.map +1 -1
  542. package/lib/esm/ModelClipGroup.js +6 -0
  543. package/lib/esm/ModelClipGroup.js.map +1 -1
  544. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  545. package/lib/esm/ModelProps.js.map +1 -1
  546. package/lib/esm/NativeAppProps.js.map +1 -1
  547. package/lib/esm/OctEncodedNormal.js +4 -0
  548. package/lib/esm/OctEncodedNormal.js.map +1 -1
  549. package/lib/esm/PlanProjectionSettings.d.ts +1 -2
  550. package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
  551. package/lib/esm/PlanProjectionSettings.js +8 -1
  552. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  553. package/lib/esm/PlanarClipMask.d.ts +0 -12
  554. package/lib/esm/PlanarClipMask.d.ts.map +1 -1
  555. package/lib/esm/PlanarClipMask.js +24 -2
  556. package/lib/esm/PlanarClipMask.js.map +1 -1
  557. package/lib/esm/QPoint.d.ts +5 -5
  558. package/lib/esm/QPoint.d.ts.map +1 -1
  559. package/lib/esm/QPoint.js +37 -29
  560. package/lib/esm/QPoint.js.map +1 -1
  561. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  562. package/lib/esm/RealityModelDisplaySettings.js +81 -4
  563. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  564. package/lib/esm/RenderMaterial.d.ts +0 -43
  565. package/lib/esm/RenderMaterial.d.ts.map +1 -1
  566. package/lib/esm/RenderMaterial.js +6 -51
  567. package/lib/esm/RenderMaterial.js.map +1 -1
  568. package/lib/esm/RenderPolyline.d.ts +36 -0
  569. package/lib/esm/RenderPolyline.d.ts.map +1 -0
  570. package/lib/esm/RenderPolyline.js +23 -0
  571. package/lib/esm/RenderPolyline.js.map +1 -0
  572. package/lib/esm/RenderSchedule.d.ts +1 -2
  573. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  574. package/lib/esm/RenderSchedule.js +138 -11
  575. package/lib/esm/RenderSchedule.js.map +1 -1
  576. package/lib/esm/RenderTexture.d.ts +5 -23
  577. package/lib/esm/RenderTexture.d.ts.map +1 -1
  578. package/lib/esm/RenderTexture.js +13 -16
  579. package/lib/esm/RenderTexture.js.map +1 -1
  580. package/lib/esm/RgbColor.js +3 -0
  581. package/lib/esm/RgbColor.js.map +1 -1
  582. package/lib/esm/RpcInterface.d.ts.map +1 -1
  583. package/lib/esm/RpcInterface.js +8 -2
  584. package/lib/esm/RpcInterface.js.map +1 -1
  585. package/lib/esm/RpcManager.js.map +1 -1
  586. package/lib/esm/SessionProps.js.map +1 -1
  587. package/lib/esm/SkyBox.js +17 -4
  588. package/lib/esm/SkyBox.js.map +1 -1
  589. package/lib/esm/SolarCalculate.js.map +1 -1
  590. package/lib/esm/SolarShadows.js +5 -1
  591. package/lib/esm/SolarShadows.js.map +1 -1
  592. package/lib/esm/SpatialClassification.js +19 -1
  593. package/lib/esm/SpatialClassification.js.map +1 -1
  594. package/lib/esm/SubCategoryAppearance.js +35 -1
  595. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  596. package/lib/esm/SubCategoryOverride.js +16 -2
  597. package/lib/esm/SubCategoryOverride.js.map +1 -1
  598. package/lib/esm/TerrainSettings.d.ts +0 -7
  599. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  600. package/lib/esm/TerrainSettings.js +19 -0
  601. package/lib/esm/TerrainSettings.js.map +1 -1
  602. package/lib/esm/TextureMapping.d.ts +17 -14
  603. package/lib/esm/TextureMapping.d.ts.map +1 -1
  604. package/lib/esm/TextureMapping.js +47 -19
  605. package/lib/esm/TextureMapping.js.map +1 -1
  606. package/lib/esm/TextureProps.js.map +1 -1
  607. package/lib/esm/ThematicDisplay.js +53 -2
  608. package/lib/esm/ThematicDisplay.js.map +1 -1
  609. package/lib/esm/Thumbnail.d.ts +1 -1
  610. package/lib/esm/Thumbnail.js.map +1 -1
  611. package/lib/esm/TileProps.js.map +1 -1
  612. package/lib/esm/Tween.js +28 -19
  613. package/lib/esm/Tween.js.map +1 -1
  614. package/lib/esm/TxnAction.js.map +1 -1
  615. package/lib/esm/ViewDetails.js +10 -6
  616. package/lib/esm/ViewDetails.js.map +1 -1
  617. package/lib/esm/ViewFlags.d.ts +1 -3
  618. package/lib/esm/ViewFlags.d.ts.map +1 -1
  619. package/lib/esm/ViewFlags.js +86 -5
  620. package/lib/esm/ViewFlags.js.map +1 -1
  621. package/lib/esm/ViewProps.d.ts +2 -6
  622. package/lib/esm/ViewProps.d.ts.map +1 -1
  623. package/lib/esm/ViewProps.js.map +1 -1
  624. package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
  625. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  626. package/lib/esm/annotation/TextAnnotation.d.ts +3 -2
  627. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  628. package/lib/esm/annotation/TextAnnotation.js +13 -2
  629. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  630. package/lib/esm/annotation/TextBlock.d.ts +17 -0
  631. package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
  632. package/lib/esm/annotation/TextBlock.js +41 -6
  633. package/lib/esm/annotation/TextBlock.js.map +1 -1
  634. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  635. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  636. package/lib/esm/annotation/TextStyle.js +65 -19
  637. package/lib/esm/annotation/TextStyle.js.map +1 -1
  638. package/lib/esm/core-common.d.ts +1 -2
  639. package/lib/esm/core-common.d.ts.map +1 -1
  640. package/lib/esm/core-common.js +1 -2
  641. package/lib/esm/core-common.js.map +1 -1
  642. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  643. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  644. package/lib/esm/geometry/AdditionalTransform.js +12 -0
  645. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  646. package/lib/esm/geometry/AreaPattern.js +17 -0
  647. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  648. package/lib/esm/geometry/BoundingSphere.js +4 -0
  649. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  650. package/lib/esm/geometry/Cartographic.js +23 -20
  651. package/lib/esm/geometry/Cartographic.js.map +1 -1
  652. package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
  653. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  654. package/lib/esm/geometry/ElementGeometry.js +26 -8
  655. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  656. package/lib/esm/geometry/ElementGeometryFB.js +54 -108
  657. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  658. package/lib/esm/geometry/FrustumPlanes.js +1 -0
  659. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  660. package/lib/esm/geometry/GeodeticDatum.js +100 -0
  661. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  662. package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
  663. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  664. package/lib/esm/geometry/GeometryStream.js +19 -6
  665. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  666. package/lib/esm/geometry/ImageGraphic.js +10 -0
  667. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  668. package/lib/esm/geometry/LineStyle.js +14 -0
  669. package/lib/esm/geometry/LineStyle.js.map +1 -1
  670. package/lib/esm/geometry/Placement.js +6 -0
  671. package/lib/esm/geometry/Placement.js.map +1 -1
  672. package/lib/esm/geometry/Projection.js +75 -0
  673. package/lib/esm/geometry/Projection.js.map +1 -1
  674. package/lib/esm/geometry/TextString.js +18 -0
  675. package/lib/esm/geometry/TextString.js.map +1 -1
  676. package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  677. package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
  678. package/lib/esm/internal/BackendTypes.js.map +1 -0
  679. package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
  680. package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
  681. package/lib/esm/internal/PackedFeatureTable.js +352 -0
  682. package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
  683. package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
  684. package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
  685. package/lib/esm/internal/RenderMaterialParams.js +64 -0
  686. package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
  687. package/lib/esm/internal/RenderMesh.d.ts +52 -0
  688. package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
  689. package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
  690. package/lib/esm/internal/RenderMesh.js.map +1 -0
  691. package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
  692. package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
  693. package/lib/esm/internal/RenderTextureParams.js +33 -0
  694. package/lib/esm/internal/RenderTextureParams.js.map +1 -0
  695. package/lib/esm/internal/Snapping.js.map +1 -1
  696. package/lib/esm/internal/cross-package.d.ts +5 -0
  697. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  698. package/lib/esm/internal/cross-package.js +4 -1
  699. package/lib/esm/internal/cross-package.js.map +1 -1
  700. package/lib/esm/ipc/IpcSession.js +1 -0
  701. package/lib/esm/ipc/IpcSession.js.map +1 -1
  702. package/lib/esm/ipc/IpcSocket.d.ts +3 -0
  703. package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
  704. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  705. package/lib/esm/ipc/IpcWebSocket.js +7 -6
  706. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  707. package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
  708. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  709. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  710. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  711. package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
  712. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  713. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  714. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  715. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  716. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  717. package/lib/esm/rpc/TestRpcManager.js +1 -4
  718. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  719. package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
  720. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  721. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  722. package/lib/esm/rpc/core/RpcControl.js +29 -38
  723. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  724. package/lib/esm/rpc/core/RpcInvocation.js +19 -13
  725. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  726. package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
  727. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  728. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  729. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  730. package/lib/esm/rpc/core/RpcOperation.js +29 -31
  731. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  732. package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
  733. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  734. package/lib/esm/rpc/core/RpcProtocol.js +32 -30
  735. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  736. package/lib/esm/rpc/core/RpcPush.js +15 -8
  737. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  738. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  739. package/lib/esm/rpc/core/RpcRegistry.js +10 -9
  740. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  741. package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
  742. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  743. package/lib/esm/rpc/core/RpcRequest.js +51 -29
  744. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  745. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  746. package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
  747. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  748. package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
  749. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  750. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
  751. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  752. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  753. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  754. package/lib/esm/rpc/web/OpenAPI.js +2 -0
  755. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  756. package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
  757. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  758. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  759. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  760. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
  761. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  762. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
  763. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  764. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  765. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  766. package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
  767. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  768. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  769. package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
  770. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  771. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  772. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  773. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
  774. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  775. package/lib/esm/tile/B3dmTileIO.js +7 -0
  776. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  777. package/lib/esm/tile/CompositeTileIO.js +3 -0
  778. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  779. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  780. package/lib/esm/tile/GltfTileIO.js +4 -3
  781. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  782. package/lib/esm/tile/I3dmTileIO.js +8 -0
  783. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  784. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  785. package/lib/esm/tile/IModelTileIO.js +26 -3
  786. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  787. package/lib/esm/tile/PntsTileIO.js +5 -0
  788. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  789. package/lib/esm/tile/TileIO.js +2 -0
  790. package/lib/esm/tile/TileIO.js.map +1 -1
  791. package/lib/esm/tile/TileMetadata.js +9 -1
  792. package/lib/esm/tile/TileMetadata.js.map +1 -1
  793. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  794. package/package.json +14 -14
  795. package/lib/cjs/BackendTypes.d.ts.map +0 -1
  796. package/lib/cjs/BackendTypes.js.map +0 -1
  797. package/lib/cjs/Render.d.ts +0 -85
  798. package/lib/cjs/Render.d.ts.map +0 -1
  799. package/lib/cjs/Render.js.map +0 -1
  800. package/lib/esm/BackendTypes.d.ts.map +0 -1
  801. package/lib/esm/BackendTypes.js.map +0 -1
  802. package/lib/esm/Render.d.ts +0 -85
  803. package/lib/esm/Render.d.ts.map +0 -1
  804. package/lib/esm/Render.js.map +0 -1
  805. /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
  806. /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
@@ -19,13 +19,25 @@ function compareNormalMapParams(lhs, rhs) {
19
19
  * @public
20
20
  */
21
21
  class TextureMapping {
22
+ /** The texture to be mapped to the surface. If normalMapParams is present but does not contain a normal map, then texture is used as a normal map rather than a pattern map. */
23
+ texture;
24
+ /** The parameters for normal mapping.
25
+ * @beta
26
+ */
27
+ normalMapParams;
28
+ /** The parameters describing how the textures are mapped to the surface. */
29
+ params;
22
30
  constructor(tx, params) {
23
31
  this.texture = tx;
24
32
  this.params = params;
25
33
  }
26
- /** @internal */
27
- computeUVParams(visitor, transformToImodel) {
28
- return this.params.computeUVParams(visitor, transformToImodel);
34
+ /** Compute texture coordinates for a polyface.
35
+ * @param visitor The polyface for which to compute UV coordinates based on this texture mapping.
36
+ * @param localToWorld The polyface's local-to-world transform, used for [[TextureMapping.Mode.ElevationDrape]].
37
+ * @returns the texture coordinates, or undefined if computation failed.
38
+ */
39
+ computeUVParams(visitor, localToWorld = core_geometry_1.Transform.createIdentity()) {
40
+ return this.params.computeUVParams(visitor, localToWorld);
29
41
  }
30
42
  /** An [OrderedComparator]($bentley) that compares this mapping against `other`. */
31
43
  compare(other) {
@@ -46,21 +58,23 @@ exports.TextureMapping = TextureMapping;
46
58
  Mode[Mode["Parametric"] = 0] = "Parametric";
47
59
  Mode[Mode["ElevationDrape"] = 1] = "ElevationDrape";
48
60
  Mode[Mode["Planar"] = 2] = "Planar";
49
- /** @internal */
61
+ /** Currently unsupported. */
50
62
  Mode[Mode["DirectionalDrape"] = 3] = "DirectionalDrape";
51
- /** @internal */
63
+ /** Currently unsupported. */
52
64
  Mode[Mode["Cubic"] = 4] = "Cubic";
53
- /** @internal */
65
+ /** Currently unsupported. */
54
66
  Mode[Mode["Spherical"] = 5] = "Spherical";
55
- /** @internal */
67
+ /** Currently unsupported. */
56
68
  Mode[Mode["Cylindrical"] = 6] = "Cylindrical";
57
- /** @internal */
69
+ /** Currently unsupported. */
58
70
  Mode[Mode["Solid"] = 7] = "Solid";
59
- /** @internal Only valid for lights */
71
+ /** Currently unsupported. */
60
72
  Mode[Mode["FrontProject"] = 8] = "FrontProject";
61
73
  })(Mode = TextureMapping.Mode || (TextureMapping.Mode = {}));
62
74
  /** A 2x3 matrix for mapping a texture image to a surface. */
63
75
  class Trans2x3 {
76
+ /** The 3x4 transform produced from the 2x3 matrix. */
77
+ transform;
64
78
  /** Construct from the two rows of the matrix:
65
79
  * ```
66
80
  * | m00 m01 originX |
@@ -78,6 +92,8 @@ exports.TextureMapping = TextureMapping;
78
92
  const matrix = core_geometry_1.Matrix3d.createRowValues(m00, m01, 0, m10, m11, 0, 0, 0, 1);
79
93
  this.transform = core_geometry_1.Transform.createRefs(origin, matrix);
80
94
  }
95
+ /** An immutable 2x3 identity matrix. */
96
+ static identity = new Trans2x3();
81
97
  /** An [OrderedComparator]($bentley) that compares this Trans2x3 against `other`. */
82
98
  compare(other) {
83
99
  if (this === other) {
@@ -96,8 +112,6 @@ exports.TextureMapping = TextureMapping;
96
112
  return 0;
97
113
  }
98
114
  }
99
- /** An immutable 2x3 identity matrix. */
100
- Trans2x3.identity = new Trans2x3();
101
115
  TextureMapping.Trans2x3 = Trans2x3;
102
116
  function compareConstantLodParams(lhs, rhs) {
103
117
  return (0, core_bentley_1.compareNumbers)(lhs.repetitions, rhs.repetitions) || (0, core_bentley_1.compareNumbers)(lhs.offset.x, rhs.offset.x) || (0, core_bentley_1.compareNumbers)(lhs.offset.y, rhs.offset.y)
@@ -105,6 +119,19 @@ exports.TextureMapping = TextureMapping;
105
119
  }
106
120
  /** Parameters describing how a [[RenderTexture]]'s image is mapped to a surface. */
107
121
  class Params {
122
+ /** The matrix used to map the image to a surface. */
123
+ textureMatrix;
124
+ /** The ratio in [0, 1] with which to mix the color sampled from the texture with the element's color.
125
+ * A value of 0.0 uses only the element color. A value of 1.0 uses only the texture color.
126
+ */
127
+ weight;
128
+ /** The mode by which to map the image to a surface. */
129
+ mode;
130
+ worldMapping;
131
+ /** True if want to use constant LOD texture mapping for the surface texture. */
132
+ useConstantLod;
133
+ /** Parameters for constantLod mapping mode. */
134
+ constantLodParams;
108
135
  constructor(props) {
109
136
  this.textureMatrix = props?.textureMat2x3 ?? Trans2x3.identity;
110
137
  this.weight = props?.textureWeight ?? 1;
@@ -127,11 +154,12 @@ exports.TextureMapping = TextureMapping;
127
154
  || (0, core_bentley_1.compareBooleans)(this.useConstantLod, other.useConstantLod) || this.textureMatrix.compare(other.textureMatrix)
128
155
  || compareConstantLodParams(this.constantLodParams, other.constantLodParams);
129
156
  }
130
- /**
131
- * Generates UV parameters for textured surfaces. Returns undefined on failure.
132
- * @internal
157
+ /** Compute texture coordinates for a polyface.
158
+ * @param visitor The polyface for which to compute UV coordinates based on this texture mapping.
159
+ * @param localToWorld The polyface's local-to-world transform, used for [[TextureMapping.Mode.ElevationDrape]].
160
+ * @returns the texture coordinates, or undefined if computation failed.
133
161
  */
134
- computeUVParams(visitor, transformToImodel) {
162
+ computeUVParams(visitor, localToWorld = core_geometry_1.Transform.createIdentity()) {
135
163
  switch (this.mode) {
136
164
  default: // Fall through to parametric in default case
137
165
  case TextureMapping.Mode.Parametric: {
@@ -150,7 +178,7 @@ exports.TextureMapping = TextureMapping;
150
178
  }
151
179
  }
152
180
  case TextureMapping.Mode.ElevationDrape: {
153
- return this.computeElevationDrapeUVParams(visitor, this.textureMatrix.transform, transformToImodel);
181
+ return this.computeElevationDrapeUVParams(visitor, this.textureMatrix.transform, localToWorld);
154
182
  }
155
183
  }
156
184
  }
@@ -206,13 +234,13 @@ exports.TextureMapping = TextureMapping;
206
234
  return params;
207
235
  }
208
236
  /** Computes UV parameters given a texture mapping mode of elevation drape. The result is stored in the Point2d array given. */
209
- computeElevationDrapeUVParams(visitor, uvTransform, transformToIModel) {
237
+ computeElevationDrapeUVParams(visitor, uvTransform, localToWorld) {
210
238
  const params = [];
211
239
  const numEdges = visitor.numEdgesThisFacet;
212
240
  for (let i = 0; i < numEdges; i++) {
213
241
  const point = visitor.point.getPoint3dAtUncheckedPointIndex(i);
214
- if (transformToIModel !== undefined)
215
- transformToIModel.multiplyPoint3d(point, point);
242
+ if (localToWorld !== undefined)
243
+ localToWorld.multiplyPoint3d(point, point);
216
244
  params.push(core_geometry_1.Point2d.createFrom(point));
217
245
  uvTransform.multiplyPoint2d(params[i], params[i]);
218
246
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextureMap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AAC,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACxF,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,+HAA+H;QACvH,6BAA6B,CAAC,OAA+B,EAAE,WAAsB,EAAE,iBAA6B;YAC1H,MAAM,MAAM,GAAc,EAAE,CAAC;YAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;YAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;gBAClC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC;gBAE/D,IAAI,iBAAiB,KAAK,SAAS;oBACjC,iBAAiB,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAElD,MAAM,CAAC,IAAI,CAAC,uBAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvC,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF;IAtJY,qBAAM,SAsJlB,CAAA;AACH,CAAC,EAjRgB,cAAc,8BAAd,cAAc,QAiR9B;AAED,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,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 { IndexedPolyfaceVisitor, Matrix3d, Point2d, Point3d, PolyfaceVisitor, Transform, Vector3d, XAndY } from \"@itwin/core-geometry\";\r\nimport { RenderTexture } from \"./RenderTexture\";\r\nimport { compareBooleans, compareBooleansOrUndefined, compareNumbers, compareNumbersOrUndefined, comparePossiblyUndefined } from \"@itwin/core-bentley\";\r\n\r\n/** Defines normal map parameters.\r\n * @beta\r\n */\r\nexport interface NormalMapParams {\r\n /** The texture to use as a normal map. If not present then the pattern map texture will be used as a normal map. */\r\n normalMap?: RenderTexture;\r\n /** True if the Y component stored in the green channel should be negated. By default, positive Y points downward, but some\r\n * normal maps are created with positive Y pointing upward.\r\n */\r\n greenUp?: boolean;\r\n /** Scale factor by which to multiply the components of the normal extracted from [[normalMap]]. */\r\n scale?: number;\r\n /** True if want to use constant LOD texture mapping for the normal map texture. */\r\n useConstantLod?: boolean;\r\n}\r\n\r\nfunction compareNormalMapParams(lhs: NormalMapParams, rhs: NormalMapParams): number {\r\n return comparePossiblyUndefined((lh, rh) => lh.compare(rh), lhs.normalMap, rhs.normalMap)\r\n || compareBooleansOrUndefined(lhs.greenUp, rhs.greenUp) || compareNumbersOrUndefined(lhs.scale, rhs.scale)\r\n || compareBooleansOrUndefined(lhs.useConstantLod, rhs.useConstantLod);\r\n}\r\n\r\n/** Describes how to map a [[RenderTexture]]'s image onto a surface as part of a [[RenderMaterial]].\r\n * @public\r\n */\r\nexport class TextureMapping {\r\n /** The texture to be mapped to the surface. If normalMapParams is present but does not contain a normal map, then texture is used as a normal map rather than a pattern map. */\r\n public readonly texture: RenderTexture;\r\n /** The parameters for normal mapping.\r\n * @beta\r\n */\r\n public normalMapParams?: NormalMapParams;\r\n /** The parameters describing how the textures are mapped to the surface. */\r\n public readonly params: TextureMapping.Params;\r\n\r\n public constructor(tx: RenderTexture, params: TextureMapping.Params) {\r\n this.texture = tx;\r\n this.params = params;\r\n }\r\n\r\n /** @internal */\r\n public computeUVParams(visitor: PolyfaceVisitor, transformToImodel: Transform): Point2d[] | undefined {\r\n return this.params.computeUVParams(visitor as IndexedPolyfaceVisitor, transformToImodel);\r\n }\r\n\r\n /** An [OrderedComparator]($bentley) that compares this mapping against `other`. */\r\n public compare(other: TextureMapping): number {\r\n if (this === other) {\r\n return 0;\r\n }\r\n\r\n return this.texture.compare(other.texture) || this.params.compare(other.params)\r\n || comparePossiblyUndefined((lh, rh) => compareNormalMapParams(lh, rh), this.normalMapParams, other.normalMapParams);\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace TextureMapping {\r\n /** Enumerates the possible texture mapping modes. */\r\n export enum Mode {\r\n None = -1,\r\n Parametric = 0,\r\n ElevationDrape = 1,\r\n Planar = 2,\r\n /** @internal */\r\n DirectionalDrape = 3,\r\n /** @internal */\r\n Cubic = 4,\r\n /** @internal */\r\n Spherical = 5,\r\n /** @internal */\r\n Cylindrical = 6,\r\n /** @internal */\r\n Solid = 7,\r\n /** @internal Only valid for lights */\r\n FrontProject = 8,\r\n }\r\n\r\n /** A 2x3 matrix for mapping a texture image to a surface. */\r\n export class Trans2x3 {\r\n /** The 3x4 transform produced from the 2x3 matrix. */\r\n public readonly transform: Transform;\r\n\r\n /** Construct from the two rows of the matrix:\r\n * ```\r\n * | m00 m01 originX |\r\n * | m10 m11 originY |\r\n * ```\r\n * Producing the [Transform]($core-geometry):\r\n * ```\r\n * | m00 m01 0 originX |\r\n * | m10 m11 0 originY |\r\n * | 0 0 1 0 |\r\n * ```\r\n */\r\n public constructor(m00 = 1, m01 = 0, originX = 0, m10 = 0, m11 = 1, originY = 0) {\r\n const origin = new Point3d(originX, originY, 0);\r\n const matrix = Matrix3d.createRowValues(m00, m01, 0, m10, m11, 0, 0, 0, 1);\r\n this.transform = Transform.createRefs(origin, matrix);\r\n }\r\n\r\n /** An immutable 2x3 identity matrix. */\r\n public static readonly identity = new Trans2x3();\r\n\r\n /** An [OrderedComparator]($bentley) that compares this Trans2x3 against `other`. */\r\n public compare(other: Trans2x3): number {\r\n if (this === other) {\r\n return 0;\r\n }\r\n\r\n const originDiff = compareNumbers(this.transform.origin.x, other.transform.origin.x) || compareNumbers(this.transform.origin.y, other.transform.origin.y);\r\n if (originDiff !== 0) {\r\n return originDiff;\r\n }\r\n\r\n for (const i of [0, 1, 3, 4]) {\r\n const matDiff = compareNumbers(this.transform.matrix.coffs[i], other.transform.matrix.coffs[i]);\r\n if (matDiff !== 0) {\r\n return matDiff;\r\n }\r\n }\r\n\r\n return 0;\r\n }\r\n }\r\n\r\n /** Properties used to construct a [[TextureMapping.ConstantLodParams]]. */\r\n export interface ConstantLodParamProps {\r\n /** The number of times the texture is repeated. Increasing this will make the texture pattern appear smaller, decreasing it will make it larger. Defaults to 1. */\r\n repetitions?: number;\r\n /** An offset in world units used to shift the texture. Defaults to (0, 0). */\r\n offset?: XAndY;\r\n /** The minimum distance (from the eye to the surface) at which to clamp the texture. Defaults to 1.*/\r\n minDistClamp?: number;\r\n /** The maximum distance (from the eye to the surface) at which to clamp the texture. Defaults to 2^32. */\r\n maxDistClamp?: number;\r\n }\r\n\r\n /** Parameters to define constant level of detail mapping mode, a mode of texture coordinate generation which dynamically creates\r\n * texture cooprdinates so that the level of detail of the texture in the rendered image remains somewhat constant. */\r\n export interface ConstantLodParams {\r\n /** The number of times the texture is repeated. Increasing this will make the texture pattern appear smaller, decreasing it will make it larger. */\r\n repetitions: number;\r\n /** An offset in world units used to shift the texture. */\r\n offset: XAndY;\r\n /** The minimum distance (from the eye to the surface) at which to clamp the texture. */\r\n minDistClamp: number;\r\n /** The maximum distance (from the eye to the surface) at which to clamp the texture. */\r\n maxDistClamp: number;\r\n }\r\n\r\n function compareConstantLodParams(lhs: ConstantLodParams, rhs: ConstantLodParams): number {\r\n return compareNumbers(lhs.repetitions, rhs.repetitions) || compareNumbers(lhs.offset.x, rhs.offset.x) || compareNumbers(lhs.offset.y, rhs.offset.y)\r\n || compareNumbers(lhs.minDistClamp, rhs.minDistClamp) || compareNumbers(lhs.maxDistClamp, rhs.maxDistClamp);\r\n }\r\n\r\n /** Properties used to construct a [[TextureMapping.Params]]. */\r\n export interface ParamProps {\r\n /** The matrix used to map the image to a surface. */\r\n textureMat2x3?: TextureMapping.Trans2x3;\r\n /** The ratio in [0, 1] with which to mix the color sampled from the texture with the surface's color.\r\n * A value of 0.0 uses only the surface color. A value of 1.0 uses only the texture color. A value of 0.5 uses an even mix of both.\r\n * @note This affects only the red, green, and blue components of the color. The alpha sampled from the texture is always multiplied by the surface color's alpha.\r\n * @note Defaults to 1.0\r\n */\r\n textureWeight?: number;\r\n /** The mode by which to map the image to a surface.\r\n * @note Defaults to [[TextureMapping.Mode.Parametric]].\r\n */\r\n mapMode?: TextureMapping.Mode;\r\n /** @internal */\r\n worldMapping?: boolean;\r\n /** True if want to use constant LOD texture mapping for the surface texture. */\r\n useConstantLod?: boolean;\r\n /** Parameters for constantLod mapping mode. */\r\n constantLodProps?: ConstantLodParamProps;\r\n }\r\n\r\n /** Parameters describing how a [[RenderTexture]]'s image is mapped to a surface. */\r\n export class Params {\r\n /** The matrix used to map the image to a surface. */\r\n public textureMatrix: TextureMapping.Trans2x3;\r\n /** The ratio in [0, 1] with which to mix the color sampled from the texture with the element's color.\r\n * A value of 0.0 uses only the element color. A value of 1.0 uses only the texture color.\r\n */\r\n public weight: number;\r\n /** The mode by which to map the image to a surface. */\r\n public mode: TextureMapping.Mode;\r\n /** @internal */\r\n public worldMapping: boolean;\r\n /** True if want to use constant LOD texture mapping for the surface texture. */\r\n public useConstantLod: boolean;\r\n /** Parameters for constantLod mapping mode. */\r\n public constantLodParams: ConstantLodParams;\r\n\r\n public constructor(props?: TextureMapping.ParamProps) {\r\n this.textureMatrix = props?.textureMat2x3 ?? Trans2x3.identity;\r\n this.weight = props?.textureWeight ?? 1;\r\n this.mode = props?.mapMode ?? Mode.Parametric;\r\n this.worldMapping = props?.worldMapping ?? false;\r\n this.useConstantLod = props?.useConstantLod ?? false;\r\n this.constantLodParams = {\r\n repetitions: props?.constantLodProps?.repetitions ?? 1,\r\n offset: props?.constantLodProps?.offset ?? { x: 0, y: 0 },\r\n minDistClamp: props?.constantLodProps?.minDistClamp ?? 1,\r\n maxDistClamp: props?.constantLodProps?.maxDistClamp ?? 4096 * 1024 * 1024,\r\n };\r\n }\r\n\r\n /** An [OrderedComparator]($bentley) that compares these Params against `other`. */\r\n public compare(other: Params): number {\r\n if (this === other) {\r\n return 0;\r\n }\r\n\r\n return compareNumbers(this.weight, other.weight) || compareNumbers(this.mode, other.mode) || compareBooleans(this.worldMapping, other.worldMapping)\r\n || compareBooleans(this.useConstantLod, other.useConstantLod) || this.textureMatrix.compare(other.textureMatrix)\r\n || compareConstantLodParams(this.constantLodParams, other.constantLodParams);\r\n }\r\n\r\n /**\r\n * Generates UV parameters for textured surfaces. Returns undefined on failure.\r\n * @internal\r\n */\r\n public computeUVParams(visitor: IndexedPolyfaceVisitor, transformToImodel: Transform): Point2d[] | undefined {\r\n switch (this.mode) {\r\n default: // Fall through to parametric in default case\r\n case TextureMapping.Mode.Parametric: {\r\n return this.computeParametricUVParams(visitor, this.textureMatrix.transform, !this.worldMapping);\r\n }\r\n case TextureMapping.Mode.Planar: {\r\n const normalIndices = visitor.normalIndex;\r\n if (!normalIndices)\r\n return undefined;\r\n\r\n // Ignore planar mode unless master or sub units for scaleMode and facet is planar\r\n if (!this.worldMapping || (visitor.normalIndex !== undefined && (normalIndices[0] !== normalIndices[1] || normalIndices[0] !== normalIndices[2]))) {\r\n return this.computeParametricUVParams(visitor, this.textureMatrix.transform, !this.worldMapping);\r\n } else {\r\n return this.computePlanarUVParams(visitor, this.textureMatrix.transform);\r\n }\r\n }\r\n case TextureMapping.Mode.ElevationDrape: {\r\n return this.computeElevationDrapeUVParams(visitor, this.textureMatrix.transform, transformToImodel);\r\n }\r\n }\r\n }\r\n\r\n /** Computes UV parameters given a texture mapping mode of parametric. */\r\n private computeParametricUVParams(visitor: IndexedPolyfaceVisitor, uvTransform: Transform, isRelativeUnits: boolean): Point2d[] {\r\n const params: Point2d[] = [];\r\n for (let i = 0; i < visitor.numEdgesThisFacet; i++) {\r\n let param = Point2d.create();\r\n\r\n if (isRelativeUnits || !visitor.tryGetDistanceParameter(i, param)) {\r\n if (!visitor.tryGetNormalizedParameter(i, param)) {\r\n // If mesh does not have facetFaceData, we still want to use the texture coordinates if they are present\r\n param = visitor.getParam(i)!;\r\n }\r\n }\r\n\r\n params.push(uvTransform.multiplyPoint2d(param));\r\n }\r\n return params;\r\n }\r\n\r\n /** Computes UV parameters given a texture mapping mode of planar. The result is stored in the Point2d array given. */\r\n private computePlanarUVParams(visitor: IndexedPolyfaceVisitor, uvTransform: Transform): Point2d[] | undefined {\r\n const params: Point2d[] = [];\r\n const points = visitor.point;\r\n let normal: Vector3d;\r\n\r\n if (visitor.normal === undefined)\r\n normal = points.getPoint3dAtUncheckedPointIndex(0).crossProductToPoints(points.getPoint3dAtUncheckedPointIndex(1), points.getPoint3dAtUncheckedPointIndex(2));\r\n else\r\n normal = visitor.normal.getVector3dAtCheckedVectorIndex(0)!;\r\n\r\n if (!normal.normalize(normal))\r\n return undefined;\r\n\r\n // adjust U texture coordinate to be a continuous length starting at the\r\n // origin. V coordinate stays the same. This mode assumes Z is up vector\r\n\r\n // Flipping normal puts us in a planar coordinate system consistent with MicroStation's display system\r\n normal.scale(-1.0, normal);\r\n\r\n // pick the first vertex normal\r\n const sideVector = Vector3d.create(normal.y, -normal.x, 0.0);\r\n\r\n // if the magnitude of the normal is near zero, the real normal points\r\n // almost straighten up.. In this case, use Y as the up vector to match QV\r\n\r\n const magnitude = sideVector.magnitude();\r\n sideVector.normalize(sideVector); // won't remain undefined if failed due to following check..\r\n\r\n if (magnitude < 1e-3) {\r\n normal.set(0, 0, -1);\r\n sideVector.set(1, 0, 0);\r\n }\r\n\r\n const upVector = sideVector.crossProduct(normal).normalize();\r\n if (!upVector)\r\n return undefined;\r\n\r\n const numEdges = visitor.numEdgesThisFacet;\r\n for (let i = 0; i < numEdges; i++) {\r\n const vector = Vector3d.createFrom(points.getPoint3dAtUncheckedPointIndex(i));\r\n\r\n params.push(Point2d.create(vector.dotProduct(sideVector), vector.dotProduct(upVector)));\r\n uvTransform.multiplyPoint2d(params[i], params[i]);\r\n }\r\n return params;\r\n }\r\n\r\n /** Computes UV parameters given a texture mapping mode of elevation drape. The result is stored in the Point2d array given. */\r\n private computeElevationDrapeUVParams(visitor: IndexedPolyfaceVisitor, uvTransform: Transform, transformToIModel?: Transform): Point2d[] {\r\n const params: Point2d[] = [];\r\n const numEdges = visitor.numEdgesThisFacet;\r\n for (let i = 0; i < numEdges; i++) {\r\n const point = visitor.point.getPoint3dAtUncheckedPointIndex(i);\r\n\r\n if (transformToIModel !== undefined)\r\n transformToIModel.multiplyPoint3d(point, point);\r\n\r\n params.push(Point2d.createFrom(point));\r\n uvTransform.multiplyPoint2d(params[i], params[i]);\r\n }\r\n return params;\r\n }\r\n }\r\n}\r\n\r\nObject.freeze(TextureMapping.Trans2x3.identity);\r\n"]}
1
+ {"version":3,"file":"TextureMapping.js","sourceRoot":"","sources":["../../src/TextureMapping.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAuI;AAEvI,sDAAuJ;AAkBvJ,SAAS,sBAAsB,CAAC,GAAoB,EAAE,GAAoB;IACxE,OAAO,IAAA,uCAAwB,EAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC;WACpF,IAAA,yCAA0B,EAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,IAAA,wCAAyB,EAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC;WACvG,IAAA,yCAA0B,EAAC,GAAG,CAAC,cAAc,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;AAC1E,CAAC;AAED;;GAEG;AACH,MAAa,cAAc;IACzB,gLAAgL;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AED,+HAA+H;QACvH,6BAA6B,CAAC,OAA+B,EAAE,WAAsB,EAAE,YAAwB;YACrH,MAAM,MAAM,GAAc,EAAE,CAAC;YAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;YAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;gBAClC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC;gBAE/D,IAAI,YAAY,KAAK,SAAS;oBAC5B,YAAY,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAE7C,MAAM,CAAC,IAAI,CAAC,uBAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvC,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF;IAtJY,qBAAM,SAsJlB,CAAA;AACH,CAAC,EAhRgB,cAAc,8BAAd,cAAc,QAgR9B;AAED,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { IndexedPolyfaceVisitor, Matrix3d, Point2d, Point3d, PolyfaceVisitor, Transform, Vector3d, XAndY } from \"@itwin/core-geometry\";\nimport { RenderTexture } from \"./RenderTexture\";\nimport { compareBooleans, compareBooleansOrUndefined, compareNumbers, compareNumbersOrUndefined, comparePossiblyUndefined } from \"@itwin/core-bentley\";\n\n/** Defines normal map parameters.\n * @beta\n */\nexport interface NormalMapParams {\n /** The texture to use as a normal map. If not present then the pattern map texture will be used as a normal map. */\n normalMap?: RenderTexture;\n /** True if the Y component stored in the green channel should be negated. By default, positive Y points downward, but some\n * normal maps are created with positive Y pointing upward.\n */\n greenUp?: boolean;\n /** Scale factor by which to multiply the components of the normal extracted from [[normalMap]]. */\n scale?: number;\n /** True if want to use constant LOD texture mapping for the normal map texture. */\n useConstantLod?: boolean;\n}\n\nfunction compareNormalMapParams(lhs: NormalMapParams, rhs: NormalMapParams): number {\n return comparePossiblyUndefined((lh, rh) => lh.compare(rh), lhs.normalMap, rhs.normalMap)\n || compareBooleansOrUndefined(lhs.greenUp, rhs.greenUp) || compareNumbersOrUndefined(lhs.scale, rhs.scale)\n || compareBooleansOrUndefined(lhs.useConstantLod, rhs.useConstantLod);\n}\n\n/** Describes how to map a [[RenderTexture]]'s image onto a surface as part of a [[RenderMaterial]].\n * @public\n */\nexport class TextureMapping {\n /** The texture to be mapped to the surface. If normalMapParams is present but does not contain a normal map, then texture is used as a normal map rather than a pattern map. */\n public readonly texture: RenderTexture;\n /** The parameters for normal mapping.\n * @beta\n */\n public normalMapParams?: NormalMapParams;\n /** The parameters describing how the textures are mapped to the surface. */\n public readonly params: TextureMapping.Params;\n\n public constructor(tx: RenderTexture, params: TextureMapping.Params) {\n this.texture = tx;\n this.params = params;\n }\n\n /** Compute texture coordinates for a polyface.\n * @param visitor The polyface for which to compute UV coordinates based on this texture mapping.\n * @param localToWorld The polyface's local-to-world transform, used for [[TextureMapping.Mode.ElevationDrape]].\n * @returns the texture coordinates, or undefined if computation failed.\n */\n public computeUVParams(visitor: PolyfaceVisitor, localToWorld: Transform = Transform.createIdentity()): Point2d[] | undefined {\n return this.params.computeUVParams(visitor as IndexedPolyfaceVisitor, localToWorld);\n }\n\n /** An [OrderedComparator]($bentley) that compares this mapping against `other`. */\n public compare(other: TextureMapping): number {\n if (this === other) {\n return 0;\n }\n\n return this.texture.compare(other.texture) || this.params.compare(other.params)\n || comparePossiblyUndefined((lh, rh) => compareNormalMapParams(lh, rh), this.normalMapParams, other.normalMapParams);\n }\n}\n\n/** @public */\nexport namespace TextureMapping {\n /** Enumerates the possible texture mapping modes. */\n export enum Mode {\n None = -1,\n Parametric = 0,\n ElevationDrape = 1,\n Planar = 2,\n /** Currently unsupported. */\n DirectionalDrape = 3,\n /** Currently unsupported. */\n Cubic = 4,\n /** Currently unsupported. */\n Spherical = 5,\n /** Currently unsupported. */\n Cylindrical = 6,\n /** Currently unsupported. */\n Solid = 7,\n /** Currently unsupported. */\n FrontProject = 8,\n }\n\n /** A 2x3 matrix for mapping a texture image to a surface. */\n export class Trans2x3 {\n /** The 3x4 transform produced from the 2x3 matrix. */\n public readonly transform: Transform;\n\n /** Construct from the two rows of the matrix:\n * ```\n * | m00 m01 originX |\n * | m10 m11 originY |\n * ```\n * Producing the [Transform]($core-geometry):\n * ```\n * | m00 m01 0 originX |\n * | m10 m11 0 originY |\n * | 0 0 1 0 |\n * ```\n */\n public constructor(m00 = 1, m01 = 0, originX = 0, m10 = 0, m11 = 1, originY = 0) {\n const origin = new Point3d(originX, originY, 0);\n const matrix = Matrix3d.createRowValues(m00, m01, 0, m10, m11, 0, 0, 0, 1);\n this.transform = Transform.createRefs(origin, matrix);\n }\n\n /** An immutable 2x3 identity matrix. */\n public static readonly identity = new Trans2x3();\n\n /** An [OrderedComparator]($bentley) that compares this Trans2x3 against `other`. */\n public compare(other: Trans2x3): number {\n if (this === other) {\n return 0;\n }\n\n const originDiff = compareNumbers(this.transform.origin.x, other.transform.origin.x) || compareNumbers(this.transform.origin.y, other.transform.origin.y);\n if (originDiff !== 0) {\n return originDiff;\n }\n\n for (const i of [0, 1, 3, 4]) {\n const matDiff = compareNumbers(this.transform.matrix.coffs[i], other.transform.matrix.coffs[i]);\n if (matDiff !== 0) {\n return matDiff;\n }\n }\n\n return 0;\n }\n }\n\n /** Properties used to construct a [[TextureMapping.ConstantLodParams]]. */\n export interface ConstantLodParamProps {\n /** The number of times the texture is repeated. Increasing this will make the texture pattern appear smaller, decreasing it will make it larger. Defaults to 1. */\n repetitions?: number;\n /** An offset in world units used to shift the texture. Defaults to (0, 0). */\n offset?: XAndY;\n /** The minimum distance (from the eye to the surface) at which to clamp the texture. Defaults to 1.*/\n minDistClamp?: number;\n /** The maximum distance (from the eye to the surface) at which to clamp the texture. Defaults to 2^32. */\n maxDistClamp?: number;\n }\n\n /** Parameters to define constant level of detail mapping mode, a mode of texture coordinate generation which dynamically creates\n * texture cooprdinates so that the level of detail of the texture in the rendered image remains somewhat constant. */\n export interface ConstantLodParams {\n /** The number of times the texture is repeated. Increasing this will make the texture pattern appear smaller, decreasing it will make it larger. */\n repetitions: number;\n /** An offset in world units used to shift the texture. */\n offset: XAndY;\n /** The minimum distance (from the eye to the surface) at which to clamp the texture. */\n minDistClamp: number;\n /** The maximum distance (from the eye to the surface) at which to clamp the texture. */\n maxDistClamp: number;\n }\n\n function compareConstantLodParams(lhs: ConstantLodParams, rhs: ConstantLodParams): number {\n return compareNumbers(lhs.repetitions, rhs.repetitions) || compareNumbers(lhs.offset.x, rhs.offset.x) || compareNumbers(lhs.offset.y, rhs.offset.y)\n || compareNumbers(lhs.minDistClamp, rhs.minDistClamp) || compareNumbers(lhs.maxDistClamp, rhs.maxDistClamp);\n }\n\n /** Properties used to construct a [[TextureMapping.Params]]. */\n export interface ParamProps {\n /** The matrix used to map the image to a surface. */\n textureMat2x3?: TextureMapping.Trans2x3;\n /** The ratio in [0, 1] with which to mix the color sampled from the texture with the surface's color.\n * A value of 0.0 uses only the surface color. A value of 1.0 uses only the texture color. A value of 0.5 uses an even mix of both.\n * @note This affects only the red, green, and blue components of the color. The alpha sampled from the texture is always multiplied by the surface color's alpha.\n * @note Defaults to 1.0\n */\n textureWeight?: number;\n /** The mode by which to map the image to a surface.\n * @note Defaults to [[TextureMapping.Mode.Parametric]].\n */\n mapMode?: TextureMapping.Mode;\n worldMapping?: boolean;\n /** True if want to use constant LOD texture mapping for the surface texture. */\n useConstantLod?: boolean;\n /** Parameters for constantLod mapping mode. */\n constantLodProps?: ConstantLodParamProps;\n }\n\n /** Parameters describing how a [[RenderTexture]]'s image is mapped to a surface. */\n export class Params {\n /** The matrix used to map the image to a surface. */\n public textureMatrix: TextureMapping.Trans2x3;\n /** The ratio in [0, 1] with which to mix the color sampled from the texture with the element's color.\n * A value of 0.0 uses only the element color. A value of 1.0 uses only the texture color.\n */\n public weight: number;\n /** The mode by which to map the image to a surface. */\n public mode: TextureMapping.Mode;\n public worldMapping: boolean;\n /** True if want to use constant LOD texture mapping for the surface texture. */\n public useConstantLod: boolean;\n /** Parameters for constantLod mapping mode. */\n public constantLodParams: ConstantLodParams;\n\n public constructor(props?: TextureMapping.ParamProps) {\n this.textureMatrix = props?.textureMat2x3 ?? Trans2x3.identity;\n this.weight = props?.textureWeight ?? 1;\n this.mode = props?.mapMode ?? Mode.Parametric;\n this.worldMapping = props?.worldMapping ?? false;\n this.useConstantLod = props?.useConstantLod ?? false;\n this.constantLodParams = {\n repetitions: props?.constantLodProps?.repetitions ?? 1,\n offset: props?.constantLodProps?.offset ?? { x: 0, y: 0 },\n minDistClamp: props?.constantLodProps?.minDistClamp ?? 1,\n maxDistClamp: props?.constantLodProps?.maxDistClamp ?? 4096 * 1024 * 1024,\n };\n }\n\n /** An [OrderedComparator]($bentley) that compares these Params against `other`. */\n public compare(other: Params): number {\n if (this === other) {\n return 0;\n }\n\n return compareNumbers(this.weight, other.weight) || compareNumbers(this.mode, other.mode) || compareBooleans(this.worldMapping, other.worldMapping)\n || compareBooleans(this.useConstantLod, other.useConstantLod) || this.textureMatrix.compare(other.textureMatrix)\n || compareConstantLodParams(this.constantLodParams, other.constantLodParams);\n }\n\n /** Compute texture coordinates for a polyface.\n * @param visitor The polyface for which to compute UV coordinates based on this texture mapping.\n * @param localToWorld The polyface's local-to-world transform, used for [[TextureMapping.Mode.ElevationDrape]].\n * @returns the texture coordinates, or undefined if computation failed.\n */\n public computeUVParams(visitor: IndexedPolyfaceVisitor, localToWorld: Transform = Transform.createIdentity()): Point2d[] | undefined {\n switch (this.mode) {\n default: // Fall through to parametric in default case\n case TextureMapping.Mode.Parametric: {\n return this.computeParametricUVParams(visitor, this.textureMatrix.transform, !this.worldMapping);\n }\n case TextureMapping.Mode.Planar: {\n const normalIndices = visitor.normalIndex;\n if (!normalIndices)\n return undefined;\n\n // Ignore planar mode unless master or sub units for scaleMode and facet is planar\n if (!this.worldMapping || (visitor.normalIndex !== undefined && (normalIndices[0] !== normalIndices[1] || normalIndices[0] !== normalIndices[2]))) {\n return this.computeParametricUVParams(visitor, this.textureMatrix.transform, !this.worldMapping);\n } else {\n return this.computePlanarUVParams(visitor, this.textureMatrix.transform);\n }\n }\n case TextureMapping.Mode.ElevationDrape: {\n return this.computeElevationDrapeUVParams(visitor, this.textureMatrix.transform, localToWorld);\n }\n }\n }\n\n /** Computes UV parameters given a texture mapping mode of parametric. */\n private computeParametricUVParams(visitor: IndexedPolyfaceVisitor, uvTransform: Transform, isRelativeUnits: boolean): Point2d[] {\n const params: Point2d[] = [];\n for (let i = 0; i < visitor.numEdgesThisFacet; i++) {\n let param = Point2d.create();\n\n if (isRelativeUnits || !visitor.tryGetDistanceParameter(i, param)) {\n if (!visitor.tryGetNormalizedParameter(i, param)) {\n // If mesh does not have facetFaceData, we still want to use the texture coordinates if they are present\n param = visitor.getParam(i)!;\n }\n }\n\n params.push(uvTransform.multiplyPoint2d(param));\n }\n return params;\n }\n\n /** Computes UV parameters given a texture mapping mode of planar. The result is stored in the Point2d array given. */\n private computePlanarUVParams(visitor: IndexedPolyfaceVisitor, uvTransform: Transform): Point2d[] | undefined {\n const params: Point2d[] = [];\n const points = visitor.point;\n let normal: Vector3d;\n\n if (visitor.normal === undefined)\n normal = points.getPoint3dAtUncheckedPointIndex(0).crossProductToPoints(points.getPoint3dAtUncheckedPointIndex(1), points.getPoint3dAtUncheckedPointIndex(2));\n else\n normal = visitor.normal.getVector3dAtCheckedVectorIndex(0)!;\n\n if (!normal.normalize(normal))\n return undefined;\n\n // adjust U texture coordinate to be a continuous length starting at the\n // origin. V coordinate stays the same. This mode assumes Z is up vector\n\n // Flipping normal puts us in a planar coordinate system consistent with MicroStation's display system\n normal.scale(-1.0, normal);\n\n // pick the first vertex normal\n const sideVector = Vector3d.create(normal.y, -normal.x, 0.0);\n\n // if the magnitude of the normal is near zero, the real normal points\n // almost straighten up.. In this case, use Y as the up vector to match QV\n\n const magnitude = sideVector.magnitude();\n sideVector.normalize(sideVector); // won't remain undefined if failed due to following check..\n\n if (magnitude < 1e-3) {\n normal.set(0, 0, -1);\n sideVector.set(1, 0, 0);\n }\n\n const upVector = sideVector.crossProduct(normal).normalize();\n if (!upVector)\n return undefined;\n\n const numEdges = visitor.numEdgesThisFacet;\n for (let i = 0; i < numEdges; i++) {\n const vector = Vector3d.createFrom(points.getPoint3dAtUncheckedPointIndex(i));\n\n params.push(Point2d.create(vector.dotProduct(sideVector), vector.dotProduct(upVector)));\n uvTransform.multiplyPoint2d(params[i], params[i]);\n }\n return params;\n }\n\n /** Computes UV parameters given a texture mapping mode of elevation drape. The result is stored in the Point2d array given. */\n private computeElevationDrapeUVParams(visitor: IndexedPolyfaceVisitor, uvTransform: Transform, localToWorld?: Transform): Point2d[] {\n const params: Point2d[] = [];\n const numEdges = visitor.numEdgesThisFacet;\n for (let i = 0; i < numEdges; i++) {\n const point = visitor.point.getPoint3dAtUncheckedPointIndex(i);\n\n if (localToWorld !== undefined)\n localToWorld.multiplyPoint3d(point, point);\n\n params.push(Point2d.createFrom(point));\n uvTransform.multiplyPoint2d(params[i], params[i]);\n }\n return params;\n }\n }\n}\n\nObject.freeze(TextureMapping.Trans2x3.identity);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextureProps.js","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAkCH;;;;;;GAMG;AACH,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,kGAAkG;IAClG,iEAAM,CAAA;IACN,mGAAmG;IACnG,2EAAW,CAAA;IACX;;OAEG;IACH,+DAAK,CAAA;AACP,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B","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 Entities\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { DefinitionElementProps } from \"./ElementProps\";\r\nimport { ImageSourceFormat } from \"./Image\";\r\nimport { Base64EncodedString } from \"./Base64EncodedString\";\r\n\r\n/** Properties that define a [Texture]($backend) element.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextureProps extends DefinitionElementProps {\r\n /** Format of the image data. */\r\n format: ImageSourceFormat;\r\n /** The image data stored in a Base64-encoded string according to the specified format.\r\n * @see [[Base64EncodedString.fromUint8Array]] to produce a well-formed base-64-encoded string.\r\n * @see [[Base64EncodedString.toUint8Array]] to decode the bytes.\r\n */\r\n data: Base64EncodedString;\r\n /** An optional description of the texture. */\r\n description?: string;\r\n}\r\n\r\n/** Properties that specify what texture should be loaded and how it should be loaded.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextureLoadProps {\r\n /** A valid Id64 string identifying the texture */\r\n name: Id64String;\r\n /** Maximum texture size supported by the client. If specified, the texture will be downsampled so both of its dimensions adhere to this size. */\r\n maxTextureSize?: number;\r\n}\r\n\r\n/** Describes the type of transparency in the pixels of a [TextureImage]($frontend).\r\n * Each pixel can be classified as either opaque or translucent.\r\n * The transparency of the image as a whole is based on the combination of pixel transparencies.\r\n * If this information is known, it should be supplied when creating a texture for more efficient rendering.\r\n * @see [TextureImage.transparency]($frontend).\r\n * @public\r\n */\r\nexport enum TextureTransparency {\r\n /** The image contains only opaque pixels. It should not blend with other objects in the scene. */\r\n Opaque,\r\n /** The image contains only translucent pixels. It should blend with other objects in the scene. */\r\n Translucent,\r\n /** The image contains both opaque and translucent pixels. The translucent pixels should blend with other objects in the scene, while\r\n * the opaque pixels should not. Rendering this type of transparency is somewhat more expensive.\r\n */\r\n Mixed,\r\n}\r\n\r\n/** Information about [Texture]($backend) data returned by [[IModelReadRpcInterface.queryTextureData]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextureData {\r\n /** The width of the image, possibly reduced from the original width based on [[TextureLoadProps.maxTextureSize]]. */\r\n width: number;\r\n /** The height of the image, possibly reduced from the original height based on [[TextureLoadProps.maxTextureSize]]. */\r\n height: number;\r\n /** The format of the image (Jpeg or Png). */\r\n format: ImageSourceFormat;\r\n /** The encoded image bytes. */\r\n bytes: Uint8Array;\r\n /** Information about the transparency of the texture image. Default: [[TextureTransparency.Mixed]]. */\r\n transparency?: TextureTransparency;\r\n}\r\n"]}
1
+ {"version":3,"file":"TextureProps.js","sourceRoot":"","sources":["../../src/TextureProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAkCH;;;;;;GAMG;AACH,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,kGAAkG;IAClG,iEAAM,CAAA;IACN,mGAAmG;IACnG,2EAAW,CAAA;IACX;;OAEG;IACH,+DAAK,CAAA;AACP,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { DefinitionElementProps } from \"./ElementProps\";\nimport { ImageSourceFormat } from \"./Image\";\nimport { Base64EncodedString } from \"./Base64EncodedString\";\n\n/** Properties that define a [Texture]($backend) element.\n * @public\n * @extensions\n */\nexport interface TextureProps extends DefinitionElementProps {\n /** Format of the image data. */\n format: ImageSourceFormat;\n /** The image data stored in a Base64-encoded string according to the specified format.\n * @see [[Base64EncodedString.fromUint8Array]] to produce a well-formed base-64-encoded string.\n * @see [[Base64EncodedString.toUint8Array]] to decode the bytes.\n */\n data: Base64EncodedString;\n /** An optional description of the texture. */\n description?: string;\n}\n\n/** Properties that specify what texture should be loaded and how it should be loaded.\n * @public\n * @extensions\n */\nexport interface TextureLoadProps {\n /** A valid Id64 string identifying the texture */\n name: Id64String;\n /** Maximum texture size supported by the client. If specified, the texture will be downsampled so both of its dimensions adhere to this size. */\n maxTextureSize?: number;\n}\n\n/** Describes the type of transparency in the pixels of a [TextureImage]($frontend).\n * Each pixel can be classified as either opaque or translucent.\n * The transparency of the image as a whole is based on the combination of pixel transparencies.\n * If this information is known, it should be supplied when creating a texture for more efficient rendering.\n * @see [TextureImage.transparency]($frontend).\n * @public\n */\nexport enum TextureTransparency {\n /** The image contains only opaque pixels. It should not blend with other objects in the scene. */\n Opaque,\n /** The image contains only translucent pixels. It should blend with other objects in the scene. */\n Translucent,\n /** The image contains both opaque and translucent pixels. The translucent pixels should blend with other objects in the scene, while\n * the opaque pixels should not. Rendering this type of transparency is somewhat more expensive.\n */\n Mixed,\n}\n\n/** Information about [Texture]($backend) data returned by [[IModelReadRpcInterface.queryTextureData]].\n * @public\n * @extensions\n */\nexport interface TextureData {\n /** The width of the image, possibly reduced from the original width based on [[TextureLoadProps.maxTextureSize]]. */\n width: number;\n /** The height of the image, possibly reduced from the original height based on [[TextureLoadProps.maxTextureSize]]. */\n height: number;\n /** The format of the image (Jpeg or Png). */\n format: ImageSourceFormat;\n /** The encoded image bytes. */\n bytes: Uint8Array;\n /** Information about the transparency of the texture image. Default: [[TextureTransparency.Mixed]]. */\n transparency?: TextureTransparency;\n}\n"]}
@@ -74,9 +74,32 @@ var ThematicGradientColorScheme;
74
74
  * @public
75
75
  */
76
76
  class ThematicGradientSettings {
77
+ /** The thematic image mode used to generate the gradient. Defaults to [[ThematicGradientMode.Smooth]]. */
78
+ mode;
79
+ /** The step count value used for [[ThematicGradientMode.Stepped]], [[ThematicGradientMode.SteppedWithDelimiter]], and [[ThematicGradientMode.IsoLines]]. Defaults to 10. Cannot be less than 2. */
80
+ stepCount;
81
+ /** The margin color used at the extremes of the gradient, when outside the applied range. Defaults to a black color using [[ColorDef.fromJSON]] with no arguments. */
82
+ marginColor;
83
+ /** The color scheme used to generate the colors of the gradient color within the applied range. Defaults to [[ThematicGradientColorScheme.BlueRed]]. */
84
+ colorScheme;
85
+ /** The key color values that must be provided when using a custom thematic color scheme.
86
+ * Defaults to empty, unless using a custom thematic color scheme. In that case, this defaults to two key colors going from white to black.
87
+ * When using a custom thematic color scheme, there must be at least two entries in here. If there are not, it will revert to the default settings.
88
+ */
89
+ customKeys;
90
+ /** The percentage to mix in the original color with the thematic display gradient color (0-1).
91
+ * Applies to background map terrain and point clouds only. Defaults to 0. */
92
+ colorMix;
93
+ /** Specifies how the transparency is computed. Defaults to [[ThematicGradientTransparencyMode.SurfaceOnly]].
94
+ * @note This property is ignored for gradients applied using an [[AnalysisStyle]] via [[AnalysisStyleThematic]] - in that case, only the color and
95
+ * transparency of the thematic gradient are applied.
96
+ */
97
+ transparencyMode;
77
98
  static get margin() { return .001; } // A fixed portion of the gradient for out of range values.
78
99
  static get contentRange() { return 1.0 - 2.0 * ThematicGradientSettings.margin; }
79
100
  static get contentMax() { return 1.0 - ThematicGradientSettings.margin; }
101
+ static defaults = new ThematicGradientSettings({});
102
+ static _defaultCustomKeys = [[0.0, 255, 255, 255], [1.0, 0, 0, 0]];
80
103
  /** @alpha */
81
104
  get textureTransparency() {
82
105
  let transp = TextureProps_1.TextureTransparency.Opaque;
@@ -205,12 +228,14 @@ class ThematicGradientSettings {
205
228
  }
206
229
  }
207
230
  exports.ThematicGradientSettings = ThematicGradientSettings;
208
- ThematicGradientSettings.defaults = new ThematicGradientSettings({});
209
- ThematicGradientSettings._defaultCustomKeys = [[0.0, 255, 255, 255], [1.0, 0, 0, 0]];
210
231
  /** A sensor in world space, used for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].
211
232
  * @public
212
233
  */
213
234
  class ThematicDisplaySensor {
235
+ /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */
236
+ position;
237
+ /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */
238
+ value;
214
239
  constructor(json) {
215
240
  if (undefined === json) {
216
241
  this.position = core_geometry_1.Point3d.fromJSON();
@@ -243,6 +268,14 @@ exports.ThematicDisplaySensor = ThematicDisplaySensor;
243
268
  * @public
244
269
  */
245
270
  class ThematicDisplaySensorSettings {
271
+ /** This is the list of sensors. Defaults to an empty array. */
272
+ sensors;
273
+ /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.
274
+ * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).
275
+ * Defaults to zero.
276
+ * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.
277
+ */
278
+ distanceCutoff;
246
279
  constructor(json) {
247
280
  this.sensors = [];
248
281
  if (undefined !== json) {
@@ -308,6 +341,24 @@ var ThematicDisplayMode;
308
341
  * @public
309
342
  */
310
343
  class ThematicDisplay {
344
+ /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */
345
+ displayMode;
346
+ /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */
347
+ gradientSettings;
348
+ /** The range to use when applying the thematic gradient for height and slope mode.
349
+ * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.
350
+ * For [[ThematicDisplayMode.Slope]], this is a range in radians with a minimum low value of 0 degrees and a maximum high value of 90 degrees.
351
+ * Defaults to a null range.
352
+ */
353
+ range;
354
+ /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], the slope of a surface is calculated in relation to this axis. Defaults to {0,0,0}. */
355
+ axis;
356
+ /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */
357
+ sunDirection;
358
+ /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.
359
+ * @public
360
+ */
361
+ sensorSettings;
311
362
  equals(other) {
312
363
  if (this.displayMode !== other.displayMode)
313
364
  return false;
@@ -1 +1 @@
1
- {"version":3,"file":"ThematicDisplay.js","sourceRoot":"","sources":["../../src/ThematicDisplay.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAqD;AACrD,wDAA0F;AAC1F,yCAAqD;AACrD,yCAAsC;AACtC,iDAAqD;AAErD;;;;GAIG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,kDAAkD;IAClD,mEAAU,CAAA;IACV,mDAAmD;IACnD,qEAAW,CAAA;IACX,yJAAyJ;IACzJ,+FAAwB,CAAA;IACxB,uIAAuI;IACvI,uEAAY,CAAA;AACd,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AAED;;;;;;;GAOG;AACH,IAAY,gCAQX;AARD,WAAY,gCAAgC;IAC1C,wFAAwF;IACxF,qGAAe,CAAA;IACf;;;OAGG;IACH,mIAA8B,CAAA;AAChC,CAAC,EARW,gCAAgC,gDAAhC,gCAAgC,QAQ3C;AAED;;;;;GAKG;AACH,IAAY,2BAeX;AAfD,WAAY,2BAA2B;IACrC,uEAAuE;IACvE,mFAAW,CAAA;IACX,uEAAuE;IACvE,mFAAW,CAAA;IACX,uFAAuF;IACvF,yFAAc,CAAA;IACd,kEAAkE;IAClE,2FAAe,CAAA;IACf,mEAAmE;IACnE,2FAAe,CAAA;IACf;;OAEG;IACH,iFAAU,CAAA;AACZ,CAAC,EAfW,2BAA2B,2CAA3B,2BAA2B,QAetC;AAuBD;;GAEG;AACH,MAAa,wBAAwB;IAuB5B,MAAM,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AC,MAAM,EAAE,CAAC;gBAC5D,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,MAAM,CAAC;gBACxD,IAAI,CAAC,gBAAgB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;YAClF,CAAC;YACD,IAAI,mBAAmB,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;gBACnD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG;oBACtB,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;gBACvB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI;oBACxB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAA2B;QAChD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAEM,MAAM;QACX,MAAM,IAAI,GAAyB;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE;YAChD,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACxB,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;SAC3B,CAAC;QAEF,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;YACxC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QAErD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAzFD,0CAyFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { compareNumbers } from \"@itwin/core-bentley\";\r\nimport { Point3d, Range1d, Range1dProps, Vector3d, XYZProps } from \"@itwin/core-geometry\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { Gradient } from \"./Gradient\";\r\nimport { TextureTransparency } from \"./TextureProps\";\r\n\r\n/** A thematic gradient mode used to generate and apply a thematic effect to a scene.\r\n * @see [[ThematicGradientSettings.mode]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ThematicGradientMode {\r\n /** Apply a smooth color gradient to the scene. */\r\n Smooth = 0,\r\n /** Apply a stepped color gradient to the scene. */\r\n Stepped = 1,\r\n /** Apply a stepped color gradient to the scene with delimiters (lines between the color steps). Can only be used with [[ThematicDisplayMode.Height]]. */\r\n SteppedWithDelimiter = 2,\r\n /** Apply isolines to the scene to achieve an effect similar to a contour map. Can only be used with [[ThematicDisplayMode.Height]]. */\r\n IsoLines = 3,\r\n}\r\n\r\n/** Describes how transparency is computed when applying a thematic gradient to a surface.\r\n * Each [[Gradient.KeyColor]] in [[ThematicGradientSettings.customKeys]] has a transparency value.\r\n * Each surface to which the gradient is applied has its own transparency.\r\n * The transparency mode determines how these two values are combined to compute the final transparency.\r\n * @see [[ThematicGradientSettings.transparencyMode]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ThematicGradientTransparencyMode {\r\n /** Ignore the gradient's transparency, applying only the surface's own transparency. */\r\n SurfaceOnly = 0,\r\n /** The final transparency is computed from the product of the surface and gradient alpha channels.\r\n * (Alpha is the inverse of transparency, where `alpha = (255 - transparency) / 255`).\r\n * If the gradient color is opaque, this produces the same result as [[SurfaceOnly]].\r\n */\r\n MultiplySurfaceAndGradient = 1,\r\n}\r\n\r\n/** A color scheme used to generate the colors of a thematic gradient within an applied range.\r\n * @see [[ThematicGradientSettings.colorScheme]]\r\n * @see [[ThematicDisplay.range]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ThematicGradientColorScheme {\r\n /** A color gradient scheme that represents a blue-to-red gradation. */\r\n BlueRed = 0,\r\n /** A color gradient scheme that represents a red-to-blue gradation. */\r\n RedBlue = 1,\r\n /** A color gradient scheme that represents a monochrome (black-to-white) gradation. */\r\n Monochrome = 2,\r\n /** A color gradient scheme that suits a topographic gradation. */\r\n Topographic = 3,\r\n /** A color gradient scheme that suits a sea-mountain gradation. */\r\n SeaMountain = 4,\r\n /** A custom color gradient scheme configured by the user.\r\n * @see [[ThematicGradientSettings.customKeys]]\r\n */\r\n Custom = 5,\r\n}\r\n\r\n/** JSON representation of a [[ThematicGradientSettings]].\r\n * @public\r\n * @extensions\r\n **/\r\nexport interface ThematicGradientSettingsProps {\r\n /** See [[ThematicGradientSettings.mode]]. */\r\n mode?: ThematicGradientMode;\r\n /** See [[ThematicGradientSettings.stepCount]]. */\r\n stepCount?: number;\r\n /** See [[ThematicGradientSettings.marginColor]]. */\r\n marginColor?: ColorDefProps;\r\n /** See [[ThematicGradientSettings.colorScheme]]. */\r\n colorScheme?: ThematicGradientColorScheme;\r\n /** See [[ThematicGradientSettings.customKeys. */\r\n customKeys?: Gradient.KeyColorProps[];\r\n /** See [[ThematicGradientSettings.colorMix]]. */\r\n colorMix?: number;\r\n /** See [[ThematicGradientSettings.transparencyMode]]. */\r\n transparencyMode?: ThematicGradientTransparencyMode;\r\n}\r\n\r\n/** Thematic settings specific to creating a color gradient used by [[ThematicDisplay]].\r\n * @public\r\n */\r\nexport class ThematicGradientSettings {\r\n /** The thematic image mode used to generate the gradient. Defaults to [[ThematicGradientMode.Smooth]]. */\r\n public readonly mode: ThematicGradientMode;\r\n /** The step count value used for [[ThematicGradientMode.Stepped]], [[ThematicGradientMode.SteppedWithDelimiter]], and [[ThematicGradientMode.IsoLines]]. Defaults to 10. Cannot be less than 2. */\r\n public readonly stepCount: number;\r\n /** The margin color used at the extremes of the gradient, when outside the applied range. Defaults to a black color using [[ColorDef.fromJSON]] with no arguments. */\r\n public readonly marginColor: ColorDef;\r\n /** The color scheme used to generate the colors of the gradient color within the applied range. Defaults to [[ThematicGradientColorScheme.BlueRed]]. */\r\n public readonly colorScheme: ThematicGradientColorScheme;\r\n /** The key color values that must be provided when using a custom thematic color scheme.\r\n * Defaults to empty, unless using a custom thematic color scheme. In that case, this defaults to two key colors going from white to black.\r\n * When using a custom thematic color scheme, there must be at least two entries in here. If there are not, it will revert to the default settings.\r\n */\r\n public readonly customKeys: Gradient.KeyColor[];\r\n /** The percentage to mix in the original color with the thematic display gradient color (0-1).\r\n * Applies to background map terrain and point clouds only. Defaults to 0. */\r\n public readonly colorMix: number;\r\n /** Specifies how the transparency is computed. Defaults to [[ThematicGradientTransparencyMode.SurfaceOnly]].\r\n * @note This property is ignored for gradients applied using an [[AnalysisStyle]] via [[AnalysisStyleThematic]] - in that case, only the color and\r\n * transparency of the thematic gradient are applied.\r\n */\r\n public readonly transparencyMode: ThematicGradientTransparencyMode;\r\n\r\n public static get margin(): number { return .001; } // A fixed portion of the gradient for out of range values.\r\n public static get contentRange(): number { return 1.0 - 2.0 * ThematicGradientSettings.margin; }\r\n public static get contentMax(): number { return 1.0 - ThematicGradientSettings.margin; }\r\n\r\n public static readonly defaults = new ThematicGradientSettings({});\r\n\r\n private static _defaultCustomKeys = [[0.0, 255, 255, 255], [1.0, 0, 0, 0]];\r\n\r\n /** @alpha */\r\n public get textureTransparency(): TextureTransparency {\r\n let transp = TextureTransparency.Opaque;\r\n if (ThematicGradientColorScheme.Custom === this.colorScheme) {\r\n let haveOpaque = false;\r\n let haveTransparent = false;\r\n for (const key of this.customKeys) {\r\n const isOpaque = key.color.isOpaque;\r\n haveOpaque = haveOpaque || isOpaque;\r\n haveTransparent = haveTransparent || !isOpaque;\r\n }\r\n\r\n if (haveTransparent)\r\n transp = haveOpaque ? TextureTransparency.Mixed : TextureTransparency.Translucent;\r\n }\r\n\r\n if (transp !== TextureTransparency.Mixed)\r\n if (this.marginColor.isOpaque !== (transp === TextureTransparency.Opaque))\r\n transp = TextureTransparency.Mixed;\r\n\r\n return transp;\r\n }\r\n\r\n public equals(other: ThematicGradientSettings): boolean {\r\n if (this.mode !== other.mode || this.stepCount !== other.stepCount || !this.marginColor.equals(other.marginColor)\r\n || this.colorScheme !== other.colorScheme || this.customKeys.length !== other.customKeys.length\r\n || this.colorMix !== other.colorMix || this.transparencyMode !== other.transparencyMode) {\r\n return false;\r\n }\r\n\r\n return this.customKeys.every((key, index) => Gradient.keyColorEquals(key, other.customKeys[index]));\r\n }\r\n\r\n /** Compares two sets of thematic gradient settings.\r\n * @param lhs First set of thematic gradient settings to compare\r\n * @param rhs Second set of thematic gradient settings to compare\r\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\r\n */\r\n public static compare(lhs: ThematicGradientSettings, rhs: ThematicGradientSettings): number {\r\n let diff = 0;\r\n if ((diff = compareNumbers(lhs.mode, rhs.mode)) !== 0)\r\n return diff;\r\n if ((diff = compareNumbers(lhs.stepCount, rhs.stepCount)) !== 0)\r\n return diff;\r\n if ((diff = compareNumbers(lhs.marginColor.tbgr, rhs.marginColor.tbgr)) !== 0)\r\n return diff;\r\n if ((diff = compareNumbers(lhs.colorScheme, rhs.colorScheme)) !== 0)\r\n return diff;\r\n if ((diff = compareNumbers(lhs.colorMix, rhs.colorMix)) !== 0)\r\n return diff;\r\n if ((diff = compareNumbers(lhs.customKeys.length, rhs.customKeys.length)) !== 0)\r\n return diff;\r\n if ((diff = compareNumbers(lhs.transparencyMode, rhs.transparencyMode)) !== 0)\r\n return diff;\r\n\r\n for (let i = 0; i < lhs.customKeys.length; i++)\r\n if ((diff = compareNumbers(lhs.customKeys[i].color.tbgr, rhs.customKeys[i].color.tbgr)) !== 0)\r\n return diff;\r\n\r\n return diff;\r\n }\r\n\r\n private constructor(json?: ThematicGradientSettingsProps) {\r\n this.customKeys = [];\r\n if (undefined === json) {\r\n this.mode = ThematicGradientMode.Smooth;\r\n this.stepCount = 10;\r\n this.marginColor = ColorDef.fromJSON();\r\n this.colorScheme = ThematicGradientColorScheme.BlueRed;\r\n this.colorMix = 0.0;\r\n this.transparencyMode = ThematicGradientTransparencyMode.SurfaceOnly;\r\n } else {\r\n this.mode = (json.mode !== undefined && json.mode !== null) ? json.mode : ThematicGradientMode.Smooth;\r\n if (this.mode < ThematicGradientMode.Smooth || this.mode > ThematicGradientMode.IsoLines)\r\n this.mode = ThematicGradientMode.Smooth;\r\n\r\n this.stepCount = (typeof json.stepCount === \"number\") ? json.stepCount : 10;\r\n if (this.stepCount < 2)\r\n this.stepCount = 2;\r\n\r\n this.marginColor = ColorDef.fromJSON(json.marginColor);\r\n\r\n this.colorScheme = (json.colorScheme !== undefined && json.colorScheme !== null) ? json.colorScheme : ThematicGradientColorScheme.BlueRed;\r\n if (this.colorScheme < ThematicGradientColorScheme.BlueRed || this.colorScheme > ThematicGradientColorScheme.Custom)\r\n this.colorScheme = ThematicGradientColorScheme.BlueRed;\r\n\r\n if (json.customKeys !== undefined && json.customKeys !== null)\r\n json.customKeys.forEach((key) => this.customKeys.push(new Gradient.KeyColor(key)));\r\n\r\n // Enforce 2 entries in custom color keys if violated\r\n if (this.colorScheme === ThematicGradientColorScheme.Custom && this.customKeys.length < 2) {\r\n this.customKeys = [];\r\n for (const keyValue of ThematicGradientSettings._defaultCustomKeys)\r\n this.customKeys.push(new Gradient.KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\r\n }\r\n\r\n this.colorMix = json.colorMix ?? 0.0;\r\n this.transparencyMode = json.transparencyMode ?? ThematicGradientTransparencyMode.SurfaceOnly;\r\n }\r\n }\r\n\r\n public static fromJSON(json?: ThematicGradientSettingsProps) {\r\n return json ? new ThematicGradientSettings(json) : this.defaults;\r\n }\r\n\r\n public toJSON(): ThematicGradientSettingsProps {\r\n const props: ThematicGradientSettingsProps = {};\r\n if (ThematicGradientMode.Smooth !== this.mode)\r\n props.mode = this.mode;\r\n\r\n if (10 !== this.stepCount)\r\n props.stepCount = this.stepCount;\r\n\r\n const marginColor = this.marginColor.toJSON();\r\n if (0 !== marginColor)\r\n props.marginColor = marginColor;\r\n\r\n if (ThematicGradientColorScheme.BlueRed !== this.colorScheme)\r\n props.colorScheme = this.colorScheme;\r\n\r\n if (0 !== this.colorMix)\r\n props.colorMix = this.colorMix;\r\n\r\n if (ThematicGradientTransparencyMode.SurfaceOnly !== this.transparencyMode)\r\n props.transparencyMode = this.transparencyMode;\r\n\r\n if (this.customKeys.length > 0)\r\n props.customKeys = this.customKeys.map((key) => { return { value: key.value, color: key.color.toJSON() }; });\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of this ThematicGradientSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A ThematicGradientSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: ThematicGradientSettingsProps): ThematicGradientSettings {\r\n if (undefined === changedProps)\r\n return ThematicGradientSettings.fromJSON(this.toJSON());\r\n\r\n const props: ThematicGradientSettingsProps = {\r\n mode: undefined !== changedProps.mode ? changedProps.mode : this.mode,\r\n stepCount: undefined !== changedProps.stepCount ? changedProps.stepCount : this.stepCount,\r\n marginColor: undefined !== changedProps.marginColor ? changedProps.marginColor : this.marginColor.tbgr,\r\n colorScheme: undefined !== changedProps.colorScheme ? changedProps.colorScheme : this.colorScheme,\r\n customKeys: undefined !== changedProps.customKeys ? changedProps.customKeys : this.customKeys.map((key) => ({ value: key.value, color: key.color.tbgr })),\r\n colorMix: undefined !== changedProps.colorMix ? changedProps.colorMix : this.colorMix,\r\n transparencyMode: changedProps.transparencyMode ?? this.transparencyMode,\r\n };\r\n\r\n return ThematicGradientSettings.fromJSON(props);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[ThematicDisplaySensor]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ThematicDisplaySensorProps {\r\n /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */\r\n position?: XYZProps;\r\n /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */\r\n value?: number;\r\n}\r\n\r\n/** A sensor in world space, used for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\r\n * @public\r\n */\r\nexport class ThematicDisplaySensor {\r\n /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */\r\n public position: Readonly<Point3d>;\r\n /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */\r\n public readonly value: number;\r\n\r\n private constructor(json?: ThematicDisplaySensorProps) {\r\n if (undefined === json) {\r\n this.position = Point3d.fromJSON();\r\n this.value = 0;\r\n } else {\r\n this.position = Point3d.fromJSON(json.position);\r\n this.value = (typeof json.value !== \"number\") ? 0 : json.value;\r\n if (this.value < 0)\r\n this.value = 0;\r\n else if (this.value > 1)\r\n this.value = 1;\r\n }\r\n }\r\n\r\n public equals(other: ThematicDisplaySensor): boolean {\r\n return (this.value === other.value) && this.position.isAlmostEqual(other.position);\r\n }\r\n\r\n public static fromJSON(json?: ThematicDisplaySensorProps) {\r\n return new ThematicDisplaySensor(json);\r\n }\r\n\r\n public toJSON(): ThematicDisplaySensorProps {\r\n return {\r\n position: this.position.toJSON(),\r\n value: this.value,\r\n };\r\n }\r\n}\r\n\r\n/** JSON representation of a [[ThematicDisplaySensorSettings]] for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ThematicDisplaySensorSettingsProps {\r\n /** This is the list of sensors. Defaults to an empty array. */\r\n sensors?: ThematicDisplaySensorProps[];\r\n /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.\r\n * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).\r\n * Defaults to zero.\r\n * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.\r\n */\r\n distanceCutoff?: number;\r\n}\r\n\r\n/** Settings for sensor-based thematic display for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\r\n * @public\r\n */\r\nexport class ThematicDisplaySensorSettings {\r\n /** This is the list of sensors. Defaults to an empty array. */\r\n public readonly sensors: ThematicDisplaySensor[];\r\n /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.\r\n * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).\r\n * Defaults to zero.\r\n * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.\r\n */\r\n public readonly distanceCutoff: number;\r\n\r\n private constructor(json?: ThematicDisplaySensorSettingsProps) {\r\n this.sensors = [];\r\n if (undefined !== json) {\r\n if (json.sensors !== undefined && json.sensors !== null) {\r\n json.sensors.forEach((sensorJSON) => this.sensors.push(ThematicDisplaySensor.fromJSON(sensorJSON)));\r\n }\r\n this.distanceCutoff = (typeof json.distanceCutoff === \"number\") ? json.distanceCutoff : 0;\r\n } else {\r\n this.distanceCutoff = 0;\r\n }\r\n }\r\n\r\n public equals(other: ThematicDisplaySensorSettings): boolean {\r\n if (this.distanceCutoff !== other.distanceCutoff)\r\n return false;\r\n\r\n const thisSensors = this.sensors;\r\n const otherSensors = other.sensors;\r\n\r\n if (thisSensors.length !== otherSensors.length)\r\n return false;\r\n\r\n for (let i = 0; i < thisSensors.length; i++) {\r\n if (!thisSensors[i].equals(otherSensors[i]))\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public static fromJSON(json?: ThematicDisplaySensorSettingsProps) {\r\n return new ThematicDisplaySensorSettings(json);\r\n }\r\n\r\n public toJSON(): ThematicDisplaySensorSettingsProps {\r\n const json: ThematicDisplaySensorSettingsProps = {};\r\n\r\n json.sensors = [];\r\n this.sensors.forEach((sensor) => json.sensors!.push(sensor.toJSON()));\r\n\r\n json.distanceCutoff = this.distanceCutoff;\r\n\r\n return json;\r\n }\r\n}\r\n\r\n/** The thematic display mode. This determines how to apply the thematic color gradient to the geometry.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ThematicDisplayMode {\r\n /** The color gradient will be mapped to surface geometry and point clouds based on world height in meters. */\r\n Height = 0,\r\n /** The color gradient will be mapped to surface geometry and point clouds using inverse distance weighting based on world positions and corresponding values from a list of sensors.\r\n * @note Performance will decrease as more sensors are added.\r\n */\r\n InverseDistanceWeightedSensors = 1,\r\n /** The color gradient will be mapped to surface geometry based on the slope of the surface. The slope value is calculated based on the angle between the surface and the axis specified in the associated [[ThematicDisplay]] object.\r\n * @note This display mode does not affect point clouds.\r\n */\r\n Slope = 2,\r\n /** The color gradient will be mapped to surface geometry based on the direction of a sun shining on the surface.\r\n * @note This display mode does not affect point clouds.\r\n */\r\n HillShade = 3,\r\n}\r\n\r\n/** JSON representation of the thematic display setup of a [[DisplayStyle3d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ThematicDisplayProps {\r\n /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */\r\n displayMode?: ThematicDisplayMode;\r\n /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */\r\n gradientSettings?: ThematicGradientSettingsProps;\r\n /** The range to use when applying the thematic gradient for height and slope mode.\r\n * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.\r\n * For [[ThematicDisplayMode.Slope]], this is a range in degrees with a minimum low value of 0 degrees and a maximum high value of 90 degrees.\r\n * Defaults to a null range.\r\n */\r\n range?: Range1dProps;\r\n /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], calculating the slope of a surface is done in relation to the axis. Defaults to {0,0,0}. */\r\n axis?: XYZProps;\r\n /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */\r\n sunDirection?: XYZProps;\r\n /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.\r\n * @public\r\n */\r\n sensorSettings?: ThematicDisplaySensorSettingsProps;\r\n}\r\n\r\n/** The thematic display setup of a [[DisplayStyle3d]].\r\n * Thematic display allows a user to colorize a scene using a color gradient in a way that provides a visual cue about certain attributes of the rendered geometry. This scene colorization will be done based on certain geometric attributes like height, surface slope, position of surfaces relative to a sun position, or geometric position relative to a list of sensors.\r\n * The documentation for [[ThematicDisplayMode]] describes how each mode colorizes the scene.\r\n * @note Applying thematic display to geometry prevents shadows from applying to the same geometry.\r\n * @public\r\n */\r\nexport class ThematicDisplay {\r\n /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */\r\n public readonly displayMode: ThematicDisplayMode;\r\n /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */\r\n public readonly gradientSettings: ThematicGradientSettings;\r\n /** The range to use when applying the thematic gradient for height and slope mode.\r\n * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.\r\n * For [[ThematicDisplayMode.Slope]], this is a range in radians with a minimum low value of 0 degrees and a maximum high value of 90 degrees.\r\n * Defaults to a null range.\r\n */\r\n public readonly range: Range1d;\r\n /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], the slope of a surface is calculated in relation to this axis. Defaults to {0,0,0}. */\r\n public readonly axis: Vector3d;\r\n /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */\r\n public readonly sunDirection: Vector3d;\r\n /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.\r\n * @public\r\n */\r\n public readonly sensorSettings: ThematicDisplaySensorSettings;\r\n\r\n public equals(other: ThematicDisplay): boolean {\r\n if (this.displayMode !== other.displayMode)\r\n return false;\r\n if (!this.gradientSettings.equals(other.gradientSettings))\r\n return false;\r\n if (!this.range.isAlmostEqual(other.range))\r\n return false;\r\n if (!this.axis.isAlmostEqual(other.axis))\r\n return false;\r\n if (!this.sunDirection.isAlmostEqual(other.sunDirection))\r\n return false;\r\n if (!this.sensorSettings.equals(other.sensorSettings))\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n private constructor(json?: ThematicDisplayProps) {\r\n if (undefined === json) {\r\n this.displayMode = ThematicDisplayMode.Height;\r\n this.gradientSettings = ThematicGradientSettings.fromJSON();\r\n this.axis = Vector3d.fromJSON();\r\n this.range = Range1d.fromJSON();\r\n this.sunDirection = Vector3d.fromJSON();\r\n this.sensorSettings = ThematicDisplaySensorSettings.fromJSON();\r\n } else {\r\n this.displayMode = (json.displayMode !== undefined && json.displayMode !== null) ? json.displayMode : ThematicDisplayMode.Height;\r\n if (this.displayMode < ThematicDisplayMode.Height || this.displayMode > ThematicDisplayMode.HillShade)\r\n this.displayMode = ThematicDisplayMode.Height;\r\n this.gradientSettings = ThematicGradientSettings.fromJSON(json.gradientSettings);\r\n this.axis = Vector3d.fromJSON(json.axis);\r\n this.range = Range1d.fromJSON(json.range);\r\n this.sunDirection = Vector3d.fromJSON(json.sunDirection);\r\n this.sensorSettings = ThematicDisplaySensorSettings.fromJSON(json.sensorSettings);\r\n }\r\n if (ThematicDisplayMode.Height !== this.displayMode) {\r\n // Disallow isoline and stepped-with-delimiter gradient modes in any mode other than height.\r\n if (ThematicGradientMode.IsoLines === this.gradientSettings.mode || ThematicGradientMode.SteppedWithDelimiter === this.gradientSettings.mode) {\r\n const gradientSettingsJSON = this.gradientSettings.toJSON();\r\n gradientSettingsJSON.mode = ThematicGradientMode.Smooth;\r\n this.gradientSettings = ThematicGradientSettings.fromJSON(gradientSettingsJSON);\r\n }\r\n if (ThematicDisplayMode.Slope === this.displayMode) {\r\n if (this.range.low < 0.0)\r\n this.range.low = 0.0;\r\n if (this.range.high > 90.0)\r\n this.range.high = 90.0;\r\n }\r\n }\r\n }\r\n\r\n public static fromJSON(json?: ThematicDisplayProps) {\r\n return new ThematicDisplay(json);\r\n }\r\n\r\n public toJSON(): ThematicDisplayProps {\r\n const json: ThematicDisplayProps = {\r\n displayMode: this.displayMode,\r\n gradientSettings: this.gradientSettings.toJSON(),\r\n axis: this.axis.toJSON(),\r\n sunDirection: this.sunDirection.toJSON(),\r\n range: this.range.toJSON(),\r\n };\r\n\r\n if (this.sensorSettings.sensors.length > 0)\r\n json.sensorSettings = this.sensorSettings.toJSON();\r\n\r\n return json;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ThematicDisplay.js","sourceRoot":"","sources":["../../src/ThematicDisplay.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAqD;AACrD,wDAA0F;AAC1F,yCAAqD;AACrD,yCAAsC;AACtC,iDAAqD;AAErD;;;;GAIG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,kDAAkD;IAClD,mEAAU,CAAA;IACV,mDAAmD;IACnD,qEAAW,CAAA;IACX,yJAAyJ;IACzJ,+FAAwB,CAAA;IACxB,uIAAuI;IACvI,uEAAY,CAAA;AACd,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AAED;;;;;;;GAOG;AACH,IAAY,gCAQX;AARD,WAAY,gCAAgC;IAC1C,wFAAwF;IACxF,qGAAe,CAAA;IACf;;;OAGG;IACH,mIAA8B,CAAA;AAChC,CAAC,EARW,gCAAgC,gDAAhC,gCAAgC,QAQ3C;AAED;;;;;GAKG;AACH,IAAY,2BAeX;AAfD,WAAY,2BAA2B;IACrC,uEAAuE;IACvE,mFAAW,CAAA;IACX,uEAAuE;IACvE,mFAAW,CAAA;IACX,uFAAuF;IACvF,yFAAc,CAAA;IACd,kEAAkE;IAClE,2FAAe,CAAA;IACf,mEAAmE;IACnE,2FAAe,CAAA;IACf;;OAEG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C,QAAQ,CAAC,IAA2B;QAChD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAEM,MAAM;QACX,MAAM,IAAI,GAAyB;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE;YAChD,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACxB,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;SAC3B,CAAC;QAEF,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;YACxC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QAErD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAzFD,0CAyFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { compareNumbers } from \"@itwin/core-bentley\";\nimport { Point3d, Range1d, Range1dProps, Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { Gradient } from \"./Gradient\";\nimport { TextureTransparency } from \"./TextureProps\";\n\n/** A thematic gradient mode used to generate and apply a thematic effect to a scene.\n * @see [[ThematicGradientSettings.mode]]\n * @public\n * @extensions\n */\nexport enum ThematicGradientMode {\n /** Apply a smooth color gradient to the scene. */\n Smooth = 0,\n /** Apply a stepped color gradient to the scene. */\n Stepped = 1,\n /** Apply a stepped color gradient to the scene with delimiters (lines between the color steps). Can only be used with [[ThematicDisplayMode.Height]]. */\n SteppedWithDelimiter = 2,\n /** Apply isolines to the scene to achieve an effect similar to a contour map. Can only be used with [[ThematicDisplayMode.Height]]. */\n IsoLines = 3,\n}\n\n/** Describes how transparency is computed when applying a thematic gradient to a surface.\n * Each [[Gradient.KeyColor]] in [[ThematicGradientSettings.customKeys]] has a transparency value.\n * Each surface to which the gradient is applied has its own transparency.\n * The transparency mode determines how these two values are combined to compute the final transparency.\n * @see [[ThematicGradientSettings.transparencyMode]].\n * @public\n * @extensions\n */\nexport enum ThematicGradientTransparencyMode {\n /** Ignore the gradient's transparency, applying only the surface's own transparency. */\n SurfaceOnly = 0,\n /** The final transparency is computed from the product of the surface and gradient alpha channels.\n * (Alpha is the inverse of transparency, where `alpha = (255 - transparency) / 255`).\n * If the gradient color is opaque, this produces the same result as [[SurfaceOnly]].\n */\n MultiplySurfaceAndGradient = 1,\n}\n\n/** A color scheme used to generate the colors of a thematic gradient within an applied range.\n * @see [[ThematicGradientSettings.colorScheme]]\n * @see [[ThematicDisplay.range]]\n * @public\n * @extensions\n */\nexport enum ThematicGradientColorScheme {\n /** A color gradient scheme that represents a blue-to-red gradation. */\n BlueRed = 0,\n /** A color gradient scheme that represents a red-to-blue gradation. */\n RedBlue = 1,\n /** A color gradient scheme that represents a monochrome (black-to-white) gradation. */\n Monochrome = 2,\n /** A color gradient scheme that suits a topographic gradation. */\n Topographic = 3,\n /** A color gradient scheme that suits a sea-mountain gradation. */\n SeaMountain = 4,\n /** A custom color gradient scheme configured by the user.\n * @see [[ThematicGradientSettings.customKeys]]\n */\n Custom = 5,\n}\n\n/** JSON representation of a [[ThematicGradientSettings]].\n * @public\n * @extensions\n **/\nexport interface ThematicGradientSettingsProps {\n /** See [[ThematicGradientSettings.mode]]. */\n mode?: ThematicGradientMode;\n /** See [[ThematicGradientSettings.stepCount]]. */\n stepCount?: number;\n /** See [[ThematicGradientSettings.marginColor]]. */\n marginColor?: ColorDefProps;\n /** See [[ThematicGradientSettings.colorScheme]]. */\n colorScheme?: ThematicGradientColorScheme;\n /** See [[ThematicGradientSettings.customKeys. */\n customKeys?: Gradient.KeyColorProps[];\n /** See [[ThematicGradientSettings.colorMix]]. */\n colorMix?: number;\n /** See [[ThematicGradientSettings.transparencyMode]]. */\n transparencyMode?: ThematicGradientTransparencyMode;\n}\n\n/** Thematic settings specific to creating a color gradient used by [[ThematicDisplay]].\n * @public\n */\nexport class ThematicGradientSettings {\n /** The thematic image mode used to generate the gradient. Defaults to [[ThematicGradientMode.Smooth]]. */\n public readonly mode: ThematicGradientMode;\n /** The step count value used for [[ThematicGradientMode.Stepped]], [[ThematicGradientMode.SteppedWithDelimiter]], and [[ThematicGradientMode.IsoLines]]. Defaults to 10. Cannot be less than 2. */\n public readonly stepCount: number;\n /** The margin color used at the extremes of the gradient, when outside the applied range. Defaults to a black color using [[ColorDef.fromJSON]] with no arguments. */\n public readonly marginColor: ColorDef;\n /** The color scheme used to generate the colors of the gradient color within the applied range. Defaults to [[ThematicGradientColorScheme.BlueRed]]. */\n public readonly colorScheme: ThematicGradientColorScheme;\n /** The key color values that must be provided when using a custom thematic color scheme.\n * Defaults to empty, unless using a custom thematic color scheme. In that case, this defaults to two key colors going from white to black.\n * When using a custom thematic color scheme, there must be at least two entries in here. If there are not, it will revert to the default settings.\n */\n public readonly customKeys: Gradient.KeyColor[];\n /** The percentage to mix in the original color with the thematic display gradient color (0-1).\n * Applies to background map terrain and point clouds only. Defaults to 0. */\n public readonly colorMix: number;\n /** Specifies how the transparency is computed. Defaults to [[ThematicGradientTransparencyMode.SurfaceOnly]].\n * @note This property is ignored for gradients applied using an [[AnalysisStyle]] via [[AnalysisStyleThematic]] - in that case, only the color and\n * transparency of the thematic gradient are applied.\n */\n public readonly transparencyMode: ThematicGradientTransparencyMode;\n\n public static get margin(): number { return .001; } // A fixed portion of the gradient for out of range values.\n public static get contentRange(): number { return 1.0 - 2.0 * ThematicGradientSettings.margin; }\n public static get contentMax(): number { return 1.0 - ThematicGradientSettings.margin; }\n\n public static readonly defaults = new ThematicGradientSettings({});\n\n private static _defaultCustomKeys = [[0.0, 255, 255, 255], [1.0, 0, 0, 0]];\n\n /** @alpha */\n public get textureTransparency(): TextureTransparency {\n let transp = TextureTransparency.Opaque;\n if (ThematicGradientColorScheme.Custom === this.colorScheme) {\n let haveOpaque = false;\n let haveTransparent = false;\n for (const key of this.customKeys) {\n const isOpaque = key.color.isOpaque;\n haveOpaque = haveOpaque || isOpaque;\n haveTransparent = haveTransparent || !isOpaque;\n }\n\n if (haveTransparent)\n transp = haveOpaque ? TextureTransparency.Mixed : TextureTransparency.Translucent;\n }\n\n if (transp !== TextureTransparency.Mixed)\n if (this.marginColor.isOpaque !== (transp === TextureTransparency.Opaque))\n transp = TextureTransparency.Mixed;\n\n return transp;\n }\n\n public equals(other: ThematicGradientSettings): boolean {\n if (this.mode !== other.mode || this.stepCount !== other.stepCount || !this.marginColor.equals(other.marginColor)\n || this.colorScheme !== other.colorScheme || this.customKeys.length !== other.customKeys.length\n || this.colorMix !== other.colorMix || this.transparencyMode !== other.transparencyMode) {\n return false;\n }\n\n return this.customKeys.every((key, index) => Gradient.keyColorEquals(key, other.customKeys[index]));\n }\n\n /** Compares two sets of thematic gradient settings.\n * @param lhs First set of thematic gradient settings to compare\n * @param rhs Second set of thematic gradient settings to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compare(lhs: ThematicGradientSettings, rhs: ThematicGradientSettings): number {\n let diff = 0;\n if ((diff = compareNumbers(lhs.mode, rhs.mode)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.stepCount, rhs.stepCount)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.marginColor.tbgr, rhs.marginColor.tbgr)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.colorScheme, rhs.colorScheme)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.colorMix, rhs.colorMix)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.customKeys.length, rhs.customKeys.length)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.transparencyMode, rhs.transparencyMode)) !== 0)\n return diff;\n\n for (let i = 0; i < lhs.customKeys.length; i++)\n if ((diff = compareNumbers(lhs.customKeys[i].color.tbgr, rhs.customKeys[i].color.tbgr)) !== 0)\n return diff;\n\n return diff;\n }\n\n private constructor(json?: ThematicGradientSettingsProps) {\n this.customKeys = [];\n if (undefined === json) {\n this.mode = ThematicGradientMode.Smooth;\n this.stepCount = 10;\n this.marginColor = ColorDef.fromJSON();\n this.colorScheme = ThematicGradientColorScheme.BlueRed;\n this.colorMix = 0.0;\n this.transparencyMode = ThematicGradientTransparencyMode.SurfaceOnly;\n } else {\n this.mode = (json.mode !== undefined && json.mode !== null) ? json.mode : ThematicGradientMode.Smooth;\n if (this.mode < ThematicGradientMode.Smooth || this.mode > ThematicGradientMode.IsoLines)\n this.mode = ThematicGradientMode.Smooth;\n\n this.stepCount = (typeof json.stepCount === \"number\") ? json.stepCount : 10;\n if (this.stepCount < 2)\n this.stepCount = 2;\n\n this.marginColor = ColorDef.fromJSON(json.marginColor);\n\n this.colorScheme = (json.colorScheme !== undefined && json.colorScheme !== null) ? json.colorScheme : ThematicGradientColorScheme.BlueRed;\n if (this.colorScheme < ThematicGradientColorScheme.BlueRed || this.colorScheme > ThematicGradientColorScheme.Custom)\n this.colorScheme = ThematicGradientColorScheme.BlueRed;\n\n if (json.customKeys !== undefined && json.customKeys !== null)\n json.customKeys.forEach((key) => this.customKeys.push(new Gradient.KeyColor(key)));\n\n // Enforce 2 entries in custom color keys if violated\n if (this.colorScheme === ThematicGradientColorScheme.Custom && this.customKeys.length < 2) {\n this.customKeys = [];\n for (const keyValue of ThematicGradientSettings._defaultCustomKeys)\n this.customKeys.push(new Gradient.KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n }\n\n this.colorMix = json.colorMix ?? 0.0;\n this.transparencyMode = json.transparencyMode ?? ThematicGradientTransparencyMode.SurfaceOnly;\n }\n }\n\n public static fromJSON(json?: ThematicGradientSettingsProps) {\n return json ? new ThematicGradientSettings(json) : this.defaults;\n }\n\n public toJSON(): ThematicGradientSettingsProps {\n const props: ThematicGradientSettingsProps = {};\n if (ThematicGradientMode.Smooth !== this.mode)\n props.mode = this.mode;\n\n if (10 !== this.stepCount)\n props.stepCount = this.stepCount;\n\n const marginColor = this.marginColor.toJSON();\n if (0 !== marginColor)\n props.marginColor = marginColor;\n\n if (ThematicGradientColorScheme.BlueRed !== this.colorScheme)\n props.colorScheme = this.colorScheme;\n\n if (0 !== this.colorMix)\n props.colorMix = this.colorMix;\n\n if (ThematicGradientTransparencyMode.SurfaceOnly !== this.transparencyMode)\n props.transparencyMode = this.transparencyMode;\n\n if (this.customKeys.length > 0)\n props.customKeys = this.customKeys.map((key) => { return { value: key.value, color: key.color.toJSON() }; });\n\n return props;\n }\n\n /** Create a copy of this ThematicGradientSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A ThematicGradientSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: ThematicGradientSettingsProps): ThematicGradientSettings {\n if (undefined === changedProps)\n return ThematicGradientSettings.fromJSON(this.toJSON());\n\n const props: ThematicGradientSettingsProps = {\n mode: undefined !== changedProps.mode ? changedProps.mode : this.mode,\n stepCount: undefined !== changedProps.stepCount ? changedProps.stepCount : this.stepCount,\n marginColor: undefined !== changedProps.marginColor ? changedProps.marginColor : this.marginColor.tbgr,\n colorScheme: undefined !== changedProps.colorScheme ? changedProps.colorScheme : this.colorScheme,\n customKeys: undefined !== changedProps.customKeys ? changedProps.customKeys : this.customKeys.map((key) => ({ value: key.value, color: key.color.tbgr })),\n colorMix: undefined !== changedProps.colorMix ? changedProps.colorMix : this.colorMix,\n transparencyMode: changedProps.transparencyMode ?? this.transparencyMode,\n };\n\n return ThematicGradientSettings.fromJSON(props);\n }\n}\n\n/** JSON representation of a [[ThematicDisplaySensor]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplaySensorProps {\n /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */\n position?: XYZProps;\n /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */\n value?: number;\n}\n\n/** A sensor in world space, used for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n */\nexport class ThematicDisplaySensor {\n /** The world position of the sensor in X, Y, and Z. Defaults to {0,0,0}. */\n public position: Readonly<Point3d>;\n /** The value of the sensor used when accessing the thematic gradient texture; expected range is 0 to 1. Defaults to 0. */\n public readonly value: number;\n\n private constructor(json?: ThematicDisplaySensorProps) {\n if (undefined === json) {\n this.position = Point3d.fromJSON();\n this.value = 0;\n } else {\n this.position = Point3d.fromJSON(json.position);\n this.value = (typeof json.value !== \"number\") ? 0 : json.value;\n if (this.value < 0)\n this.value = 0;\n else if (this.value > 1)\n this.value = 1;\n }\n }\n\n public equals(other: ThematicDisplaySensor): boolean {\n return (this.value === other.value) && this.position.isAlmostEqual(other.position);\n }\n\n public static fromJSON(json?: ThematicDisplaySensorProps) {\n return new ThematicDisplaySensor(json);\n }\n\n public toJSON(): ThematicDisplaySensorProps {\n return {\n position: this.position.toJSON(),\n value: this.value,\n };\n }\n}\n\n/** JSON representation of a [[ThematicDisplaySensorSettings]] for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplaySensorSettingsProps {\n /** This is the list of sensors. Defaults to an empty array. */\n sensors?: ThematicDisplaySensorProps[];\n /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.\n * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).\n * Defaults to zero.\n * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.\n */\n distanceCutoff?: number;\n}\n\n/** Settings for sensor-based thematic display for [[ThematicDisplayMode.InverseDistanceWeightedSensors]].\n * @public\n */\nexport class ThematicDisplaySensorSettings {\n /** This is the list of sensors. Defaults to an empty array. */\n public readonly sensors: ThematicDisplaySensor[];\n /** This is the distance cutoff in meters. For a position on screen to be affected by a sensor, it must be at least this close to the sensor.\n * If this is zero or negative, then no distance cutoff is applied (all sensors affect all positions regardless of nearness).\n * Defaults to zero.\n * @note Using a suitable distance cutoff imparts a significant performance benefit. The larger this value becomes, performance will degrade.\n */\n public readonly distanceCutoff: number;\n\n private constructor(json?: ThematicDisplaySensorSettingsProps) {\n this.sensors = [];\n if (undefined !== json) {\n if (json.sensors !== undefined && json.sensors !== null) {\n json.sensors.forEach((sensorJSON) => this.sensors.push(ThematicDisplaySensor.fromJSON(sensorJSON)));\n }\n this.distanceCutoff = (typeof json.distanceCutoff === \"number\") ? json.distanceCutoff : 0;\n } else {\n this.distanceCutoff = 0;\n }\n }\n\n public equals(other: ThematicDisplaySensorSettings): boolean {\n if (this.distanceCutoff !== other.distanceCutoff)\n return false;\n\n const thisSensors = this.sensors;\n const otherSensors = other.sensors;\n\n if (thisSensors.length !== otherSensors.length)\n return false;\n\n for (let i = 0; i < thisSensors.length; i++) {\n if (!thisSensors[i].equals(otherSensors[i]))\n return false;\n }\n\n return true;\n }\n\n public static fromJSON(json?: ThematicDisplaySensorSettingsProps) {\n return new ThematicDisplaySensorSettings(json);\n }\n\n public toJSON(): ThematicDisplaySensorSettingsProps {\n const json: ThematicDisplaySensorSettingsProps = {};\n\n json.sensors = [];\n this.sensors.forEach((sensor) => json.sensors!.push(sensor.toJSON()));\n\n json.distanceCutoff = this.distanceCutoff;\n\n return json;\n }\n}\n\n/** The thematic display mode. This determines how to apply the thematic color gradient to the geometry.\n * @public\n * @extensions\n */\nexport enum ThematicDisplayMode {\n /** The color gradient will be mapped to surface geometry and point clouds based on world height in meters. */\n Height = 0,\n /** The color gradient will be mapped to surface geometry and point clouds using inverse distance weighting based on world positions and corresponding values from a list of sensors.\n * @note Performance will decrease as more sensors are added.\n */\n InverseDistanceWeightedSensors = 1,\n /** The color gradient will be mapped to surface geometry based on the slope of the surface. The slope value is calculated based on the angle between the surface and the axis specified in the associated [[ThematicDisplay]] object.\n * @note This display mode does not affect point clouds.\n */\n Slope = 2,\n /** The color gradient will be mapped to surface geometry based on the direction of a sun shining on the surface.\n * @note This display mode does not affect point clouds.\n */\n HillShade = 3,\n}\n\n/** JSON representation of the thematic display setup of a [[DisplayStyle3d]].\n * @public\n * @extensions\n */\nexport interface ThematicDisplayProps {\n /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */\n displayMode?: ThematicDisplayMode;\n /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */\n gradientSettings?: ThematicGradientSettingsProps;\n /** The range to use when applying the thematic gradient for height and slope mode.\n * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.\n * For [[ThematicDisplayMode.Slope]], this is a range in degrees with a minimum low value of 0 degrees and a maximum high value of 90 degrees.\n * Defaults to a null range.\n */\n range?: Range1dProps;\n /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], calculating the slope of a surface is done in relation to the axis. Defaults to {0,0,0}. */\n axis?: XYZProps;\n /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */\n sunDirection?: XYZProps;\n /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.\n * @public\n */\n sensorSettings?: ThematicDisplaySensorSettingsProps;\n}\n\n/** The thematic display setup of a [[DisplayStyle3d]].\n * Thematic display allows a user to colorize a scene using a color gradient in a way that provides a visual cue about certain attributes of the rendered geometry. This scene colorization will be done based on certain geometric attributes like height, surface slope, position of surfaces relative to a sun position, or geometric position relative to a list of sensors.\n * The documentation for [[ThematicDisplayMode]] describes how each mode colorizes the scene.\n * @note Applying thematic display to geometry prevents shadows from applying to the same geometry.\n * @public\n */\nexport class ThematicDisplay {\n /** The thematic display mode. This determines how to apply the thematic color gradient to the geometry. Defaults to [[ThematicDisplayMode.Height]]. */\n public readonly displayMode: ThematicDisplayMode;\n /** The settings used to create a color gradient applied to the geometry. Defaults to an instantiation using [[ThematicGradientSettings.fromJSON]] with no arguments. */\n public readonly gradientSettings: ThematicGradientSettings;\n /** The range to use when applying the thematic gradient for height and slope mode.\n * For [[ThematicDisplayMode.Height]], this is world space in meters and represents the range in which to apply the gradient along the specified axis.\n * For [[ThematicDisplayMode.Slope]], this is a range in radians with a minimum low value of 0 degrees and a maximum high value of 90 degrees.\n * Defaults to a null range.\n */\n public readonly range: Range1d;\n /** For [[ThematicDisplayMode.Height]], this is the axis along which to apply the thematic gradient in the scene. For [[ThematicDisplayMode.Slope]], the slope of a surface is calculated in relation to this axis. Defaults to {0,0,0}. */\n public readonly axis: Vector3d;\n /** For [[ThematicDisplayMode.HillShade]], this is the direction of the sun in world space. Defaults to {0,0,0}. */\n public readonly sunDirection: Vector3d;\n /** For [[ThematicDisplayMode.InverseDistanceWeightedSensors]], these are the settings that control the sensors. Defaults to an instantiation using [[ThematicDisplaySensorSettings.fromJSON]] with no arguments.\n * @public\n */\n public readonly sensorSettings: ThematicDisplaySensorSettings;\n\n public equals(other: ThematicDisplay): boolean {\n if (this.displayMode !== other.displayMode)\n return false;\n if (!this.gradientSettings.equals(other.gradientSettings))\n return false;\n if (!this.range.isAlmostEqual(other.range))\n return false;\n if (!this.axis.isAlmostEqual(other.axis))\n return false;\n if (!this.sunDirection.isAlmostEqual(other.sunDirection))\n return false;\n if (!this.sensorSettings.equals(other.sensorSettings))\n return false;\n\n return true;\n }\n\n private constructor(json?: ThematicDisplayProps) {\n if (undefined === json) {\n this.displayMode = ThematicDisplayMode.Height;\n this.gradientSettings = ThematicGradientSettings.fromJSON();\n this.axis = Vector3d.fromJSON();\n this.range = Range1d.fromJSON();\n this.sunDirection = Vector3d.fromJSON();\n this.sensorSettings = ThematicDisplaySensorSettings.fromJSON();\n } else {\n this.displayMode = (json.displayMode !== undefined && json.displayMode !== null) ? json.displayMode : ThematicDisplayMode.Height;\n if (this.displayMode < ThematicDisplayMode.Height || this.displayMode > ThematicDisplayMode.HillShade)\n this.displayMode = ThematicDisplayMode.Height;\n this.gradientSettings = ThematicGradientSettings.fromJSON(json.gradientSettings);\n this.axis = Vector3d.fromJSON(json.axis);\n this.range = Range1d.fromJSON(json.range);\n this.sunDirection = Vector3d.fromJSON(json.sunDirection);\n this.sensorSettings = ThematicDisplaySensorSettings.fromJSON(json.sensorSettings);\n }\n if (ThematicDisplayMode.Height !== this.displayMode) {\n // Disallow isoline and stepped-with-delimiter gradient modes in any mode other than height.\n if (ThematicGradientMode.IsoLines === this.gradientSettings.mode || ThematicGradientMode.SteppedWithDelimiter === this.gradientSettings.mode) {\n const gradientSettingsJSON = this.gradientSettings.toJSON();\n gradientSettingsJSON.mode = ThematicGradientMode.Smooth;\n this.gradientSettings = ThematicGradientSettings.fromJSON(gradientSettingsJSON);\n }\n if (ThematicDisplayMode.Slope === this.displayMode) {\n if (this.range.low < 0.0)\n this.range.low = 0.0;\n if (this.range.high > 90.0)\n this.range.high = 90.0;\n }\n }\n }\n\n public static fromJSON(json?: ThematicDisplayProps) {\n return new ThematicDisplay(json);\n }\n\n public toJSON(): ThematicDisplayProps {\n const json: ThematicDisplayProps = {\n displayMode: this.displayMode,\n gradientSettings: this.gradientSettings.toJSON(),\n axis: this.axis.toJSON(),\n sunDirection: this.sunDirection.toJSON(),\n range: this.range.toJSON(),\n };\n\n if (this.sensorSettings.sensors.length > 0)\n json.sensorSettings = this.sensorSettings.toJSON();\n\n return json;\n }\n}\n"]}
@@ -16,7 +16,7 @@ export interface ThumbnailFormatProps {
16
16
  format: "jpeg" | "png";
17
17
  }
18
18
  /** Describes a thumbnail image for an [[IModel]] or [ViewDefinition]($backend).
19
- * @see [IModelDb.Views.getThumbnail]($backend) or [IModelConnection.Views.getThumbnail]($frontend) to obtain a thumbnail for a view.
19
+ * @see [IModelDb.Views.getThumbnail]($backend)
20
20
  * @public
21
21
  * @extensions
22
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Thumbnail.js","sourceRoot":"","sources":["../../src/Thumbnail.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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\n/** Metadata about a thumbnail image. Often this is redundant with information in the image itself, but is held\r\n * outside of the image so it can be obtained without having to decode the image data.\r\n * @see [[ThumbnailProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ThumbnailFormatProps {\r\n /** X size of the image, in pixels. */\r\n width: number;\r\n /** Y size of image, in pixels. */\r\n height: number;\r\n /** Encoding of the image */\r\n format: \"jpeg\" | \"png\";\r\n}\r\n\r\n/** Describes a thumbnail image for an [[IModel]] or [ViewDefinition]($backend).\r\n * @see [IModelDb.Views.getThumbnail]($backend) or [IModelConnection.Views.getThumbnail]($frontend) to obtain a thumbnail for a view.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ThumbnailProps extends ThumbnailFormatProps {\r\n /** The image encoded as specified by [[ThumbnailFormatProps.format]]. */\r\n image: Uint8Array;\r\n}\r\n"]}
1
+ {"version":3,"file":"Thumbnail.js","sourceRoot":"","sources":["../../src/Thumbnail.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\n/** Metadata about a thumbnail image. Often this is redundant with information in the image itself, but is held\n * outside of the image so it can be obtained without having to decode the image data.\n * @see [[ThumbnailProps]]\n * @public\n * @extensions\n */\nexport interface ThumbnailFormatProps {\n /** X size of the image, in pixels. */\n width: number;\n /** Y size of image, in pixels. */\n height: number;\n /** Encoding of the image */\n format: \"jpeg\" | \"png\";\n}\n\n/** Describes a thumbnail image for an [[IModel]] or [ViewDefinition]($backend).\n * @see [IModelDb.Views.getThumbnail]($backend)\n * @public\n * @extensions\n */\nexport interface ThumbnailProps extends ThumbnailFormatProps {\n /** The image encoded as specified by [[ThumbnailFormatProps.format]]. */\n image: Uint8Array;\n}\n"]}