@itwin/core-common 5.0.0-dev.8 → 5.0.0-dev.82

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 (724) hide show
  1. package/CHANGELOG.md +50 -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/BackgroundMapProvider.js +4 -0
  11. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  12. package/lib/cjs/BackgroundMapSettings.js +19 -0
  13. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  14. package/lib/cjs/BlobReader.js +8 -6
  15. package/lib/cjs/BlobReader.js.map +1 -1
  16. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  17. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  18. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  19. package/lib/cjs/Camera.js +3 -0
  20. package/lib/cjs/Camera.js.map +1 -1
  21. package/lib/cjs/ChangesetProps.d.ts +1 -1
  22. package/lib/cjs/ChangesetProps.js.map +1 -1
  23. package/lib/cjs/ClipStyle.js +31 -5
  24. package/lib/cjs/ClipStyle.js.map +1 -1
  25. package/lib/cjs/Code.d.ts +0 -5
  26. package/lib/cjs/Code.d.ts.map +1 -1
  27. package/lib/cjs/Code.js +16 -11
  28. package/lib/cjs/Code.js.map +1 -1
  29. package/lib/cjs/ColorDef.js +11 -10
  30. package/lib/cjs/ColorDef.js.map +1 -1
  31. package/lib/cjs/ConcurrentQuery.d.ts +37 -1
  32. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  33. package/lib/cjs/ConcurrentQuery.js +16 -3
  34. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  35. package/lib/cjs/ContextRealityModel.js +53 -27
  36. package/lib/cjs/ContextRealityModel.js.map +1 -1
  37. package/lib/cjs/ContourDisplay.js +40 -5
  38. package/lib/cjs/ContourDisplay.js.map +1 -1
  39. package/lib/cjs/DisplayStyleSettings.js +95 -63
  40. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  41. package/lib/cjs/ECSqlReader.d.ts +2 -0
  42. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  43. package/lib/cjs/ECSqlReader.js +56 -50
  44. package/lib/cjs/ECSqlReader.js.map +1 -1
  45. package/lib/cjs/ElementProps.d.ts.map +1 -1
  46. package/lib/cjs/ElementProps.js +7 -3
  47. package/lib/cjs/ElementProps.js.map +1 -1
  48. package/lib/cjs/EntityProps.js +31 -0
  49. package/lib/cjs/EntityProps.js.map +1 -1
  50. package/lib/cjs/Environment.js +25 -2
  51. package/lib/cjs/Environment.js.map +1 -1
  52. package/lib/cjs/FeatureIndex.js +15 -6
  53. package/lib/cjs/FeatureIndex.js.map +1 -1
  54. package/lib/cjs/FeatureSymbology.d.ts +25 -73
  55. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  56. package/lib/cjs/FeatureSymbology.js +88 -103
  57. package/lib/cjs/FeatureSymbology.js.map +1 -1
  58. package/lib/cjs/FeatureTable.d.ts +6 -108
  59. package/lib/cjs/FeatureTable.d.ts.map +1 -1
  60. package/lib/cjs/FeatureTable.js +13 -329
  61. package/lib/cjs/FeatureTable.js.map +1 -1
  62. package/lib/cjs/Fonts.d.ts +68 -10
  63. package/lib/cjs/Fonts.d.ts.map +1 -1
  64. package/lib/cjs/Fonts.js +19 -4
  65. package/lib/cjs/Fonts.js.map +1 -1
  66. package/lib/cjs/Frustum.js +2 -2
  67. package/lib/cjs/Frustum.js.map +1 -1
  68. package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
  69. package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
  70. package/lib/cjs/GeoCoordinateServices.js +2 -1
  71. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  72. package/lib/cjs/GeometryParams.js +58 -0
  73. package/lib/cjs/GeometryParams.js.map +1 -1
  74. package/lib/cjs/Gradient.d.ts +3 -4
  75. package/lib/cjs/Gradient.d.ts.map +1 -1
  76. package/lib/cjs/Gradient.js +21 -19
  77. package/lib/cjs/Gradient.js.map +1 -1
  78. package/lib/cjs/GraphicParams.js +14 -12
  79. package/lib/cjs/GraphicParams.js.map +1 -1
  80. package/lib/cjs/GroundPlane.js +8 -2
  81. package/lib/cjs/GroundPlane.js.map +1 -1
  82. package/lib/cjs/HSLColor.js +6 -0
  83. package/lib/cjs/HSLColor.js.map +1 -1
  84. package/lib/cjs/HSVColor.js +6 -0
  85. package/lib/cjs/HSVColor.js.map +1 -1
  86. package/lib/cjs/HiddenLine.d.ts +17 -18
  87. package/lib/cjs/HiddenLine.d.ts.map +1 -1
  88. package/lib/cjs/HiddenLine.js +24 -5
  89. package/lib/cjs/HiddenLine.js.map +1 -1
  90. package/lib/cjs/Hilite.js +10 -0
  91. package/lib/cjs/Hilite.js.map +1 -1
  92. package/lib/cjs/IModel.d.ts +3 -12
  93. package/lib/cjs/IModel.d.ts.map +1 -1
  94. package/lib/cjs/IModel.js +47 -23
  95. package/lib/cjs/IModel.js.map +1 -1
  96. package/lib/cjs/IModelError.d.ts +0 -2
  97. package/lib/cjs/IModelError.d.ts.map +1 -1
  98. package/lib/cjs/IModelError.js +3 -8
  99. package/lib/cjs/IModelError.js.map +1 -1
  100. package/lib/cjs/IModelVersion.js +4 -0
  101. package/lib/cjs/IModelVersion.js.map +1 -1
  102. package/lib/cjs/ITwinError.d.ts +1 -1
  103. package/lib/cjs/ITwinError.d.ts.map +1 -1
  104. package/lib/cjs/ITwinError.js +1 -1
  105. package/lib/cjs/ITwinError.js.map +1 -1
  106. package/lib/cjs/Image.d.ts +22 -8
  107. package/lib/cjs/Image.d.ts.map +1 -1
  108. package/lib/cjs/Image.js +20 -4
  109. package/lib/cjs/Image.js.map +1 -1
  110. package/lib/cjs/IpcAppProps.d.ts +2 -0
  111. package/lib/cjs/IpcAppProps.d.ts.map +1 -1
  112. package/lib/cjs/IpcAppProps.js.map +1 -1
  113. package/lib/cjs/LightSettings.js +39 -1
  114. package/lib/cjs/LightSettings.js.map +1 -1
  115. package/lib/cjs/Localization.d.ts +0 -10
  116. package/lib/cjs/Localization.d.ts.map +1 -1
  117. package/lib/cjs/Localization.js +0 -1
  118. package/lib/cjs/Localization.js.map +1 -1
  119. package/lib/cjs/MapImagerySettings.js +3 -2
  120. package/lib/cjs/MapImagerySettings.js.map +1 -1
  121. package/lib/cjs/MapLayerSettings.d.ts +20 -0
  122. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  123. package/lib/cjs/MapLayerSettings.js +50 -1
  124. package/lib/cjs/MapLayerSettings.js.map +1 -1
  125. package/lib/cjs/MassProperties.d.ts +2 -0
  126. package/lib/cjs/MassProperties.d.ts.map +1 -1
  127. package/lib/cjs/MassProperties.js.map +1 -1
  128. package/lib/cjs/ModelClipGroup.js +6 -0
  129. package/lib/cjs/ModelClipGroup.js.map +1 -1
  130. package/lib/cjs/OctEncodedNormal.js +4 -0
  131. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  132. package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
  133. package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
  134. package/lib/cjs/PlanProjectionSettings.js +8 -1
  135. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  136. package/lib/cjs/PlanarClipMask.d.ts +0 -12
  137. package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
  138. package/lib/cjs/PlanarClipMask.js +24 -2
  139. package/lib/cjs/PlanarClipMask.js.map +1 -1
  140. package/lib/cjs/QPoint.d.ts +5 -5
  141. package/lib/cjs/QPoint.d.ts.map +1 -1
  142. package/lib/cjs/QPoint.js +37 -29
  143. package/lib/cjs/QPoint.js.map +1 -1
  144. package/lib/cjs/RealityModelDisplaySettings.js +81 -4
  145. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  146. package/lib/cjs/RenderMaterial.d.ts +0 -43
  147. package/lib/cjs/RenderMaterial.d.ts.map +1 -1
  148. package/lib/cjs/RenderMaterial.js +6 -51
  149. package/lib/cjs/RenderMaterial.js.map +1 -1
  150. package/lib/cjs/RenderPolyline.d.ts +36 -0
  151. package/lib/cjs/RenderPolyline.d.ts.map +1 -0
  152. package/lib/cjs/RenderPolyline.js +26 -0
  153. package/lib/cjs/RenderPolyline.js.map +1 -0
  154. package/lib/cjs/RenderSchedule.d.ts +1 -2
  155. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  156. package/lib/cjs/RenderSchedule.js +138 -11
  157. package/lib/cjs/RenderSchedule.js.map +1 -1
  158. package/lib/cjs/RenderTexture.d.ts +5 -23
  159. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  160. package/lib/cjs/RenderTexture.js +13 -16
  161. package/lib/cjs/RenderTexture.js.map +1 -1
  162. package/lib/cjs/RgbColor.js +3 -0
  163. package/lib/cjs/RgbColor.js.map +1 -1
  164. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  165. package/lib/cjs/RpcInterface.js +7 -1
  166. package/lib/cjs/RpcInterface.js.map +1 -1
  167. package/lib/cjs/SkyBox.js +17 -4
  168. package/lib/cjs/SkyBox.js.map +1 -1
  169. package/lib/cjs/SolarShadows.js +5 -1
  170. package/lib/cjs/SolarShadows.js.map +1 -1
  171. package/lib/cjs/SpatialClassification.js +19 -1
  172. package/lib/cjs/SpatialClassification.js.map +1 -1
  173. package/lib/cjs/SubCategoryAppearance.js +35 -1
  174. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  175. package/lib/cjs/SubCategoryOverride.js +16 -2
  176. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  177. package/lib/cjs/TerrainSettings.d.ts +0 -7
  178. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  179. package/lib/cjs/TerrainSettings.js +19 -0
  180. package/lib/cjs/TerrainSettings.js.map +1 -1
  181. package/lib/cjs/TextureMapping.d.ts +17 -14
  182. package/lib/cjs/TextureMapping.d.ts.map +1 -1
  183. package/lib/cjs/TextureMapping.js +47 -19
  184. package/lib/cjs/TextureMapping.js.map +1 -1
  185. package/lib/cjs/ThematicDisplay.js +53 -2
  186. package/lib/cjs/ThematicDisplay.js.map +1 -1
  187. package/lib/cjs/Thumbnail.d.ts +1 -1
  188. package/lib/cjs/Thumbnail.js.map +1 -1
  189. package/lib/cjs/Tween.js +28 -19
  190. package/lib/cjs/Tween.js.map +1 -1
  191. package/lib/cjs/ViewDetails.js +10 -6
  192. package/lib/cjs/ViewDetails.js.map +1 -1
  193. package/lib/cjs/ViewFlags.d.ts +1 -3
  194. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  195. package/lib/cjs/ViewFlags.js +86 -5
  196. package/lib/cjs/ViewFlags.js.map +1 -1
  197. package/lib/cjs/ViewProps.d.ts +0 -4
  198. package/lib/cjs/ViewProps.d.ts.map +1 -1
  199. package/lib/cjs/ViewProps.js.map +1 -1
  200. package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
  201. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  202. package/lib/cjs/annotation/TextAnnotation.js +10 -0
  203. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  204. package/lib/cjs/annotation/TextBlock.js +27 -6
  205. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  206. package/lib/cjs/annotation/TextStyle.js +65 -19
  207. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  208. package/lib/cjs/core-common.d.ts +1 -2
  209. package/lib/cjs/core-common.d.ts.map +1 -1
  210. package/lib/cjs/core-common.js +1 -2
  211. package/lib/cjs/core-common.js.map +1 -1
  212. package/lib/cjs/geometry/AdditionalTransform.js +12 -0
  213. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  214. package/lib/cjs/geometry/AreaPattern.js +17 -0
  215. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  216. package/lib/cjs/geometry/BoundingSphere.js +4 -0
  217. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  218. package/lib/cjs/geometry/Cartographic.js +23 -20
  219. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  220. package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
  221. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  222. package/lib/cjs/geometry/ElementGeometry.js +26 -8
  223. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  224. package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
  225. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  226. package/lib/cjs/geometry/FrustumPlanes.js +1 -0
  227. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  228. package/lib/cjs/geometry/GeodeticDatum.js +100 -0
  229. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  230. package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
  231. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  232. package/lib/cjs/geometry/GeometryStream.js +19 -6
  233. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  234. package/lib/cjs/geometry/ImageGraphic.js +10 -0
  235. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  236. package/lib/cjs/geometry/LineStyle.js +14 -0
  237. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  238. package/lib/cjs/geometry/Placement.js +6 -0
  239. package/lib/cjs/geometry/Placement.js.map +1 -1
  240. package/lib/cjs/geometry/Projection.js +75 -0
  241. package/lib/cjs/geometry/Projection.js.map +1 -1
  242. package/lib/cjs/geometry/TextString.js +18 -0
  243. package/lib/cjs/geometry/TextString.js.map +1 -1
  244. package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  245. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
  246. package/lib/cjs/internal/BackendTypes.js.map +1 -0
  247. package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
  248. package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
  249. package/lib/cjs/internal/PackedFeatureTable.js +359 -0
  250. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
  251. package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
  252. package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
  253. package/lib/cjs/internal/RenderMaterialParams.js +68 -0
  254. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
  255. package/lib/cjs/internal/RenderMesh.d.ts +52 -0
  256. package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
  257. package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
  258. package/lib/cjs/internal/RenderMesh.js.map +1 -0
  259. package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
  260. package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
  261. package/lib/cjs/internal/RenderTextureParams.js +37 -0
  262. package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
  263. package/lib/cjs/internal/cross-package.d.ts +5 -0
  264. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  265. package/lib/cjs/internal/cross-package.js +16 -0
  266. package/lib/cjs/internal/cross-package.js.map +1 -1
  267. package/lib/cjs/ipc/IpcSession.js +1 -0
  268. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  269. package/lib/cjs/ipc/IpcSocket.d.ts +2 -0
  270. package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
  271. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  272. package/lib/cjs/ipc/IpcWebSocket.js +7 -6
  273. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  274. package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
  275. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  276. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  277. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  278. package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
  279. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  280. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  281. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  282. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  283. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  284. package/lib/cjs/rpc/TestRpcManager.js +1 -4
  285. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  286. package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
  287. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  288. package/lib/cjs/rpc/core/RpcControl.js +29 -38
  289. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  290. package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
  291. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  292. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
  293. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  294. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  295. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  296. package/lib/cjs/rpc/core/RpcOperation.js +29 -31
  297. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  298. package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
  299. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  300. package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
  301. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  302. package/lib/cjs/rpc/core/RpcPush.js +15 -8
  303. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  304. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  305. package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
  306. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  307. package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
  308. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  309. package/lib/cjs/rpc/core/RpcRequest.js +51 -29
  310. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  311. package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
  312. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  313. package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
  314. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  315. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
  316. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  317. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  318. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  319. package/lib/cjs/rpc/web/OpenAPI.js +2 -0
  320. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  321. package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
  322. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  323. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  324. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  325. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
  326. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  327. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
  328. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  329. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  330. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  331. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
  332. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  333. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  334. package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
  335. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  336. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  337. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  338. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
  339. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  340. package/lib/cjs/tile/B3dmTileIO.js +7 -0
  341. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  342. package/lib/cjs/tile/CompositeTileIO.js +3 -0
  343. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  344. package/lib/cjs/tile/GltfTileIO.js +4 -3
  345. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  346. package/lib/cjs/tile/I3dmTileIO.js +8 -0
  347. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  348. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  349. package/lib/cjs/tile/IModelTileIO.js +26 -3
  350. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  351. package/lib/cjs/tile/PntsTileIO.js +5 -0
  352. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  353. package/lib/cjs/tile/TileIO.js +2 -0
  354. package/lib/cjs/tile/TileIO.js.map +1 -1
  355. package/lib/cjs/tile/TileMetadata.js +9 -1
  356. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  357. package/lib/esm/AmbientOcclusion.js +17 -9
  358. package/lib/esm/AmbientOcclusion.js.map +1 -1
  359. package/lib/esm/AnalysisStyle.d.ts +0 -3
  360. package/lib/esm/AnalysisStyle.d.ts.map +1 -1
  361. package/lib/esm/AnalysisStyle.js +20 -4
  362. package/lib/esm/AnalysisStyle.js.map +1 -1
  363. package/lib/esm/Atmosphere.js +39 -21
  364. package/lib/esm/Atmosphere.js.map +1 -1
  365. package/lib/esm/BackgroundMapProvider.js +4 -0
  366. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  367. package/lib/esm/BackgroundMapSettings.js +19 -0
  368. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  369. package/lib/esm/BlobReader.js +8 -6
  370. package/lib/esm/BlobReader.js.map +1 -1
  371. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  372. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  373. package/lib/esm/BriefcaseTypes.js.map +1 -1
  374. package/lib/esm/Camera.js +3 -0
  375. package/lib/esm/Camera.js.map +1 -1
  376. package/lib/esm/ChangesetProps.d.ts +1 -1
  377. package/lib/esm/ChangesetProps.js.map +1 -1
  378. package/lib/esm/ClipStyle.js +31 -5
  379. package/lib/esm/ClipStyle.js.map +1 -1
  380. package/lib/esm/Code.d.ts +0 -5
  381. package/lib/esm/Code.d.ts.map +1 -1
  382. package/lib/esm/Code.js +16 -11
  383. package/lib/esm/Code.js.map +1 -1
  384. package/lib/esm/ColorDef.js +11 -10
  385. package/lib/esm/ColorDef.js.map +1 -1
  386. package/lib/esm/ConcurrentQuery.d.ts +37 -1
  387. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  388. package/lib/esm/ConcurrentQuery.js +16 -3
  389. package/lib/esm/ConcurrentQuery.js.map +1 -1
  390. package/lib/esm/ContextRealityModel.js +53 -27
  391. package/lib/esm/ContextRealityModel.js.map +1 -1
  392. package/lib/esm/ContourDisplay.js +40 -5
  393. package/lib/esm/ContourDisplay.js.map +1 -1
  394. package/lib/esm/DisplayStyleSettings.js +95 -63
  395. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  396. package/lib/esm/ECSqlReader.d.ts +2 -0
  397. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  398. package/lib/esm/ECSqlReader.js +56 -50
  399. package/lib/esm/ECSqlReader.js.map +1 -1
  400. package/lib/esm/ElementProps.d.ts.map +1 -1
  401. package/lib/esm/ElementProps.js +8 -4
  402. package/lib/esm/ElementProps.js.map +1 -1
  403. package/lib/esm/EntityProps.js +31 -0
  404. package/lib/esm/EntityProps.js.map +1 -1
  405. package/lib/esm/Environment.js +25 -2
  406. package/lib/esm/Environment.js.map +1 -1
  407. package/lib/esm/FeatureIndex.js +15 -6
  408. package/lib/esm/FeatureIndex.js.map +1 -1
  409. package/lib/esm/FeatureSymbology.d.ts +25 -73
  410. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  411. package/lib/esm/FeatureSymbology.js +88 -103
  412. package/lib/esm/FeatureSymbology.js.map +1 -1
  413. package/lib/esm/FeatureTable.d.ts +6 -108
  414. package/lib/esm/FeatureTable.d.ts.map +1 -1
  415. package/lib/esm/FeatureTable.js +11 -324
  416. package/lib/esm/FeatureTable.js.map +1 -1
  417. package/lib/esm/Fonts.d.ts +68 -10
  418. package/lib/esm/Fonts.d.ts.map +1 -1
  419. package/lib/esm/Fonts.js +19 -4
  420. package/lib/esm/Fonts.js.map +1 -1
  421. package/lib/esm/Frustum.js +2 -2
  422. package/lib/esm/Frustum.js.map +1 -1
  423. package/lib/esm/GeoCoordinateServices.d.ts +1 -0
  424. package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
  425. package/lib/esm/GeoCoordinateServices.js +2 -1
  426. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  427. package/lib/esm/GeometryParams.js +58 -0
  428. package/lib/esm/GeometryParams.js.map +1 -1
  429. package/lib/esm/Gradient.d.ts +3 -4
  430. package/lib/esm/Gradient.d.ts.map +1 -1
  431. package/lib/esm/Gradient.js +21 -19
  432. package/lib/esm/Gradient.js.map +1 -1
  433. package/lib/esm/GraphicParams.js +14 -12
  434. package/lib/esm/GraphicParams.js.map +1 -1
  435. package/lib/esm/GroundPlane.js +8 -2
  436. package/lib/esm/GroundPlane.js.map +1 -1
  437. package/lib/esm/HSLColor.js +6 -0
  438. package/lib/esm/HSLColor.js.map +1 -1
  439. package/lib/esm/HSVColor.js +6 -0
  440. package/lib/esm/HSVColor.js.map +1 -1
  441. package/lib/esm/HiddenLine.d.ts +17 -18
  442. package/lib/esm/HiddenLine.d.ts.map +1 -1
  443. package/lib/esm/HiddenLine.js +24 -5
  444. package/lib/esm/HiddenLine.js.map +1 -1
  445. package/lib/esm/Hilite.js +10 -0
  446. package/lib/esm/Hilite.js.map +1 -1
  447. package/lib/esm/IModel.d.ts +3 -12
  448. package/lib/esm/IModel.d.ts.map +1 -1
  449. package/lib/esm/IModel.js +47 -23
  450. package/lib/esm/IModel.js.map +1 -1
  451. package/lib/esm/IModelError.d.ts +0 -2
  452. package/lib/esm/IModelError.d.ts.map +1 -1
  453. package/lib/esm/IModelError.js +2 -1
  454. package/lib/esm/IModelError.js.map +1 -1
  455. package/lib/esm/IModelVersion.js +4 -0
  456. package/lib/esm/IModelVersion.js.map +1 -1
  457. package/lib/esm/ITwinError.d.ts +1 -1
  458. package/lib/esm/ITwinError.d.ts.map +1 -1
  459. package/lib/esm/ITwinError.js +1 -1
  460. package/lib/esm/ITwinError.js.map +1 -1
  461. package/lib/esm/Image.d.ts +22 -8
  462. package/lib/esm/Image.d.ts.map +1 -1
  463. package/lib/esm/Image.js +19 -4
  464. package/lib/esm/Image.js.map +1 -1
  465. package/lib/esm/IpcAppProps.d.ts +2 -0
  466. package/lib/esm/IpcAppProps.d.ts.map +1 -1
  467. package/lib/esm/IpcAppProps.js.map +1 -1
  468. package/lib/esm/LightSettings.js +39 -1
  469. package/lib/esm/LightSettings.js.map +1 -1
  470. package/lib/esm/Localization.d.ts +0 -10
  471. package/lib/esm/Localization.d.ts.map +1 -1
  472. package/lib/esm/Localization.js +0 -1
  473. package/lib/esm/Localization.js.map +1 -1
  474. package/lib/esm/MapImagerySettings.js +3 -2
  475. package/lib/esm/MapImagerySettings.js.map +1 -1
  476. package/lib/esm/MapLayerSettings.d.ts +20 -0
  477. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  478. package/lib/esm/MapLayerSettings.js +50 -1
  479. package/lib/esm/MapLayerSettings.js.map +1 -1
  480. package/lib/esm/MassProperties.d.ts +2 -0
  481. package/lib/esm/MassProperties.d.ts.map +1 -1
  482. package/lib/esm/MassProperties.js.map +1 -1
  483. package/lib/esm/ModelClipGroup.js +6 -0
  484. package/lib/esm/ModelClipGroup.js.map +1 -1
  485. package/lib/esm/OctEncodedNormal.js +4 -0
  486. package/lib/esm/OctEncodedNormal.js.map +1 -1
  487. package/lib/esm/PlanProjectionSettings.d.ts +1 -2
  488. package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
  489. package/lib/esm/PlanProjectionSettings.js +8 -1
  490. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  491. package/lib/esm/PlanarClipMask.d.ts +0 -12
  492. package/lib/esm/PlanarClipMask.d.ts.map +1 -1
  493. package/lib/esm/PlanarClipMask.js +24 -2
  494. package/lib/esm/PlanarClipMask.js.map +1 -1
  495. package/lib/esm/QPoint.d.ts +5 -5
  496. package/lib/esm/QPoint.d.ts.map +1 -1
  497. package/lib/esm/QPoint.js +37 -29
  498. package/lib/esm/QPoint.js.map +1 -1
  499. package/lib/esm/RealityModelDisplaySettings.js +81 -4
  500. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  501. package/lib/esm/RenderMaterial.d.ts +0 -43
  502. package/lib/esm/RenderMaterial.d.ts.map +1 -1
  503. package/lib/esm/RenderMaterial.js +6 -51
  504. package/lib/esm/RenderMaterial.js.map +1 -1
  505. package/lib/esm/RenderPolyline.d.ts +36 -0
  506. package/lib/esm/RenderPolyline.d.ts.map +1 -0
  507. package/lib/esm/RenderPolyline.js +23 -0
  508. package/lib/esm/RenderPolyline.js.map +1 -0
  509. package/lib/esm/RenderSchedule.d.ts +1 -2
  510. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  511. package/lib/esm/RenderSchedule.js +138 -11
  512. package/lib/esm/RenderSchedule.js.map +1 -1
  513. package/lib/esm/RenderTexture.d.ts +5 -23
  514. package/lib/esm/RenderTexture.d.ts.map +1 -1
  515. package/lib/esm/RenderTexture.js +13 -16
  516. package/lib/esm/RenderTexture.js.map +1 -1
  517. package/lib/esm/RgbColor.js +3 -0
  518. package/lib/esm/RgbColor.js.map +1 -1
  519. package/lib/esm/RpcInterface.d.ts.map +1 -1
  520. package/lib/esm/RpcInterface.js +8 -2
  521. package/lib/esm/RpcInterface.js.map +1 -1
  522. package/lib/esm/SkyBox.js +17 -4
  523. package/lib/esm/SkyBox.js.map +1 -1
  524. package/lib/esm/SolarShadows.js +5 -1
  525. package/lib/esm/SolarShadows.js.map +1 -1
  526. package/lib/esm/SpatialClassification.js +19 -1
  527. package/lib/esm/SpatialClassification.js.map +1 -1
  528. package/lib/esm/SubCategoryAppearance.js +35 -1
  529. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  530. package/lib/esm/SubCategoryOverride.js +16 -2
  531. package/lib/esm/SubCategoryOverride.js.map +1 -1
  532. package/lib/esm/TerrainSettings.d.ts +0 -7
  533. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  534. package/lib/esm/TerrainSettings.js +19 -0
  535. package/lib/esm/TerrainSettings.js.map +1 -1
  536. package/lib/esm/TextureMapping.d.ts +17 -14
  537. package/lib/esm/TextureMapping.d.ts.map +1 -1
  538. package/lib/esm/TextureMapping.js +47 -19
  539. package/lib/esm/TextureMapping.js.map +1 -1
  540. package/lib/esm/ThematicDisplay.js +53 -2
  541. package/lib/esm/ThematicDisplay.js.map +1 -1
  542. package/lib/esm/Thumbnail.d.ts +1 -1
  543. package/lib/esm/Thumbnail.js.map +1 -1
  544. package/lib/esm/Tween.js +28 -19
  545. package/lib/esm/Tween.js.map +1 -1
  546. package/lib/esm/ViewDetails.js +10 -6
  547. package/lib/esm/ViewDetails.js.map +1 -1
  548. package/lib/esm/ViewFlags.d.ts +1 -3
  549. package/lib/esm/ViewFlags.d.ts.map +1 -1
  550. package/lib/esm/ViewFlags.js +86 -5
  551. package/lib/esm/ViewFlags.js.map +1 -1
  552. package/lib/esm/ViewProps.d.ts +0 -4
  553. package/lib/esm/ViewProps.d.ts.map +1 -1
  554. package/lib/esm/ViewProps.js.map +1 -1
  555. package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
  556. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  557. package/lib/esm/annotation/TextAnnotation.js +10 -0
  558. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  559. package/lib/esm/annotation/TextBlock.js +27 -6
  560. package/lib/esm/annotation/TextBlock.js.map +1 -1
  561. package/lib/esm/annotation/TextStyle.js +65 -19
  562. package/lib/esm/annotation/TextStyle.js.map +1 -1
  563. package/lib/esm/core-common.d.ts +1 -2
  564. package/lib/esm/core-common.d.ts.map +1 -1
  565. package/lib/esm/core-common.js +1 -2
  566. package/lib/esm/core-common.js.map +1 -1
  567. package/lib/esm/geometry/AdditionalTransform.js +12 -0
  568. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  569. package/lib/esm/geometry/AreaPattern.js +17 -0
  570. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  571. package/lib/esm/geometry/BoundingSphere.js +4 -0
  572. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  573. package/lib/esm/geometry/Cartographic.js +23 -20
  574. package/lib/esm/geometry/Cartographic.js.map +1 -1
  575. package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
  576. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  577. package/lib/esm/geometry/ElementGeometry.js +26 -8
  578. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  579. package/lib/esm/geometry/ElementGeometryFB.js +54 -108
  580. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  581. package/lib/esm/geometry/FrustumPlanes.js +1 -0
  582. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  583. package/lib/esm/geometry/GeodeticDatum.js +100 -0
  584. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  585. package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
  586. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  587. package/lib/esm/geometry/GeometryStream.js +19 -6
  588. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  589. package/lib/esm/geometry/ImageGraphic.js +10 -0
  590. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  591. package/lib/esm/geometry/LineStyle.js +14 -0
  592. package/lib/esm/geometry/LineStyle.js.map +1 -1
  593. package/lib/esm/geometry/Placement.js +6 -0
  594. package/lib/esm/geometry/Placement.js.map +1 -1
  595. package/lib/esm/geometry/Projection.js +75 -0
  596. package/lib/esm/geometry/Projection.js.map +1 -1
  597. package/lib/esm/geometry/TextString.js +18 -0
  598. package/lib/esm/geometry/TextString.js.map +1 -1
  599. package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  600. package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
  601. package/lib/esm/internal/BackendTypes.js.map +1 -0
  602. package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
  603. package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
  604. package/lib/esm/internal/PackedFeatureTable.js +352 -0
  605. package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
  606. package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
  607. package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
  608. package/lib/esm/internal/RenderMaterialParams.js +64 -0
  609. package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
  610. package/lib/esm/internal/RenderMesh.d.ts +52 -0
  611. package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
  612. package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
  613. package/lib/esm/internal/RenderMesh.js.map +1 -0
  614. package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
  615. package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
  616. package/lib/esm/internal/RenderTextureParams.js +33 -0
  617. package/lib/esm/internal/RenderTextureParams.js.map +1 -0
  618. package/lib/esm/internal/cross-package.d.ts +5 -0
  619. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  620. package/lib/esm/internal/cross-package.js +4 -1
  621. package/lib/esm/internal/cross-package.js.map +1 -1
  622. package/lib/esm/ipc/IpcSession.js +1 -0
  623. package/lib/esm/ipc/IpcSession.js.map +1 -1
  624. package/lib/esm/ipc/IpcSocket.d.ts +2 -0
  625. package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
  626. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  627. package/lib/esm/ipc/IpcWebSocket.js +7 -6
  628. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  629. package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
  630. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  631. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  632. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  633. package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
  634. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  635. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  636. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  637. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  638. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  639. package/lib/esm/rpc/TestRpcManager.js +1 -4
  640. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  641. package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
  642. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  643. package/lib/esm/rpc/core/RpcControl.js +29 -38
  644. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  645. package/lib/esm/rpc/core/RpcInvocation.js +19 -13
  646. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  647. package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
  648. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  649. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  650. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  651. package/lib/esm/rpc/core/RpcOperation.js +29 -31
  652. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  653. package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
  654. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  655. package/lib/esm/rpc/core/RpcProtocol.js +32 -30
  656. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  657. package/lib/esm/rpc/core/RpcPush.js +15 -8
  658. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  659. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  660. package/lib/esm/rpc/core/RpcRegistry.js +10 -9
  661. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  662. package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
  663. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  664. package/lib/esm/rpc/core/RpcRequest.js +51 -29
  665. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  666. package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
  667. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  668. package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
  669. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  670. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
  671. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  672. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  673. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  674. package/lib/esm/rpc/web/OpenAPI.js +2 -0
  675. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  676. package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
  677. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  678. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  679. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  680. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
  681. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  682. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
  683. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  684. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  685. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  686. package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
  687. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  688. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  689. package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
  690. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  691. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  692. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  693. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
  694. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  695. package/lib/esm/tile/B3dmTileIO.js +7 -0
  696. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  697. package/lib/esm/tile/CompositeTileIO.js +3 -0
  698. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  699. package/lib/esm/tile/GltfTileIO.js +4 -3
  700. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  701. package/lib/esm/tile/I3dmTileIO.js +8 -0
  702. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  703. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  704. package/lib/esm/tile/IModelTileIO.js +26 -3
  705. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  706. package/lib/esm/tile/PntsTileIO.js +5 -0
  707. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  708. package/lib/esm/tile/TileIO.js +2 -0
  709. package/lib/esm/tile/TileIO.js.map +1 -1
  710. package/lib/esm/tile/TileMetadata.js +9 -1
  711. package/lib/esm/tile/TileMetadata.js.map +1 -1
  712. package/package.json +14 -14
  713. package/lib/cjs/BackendTypes.d.ts.map +0 -1
  714. package/lib/cjs/BackendTypes.js.map +0 -1
  715. package/lib/cjs/Render.d.ts +0 -85
  716. package/lib/cjs/Render.d.ts.map +0 -1
  717. package/lib/cjs/Render.js.map +0 -1
  718. package/lib/esm/BackendTypes.d.ts.map +0 -1
  719. package/lib/esm/BackendTypes.js.map +0 -1
  720. package/lib/esm/Render.d.ts +0 -85
  721. package/lib/esm/Render.d.ts.map +0 -1
  722. package/lib/esm/Render.js.map +0 -1
  723. /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
  724. /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
