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

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 +38 -1
  139. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  140. package/lib/cjs/MapLayerSettings.js +71 -4
  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 +38 -1
  535. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  536. package/lib/esm/MapLayerSettings.js +70 -3
  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
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { assert } from "@itwin/core-bentley";
9
9
  import { BackgroundMapProvider, BackgroundMapType } from "./BackgroundMapProvider";
10
+ ;
10
11
  /** Normalized representation of a [[MapSubLayerProps]] for which values
11
12
  * have been validated and default values have been applied where explicit values not defined.
12
13
  * A map sub layer represents a set of objects within the layer that can be controlled separately. These
@@ -16,6 +17,18 @@ import { BackgroundMapProvider, BackgroundMapType } from "./BackgroundMapProvide
16
17
  * @public
17
18
  */
18
19
  export class MapSubLayerSettings {
20
+ /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */
21
+ name;
22
+ /** Title. */
23
+ title;
24
+ /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */
25
+ visible;
26
+ /** A unique string or number that may be used to identify the sub layer (ArcGIS) */
27
+ id;
28
+ /** One or more sublayer children */
29
+ children;
30
+ /** sublayer parent. */
31
+ parent;
19
32
  constructor(name, title, visible, id, parent, children) {
20
33
  this.name = name;
21
34
  this.title = title;
@@ -67,6 +80,16 @@ export class MapSubLayerSettings {
67
80
  /** return a string representing this sublayer id (converting to string if underlying id is number) */
68
81
  get idString() { return (typeof this.id === "number") ? this.id.toString(10) : this.id; }
69
82
  }
83
+ /** The target onto which to drape a model map layer.
84
+ * @beta
85
+ */
86
+ export var ModelMapLayerDrapeTarget;
87
+ (function (ModelMapLayerDrapeTarget) {
88
+ /** Drape only onto the globe. */
89
+ ModelMapLayerDrapeTarget[ModelMapLayerDrapeTarget["Globe"] = 0] = "Globe";
90
+ /** Drape only onto all attached reality data. */
91
+ ModelMapLayerDrapeTarget[ModelMapLayerDrapeTarget["RealityData"] = 1] = "RealityData";
92
+ })(ModelMapLayerDrapeTarget || (ModelMapLayerDrapeTarget = {}));
70
93
  /** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
71
94
  * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.
72
95
  * One or more map layers may be included within [[MapImagerySettings]] object.
@@ -74,6 +97,10 @@ export class MapSubLayerSettings {
74
97
  * @public
75
98
  */
76
99
  export class MapLayerSettings {
100
+ visible;
101
+ name;
102
+ transparency;
103
+ transparentBackground;
77
104
  /** @internal */
78
105
  constructor(name, visible = true, transparency = 0, transparentBackground = true) {
79
106
  this.name = name;
@@ -123,6 +150,25 @@ export class MapLayerSettings {
123
150
  * @public
124
151
  */
125
152
  export class ImageMapLayerSettings extends MapLayerSettings {
153
+ formatId;
154
+ url;
155
+ userName;
156
+ password;
157
+ accessKey;
158
+ /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.
159
+ * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.
160
+ * @beta
161
+ */
162
+ savedQueryParams;
163
+ /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.
164
+ * @beta
165
+ */
166
+ unsavedQueryParams;
167
+ /** Properties specific to the map layer provider.
168
+ * @beta
169
+ */
170
+ properties;
171
+ subLayers;
126
172
  get source() { return this.url; }
127
173
  /** @internal */
128
174
  constructor(props) {
@@ -134,6 +180,9 @@ export class ImageMapLayerSettings extends MapLayerSettings {
134
180
  if (props.queryParams) {
135
181
  this.savedQueryParams = { ...props.queryParams };
136
182
  }
183
+ if (props.properties) {
184
+ this.properties = { ...props.properties };
185
+ }
137
186
  this.subLayers = [];
138
187
  if (!props.subLayers)
139
188
  return;
@@ -155,6 +204,9 @@ export class ImageMapLayerSettings extends MapLayerSettings {
155
204
  props.subLayers = this.subLayers.map((x) => x.toJSON());
156
205
  if (this.savedQueryParams)
157
206
  props.queryParams = { ...this.savedQueryParams };
207
+ if (this.properties) {
208
+ props.properties = structuredClone(this.properties);
209
+ }
158
210
  return props;
159
211
  }
160
212
  /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
@@ -166,7 +218,6 @@ export class ImageMapLayerSettings extends MapLayerSettings {
166
218
  // Clone members not part of MapLayerProps
167
219
  clone.userName = this.userName;
168
220
  clone.password = this.password;
169
- clone.accessKey = this.accessKey;
170
221
  if (this.unsavedQueryParams)
171
222
  clone.unsavedQueryParams = { ...this.unsavedQueryParams };
172
223
  if (this.savedQueryParams)
@@ -186,6 +237,12 @@ export class ImageMapLayerSettings extends MapLayerSettings {
186
237
  else if (this.savedQueryParams) {
187
238
  props.queryParams = { ...this.savedQueryParams };
188
239
  }
240
+ if (changedProps.properties) {
241
+ props.properties = { ...changedProps.properties };
242
+ }
243
+ else if (this.properties) {
244
+ props.properties = { ...this.properties };
245
+ }
189
246
  return props;
190
247
  }
191
248
  /** @internal */
@@ -274,21 +331,29 @@ export class ImageMapLayerSettings extends MapLayerSettings {
274
331
  * @public
275
332
  */
276
333
  export class ModelMapLayerSettings extends MapLayerSettings {
334
+ /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).
335
+ * @beta
336
+ */
337
+ drapeTarget;
338
+ modelId;
277
339
  get source() { return this.modelId; }
278
340
  /** @internal */
279
- constructor(modelId, name, visible = true, transparency = 0, transparentBackground = true) {
341
+ constructor(modelId, name, visible = true, transparency = 0, transparentBackground = true, drapeTarget = ModelMapLayerDrapeTarget.Globe) {
280
342
  super(name, visible, transparency, transparentBackground);
281
343
  this.modelId = modelId;
344
+ this.drapeTarget = drapeTarget;
282
345
  }
283
346
  /** Construct from JSON, performing validation and applying default values for undefined fields. */
284
347
  static fromJSON(json) {
285
348
  const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;
286
- return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground);
349
+ return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground, json.drapeTarget);
287
350
  }
288
351
  /** return JSON representation of this MapLayerSettings object */
289
352
  toJSON() {
290
353
  const props = super._toJSON();
291
354
  props.modelId = this.modelId;
355
+ if (this.drapeTarget !== ModelMapLayerDrapeTarget.Globe)
356
+ props.drapeTarget = this.drapeTarget;
292
357
  return props;
293
358
  }
294
359
  /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
@@ -302,6 +367,7 @@ export class ModelMapLayerSettings extends MapLayerSettings {
302
367
  cloneProps(changedProps) {
303
368
  const props = super.cloneProps(changedProps);
304
369
  props.modelId = changedProps.modelId ?? this.modelId;
370
+ props.drapeTarget = changedProps.drapeTarget ?? this.drapeTarget;
305
371
  return props;
306
372
  }
307
373
  /** @internal */
@@ -324,6 +390,7 @@ export class ModelMapLayerSettings extends MapLayerSettings {
324
390
  * @public
325
391
  */
326
392
  export class BaseMapLayerSettings extends ImageMapLayerSettings {
393
+ _provider;
327
394
  /** The provider from which this base layer was configured, if any. */
328
395
  get provider() { return this._provider; }
329
396
  /** Create a base layer from its JSON representation.
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerSettings.js","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAA8B,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AA2B/G;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAmB;IAc9B,YAAY,IAAY,EAAE,KAAc,EAAE,OAAiB,EAAE,EAAe,EAAE,MAAmB,EAAE,QAAuB;QACxH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC;QAChD,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,mGAAmG;IAC5F,MAAM,CAAC,QAAQ,CAAC,IAAsB;QAC3C,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CA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,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,aAAa;IACN,iBAAiB,CAAC,QAA+B;QACtD,OAAO,oBAAoB,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACpH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from \"./BackgroundMapProvider\";\r\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\r\n\r\n/** The current set of supported map layer formats.\r\n * In order to be displayed, a corresponding format must have been registered in the [MapLayerFormatRegistry]($frontend)\r\n * @public\r\n */\r\nexport type ImageryMapLayerFormatId = \"ArcGIS\" | \"BingMaps\" | \"MapboxImagery\" | \"TileURL\" | \"WMS\" | \"WMTS\";\r\n\r\n/** @public */\r\nexport type SubLayerId = string | number;\r\n\r\n/** JSON representation of the settings associated with a map sublayer included within a [[MapLayerProps]].\r\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\r\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\r\n * @see [[MapLayerProps]]\r\n * @public\r\n */\r\nexport interface MapSubLayerProps {\r\n name: string;\r\n title?: string;\r\n visible?: boolean;\r\n id?: SubLayerId;\r\n parent?: SubLayerId;\r\n children?: SubLayerId[];\r\n}\r\n\r\n/** Normalized representation of a [[MapSubLayerProps]] for which values\r\n * have been validated and default values have been applied where explicit values not defined.\r\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\r\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\r\n * This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.\r\n * @see [[MapLayerSettings]]\r\n * @public\r\n */\r\nexport class MapSubLayerSettings {\r\n /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */\r\n public readonly name: string;\r\n /** Title. */\r\n public readonly title?: string;\r\n /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */\r\n public readonly visible: boolean;\r\n /** A unique string or number that may be used to identify the sub layer (ArcGIS) */\r\n public readonly id: SubLayerId;\r\n /** One or more sublayer children */\r\n public readonly children?: SubLayerId[];\r\n /** sublayer parent. */\r\n public readonly parent?: SubLayerId;\r\n\r\n constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]) {\r\n this.name = name;\r\n this.title = title;\r\n this.visible = visible !== undefined && visible;\r\n this.id = (id === undefined) ? this.name : id;\r\n this.parent = parent;\r\n this.children = children;\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\r\n public static fromJSON(json: MapSubLayerProps): MapSubLayerSettings {\r\n return new MapSubLayerSettings(json.name, json.title, json.visible, (json.id === json.name) ? undefined : json.id, json.parent, json.children);\r\n }\r\n\r\n public toJSON(): MapSubLayerProps {\r\n const props: MapSubLayerProps = { name: this.name, visible: this.visible };\r\n\r\n if (undefined !== this.id && this.id !== this.name)\r\n props.id = this.id;\r\n\r\n if (undefined !== this.title)\r\n props.title = this.title;\r\n\r\n if (this.children)\r\n props.children = [...this.children];\r\n\r\n if (undefined !== this.parent)\r\n props.parent = this.parent;\r\n\r\n return props;\r\n }\r\n\r\n /** Creating a copy of this MapSubLayer, optionally modifying some if its properties */\r\n public clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n const props = {\r\n name: undefined !== changedProps.name ? changedProps.name : this.name,\r\n id: undefined !== changedProps.id ? changedProps.id : this.id,\r\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\r\n parent: undefined !== changedProps.parent ? changedProps.parent : this.parent,\r\n children: undefined !== changedProps.children ? changedProps.children.slice() : this.children?.slice(),\r\n title: undefined !== changedProps.title ? changedProps.title : this.title,\r\n };\r\n return MapSubLayerSettings.fromJSON(props);\r\n }\r\n\r\n /** @internal */\r\n public displayMatches(other: MapSubLayerSettings): boolean {\r\n return this.name === other.name && this.visible === other.visible;\r\n }\r\n\r\n /** return true if this sublayer is named. */\r\n public get isNamed(): boolean { return this.name.length > 0; }\r\n\r\n /** return true if this sublayer is a leaf (has no children) */\r\n public get isLeaf(): boolean { return this.children === undefined || this.children.length === 0; }\r\n\r\n /** return true if this sublayer is an unnamed group */\r\n public get isUnnamedGroup(): boolean { return !this.isLeaf && !this.isNamed; }\r\n\r\n /** return a string representing this sublayer id (converting to string if underlying id is number) */\r\n public get idString(): string { return (typeof this.id === \"number\") ? this.id.toString(10) : this.id; }\r\n}\r\n\r\n/** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].\r\n * @see [[MapImageryProps]]\r\n * @public\r\n */\r\nexport interface CommonMapLayerProps {\r\n /** Controls visibility of layer. Defaults to 'true'. */\r\n visible?: boolean;\r\n\r\n /** A user-friendly name for the layer. */\r\n name: string;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,\r\n * or false to indicate the transparency should not be overridden.\r\n * Default value: 0.\r\n */\r\n transparency?: number;\r\n /** True to indicate background is transparent.\r\n * Default: true.\r\n */\r\n transparentBackground?: boolean;\r\n}\r\n\r\n/** JSON representation of an [[ImageMapLayerSettings]].\r\n * @see [[MapImagerySettings]].\r\n * @see [[ImageryMapLayerFormatId]].\r\n * @public\r\n */\r\nexport interface ImageMapLayerProps extends CommonMapLayerProps {\r\n /** URL */\r\n url: string;\r\n /** Identifies the map layers source.*/\r\n formatId: string;\r\n /** Source layers. If undefined all layers are displayed. */\r\n subLayers?: MapSubLayerProps[];\r\n /** Access Key for the Layer, like a subscription key or access token.\r\n * ###TODO This does not belong in the props object. It should never be persisted.\r\n */\r\n /** @internal */\r\n accessKey?: MapLayerKey;\r\n\r\n /** @internal */\r\n modelId?: never;\r\n\r\n /** List of query parameters that will get appended to the source.\r\n * @beta\r\n */\r\n queryParams?: { [key: string]: string };\r\n\r\n}\r\n\r\n/** JSON representation of a [[ModelMapLayerSettings]].\r\n * @see [[MapImagerySettings]].\r\n * @public\r\n */\r\nexport interface ModelMapLayerProps extends CommonMapLayerProps {\r\n /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */\r\n modelId: Id64String;\r\n\r\n /** @internal */\r\n url?: never;\r\n /** @internal */\r\n formatId?: never;\r\n /** @internal */\r\n subLayers?: never;\r\n /** @internal */\r\n accessKey?: never;\r\n}\r\n\r\n/** JSON representation of a [[MapLayerSettings]].\r\n * @see [[MapImagerySettings]].\r\n * @public\r\n */\r\nexport type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;\r\n\r\n/**\r\n * stores key-value pair to be added to all requests made involving map layer.\r\n * @public\r\n */\r\nexport interface MapLayerKey {\r\n key: string;\r\n value: string;\r\n}\r\n\r\n/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\r\n * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.\r\n * One or more map layers may be included within [[MapImagerySettings]] object.\r\n * @see [[MapImagerySettings]]\r\n * @public\r\n */\r\nexport abstract class MapLayerSettings {\r\n public readonly visible: boolean;\r\n\r\n public readonly name: string;\r\n public readonly transparency: number;\r\n public readonly transparentBackground: boolean;\r\n public abstract get allSubLayersInvisible(): boolean;\r\n public abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;\r\n public abstract toJSON(): MapLayerProps;\r\n\r\n /** @internal */\r\n protected constructor(name: string, visible = true, transparency: number = 0, transparentBackground = true) {\r\n this.name = name;\r\n this.visible = visible;\r\n this.transparentBackground = transparentBackground;\r\n this.transparency = transparency;\r\n }\r\n\r\n /** Create a map layer settings from its JSON representation. */\r\n public static fromJSON(props: MapLayerProps): MapLayerSettings {\r\n return undefined !== props.modelId ? ModelMapLayerSettings.fromJSON(props) : ImageMapLayerSettings.fromJSON(props);\r\n }\r\n\r\n /** @internal */\r\n protected _toJSON(): CommonMapLayerProps {\r\n const props: CommonMapLayerProps = {\r\n name: this.name,\r\n visible: this.visible,\r\n };\r\n\r\n if (0 !== this.transparency)\r\n props.transparency = this.transparency;\r\n\r\n if (this.transparentBackground === false)\r\n props.transparentBackground = this.transparentBackground;\r\n\r\n return props;\r\n }\r\n\r\n /** @internal */\r\n protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps {\r\n return {\r\n name: undefined !== changedProps.name ? changedProps.name : this.name,\r\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\r\n transparency: undefined !== changedProps.transparency ? changedProps.transparency : this.transparency,\r\n transparentBackground: undefined !== changedProps.transparentBackground ? changedProps.transparentBackground : this.transparentBackground,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public displayMatches(other: MapLayerSettings): boolean {\r\n return this.name === other.name && this.visible === other.visible && this.transparency === other.transparency && this.transparentBackground === other.transparentBackground;\r\n }\r\n\r\n /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */\r\n public abstract get source(): string;\r\n\r\n /** @internal */\r\n public matchesNameAndSource(name: string, source: string): boolean {\r\n return this.name === name && this.source === source;\r\n }\r\n}\r\n\r\n/** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\r\n * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.\r\n * One or more map layers may be included within [[MapImagerySettings]] object.\r\n * @see [[MapImagerySettings]]\r\n * @see [[ModelMapLayerSettings]] for model based map layer settings.\r\n * @public\r\n */\r\nexport class ImageMapLayerSettings extends MapLayerSettings {\r\n public readonly formatId: string;\r\n public readonly url: string;\r\n public userName?: string;\r\n public password?: string;\r\n public accessKey?: MapLayerKey;\r\n\r\n /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.\r\n * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.\r\n * @beta\r\n */\r\n public savedQueryParams?: { [key: string]: string };\r\n\r\n /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.\r\n * @beta\r\n */\r\n public unsavedQueryParams?: { [key: string]: string };\r\n public readonly subLayers: MapSubLayerSettings[];\r\n public override get source(): string { return this.url; }\r\n\r\n /** @internal */\r\n protected constructor(props: ImageMapLayerProps) {\r\n const transparentBackground = props.transparentBackground ?? true;\r\n super(props.name, props.visible, props.transparency, transparentBackground);\r\n\r\n this.formatId = props.formatId;\r\n this.url = props.url;\r\n this.accessKey = props.accessKey;\r\n if (props.queryParams) {\r\n this.savedQueryParams = {...props.queryParams};\r\n }\r\n this.subLayers = [];\r\n if (!props.subLayers)\r\n return;\r\n\r\n for (const subLayerProps of props.subLayers) {\r\n const subLayer = MapSubLayerSettings.fromJSON(subLayerProps);\r\n if (subLayer)\r\n this.subLayers.push(subLayer);\r\n }\r\n }\r\n\r\n public static override fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings {\r\n return new this(props);\r\n }\r\n\r\n /** return JSON representation of this MapLayerSettings object */\r\n public override toJSON(): ImageMapLayerProps {\r\n const props = super._toJSON() as ImageMapLayerProps;\r\n props.url = this.url;\r\n props.formatId = this.formatId;\r\n\r\n if (this.subLayers.length > 0)\r\n props.subLayers = this.subLayers.map((x) => x.toJSON());\r\n\r\n if (this.savedQueryParams)\r\n props.queryParams = {...this.savedQueryParams};\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings {\r\n const clone = ImageMapLayerSettings.fromJSON(this.cloneProps(changedProps));\r\n\r\n // Clone members not part of MapLayerProps\r\n clone.userName = this.userName;\r\n clone.password = this.password;\r\n clone.accessKey = this.accessKey;\r\n if (this.unsavedQueryParams)\r\n clone.unsavedQueryParams = {...this.unsavedQueryParams};\r\n if (this.savedQueryParams)\r\n clone.savedQueryParams = {...this.savedQueryParams};\r\n\r\n return clone;\r\n }\r\n\r\n /** @internal */\r\n protected override cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps {\r\n const props = super.cloneProps(changedProps) as ImageMapLayerProps;\r\n\r\n props.formatId = changedProps.formatId ?? this.formatId;\r\n props.url = changedProps.url ?? this.url;\r\n props.accessKey = changedProps.accessKey ?? this.accessKey;\r\n props.subLayers = changedProps.subLayers ?? this.subLayers;\r\n if (changedProps.queryParams) {\r\n props.queryParams = {...changedProps.queryParams};\r\n } else if (this.savedQueryParams) {\r\n props.queryParams = {...this.savedQueryParams};\r\n }\r\n\r\n return props;\r\n }\r\n\r\n /** @internal */\r\n public override displayMatches(other: MapLayerSettings): boolean {\r\n if (! (other instanceof ImageMapLayerSettings) || !super.displayMatches(other))\r\n return false;\r\n\r\n if (this.userName !== other.userName || this.password !== other.password || this.subLayers.length !== other.subLayers.length) {\r\n return false;\r\n }\r\n\r\n for (let i = 0; i < this.subLayers.length; i++)\r\n if (!this.subLayers[i].displayMatches(other.subLayers[i]))\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n /** Return a sublayer matching id -- or undefined if not found */\r\n public subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined {\r\n return id === undefined ? undefined : this.subLayers.find((subLayer) => subLayer.id === id);\r\n }\r\n\r\n private hasInvisibleAncestors(subLayer?: MapSubLayerSettings): boolean {\r\n if (!subLayer || !subLayer.parent)\r\n return false;\r\n\r\n const parent = this.subLayerById(subLayer.parent);\r\n if (!parent)\r\n return false;\r\n\r\n // Visibility of named group has no impact on the visibility of children (only unnamed group does)\r\n // i.e For WMS, its should be possible to request a child layer when its parent is not visible (if the parent is also named)\r\n return (!parent.visible && !parent.isNamed) || this.hasInvisibleAncestors(parent);\r\n }\r\n\r\n /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */\r\n public isSubLayerVisible(subLayer: MapSubLayerSettings): boolean {\r\n if (!subLayer.visible)\r\n return false;\r\n\r\n return !this.hasInvisibleAncestors(subLayer);\r\n }\r\n\r\n /** Return true if all sublayers are invisible. */\r\n public get allSubLayersInvisible(): boolean {\r\n if (this.subLayers.length === 0)\r\n return false;\r\n\r\n return this.subLayers.every((subLayer) => (subLayer.isUnnamedGroup || !this.isSubLayerVisible(subLayer)));\r\n }\r\n\r\n /** Return the children for a sublayer */\r\n public getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined {\r\n if (!subLayer.children)\r\n return undefined;\r\n\r\n const children = new Array<MapSubLayerSettings>();\r\n subLayer.children.forEach((childId) => {\r\n const child = this.subLayerById(childId);\r\n if (child !== undefined)\r\n children.push(child);\r\n });\r\n\r\n return children;\r\n }\r\n\r\n /** @internal */\r\n protected static mapTypeName(type: BackgroundMapType) { // TBD.. Localization.\r\n switch (type) {\r\n case BackgroundMapType.Aerial:\r\n return \"Aerial Imagery\";\r\n default:\r\n case BackgroundMapType.Hybrid:\r\n return \"Aerial Imagery with labels\";\r\n case BackgroundMapType.Street:\r\n return \"Streets\";\r\n }\r\n }\r\n\r\n public setCredentials(userName?: string, password?: string) {\r\n this.userName = userName;\r\n this.password = password;\r\n }\r\n\r\n /** Collect all query parameters\r\n * @beta\r\n */\r\n public collectQueryParams() {\r\n let queryParams: {[key: string]: string} = {};\r\n if (this.savedQueryParams)\r\n queryParams = {...this.savedQueryParams};\r\n\r\n if (this.unsavedQueryParams)\r\n queryParams = {...queryParams, ...this.unsavedQueryParams};\r\n\r\n return queryParams;\r\n }\r\n}\r\n\r\n/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\r\n * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.\r\n * One or more map layers may be included within [[MapImagerySettings]] object.\r\n * @see [[MapImagerySettings]]\r\n * @see [[ImageMapLayerSettings]] for image based map layer settings.\r\n * @public\r\n */\r\nexport class ModelMapLayerSettings extends MapLayerSettings {\r\n public readonly modelId: Id64String;\r\n public override get source(): string { return this.modelId; }\r\n\r\n /** @internal */\r\n protected constructor(modelId: Id64String, name: string, visible = true,\r\n transparency: number = 0, transparentBackground = true) {\r\n super(name, visible, transparency, transparentBackground);\r\n this.modelId = modelId;\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\r\n public static override fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings {\r\n const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;\r\n return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground);\r\n }\r\n\r\n /** return JSON representation of this MapLayerSettings object */\r\n public override toJSON(): ModelMapLayerProps {\r\n const props = super._toJSON() as ModelMapLayerProps;\r\n props.modelId = this.modelId;\r\n return props;\r\n }\r\n\r\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings {\r\n return ModelMapLayerSettings.fromJSON(this.cloneProps(changedProps));\r\n }\r\n\r\n /** @internal */\r\n protected override cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps {\r\n const props = super.cloneProps(changedProps) as ModelMapLayerProps;\r\n props.modelId = changedProps.modelId ?? this.modelId;\r\n return props;\r\n }\r\n\r\n /** @internal */\r\n public override displayMatches(other: MapLayerSettings): boolean {\r\n if (!(other instanceof ModelMapLayerSettings) || !super.displayMatches(other))\r\n return false;\r\n\r\n return this.modelId === other.modelId;\r\n }\r\n\r\n /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */\r\n public get allSubLayersInvisible(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\n/** JSON representation of a [[BaseMapLayerSettings]].\r\n * @public\r\n */\r\nexport interface BaseMapLayerProps extends ImageMapLayerProps {\r\n provider?: BackgroundMapProviderProps;\r\n}\r\n\r\n/** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].\r\n * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based\r\n * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).\r\n * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows\r\n * the imagery provider and/or type to be easily modified.\r\n * @see [[MapImagerySettings.backgroundBase]].\r\n * @public\r\n */\r\nexport class BaseMapLayerSettings extends ImageMapLayerSettings {\r\n private _provider?: BackgroundMapProvider;\r\n\r\n /** The provider from which this base layer was configured, if any. */\r\n public get provider(): BackgroundMapProvider | undefined { return this._provider; }\r\n\r\n /** Create a base layer from its JSON representation.\r\n * TODO: This, MapLayerSettings.fromJSON, and MapSubLayerSettings.fromJSON should never return undefined.\r\n * That means they should not accept undefined for props and should define props such that it fully describes the\r\n * layer - e.g., url and name must be defined.\r\n */\r\n public static override fromJSON(props: BaseMapLayerProps): BaseMapLayerSettings {\r\n const settings = super.fromJSON(props);\r\n assert(settings instanceof BaseMapLayerSettings);\r\n if (props.provider)\r\n settings._provider = BackgroundMapProvider.fromJSON(props.provider);\r\n\r\n return settings;\r\n }\r\n\r\n /** Convert this layer to its JSON representation. */\r\n public override toJSON(): BaseMapLayerProps {\r\n const props = super.toJSON() as BaseMapLayerProps;\r\n if (this.provider)\r\n props.provider = this.provider.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** @internal */\r\n public override cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps {\r\n const props = super.cloneProps(changedProps) as BaseMapLayerProps;\r\n\r\n if (changedProps.provider)\r\n props.provider = changedProps.provider;\r\n else if (this.provider)\r\n props.provider = this.provider.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of this layer. */\r\n public override clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings {\r\n const prevUrl = this.url;\r\n const clone = BaseMapLayerSettings.fromJSON(this.cloneProps(changedProps));\r\n\r\n if (this.provider && prevUrl !== this.url)\r\n clone._provider = undefined;\r\n\r\n return clone;\r\n }\r\n\r\n /** Create a base layer from a BackgroundMapProvider. */\r\n public static fromProvider(provider: BackgroundMapProvider, options?: { invisible?: boolean, transparency?: number }): BaseMapLayerSettings {\r\n let formatId: string, url: string, name: string;\r\n switch (provider.name) {\r\n case \"BingProvider\":\r\n default:\r\n formatId = \"BingMaps\";\r\n\r\n let imagerySet;\r\n switch (provider.type) {\r\n case BackgroundMapType.Street:\r\n imagerySet = \"Road\";\r\n break;\r\n case BackgroundMapType.Aerial:\r\n imagerySet = \"Aerial\";\r\n break;\r\n case BackgroundMapType.Hybrid:\r\n default:\r\n imagerySet = \"AerialWithLabels\";\r\n break;\r\n }\r\n\r\n name = `Bing Maps: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\r\n url = `https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${imagerySet}?o=json&incl=ImageryProviders&key={bingKey}`;\r\n break;\r\n\r\n case \"MapBoxProvider\":\r\n formatId = \"MapboxImagery\";\r\n name = `MapBox: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\r\n switch (provider.type) {\r\n case BackgroundMapType.Street:\r\n url = \"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/\";\r\n break;\r\n case BackgroundMapType.Aerial:\r\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/\";\r\n break;\r\n case BackgroundMapType.Hybrid:\r\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/\";\r\n break;\r\n }\r\n\r\n break;\r\n }\r\n\r\n const settings = super.fromJSON({\r\n name,\r\n formatId,\r\n url,\r\n transparentBackground: false,\r\n visible: !options?.invisible,\r\n transparency: options?.transparency,\r\n });\r\n\r\n assert(undefined !== settings);\r\n assert(settings instanceof BaseMapLayerSettings);\r\n\r\n settings._provider = provider;\r\n return settings;\r\n }\r\n\r\n /** @internal */\r\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BaseMapLayerSettings {\r\n return this.fromProvider(BackgroundMapProvider.fromBackgroundMapProps(props));\r\n }\r\n\r\n /** @alpha */\r\n public cloneWithProvider(provider: BackgroundMapProvider): BaseMapLayerSettings {\r\n return BaseMapLayerSettings.fromProvider(provider, { invisible: !this.visible, transparency: this.transparency });\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MapLayerSettings.js","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAA8B,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAsBS,CAAC;AAiBzH;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAmB;IAC9B,mIAAmI;IACnH,IAAI,CAAS;IAC7B,aAAa;IACG,KAAK,CAAU;IAC/B,gIAAgI;IAChH,OAAO,CAAU;IACjC,oFAAoF;IACpE,EAAE,CAAa;IAC/B,oCAAoC;IACpB,QAAQ,CAAgB;IACxC,uBAAuB;IACP,MAAM,CAAc;IAEpC,YAAY,IAAY,EAAE,KAAc,EAAE,OAAiB,EAAE,EAAe,EAAE,MAAmB,EAAE,QAAuB;QACxH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC;QAChD,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,C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H,qBAAqB,EAAE,KAAK;YAC5B,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS;YAC5B,YAAY,EAAE,OAAO,EAAE,YAAY;SACpC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;QAC/B,MAAM,CAAC,QAAQ,YAAY,oBAAoB,CAAC,CAAC;QAEjD,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,sBAAsB,CAAC,KAAmC;QACtE,OAAO,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,aAAa;IACN,iBAAiB,CAAC,QAA+B;QACtD,OAAO,oBAAoB,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACpH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** The current set of supported map layer formats.\n * In order to be displayed, a corresponding format must have been registered in the [MapLayerFormatRegistry]($frontend)\n * @public\n */\nexport type ImageryMapLayerFormatId = \"ArcGIS\" | \"BingMaps\" | \"MapboxImagery\" | \"TileURL\" | \"WMS\" | \"WMTS\";\n\n/** @public */\nexport type SubLayerId = string | number;\n\n/**\n * Type for map layer provider array property.\n * @beta\n */\nexport type MapLayerProviderArrayProperty = number[] | string[] | boolean[];\n\n/**\n * Type for map layer provider properties.\n * @beta\n */\nexport interface MapLayerProviderProperties { [key: string]: number | string | boolean | MapLayerProviderArrayProperty };\n\n/** JSON representation of the settings associated with a map sublayer included within a [[MapLayerProps]].\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * @see [[MapLayerProps]]\n * @public\n */\nexport interface MapSubLayerProps {\n name: string;\n title?: string;\n visible?: boolean;\n id?: SubLayerId;\n parent?: SubLayerId;\n children?: SubLayerId[];\n}\n\n/** Normalized representation of a [[MapSubLayerProps]] for which values\n * have been validated and default values have been applied where explicit values not defined.\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.\n * @see [[MapLayerSettings]]\n * @public\n */\nexport class MapSubLayerSettings {\n /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */\n public readonly name: string;\n /** Title. */\n public readonly title?: string;\n /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */\n public readonly visible: boolean;\n /** A unique string or number that may be used to identify the sub layer (ArcGIS) */\n public readonly id: SubLayerId;\n /** One or more sublayer children */\n public readonly children?: SubLayerId[];\n /** sublayer parent. */\n public readonly parent?: SubLayerId;\n\n constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]) {\n this.name = name;\n this.title = title;\n this.visible = visible !== undefined && visible;\n this.id = (id === undefined) ? this.name : id;\n this.parent = parent;\n this.children = children;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static fromJSON(json: MapSubLayerProps): MapSubLayerSettings {\n return new MapSubLayerSettings(json.name, json.title, json.visible, (json.id === json.name) ? undefined : json.id, json.parent, json.children);\n }\n\n public toJSON(): MapSubLayerProps {\n const props: MapSubLayerProps = { name: this.name, visible: this.visible };\n\n if (undefined !== this.id && this.id !== this.name)\n props.id = this.id;\n\n if (undefined !== this.title)\n props.title = this.title;\n\n if (this.children)\n props.children = [...this.children];\n\n if (undefined !== this.parent)\n props.parent = this.parent;\n\n return props;\n }\n\n /** Creating a copy of this MapSubLayer, optionally modifying some if its properties */\n public clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n id: undefined !== changedProps.id ? changedProps.id : this.id,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n parent: undefined !== changedProps.parent ? changedProps.parent : this.parent,\n children: undefined !== changedProps.children ? changedProps.children.slice() : this.children?.slice(),\n title: undefined !== changedProps.title ? changedProps.title : this.title,\n };\n return MapSubLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n public displayMatches(other: MapSubLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible;\n }\n\n /** return true if this sublayer is named. */\n public get isNamed(): boolean { return this.name.length > 0; }\n\n /** return true if this sublayer is a leaf (has no children) */\n public get isLeaf(): boolean { return this.children === undefined || this.children.length === 0; }\n\n /** return true if this sublayer is an unnamed group */\n public get isUnnamedGroup(): boolean { return !this.isLeaf && !this.isNamed; }\n\n /** return a string representing this sublayer id (converting to string if underlying id is number) */\n public get idString(): string { return (typeof this.id === \"number\") ? this.id.toString(10) : this.id; }\n}\n\n/** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].\n * @see [[MapImageryProps]]\n * @public\n */\nexport interface CommonMapLayerProps {\n /** Controls visibility of layer. Defaults to 'true'. */\n visible?: boolean;\n\n /** A user-friendly name for the layer. */\n name: string;\n\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,\n * or false to indicate the transparency should not be overridden.\n * Default value: 0.\n */\n\n transparency?: number;\n /** True to indicate background is transparent.\n * Default: true.\n */\n transparentBackground?: boolean;\n}\n\n/** JSON representation of an [[ImageMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @see [[ImageryMapLayerFormatId]].\n * @public\n */\nexport interface ImageMapLayerProps extends CommonMapLayerProps {\n /** URL */\n url: string;\n /** Identifies the map layers source.*/\n formatId: string;\n /** Source layers. If undefined all layers are displayed. */\n subLayers?: MapSubLayerProps[];\n /** Access Key for the Layer, like a subscription key or access token.\n * ###TODO This does not belong in the props object. It should never be persisted.\n */\n /** @internal */\n accessKey?: MapLayerKey;\n\n /** @internal */\n modelId?: never;\n\n /** List of query parameters that will get appended to the source.\n * @beta\n */\n queryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n properties?: MapLayerProviderProperties;\n\n}\n\n/** The target onto which to drape a model map layer.\n * @beta\n */\nexport enum ModelMapLayerDrapeTarget {\n /** Drape only onto the globe. */\n Globe = 0,\n /** Drape only onto all attached reality data. */\n RealityData = 1,\n}\n\n/** JSON representation of a [[ModelMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport interface ModelMapLayerProps extends CommonMapLayerProps {\n /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */\n modelId: Id64String;\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\n * @beta\n */\n drapeTarget?: ModelMapLayerDrapeTarget;\n\n /** @internal */\n url?: never;\n /** @internal */\n formatId?: never;\n /** @internal */\n subLayers?: never;\n /** @internal */\n accessKey?: never;\n}\n\n/** JSON representation of a [[MapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;\n\n/**\n * stores key-value pair to be added to all requests made involving map layer.\n * @public\n */\nexport interface MapLayerKey {\n key: string;\n value: string;\n}\n\n/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @public\n */\nexport abstract class MapLayerSettings {\n public readonly visible: boolean;\n\n public readonly name: string;\n public readonly transparency: number;\n public readonly transparentBackground: boolean;\n public abstract get allSubLayersInvisible(): boolean;\n public abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;\n public abstract toJSON(): MapLayerProps;\n\n /** @internal */\n protected constructor(name: string, visible = true, transparency: number = 0, transparentBackground = true) {\n this.name = name;\n this.visible = visible;\n this.transparentBackground = transparentBackground;\n this.transparency = transparency;\n }\n\n /** Create a map layer settings from its JSON representation. */\n public static fromJSON(props: MapLayerProps): MapLayerSettings {\n return undefined !== props.modelId ? ModelMapLayerSettings.fromJSON(props) : ImageMapLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n protected _toJSON(): CommonMapLayerProps {\n const props: CommonMapLayerProps = {\n name: this.name,\n visible: this.visible,\n };\n\n if (0 !== this.transparency)\n props.transparency = this.transparency;\n\n if (this.transparentBackground === false)\n props.transparentBackground = this.transparentBackground;\n\n return props;\n }\n\n /** @internal */\n protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps {\n return {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n transparency: undefined !== changedProps.transparency ? changedProps.transparency : this.transparency,\n transparentBackground: undefined !== changedProps.transparentBackground ? changedProps.transparentBackground : this.transparentBackground,\n };\n }\n\n /** @internal */\n public displayMatches(other: MapLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible && this.transparency === other.transparency && this.transparentBackground === other.transparentBackground;\n }\n\n /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */\n public abstract get source(): string;\n\n /** @internal */\n public matchesNameAndSource(name: string, source: string): boolean {\n return this.name === name && this.source === source;\n }\n}\n\n/** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ModelMapLayerSettings]] for model based map layer settings.\n * @public\n */\nexport class ImageMapLayerSettings extends MapLayerSettings {\n public readonly formatId: string;\n public readonly url: string;\n public userName?: string;\n public password?: string;\n public accessKey?: MapLayerKey;\n\n /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.\n * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.\n * @beta\n */\n public savedQueryParams?: { [key: string]: string };\n\n /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.\n * @beta\n */\n public unsavedQueryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n public readonly properties?: MapLayerProviderProperties;\n\n public readonly subLayers: MapSubLayerSettings[];\n public override get source(): string { return this.url; }\n\n /** @internal */\n protected constructor(props: ImageMapLayerProps) {\n const transparentBackground = props.transparentBackground ?? true;\n super(props.name, props.visible, props.transparency, transparentBackground);\n\n this.formatId = props.formatId;\n this.url = props.url;\n this.accessKey = props.accessKey;\n if (props.queryParams) {\n this.savedQueryParams = {...props.queryParams};\n }\n\n if (props.properties) {\n this.properties = {...props.properties}\n }\n\n this.subLayers = [];\n if (!props.subLayers)\n return;\n\n for (const subLayerProps of props.subLayers) {\n const subLayer = MapSubLayerSettings.fromJSON(subLayerProps);\n if (subLayer)\n this.subLayers.push(subLayer);\n }\n }\n\n public static override fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings {\n return new this(props);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ImageMapLayerProps {\n const props = super._toJSON() as ImageMapLayerProps;\n props.url = this.url;\n props.formatId = this.formatId;\n\n if (this.subLayers.length > 0)\n props.subLayers = this.subLayers.map((x) => x.toJSON());\n\n if (this.savedQueryParams)\n props.queryParams = {...this.savedQueryParams};\n\n if (this.properties) {\n props.properties = structuredClone(this.properties);\n }\n\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings {\n const clone = ImageMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n // Clone members not part of MapLayerProps\n clone.userName = this.userName;\n clone.password = this.password;\n if (this.unsavedQueryParams)\n clone.unsavedQueryParams = {...this.unsavedQueryParams};\n if (this.savedQueryParams)\n clone.savedQueryParams = {...this.savedQueryParams};\n\n return clone;\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps {\n const props = super.cloneProps(changedProps) as ImageMapLayerProps;\n\n props.formatId = changedProps.formatId ?? this.formatId;\n props.url = changedProps.url ?? this.url;\n props.accessKey = changedProps.accessKey ?? this.accessKey;\n props.subLayers = changedProps.subLayers ?? this.subLayers;\n if (changedProps.queryParams) {\n props.queryParams = {...changedProps.queryParams};\n } else if (this.savedQueryParams) {\n props.queryParams = {...this.savedQueryParams};\n }\n\n if (changedProps.properties) {\n props.properties = {...changedProps.properties}\n } else if (this.properties) {\n props.properties = {...this.properties}\n }\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (! (other instanceof ImageMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n if (this.userName !== other.userName || this.password !== other.password || this.subLayers.length !== other.subLayers.length) {\n return false;\n }\n\n for (let i = 0; i < this.subLayers.length; i++)\n if (!this.subLayers[i].displayMatches(other.subLayers[i]))\n return false;\n\n return true;\n }\n\n /** Return a sublayer matching id -- or undefined if not found */\n public subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined {\n return id === undefined ? undefined : this.subLayers.find((subLayer) => subLayer.id === id);\n }\n\n private hasInvisibleAncestors(subLayer?: MapSubLayerSettings): boolean {\n if (!subLayer || !subLayer.parent)\n return false;\n\n const parent = this.subLayerById(subLayer.parent);\n if (!parent)\n return false;\n\n // Visibility of named group has no impact on the visibility of children (only unnamed group does)\n // i.e For WMS, its should be possible to request a child layer when its parent is not visible (if the parent is also named)\n return (!parent.visible && !parent.isNamed) || this.hasInvisibleAncestors(parent);\n }\n\n /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */\n public isSubLayerVisible(subLayer: MapSubLayerSettings): boolean {\n if (!subLayer.visible)\n return false;\n\n return !this.hasInvisibleAncestors(subLayer);\n }\n\n /** Return true if all sublayers are invisible. */\n public get allSubLayersInvisible(): boolean {\n if (this.subLayers.length === 0)\n return false;\n\n return this.subLayers.every((subLayer) => (subLayer.isUnnamedGroup || !this.isSubLayerVisible(subLayer)));\n }\n\n /** Return the children for a sublayer */\n public getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined {\n if (!subLayer.children)\n return undefined;\n\n const children = new Array<MapSubLayerSettings>();\n subLayer.children.forEach((childId) => {\n const child = this.subLayerById(childId);\n if (child !== undefined)\n children.push(child);\n });\n\n return children;\n }\n\n /** @internal */\n protected static mapTypeName(type: BackgroundMapType) { // TBD.. Localization.\n switch (type) {\n case BackgroundMapType.Aerial:\n return \"Aerial Imagery\";\n default:\n case BackgroundMapType.Hybrid:\n return \"Aerial Imagery with labels\";\n case BackgroundMapType.Street:\n return \"Streets\";\n }\n }\n\n public setCredentials(userName?: string, password?: string) {\n this.userName = userName;\n this.password = password;\n }\n\n /** Collect all query parameters\n * @beta\n */\n public collectQueryParams() {\n let queryParams: {[key: string]: string} = {};\n if (this.savedQueryParams)\n queryParams = {...this.savedQueryParams};\n\n if (this.unsavedQueryParams)\n queryParams = {...queryParams, ...this.unsavedQueryParams};\n\n return queryParams;\n }\n}\n\n/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ImageMapLayerSettings]] for image based map layer settings.\n * @public\n */\nexport class ModelMapLayerSettings extends MapLayerSettings {\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\n * @beta\n */\n public readonly drapeTarget: ModelMapLayerDrapeTarget;\n public readonly modelId: Id64String;\n public override get source(): string { return this.modelId; }\n\n /** @internal */\n protected constructor(modelId: Id64String, name: string, visible = true,\n transparency: number = 0, transparentBackground = true, drapeTarget = ModelMapLayerDrapeTarget.Globe) {\n super(name, visible, transparency, transparentBackground);\n this.modelId = modelId;\n this.drapeTarget = drapeTarget;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static override fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings {\n const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;\n return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground, json.drapeTarget);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ModelMapLayerProps {\n const props = super._toJSON() as ModelMapLayerProps;\n props.modelId = this.modelId;\n if (this.drapeTarget !== ModelMapLayerDrapeTarget.Globe)\n props.drapeTarget = this.drapeTarget;\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings {\n return ModelMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps {\n const props = super.cloneProps(changedProps) as ModelMapLayerProps;\n props.modelId = changedProps.modelId ?? this.modelId;\n props.drapeTarget = changedProps.drapeTarget ?? this.drapeTarget;\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (!(other instanceof ModelMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n return this.modelId === other.modelId;\n }\n\n /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */\n public get allSubLayersInvisible(): boolean {\n return false;\n }\n}\n\n/** JSON representation of a [[BaseMapLayerSettings]].\n * @public\n */\nexport interface BaseMapLayerProps extends ImageMapLayerProps {\n provider?: BackgroundMapProviderProps;\n}\n\n/** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].\n * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based\n * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).\n * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows\n * the imagery provider and/or type to be easily modified.\n * @see [[MapImagerySettings.backgroundBase]].\n * @public\n */\nexport class BaseMapLayerSettings extends ImageMapLayerSettings {\n private _provider?: BackgroundMapProvider;\n\n /** The provider from which this base layer was configured, if any. */\n public get provider(): BackgroundMapProvider | undefined { return this._provider; }\n\n /** Create a base layer from its JSON representation.\n * TODO: This, MapLayerSettings.fromJSON, and MapSubLayerSettings.fromJSON should never return undefined.\n * That means they should not accept undefined for props and should define props such that it fully describes the\n * layer - e.g., url and name must be defined.\n */\n public static override fromJSON(props: BaseMapLayerProps): BaseMapLayerSettings {\n const settings = super.fromJSON(props);\n assert(settings instanceof BaseMapLayerSettings);\n if (props.provider)\n settings._provider = BackgroundMapProvider.fromJSON(props.provider);\n\n return settings;\n }\n\n /** Convert this layer to its JSON representation. */\n public override toJSON(): BaseMapLayerProps {\n const props = super.toJSON() as BaseMapLayerProps;\n if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** @internal */\n public override cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps {\n const props = super.cloneProps(changedProps) as BaseMapLayerProps;\n\n if (changedProps.provider)\n props.provider = changedProps.provider;\n else if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** Create a copy of this layer. */\n public override clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings {\n const prevUrl = this.url;\n const clone = BaseMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n if (this.provider && prevUrl !== this.url)\n clone._provider = undefined;\n\n return clone;\n }\n\n /** Create a base layer from a BackgroundMapProvider. */\n public static fromProvider(provider: BackgroundMapProvider, options?: { invisible?: boolean, transparency?: number }): BaseMapLayerSettings {\n let formatId: string, url: string, name: string;\n switch (provider.name) {\n case \"BingProvider\":\n default:\n formatId = \"BingMaps\";\n\n let imagerySet;\n switch (provider.type) {\n case BackgroundMapType.Street:\n imagerySet = \"Road\";\n break;\n case BackgroundMapType.Aerial:\n imagerySet = \"Aerial\";\n break;\n case BackgroundMapType.Hybrid:\n default:\n imagerySet = \"AerialWithLabels\";\n break;\n }\n\n name = `Bing Maps: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n url = `https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${imagerySet}?o=json&incl=ImageryProviders&key={bingKey}`;\n break;\n\n case \"MapBoxProvider\":\n formatId = \"MapboxImagery\";\n name = `MapBox: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n switch (provider.type) {\n case BackgroundMapType.Street:\n url = \"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/\";\n break;\n case BackgroundMapType.Aerial:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/\";\n break;\n case BackgroundMapType.Hybrid:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/\";\n break;\n }\n\n break;\n }\n\n const settings = super.fromJSON({\n name,\n formatId,\n url,\n transparentBackground: false,\n visible: !options?.invisible,\n transparency: options?.transparency,\n });\n\n assert(undefined !== settings);\n assert(settings instanceof BaseMapLayerSettings);\n\n settings._provider = provider;\n return settings;\n }\n\n /** @internal */\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BaseMapLayerSettings {\n return this.fromProvider(BackgroundMapProvider.fromBackgroundMapProps(props));\n }\n\n /** @alpha */\n public cloneWithProvider(provider: BackgroundMapProvider): BaseMapLayerSettings {\n return BaseMapLayerSettings.fromProvider(provider, { invisible: !this.visible, transparency: this.transparency });\n }\n}\n"]}
@@ -25,6 +25,7 @@ export interface MassPropertiesRequestProps {
25
25
  }
26
26
  /** Information required to request mass properties for each element separately from the front end to the back end.
27
27
  * @public
28
+ * @deprecated in 4.11. Use [[MassPropertiesRequestProps]].
28
29
  */
29
30
  export interface MassPropertiesPerCandidateRequestProps {
30
31
  operations: MassPropertiesOperation[];
@@ -58,6 +59,7 @@ export interface MassPropertiesResponseProps {
58
59
  }
59
60
  /** Information returned from the back end to the front end holding the result of the mass properties calculation for a single candidate.
60
61
  * @public
62
+ * @deprecated in 4.11. Use [[MassPropertiesResponseProps]].
61
63
  */
62
64
  export interface MassPropertiesPerCandidateResponseProps extends MassPropertiesResponseProps {
63
65
  candidate: Id64String;
@@ -1 +1 @@
1
- {"version":3,"file":"MassProperties.d.ts","sourceRoot":"","sources":["../../src/MassProperties.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD;;;GAGG;AACH,oBAAY,uBAAuB;IACjC,wDAAwD;IACxD,iBAAiB,IAAI;IACrB,kEAAkE;IAClE,eAAe,IAAI;IACnB,mDAAmD;IACnD,iBAAiB,IAAI;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,uBAAuB,CAAC;IACnC,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACrD,UAAU,EAAE,uBAAuB,EAAE,CAAC;IACtC,UAAU,EAAE,iBAAiB,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,qGAAqG;IACrG,MAAM,EA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IACrG,MAAM,EAAE,aAAa,CAAC;IACtB,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sJAAsJ;IACtJ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0GAA0G;IAC1G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iKAAiK;IACjK,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,uCAAwC,SAAQ,2BAA2B;IAC1F,SAAS,EAAE,UAAU,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"MassProperties.js","sourceRoot":"","sources":["../../src/MassProperties.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH;;;GAGG;AACH,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,wDAAwD;IACxD,+FAAqB,CAAA;IACrB,kEAAkE;IAClE,2FAAmB,CAAA;IACnB,mDAAmD;IACnD,+FAAqB,CAAA;AACvB,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC","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 Geometry\r\n */\r\n\r\nimport { BentleyStatus, CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { XYZProps } from \"@itwin/core-geometry\";\r\n\r\n/** Specify whether to accumulate volumes, areas, or lengths for the supplied elements.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum MassPropertiesOperation {\r\n /** Return lengths for open paths and planar regions. */\r\n AccumulateLengths = 0,\r\n /** Return areas and perimeters for solid and surface geometry. */\r\n AccumulateAreas = 1,\r\n /** Return volumes and areas for solid geometry. */\r\n AccumulateVolumes = 2,\r\n}\r\n\r\n/** Information required to request mass properties for elements from the front end to the back end.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface MassPropertiesRequestProps {\r\n operation: MassPropertiesOperation;\r\n candidates?: Id64Array;\r\n}\r\n\r\n/** Information required to request mass properties for each element separately from the front end to the back end.\r\n * @public\r\n */\r\nexport interface MassPropertiesPerCandidateRequestProps {\r\n operations: MassPropertiesOperation[];\r\n candidates: CompressedId64Set;\r\n}\r\n\r\n/** Information returned from the back end to the front end holding the result of the mass properties calculation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface MassPropertiesResponseProps {\r\n /** Success if requested [[MassPropertiesOperation]] could be evaluated for the specified elements */\r\n status: BentleyStatus;\r\n /** Volume of solids when [[MassPropertiesOperation.AccumulateVolumes]] requested */\r\n volume?: number;\r\n /** Surface area of solids and surfaces when [[MassPropertiesOperation.AccumulateVolumes]] or [[MassPropertiesOperation.AccumulateAreas]] requested */\r\n area?: number;\r\n /** Perimeter of surfaces and planar regions when [[MassPropertiesOperation.AccumulateAreas]] requested */\r\n perimeter?: number;\r\n /** Length of curves or perimeter of planar regions when [[MassPropertiesOperation.AccumulateAreas]] or [[MassPropertiesOperation.AccumulateLength]] requested */\r\n length?: number;\r\n /** Centroid of geometry */\r\n centroid?: XYZProps;\r\n /** Product of inertia with respect to xy plane */\r\n ixy?: number;\r\n /** Product of inertia with respect to xz plane */\r\n ixz?: number;\r\n /** Product of inertia with respect to yz plane */\r\n iyz?: number;\r\n /** Moments of inertia */\r\n moments?: XYZProps;\r\n}\r\n\r\n/** Information returned from the back end to the front end holding the result of the mass properties calculation for a single candidate.\r\n * @public\r\n */\r\nexport interface MassPropertiesPerCandidateResponseProps extends MassPropertiesResponseProps {\r\n candidate: Id64String;\r\n}\r\n"]}
1
+ {"version":3,"file":"MassProperties.js","sourceRoot":"","sources":["../../src/MassProperties.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH;;;GAGG;AACH,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,wDAAwD;IACxD,+FAAqB,CAAA;IACrB,kEAAkE;IAClE,2FAAmB,CAAA;IACnB,mDAAmD;IACnD,+FAAqB,CAAA;AACvB,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC","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 Geometry\n */\n\nimport { BentleyStatus, CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { XYZProps } from \"@itwin/core-geometry\";\n\n/** Specify whether to accumulate volumes, areas, or lengths for the supplied elements.\n * @public\n * @extensions\n */\nexport enum MassPropertiesOperation {\n /** Return lengths for open paths and planar regions. */\n AccumulateLengths = 0,\n /** Return areas and perimeters for solid and surface geometry. */\n AccumulateAreas = 1,\n /** Return volumes and areas for solid geometry. */\n AccumulateVolumes = 2,\n}\n\n/** Information required to request mass properties for elements from the front end to the back end.\n * @public\n * @extensions\n */\nexport interface MassPropertiesRequestProps {\n operation: MassPropertiesOperation;\n candidates?: Id64Array;\n}\n\n/** Information required to request mass properties for each element separately from the front end to the back end.\n * @public\n * @deprecated in 4.11. Use [[MassPropertiesRequestProps]].\n */\nexport interface MassPropertiesPerCandidateRequestProps {\n operations: MassPropertiesOperation[];\n candidates: CompressedId64Set;\n}\n\n/** Information returned from the back end to the front end holding the result of the mass properties calculation.\n * @public\n * @extensions\n */\nexport interface MassPropertiesResponseProps {\n /** Success if requested [[MassPropertiesOperation]] could be evaluated for the specified elements */\n status: BentleyStatus;\n /** Volume of solids when [[MassPropertiesOperation.AccumulateVolumes]] requested */\n volume?: number;\n /** Surface area of solids and surfaces when [[MassPropertiesOperation.AccumulateVolumes]] or [[MassPropertiesOperation.AccumulateAreas]] requested */\n area?: number;\n /** Perimeter of surfaces and planar regions when [[MassPropertiesOperation.AccumulateAreas]] requested */\n perimeter?: number;\n /** Length of curves or perimeter of planar regions when [[MassPropertiesOperation.AccumulateAreas]] or [[MassPropertiesOperation.AccumulateLength]] requested */\n length?: number;\n /** Centroid of geometry */\n centroid?: XYZProps;\n /** Product of inertia with respect to xy plane */\n ixy?: number;\n /** Product of inertia with respect to xz plane */\n ixz?: number;\n /** Product of inertia with respect to yz plane */\n iyz?: number;\n /** Moments of inertia */\n moments?: XYZProps;\n}\n\n/** Information returned from the back end to the front end holding the result of the mass properties calculation for a single candidate.\n * @public\n * @deprecated in 4.11. Use [[MassPropertiesResponseProps]].\n */\nexport interface MassPropertiesPerCandidateResponseProps extends MassPropertiesResponseProps {\n candidate: Id64String;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MaterialProps.js","sourceRoot":"","sources":["../../src/MaterialProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAqBH;;;GAGG;AACH,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wCAAwC;IACxC,6DAAY,CAAA;IACZ,yDAAU,CAAA;IACV,mEAAe,CAAA;IACf,qDAAQ,CAAA;IACR,yDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AA4CD;;GAEG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,wBAAwB;IACxB,mDAAQ,CAAA;IACR;;OAEG;IACH,yDAAgB,CAAA;IAChB,uFAAuF;IACvF,uEAAuB,CAAA;AACzB,CAAC,EATW,cAAc,KAAd,cAAc,QASzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { DefinitionElementProps } from \"./ElementProps\";\r\nimport { TextureMapping } from \"./TextureMapping\";\r\n\r\n/** Describes a color as an array of three numbers ranging from 0 to 1 where the first entry corresponds to the color's red component,\r\n * the second to green, and the third to blue.\r\n * @see usage in [[RenderMaterialAssetProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type RgbFactorProps = number[];\r\n\r\n/** A 2d point specified as an array of 2 numbers [x, y].\r\n * @see usage in [[TextureMapProps]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type Point2dProps = number[];\r\n\r\n/** Describes the units in which a [[TextureMapProps]]' scale is expressed.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum TextureMapUnits {\r\n /** Indicates the scale has no units. */\r\n Relative = 0,\r\n Meters = 3,\r\n Millimeters = 4,\r\n Feet = 5,\r\n Inches = 6,\r\n}\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** As part of a [[RenderMaterialAssetProps]], describes how to map a [[RenderTexture]]'s image to the triangles of a mesh to which the material is applied.\r\n * @see [[RenderMaterialAssetMapsProps]] for the supported types of texture mappings.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextureMapProps {\r\n /** Angle in degrees to rotate texture when applying; defaults to 0.0 if undefined */\r\n pattern_angle?: number;\r\n /** If true, flip the pattern map in U; if undefined, defaults to false */\r\n pattern_u_flip?: boolean;\r\n /** If true, flip the pattern map in V; if undefined, defaults to false */\r\n pattern_flip?: boolean;\r\n /** X, Y scale to apply to the pattern map; if undefined, defaults to {0,0}, which is almost never useful. */\r\n pattern_scale?: Point2dProps;\r\n /** X, Y offset to apply to the pattern map; if undefined, defaults to {0,0} */\r\n pattern_offset?: Point2dProps;\r\n /** Units to use when applying the scaling; if undefined, defaults to [[TextureMapUnits.Relative]] */\r\n pattern_scalemode?: TextureMapUnits;\r\n /** Mapping mode to use for the texture application; if undefined, defaults to [[TextureMapping.Mode.Parametric]] */\r\n pattern_mapping?: TextureMapping.Mode;\r\n /** Weight at which to combine diffuse image and color; if undefined, defaults to 1.0 */\r\n pattern_weight?: number;\r\n /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false.\r\n * @deprecated in 4.4. It never functioned properly - use [[pattern_useconstantlod]] instead.\r\n */\r\n pattern_useConstantLod?: boolean;\r\n /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false. */\r\n pattern_useconstantlod?: boolean;\r\n /** The number of times the texture is repeated if pattern_useconstantlod is true. Increasing this will make the texture pattern appear smaller, decreasing it will make it larger. Defaults to 1.*/\r\n pattern_constantlod_repetitions?: number;\r\n /** An offset in world units used to shift the texture when pattern_useconstantlod is true. Defaults to (0, 0). */\r\n pattern_constantlod_offset?: Point2dProps;\r\n /** The minimum distance (from the eye to the surface) at which to clamp the texture size when pattern_useconstantlod is true. Defaults to 1. */\r\n pattern_constantlod_mindistanceclamp?: number;\r\n /** The maximum distance (from the eye to the surface) at which to clamp the texture size when pattern_useconstantlod is true. Defaults to 2^32. */\r\n pattern_constantlod_maxdistanceclamp?: number;\r\n /** The Id of the persistent [Texture]($backend) element defining the texture image. */\r\n TextureId: Id64String;\r\n}\r\n\r\n/** Flags applied to a [[NormalMapProps]]. The enum values can be combined using bitwise operators.\r\n * @public\r\n */\r\nexport enum NormalMapFlags {\r\n /** No special flags. */\r\n None = 0,\r\n /** Indicates that the Y component of each vector - stored in the texture's green channel - points upward along the positive Y axis and should\r\n * be negated. By default it points downward.\r\n */\r\n GreenUp = 1 << 0,\r\n /** If true, override the mapping mode with constant LOD mapping for the normal map. */\r\n UseConstantLod = 1 << 1,\r\n}\r\n\r\n/** Describes how to apply [normal mapping](https://en.wikipedia.org/wiki/Normal_mapping) to a surface material.\r\n * @see [[RenderMaterialAssetMapsProps.Normal]] to define a normal map for a [[RenderMaterialAssetProps]].\r\n * @public\r\n */\r\nexport interface NormalMapProps extends TextureMapProps {\r\n /** Flags controlling how the normal map is applied. Default: [[NormalMapFlags.None]]. */\r\n NormalFlags?: NormalMapFlags;\r\n}\r\n\r\n/** Describes different types of textures to be applied to a surface material to alter its appearance.\r\n * @note While technically both [[Pattern]] and [[Normal]] can define their own mapping parameters (`pattern_angle`, `pattern_mapping`, etc), in practice\r\n * if both maps are present they are expected to have identical mapping parameters, with the exception of `TextureId`.\r\n * @see [[RenderMaterialAssetProps.Map]] to define the texture maps for a material asset.\r\n * @public\r\n */\r\nexport interface RenderMaterialAssetMapsProps {\r\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\r\n Pattern?: TextureMapProps;\r\n /** Maps a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to the surface, simulating more complex surface details than are\r\n * present in the surface's geometry.\r\n */\r\n Normal?: NormalMapProps;\r\n /** Maps an image describing detailed minor height variation of the surface geometry. */\r\n Bump?: TextureMapProps;\r\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\r\n Diffuse?: TextureMapProps;\r\n /** Maps an image describing the glossiness of the surface's finish */\r\n Finish?: TextureMapProps;\r\n /** Maps an image describing glowing parts of the surface */\r\n GlowColor?: TextureMapProps;\r\n /** Maps an image describing the reflectiveness of the surface */\r\n Reflect?: TextureMapProps;\r\n /** Maps an image describing the specular component of the surface */\r\n Specular?: TextureMapProps;\r\n /** Maps an image describing the translucency of the surface, how much light comes out the back of the surface */\r\n TranslucencyColor?: TextureMapProps;\r\n /** Maps an image describing the transparency of the surface, how visible objects behind this object are */\r\n TransparentColor?: TextureMapProps;\r\n /** Maps an image describing the displacement of the surface geometry */\r\n Displacement?: TextureMapProps;\r\n}\r\n\r\n/** Describes the graphical properties of a [RenderMaterialElement]($backend) as part of a [[RenderMaterialProps]].\r\n * This representation is used to persist the material properties into the [IModelDb]($backend), but is unwieldy and verbose.\r\n * @see [RenderMaterialElementParams]($backend) for a somewhat more ergonomic representation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderMaterialAssetProps {\r\n /** If true, this material has a fill/diffuse color; if undefined, defaults to false */\r\n HasBaseColor?: boolean;\r\n /** Surface color used for fill or diffuse illumination; if undefined, defaults to black */\r\n color?: RgbFactorProps;\r\n /** If true, this material has a specular color; if undefined, defaults to false */\r\n HasSpecularColor?: boolean;\r\n /** Surface color used for specular illumination; if undefined, defaults to black */\r\n specular_color?: RgbFactorProps;\r\n /** If true, this material has a specular exponent; if undefined, defaults to false */\r\n HasFinish?: boolean;\r\n /** Specular exponent (surface shininess); range is 0 to 128; if undefined, defaults to 13.5 */\r\n finish?: number;\r\n /** If true, this material has surface transparency; if undefined, defaults to false */\r\n HasTransmit?: boolean;\r\n /** Surface transparency; if undefined, defaults to 0.0 */\r\n transmit?: number;\r\n /** If true, this material has a value for diffuse reflectivity; if undefined, defaults to false */\r\n HasDiffuse?: boolean;\r\n /** Surface diffuse reflectivity; if undefined, defaults to 0.6 */\r\n diffuse?: number;\r\n /** If true, this material has a value for specular reflectivity; if undefined, defaults to false. If false, specular value is actually set to 0.0 */\r\n HasSpecular?: boolean;\r\n /** Surface specular reflectivity; if undefined, defaults to 0.4 */\r\n specular?: number;\r\n /** If true, this material has a value for environmental reflectivity; if undefined, defaults to false */\r\n HasReflect?: boolean;\r\n /** Surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined defaults to 0.0 */\r\n reflect?: number;\r\n /** If true, this material has a surface reflectance color; if undefined, defaults to false. If false, reflectance color is actually set to specular color */\r\n HasReflectColor?: boolean;\r\n /** Surface reflectance color; if undefined, defaults to black */\r\n reflect_color?: RgbFactorProps;\r\n /** A scale by which to multiply the components of the normals read from [[Map.Normal]], if a normal map is defined.\r\n * Default: 1.0\r\n */\r\n pbr_normal?: number;\r\n /** An optional set of texture maps associated with this material. */\r\n Map?: RenderMaterialAssetMapsProps;\r\n}\r\n\r\n/** Properties that define a [RenderMaterialElement]($backend).\r\n * @see [[RenderMaterial]] for the representation used by the display system.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderMaterialProps extends DefinitionElementProps {\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n paletteName: string;\r\n /** An optional description of the material. */\r\n description?: string;\r\n jsonProperties?: {\r\n /** A container for various \"assets\" describing aspects of the material. */\r\n materialAssets?: {\r\n /** Properties of the material describing how it is displayed. */\r\n renderMaterial?: RenderMaterialAssetProps;\r\n };\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"MaterialProps.js","sourceRoot":"","sources":["../../src/MaterialProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAqBH;;;GAGG;AACH,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wCAAwC;IACxC,6DAAY,CAAA;IACZ,yDAAU,CAAA;IACV,mEAAe,CAAA;IACf,qDAAQ,CAAA;IACR,yDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AA4CD;;GAEG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,wBAAwB;IACxB,mDAAQ,CAAA;IACR;;OAEG;IACH,yDAAgB,CAAA;IAChB,uFAAuF;IACvF,uEAAuB,CAAA;AACzB,CAAC,EATW,cAAc,KAAd,cAAc,QASzB","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 { Id64String } from \"@itwin/core-bentley\";\nimport { DefinitionElementProps } from \"./ElementProps\";\nimport { TextureMapping } from \"./TextureMapping\";\n\n/** Describes a color as an array of three numbers ranging from 0 to 1 where the first entry corresponds to the color's red component,\n * the second to green, and the third to blue.\n * @see usage in [[RenderMaterialAssetProps]].\n * @public\n * @extensions\n */\nexport type RgbFactorProps = number[];\n\n/** A 2d point specified as an array of 2 numbers [x, y].\n * @see usage in [[TextureMapProps]].\n * @public\n * @extensions\n */\nexport type Point2dProps = number[];\n\n/** Describes the units in which a [[TextureMapProps]]' scale is expressed.\n * @public\n * @extensions\n */\nexport enum TextureMapUnits {\n /** Indicates the scale has no units. */\n Relative = 0,\n Meters = 3,\n Millimeters = 4,\n Feet = 5,\n Inches = 6,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/** As part of a [[RenderMaterialAssetProps]], describes how to map a [[RenderTexture]]'s image to the triangles of a mesh to which the material is applied.\n * @see [[RenderMaterialAssetMapsProps]] for the supported types of texture mappings.\n * @public\n * @extensions\n */\nexport interface TextureMapProps {\n /** Angle in degrees to rotate texture when applying; defaults to 0.0 if undefined */\n pattern_angle?: number;\n /** If true, flip the pattern map in U; if undefined, defaults to false */\n pattern_u_flip?: boolean;\n /** If true, flip the pattern map in V; if undefined, defaults to false */\n pattern_flip?: boolean;\n /** X, Y scale to apply to the pattern map; if undefined, defaults to {0,0}, which is almost never useful. */\n pattern_scale?: Point2dProps;\n /** X, Y offset to apply to the pattern map; if undefined, defaults to {0,0} */\n pattern_offset?: Point2dProps;\n /** Units to use when applying the scaling; if undefined, defaults to [[TextureMapUnits.Relative]] */\n pattern_scalemode?: TextureMapUnits;\n /** Mapping mode to use for the texture application; if undefined, defaults to [[TextureMapping.Mode.Parametric]] */\n pattern_mapping?: TextureMapping.Mode;\n /** Weight at which to combine diffuse image and color; if undefined, defaults to 1.0 */\n pattern_weight?: number;\n /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false.\n * @deprecated in 4.4. It never functioned properly - use [[pattern_useconstantlod]] instead.\n */\n pattern_useConstantLod?: boolean;\n /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false. */\n pattern_useconstantlod?: boolean;\n /** The number of times the texture is repeated if pattern_useconstantlod is true. Increasing this will make the texture pattern appear smaller, decreasing it will make it larger. Defaults to 1.*/\n pattern_constantlod_repetitions?: number;\n /** An offset in world units used to shift the texture when pattern_useconstantlod is true. Defaults to (0, 0). */\n pattern_constantlod_offset?: Point2dProps;\n /** The minimum distance (from the eye to the surface) at which to clamp the texture size when pattern_useconstantlod is true. Defaults to 1. */\n pattern_constantlod_mindistanceclamp?: number;\n /** The maximum distance (from the eye to the surface) at which to clamp the texture size when pattern_useconstantlod is true. Defaults to 2^32. */\n pattern_constantlod_maxdistanceclamp?: number;\n /** The Id of the persistent [Texture]($backend) element defining the texture image. */\n TextureId: Id64String;\n}\n\n/** Flags applied to a [[NormalMapProps]]. The enum values can be combined using bitwise operators.\n * @public\n */\nexport enum NormalMapFlags {\n /** No special flags. */\n None = 0,\n /** Indicates that the Y component of each vector - stored in the texture's green channel - points upward along the positive Y axis and should\n * be negated. By default it points downward.\n */\n GreenUp = 1 << 0,\n /** If true, override the mapping mode with constant LOD mapping for the normal map. */\n UseConstantLod = 1 << 1,\n}\n\n/** Describes how to apply [normal mapping](https://en.wikipedia.org/wiki/Normal_mapping) to a surface material.\n * @see [[RenderMaterialAssetMapsProps.Normal]] to define a normal map for a [[RenderMaterialAssetProps]].\n * @public\n */\nexport interface NormalMapProps extends TextureMapProps {\n /** Flags controlling how the normal map is applied. Default: [[NormalMapFlags.None]]. */\n NormalFlags?: NormalMapFlags;\n}\n\n/** Describes different types of textures to be applied to a surface material to alter its appearance.\n * @note While technically both [[Pattern]] and [[Normal]] can define their own mapping parameters (`pattern_angle`, `pattern_mapping`, etc), in practice\n * if both maps are present they are expected to have identical mapping parameters, with the exception of `TextureId`.\n * @see [[RenderMaterialAssetProps.Map]] to define the texture maps for a material asset.\n * @public\n */\nexport interface RenderMaterialAssetMapsProps {\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\n Pattern?: TextureMapProps;\n /** Maps a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to the surface, simulating more complex surface details than are\n * present in the surface's geometry.\n */\n Normal?: NormalMapProps;\n /** Maps an image describing detailed minor height variation of the surface geometry. */\n Bump?: TextureMapProps;\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\n Diffuse?: TextureMapProps;\n /** Maps an image describing the glossiness of the surface's finish */\n Finish?: TextureMapProps;\n /** Maps an image describing glowing parts of the surface */\n GlowColor?: TextureMapProps;\n /** Maps an image describing the reflectiveness of the surface */\n Reflect?: TextureMapProps;\n /** Maps an image describing the specular component of the surface */\n Specular?: TextureMapProps;\n /** Maps an image describing the translucency of the surface, how much light comes out the back of the surface */\n TranslucencyColor?: TextureMapProps;\n /** Maps an image describing the transparency of the surface, how visible objects behind this object are */\n TransparentColor?: TextureMapProps;\n /** Maps an image describing the displacement of the surface geometry */\n Displacement?: TextureMapProps;\n}\n\n/** Describes the graphical properties of a [RenderMaterialElement]($backend) as part of a [[RenderMaterialProps]].\n * This representation is used to persist the material properties into the [IModelDb]($backend), but is unwieldy and verbose.\n * @see [RenderMaterialElementParams]($backend) for a somewhat more ergonomic representation.\n * @public\n * @extensions\n */\nexport interface RenderMaterialAssetProps {\n /** If true, this material has a fill/diffuse color; if undefined, defaults to false */\n HasBaseColor?: boolean;\n /** Surface color used for fill or diffuse illumination; if undefined, defaults to black */\n color?: RgbFactorProps;\n /** If true, this material has a specular color; if undefined, defaults to false */\n HasSpecularColor?: boolean;\n /** Surface color used for specular illumination; if undefined, defaults to black */\n specular_color?: RgbFactorProps;\n /** If true, this material has a specular exponent; if undefined, defaults to false */\n HasFinish?: boolean;\n /** Specular exponent (surface shininess); range is 0 to 128; if undefined, defaults to 13.5 */\n finish?: number;\n /** If true, this material has surface transparency; if undefined, defaults to false */\n HasTransmit?: boolean;\n /** Surface transparency; if undefined, defaults to 0.0 */\n transmit?: number;\n /** If true, this material has a value for diffuse reflectivity; if undefined, defaults to false */\n HasDiffuse?: boolean;\n /** Surface diffuse reflectivity; if undefined, defaults to 0.6 */\n diffuse?: number;\n /** If true, this material has a value for specular reflectivity; if undefined, defaults to false. If false, specular value is actually set to 0.0 */\n HasSpecular?: boolean;\n /** Surface specular reflectivity; if undefined, defaults to 0.4 */\n specular?: number;\n /** If true, this material has a value for environmental reflectivity; if undefined, defaults to false */\n HasReflect?: boolean;\n /** Surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined defaults to 0.0 */\n reflect?: number;\n /** If true, this material has a surface reflectance color; if undefined, defaults to false. If false, reflectance color is actually set to specular color */\n HasReflectColor?: boolean;\n /** Surface reflectance color; if undefined, defaults to black */\n reflect_color?: RgbFactorProps;\n /** A scale by which to multiply the components of the normals read from [[Map.Normal]], if a normal map is defined.\n * Default: 1.0\n */\n pbr_normal?: number;\n /** An optional set of texture maps associated with this material. */\n Map?: RenderMaterialAssetMapsProps;\n}\n\n/** Properties that define a [RenderMaterialElement]($backend).\n * @see [[RenderMaterial]] for the representation used by the display system.\n * @public\n * @extensions\n */\nexport interface RenderMaterialProps extends DefinitionElementProps {\n /** The name of a palette that can be used to categorize multiple materials. */\n paletteName: string;\n /** An optional description of the material. */\n description?: string;\n jsonProperties?: {\n /** A container for various \"assets\" describing aspects of the material. */\n materialAssets?: {\n /** Properties of the material describing how it is displayed. */\n renderMaterial?: RenderMaterialAssetProps;\n };\n };\n}\n"]}
@@ -11,6 +11,10 @@ import { ClipVector } from "@itwin/core-geometry";
11
11
  * @public
12
12
  */
13
13
  export class ModelClipGroup {
14
+ /** The Ids of the models to be clipped, or undefined if the group includes all models. */
15
+ models;
16
+ /** The clip to apply to the group of models. `undefined` indicates the models are exempt from clipping. */
17
+ clip;
14
18
  constructor(models, clip) {
15
19
  this.models = models;
16
20
  this.clip = clip;
@@ -54,6 +58,8 @@ export class ModelClipGroup {
54
58
  * @public
55
59
  */
56
60
  export class ModelClipGroups {
61
+ /** The groups of models and their associated clips. */
62
+ groups;
57
63
  /** Create a new ModelClipGroups.
58
64
  * @note The ModelClipGroup takes ownership of the input array, which should not be subsequently modified.
59
65
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ModelClipGroup.js","sourceRoot":"","sources":["../../src/ModelClipGroup.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C;QAC7D,MAAM,MAAM,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,sCAAsC;IAC/B,MAAM;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { ClipVector, ClipVectorProps } from \"@itwin/core-geometry\";\r\n\r\n/** JSON representation of a [[ModelClipGroup]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelClipGroupProps {\r\n /** The Ids of the models in the group. */\r\n models?: Id64Array;\r\n /** JSON representation of the [ClipVector]($core-geometry) applied to the group. */\r\n clip?: ClipVectorProps;\r\n}\r\n\r\n/** Describes how to clip a group of models in the context of a [ViewDefinition3d]($backend) by applying a single [ClipVector]($core-geometry] to each model in the group.\r\n * @see [[ModelClipGroups]] to define multiple groups of models with different clip vectors.\r\n * @public\r\n */\r\nexport class ModelClipGroup {\r\n /** The Ids of the models to be clipped, or undefined if the group includes all models. */\r\n public readonly models?: Id64Array;\r\n /** The clip to apply to the group of models. `undefined` indicates the models are exempt from clipping. */\r\n public readonly clip?: ClipVector;\r\n\r\n private constructor(models: Id64Array | undefined, clip: ClipVector | undefined) {\r\n this.models = models;\r\n this.clip = clip;\r\n }\r\n\r\n /** Create a new ModelClipGroup. The input arguments are captured as references and should not be subsequently modified. */\r\n public static create(clip: ClipVector | undefined, models?: Id64Array): ModelClipGroup {\r\n return new ModelClipGroup(models, clip);\r\n }\r\n\r\n /** Create a deep copy of this group. */\r\n public clone(): ModelClipGroup {\r\n const models = this.models ? [...this.models] : undefined;\r\n return new ModelClipGroup(models, this.clip?.clone());\r\n }\r\n\r\n /** Returns whether the specified model Id belongs to this group. */\r\n public includesModel(modelId: Id64String): boolean {\r\n return undefined === this.models || this.models.includes(modelId);\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props: ModelClipGroupProps): ModelClipGroup {\r\n const models = props.models ? [...props.models] : undefined;\r\n const clip = props.clip ? ClipVector.fromJSON(props.clip) : undefined;\r\n return new ModelClipGroup(models, undefined !== clip && clip.isValid ? clip : undefined);\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): ModelClipGroupProps {\r\n const props: ModelClipGroupProps = {};\r\n if (this.models)\r\n props.models = [...this.models];\r\n\r\n if (this.clip)\r\n props.clip = this.clip.toJSON();\r\n\r\n return props;\r\n }\r\n}\r\n\r\n/** Describes how to clip groups of models in the context of a [ViewDefinition3d]($backend) or [ViewState3d]($frontend).\r\n * Each group will be clipped by the [ClipVector]($core-geometry) associated with the group to which it belongs.\r\n * A model belongs to the first group in the list for which `ModelClipGroup.includesModel()` returns `true`.\r\n * A catch-all group can be defined by a ModelClipGroup with an `undefined` array of model Ids; any model whose Id does not appear in any group's list would belong to this group. If a catch-all group exists, it should appear last in the list.\r\n * A group of models can be exempted from clipping by a ModelClipGroup with an `undefined` ClipVector.\r\n * @note A ModelClipGroups obtained from a [[ViewDetails3d]] should **not** be modified directly. Clone it instead and modify the clone.\r\n * @see [[ViewDetails3d.modelClipGroups]] to define the clip groups for a [ViewDefinition3d]($backend) or [ViewState3d]($frontend).\r\n * @public\r\n */\r\nexport class ModelClipGroups {\r\n /** The groups of models and their associated clips. */\r\n public readonly groups: ModelClipGroup[];\r\n\r\n /** Create a new ModelClipGroups.\r\n * @note The ModelClipGroup takes ownership of the input array, which should not be subsequently modified.\r\n */\r\n public constructor(groups: ModelClipGroup[] = []) {\r\n this.groups = groups;\r\n }\r\n\r\n /** Create a deep copy of this ModelClipGroups. */\r\n public clone(): ModelClipGroups {\r\n const groups = this.groups.map((group) => group.clone());\r\n return new ModelClipGroups(groups);\r\n }\r\n\r\n /** Find the first group to which the specified model Id belongs, if any. */\r\n public findGroup(modelId: Id64String): ModelClipGroup | undefined {\r\n return this.groups.find((group) => group.includesModel(modelId));\r\n }\r\n\r\n /** Returns the array index of the group to which the specified model belongs, or -1 if the model belongs to no group. */\r\n public findGroupIndex(modelId: Id64String): number {\r\n return this.groups.findIndex((group) => group.includesModel(modelId));\r\n }\r\n\r\n /** Find the clip that should be applied to the specified model.\r\n * @note This may return `undefined` if the model belongs to no group, **or** it belongs to a group that should not be clipped.\r\n */\r\n public getClipForModel(modelId: Id64String): ClipVector | undefined {\r\n return this.findGroup(modelId)?.clip;\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props: ModelClipGroupProps[] | undefined): ModelClipGroups {\r\n const groups = props?.map((prop) => ModelClipGroup.fromJSON(prop));\r\n return new ModelClipGroups(groups);\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): ModelClipGroupProps[] {\r\n return this.groups.map((group) => group.toJSON());\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ModelClipGroup.js","sourceRoot":"","sources":["../../src/ModelClipGroup.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAanE;;;GAGG;AACH,MAAM,OAAO,cAAc;IACzB,0FAA0F;IAC1E,MAAM,CAAa;IACnC,2GAA2G;IAC3F,IAAI,CAAc;IAElC,YAAoB,MAA6B,EAAE,IAA4B;QAC7E,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,2HAA2H;IACpH,MAA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,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\n\nimport { Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { ClipVector, ClipVectorProps } from \"@itwin/core-geometry\";\n\n/** JSON representation of a [[ModelClipGroup]].\n * @public\n * @extensions\n */\nexport interface ModelClipGroupProps {\n /** The Ids of the models in the group. */\n models?: Id64Array;\n /** JSON representation of the [ClipVector]($core-geometry) applied to the group. */\n clip?: ClipVectorProps;\n}\n\n/** Describes how to clip a group of models in the context of a [ViewDefinition3d]($backend) by applying a single [ClipVector]($core-geometry] to each model in the group.\n * @see [[ModelClipGroups]] to define multiple groups of models with different clip vectors.\n * @public\n */\nexport class ModelClipGroup {\n /** The Ids of the models to be clipped, or undefined if the group includes all models. */\n public readonly models?: Id64Array;\n /** The clip to apply to the group of models. `undefined` indicates the models are exempt from clipping. */\n public readonly clip?: ClipVector;\n\n private constructor(models: Id64Array | undefined, clip: ClipVector | undefined) {\n this.models = models;\n this.clip = clip;\n }\n\n /** Create a new ModelClipGroup. The input arguments are captured as references and should not be subsequently modified. */\n public static create(clip: ClipVector | undefined, models?: Id64Array): ModelClipGroup {\n return new ModelClipGroup(models, clip);\n }\n\n /** Create a deep copy of this group. */\n public clone(): ModelClipGroup {\n const models = this.models ? [...this.models] : undefined;\n return new ModelClipGroup(models, this.clip?.clone());\n }\n\n /** Returns whether the specified model Id belongs to this group. */\n public includesModel(modelId: Id64String): boolean {\n return undefined === this.models || this.models.includes(modelId);\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props: ModelClipGroupProps): ModelClipGroup {\n const models = props.models ? [...props.models] : undefined;\n const clip = props.clip ? ClipVector.fromJSON(props.clip) : undefined;\n return new ModelClipGroup(models, undefined !== clip && clip.isValid ? clip : undefined);\n }\n\n /** Convert to JSON representation. */\n public toJSON(): ModelClipGroupProps {\n const props: ModelClipGroupProps = {};\n if (this.models)\n props.models = [...this.models];\n\n if (this.clip)\n props.clip = this.clip.toJSON();\n\n return props;\n }\n}\n\n/** Describes how to clip groups of models in the context of a [ViewDefinition3d]($backend) or [ViewState3d]($frontend).\n * Each group will be clipped by the [ClipVector]($core-geometry) associated with the group to which it belongs.\n * A model belongs to the first group in the list for which `ModelClipGroup.includesModel()` returns `true`.\n * A catch-all group can be defined by a ModelClipGroup with an `undefined` array of model Ids; any model whose Id does not appear in any group's list would belong to this group. If a catch-all group exists, it should appear last in the list.\n * A group of models can be exempted from clipping by a ModelClipGroup with an `undefined` ClipVector.\n * @note A ModelClipGroups obtained from a [[ViewDetails3d]] should **not** be modified directly. Clone it instead and modify the clone.\n * @see [[ViewDetails3d.modelClipGroups]] to define the clip groups for a [ViewDefinition3d]($backend) or [ViewState3d]($frontend).\n * @public\n */\nexport class ModelClipGroups {\n /** The groups of models and their associated clips. */\n public readonly groups: ModelClipGroup[];\n\n /** Create a new ModelClipGroups.\n * @note The ModelClipGroup takes ownership of the input array, which should not be subsequently modified.\n */\n public constructor(groups: ModelClipGroup[] = []) {\n this.groups = groups;\n }\n\n /** Create a deep copy of this ModelClipGroups. */\n public clone(): ModelClipGroups {\n const groups = this.groups.map((group) => group.clone());\n return new ModelClipGroups(groups);\n }\n\n /** Find the first group to which the specified model Id belongs, if any. */\n public findGroup(modelId: Id64String): ModelClipGroup | undefined {\n return this.groups.find((group) => group.includesModel(modelId));\n }\n\n /** Returns the array index of the group to which the specified model belongs, or -1 if the model belongs to no group. */\n public findGroupIndex(modelId: Id64String): number {\n return this.groups.findIndex((group) => group.includesModel(modelId));\n }\n\n /** Find the clip that should be applied to the specified model.\n * @note This may return `undefined` if the model belongs to no group, **or** it belongs to a group that should not be clipped.\n */\n public getClipForModel(modelId: Id64String): ClipVector | undefined {\n return this.findGroup(modelId)?.clip;\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props: ModelClipGroupProps[] | undefined): ModelClipGroups {\n const groups = props?.map((prop) => ModelClipGroup.fromJSON(prop));\n return new ModelClipGroups(groups);\n }\n\n /** Convert to JSON representation. */\n public toJSON(): ModelClipGroupProps[] {\n return this.groups.map((group) => group.toJSON());\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModelGeometryChanges.js","sourceRoot":"","sources":["../../src/ModelGeometryChanges.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAA0B,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,OAAO,EAAgB,MAAM,sBAAsB,CAAC;AAwE7D;;GAEG;AACH,MAAM,KAAW,qBAAqB,CAiCrC;AAjCD,WAAiB,qBAAqB;IACpC,QAAQ,CAAC,CAAC,cAAc,CAAC,KAA+B,EAAE,IAAuC;QAC/F,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,GAAG,GAAG,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClD,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,KAAK,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACpD,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,SAAS,cAAc,CAAC,KAA+B,EAAE,IAAuC;QAC9F,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,IA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IAC7D,CAAC;IAFe,6BAAQ,WAEvB,CAAA;IAED,oCAAoC;IACpC,SAAgB,QAAQ,CAAC,KAAgC;QACvD,OAAO;YACL,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,YAAY,EAAE,KAAK,CAAC,IAAI;YACxB,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;YACpC,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC;SAChD,CAAC;IACJ,CAAC;IAPe,6BAAQ,WAOvB,CAAA;IAED,kEAAkE;IAClE,SAAgB,aAAa,CAAC,OAAuC,EAAE,OAAmB;QACxF,KAAK,MAAM,MAAM,IAAI,OAAO;YAC1B,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO;gBACvB,OAAO,MAAM,CAAC;QAElB,OAAO,SAAS,CAAC;IACnB,CAAC;IANe,kCAAa,gBAM5B,CAAA;AACH,CAAC,EA9BgB,oBAAoB,KAApB,oBAAoB,QA8BpC","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 Geometry\r\n */\r\n\r\nimport { assert, CompressedId64Set, DbOpcode, GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { Range3d, Range3dProps } from \"@itwin/core-geometry\";\r\n\r\n/** Compact wire format representing geometric changes to a set of elements as part of a [[ModelGeometryChangesProps]].\r\n * All of the elements belong to the same model.\r\n * The number of [[ids]] and [[ranges]] are guaranteed to be the same.\r\n * @see [[ElementGeometryChange]] for a more useful representation of an individual element change.\r\n * @see [[ModelGeometryChanges.iterable]] to iterate over [[ElementGeometryChange]]s.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementIdsAndRangesProps {\r\n /** The Ids of the elements, compressed and sorted in ascending order. */\r\n readonly ids: CompressedId64Set;\r\n /** The range of each element, indexed by the position of the corresponding element's Id in [[ids]]. */\r\n readonly ranges: Range3dProps[];\r\n}\r\n\r\n/** Compact wire format representing geometric changes to [GeometricElement]($backend)s within a [GeometricModel]($backend).\r\n * A given element Id will appear in no more than one of [[inserted]], [[updated]], or [[deleted]].\r\n * @see [[ModelGeometryChanges]] for a more useful representation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelGeometryChangesProps {\r\n /** The Id of the model. */\r\n readonly id: Id64String;\r\n /** The range of the model, computed as the union of the ranges of all geometric elements within the model. */\r\n readonly range: Range3dProps;\r\n /** The geometry GUID of the model. */\r\n readonly guid: GuidString;\r\n /** If defined, the Ids and ranges of newly-inserted [GeometricElement]($backend)s. */\r\n readonly inserted?: ElementIdsAndRangesProps;\r\n /** If defined, the Ids and ranges of [GeometricElement]($backend)s whose geometric properties were modified. */\r\n readonly updated?: ElementIdsAndRangesProps;\r\n /** If defined, the Ids of deleted [GeometricElement]($backend)s. */\r\n readonly deleted?: CompressedId64Set;\r\n}\r\n\r\n/** Represents the insertion of a new [GeometricElement]($backend), or a change to the geometric properties of an existing [GeometricElement]($backend).\r\n * @see [[ElementGeometryChange]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ExtantElementGeometryChange {\r\n /** Indicates whether this change resulted from the insertion of a new element or modification of an existing one.\r\n * Used as discriminant for [[ElementGeometryChange]] union.\r\n */\r\n readonly type: DbOpcode.Insert | DbOpcode.Update;\r\n /** The element's Id. */\r\n readonly id: Id64String;\r\n /** The element's range. */\r\n readonly range: Range3d;\r\n}\r\n\r\n/** Represents the deletion of a [GeometricElement]($backend).\r\n * @see [[ElementGeometryChange]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DeletedElementGeometryChange {\r\n /** Discriminant for [[ElementGeometryChange]] union. */\r\n readonly type: DbOpcode.Delete;\r\n /** The element's Id. */\r\n readonly id: Id64String;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport type ElementGeometryChange = ExtantElementGeometryChange | DeletedElementGeometryChange;\r\n\r\n/** Represents a change to the geometry of a [GeometricElement]($backend), as exposed by [[ModelGeometryChanges.elements]].\r\n * @public\r\n */\r\nexport namespace ElementGeometryChange { // eslint-disable-line @typescript-eslint/no-redeclare\r\n function* extantIterator(props: ElementIdsAndRangesProps, type: DbOpcode.Insert | DbOpcode.Update): Iterator<ElementGeometryChange> {\r\n let index = 0;\r\n const ids = CompressedId64Set.iterable(props.ids);\r\n for (const id of ids) {\r\n assert(undefined !== props.ranges[index]);\r\n const range = Range3d.fromJSON(props.ranges[index]);\r\n index++;\r\n yield { type, id, range };\r\n }\r\n }\r\n\r\n function extantIterable(props: ElementIdsAndRangesProps, type: DbOpcode.Insert | DbOpcode.Update): Iterable<ElementGeometryChange> {\r\n return { [Symbol.iterator]: () => extantIterator(props, type) };\r\n }\r\n\r\n /** Obtain an iterator over the geometry changes for a single [GeometricModel]($backend). A given element will appear at most once. */\r\n export function* iterator(modelChanges: ModelGeometryChangesProps): Iterator<ElementGeometryChange> {\r\n if (modelChanges.inserted)\r\n yield* extantIterable(modelChanges.inserted, DbOpcode.Insert);\r\n\r\n if (modelChanges.updated)\r\n yield* extantIterable(modelChanges.updated, DbOpcode.Update);\r\n\r\n if (modelChanges.deleted)\r\n for (const id of CompressedId64Set.iterable(modelChanges.deleted))\r\n yield { type: DbOpcode.Delete, id };\r\n }\r\n\r\n /** Obtain an iterable over the geometry changes for a single [GeometricModel]($backend). A given element will appear at most once. */\r\n export function iterable(modelChanges: ModelGeometryChangesProps): Iterable<ElementGeometryChange> {\r\n return { [Symbol.iterator]: () => iterator(modelChanges) };\r\n }\r\n}\r\n\r\n/** Represents geometric changes to a set of [GeometricElement]($backend)s belonging to a single [GeometricModel]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelGeometryChanges {\r\n /** The model's Id. */\r\n readonly id: Id64String;\r\n /** The model's geometry GUID. */\r\n readonly geometryGuid: GuidString;\r\n /** The model's range. */\r\n readonly range: Range3d;\r\n /** The individual geometric element changes. */\r\n readonly elements: Iterable<ElementGeometryChange>;\r\n}\r\n\r\n/** Represents geometric changes to a set of [GeometricElement]($backend)s belonging to a single [GeometricModel]($backend).\r\n * @see [GraphicalEditingScope]($frontend) to monitor these changes.\r\n * @public\r\n */\r\nexport namespace ModelGeometryChanges {\r\n /** Obtain an iterator over the geometry changes for a set of models. A given model will appear at most once. */\r\n export function* iterator(modelChanges: ModelGeometryChangesProps[]): Iterator<ModelGeometryChanges> {\r\n for (const props of modelChanges)\r\n yield fromJSON(props);\r\n }\r\n\r\n /** Obtain an iterable over the geometry changes for a set of models. A given model will appear at most once. */\r\n export function iterable(modelChanges: ModelGeometryChangesProps[]): Iterable<ModelGeometryChanges> {\r\n return { [Symbol.iterator]: () => iterator(modelChanges) };\r\n }\r\n\r\n /** Instantiate from wire format. */\r\n export function fromJSON(props: ModelGeometryChangesProps): ModelGeometryChanges {\r\n return {\r\n id: props.id,\r\n geometryGuid: props.guid,\r\n range: Range3d.fromJSON(props.range),\r\n elements: ElementGeometryChange.iterable(props),\r\n };\r\n }\r\n\r\n /** Obtain the ModelGeometryChanges for the specified model Id. */\r\n export function findByModelId(changes: Iterable<ModelGeometryChanges>, modelId: Id64String): ModelGeometryChanges | undefined {\r\n for (const change of changes)\r\n if (change.id === modelId)\r\n return change;\r\n\r\n return undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ModelGeometryChanges.js","sourceRoot":"","sources":["../../src/ModelGeometryChanges.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAA0B,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,OAAO,EAAgB,MAAM,sBAAsB,CAAC;AAwE7D;;GAEG;AACH,MAAM,KAAW,qBAAqB,CAiCrC;AAjCD,WAAiB,qBAAqB;IACpC,QAAQ,CAAC,CAAC,cAAc,CAAC,KAA+B,EAAE,IAAu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/*---------------------------------------------------------------------------------------------\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 Geometry\n */\n\nimport { assert, CompressedId64Set, DbOpcode, GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { Range3d, Range3dProps } from \"@itwin/core-geometry\";\n\n/** Compact wire format representing geometric changes to a set of elements as part of a [[ModelGeometryChangesProps]].\n * All of the elements belong to the same model.\n * The number of [[ids]] and [[ranges]] are guaranteed to be the same.\n * @see [[ElementGeometryChange]] for a more useful representation of an individual element change.\n * @see [[ModelGeometryChanges.iterable]] to iterate over [[ElementGeometryChange]]s.\n * @public\n * @extensions\n */\nexport interface ElementIdsAndRangesProps {\n /** The Ids of the elements, compressed and sorted in ascending order. */\n readonly ids: CompressedId64Set;\n /** The range of each element, indexed by the position of the corresponding element's Id in [[ids]]. */\n readonly ranges: Range3dProps[];\n}\n\n/** Compact wire format representing geometric changes to [GeometricElement]($backend)s within a [GeometricModel]($backend).\n * A given element Id will appear in no more than one of [[inserted]], [[updated]], or [[deleted]].\n * @see [[ModelGeometryChanges]] for a more useful representation.\n * @public\n * @extensions\n */\nexport interface ModelGeometryChangesProps {\n /** The Id of the model. */\n readonly id: Id64String;\n /** The range of the model, computed as the union of the ranges of all geometric elements within the model. */\n readonly range: Range3dProps;\n /** The geometry GUID of the model. */\n readonly guid: GuidString;\n /** If defined, the Ids and ranges of newly-inserted [GeometricElement]($backend)s. */\n readonly inserted?: ElementIdsAndRangesProps;\n /** If defined, the Ids and ranges of [GeometricElement]($backend)s whose geometric properties were modified. */\n readonly updated?: ElementIdsAndRangesProps;\n /** If defined, the Ids of deleted [GeometricElement]($backend)s. */\n readonly deleted?: CompressedId64Set;\n}\n\n/** Represents the insertion of a new [GeometricElement]($backend), or a change to the geometric properties of an existing [GeometricElement]($backend).\n * @see [[ElementGeometryChange]].\n * @public\n * @extensions\n */\nexport interface ExtantElementGeometryChange {\n /** Indicates whether this change resulted from the insertion of a new element or modification of an existing one.\n * Used as discriminant for [[ElementGeometryChange]] union.\n */\n readonly type: DbOpcode.Insert | DbOpcode.Update;\n /** The element's Id. */\n readonly id: Id64String;\n /** The element's range. */\n readonly range: Range3d;\n}\n\n/** Represents the deletion of a [GeometricElement]($backend).\n * @see [[ElementGeometryChange]].\n * @public\n * @extensions\n */\nexport interface DeletedElementGeometryChange {\n /** Discriminant for [[ElementGeometryChange]] union. */\n readonly type: DbOpcode.Delete;\n /** The element's Id. */\n readonly id: Id64String;\n}\n\n/**\n * @public\n * @extensions\n */\nexport type ElementGeometryChange = ExtantElementGeometryChange | DeletedElementGeometryChange;\n\n/** Represents a change to the geometry of a [GeometricElement]($backend), as exposed by [[ModelGeometryChanges.elements]].\n * @public\n */\nexport namespace ElementGeometryChange { // eslint-disable-line @typescript-eslint/no-redeclare\n function* extantIterator(props: ElementIdsAndRangesProps, type: DbOpcode.Insert | DbOpcode.Update): Iterator<ElementGeometryChange> {\n let index = 0;\n const ids = CompressedId64Set.iterable(props.ids);\n for (const id of ids) {\n assert(undefined !== props.ranges[index]);\n const range = Range3d.fromJSON(props.ranges[index]);\n index++;\n yield { type, id, range };\n }\n }\n\n function extantIterable(props: ElementIdsAndRangesProps, type: DbOpcode.Insert | DbOpcode.Update): Iterable<ElementGeometryChange> {\n return { [Symbol.iterator]: () => extantIterator(props, type) };\n }\n\n /** Obtain an iterator over the geometry changes for a single [GeometricModel]($backend). A given element will appear at most once. */\n export function* iterator(modelChanges: ModelGeometryChangesProps): Iterator<ElementGeometryChange> {\n if (modelChanges.inserted)\n yield* extantIterable(modelChanges.inserted, DbOpcode.Insert);\n\n if (modelChanges.updated)\n yield* extantIterable(modelChanges.updated, DbOpcode.Update);\n\n if (modelChanges.deleted)\n for (const id of CompressedId64Set.iterable(modelChanges.deleted))\n yield { type: DbOpcode.Delete, id };\n }\n\n /** Obtain an iterable over the geometry changes for a single [GeometricModel]($backend). A given element will appear at most once. */\n export function iterable(modelChanges: ModelGeometryChangesProps): Iterable<ElementGeometryChange> {\n return { [Symbol.iterator]: () => iterator(modelChanges) };\n }\n}\n\n/** Represents geometric changes to a set of [GeometricElement]($backend)s belonging to a single [GeometricModel]($backend).\n * @public\n * @extensions\n */\nexport interface ModelGeometryChanges {\n /** The model's Id. */\n readonly id: Id64String;\n /** The model's geometry GUID. */\n readonly geometryGuid: GuidString;\n /** The model's range. */\n readonly range: Range3d;\n /** The individual geometric element changes. */\n readonly elements: Iterable<ElementGeometryChange>;\n}\n\n/** Represents geometric changes to a set of [GeometricElement]($backend)s belonging to a single [GeometricModel]($backend).\n * @see [GraphicalEditingScope]($frontend) to monitor these changes.\n * @public\n */\nexport namespace ModelGeometryChanges {\n /** Obtain an iterator over the geometry changes for a set of models. A given model will appear at most once. */\n export function* iterator(modelChanges: ModelGeometryChangesProps[]): Iterator<ModelGeometryChanges> {\n for (const props of modelChanges)\n yield fromJSON(props);\n }\n\n /** Obtain an iterable over the geometry changes for a set of models. A given model will appear at most once. */\n export function iterable(modelChanges: ModelGeometryChangesProps[]): Iterable<ModelGeometryChanges> {\n return { [Symbol.iterator]: () => iterator(modelChanges) };\n }\n\n /** Instantiate from wire format. */\n export function fromJSON(props: ModelGeometryChangesProps): ModelGeometryChanges {\n return {\n id: props.id,\n geometryGuid: props.guid,\n range: Range3d.fromJSON(props.range),\n elements: ElementGeometryChange.iterable(props),\n };\n }\n\n /** Obtain the ModelGeometryChanges for the specified model Id. */\n export function findByModelId(changes: Iterable<ModelGeometryChanges>, modelId: Id64String): ModelGeometryChanges | undefined {\n for (const change of changes)\n if (change.id === modelId)\n return change;\n\n return undefined;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModelProps.js","sourceRoot":"","sources":["../../src/ModelProps.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 Entities\r\n */\r\n\r\nimport { GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { XYProps } from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"./Code\";\r\nimport { RelatedElementProps } from \"./ElementProps\";\r\nimport { EntityProps, EntityQueryParams } from \"./EntityProps\";\r\n\r\n/** Properties that define a [Model]($docs/bis/guide/fundamentals/model-fundamentals)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelProps extends EntityProps {\r\n modeledElement: RelatedElementProps;\r\n name?: string;\r\n /** @note must always match the model of the [[ModelProps.modeledElement]] */\r\n parentModel?: Id64String;\r\n isPrivate?: boolean;\r\n isTemplate?: boolean;\r\n jsonProperties?: any;\r\n}\r\n\r\n/** Properties that specify what model should be loaded.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelLoadProps {\r\n id?: Id64String;\r\n code?: CodeProps;\r\n}\r\n\r\n/** Parameters for performing a query on [Model]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelQueryParams extends EntityQueryParams {\r\n wantTemplate?: boolean;\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Properties that describe a [GeometricModel]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricModelProps extends ModelProps {\r\n /** A unique identifier that is updated each time a change affecting the appearance of a geometric element within this model\r\n * is committed to the iModel. In other words, between versions of the iModel, if this value is the same you can\r\n * assume the appearance of all of the geometry in the model is the same (Note: other properties of elements may have changed.)\r\n * If undefined, the state of the geometry is unknown.\r\n */\r\n geometryGuid?: GuidString;\r\n}\r\n\r\n/** Properties that define a [GeometricModel2d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricModel2dProps extends GeometricModelProps {\r\n /** The actual coordinates of (0,0) in modeling coordinates. An offset applied to all modeling coordinates. */\r\n globalOrigin?: XYProps;\r\n}\r\n\r\n/** Properties that define a [GeometricModel3d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricModel3dProps extends GeometricModelProps {\r\n /** If true, then the elements in this GeometricModel3d are not in real-world coordinates and will not be in the spatial index. */\r\n isNotSpatiallyLocated?: boolean;\r\n /** If true, then the elements in this GeometricModel3d are expected to be in an XY plane. */\r\n isPlanProjection?: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"ModelProps.js","sourceRoot":"","sources":["../../src/ModelProps.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 Entities\n */\n\nimport { GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { XYProps } from \"@itwin/core-geometry\";\nimport { CodeProps } from \"./Code\";\nimport { RelatedElementProps } from \"./ElementProps\";\nimport { EntityProps, EntityQueryParams } from \"./EntityProps\";\n\n/** Properties that define a [Model]($docs/bis/guide/fundamentals/model-fundamentals)\n * @public\n * @extensions\n */\nexport interface ModelProps extends EntityProps {\n modeledElement: RelatedElementProps;\n name?: string;\n /** @note must always match the model of the [[ModelProps.modeledElement]] */\n parentModel?: Id64String;\n isPrivate?: boolean;\n isTemplate?: boolean;\n jsonProperties?: any;\n}\n\n/** Properties that specify what model should be loaded.\n * @public\n * @extensions\n */\nexport interface ModelLoadProps {\n id?: Id64String;\n code?: CodeProps;\n}\n\n/** Parameters for performing a query on [Model]($backend) classes.\n * @public\n * @extensions\n */\nexport interface ModelQueryParams extends EntityQueryParams {\n wantTemplate?: boolean;\n wantPrivate?: boolean;\n}\n\n/** Properties that describe a [GeometricModel]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricModelProps extends ModelProps {\n /** A unique identifier that is updated each time a change affecting the appearance of a geometric element within this model\n * is committed to the iModel. In other words, between versions of the iModel, if this value is the same you can\n * assume the appearance of all of the geometry in the model is the same (Note: other properties of elements may have changed.)\n * If undefined, the state of the geometry is unknown.\n */\n geometryGuid?: GuidString;\n}\n\n/** Properties that define a [GeometricModel2d]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricModel2dProps extends GeometricModelProps {\n /** The actual coordinates of (0,0) in modeling coordinates. An offset applied to all modeling coordinates. */\n globalOrigin?: XYProps;\n}\n\n/** Properties that define a [GeometricModel3d]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricModel3dProps extends GeometricModelProps {\n /** If true, then the elements in this GeometricModel3d are not in real-world coordinates and will not be in the spatial index. */\n isNotSpatiallyLocated?: boolean;\n /** If true, then the elements in this GeometricModel3d are expected to be in an XY plane. */\n isPlanProjection?: boolean;\n}\n"]}