@@ -7,9 +7,10 @@
7
7
  * @module Rendering
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.MultiModelPackedFeatureTable = exports.PackedFeatureModelTable = exports.PackedFeatureTable = exports.FeatureTable = exports.BatchType = exports.PackedFeature = exports.ModelFeature = exports.Feature = void 0;
10
+ exports.FeatureTable = exports.BatchType = exports.PackedFeature = exports.ModelFeature = exports.Feature = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const GeometryParams_1 = require("./GeometryParams");
13
+ const PackedFeatureTable_1 = require("./internal/PackedFeatureTable");
13
14
  /** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be
14
15
  * grouped with other such entities in a [[FeatureTable]].
15
16
  * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every
@@ -20,6 +21,9 @@ const GeometryParams_1 = require("./GeometryParams");
20
21
  * @public
21
22
  */
22
23
  class Feature {
24
+ elementId;
25
+ subCategoryId;
26
+ geometryClass;
23
27
  constructor(elementId = core_bentley_1.Id64.invalid, subCategoryId = core_bentley_1.Id64.invalid, geometryClass = GeometryParams_1.GeometryClass.Primary) {
24
28
  this.elementId = elementId;
25
29
  this.subCategoryId = subCategoryId;
@@ -136,6 +140,8 @@ var BatchType;
136
140
  * @public
137
141
  */
138
142
  class FeatureTable extends core_bentley_1.IndexMap {
143
+ modelId;
144
+ type;
139
145
  /** Construct an empty FeatureTable. */
140
146
  constructor(maxFeatures, modelId = core_bentley_1.Id64.invalid, type = BatchType.Primary) {
141
147
  super((lhs, rhs) => lhs.compare(rhs), maxFeatures);
@@ -144,7 +150,7 @@ class FeatureTable extends core_bentley_1.IndexMap {
144
150
  }
145
151
  /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */
146
152
  get maxFeatures() { return this._maximumSize; }
147
- /** @internal */
153
+ /** Returns true if this table contains at least one [[Feature]] with a valid element and/or subcategory Id. */
148
154
  get anyDefined() { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }
149
155
  /** Returns true if this FeatureTable contains exactly one [[Feature]]. */
150
156
  get isUniform() { return 1 === this.length; }
@@ -161,7 +167,9 @@ class FeatureTable extends core_bentley_1.IndexMap {
161
167
  return entry.value;
162
168
  return undefined;
163
169
  }
164
- /** @internal */
170
+ /** Inserts the specified [[Feature]] at the specified index. This is really only useful when reconstructing a previously-create feature table
171
+ * for which you know the index assigned to each feature.
172
+ */
165
173
  insertWithIndex(feature, index) {
166
174
  const bound = this.lowerBound(feature);
167
175
  (0, core_bentley_1.assert)(!bound.equal);
@@ -169,336 +177,12 @@ class FeatureTable extends core_bentley_1.IndexMap {
169
177
  const entry = new core_bentley_1.IndexedValue(feature, index);
170
178
  this._array.splice(bound.index, 0, entry);
171
179
  }
172
- /** @internal */
180
+ /** Access the underlying array containing the table's current contents. */
173
181
  getArray() { return this._array; }
174
182
  /** Convert this feature table to a representation that can be supplied to [RenderSystem.createBatch]($frontend). */
175
183
  pack() {
176
- return PackedFeatureTable.pack(this);
184
+ return PackedFeatureTable_1.PackedFeatureTable.pack(this);
177
185
  }
178
186
  }
179
187
  exports.FeatureTable = FeatureTable;
180
- const scratchPackedFeature = PackedFeature.create();
181
- function populateAnimationNodeIds(table, computeNodeId, maxNodeId) {
182
- (0, core_bentley_1.assert)(maxNodeId > 0);
183
- let nodeIds;
184
- const outputFeature = PackedFeature.createWithIndex();
185
- for (const feature of table.iterable(outputFeature)) {
186
- const nodeId = computeNodeId(feature);
187
- (0, core_bentley_1.assert)(nodeId <= maxNodeId);
188
- if (0 !== nodeId) {
189
- if (!nodeIds) {
190
- const size = table.numFeatures;
191
- nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));
192
- }
193
- nodeIds[feature.index] = nodeId;
194
- }
195
- }
196
- return nodeIds;
197
- }
198
- /**
199
- * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,
200
- * wherein each feature occupies 3 32-bit integers.
201
- * @internal
202
- */
203
- class PackedFeatureTable {
204
- get byteLength() { return this.data.byteLength; }
205
- /** Construct a PackedFeatureTable from the packed binary data.
206
- * This is used internally when deserializing Tiles in iMdl format.
207
- * @internal
208
- */
209
- constructor(data, modelId, numFeatures, type, animationNodeIds) {
210
- this.data = data;
211
- this.batchModelId = modelId;
212
- this.batchModelIdPair = core_bentley_1.Id64.getUint32Pair(modelId);
213
- this.numFeatures = numFeatures;
214
- this.type = type;
215
- this.animationNodeIds = animationNodeIds;
216
- switch (this.numFeatures) {
217
- case 0:
218
- this.anyDefined = false;
219
- break;
220
- case 1:
221
- this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));
222
- break;
223
- default:
224
- this.anyDefined = true;
225
- break;
226
- }
227
- (0, core_bentley_1.assert)(this.data.length >= this._subCategoriesOffset);
228
- (0, core_bentley_1.assert)(undefined === this.animationNodeIds || this.animationNodeIds.length === this.numFeatures);
229
- }
230
- /** Create a packed feature table from a [[FeatureTable]]. */
231
- static pack(featureTable) {
232
- // We must determine how many subcategories we have ahead of time to compute the size of the Uint32Array, as
233
- // the array cannot be resized after it is created.
234
- // We are not too worried about this as FeatureTables created on the front-end will contain few if any features; those obtained from the
235
- // back-end arrive within tiles already in the packed format.
236
- const subcategories = new Map();
237
- for (const iv of featureTable.getArray()) {
238
- const found = subcategories.get(iv.value.subCategoryId.toString());
239
- if (undefined === found)
240
- subcategories.set(iv.value.subCategoryId, subcategories.size);
241
- }
242
- // We need 3 32-bit integers per feature, plus 2 32-bit integers per subcategory.
243
- const subCategoriesOffset = 3 * featureTable.length;
244
- const nUint32s = subCategoriesOffset + 2 * subcategories.size;
245
- const uint32s = new Uint32Array(nUint32s);
246
- for (const iv of featureTable.getArray()) {
247
- const feature = iv.value;
248
- const index = iv.index * 3;
249
- let subCategoryIndex = subcategories.get(feature.subCategoryId);
250
- (0, core_bentley_1.assert)(undefined !== subCategoryIndex); // we inserted it above...
251
- subCategoryIndex |= (feature.geometryClass << 24);
252
- uint32s[index + 0] = core_bentley_1.Id64.getLowerUint32(feature.elementId);
253
- uint32s[index + 1] = core_bentley_1.Id64.getUpperUint32(feature.elementId);
254
- uint32s[index + 2] = subCategoryIndex;
255
- }
256
- subcategories.forEach((index, id, _map) => {
257
- const index32 = subCategoriesOffset + 2 * index;
258
- uint32s[index32 + 0] = core_bentley_1.Id64.getLowerUint32(id);
259
- uint32s[index32 + 1] = core_bentley_1.Id64.getUpperUint32(id);
260
- });
261
- return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);
262
- }
263
- /** Retrieve the Feature associated with the specified index. */
264
- getFeature(featureIndex, result) {
265
- const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);
266
- return ModelFeature.unpack(packed, result, this.batchModelId);
267
- }
268
- /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */
269
- findFeature(featureIndex, result) {
270
- return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;
271
- }
272
- /** @internal */
273
- getElementIdPair(featureIndex, out) {
274
- out = out ?? { lower: 0, upper: 0 };
275
- (0, core_bentley_1.assert)(featureIndex < this.numFeatures);
276
- const offset = 3 * featureIndex;
277
- out.lower = this.data[offset];
278
- out.upper = this.data[offset + 1];
279
- return out;
280
- }
281
- /** @internal */
282
- getSubCategoryIdPair(featureIndex) {
283
- const index = 3 * featureIndex;
284
- let subCatIndex = this.data[index + 2];
285
- subCatIndex = (subCatIndex & 0x00ffffff) >>> 0;
286
- subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;
287
- return { lower: this.data[subCatIndex], upper: this.data[subCatIndex + 1] };
288
- }
289
- /** @internal */
290
- getAnimationNodeId(featureIndex) {
291
- return undefined !== this.animationNodeIds && featureIndex < this.numFeatures ? this.animationNodeIds[featureIndex] : 0;
292
- }
293
- /** @internal */
294
- getPackedFeature(featureIndex, result) {
295
- (0, core_bentley_1.assert)(featureIndex < this.numFeatures);
296
- const index32 = 3 * featureIndex;
297
- result.elementId.lower = this.data[index32];
298
- result.elementId.upper = this.data[index32 + 1];
299
- const subCatIndexAndClass = this.data[index32 + 2];
300
- result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;
301
- let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;
302
- subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;
303
- result.subCategoryId.lower = this.data[subCatIndex];
304
- result.subCategoryId.upper = this.data[subCatIndex + 1];
305
- result.animationNodeId = this.getAnimationNodeId(featureIndex);
306
- result.modelId.lower = this.batchModelIdPair.lower;
307
- result.modelId.upper = this.batchModelIdPair.upper;
308
- return result;
309
- }
310
- getModelIdPair(_featureIndex, out) {
311
- out.lower = this.batchModelIdPair.lower;
312
- out.upper = this.batchModelIdPair.upper;
313
- return out;
314
- }
315
- /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */
316
- findElementId(featureIndex) {
317
- if (featureIndex >= this.numFeatures)
318
- return undefined;
319
- else
320
- return this.readId(3 * featureIndex);
321
- }
322
- /** Return true if this table contains exactly 1 feature. */
323
- get isUniform() { return 1 === this.numFeatures; }
324
- /** If this table contains exactly 1 feature, return it. */
325
- getUniform(result) {
326
- return this.isUniform ? this.getFeature(0, result) : undefined;
327
- }
328
- get isVolumeClassifier() { return BatchType.VolumeClassifier === this.type; }
329
- get isPlanarClassifier() { return BatchType.VolumeClassifier === this.type; }
330
- get isClassifier() { return this.isVolumeClassifier || this.isPlanarClassifier; }
331
- /** Unpack the features into a [[FeatureTable]]. */
332
- unpack() {
333
- const table = new FeatureTable(this.numFeatures, this.batchModelId);
334
- const feature = ModelFeature.create();
335
- for (let i = 0; i < this.numFeatures; i++) {
336
- this.getFeature(i, feature);
337
- table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);
338
- }
339
- return table;
340
- }
341
- populateAnimationNodeIds(computeNodeId, maxNodeId) {
342
- (0, core_bentley_1.assert)(undefined === this.animationNodeIds);
343
- this.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);
344
- }
345
- *iterator(output) {
346
- for (let i = 0; i < this.numFeatures; i++) {
347
- this.getPackedFeature(i, output);
348
- output.index = i;
349
- yield output;
350
- }
351
- }
352
- iterable(output) {
353
- return {
354
- [Symbol.iterator]: () => this.iterator(output),
355
- };
356
- }
357
- get _subCategoriesOffset() { return this.numFeatures * 3; }
358
- readId(offset32) {
359
- return core_bentley_1.Id64.fromUint32Pair(this.data[offset32], this.data[offset32 + 1]);
360
- }
361
- }
362
- exports.PackedFeatureTable = PackedFeatureTable;
363
- const scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };
364
- /** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].
365
- * The feature indices in the packed feature table are grouped together by model, such that the first N features belong to model 1, the next M features to model 2, and so on.
366
- * The model table itself consists of one entry per model, where each entry looks like:
367
- * indexOfLastFeatureInModel: u32
368
- * modelId: u64
369
- * The modelId associated with a feature can therefore be derived by finding the entry in the model table with the highest indexOfLastFeatureInModel no greater than the feature index.
370
- * This lookup can be optimized using binary search.
371
- * Moreover, while iterating the feature table in sequence, the model table can be iterated in parallel so that no per-feature lookup of model Id is required.
372
- * @internal
373
- */
374
- class PackedFeatureModelTable {
375
- constructor(data) {
376
- this._data = data;
377
- (0, core_bentley_1.assert)(this._data.length % 3 === 0);
378
- }
379
- /** The number of models in the table. */
380
- get length() {
381
- return this._data.length / 3;
382
- }
383
- get byteLength() {
384
- return this._data.byteLength;
385
- }
386
- getLastFeatureIndex(modelIndex) {
387
- return this._data[modelIndex * 3];
388
- }
389
- getEntry(modelIndex, result) {
390
- if (modelIndex >= this.length) {
391
- result.idLower = result.idUpper = 0;
392
- result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;
393
- return result;
394
- }
395
- const index = modelIndex * 3;
396
- result.lastFeatureIndex = this._data[index + 0];
397
- result.idLower = this._data[index + 1];
398
- result.idUpper = this._data[index + 2];
399
- return result;
400
- }
401
- /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */
402
- getModelIdPair(featureIndex, result) {
403
- if (!result)
404
- result = { lower: 0, upper: 0 };
405
- else
406
- result.lower = result.upper = 0;
407
- let first = 0;
408
- const last = this.length;
409
- let count = last;
410
- while (count > 0) {
411
- const step = Math.floor(count / 2);
412
- const mid = first + step;
413
- const lastFeatureIndex = this.getLastFeatureIndex(mid);
414
- if (featureIndex > lastFeatureIndex) {
415
- first = mid + 1;
416
- count -= step + 1;
417
- }
418
- else {
419
- count = step;
420
- }
421
- }
422
- if (first < last) {
423
- result.lower = this._data[first * 3 + 1];
424
- result.upper = this._data[first * 3 + 2];
425
- }
426
- return result;
427
- }
428
- }
429
- exports.PackedFeatureModelTable = PackedFeatureModelTable;
430
- /** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.
431
- * @internal
432
- */
433
- class MultiModelPackedFeatureTable {
434
- constructor(features, models) {
435
- this._features = features;
436
- this._models = models;
437
- }
438
- static create(data, batchModelId, numFeatures, type, numSubCategories) {
439
- const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;
440
- const featureData = data.subarray(0, modelTableOffset);
441
- const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);
442
- const modelData = data.subarray(modelTableOffset);
443
- const models = new PackedFeatureModelTable(modelData);
444
- return new MultiModelPackedFeatureTable(features, models);
445
- }
446
- get batchModelId() { return this._features.batchModelId; }
447
- get batchModelIdPair() { return this._features.batchModelIdPair; }
448
- get numFeatures() { return this._features.numFeatures; }
449
- get type() { return this._features.type; }
450
- get animationNodeIds() { return this._features.animationNodeIds; }
451
- set animationNodeIds(ids) { this._features.animationNodeIds = ids; }
452
- get byteLength() {
453
- return this._features.byteLength + this._models.byteLength;
454
- }
455
- getPackedFeature(featureIndex, result) {
456
- this._features.getPackedFeature(featureIndex, result);
457
- this._models.getModelIdPair(featureIndex, result.modelId);
458
- return result;
459
- }
460
- getFeature(featureIndex, result) {
461
- const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);
462
- return ModelFeature.unpack(packed, result);
463
- }
464
- findFeature(featureIndex, result) {
465
- return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;
466
- }
467
- getElementIdPair(featureIndex, out) {
468
- return this._features.getElementIdPair(featureIndex, out);
469
- }
470
- getModelIdPair(featureIndex, out) {
471
- this._models.getModelIdPair(featureIndex, out);
472
- return out;
473
- }
474
- findElementId(featureIndex) {
475
- return this._features.findElementId(featureIndex);
476
- }
477
- *iterator(output) {
478
- // Rather than perform a binary search on the model table to find each feature's model Id, traverse the model table in parallel with the feature table.
479
- let modelIndex = 0;
480
- const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);
481
- for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {
482
- if (featureIndex > modelEntry.lastFeatureIndex)
483
- this._models.getEntry(++modelIndex, modelEntry);
484
- this._features.getPackedFeature(featureIndex, output);
485
- output.modelId.lower = modelEntry.idLower;
486
- output.modelId.upper = modelEntry.idUpper;
487
- output.index = featureIndex;
488
- yield output;
489
- }
490
- }
491
- iterable(output) {
492
- return {
493
- [Symbol.iterator]: () => this.iterator(output),
494
- };
495
- }
496
- getAnimationNodeId(featureIndex) {
497
- return this._features.getAnimationNodeId(featureIndex);
498
- }
499
- populateAnimationNodeIds(computeNodeId, maxNodeId) {
500
- this._features.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);
501
- }
502
- }
503
- exports.MultiModelPackedFeatureTable = MultiModelPackedFeatureTable;
504
188
  //# sourceMappingURL=FeatureTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureTable.js","sourceRoot":"","sources":["../../src/FeatureTable.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAC7B,qDAAiD;AAEjD;;;;;;;;GAQG;AACH,MAAa,OAAO;IAKlB,YAAmB,YAAwB,mBAAI,CAAC,OAAO,EAAE,gBAA4B,mBAAI,CAAC,OAAO,EAAE,gBAA+B,8BAAa,CAAC,OAAO;QACrJ,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,IAAW,SAAS,KAAc,OAAO,CAAC,mBAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,mBAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,aAAa,KAAK,8BAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAClK,IAAW,WAAW,KAAc,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAE7D,0EAA0E;IACnE,MAAM,CAAC,KAAc,IAAa,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE5E;;;OAGG;IACI,OAAO,CAAC,GAAY;QACzB,IAAI,IAAI,KAAK,GAAG;YACd,OAAO,CAAC,CAAC;QAEX,IAAI,GAAG,GAAG,IAAA,6BAAc,EAAC,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AAC,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACtD,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;YAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;YAC1C,MAAM,CAAC,KAAK,GAAG,YAAY,CAAC;YAC5B,MAAM,MAAM,CAAC;QACf,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,MAA8B;QAC5C,OAAO;YACL,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;IAEM,kBAAkB,CAAC,YAAoB;QAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACzD,CAAC;IAEM,wBAAwB,CAAC,aAA4B,EAAE,SAAiB;QAC7E,IAAI,CAAC,SAAS,CAAC,gBAAgB,GAAG,wBAAwB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;IAC7F,CAAC;CACF;AAzFD,oEAyFC","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 {\n assert, compareNumbers, compareStrings, Id64, Id64String, IndexedValue, IndexMap, UintArray,\n} from \"@itwin/core-bentley\";\nimport { GeometryClass } from \"./GeometryParams\";\n\n/** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be\n * grouped with other such entities in a [[FeatureTable]].\n * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every\n * [GeometricElement]($backend) that intersects the tile's volume, so each element produces at least one feature.\n * However, an element's geometry stream can contain geometry belonging to multiple different combinations of [SubCategory]($backend) and\n * [[GeometryClass]], so an individual element may produce more than one feature.\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\n * @public\n */\nexport class Feature {\n public readonly elementId: Id64String;\n public readonly subCategoryId: Id64String;\n public readonly geometryClass: GeometryClass;\n\n public constructor(elementId: Id64String = Id64.invalid, subCategoryId: Id64String = Id64.invalid, geometryClass: GeometryClass = GeometryClass.Primary) {\n this.elementId = elementId;\n this.subCategoryId = subCategoryId;\n this.geometryClass = geometryClass;\n }\n\n public get isDefined(): boolean { return !Id64.isInvalid(this.elementId) || !Id64.isInvalid(this.subCategoryId) || this.geometryClass !== GeometryClass.Primary; }\n public get isUndefined(): boolean { return !this.isDefined; }\n\n /** Returns true if this feature is equivalent to the supplied feature. */\n public equals(other: Feature): boolean { return 0 === this.compare(other); }\n\n /** Performs ordinal comparison of this feature with another.\n * @param rhs The feature to compare with.\n * @returns zero if the features are equivalent, a negative value if this feature compares as \"less than\" `rhs`, or a positive value if this feature compares \"greater than\" `rhs`.\n */\n public compare(rhs: Feature): number {\n if (this === rhs)\n return 0;\n\n let cmp = compareNumbers(this.geometryClass, rhs.geometryClass);\n if (0 === cmp) {\n cmp = compareStrings(this.elementId, rhs.elementId);\n if (0 === cmp) {\n cmp = compareStrings(this.subCategoryId, rhs.subCategoryId);\n }\n }\n\n return cmp;\n }\n}\n\n/** A [[Feature]] with a modelId identifying the model containing the feature, obtained from a [[RenderFeatureTable]].\n * @public\n */\nexport interface ModelFeature {\n modelId: Id64String;\n elementId: Id64String;\n subCategoryId: Id64String;\n geometryClass: GeometryClass;\n}\n\n/** @public */\nexport namespace ModelFeature {\n /** Create a ModelFeature of [[GeometryClass.Primary]] with all invalid Ids.\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.findFeature]] and [[RenderFeatureTable.getFeature]].\n */\n export function create(): ModelFeature {\n return {\n modelId: Id64.invalid,\n elementId: Id64.invalid,\n subCategoryId: Id64.invalid,\n geometryClass: GeometryClass.Primary,\n };\n }\n\n /** Returns `true` if any of `feature`'s properties differ from the defaults (invalid Ids and [[GeometryClass.Primary]]). */\n export function isDefined(feature: ModelFeature): boolean {\n return !Id64.isInvalid(feature.modelId) || !Id64.isInvalid(feature.elementId) || !Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== GeometryClass.Primary;\n }\n\n /** @alpha */\n export function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature {\n result.modelId = unpackedModelId ?? Id64.fromUint32PairObject(packed.modelId);\n result.elementId = Id64.fromUint32PairObject(packed.elementId);\n result.subCategoryId = Id64.fromUint32PairObject(packed.subCategoryId);\n result.geometryClass = packed.geometryClass;\n return result;\n }\n}\n\n/** Represents a [[Feature]] within a [[RenderFeatureTable]]. This representation is optimized for use on the GPU.\n * @public\n */\nexport interface PackedFeature {\n modelId: Id64.Uint32Pair;\n elementId: Id64.Uint32Pair;\n subCategoryId: Id64.Uint32Pair;\n geometryClass: GeometryClass;\n /** @alpha */\n animationNodeId: number;\n}\n\n/** Represents a [[PackedFeature]] obtained from a [[RenderFeatureTable]], including the index of that feature within the table.\n * @public\n */\nexport interface PackedFeatureWithIndex extends PackedFeature {\n index: number;\n}\n\n/** @public */\nexport namespace PackedFeature {\n /** Create a PackedFeature of [[GeometryClass.Primary]] with all invalid Ids.\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.getPackedFeature]].\n */\n export function create(): PackedFeature {\n const pair = { upper: 0, lower: 0 };\n return {\n modelId: { ...pair },\n elementId: { ...pair },\n subCategoryId: { ...pair },\n geometryClass: GeometryClass.Primary,\n animationNodeId: 0,\n };\n }\n\n /** Create a PackedFeatureWithIndex of [[GeometryClass.Primary]] with all invalid Ids and an index of zero.\n * This is primarily useful for creating a reusable `output` argument for [[RenderFeatureTable.iterable]].\n */\n export function createWithIndex(): PackedFeatureWithIndex {\n const result = create() as PackedFeatureWithIndex;\n result.index = 0;\n return result;\n }\n}\n\n/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.\n * The most commonly-encountered batches are Tiles, which can be of either Primary or\n * Classifier type.\n * @public\n * @extensions\n */\nexport enum BatchType {\n /** This batch contains graphics derived from a model's visible geometry. */\n Primary,\n /**\n * This batch contains color volumes which are used to classify a model's visible geometry.\n * The graphics themselves are not rendered to the screen; instead they are rendered to the stencil buffer\n * to resymbolize the primary geometry.\n */\n VolumeClassifier,\n /**\n * This batch contains planar graphics which are used to classify a model's visible geometry.\n * The graphics themselves are not rendered to the screen; instead they are rendered to a texture buffer\n * to resymbolize the primary geometry.\n */\n PlanarClassifier,\n}\n\n/** Defines a look-up table for [[Feature]]s within a batched [RenderGraphic]($frontend). Consecutive 32-bit\n * indices are assigned to each unique Feature. Primitives within the RenderGraphic can\n * use per-vertex indices to specify the distribution of Features within the primitive. The appearance of individual\n * features can be customized using [[FeatureOverrides]]. Typically a [Tile]($frontend) will contain a feature table\n * identifying the elements whose geometry appears within that tile.\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\n * @public\n */\nexport class FeatureTable extends IndexMap<Feature> {\n public readonly modelId: Id64String;\n public readonly type: BatchType;\n\n /** Construct an empty FeatureTable. */\n public constructor(maxFeatures: number, modelId: Id64String = Id64.invalid, type: BatchType = BatchType.Primary) {\n super((lhs, rhs) => lhs.compare(rhs), maxFeatures);\n this.modelId = modelId;\n this.type = type;\n }\n\n /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */\n public get maxFeatures(): number { return this._maximumSize; }\n /** @internal */\n public get anyDefined(): boolean { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }\n /** Returns true if this FeatureTable contains exactly one [[Feature]]. */\n public get isUniform(): boolean { return 1 === this.length; }\n /** If this FeatureTable contains exactly one [[Feature]], returns that Feature; otherwise returns undefined. */\n public get uniform(): Feature | undefined { return 1 === this.length ? this._array[0].value : undefined; }\n /** Returns true if this FeatureTable is associated with [[BatchType.VolumeClassifier]] geometry. */\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n /** Returns true if this FeatureTable is associated with [[BatchType.PlanarClassifier]] geometry. */\n public get isPlanarClassifier(): boolean { return BatchType.PlanarClassifier === this.type; }\n\n /** Returns the Feature corresponding to the specified index, or undefined if the index is not present. */\n public findFeature(index: number): Feature | undefined {\n for (const entry of this._array)\n if (entry.index === index)\n return entry.value;\n\n return undefined;\n }\n\n /** @internal */\n public insertWithIndex(feature: Feature, index: number): void {\n const bound = this.lowerBound(feature);\n assert(!bound.equal);\n assert(!this.isFull);\n const entry = new IndexedValue<Feature>(feature, index);\n this._array.splice(bound.index, 0, entry);\n }\n\n /** @internal */\n public getArray(): Array<IndexedValue<Feature>> { return this._array; }\n\n /** Convert this feature table to a representation that can be supplied to [RenderSystem.createBatch]($frontend). */\n public pack(): RenderFeatureTable {\n return PackedFeatureTable.pack(this);\n }\n}\n\n/** @alpha */\nexport type ComputeNodeId = (feature: PackedFeatureWithIndex) => number;\n\n/** Representation of a [[FeatureTable]] suitable for use with [RenderSystem.createBatch]($frontend).\n * The [[Feature]]s are represented as [[PackedFeature]]s. The feature table may contain features from multiple [Model]($backend)s.\n * @see [[FeatureTable.pack]] to produce a RenderFeatureTable.\n * @public\n */\nexport interface RenderFeatureTable {\n /** The \"model Id\" of the tile tree containing the tile from which this feature table originated.\n * It may be a transient Id if, for example, the tile tree represents a reality model or represents the geometry of multiple\n * persistent models batched together.\n */\n readonly batchModelId: Id64String;\n /** A split representation of [[batchModelId]], to avoid having to constantly having to parse the string. */\n readonly batchModelIdPair: Id64.Uint32Pair;\n /** The number of features in the table; equivalently, one more than the largest feature index. */\n readonly numFeatures: number;\n /** The number of bytes consumed by the feature table, strictly for diagnostic purposes. */\n readonly byteLength: number;\n readonly type: BatchType;\n /** @alpha */\n animationNodeIds?: UintArray;\n\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\n getFeature(featureIndex: number, result: ModelFeature): ModelFeature;\n\n /** Find the feature at the specified index. Returns undefined if featureIndex >= [[numFeatures]]. */\n findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;\n\n /** Find the Id of the element associated with the feature at the specified index. */\n findElementId(featureIndex: number): Id64String | undefined;\n\n /** Get the Id of the element associated with the feature at the specified index as a pair of 32-bit integers.\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\n */\n getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\n\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\n getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;\n\n /** Get an object that provides ordered iteration over all features.\n * @note The `output` object is reused (mutated in place) as the current value on each iteration.\n */\n iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;\n\n /** @alpha */\n populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void;\n\n /** @alpha */\n getAnimationNodeId(featureIndex: number): number;\n\n /** Get the Id of the model associated with the feature at the specified index.\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\n * This is more efficient than [[getFeature]] for callers who are only interested in the model Id.\n */\n getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\n}\n\nconst scratchPackedFeature = PackedFeature.create();\n\nfunction populateAnimationNodeIds(table: RenderFeatureTable, computeNodeId: ComputeNodeId, maxNodeId: number): UintArray | undefined {\n assert(maxNodeId > 0);\n\n let nodeIds;\n const outputFeature = PackedFeature.createWithIndex();\n for (const feature of table.iterable(outputFeature)) {\n const nodeId = computeNodeId(feature);\n assert(nodeId <= maxNodeId);\n if (0 !== nodeId) {\n if (!nodeIds) {\n const size = table.numFeatures;\n nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));\n }\n\n nodeIds[feature.index] = nodeId;\n }\n }\n\n return nodeIds;\n}\n\n/**\n * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,\n * wherein each feature occupies 3 32-bit integers.\n * @internal\n */\nexport class PackedFeatureTable implements RenderFeatureTable {\n public readonly data: Uint32Array;\n public readonly batchModelId: Id64String;\n public readonly batchModelIdPair: Id64.Uint32Pair;\n public readonly numFeatures: number;\n public readonly anyDefined: boolean;\n public readonly type: BatchType;\n public animationNodeIds?: UintArray;\n\n public get byteLength(): number { return this.data.byteLength; }\n\n /** Construct a PackedFeatureTable from the packed binary data.\n * This is used internally when deserializing Tiles in iMdl format.\n * @internal\n */\n public constructor(data: Uint32Array, modelId: Id64String, numFeatures: number, type: BatchType, animationNodeIds?: UintArray) {\n this.data = data;\n this.batchModelId = modelId;\n this.batchModelIdPair = Id64.getUint32Pair(modelId);\n this.numFeatures = numFeatures;\n this.type = type;\n this.animationNodeIds = animationNodeIds;\n\n switch (this.numFeatures) {\n case 0:\n this.anyDefined = false;\n break;\n case 1:\n this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));\n break;\n default:\n this.anyDefined = true;\n break;\n }\n\n assert(this.data.length >= this._subCategoriesOffset);\n assert(undefined === this.animationNodeIds || this.animationNodeIds.length === this.numFeatures);\n }\n\n /** Create a packed feature table from a [[FeatureTable]]. */\n public static pack(featureTable: FeatureTable): PackedFeatureTable {\n // We must determine how many subcategories we have ahead of time to compute the size of the Uint32Array, as\n // the array cannot be resized after it is created.\n // We are not too worried about this as FeatureTables created on the front-end will contain few if any features; those obtained from the\n // back-end arrive within tiles already in the packed format.\n const subcategories = new Map<string, number>();\n for (const iv of featureTable.getArray()) {\n const found = subcategories.get(iv.value.subCategoryId.toString());\n if (undefined === found)\n subcategories.set(iv.value.subCategoryId, subcategories.size);\n }\n\n // We need 3 32-bit integers per feature, plus 2 32-bit integers per subcategory.\n const subCategoriesOffset = 3 * featureTable.length;\n const nUint32s = subCategoriesOffset + 2 * subcategories.size;\n const uint32s = new Uint32Array(nUint32s);\n\n for (const iv of featureTable.getArray()) {\n const feature = iv.value;\n const index = iv.index * 3;\n\n let subCategoryIndex = subcategories.get(feature.subCategoryId)!;\n assert(undefined !== subCategoryIndex); // we inserted it above...\n subCategoryIndex |= (feature.geometryClass << 24);\n\n uint32s[index + 0] = Id64.getLowerUint32(feature.elementId);\n uint32s[index + 1] = Id64.getUpperUint32(feature.elementId);\n uint32s[index + 2] = subCategoryIndex;\n }\n\n subcategories.forEach((index: number, id: string, _map) => {\n const index32 = subCategoriesOffset + 2 * index;\n uint32s[index32 + 0] = Id64.getLowerUint32(id);\n uint32s[index32 + 1] = Id64.getUpperUint32(id);\n });\n\n return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);\n }\n\n /** Retrieve the Feature associated with the specified index. */\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\n return ModelFeature.unpack(packed, result, this.batchModelId);\n }\n\n /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\n }\n\n /** @internal */\n public getElementIdPair(featureIndex: number, out?: Id64.Uint32Pair): Id64.Uint32Pair {\n out = out ?? { lower: 0, upper: 0 };\n assert(featureIndex < this.numFeatures);\n const offset = 3 * featureIndex;\n out.lower = this.data[offset];\n out.upper = this.data[offset + 1];\n return out;\n }\n\n /** @internal */\n public getSubCategoryIdPair(featureIndex: number): Id64.Uint32Pair {\n const index = 3 * featureIndex;\n let subCatIndex = this.data[index + 2];\n subCatIndex = (subCatIndex & 0x00ffffff) >>> 0;\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\n return { lower: this.data[subCatIndex], upper: this.data[subCatIndex + 1] };\n }\n\n /** @internal */\n public getAnimationNodeId(featureIndex: number): number {\n return undefined !== this.animationNodeIds && featureIndex < this.numFeatures ? this.animationNodeIds[featureIndex] : 0;\n }\n\n /** @internal */\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\n assert(featureIndex < this.numFeatures);\n\n const index32 = 3 * featureIndex;\n result.elementId.lower = this.data[index32];\n result.elementId.upper = this.data[index32 + 1];\n\n const subCatIndexAndClass = this.data[index32 + 2];\n result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;\n\n let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\n result.subCategoryId.lower = this.data[subCatIndex];\n result.subCategoryId.upper = this.data[subCatIndex + 1];\n\n result.animationNodeId = this.getAnimationNodeId(featureIndex);\n result.modelId.lower = this.batchModelIdPair.lower;\n result.modelId.upper = this.batchModelIdPair.upper;\n\n return result;\n }\n\n public getModelIdPair(_featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n out.lower = this.batchModelIdPair.lower;\n out.upper = this.batchModelIdPair.upper;\n return out;\n }\n\n /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */\n public findElementId(featureIndex: number): Id64String | undefined {\n if (featureIndex >= this.numFeatures)\n return undefined;\n else\n return this.readId(3 * featureIndex);\n }\n\n /** Return true if this table contains exactly 1 feature. */\n public get isUniform(): boolean { return 1 === this.numFeatures; }\n\n /** If this table contains exactly 1 feature, return it. */\n public getUniform(result: ModelFeature): ModelFeature | undefined {\n return this.isUniform ? this.getFeature(0, result) : undefined;\n }\n\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n public get isPlanarClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n public get isClassifier(): boolean { return this.isVolumeClassifier || this.isPlanarClassifier; }\n\n /** Unpack the features into a [[FeatureTable]]. */\n public unpack(): FeatureTable {\n const table = new FeatureTable(this.numFeatures, this.batchModelId);\n const feature = ModelFeature.create();\n for (let i = 0; i < this.numFeatures; i++) {\n this.getFeature(i, feature);\n table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);\n }\n\n return table;\n }\n\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\n assert(undefined === this.animationNodeIds);\n this.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\n }\n\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\n for (let i = 0; i < this.numFeatures; i++) {\n this.getPackedFeature(i, output);\n output.index = i;\n yield output;\n }\n }\n\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\n return {\n [Symbol.iterator]: () => this.iterator(output),\n };\n }\n\n private get _subCategoriesOffset(): number { return this.numFeatures * 3; }\n\n private readId(offset32: number): Id64String {\n return Id64.fromUint32Pair(this.data[offset32], this.data[offset32 + 1]);\n }\n}\n\ninterface PackedFeatureModelEntry {\n lastFeatureIndex: number;\n idLower: number;\n idUpper: number;\n}\n\nconst scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };\n\n/** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].\n * The feature indices in the packed feature table are grouped together by model, such that the first N features belong to model 1, the next M features to model 2, and so on.\n * The model table itself consists of one entry per model, where each entry looks like:\n * indexOfLastFeatureInModel: u32\n * modelId: u64\n * The modelId associated with a feature can therefore be derived by finding the entry in the model table with the highest indexOfLastFeatureInModel no greater than the feature index.\n * This lookup can be optimized using binary search.\n * Moreover, while iterating the feature table in sequence, the model table can be iterated in parallel so that no per-feature lookup of model Id is required.\n * @internal\n */\nexport class PackedFeatureModelTable {\n private readonly _data: Uint32Array;\n\n public constructor(data: Uint32Array) {\n this._data = data;\n assert(this._data.length % 3 === 0);\n }\n\n /** The number of models in the table. */\n public get length(): number {\n return this._data.length / 3;\n }\n\n public get byteLength(): number {\n return this._data.byteLength;\n }\n\n private getLastFeatureIndex(modelIndex: number): number {\n return this._data[modelIndex * 3];\n }\n\n public getEntry(modelIndex: number, result: PackedFeatureModelEntry): PackedFeatureModelEntry {\n if (modelIndex >= this.length) {\n result.idLower = result.idUpper = 0;\n result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;\n return result;\n }\n\n const index = modelIndex * 3;\n result.lastFeatureIndex = this._data[index + 0];\n result.idLower = this._data[index + 1];\n result.idUpper = this._data[index + 2];\n return result;\n }\n\n /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */\n public getModelIdPair(featureIndex: number, result?: Id64.Uint32Pair): Id64.Uint32Pair {\n if (!result)\n result = { lower: 0, upper: 0 };\n else\n result.lower = result.upper = 0;\n\n let first = 0;\n const last = this.length;\n let count = last;\n while (count > 0) {\n const step = Math.floor(count / 2);\n const mid = first + step;\n const lastFeatureIndex = this.getLastFeatureIndex(mid);\n if (featureIndex > lastFeatureIndex) {\n first = mid + 1;\n count -= step + 1;\n } else {\n count = step;\n }\n }\n\n if (first < last) {\n result.lower = this._data[first * 3 + 1];\n result.upper = this._data[first * 3 + 2];\n }\n\n return result;\n }\n}\n\n/** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.\n * @internal\n */\nexport class MultiModelPackedFeatureTable implements RenderFeatureTable {\n private readonly _features: PackedFeatureTable;\n private readonly _models: PackedFeatureModelTable;\n\n public constructor(features: PackedFeatureTable, models: PackedFeatureModelTable) {\n this._features = features;\n this._models = models;\n }\n\n public static create(data: Uint32Array, batchModelId: Id64String, numFeatures: number, type: BatchType, numSubCategories: number): MultiModelPackedFeatureTable {\n const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;\n const featureData = data.subarray(0, modelTableOffset);\n const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);\n\n const modelData = data.subarray(modelTableOffset);\n const models = new PackedFeatureModelTable(modelData);\n\n return new MultiModelPackedFeatureTable(features, models);\n }\n\n public get batchModelId() { return this._features.batchModelId; }\n public get batchModelIdPair() { return this._features.batchModelIdPair; }\n public get numFeatures() { return this._features.numFeatures; }\n public get type() { return this._features.type; }\n public get animationNodeIds(): UintArray | undefined { return this._features.animationNodeIds; }\n public set animationNodeIds(ids: UintArray | undefined) { this._features.animationNodeIds = ids; }\n\n public get byteLength() {\n return this._features.byteLength + this._models.byteLength;\n }\n\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\n this._features.getPackedFeature(featureIndex, result);\n this._models.getModelIdPair(featureIndex, result.modelId);\n return result;\n }\n\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\n return ModelFeature.unpack(packed, result);\n }\n\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\n }\n\n public getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n return this._features.getElementIdPair(featureIndex, out);\n }\n\n public getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n this._models.getModelIdPair(featureIndex, out);\n return out;\n }\n\n public findElementId(featureIndex: number): Id64String | undefined {\n return this._features.findElementId(featureIndex);\n }\n\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\n // Rather than perform a binary search on the model table to find each feature's model Id, traverse the model table in parallel with the feature table.\n let modelIndex = 0;\n const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);\n\n for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {\n if (featureIndex > modelEntry.lastFeatureIndex)\n this._models.getEntry(++modelIndex, modelEntry);\n\n this._features.getPackedFeature(featureIndex, output);\n output.modelId.lower = modelEntry.idLower;\n output.modelId.upper = modelEntry.idUpper;\n output.index = featureIndex;\n yield output;\n }\n }\n\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\n return {\n [Symbol.iterator]: () => this.iterator(output),\n };\n }\n\n public getAnimationNodeId(featureIndex: number): number {\n return this._features.getAnimationNodeId(featureIndex);\n }\n\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\n this._features.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\n }\n}\n"]}
1
+ {"version":3,"file":"FeatureTable.js","sourceRoot":"","sources":["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AC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,2BAAY,CAAU,OAAO,EAAE,KAAK,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,2EAA2E;IACpE,QAAQ,KAA2C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/E,oHAAoH;IAC7G,IAAI;QACT,OAAO,uCAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACF;AAnDD,oCAmDC","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 {\n assert, compareNumbers, compareStrings, Id64, Id64String, IndexedValue, IndexMap, UintArray,\n} from \"@itwin/core-bentley\";\nimport { GeometryClass } from \"./GeometryParams\";\nimport { PackedFeatureTable } from \"./internal/PackedFeatureTable\";\n\n/** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be\n * grouped with other such entities in a [[FeatureTable]].\n * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every\n * [GeometricElement]($backend) that intersects the tile's volume, so each element produces at least one feature.\n * However, an element's geometry stream can contain geometry belonging to multiple different combinations of [SubCategory]($backend) and\n * [[GeometryClass]], so an individual element may produce more than one feature.\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\n * @public\n */\nexport class Feature {\n public readonly elementId: Id64String;\n public readonly subCategoryId: Id64String;\n public readonly geometryClass: GeometryClass;\n\n public constructor(elementId: Id64String = Id64.invalid, subCategoryId: Id64String = Id64.invalid, geometryClass: GeometryClass = GeometryClass.Primary) {\n this.elementId = elementId;\n this.subCategoryId = subCategoryId;\n this.geometryClass = geometryClass;\n }\n\n public get isDefined(): boolean { return !Id64.isInvalid(this.elementId) || !Id64.isInvalid(this.subCategoryId) || this.geometryClass !== GeometryClass.Primary; }\n public get isUndefined(): boolean { return !this.isDefined; }\n\n /** Returns true if this feature is equivalent to the supplied feature. */\n public equals(other: Feature): boolean { return 0 === this.compare(other); }\n\n /** Performs ordinal comparison of this feature with another.\n * @param rhs The feature to compare with.\n * @returns zero if the features are equivalent, a negative value if this feature compares as \"less than\" `rhs`, or a positive value if this feature compares \"greater than\" `rhs`.\n */\n public compare(rhs: Feature): number {\n if (this === rhs)\n return 0;\n\n let cmp = compareNumbers(this.geometryClass, rhs.geometryClass);\n if (0 === cmp) {\n cmp = compareStrings(this.elementId, rhs.elementId);\n if (0 === cmp) {\n cmp = compareStrings(this.subCategoryId, rhs.subCategoryId);\n }\n }\n\n return cmp;\n }\n}\n\n/** A [[Feature]] with a modelId identifying the model containing the feature, obtained from a [[RenderFeatureTable]].\n * @public\n */\nexport interface ModelFeature {\n modelId: Id64String;\n elementId: Id64String;\n subCategoryId: Id64String;\n geometryClass: GeometryClass;\n}\n\n/** @public */\nexport namespace ModelFeature {\n /** Create a ModelFeature of [[GeometryClass.Primary]] with all invalid Ids.\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.findFeature]] and [[RenderFeatureTable.getFeature]].\n */\n export function create(): ModelFeature {\n return {\n modelId: Id64.invalid,\n elementId: Id64.invalid,\n subCategoryId: Id64.invalid,\n geometryClass: GeometryClass.Primary,\n };\n }\n\n /** Returns `true` if any of `feature`'s properties differ from the defaults (invalid Ids and [[GeometryClass.Primary]]). */\n export function isDefined(feature: ModelFeature): boolean {\n return !Id64.isInvalid(feature.modelId) || !Id64.isInvalid(feature.elementId) || !Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== GeometryClass.Primary;\n }\n\n /** @alpha */\n export function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature {\n result.modelId = unpackedModelId ?? Id64.fromUint32PairObject(packed.modelId);\n result.elementId = Id64.fromUint32PairObject(packed.elementId);\n result.subCategoryId = Id64.fromUint32PairObject(packed.subCategoryId);\n result.geometryClass = packed.geometryClass;\n return result;\n }\n}\n\n/** Represents a [[Feature]] within a [[RenderFeatureTable]]. This representation is optimized for use on the GPU.\n * @public\n */\nexport interface PackedFeature {\n modelId: Id64.Uint32Pair;\n elementId: Id64.Uint32Pair;\n subCategoryId: Id64.Uint32Pair;\n geometryClass: GeometryClass;\n /** @alpha */\n animationNodeId: number;\n}\n\n/** Represents a [[PackedFeature]] obtained from a [[RenderFeatureTable]], including the index of that feature within the table.\n * @public\n */\nexport interface PackedFeatureWithIndex extends PackedFeature {\n index: number;\n}\n\n/** @public */\nexport namespace PackedFeature {\n /** Create a PackedFeature of [[GeometryClass.Primary]] with all invalid Ids.\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.getPackedFeature]].\n */\n export function create(): PackedFeature {\n const pair = { upper: 0, lower: 0 };\n return {\n modelId: { ...pair },\n elementId: { ...pair },\n subCategoryId: { ...pair },\n geometryClass: GeometryClass.Primary,\n animationNodeId: 0,\n };\n }\n\n /** Create a PackedFeatureWithIndex of [[GeometryClass.Primary]] with all invalid Ids and an index of zero.\n * This is primarily useful for creating a reusable `output` argument for [[RenderFeatureTable.iterable]].\n */\n export function createWithIndex(): PackedFeatureWithIndex {\n const result = create() as PackedFeatureWithIndex;\n result.index = 0;\n return result;\n }\n}\n\n/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.\n * The most commonly-encountered batches are Tiles, which can be of either Primary or\n * Classifier type.\n * @public\n * @extensions\n */\nexport enum BatchType {\n /** This batch contains graphics derived from a model's visible geometry. */\n Primary,\n /**\n * This batch contains color volumes which are used to classify a model's visible geometry.\n * The graphics themselves are not rendered to the screen; instead they are rendered to the stencil buffer\n * to resymbolize the primary geometry.\n */\n VolumeClassifier,\n /**\n * This batch contains planar graphics which are used to classify a model's visible geometry.\n * The graphics themselves are not rendered to the screen; instead they are rendered to a texture buffer\n * to resymbolize the primary geometry.\n */\n PlanarClassifier,\n}\n\n/** Defines a look-up table for [[Feature]]s within a batched [RenderGraphic]($frontend). Consecutive 32-bit\n * indices are assigned to each unique Feature. Primitives within the RenderGraphic can\n * use per-vertex indices to specify the distribution of Features within the primitive. The appearance of individual\n * features can be customized using [[FeatureOverrides]]. Typically a [Tile]($frontend) will contain a feature table\n * identifying the elements whose geometry appears within that tile.\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\n * @public\n */\nexport class FeatureTable extends IndexMap<Feature> {\n public readonly modelId: Id64String;\n public readonly type: BatchType;\n\n /** Construct an empty FeatureTable. */\n public constructor(maxFeatures: number, modelId: Id64String = Id64.invalid, type: BatchType = BatchType.Primary) {\n super((lhs, rhs) => lhs.compare(rhs), maxFeatures);\n this.modelId = modelId;\n this.type = type;\n }\n\n /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */\n public get maxFeatures(): number { return this._maximumSize; }\n /** Returns true if this table contains at least one [[Feature]] with a valid element and/or subcategory Id. */\n public get anyDefined(): boolean { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }\n /** Returns true if this FeatureTable contains exactly one [[Feature]]. */\n public get isUniform(): boolean { return 1 === this.length; }\n /** If this FeatureTable contains exactly one [[Feature]], returns that Feature; otherwise returns undefined. */\n public get uniform(): Feature | undefined { return 1 === this.length ? this._array[0].value : undefined; }\n /** Returns true if this FeatureTable is associated with [[BatchType.VolumeClassifier]] geometry. */\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n /** Returns true if this FeatureTable is associated with [[BatchType.PlanarClassifier]] geometry. */\n public get isPlanarClassifier(): boolean { return BatchType.PlanarClassifier === this.type; }\n\n /** Returns the Feature corresponding to the specified index, or undefined if the index is not present. */\n public findFeature(index: number): Feature | undefined {\n for (const entry of this._array)\n if (entry.index === index)\n return entry.value;\n\n return undefined;\n }\n\n /** Inserts the specified [[Feature]] at the specified index. This is really only useful when reconstructing a previously-create feature table\n * for which you know the index assigned to each feature.\n */\n public insertWithIndex(feature: Feature, index: number): void {\n const bound = this.lowerBound(feature);\n assert(!bound.equal);\n assert(!this.isFull);\n const entry = new IndexedValue<Feature>(feature, index);\n this._array.splice(bound.index, 0, entry);\n }\n\n /** Access the underlying array containing the table's current contents. */\n public getArray(): ReadonlyArray<IndexedValue<Feature>> { return this._array; }\n\n /** Convert this feature table to a representation that can be supplied to [RenderSystem.createBatch]($frontend). */\n public pack(): RenderFeatureTable {\n return PackedFeatureTable.pack(this);\n }\n}\n\n/** @alpha */\nexport type ComputeNodeId = (feature: PackedFeatureWithIndex) => number;\n\n/** Representation of a [[FeatureTable]] suitable for use with [RenderSystem.createBatch]($frontend).\n * The [[Feature]]s are represented as [[PackedFeature]]s. The feature table may contain features from multiple [Model]($backend)s.\n * @see [[FeatureTable.pack]] to produce a RenderFeatureTable.\n * @public\n */\nexport interface RenderFeatureTable {\n /** The \"model Id\" of the tile tree containing the tile from which this feature table originated.\n * It may be a transient Id if, for example, the tile tree represents a reality model or represents the geometry of multiple\n * persistent models batched together.\n */\n readonly batchModelId: Id64String;\n /** A split representation of [[batchModelId]], to avoid having to constantly having to parse the string. */\n readonly batchModelIdPair: Id64.Uint32Pair;\n /** The number of features in the table; equivalently, one more than the largest feature index. */\n readonly numFeatures: number;\n /** The number of bytes consumed by the feature table, strictly for diagnostic purposes. */\n readonly byteLength: number;\n readonly type: BatchType;\n /** @alpha */\n animationNodeIds?: UintArray;\n\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\n getFeature(featureIndex: number, result: ModelFeature): ModelFeature;\n\n /** Find the feature at the specified index. Returns undefined if featureIndex >= [[numFeatures]]. */\n findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;\n\n /** Find the Id of the element associated with the feature at the specified index. */\n findElementId(featureIndex: number): Id64String | undefined;\n\n /** Get the Id of the element associated with the feature at the specified index as a pair of 32-bit integers.\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\n */\n getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\n\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\n getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;\n\n /** Get an object that provides ordered iteration over all features.\n * @note The `output` object is reused (mutated in place) as the current value on each iteration.\n */\n iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;\n\n /** @alpha */\n populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void;\n\n /** @alpha */\n getAnimationNodeId(featureIndex: number): number;\n\n /** Get the Id of the model associated with the feature at the specified index.\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\n * This is more efficient than [[getFeature]] for callers who are only interested in the model Id.\n */\n getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\n}\n"]}
@@ -1,34 +1,92 @@
1
1
  /** @packageDocumentation
2
2
  * @module Symbology
3
3
  */
4
- /** The type of a font.
4
+ /** The [FontFile]($backend) encodings understood by iTwin.js.
5
+ * @see [this article]($docs/learning/backend/Fonts.md) to learn more about fonts in iModels.
5
6
  * @public
6
7
  * @extensions
7
8
  */
8
9
  export declare enum FontType {
10
+ /** [OpenType](https://en.wikipedia.org/wiki/OpenType) format, derived from and compatible with the earlier [TrueType](https://en.wikipedia.org/wiki/TrueType) format.
11
+ * The vast majority of modern, scalable, aesthetically-pleasing fonts are delivered in this format.
12
+ * OpenType files typically use one of the following suffixes: .ttf, .ttc, .otf, and .otc.
13
+ * @see [FontFile.createFromTrueTypeFileName]($backend) to work with font files in this format.
14
+ */
9
15
  TrueType = 1,
16
+ /** [RSC](https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-FC78484C-E42F-30BF-BF68-2B2C025AE040.html) is a simple font format
17
+ * originating in [MicroStation](https://en.wikipedia.org/wiki/MicroStation). In MicroStation, they are defined in "resource files" with a ".rsc" suffix.
18
+ * In iModels, they are encoded in a binary format. Currently, no APIs exist to convert to this binary format, but some [connectors]($docs/learning/imodel-connectors.md) can
19
+ * perform the conversion.
20
+ */
10
21
  Rsc = 2,
22
+ /** [SHX](https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-DE941DB5-7044-433C-AA68-2A9AE98A5713) is a simple font format originating in
23
+ * [AutoCAD](https://en.wikipedia.org/wiki/AutoCAD). SHX fonts are generally distributed as files with a ".shx" suffix.
24
+ * @see [FontFile.createFromShxFontBlob]($backend) to work with font files in this format.
25
+ */
11
26
  Shx = 3
12
27
  }
13
- /** An iModel-local identifier for a font.
28
+ /** An unsigned integer uniquely identifying a [font family]($docs/learning/backend/Fonts.md) in the context of an [[IModel]].
29
+ * The iModel stores a mapping between `FontId`s and [[FontFamilyDescriptor]]s.
30
+ * [[TextString]]s refer to fonts by the their `FontId`s.
31
+ * A font Id of zero represents an invalid/non-existent font.
32
+ * @see [IModelDbFonts]($backend) to work with font Ids.
14
33
  * @public
15
34
  * @extensions
16
35
  */
17
36
  export type FontId = number;
18
- /** The properties of a Font.
37
+ /** Uniquely describes one or more [[FontFace]]s sharing the same name and type comprising a single [font family]($docs/learning/backend/Fonts.md).
19
38
  * @public
20
39
  */
21
- export interface FontProps {
22
- /** the Id, within an iModel, of this font. */
23
- id: FontId;
24
- /** The type of font */
40
+ export interface FontFamilyDescriptor {
41
+ /** The encoding in which the font family's faces are stored. */
25
42
  type: FontType;
26
- /** The name of the font. */
43
+ /** The name of the family. */
44
+ name: string;
45
+ }
46
+ /** A [[FontFamilyDescriptor]] in which the [[FontType]] is optional, used when querying [[FontId]]s via [IModelDbFonts.findId]($backend).
47
+ * If a font type is provided, this selector exactly identifies a unique font family, just like [[FontFamilyDescriptor]] does.
48
+ * If the type is omitted, then the selector refers to the first font family that matches the specified [[name]]. If multiple families
49
+ * with the same name exist, then a TrueType font will be preferred over a RSC font, and a RSC font preferred over an SHX font.
50
+ * @beta
51
+ */
52
+ export interface FontFamilySelector {
53
+ /** The encoding in which the font family's faces are stored. */
54
+ type?: FontType;
55
+ /** The name of the family. */
27
56
  name: string;
28
57
  }
58
+ /** Represents a [[FontFamilyDescriptor]] stored in an iModel with a unique numeric Id.
59
+ * @public
60
+ */
61
+ export interface FontProps extends FontFamilyDescriptor {
62
+ /** An integer that uniquely identifies this font family in the context of the iModel in which it is stored. */
63
+ id: FontId;
64
+ }
65
+ /** A specific variation of the glyphs defined by a [font family]($docs/learning/backend/Fonts.md).
66
+ * Each face can be italicized, bolded, both, or neither.
67
+ * Font faces are stored in [FontFile]($backend)s.
68
+ * @beta
69
+ */
70
+ export interface FontFace {
71
+ /** The name of the font family to which this face belongs. */
72
+ familyName: string;
73
+ isBold: boolean;
74
+ isItalic: boolean;
75
+ }
76
+ /** Information about the encoding of a [[FontType.Rsc]] [FontFile]($backend), used when embedding such a font into an iModel.
77
+ * Currently, no public APIs exist to create such fonts.
78
+ * @alpha
79
+ */
80
+ export interface RscFontEncodingProps {
81
+ codePage?: number;
82
+ degree?: number;
83
+ plusMinus?: number;
84
+ diameter?: number;
85
+ }
29
86
  /** The properties of a FontMap
30
87
  * @public
31
88
  * @extensions
89
+ * @deprecated in 5.0.0. Use [IModelDb.fonts]($backend)
32
90
  */
33
91
  export interface FontMapProps {
34
92
  fonts: FontProps[];
@@ -37,9 +95,9 @@ export interface FontMapProps {
37
95
  * A FontMap holds the set of font names available in an iModel.
38
96
  * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.
39
97
  * This class maps FontIds to FontProps.
40
- * @note The font map is generally established when the iModel is first created to specify the set of fonts available
41
- * for editors. Adding new entries requires that the schema lock be held.
98
+ * @note This API has never worked properly. Don't use it. Use [IModelDb.fonts]($backend) instead.
42
99
  * @public
100
+ * @deprecated in 5.0.0. Use [IModelDb.fonts]($backend) instead.
43
101
  */
44
102
  export declare class FontMap {
45
103
  readonly fonts: Map<number, FontProps>;