@itwin/core-common 4.1.0-dev.8 → 4.1.0-dev.80

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 (434) hide show
  1. package/CHANGELOG.md +83 -1
  2. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  3. package/lib/cjs/AnalysisStyle.js.map +1 -1
  4. package/lib/cjs/Atmosphere.js.map +1 -1
  5. package/lib/cjs/AuthorizationClient.js.map +1 -1
  6. package/lib/cjs/BackendTypes.js.map +1 -1
  7. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  8. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  9. package/lib/cjs/Base64EncodedString.js.map +1 -1
  10. package/lib/cjs/BlobReader.js.map +1 -1
  11. package/lib/cjs/BriefcaseTypes.d.ts +13 -1
  12. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  13. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  14. package/lib/cjs/Camera.js.map +1 -1
  15. package/lib/cjs/ChangedElements.d.ts +2 -0
  16. package/lib/cjs/ChangedElements.d.ts.map +1 -1
  17. package/lib/cjs/ChangedElements.js +2 -0
  18. package/lib/cjs/ChangedElements.js.map +1 -1
  19. package/lib/cjs/ChangedEntities.js.map +1 -1
  20. package/lib/cjs/ChangesetProps.js.map +1 -1
  21. package/lib/cjs/ClipStyle.js.map +1 -1
  22. package/lib/cjs/Code.js.map +1 -1
  23. package/lib/cjs/ColorByName.js.map +1 -1
  24. package/lib/cjs/ColorDef.js.map +1 -1
  25. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  26. package/lib/cjs/ConcurrentQuery.d.ts +26 -2
  27. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  28. package/lib/cjs/ConcurrentQuery.js +29 -3
  29. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  30. package/lib/cjs/ContextRealityModel.js.map +1 -1
  31. package/lib/cjs/DisplayStyleSettings.d.ts +1 -15
  32. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  33. package/lib/cjs/DisplayStyleSettings.js +1 -15
  34. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  35. package/lib/cjs/ECSchemaProps.js.map +1 -1
  36. package/lib/cjs/ECSqlReader.d.ts +164 -7
  37. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  38. package/lib/cjs/ECSqlReader.js +124 -12
  39. package/lib/cjs/ECSqlReader.js.map +1 -1
  40. package/lib/cjs/ECSqlTypes.js.map +1 -1
  41. package/lib/cjs/ElementMesh.js.map +1 -1
  42. package/lib/cjs/ElementProps.d.ts +2 -2
  43. package/lib/cjs/ElementProps.js.map +1 -1
  44. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  45. package/lib/cjs/EntityProps.js +2 -2
  46. package/lib/cjs/EntityProps.js.map +1 -1
  47. package/lib/cjs/EntityReference.js.map +1 -1
  48. package/lib/cjs/Environment.js.map +1 -1
  49. package/lib/cjs/FeatureIndex.d.ts +50 -4
  50. package/lib/cjs/FeatureIndex.d.ts.map +1 -1
  51. package/lib/cjs/FeatureIndex.js +44 -4
  52. package/lib/cjs/FeatureIndex.js.map +1 -1
  53. package/lib/cjs/FeatureSymbology.js.map +1 -1
  54. package/lib/cjs/FeatureTable.d.ts +44 -20
  55. package/lib/cjs/FeatureTable.d.ts.map +1 -1
  56. package/lib/cjs/FeatureTable.js +17 -2
  57. package/lib/cjs/FeatureTable.js.map +1 -1
  58. package/lib/cjs/Fonts.js.map +1 -1
  59. package/lib/cjs/Frustum.js.map +1 -1
  60. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  61. package/lib/cjs/GeometryContainment.js.map +1 -1
  62. package/lib/cjs/GeometryParams.js.map +1 -1
  63. package/lib/cjs/GeometrySummary.js.map +1 -1
  64. package/lib/cjs/Gradient.js.map +1 -1
  65. package/lib/cjs/GraphicParams.js.map +1 -1
  66. package/lib/cjs/GroundPlane.js.map +1 -1
  67. package/lib/cjs/HSLColor.js.map +1 -1
  68. package/lib/cjs/HSVColor.js.map +1 -1
  69. package/lib/cjs/HiddenLine.js.map +1 -1
  70. package/lib/cjs/Hilite.js.map +1 -1
  71. package/lib/cjs/IModel.d.ts +1 -1
  72. package/lib/cjs/IModel.d.ts.map +1 -1
  73. package/lib/cjs/IModel.js +1 -1
  74. package/lib/cjs/IModel.js.map +1 -1
  75. package/lib/cjs/IModelError.js.map +1 -1
  76. package/lib/cjs/IModelVersion.js.map +1 -1
  77. package/lib/cjs/Image.js.map +1 -1
  78. package/lib/cjs/IpcAppProps.js.map +1 -1
  79. package/lib/cjs/LightSettings.js.map +1 -1
  80. package/lib/cjs/LinePixels.js.map +1 -1
  81. package/lib/cjs/Localization.js.map +1 -1
  82. package/lib/cjs/MapImagerySettings.js.map +1 -1
  83. package/lib/cjs/MapLayerSettings.js.map +1 -1
  84. package/lib/cjs/MassProperties.js.map +1 -1
  85. package/lib/cjs/MaterialProps.js.map +1 -1
  86. package/lib/cjs/ModelClipGroup.js.map +1 -1
  87. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  88. package/lib/cjs/ModelProps.js.map +1 -1
  89. package/lib/cjs/NativeAppProps.js.map +1 -1
  90. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  91. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  92. package/lib/cjs/PlanarClipMask.js.map +1 -1
  93. package/lib/cjs/QPoint.d.ts +3 -3
  94. package/lib/cjs/QPoint.js +3 -3
  95. package/lib/cjs/QPoint.js.map +1 -1
  96. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  97. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  98. package/lib/cjs/Render.d.ts +27 -35
  99. package/lib/cjs/Render.d.ts.map +1 -1
  100. package/lib/cjs/Render.js +4 -67
  101. package/lib/cjs/Render.js.map +1 -1
  102. package/lib/cjs/RenderMaterial.js.map +1 -1
  103. package/lib/cjs/RenderTexture.js.map +1 -1
  104. package/lib/cjs/RgbColor.js.map +1 -1
  105. package/lib/cjs/RpcInterface.d.ts +1 -1
  106. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  107. package/lib/cjs/RpcInterface.js +26 -25
  108. package/lib/cjs/RpcInterface.js.map +1 -1
  109. package/lib/cjs/RpcManager.js.map +1 -1
  110. package/lib/cjs/SessionProps.js.map +1 -1
  111. package/lib/cjs/SkyBox.d.ts +3 -3
  112. package/lib/cjs/SkyBox.d.ts.map +1 -1
  113. package/lib/cjs/SkyBox.js +3 -3
  114. package/lib/cjs/SkyBox.js.map +1 -1
  115. package/lib/cjs/Snapping.js.map +1 -1
  116. package/lib/cjs/SolarCalculate.js.map +1 -1
  117. package/lib/cjs/SolarShadows.js.map +1 -1
  118. package/lib/cjs/SpatialClassification.js.map +1 -1
  119. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  120. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  121. package/lib/cjs/TerrainSettings.js.map +1 -1
  122. package/lib/cjs/TextureMapping.js.map +1 -1
  123. package/lib/cjs/TextureProps.js.map +1 -1
  124. package/lib/cjs/ThematicDisplay.js.map +1 -1
  125. package/lib/cjs/Thumbnail.js.map +1 -1
  126. package/lib/cjs/TileProps.js.map +1 -1
  127. package/lib/cjs/Tween.js.map +1 -1
  128. package/lib/cjs/TxnAction.js.map +1 -1
  129. package/lib/cjs/ViewDetails.js.map +1 -1
  130. package/lib/cjs/ViewFlags.d.ts +4 -4
  131. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  132. package/lib/cjs/ViewFlags.js +4 -4
  133. package/lib/cjs/ViewFlags.js.map +1 -1
  134. package/lib/cjs/ViewProps.d.ts +429 -5
  135. package/lib/cjs/ViewProps.d.ts.map +1 -1
  136. package/lib/cjs/ViewProps.js +16 -0
  137. package/lib/cjs/ViewProps.js.map +1 -1
  138. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  139. package/lib/cjs/core-common.js.map +1 -1
  140. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  141. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  142. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  143. package/lib/cjs/geometry/AreaPattern.js +2 -2
  144. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  145. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  146. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  147. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  148. package/lib/cjs/geometry/ElementGeometry.d.ts +6 -6
  149. package/lib/cjs/geometry/ElementGeometry.js +1 -1
  150. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  151. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  152. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  153. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  154. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  155. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  156. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  157. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  158. package/lib/cjs/geometry/Placement.js.map +1 -1
  159. package/lib/cjs/geometry/Projection.js.map +1 -1
  160. package/lib/cjs/geometry/TextString.js.map +1 -1
  161. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  162. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  163. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  164. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  165. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  166. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +4 -2
  167. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  168. package/lib/cjs/rpc/IModelReadRpcInterface.js +6 -4
  169. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  170. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  171. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  172. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  173. package/lib/cjs/rpc/WipRpcInterface.js.map +1 -1
  174. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  175. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  176. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  177. package/lib/cjs/rpc/core/RpcInvocation.d.ts +2 -0
  178. package/lib/cjs/rpc/core/RpcInvocation.d.ts.map +1 -1
  179. package/lib/cjs/rpc/core/RpcInvocation.js +1 -0
  180. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  181. package/lib/cjs/rpc/core/RpcMarshaling.js +2 -2
  182. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  183. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  184. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  185. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  186. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  187. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  188. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  189. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  190. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  191. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  192. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  193. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  194. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  195. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  196. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  197. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +1 -1
  198. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  199. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  200. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  201. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  202. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  203. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  204. package/lib/cjs/tile/GltfTileIO.d.ts.map +1 -1
  205. package/lib/cjs/tile/GltfTileIO.js +2 -0
  206. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  207. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  208. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  209. package/lib/cjs/tile/IModelTileIO.js +2 -2
  210. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  211. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  212. package/lib/cjs/tile/TileIO.js.map +1 -1
  213. package/lib/cjs/tile/TileMetadata.d.ts +14 -13
  214. package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
  215. package/lib/cjs/tile/TileMetadata.js +56 -44
  216. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  217. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  218. package/lib/esm/AmbientOcclusion.js.map +1 -1
  219. package/lib/esm/AnalysisStyle.js.map +1 -1
  220. package/lib/esm/Atmosphere.js.map +1 -1
  221. package/lib/esm/AuthorizationClient.js.map +1 -1
  222. package/lib/esm/BackendTypes.js.map +1 -1
  223. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  224. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  225. package/lib/esm/Base64EncodedString.js.map +1 -1
  226. package/lib/esm/BlobReader.js.map +1 -1
  227. package/lib/esm/BriefcaseTypes.d.ts +13 -1
  228. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  229. package/lib/esm/BriefcaseTypes.js.map +1 -1
  230. package/lib/esm/Camera.js.map +1 -1
  231. package/lib/esm/ChangedElements.d.ts +2 -0
  232. package/lib/esm/ChangedElements.d.ts.map +1 -1
  233. package/lib/esm/ChangedElements.js +2 -0
  234. package/lib/esm/ChangedElements.js.map +1 -1
  235. package/lib/esm/ChangedEntities.js.map +1 -1
  236. package/lib/esm/ChangesetProps.js.map +1 -1
  237. package/lib/esm/ClipStyle.js.map +1 -1
  238. package/lib/esm/Code.js.map +1 -1
  239. package/lib/esm/ColorByName.js.map +1 -1
  240. package/lib/esm/ColorDef.js.map +1 -1
  241. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  242. package/lib/esm/ConcurrentQuery.d.ts +26 -2
  243. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  244. package/lib/esm/ConcurrentQuery.js +29 -3
  245. package/lib/esm/ConcurrentQuery.js.map +1 -1
  246. package/lib/esm/ContextRealityModel.js.map +1 -1
  247. package/lib/esm/DisplayStyleSettings.d.ts +1 -15
  248. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  249. package/lib/esm/DisplayStyleSettings.js +1 -15
  250. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  251. package/lib/esm/ECSchemaProps.js.map +1 -1
  252. package/lib/esm/ECSqlReader.d.ts +164 -7
  253. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  254. package/lib/esm/ECSqlReader.js +124 -12
  255. package/lib/esm/ECSqlReader.js.map +1 -1
  256. package/lib/esm/ECSqlTypes.js.map +1 -1
  257. package/lib/esm/ElementMesh.js.map +1 -1
  258. package/lib/esm/ElementProps.d.ts +2 -2
  259. package/lib/esm/ElementProps.js.map +1 -1
  260. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  261. package/lib/esm/EntityProps.js +2 -2
  262. package/lib/esm/EntityProps.js.map +1 -1
  263. package/lib/esm/EntityReference.js.map +1 -1
  264. package/lib/esm/Environment.js.map +1 -1
  265. package/lib/esm/FeatureIndex.d.ts +50 -4
  266. package/lib/esm/FeatureIndex.d.ts.map +1 -1
  267. package/lib/esm/FeatureIndex.js +44 -4
  268. package/lib/esm/FeatureIndex.js.map +1 -1
  269. package/lib/esm/FeatureSymbology.js.map +1 -1
  270. package/lib/esm/FeatureTable.d.ts +44 -20
  271. package/lib/esm/FeatureTable.d.ts.map +1 -1
  272. package/lib/esm/FeatureTable.js +17 -2
  273. package/lib/esm/FeatureTable.js.map +1 -1
  274. package/lib/esm/Fonts.js.map +1 -1
  275. package/lib/esm/Frustum.js.map +1 -1
  276. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  277. package/lib/esm/GeometryContainment.js.map +1 -1
  278. package/lib/esm/GeometryParams.js.map +1 -1
  279. package/lib/esm/GeometrySummary.js.map +1 -1
  280. package/lib/esm/Gradient.js.map +1 -1
  281. package/lib/esm/GraphicParams.js.map +1 -1
  282. package/lib/esm/GroundPlane.js.map +1 -1
  283. package/lib/esm/HSLColor.js.map +1 -1
  284. package/lib/esm/HSVColor.js.map +1 -1
  285. package/lib/esm/HiddenLine.js.map +1 -1
  286. package/lib/esm/Hilite.js.map +1 -1
  287. package/lib/esm/IModel.d.ts +1 -1
  288. package/lib/esm/IModel.d.ts.map +1 -1
  289. package/lib/esm/IModel.js +1 -1
  290. package/lib/esm/IModel.js.map +1 -1
  291. package/lib/esm/IModelError.js.map +1 -1
  292. package/lib/esm/IModelVersion.js.map +1 -1
  293. package/lib/esm/Image.js.map +1 -1
  294. package/lib/esm/IpcAppProps.js.map +1 -1
  295. package/lib/esm/LightSettings.js.map +1 -1
  296. package/lib/esm/LinePixels.js.map +1 -1
  297. package/lib/esm/Localization.js.map +1 -1
  298. package/lib/esm/MapImagerySettings.js.map +1 -1
  299. package/lib/esm/MapLayerSettings.js.map +1 -1
  300. package/lib/esm/MassProperties.js.map +1 -1
  301. package/lib/esm/MaterialProps.js.map +1 -1
  302. package/lib/esm/ModelClipGroup.js.map +1 -1
  303. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  304. package/lib/esm/ModelProps.js.map +1 -1
  305. package/lib/esm/NativeAppProps.js.map +1 -1
  306. package/lib/esm/OctEncodedNormal.js.map +1 -1
  307. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  308. package/lib/esm/PlanarClipMask.js.map +1 -1
  309. package/lib/esm/QPoint.d.ts +3 -3
  310. package/lib/esm/QPoint.js +3 -3
  311. package/lib/esm/QPoint.js.map +1 -1
  312. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  313. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  314. package/lib/esm/Render.d.ts +27 -35
  315. package/lib/esm/Render.d.ts.map +1 -1
  316. package/lib/esm/Render.js +3 -64
  317. package/lib/esm/Render.js.map +1 -1
  318. package/lib/esm/RenderMaterial.js.map +1 -1
  319. package/lib/esm/RenderTexture.js.map +1 -1
  320. package/lib/esm/RgbColor.js.map +1 -1
  321. package/lib/esm/RpcInterface.d.ts +1 -1
  322. package/lib/esm/RpcInterface.d.ts.map +1 -1
  323. package/lib/esm/RpcInterface.js +26 -25
  324. package/lib/esm/RpcInterface.js.map +1 -1
  325. package/lib/esm/RpcManager.js.map +1 -1
  326. package/lib/esm/SessionProps.js.map +1 -1
  327. package/lib/esm/SkyBox.d.ts +3 -3
  328. package/lib/esm/SkyBox.d.ts.map +1 -1
  329. package/lib/esm/SkyBox.js +3 -3
  330. package/lib/esm/SkyBox.js.map +1 -1
  331. package/lib/esm/Snapping.js.map +1 -1
  332. package/lib/esm/SolarCalculate.js.map +1 -1
  333. package/lib/esm/SolarShadows.js.map +1 -1
  334. package/lib/esm/SpatialClassification.js.map +1 -1
  335. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  336. package/lib/esm/SubCategoryOverride.js.map +1 -1
  337. package/lib/esm/TerrainSettings.js.map +1 -1
  338. package/lib/esm/TextureMapping.js.map +1 -1
  339. package/lib/esm/TextureProps.js.map +1 -1
  340. package/lib/esm/ThematicDisplay.js.map +1 -1
  341. package/lib/esm/Thumbnail.js.map +1 -1
  342. package/lib/esm/TileProps.js.map +1 -1
  343. package/lib/esm/Tween.js.map +1 -1
  344. package/lib/esm/TxnAction.js.map +1 -1
  345. package/lib/esm/ViewDetails.js.map +1 -1
  346. package/lib/esm/ViewFlags.d.ts +4 -4
  347. package/lib/esm/ViewFlags.d.ts.map +1 -1
  348. package/lib/esm/ViewFlags.js +4 -4
  349. package/lib/esm/ViewFlags.js.map +1 -1
  350. package/lib/esm/ViewProps.d.ts +429 -5
  351. package/lib/esm/ViewProps.d.ts.map +1 -1
  352. package/lib/esm/ViewProps.js +15 -1
  353. package/lib/esm/ViewProps.js.map +1 -1
  354. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  355. package/lib/esm/core-common.js.map +1 -1
  356. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  357. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  358. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  359. package/lib/esm/geometry/AreaPattern.js +2 -2
  360. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  361. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  362. package/lib/esm/geometry/Cartographic.js.map +1 -1
  363. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  364. package/lib/esm/geometry/ElementGeometry.d.ts +6 -6
  365. package/lib/esm/geometry/ElementGeometry.js +1 -1
  366. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  367. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  368. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  369. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  370. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  371. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  372. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  373. package/lib/esm/geometry/LineStyle.js.map +1 -1
  374. package/lib/esm/geometry/Placement.js.map +1 -1
  375. package/lib/esm/geometry/Projection.js.map +1 -1
  376. package/lib/esm/geometry/TextString.js.map +1 -1
  377. package/lib/esm/ipc/IpcSession.js.map +1 -1
  378. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  379. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  380. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  381. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  382. package/lib/esm/rpc/IModelReadRpcInterface.d.ts +4 -2
  383. package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  384. package/lib/esm/rpc/IModelReadRpcInterface.js +6 -4
  385. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  386. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  387. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  388. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  389. package/lib/esm/rpc/WipRpcInterface.js.map +1 -1
  390. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  391. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  392. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  393. package/lib/esm/rpc/core/RpcInvocation.d.ts +2 -0
  394. package/lib/esm/rpc/core/RpcInvocation.d.ts.map +1 -1
  395. package/lib/esm/rpc/core/RpcInvocation.js +1 -0
  396. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  397. package/lib/esm/rpc/core/RpcMarshaling.js +2 -2
  398. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  399. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  400. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  401. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  402. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  403. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  404. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  405. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  406. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  407. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  408. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  409. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  410. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  411. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  412. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  413. package/lib/esm/rpc/web/WebAppRpcProtocol.js +1 -1
  414. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  415. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  416. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  417. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  418. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  419. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  420. package/lib/esm/tile/GltfTileIO.d.ts.map +1 -1
  421. package/lib/esm/tile/GltfTileIO.js +2 -0
  422. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  423. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  424. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  425. package/lib/esm/tile/IModelTileIO.js +2 -2
  426. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  427. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  428. package/lib/esm/tile/TileIO.js.map +1 -1
  429. package/lib/esm/tile/TileMetadata.d.ts +14 -13
  430. package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
  431. package/lib/esm/tile/TileMetadata.js +57 -45
  432. package/lib/esm/tile/TileMetadata.js.map +1 -1
  433. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  434. package/package.json +11 -29
@@ -2,47 +2,39 @@
2
2
  * @module Rendering
3
3
  */
4
4
  import { OctEncodedNormalPair } from "./OctEncodedNormal";
5
- /** @internal */
5
+ /** Describes the semantics of a [PolylineArgs]($frontend).
6
+ * @alpha
7
+ */
6
8
  export declare enum PolylineTypeFlags {
7
9
  Normal = 0,
8
10
  Edge = 1,
9
11
  Outline = 2
10
12
  }
11
- /** Flags describing a polyline. A polyline may represent a continuous line string, or a set of discrete points.
12
- * @internal
13
+ /** Flags describing a [PolylineArgs]($frontend).
14
+ * @public
13
15
  */
14
- export declare class PolylineFlags {
15
- isDisjoint: boolean;
16
- isPlanar: boolean;
17
- is2d: boolean;
18
- type: PolylineTypeFlags;
19
- constructor(is2d?: boolean, isPlanar?: boolean, isDisjoint?: boolean, type?: PolylineTypeFlags);
20
- clone(): PolylineFlags;
21
- /** Create a PolylineFlags from a serialized numeric representation. */
22
- static unpack(value: number): PolylineFlags;
23
- initDefaults(): void;
24
- get isOutlineEdge(): boolean;
25
- get isNormalEdge(): boolean;
26
- get isAnyEdge(): boolean;
27
- setIsNormalEdge(): void;
28
- setIsOutlineEdge(): void;
29
- /** Convert these flags to a numeric representation for serialization. */
30
- pack(): number;
31
- equals(other: PolylineFlags): boolean;
32
- }
33
- /** @internal */
34
- export declare class PolylineData {
35
- vertIndices: number[];
36
- numIndices: number;
37
- constructor(vertIndices?: number[], numIndices?: number);
38
- get isValid(): boolean;
39
- reset(): void;
40
- init(polyline: MeshPolyline): boolean;
16
+ export interface PolylineFlags {
17
+ /** If `true`, the polylines are to be drawn as individual disconnected point strings instead of as connected line strings. */
18
+ isDisjoint?: boolean;
19
+ /** If `true`, the polylines' positions are all coplanar. */
20
+ isPlanar?: boolean;
21
+ /** If `true`, the polylines' positions all have the same z coordinate. */
22
+ is2d?: boolean;
23
+ /** Default: Normal.
24
+ * @alpha
25
+ */
26
+ type?: PolylineTypeFlags;
41
27
  }
28
+ /** Describes the vertex indices of a single line within a [PolylineArgs]($frontend).
29
+ * The indices represent either a line string as a connected series of points, or a point string as a set of disconnected points, depending
30
+ * on the [[PolylineFlags.isDisjoint]] value of [PolylineArgs.flags]($frontend).
31
+ * @public
32
+ */
33
+ export type PolylineIndices = number[];
42
34
  /** @internal */
43
35
  export declare class MeshPolyline {
44
- readonly indices: number[];
45
- constructor(indices?: number[]);
36
+ readonly indices: PolylineIndices;
37
+ constructor(indices?: PolylineIndices);
46
38
  addIndex(index: number): void;
47
39
  clear(): void;
48
40
  }
@@ -80,9 +72,9 @@ export declare class SilhouetteEdgeArgs extends EdgeArgs {
80
72
  }
81
73
  /** @internal */
82
74
  export declare class PolylineEdgeArgs {
83
- lines?: PolylineData[];
84
- constructor(lines?: PolylineData[]);
85
- init(lines?: PolylineData[]): boolean;
75
+ lines?: PolylineIndices[];
76
+ constructor(lines?: PolylineIndices[]);
77
+ init(lines?: PolylineIndices[]): boolean;
86
78
  get numLines(): number;
87
79
  get isValid(): boolean;
88
80
  clear(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"Render.d.ts","sourceRoot":"","sources":["../../src/Render.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAI1D,gBAAgB;AAChB,oBAAY,iBAAiB;IAC3B,MAAM,IAAI;IACV,IAAI,IAAS;IACb,OAAO,IAAS;CACjB;AAED;;GAEG;AACH,qBAAa,aAAa;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,iBAAiB,CAAC;gBAEZ,IAAI,UAAQ,EAAE,QAAQ,UAAQ,EAAE,UAAU,UAAQ,EAAE,IAAI,oBAA2B;IAO/F,KAAK,IAAI,aAAa;IAE7B,uEAAuE;WACzD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa;IAU3C,YAAY;IAKnB,IAAW,aAAa,IAAI,OAAO,CAAoD;IACvF,IAAW,YAAY,IAAI,OAAO,CAAiD;IACnF,IAAW,SAAS,IAAI,OAAO,CAAmD;IAC3E,eAAe,IAAI,IAAI;IACvB,gBAAgB,IAAI,IAAI;IAE/B,yEAAyE;IAClE,IAAI,IAAI,MAAM;IAYd,MAAM,CAAC,KAAK,EAAE,aAAa;CAGnC;AAED,gBAAgB;AAChB,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G,MAAM;CAO1C;AAED,gBAAgB;AAChB,qBAAa,SAAS;IACb,OAAO,EAAE,QAAQ,EAAE,CAAM;IACzB,UAAU,EAAE,QAAQ,EAAE,CAAM;IAC5B,SAAS,EAAE,gBAAgB,CAA0B;IACrD,iBAAiB,EAAE,oBAAoB,EAAE,CAAM;;CAEvD;AAED,gBAAgB;AAChB,qBAAa,QAAQ;IACZ,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEnB,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO;IAQpC,KAAK,IAAI,IAAI;IACpB,IAAW,OAAO,IAAI,OAAO,CAA8B;IAC3D,IAAW,QAAQ,WAA+D;CACnF;AAED,gBAAgB;AAChB,qBAAa,kBAAmB,SAAQ,QAAQ;IACvC,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAExB,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS;IAU1B,KAAK;CAItB;AAED,gBAAgB;AAChB,qBAAa,gBAAgB;IACpB,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;gBAEd,KAAK,CAAC,EAAE,eAAe,EAAE;IAErC,IAAI,CAAC,KAAK,CAAC,EAAE,eAAe,EAAE,GAAG,OAAO;IAK/C,IAAW,QAAQ,WAA+D;IAClF,IAAW,OAAO,YAAgC;IAC3C,KAAK;CACb"}
package/lib/cjs/Render.js CHANGED
@@ -7,80 +7,17 @@
7
7
  * @module Rendering
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.PolylineEdgeArgs = exports.SilhouetteEdgeArgs = exports.EdgeArgs = exports.MeshEdges = exports.MeshEdge = exports.MeshPolylineList = exports.MeshPolyline = exports.PolylineData = exports.PolylineFlags = exports.PolylineTypeFlags = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
10
+ exports.PolylineEdgeArgs = exports.SilhouetteEdgeArgs = exports.EdgeArgs = exports.MeshEdges = exports.MeshEdge = exports.MeshPolylineList = exports.MeshPolyline = exports.PolylineTypeFlags = void 0;
12
11
  // cSpell:ignore vals
13
- /** @internal */
12
+ /** Describes the semantics of a [PolylineArgs]($frontend).
13
+ * @alpha
14
+ */
14
15
  var PolylineTypeFlags;
15
16
  (function (PolylineTypeFlags) {
16
17
  PolylineTypeFlags[PolylineTypeFlags["Normal"] = 0] = "Normal";
17
18
  PolylineTypeFlags[PolylineTypeFlags["Edge"] = 1] = "Edge";
18
19
  PolylineTypeFlags[PolylineTypeFlags["Outline"] = 2] = "Outline";
19
20
  })(PolylineTypeFlags = exports.PolylineTypeFlags || (exports.PolylineTypeFlags = {}));
20
- /** Flags describing a polyline. A polyline may represent a continuous line string, or a set of discrete points.
21
- * @internal
22
- */
23
- class PolylineFlags {
24
- constructor(is2d = false, isPlanar = false, isDisjoint = false, type = PolylineTypeFlags.Normal) {
25
- this.isDisjoint = isDisjoint;
26
- this.isPlanar = isPlanar;
27
- this.is2d = is2d;
28
- this.type = type;
29
- }
30
- clone() { return new PolylineFlags(this.is2d, this.isPlanar, this.isDisjoint, this.type); }
31
- /** Create a PolylineFlags from a serialized numeric representation. */
32
- static unpack(value) {
33
- const isDisjoint = 0 !== (value & 1);
34
- const isPlanar = 0 !== (value & 2);
35
- const is2d = 0 !== (value & 4);
36
- const type = (value >> 3);
37
- (0, core_bentley_1.assert)(type === PolylineTypeFlags.Normal || type === PolylineTypeFlags.Edge || type === PolylineTypeFlags.Outline);
38
- return new PolylineFlags(is2d, isPlanar, isDisjoint, type);
39
- }
40
- initDefaults() {
41
- this.isDisjoint = this.isPlanar = this.is2d = false;
42
- this.type = PolylineTypeFlags.Normal;
43
- }
44
- get isOutlineEdge() { return PolylineTypeFlags.Outline === this.type; }
45
- get isNormalEdge() { return PolylineTypeFlags.Edge === this.type; }
46
- get isAnyEdge() { return PolylineTypeFlags.Normal !== this.type; }
47
- setIsNormalEdge() { this.type = PolylineTypeFlags.Edge; }
48
- setIsOutlineEdge() { this.type = PolylineTypeFlags.Outline; }
49
- /** Convert these flags to a numeric representation for serialization. */
50
- pack() {
51
- let val = 0;
52
- if (this.isDisjoint)
53
- val += 1;
54
- if (this.isPlanar)
55
- val += 1 << 1;
56
- if (this.is2d)
57
- val += 1 << 2;
58
- val += this.type << 3;
59
- return val;
60
- }
61
- equals(other) {
62
- return this.type === other.type && this.is2d === other.is2d && this.isPlanar === other.isPlanar && this.isDisjoint === other.isDisjoint;
63
- }
64
- }
65
- exports.PolylineFlags = PolylineFlags;
66
- /** @internal */
67
- class PolylineData {
68
- constructor(vertIndices = [], numIndices = 0) {
69
- this.vertIndices = vertIndices;
70
- this.numIndices = numIndices;
71
- }
72
- get isValid() { return 0 < this.numIndices; }
73
- reset() {
74
- this.numIndices = 0;
75
- this.vertIndices = [];
76
- }
77
- init(polyline) {
78
- this.numIndices = polyline.indices.length;
79
- this.vertIndices = 0 < this.numIndices ? polyline.indices : [];
80
- return this.isValid;
81
- }
82
- }
83
- exports.PolylineData = PolylineData;
84
21
  /** @internal */
85
22
  class MeshPolyline {
86
23
  constructor(indices = []) {
@@ -1 +1 @@
1
- {"version":3,"file":"Render.js","sourceRoot":"","sources":["../../src/Render.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAG7C,qBAAqB;AAErB,gBAAgB;AAChB,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,6DAAU,CAAA;IACV,yDAAa,CAAA;IACb,+DAAgB,CAAA;AAClB,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAED;;GAEG;AACH,MAAa,aAAa;IAMxB,YAAmB,IAAI,GAAG,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,UAAU,GAAG,KAAK,EAAE,IAAI,GAAG,iBAAiB,CAAC,MAAM;QACpG,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CA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AAED,gBAAgB;AAChB,MAAa,kBAAmB,SAAQ,QAAQ;IAG9B,IAAI,CAAC,SAAqB;QACxC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE;YAC9D,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,UAAU,CAAC;YAClC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,iBAAiB,CAAC;SAC5C;QAED,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEe,KAAK;QACnB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,KAAK,CAAC,KAAK,EAAE,CAAC;IAChB,CAAC;CACF;AAjBD,gDAiBC;AAED,gBAAgB;AAChB,MAAa,gBAAgB;IAG3B,YAAmB,KAAsB,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAEzD,IAAI,CAAC,KAAsB;QAChC,IAAI,CAAC,KAAK,GAAG,SAAS,KAAK,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,IAAW,QAAQ,KAAK,OAAO,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClF,IAAW,OAAO,KAAK,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3C,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC;CAC3C;AAbD,4CAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { OctEncodedNormalPair } from \"./OctEncodedNormal\";\r\n\r\n// cSpell:ignore vals\r\n\r\n/** @internal */\r\nexport enum PolylineTypeFlags {\r\n Normal = 0, // Just an ordinary polyline\r\n Edge = 1 << 0, // A polyline used to define the edges of a planar region.\r\n Outline = 1 << 1, // Like Edge, but the edges are only displayed in wireframe mode when surface fill is undisplayed.\r\n}\r\n\r\n/** Flags describing a polyline. A polyline may represent a continuous line string, or a set of discrete points.\r\n * @internal\r\n */\r\nexport class PolylineFlags {\r\n public isDisjoint: boolean;\r\n public isPlanar: boolean;\r\n public is2d: boolean;\r\n public type: PolylineTypeFlags;\r\n\r\n public constructor(is2d = false, isPlanar = false, isDisjoint = false, type = PolylineTypeFlags.Normal) {\r\n this.isDisjoint = isDisjoint;\r\n this.isPlanar = isPlanar;\r\n this.is2d = is2d;\r\n this.type = type;\r\n }\r\n\r\n public clone(): PolylineFlags { return new PolylineFlags(this.is2d, this.isPlanar, this.isDisjoint, this.type); }\r\n\r\n /** Create a PolylineFlags from a serialized numeric representation. */\r\n public static unpack(value: number): PolylineFlags {\r\n const isDisjoint = 0 !== (value & 1);\r\n const isPlanar = 0 !== (value & 2);\r\n const is2d = 0 !== (value & 4);\r\n const type: PolylineTypeFlags = (value >> 3);\r\n assert(type === PolylineTypeFlags.Normal || type === PolylineTypeFlags.Edge || type === PolylineTypeFlags.Outline);\r\n\r\n return new PolylineFlags(is2d, isPlanar, isDisjoint, type);\r\n }\r\n\r\n public initDefaults() {\r\n this.isDisjoint = this.isPlanar = this.is2d = false;\r\n this.type = PolylineTypeFlags.Normal;\r\n }\r\n\r\n public get isOutlineEdge(): boolean { return PolylineTypeFlags.Outline === this.type; }\r\n public get isNormalEdge(): boolean { return PolylineTypeFlags.Edge === this.type; }\r\n public get isAnyEdge(): boolean { return PolylineTypeFlags.Normal !== this.type; }\r\n public setIsNormalEdge(): void { this.type = PolylineTypeFlags.Edge; }\r\n public setIsOutlineEdge(): void { this.type = PolylineTypeFlags.Outline; }\r\n\r\n /** Convert these flags to a numeric representation for serialization. */\r\n public pack(): number {\r\n let val: number = 0;\r\n if (this.isDisjoint)\r\n val += 1;\r\n if (this.isPlanar)\r\n val += 1 << 1;\r\n if (this.is2d)\r\n val += 1 << 2;\r\n val += (this.type as number) << 3;\r\n return val;\r\n }\r\n\r\n public equals(other: PolylineFlags) {\r\n return this.type === other.type && this.is2d === other.is2d && this.isPlanar === other.isPlanar && this.isDisjoint === other.isDisjoint;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class PolylineData {\r\n public vertIndices: number[];\r\n public numIndices: number;\r\n public constructor(vertIndices: number[] = [], numIndices = 0) {\r\n this.vertIndices = vertIndices;\r\n this.numIndices = numIndices;\r\n }\r\n public get isValid(): boolean { return 0 < this.numIndices; }\r\n public reset(): void {\r\n this.numIndices = 0;\r\n this.vertIndices = [];\r\n }\r\n\r\n public init(polyline: MeshPolyline) {\r\n this.numIndices = polyline.indices.length;\r\n this.vertIndices = 0 < this.numIndices ? polyline.indices : [];\r\n return this.isValid;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class MeshPolyline {\r\n public readonly indices: number[];\r\n public constructor(indices: number[] = []) {\r\n this.indices = indices.slice();\r\n }\r\n public addIndex(index: number) {\r\n const { indices } = this;\r\n if (indices.length === 0 || indices[indices.length - 1] !== index)\r\n indices.push(index);\r\n }\r\n public clear() { this.indices.length = 0; }\r\n}\r\n\r\n/** @internal */\r\nexport class MeshPolylineList extends Array<MeshPolyline> {\r\n constructor(...args: MeshPolyline[]) {\r\n super(...args);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class MeshEdge {\r\n public indices = [0, 0];\r\n\r\n public constructor(index0?: number, index1?: number) {\r\n if (undefined === index0 || undefined === index1)\r\n return;\r\n if (index0 < index1) {\r\n this.indices[0] = index0;\r\n this.indices[1] = index1;\r\n } else {\r\n this.indices[0] = index1;\r\n this.indices[1] = index0;\r\n }\r\n }\r\n\r\n public compareTo(other: MeshEdge): number {\r\n let diff = this.indices[0] - other.indices[0];\r\n if (0 === diff)\r\n diff = this.indices[1] - other.indices[1];\r\n\r\n return diff;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class MeshEdges {\r\n public visible: MeshEdge[] = [];\r\n public silhouette: MeshEdge[] = [];\r\n public polylines: MeshPolylineList = new MeshPolylineList();\r\n public silhouetteNormals: OctEncodedNormalPair[] = [];\r\n public constructor() { }\r\n}\r\n\r\n/** @internal */\r\nexport class EdgeArgs {\r\n public edges?: MeshEdge[];\r\n\r\n public init(meshEdges?: MeshEdges): boolean {\r\n this.clear();\r\n if (undefined !== meshEdges && 0 < meshEdges.visible.length)\r\n this.edges = meshEdges.visible;\r\n\r\n return this.isValid;\r\n }\r\n\r\n public clear(): void { this.edges = undefined; }\r\n public get isValid(): boolean { return 0 < this.numEdges; }\r\n public get numEdges() { return undefined !== this.edges ? this.edges.length : 0; }\r\n}\r\n\r\n/** @internal */\r\nexport class SilhouetteEdgeArgs extends EdgeArgs {\r\n public normals?: OctEncodedNormalPair[];\r\n\r\n public override init(meshEdges?: MeshEdges) {\r\n this.clear();\r\n if (undefined !== meshEdges && 0 < meshEdges.silhouette.length) {\r\n this.edges = meshEdges.silhouette;\r\n this.normals = meshEdges.silhouetteNormals;\r\n }\r\n\r\n return this.isValid;\r\n }\r\n\r\n public override clear() {\r\n this.normals = undefined;\r\n super.clear();\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class PolylineEdgeArgs {\r\n public lines?: PolylineData[];\r\n\r\n public constructor(lines?: PolylineData[]) { this.init(lines); }\r\n\r\n public init(lines?: PolylineData[]): boolean {\r\n this.lines = undefined !== lines && 0 < lines.length ? lines : undefined;\r\n return this.isValid;\r\n }\r\n\r\n public get numLines() { return undefined !== this.lines ? this.lines.length : 0; }\r\n public get isValid() { return this.numLines > 0; }\r\n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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 { OctEncodedNormalPair } from \"./OctEncodedNormal\";\n\n// cSpell:ignore vals\n\n/** Describes the semantics of a [PolylineArgs]($frontend).\n * @alpha\n */\nexport enum PolylineTypeFlags {\n Normal = 0, // Just an ordinary polyline\n Edge = 1 << 0, // A polyline used to define the edges of a planar region.\n Outline = 1 << 1, // Like Edge, but the edges are only displayed in wireframe mode when surface fill is undisplayed.\n}\n\n/** Flags describing a [PolylineArgs]($frontend).\n * @public\n */\nexport interface PolylineFlags {\n /** If `true`, the polylines are to be drawn as individual disconnected point strings instead of as connected line strings. */\n isDisjoint?: boolean;\n /** If `true`, the polylines' positions are all coplanar. */\n isPlanar?: boolean;\n /** If `true`, the polylines' positions all have the same z coordinate. */\n is2d?: boolean;\n /** Default: Normal.\n * @alpha\n */\n type?: PolylineTypeFlags;\n}\n\n/** Describes the vertex indices of a single line within a [PolylineArgs]($frontend).\n * The indices represent either a line string as a connected series of points, or a point string as a set of disconnected points, depending\n * on the [[PolylineFlags.isDisjoint]] value of [PolylineArgs.flags]($frontend).\n * @public\n */\nexport type PolylineIndices = number[];\n\n/** @internal */\nexport class MeshPolyline {\n public readonly indices: PolylineIndices;\n\n public constructor(indices: PolylineIndices = []) {\n this.indices = indices.slice();\n }\n\n public addIndex(index: number) {\n const { indices } = this;\n if (indices.length === 0 || indices[indices.length - 1] !== index)\n indices.push(index);\n }\n\n public clear() { this.indices.length = 0; }\n}\n\n/** @internal */\nexport class MeshPolylineList extends Array<MeshPolyline> {\n constructor(...args: MeshPolyline[]) {\n super(...args);\n }\n}\n\n/** @internal */\nexport class MeshEdge {\n public indices = [0, 0];\n\n public constructor(index0?: number, index1?: number) {\n if (undefined === index0 || undefined === index1)\n return;\n if (index0 < index1) {\n this.indices[0] = index0;\n this.indices[1] = index1;\n } else {\n this.indices[0] = index1;\n this.indices[1] = index0;\n }\n }\n\n public compareTo(other: MeshEdge): number {\n let diff = this.indices[0] - other.indices[0];\n if (0 === diff)\n diff = this.indices[1] - other.indices[1];\n\n return diff;\n }\n}\n\n/** @internal */\nexport class MeshEdges {\n public visible: MeshEdge[] = [];\n public silhouette: MeshEdge[] = [];\n public polylines: MeshPolylineList = new MeshPolylineList();\n public silhouetteNormals: OctEncodedNormalPair[] = [];\n public constructor() { }\n}\n\n/** @internal */\nexport class EdgeArgs {\n public edges?: MeshEdge[];\n\n public init(meshEdges?: MeshEdges): boolean {\n this.clear();\n if (undefined !== meshEdges && 0 < meshEdges.visible.length)\n this.edges = meshEdges.visible;\n\n return this.isValid;\n }\n\n public clear(): void { this.edges = undefined; }\n public get isValid(): boolean { return 0 < this.numEdges; }\n public get numEdges() { return undefined !== this.edges ? this.edges.length : 0; }\n}\n\n/** @internal */\nexport class SilhouetteEdgeArgs extends EdgeArgs {\n public normals?: OctEncodedNormalPair[];\n\n public override init(meshEdges?: MeshEdges) {\n this.clear();\n if (undefined !== meshEdges && 0 < meshEdges.silhouette.length) {\n this.edges = meshEdges.silhouette;\n this.normals = meshEdges.silhouetteNormals;\n }\n\n return this.isValid;\n }\n\n public override clear() {\n this.normals = undefined;\n super.clear();\n }\n}\n\n/** @internal */\nexport class PolylineEdgeArgs {\n public lines?: PolylineIndices[];\n\n public constructor(lines?: PolylineIndices[]) { this.init(lines); }\n\n public init(lines?: PolylineIndices[]): boolean {\n this.lines = undefined !== lines && 0 < lines.length ? lines : undefined;\n return this.isValid;\n }\n\n public get numLines() { return undefined !== this.lines ? this.lines.length : 0; }\n public get isValid() { return this.numLines > 0; }\n public clear() { this.lines = undefined; }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../src/RenderMaterial.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;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E,aAAwB,EAAE,YAAuB,EAAE,UAA2B;YACtK,mDAAmD;YACnD,MAAM,cAAc,GAAG,IAAI,MAAM,EAAE,CAAC;YACpC,cAAc,CAAC,GAAG,GAAG,GAAG,CAAC;YACzB,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;YAC3C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;YAC7C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;YAC7C,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;YAC3C,cAAc,CAAC,cAAc,GAAG,UAAU,CAAC;YAC3C,OAAO,cAAc,CAAC;QACxB,CAAC;;IAxBD,oFAAoF;IACpF,mDAAmD;IAC5B,eAAQ,GAAG,IAAI,MAAM,EAAE,AAAf,CAAgB;IAhCpC,qBAAM,SAuDlB,CAAA;AACH,CAAC,EA9DgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8D9B;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"./ColorDef\";\r\nimport { TextureMapping } from \"./TextureMapping\";\r\n\r\n/** Represents a material which can be applied to a surface to control aspects of its appearance such as color, reflectivity, texture, and so on.\r\n * @public\r\n */\r\nexport abstract class RenderMaterial {\r\n /** If the material originated from a Material element in the [[IModelDb]], the Id of that element. */\r\n public readonly key?: string;\r\n /** Describes how to map an image to a surface to which this material is applied. */\r\n public readonly textureMapping?: TextureMapping;\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n protected constructor(params: RenderMaterial.Params) {\r\n this.key = params.key;\r\n this.textureMapping = params.textureMapping;\r\n }\r\n\r\n public get hasTexture(): boolean {\r\n return undefined !== this.textureMapping?.texture;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterial { // eslint-disable-line no-redeclare\r\n function clampToNormalizedRange(value: number): number {\r\n return Math.max(0.0, Math.min(1.0, value));\r\n }\r\n\r\n /** @deprecated in 3.x. Use [CreateRenderMaterialArgs]($frontend). */\r\n export class Params {\r\n /** If the material originates from a Material element in the [[IModel]], the Id of that element. */\r\n public key?: string;\r\n /** Diffuse color, or undefined if this material does not override the surface's own color. */\r\n public diffuseColor?: ColorDef;\r\n /** Specular color. Defaults to white if undefined. */\r\n public specularColor?: ColorDef;\r\n /** Currently unused. @alpha */\r\n public emissiveColor?: ColorDef;\r\n /** Currently unused. @alpha */\r\n public reflectColor?: ColorDef;\r\n /** Optional pattern mapping applied to the surface. */\r\n public textureMapping?: TextureMapping;\r\n /** Diffuse weight in [0..1] */\r\n public diffuse: number = 0.6;\r\n /** Specular weight in [0..1] */\r\n public specular: number = 0.4;\r\n public specularExponent: number = 13.5;\r\n /** Currently unused. @alpha */\r\n public reflect: number = 0.0;\r\n /** Currently unused. @alpha */\r\n public refract: number = 1.0;\r\n /** Currently unused. @alpha */\r\n public ambient: number = .3;\r\n /** Currently unused. @alpha */\r\n public shadows = true;\r\n private _alpha?: number;\r\n\r\n public constructor(key?: string) { this.key = key; }\r\n\r\n /** Obtain an immutable instance of a RenderMaterial with all default properties. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public static readonly defaults = new Params();\r\n\r\n /** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;\r\n * or undefined if this material does not override surface transparency.\r\n */\r\n public get alpha(): number | undefined { return this._alpha; }\r\n public set alpha(alpha: number | undefined) {\r\n this._alpha = undefined !== alpha ? clampToNormalizedRange(alpha) : undefined;\r\n }\r\n\r\n /** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public static fromColors(key?: string, diffuseColor?: ColorDef, specularColor?: ColorDef, emissiveColor?: ColorDef, reflectColor?: ColorDef, textureMap?: TextureMapping): Params {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const materialParams = new Params();\r\n materialParams.key = key;\r\n materialParams.diffuseColor = diffuseColor;\r\n materialParams.specularColor = specularColor;\r\n materialParams.emissiveColor = emissiveColor;\r\n materialParams.reflectColor = reflectColor;\r\n materialParams.textureMapping = textureMap;\r\n return materialParams;\r\n }\r\n }\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nObject.freeze(RenderMaterial.Params.defaults);\r\n"]}
1
+ {"version":3,"file":"RenderMaterial.js","sourceRoot":"","sources":["../../src/RenderMaterial.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;GAEG;AACH,MAAsB,cAAc;IAMlC,mDAAmD;IACnD,YAAsB,MAA6B;QACjD,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC9C,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;IACpD,CAAC;CACF;AAfD,wCAeC;AAED,cAAc;AACd,WAAiB,cAAc;IAC7B,SAAS,sBAAsB,CAAC,KAAa;QAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,qEAAqE;IACrE,MAAa,MAAM;QA4BjB,YAAmB,GAAY;YAf/B,+BAA+B;YACxB,YAAO,GAAW,GAAG,CAAC;YAC7B,gCAAgC;YACzB,aAAQ,GAAW,GAAG,CAAC;YACvB,qBAAgB,GAAW,IAAI,CAAC;YACvC,+BAA+B;YACxB,YAAO,GAAW,GAAG,CAAC;YAC7B,+BAA+B;YACxB,YAAO,GAAW,GAAG,CAAC;YAC7B,+BAA+B;YACxB,YAAO,GAAW,EAAE,CAAC;YAC5B,+BAA+B;YACxB,YAAO,GAAG,IAAI,CAAC;YAGa,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QAAC,CAAC;QAMpD;;WAEG;QACH,IAAW,KAAK,KAAyB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9D,IAAW,KAAK,CAAC,KAAyB;YACxC,IAAI,CAAC,MAAM,GAAG,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAChF,CAAC;QAED,6HAA6H;QAC7H,mDAAmD;QAC5C,MAAM,CAAC,UAAU,CAAC,GAAY,EAAE,YAAuB,EAAE,aAAwB,EAAE,aAAwB,EAAE,YAAuB,EAAE,UAA2B;YACtK,mDAAmD;YACnD,MAAM,cAAc,GAAG,IAAI,MAAM,EAAE,CAAC;YACpC,cAAc,CAAC,GAAG,GAAG,GAAG,CAAC;YACzB,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;YAC3C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;YAC7C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;YAC7C,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;YAC3C,cAAc,CAAC,cAAc,GAAG,UAAU,CAAC;YAC3C,OAAO,cAAc,CAAC;QACxB,CAAC;;IAxBD,oFAAoF;IACpF,mDAAmD;IAC5B,eAAQ,GAAG,IAAI,MAAM,EAAE,AAAf,CAAgB;IAhCpC,qBAAM,SAuDlB,CAAA;AACH,CAAC,EA9DgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8D9B;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\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 { ColorDef } from \"./ColorDef\";\nimport { TextureMapping } from \"./TextureMapping\";\n\n/** Represents a material which can be applied to a surface to control aspects of its appearance such as color, reflectivity, texture, and so on.\n * @public\n */\nexport abstract class RenderMaterial {\n /** If the material originated from a Material element in the [[IModelDb]], the Id of that element. */\n public readonly key?: string;\n /** Describes how to map an image to a surface to which this material is applied. */\n public readonly textureMapping?: TextureMapping;\n\n // eslint-disable-next-line deprecation/deprecation\n protected constructor(params: RenderMaterial.Params) {\n this.key = params.key;\n this.textureMapping = params.textureMapping;\n }\n\n public get hasTexture(): boolean {\n return undefined !== this.textureMapping?.texture;\n }\n}\n\n/** @public */\nexport namespace RenderMaterial { // eslint-disable-line no-redeclare\n function clampToNormalizedRange(value: number): number {\n return Math.max(0.0, Math.min(1.0, value));\n }\n\n /** @deprecated in 3.x. Use [CreateRenderMaterialArgs]($frontend). */\n export class Params {\n /** If the material originates from a Material element in the [[IModel]], the Id of that element. */\n public key?: string;\n /** Diffuse color, or undefined if this material does not override the surface's own color. */\n public diffuseColor?: ColorDef;\n /** Specular color. Defaults to white if undefined. */\n public specularColor?: ColorDef;\n /** Currently unused. @alpha */\n public emissiveColor?: ColorDef;\n /** Currently unused. @alpha */\n public reflectColor?: ColorDef;\n /** Optional pattern mapping applied to the surface. */\n public textureMapping?: TextureMapping;\n /** Diffuse weight in [0..1] */\n public diffuse: number = 0.6;\n /** Specular weight in [0..1] */\n public specular: number = 0.4;\n public specularExponent: number = 13.5;\n /** Currently unused. @alpha */\n public reflect: number = 0.0;\n /** Currently unused. @alpha */\n public refract: number = 1.0;\n /** Currently unused. @alpha */\n public ambient: number = .3;\n /** Currently unused. @alpha */\n public shadows = true;\n private _alpha?: number;\n\n public constructor(key?: string) { this.key = key; }\n\n /** Obtain an immutable instance of a RenderMaterial with all default properties. */\n // eslint-disable-next-line deprecation/deprecation\n public static readonly defaults = new Params();\n\n /** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;\n * or undefined if this material does not override surface transparency.\n */\n public get alpha(): number | undefined { return this._alpha; }\n public set alpha(alpha: number | undefined) {\n this._alpha = undefined !== alpha ? clampToNormalizedRange(alpha) : undefined;\n }\n\n /** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */\n // eslint-disable-next-line deprecation/deprecation\n public static fromColors(key?: string, diffuseColor?: ColorDef, specularColor?: ColorDef, emissiveColor?: ColorDef, reflectColor?: ColorDef, textureMap?: TextureMapping): Params {\n // eslint-disable-next-line deprecation/deprecation\n const materialParams = new Params();\n materialParams.key = key;\n materialParams.diffuseColor = diffuseColor;\n materialParams.specularColor = specularColor;\n materialParams.emissiveColor = emissiveColor;\n materialParams.reflectColor = reflectColor;\n materialParams.textureMapping = textureMap;\n return materialParams;\n }\n }\n}\n\n// eslint-disable-next-line deprecation/deprecation\nObject.freeze(RenderMaterial.Params.defaults);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderTexture.js","sourceRoot":"","sources":["../../src/RenderTexture.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH;;;;;GAKG;AACH,MAAsB,aAAa;IAIjC,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAGlF,YAAsB,IAAwB;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAQF;AAnBD,sCAmBC;AAED,cAAc;AACd,WAAiB,aAAa;IAC5B,0FAA0F;IAC1F,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,kFAAkF;QAClF,mCAAM,CAAA;QACN,yGAAyG;QACzG,iCAAK,CAAA;QACL,mFAAmF;QACnF,6CAAW,CAAA;QACX,+DAA+D;QAC/D,mCAAM,CAAA;QACN,oHAAoH;QACpH,6DAAmB,CAAA;QACnB,kDAAkD;QAClD,uDAAgB,CAAA;IAClB,CAAC,EAbW,IAAI,GAAJ,kBAAI,KAAJ,kBAAI,QAaf;IAED;;;OAGG;IACH,MAAa,MAAM;QAYjB,YAAmB,GAAY,EAAE,OAA2B,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,UAAmB,KAAK;YAC7G,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC;QAED,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KACnF;IArBY,oBAAM,SAqBlB,CAAA;AACH,CAAC,EA3CgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA2C7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String, IDisposable } from \"@itwin/core-bentley\";\r\n\r\n/** Identifies an image to be used to produce a [[RenderTexture]] for a given purpose - for example,\r\n * as part of a [[SkyBox]]. If the string is a valid `Id64String`, it refers to a persistent [Texture]($backend) element stored in an iModel.\r\n * Otherwise, it is interpreted as a Url resolving to an HTMLImageElement.\r\n * @see [[SkySphereImageProps.texture]] and [[SkyCubeImageProps]].\r\n * @public\r\n */\r\nexport type TextureImageSpec = Id64String | string;\r\n\r\n/** Represents a texture image applied to a surface during rendering.\r\n * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].\r\n * @see [RenderSystem.createTextureFromImage]($frontend) to obtain a texture from an HTML image.\r\n * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element.\r\n * @public\r\n */\r\nexport abstract class RenderTexture implements IDisposable {\r\n /** Indicates the type of texture. */\r\n public readonly type: RenderTexture.Type;\r\n\r\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\r\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\r\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\r\n public abstract get bytesUsed(): number;\r\n\r\n protected constructor(type: RenderTexture.Type) {\r\n this.type = type;\r\n }\r\n\r\n /** Releases any WebGL resources owned by this texture.\r\n * For a texture created by a [RenderSystem]($frontend) for which [CreateTextureArgs.ownership]($frontend) was specified as \"external\",\r\n * the caller is responsible for invoking this method when it is finished using the texture; otherwise, the [RenderSystem]($frontend) will handle\r\n * its disposal.\r\n */\r\n public abstract dispose(): void;\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderTexture { // eslint-disable-line no-redeclare\r\n /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */\r\n export enum Type {\r\n /** An image applied to a surface, with support for mip-mapping and repetition. */\r\n Normal,\r\n /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */\r\n Glyph,\r\n /** A non-repeating image with no mip-maps, used for example for reality models. */\r\n TileSection,\r\n /** A three-dimensional texture used for rendering a skybox. */\r\n SkyBox,\r\n /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */\r\n FilteredTileSection,\r\n /** A gradient image used for thematic display. */\r\n ThematicGradient,\r\n }\r\n\r\n /** Parameters used to construct a [[RenderTexture]].\r\n * @deprecated in 3.x. use RenderSystem.createTexture and TextureCreateArgs.\r\n * @public\r\n */\r\n export class Params {\r\n /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.\r\n * Textures created on the front-end generally have no key.\r\n */\r\n public readonly key?: string;\r\n /** Indicates the type of texture. */\r\n public readonly type: RenderTexture.Type;\r\n /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.\r\n * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.\r\n */\r\n public readonly isOwned: boolean;\r\n\r\n public constructor(key?: string, type: RenderTexture.Type = RenderTexture.Type.Normal, isOwned: boolean = false) {\r\n this.key = key;\r\n this.type = type;\r\n this.isOwned = isOwned;\r\n }\r\n\r\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\r\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\r\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"RenderTexture.js","sourceRoot":"","sources":["../../src/RenderTexture.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH;;;;;GAKG;AACH,MAAsB,aAAa;IAIjC,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAGlF,YAAsB,IAAwB;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAQF;AAnBD,sCAmBC;AAED,cAAc;AACd,WAAiB,aAAa;IAC5B,0FAA0F;IAC1F,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,kFAAkF;QAClF,mCAAM,CAAA;QACN,yGAAyG;QACzG,iCAAK,CAAA;QACL,mFAAmF;QACnF,6CAAW,CAAA;QACX,+DAA+D;QAC/D,mCAAM,CAAA;QACN,oHAAoH;QACpH,6DAAmB,CAAA;QACnB,kDAAkD;QAClD,uDAAgB,CAAA;IAClB,CAAC,EAbW,IAAI,GAAJ,kBAAI,KAAJ,kBAAI,QAaf;IAED;;;OAGG;IACH,MAAa,MAAM;QAYjB,YAAmB,GAAY,EAAE,OAA2B,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,UAAmB,KAAK;YAC7G,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC;QAED,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KACnF;IArBY,oBAAM,SAqBlB,CAAA;AACH,CAAC,EA3CgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA2C7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { Id64String, IDisposable } from \"@itwin/core-bentley\";\n\n/** Identifies an image to be used to produce a [[RenderTexture]] for a given purpose - for example,\n * as part of a [[SkyBox]]. If the string is a valid `Id64String`, it refers to a persistent [Texture]($backend) element stored in an iModel.\n * Otherwise, it is interpreted as a Url resolving to an HTMLImageElement.\n * @see [[SkySphereImageProps.texture]] and [[SkyCubeImageProps]].\n * @public\n */\nexport type TextureImageSpec = Id64String | string;\n\n/** Represents a texture image applied to a surface during rendering.\n * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].\n * @see [RenderSystem.createTextureFromImage]($frontend) to obtain a texture from an HTML image.\n * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element.\n * @public\n */\nexport abstract class RenderTexture implements IDisposable {\n /** Indicates the type of texture. */\n public readonly type: RenderTexture.Type;\n\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\n public abstract get bytesUsed(): number;\n\n protected constructor(type: RenderTexture.Type) {\n this.type = type;\n }\n\n /** Releases any WebGL resources owned by this texture.\n * For a texture created by a [RenderSystem]($frontend) for which [CreateTextureArgs.ownership]($frontend) was specified as \"external\",\n * the caller is responsible for invoking this method when it is finished using the texture; otherwise, the [RenderSystem]($frontend) will handle\n * its disposal.\n */\n public abstract dispose(): void;\n}\n\n/** @public */\nexport namespace RenderTexture { // eslint-disable-line no-redeclare\n /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */\n export enum Type {\n /** An image applied to a surface, with support for mip-mapping and repetition. */\n Normal,\n /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */\n Glyph,\n /** A non-repeating image with no mip-maps, used for example for reality models. */\n TileSection,\n /** A three-dimensional texture used for rendering a skybox. */\n SkyBox,\n /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */\n FilteredTileSection,\n /** A gradient image used for thematic display. */\n ThematicGradient,\n }\n\n /** Parameters used to construct a [[RenderTexture]].\n * @deprecated in 3.x. use RenderSystem.createTexture and TextureCreateArgs.\n * @public\n */\n export class Params {\n /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.\n * Textures created on the front-end generally have no key.\n */\n public readonly key?: string;\n /** Indicates the type of texture. */\n public readonly type: RenderTexture.Type;\n /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.\n * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.\n */\n public readonly isOwned: boolean;\n\n public constructor(key?: string, type: RenderTexture.Type = RenderTexture.Type.Normal, isOwned: boolean = false) {\n this.key = key;\n this.type = type;\n this.isOwned = isOwned;\n }\n\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RgbColor.js","sourceRoot":"","sources":["../../src/RgbColor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAqD;AACrD,yCAAsC;AAYtC;;GAEG;AACH,MAAa,QAAQ;IACnB;;;;OAIG;IACH,YAAmC,CAAS,EAAkB,CAAS,EAAkB,CAAS;QAA/D,MAAC,GAAD,CAAC,CAAQ;QAAkB,MAAC,GAAD,CAAC,CAAQ;QAAkB,MAAC,GAAD,CAAC,CAAQ;QAChG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EA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AC;SACd;QAED,OAAO,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC;IAED,sGAAsG;IAC/F,MAAM,CAAC,KAAe;QAC3B,OAAO,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,+FAA+F;IACxF,SAAS,CAAC,KAAe;QAC9B,OAAO,IAAA,6BAAc,EAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAA,6BAAc,EAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAA,6BAAc,EAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/G,CAAC;IAED,mIAAmI;IAC5H,WAAW;QAChB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;CACF;AAjED,4BAiEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { compareNumbers } from \"@itwin/core-bentley\";\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** JSON representation of an [[RgbColor]], with each component an integer in the range [0, 255].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RgbColorProps {\r\n r: number;\r\n g: number;\r\n b: number;\r\n}\r\n\r\n/** An immutable representation of a color with red, green, and blue components each in the integer range [0, 255].\r\n * @public\r\n */\r\nexport class RgbColor {\r\n /** Constructs from red, green, and blue components.\r\n * @param r Red\r\n * @param g Green\r\n * @param b Blue\r\n */\r\n public constructor(public readonly r: number, public readonly g: number, public readonly b: number) {\r\n this.r = Math.max(0, Math.min(this.r, 0xff));\r\n this.g = Math.max(0, Math.min(this.g, 0xff));\r\n this.b = Math.max(0, Math.min(this.b, 0xff));\r\n }\r\n\r\n /** Constructs from the red, green, and blue components of a ColorDef. The transparency component is ignored. */\r\n public static fromColorDef(colorDef: ColorDef): RgbColor {\r\n const colors = colorDef.colors;\r\n return new RgbColor(colors.r, colors.g, colors.b);\r\n }\r\n\r\n /** Converts this RgbColor to a ColorDef.\r\n * @param transparency Value to use for the transparency component of the ColorDef.\r\n * @param out If defined, this ColorDef will be modified in-place and returned; otherwise a new ColorDef will be allocated.\r\n * @returns A ColorDef with RGB components equivalent to those of this RgbColor and transparency component as specified.\r\n */\r\n public toColorDef(transparency = 0): ColorDef {\r\n return ColorDef.from(this.r, this.g, this.b, transparency);\r\n }\r\n\r\n /** Convert this color to its JSON representation. */\r\n public toJSON(): RgbColorProps {\r\n return { r: this.r, g: this.g, b: this.b };\r\n }\r\n\r\n /** Create an RgbColor from its JSON representation.\r\n * If `json` is `undefined`, the result is pure white.\r\n */\r\n public static fromJSON(json: RgbColorProps | undefined): RgbColor {\r\n let r = 0xff;\r\n let g = 0xff;\r\n let b = 0xff;\r\n if (undefined !== json) {\r\n if (typeof json.r === \"number\")\r\n r = json.r;\r\n if (typeof json.g === \"number\")\r\n g = json.g;\r\n if (typeof json.b === \"number\")\r\n b = json.b;\r\n }\r\n\r\n return new RgbColor(r, g, b);\r\n }\r\n\r\n /** Returns true if this color's red, green, and blue components are identical to those of `other`. */\r\n public equals(other: RgbColor): boolean {\r\n return this.r === other.r && this.g === other.g && this.b === other.b;\r\n }\r\n\r\n /** Compare this color to another color using the rules of an [OrderedComparator]($bentley). */\r\n public compareTo(other: RgbColor): number {\r\n return compareNumbers(this.r, other.r) || compareNumbers(this.g, other.g) || compareNumbers(this.b, other.b);\r\n }\r\n\r\n /** Convert this color to a string in the form \"#rrggbb\" where the values are the hex digits of the respective color components. */\r\n public to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,WAAW;QAChB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;CACF;AAjED,4BAiEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { compareNumbers } from \"@itwin/core-bentley\";\nimport { ColorDef } from \"./ColorDef\";\n\n/** JSON representation of an [[RgbColor]], with each component an integer in the range [0, 255].\n * @public\n * @extensions\n */\nexport interface RgbColorProps {\n r: number;\n g: number;\n b: number;\n}\n\n/** An immutable representation of a color with red, green, and blue components each in the integer range [0, 255].\n * @public\n */\nexport class RgbColor {\n /** Constructs from red, green, and blue components.\n * @param r Red\n * @param g Green\n * @param b Blue\n */\n public constructor(public readonly r: number, public readonly g: number, public readonly b: number) {\n this.r = Math.max(0, Math.min(this.r, 0xff));\n this.g = Math.max(0, Math.min(this.g, 0xff));\n this.b = Math.max(0, Math.min(this.b, 0xff));\n }\n\n /** Constructs from the red, green, and blue components of a ColorDef. The transparency component is ignored. */\n public static fromColorDef(colorDef: ColorDef): RgbColor {\n const colors = colorDef.colors;\n return new RgbColor(colors.r, colors.g, colors.b);\n }\n\n /** Converts this RgbColor to a ColorDef.\n * @param transparency Value to use for the transparency component of the ColorDef.\n * @param out If defined, this ColorDef will be modified in-place and returned; otherwise a new ColorDef will be allocated.\n * @returns A ColorDef with RGB components equivalent to those of this RgbColor and transparency component as specified.\n */\n public toColorDef(transparency = 0): ColorDef {\n return ColorDef.from(this.r, this.g, this.b, transparency);\n }\n\n /** Convert this color to its JSON representation. */\n public toJSON(): RgbColorProps {\n return { r: this.r, g: this.g, b: this.b };\n }\n\n /** Create an RgbColor from its JSON representation.\n * If `json` is `undefined`, the result is pure white.\n */\n public static fromJSON(json: RgbColorProps | undefined): RgbColor {\n let r = 0xff;\n let g = 0xff;\n let b = 0xff;\n if (undefined !== json) {\n if (typeof json.r === \"number\")\n r = json.r;\n if (typeof json.g === \"number\")\n g = json.g;\n if (typeof json.b === \"number\")\n b = json.b;\n }\n\n return new RgbColor(r, g, b);\n }\n\n /** Returns true if this color's red, green, and blue components are identical to those of `other`. */\n public equals(other: RgbColor): boolean {\n return this.r === other.r && this.g === other.g && this.b === other.b;\n }\n\n /** Compare this color to another color using the rules of an [OrderedComparator]($bentley). */\n public compareTo(other: RgbColor): number {\n return compareNumbers(this.r, other.r) || compareNumbers(this.g, other.g) || compareNumbers(this.b, other.b);\n }\n\n /** Convert this color to a string in the form \"#rrggbb\" where the values are the hex digits of the respective color components. */\n public toHexString(): string {\n return this.toColorDef().toHexString();\n }\n}\n"]}
@@ -33,7 +33,7 @@ export declare abstract class RpcInterface {
33
33
  readonly configuration: RpcConfiguration;
34
34
  /** @internal */
35
35
  readonly routing: RpcRoutingToken;
36
- /** @internal */
36
+ /** @beta */
37
37
  constructor(routing?: RpcRoutingToken);
38
38
  /** Obtains the implementation result for an RPC operation. */
39
39
  forward<T = any>(parameters: IArguments): Promise<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"RpcInterface.d.ts","sourceRoot":"","sources":["../../src/RpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAGzF,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAW7D;;;;GAIG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IAAI,SAAS,EAAE,CAAC,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE;AAEhJ;;;GAGG;AACH,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,IAAI,UAAU,CAAC,CAAC;AAS5F;;;GAGG;AACH,8BAAsB,YAAY;IAEhC,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C;IAEhD,gBAAgB;IAChB,SAAgB,OAAO,EAAE,eAAe,CAAC;IAEzC,YAAY;gBACO,OAAO,GAAE,eAAyC;IAKrE,8DAA8D;IACjD,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC;IAgBjE,gBAAgB;IACT,qBAAqB,EAAE,wBAAwB,GAAG,SAAS,CAAC;CACpE"}
@@ -22,41 +22,42 @@ const core_bentley_1 = require("@itwin/core-bentley");
22
22
  */
23
23
  class RpcInterface {
24
24
  static findDiff(backend, frontend) {
25
- return backend.major !== frontend.major ? "major" : backend.minor !== frontend.minor ? "minor" : backend.patch !== frontend.patch ? "patch" : backend.prerelease !== frontend.prerelease ? "prerelease" : "same";
25
+ return backend.major !== frontend.major ? "major" :
26
+ backend.minor !== frontend.minor ? "minor" :
27
+ backend.patch !== frontend.patch ? "patch" :
28
+ backend.prerelease !== frontend.prerelease ? "prerelease" :
29
+ "same";
26
30
  }
27
31
  static parseVer(version) {
28
- // Split the version string into major.minor.path and prerelease tag
29
- const split = version.split(/[:-]/);
30
- // Split the major.minor.path into seperate components
31
- const prefix = split[0].split(".");
32
- if (split.length === 1) {
33
- return { major: Number(prefix[0]), minor: Number(prefix[1]), patch: Number(prefix[2]) };
34
- }
35
- else {
36
- return { major: Number(prefix[0]), minor: Number(prefix[1]), patch: Number(prefix[2]), prerelease: split[1] };
37
- }
32
+ // separate the version from the prerelease tag
33
+ const parts = version.split(/[:-]/);
34
+ // Split the major.minor.path into separate components
35
+ const prefix = parts[0].split(".");
36
+ const ver = { major: Number(prefix[0]), minor: Number(prefix[1]), patch: Number(prefix[2]) };
37
+ if (parts.length > 1)
38
+ ver.prerelease = parts[1];
39
+ return ver;
38
40
  }
39
41
  /** Determines whether the backend version of an RPC interface is compatible (according to semantic versioning) with the frontend version of the interface. */
40
42
  static isVersionCompatible(backend, frontend) {
43
+ if (backend === frontend)
44
+ return true; // most common case, versions are identical
41
45
  const backendSemver = this.parseVer(backend);
42
46
  const frontendSemver = this.parseVer(frontend);
47
+ // if either has a prerelease tag, they are not compatible unless version strings are identical
48
+ if (backendSemver.prerelease || frontendSemver.prerelease)
49
+ return false;
43
50
  const difference = this.findDiff(backendSemver, frontendSemver);
44
51
  // If the major versions are different, the versions are not compatible
45
- // In the case of prerelease tags, they are compatible if the whole version string matches, otherwise it fails
46
- if ((backendSemver.prerelease !== undefined || frontendSemver.prerelease !== undefined) || difference === "major") {
47
- return difference === "same";
48
- }
49
- else if (backendSemver.major === 0 || frontendSemver.major === 0) {
50
- // If the major and minor versions match and major versions are 0, compatible as long as backend patch version is greater
51
- return difference === "same" || (difference === "patch" && frontendSemver.patch < backendSemver.patch);
52
- }
53
- else {
54
- // If the strings match exactly, major and minor match but patch differs, versions are compatible
55
- // If minor versions differ, compatible as long as backend patch versionn is greater
56
- return difference === "same" || difference === "patch" || (difference === "minor" && frontendSemver.minor < backendSemver.minor);
57
- }
52
+ if (difference === "major")
53
+ return false;
54
+ // special case for major version 0. If patch difference, backend patch must be greater than frontend patch
55
+ if (backendSemver.major === 0)
56
+ return (difference === "patch" && frontendSemver.patch < backendSemver.patch);
57
+ // patch difference is fine. If minor versions differ, compatible as long as backend minor version is greater
58
+ return difference === "patch" || (difference === "minor" && frontendSemver.minor < backendSemver.minor);
58
59
  }
59
- /** @internal */
60
+ /** @beta */
60
61
  constructor(routing = RpcRoutingToken_1.RpcRoutingToken.default) {
61
62
  this.routing = routing;
62
63
  this.configuration = RpcConfiguration_1.RpcConfiguration.supply(this);
@@ -1 +1 @@
1
- {"version":3,"file":"RpcInterface.js","sourceRoot":"","sources":["../../src/RpcInterface.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,kEAAyF;AACzF,wDAAyD;AACzD,sDAAkE;AAClE,gEAA6D;AAC7D,iDAAqE;AAGrE,+CAA2E;AAC3E,0DAA4E;AAC5E,sDAAiD;AAyBjD;;;GAGG;AACH,MAAsB,Y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C,QAAQ,CAAC,CAAC;aACnB;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,CAAC,GAAG,CAAC,CAAC;aACb;QACH,CAAC,EAAE,MAAM,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,eAAe;IAC5B,MAAM,IAAI,4BAAc,EAAE,CAAC;AAC7B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\nimport { RpcConfiguration, RpcConfigurationSupplier } from \"./rpc/core/RpcConfiguration\";\r\nimport { CURRENT_REQUEST } from \"./rpc/core/RpcRegistry\";\r\nimport { aggregateLoad, RpcRequest } from \"./rpc/core/RpcRequest\";\r\nimport { RpcRoutingToken } from \"./rpc/core/RpcRoutingToken\";\r\nimport { InterceptedRpcRequest, IpcSession } from \"./ipc/IpcSession\";\r\nimport { RpcSerializedValue } from \"./rpc/core/RpcMarshaling\";\r\nimport { RpcManagedStatus } from \"./rpc/core/RpcProtocol\";\r\nimport { BentleyStatus, IModelError, NoContentError } from \"./IModelError\";\r\nimport { RpcRequestEvent, RpcRequestStatus } from \"./rpc/core/RpcConstants\";\r\nimport { BeDuration } from \"@itwin/core-bentley\";\r\nimport { RpcNotFoundResponse } from \"./rpc/core/RpcControl\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/**\r\n * Specifies the required static properties of an RpcInterface class.\r\n * These properties are used to identify RPC requests and responses.\r\n * @beta\r\n */\r\nexport interface RpcInterfaceDefinition<T extends RpcInterface = RpcInterface> { prototype: T, interfaceName: string, interfaceVersion: string }\r\n\r\n/**\r\n * A class that implements the operations of an RPC interface.\r\n * @beta\r\n */\r\nexport type RpcInterfaceImplementation<T extends RpcInterface = RpcInterface> = new () => T;\r\n\r\ninterface SemverType {\r\n major: number;\r\n minor: number;\r\n patch: number;\r\n prerelease?: string;\r\n}\r\n\r\n/** An RPC interface is a set of operations exposed by a service that a client can call, using configurable protocols,\r\n * in a platform-independent way. TheRpcInterface class is the base class for RPC interface definitions and implementations.\r\n * @public\r\n */\r\nexport abstract class RpcInterface {\r\n\r\n private static findDiff(backend: SemverType, frontend: SemverType) {\r\n return backend.major !== frontend.major ? \"major\" : backend.minor !== frontend.minor ? \"minor\" : backend.patch !== frontend.patch ? \"patch\" : backend.prerelease !== frontend.prerelease ? \"prerelease\" : \"same\";\r\n }\r\n\r\n private static parseVer(version: string): SemverType {\r\n // Split the version string into major.minor.path and prerelease tag\r\n const split = version.split(/[:-]/);\r\n // Split the major.minor.path into seperate components\r\n const prefix = split[0].split(\".\");\r\n if (split.length === 1) {\r\n return { major: Number(prefix[0]), minor: Number(prefix[1]), patch: Number(prefix[2]) };\r\n } else {\r\n return { major: Number(prefix[0]), minor: Number(prefix[1]), patch: Number(prefix[2]), prerelease: split[1] };\r\n }\r\n }\r\n\r\n /** Determines whether the backend version of an RPC interface is compatible (according to semantic versioning) with the frontend version of the interface. */\r\n public static isVersionCompatible(backend: string, frontend: string): boolean {\r\n const backendSemver = this.parseVer(backend);\r\n const frontendSemver = this.parseVer(frontend);\r\n const difference = this.findDiff(backendSemver, frontendSemver);\r\n\r\n // If the major versions are different, the versions are not compatible\r\n // In the case of prerelease tags, they are compatible if the whole version string matches, otherwise it fails\r\n if ((backendSemver.prerelease !== undefined || frontendSemver.prerelease !== undefined) || difference === \"major\") {\r\n return difference === \"same\";\r\n } else if (backendSemver.major === 0 || frontendSemver.major === 0) {\r\n // If the major and minor versions match and major versions are 0, compatible as long as backend patch version is greater\r\n return difference === \"same\" || (difference === \"patch\" && frontendSemver.patch < backendSemver.patch);\r\n } else {\r\n // If the strings match exactly, major and minor match but patch differs, versions are compatible\r\n // If minor versions differ, compatible as long as backend patch versionn is greater\r\n return difference === \"same\" || difference === \"patch\" || (difference === \"minor\" && frontendSemver.minor < backendSemver.minor);\r\n }\r\n }\r\n\r\n /** The configuration for the RPC interface.\r\n * @internal\r\n */\r\n public readonly configuration: RpcConfiguration;\r\n\r\n /** @internal */\r\n public readonly routing: RpcRoutingToken;\r\n\r\n /** @internal */\r\n public constructor(routing: RpcRoutingToken = RpcRoutingToken.default) {\r\n this.routing = routing;\r\n this.configuration = RpcConfiguration.supply(this);\r\n }\r\n\r\n /** Obtains the implementation result for an RPC operation. */\r\n public async forward<T = any>(parameters: IArguments): Promise<T> {\r\n const parametersCompat = (arguments.length === 1 && typeof (parameters) === \"object\") ? parameters : arguments;\r\n const parametersArray = Array.isArray(parametersCompat) ? parametersCompat : Array.prototype.slice.call(parametersCompat);\r\n const operationName = parametersArray.pop();\r\n\r\n const session = IpcSession.active;\r\n if (session) {\r\n return intercept(session, this, operationName, parametersArray);\r\n } else {\r\n const request = new (this.configuration.protocol.requestType as any)(this, operationName, parametersArray) as RpcRequest;\r\n request.submit(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n (this as any)[CURRENT_REQUEST] = request;\r\n return request.response;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public configurationSupplier: RpcConfigurationSupplier | undefined;\r\n}\r\n\r\nRpcInterface.prototype.configurationSupplier = undefined;\r\n\r\nclass InterceptedRequest extends RpcRequest {\r\n protected override async load(): Promise<RpcSerializedValue> { throw new Error(); }\r\n protected override async send(): Promise<number> { throw new Error(); }\r\n protected override setHeader(_name: string, _value: string): void { throw new Error(); }\r\n}\r\n\r\nasync function intercept(session: IpcSession, client: RpcInterface, operation: string, parameters: any[]) {\r\n const request = new InterceptedRequest(client, operation, []);\r\n (client as any)[CURRENT_REQUEST] = request;\r\n\r\n const context = await client.configuration.protocol.serialize(request);\r\n request.parameters = parameters;\r\n\r\n const info: InterceptedRpcRequest = {\r\n definition: {\r\n interfaceName: context.operation.interfaceDefinition,\r\n interfaceVersion: context.operation.interfaceVersion,\r\n },\r\n operation,\r\n parameters,\r\n context: {\r\n applicationId: context.applicationId,\r\n applicationVersion: context.applicationVersion,\r\n id: context.id,\r\n sessionId: context.sessionId,\r\n protocolVersion: (context.protocolVersion || 0).toString(),\r\n },\r\n };\r\n\r\n const dispatch = async () => {\r\n aggregateLoad.lastRequest = new Date().getTime();\r\n\r\n const response = await session.handleRpc(info);\r\n\r\n aggregateLoad.lastResponse = new Date().getTime();\r\n\r\n if (typeof (response) === \"object\" && response.hasOwnProperty(\"iTwinRpcCoreResponse\") && response.hasOwnProperty(\"managedStatus\")) {\r\n const status: RpcManagedStatus = response;\r\n\r\n if (status.managedStatus === \"pending\") {\r\n return handlePending(request, status, dispatch);\r\n } else if (status.managedStatus === \"notFound\") {\r\n return handleNotFound(request, status, dispatch);\r\n } else if (status.managedStatus === \"noContent\") {\r\n return handleNoContent();\r\n }\r\n } else {\r\n return response;\r\n }\r\n };\r\n\r\n return dispatch();\r\n}\r\n\r\nasync function handlePending(request: InterceptedRequest, status: RpcManagedStatus, dispatch: () => Promise<any>) {\r\n request._status = RpcRequestStatus.Pending;\r\n request._extendedStatus = (status.responseValue as { message: string }).message;\r\n RpcRequest.events.raiseEvent(RpcRequestEvent.PendingUpdateReceived, request);\r\n\r\n const delay = request.operation.policy.retryInterval(request.client.configuration);\r\n\r\n await BeDuration.wait(delay);\r\n return dispatch();\r\n}\r\n\r\nasync function handleNotFound(request: InterceptedRequest, status: RpcManagedStatus, dispatch: () => Promise<any>) {\r\n return new Promise((resolve, reject) => {\r\n let resubmitted = false;\r\n\r\n RpcRequest.notFoundHandlers.raiseEvent(request, status.responseValue as RpcNotFoundResponse, async () => {\r\n if (resubmitted) {\r\n throw new IModelError(BentleyStatus.ERROR, `Already resubmitted using this handler.`);\r\n }\r\n\r\n resubmitted = true;\r\n\r\n try {\r\n const response = await dispatch();\r\n resolve(response);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n }, reject);\r\n });\r\n}\r\n\r\nasync function handleNoContent() {\r\n throw new NoContentError();\r\n}\r\n"]}
1
+ {"version":3,"file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AC,QAAQ,CAAC,CAAC;aACnB;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,CAAC,GAAG,CAAC,CAAC;aACb;QACH,CAAC,EAAE,MAAM,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,eAAe;IAC5B,MAAM,IAAI,4BAAc,EAAE,CAAC;AAC7B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RpcInterface\n */\nimport { RpcConfiguration, RpcConfigurationSupplier } from \"./rpc/core/RpcConfiguration\";\nimport { CURRENT_REQUEST } from \"./rpc/core/RpcRegistry\";\nimport { aggregateLoad, RpcRequest } from \"./rpc/core/RpcRequest\";\nimport { RpcRoutingToken } from \"./rpc/core/RpcRoutingToken\";\nimport { InterceptedRpcRequest, IpcSession } from \"./ipc/IpcSession\";\nimport { RpcSerializedValue } from \"./rpc/core/RpcMarshaling\";\nimport { RpcManagedStatus } from \"./rpc/core/RpcProtocol\";\nimport { BentleyStatus, IModelError, NoContentError } from \"./IModelError\";\nimport { RpcRequestEvent, RpcRequestStatus } from \"./rpc/core/RpcConstants\";\nimport { BeDuration } from \"@itwin/core-bentley\";\nimport { RpcNotFoundResponse } from \"./rpc/core/RpcControl\";\n\n/* eslint-disable deprecation/deprecation */\n\n/**\n * Specifies the required static properties of an RpcInterface class.\n * These properties are used to identify RPC requests and responses.\n * @beta\n */\nexport interface RpcInterfaceDefinition<T extends RpcInterface = RpcInterface> { prototype: T, interfaceName: string, interfaceVersion: string }\n\n/**\n * A class that implements the operations of an RPC interface.\n * @beta\n */\nexport type RpcInterfaceImplementation<T extends RpcInterface = RpcInterface> = new () => T;\n\ninterface SemverType {\n major: number;\n minor: number;\n patch: number;\n prerelease?: string;\n}\n\n/** An RPC interface is a set of operations exposed by a service that a client can call, using configurable protocols,\n * in a platform-independent way. TheRpcInterface class is the base class for RPC interface definitions and implementations.\n * @public\n */\nexport abstract class RpcInterface {\n\n private static findDiff(backend: SemverType, frontend: SemverType) {\n return backend.major !== frontend.major ? \"major\" :\n backend.minor !== frontend.minor ? \"minor\" :\n backend.patch !== frontend.patch ? \"patch\" :\n backend.prerelease !== frontend.prerelease ? \"prerelease\" :\n \"same\";\n }\n\n private static parseVer(version: string): SemverType {\n // separate the version from the prerelease tag\n const parts = version.split(/[:-]/);\n // Split the major.minor.path into separate components\n const prefix = parts[0].split(\".\");\n\n const ver: SemverType = { major: Number(prefix[0]), minor: Number(prefix[1]), patch: Number(prefix[2]) };\n if (parts.length > 1)\n ver.prerelease = parts[1];\n return ver;\n }\n\n /** Determines whether the backend version of an RPC interface is compatible (according to semantic versioning) with the frontend version of the interface. */\n public static isVersionCompatible(backend: string, frontend: string): boolean {\n if (backend === frontend)\n return true; // most common case, versions are identical\n\n const backendSemver = this.parseVer(backend);\n const frontendSemver = this.parseVer(frontend);\n\n // if either has a prerelease tag, they are not compatible unless version strings are identical\n if (backendSemver.prerelease || frontendSemver.prerelease)\n return false;\n\n const difference = this.findDiff(backendSemver, frontendSemver);\n // If the major versions are different, the versions are not compatible\n if (difference === \"major\")\n return false;\n\n // special case for major version 0. If patch difference, backend patch must be greater than frontend patch\n if (backendSemver.major === 0)\n return (difference === \"patch\" && frontendSemver.patch < backendSemver.patch);\n\n // patch difference is fine. If minor versions differ, compatible as long as backend minor version is greater\n return difference === \"patch\" || (difference === \"minor\" && frontendSemver.minor < backendSemver.minor);\n }\n\n /** The configuration for the RPC interface.\n * @internal\n */\n public readonly configuration: RpcConfiguration;\n\n /** @internal */\n public readonly routing: RpcRoutingToken;\n\n /** @beta */\n public constructor(routing: RpcRoutingToken = RpcRoutingToken.default) {\n this.routing = routing;\n this.configuration = RpcConfiguration.supply(this);\n }\n\n /** Obtains the implementation result for an RPC operation. */\n public async forward<T = any>(parameters: IArguments): Promise<T> {\n const parametersCompat = (arguments.length === 1 && typeof (parameters) === \"object\") ? parameters : arguments;\n const parametersArray = Array.isArray(parametersCompat) ? parametersCompat : Array.prototype.slice.call(parametersCompat);\n const operationName = parametersArray.pop();\n\n const session = IpcSession.active;\n if (session) {\n return intercept(session, this, operationName, parametersArray);\n } else {\n const request = new (this.configuration.protocol.requestType as any)(this, operationName, parametersArray) as RpcRequest;\n request.submit(); // eslint-disable-line @typescript-eslint/no-floating-promises\n (this as any)[CURRENT_REQUEST] = request;\n return request.response;\n }\n }\n\n /** @internal */\n public configurationSupplier: RpcConfigurationSupplier | undefined;\n}\n\nRpcInterface.prototype.configurationSupplier = undefined;\n\nclass InterceptedRequest extends RpcRequest {\n protected override async load(): Promise<RpcSerializedValue> { throw new Error(); }\n protected override async send(): Promise<number> { throw new Error(); }\n protected override setHeader(_name: string, _value: string): void { throw new Error(); }\n}\n\nasync function intercept(session: IpcSession, client: RpcInterface, operation: string, parameters: any[]) {\n const request = new InterceptedRequest(client, operation, []);\n (client as any)[CURRENT_REQUEST] = request;\n\n const context = await client.configuration.protocol.serialize(request);\n request.parameters = parameters;\n\n const info: InterceptedRpcRequest = {\n definition: {\n interfaceName: context.operation.interfaceDefinition,\n interfaceVersion: context.operation.interfaceVersion,\n },\n operation,\n parameters,\n context: {\n applicationId: context.applicationId,\n applicationVersion: context.applicationVersion,\n id: context.id,\n sessionId: context.sessionId,\n protocolVersion: (context.protocolVersion || 0).toString(),\n },\n };\n\n const dispatch = async () => {\n aggregateLoad.lastRequest = new Date().getTime();\n\n const response = await session.handleRpc(info);\n\n aggregateLoad.lastResponse = new Date().getTime();\n\n if (typeof (response) === \"object\" && response.hasOwnProperty(\"iTwinRpcCoreResponse\") && response.hasOwnProperty(\"managedStatus\")) {\n const status: RpcManagedStatus = response;\n\n if (status.managedStatus === \"pending\") {\n return handlePending(request, status, dispatch);\n } else if (status.managedStatus === \"notFound\") {\n return handleNotFound(request, status, dispatch);\n } else if (status.managedStatus === \"noContent\") {\n return handleNoContent();\n }\n } else {\n return response;\n }\n };\n\n return dispatch();\n}\n\nasync function handlePending(request: InterceptedRequest, status: RpcManagedStatus, dispatch: () => Promise<any>) {\n request._status = RpcRequestStatus.Pending;\n request._extendedStatus = (status.responseValue as { message: string }).message;\n RpcRequest.events.raiseEvent(RpcRequestEvent.PendingUpdateReceived, request);\n\n const delay = request.operation.policy.retryInterval(request.client.configuration);\n\n await BeDuration.wait(delay);\n return dispatch();\n}\n\nasync function handleNotFound(request: InterceptedRequest, status: RpcManagedStatus, dispatch: () => Promise<any>) {\n return new Promise((resolve, reject) => {\n let resubmitted = false;\n\n RpcRequest.notFoundHandlers.raiseEvent(request, status.responseValue as RpcNotFoundResponse, async () => {\n if (resubmitted) {\n throw new IModelError(BentleyStatus.ERROR, `Already resubmitted using this handler.`);\n }\n\n resubmitted = true;\n\n try {\n const response = await dispatch();\n resolve(response);\n } catch (err) {\n reject(err);\n }\n }, reject);\n });\n}\n\nasync function handleNoContent() {\n throw new NoContentError();\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RpcManager.js","sourceRoot":"","sources":["../../src/RpcManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,0DAAuD;AACvD,wDAAqD;AAErD,gEAA6D;AAc7D;;GAEG;AACH,MAAa,UAAU;IACrB;;OAEG;IACI,MAAM,CAAC,mBAAmB,CAAyB,UAAqC;QAC7F,yBAAW,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC1D,CAAC;IAED,yCAAyC;IAClC,MAAM,CAAC,kBAAkB,CAAyB,UAAqC;QAC5F,yBAAW,CAAC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACzD,CAAC;IAED,wDAAwD;IACjD,MAAM,CAAC,qBAAqB,CAAyB,UAAqC,EAAE,UAA2B,iCAAe,CAAC,OAAO;QACnJ,OAAO,yBAAW,CAAC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED,6DAA6D;IACtD,MAAM,CAAC,YAAY,CAAwE,UAA+C,EAAE,cAA2D;QAC5M,yBAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAChE,CAAC;IAED,gGAAgG;IACzF,MAAM,CAAC,kBAAkB,CAAwE,UAA+C,EAAE,QAAyB;QAChL,yBAAW,CAAC,QAAQ,CAAC,kBAAkB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAChE,CAAC;IAED,+DAA+D;IACxD,MAAM,CAAC,cAAc,CAAmC,UAA+C;QAC5G,yBAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,0BAA0B;QAC5C,OAAO,yBAAW,CAAC,QAAQ,CAAC,0BAA0B,EAAE,CAAC;IAC3D,CAAC;IAED,gFAAgF;IACzE,MAAM,CAAC,SAAS,CAAC,KAAqB;QAC3C,2BAAY,CAAC,aAAa,GAAG,KAAK,CAAC;IACrC,CAAC;CACF;AA5CD,gCA4CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { IModelRpcProps } from \"./IModel\";\r\nimport { RpcOperation } from \"./rpc/core/RpcOperation\";\r\nimport { RpcRegistry } from \"./rpc/core/RpcRegistry\";\r\nimport { RpcInterface, RpcInterfaceDefinition, RpcInterfaceImplementation } from \"./RpcInterface\";\r\nimport { RpcRoutingToken } from \"./rpc/core/RpcRoutingToken\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Describes the endpoints of an RPC interface.\r\n * @beta\r\n */\r\nexport interface RpcInterfaceEndpoints {\r\n interfaceName: string;\r\n interfaceVersion: string;\r\n operationNames: string[];\r\n compatible: boolean;\r\n}\r\n\r\n/** RPC interface management is concerned with coordination of access and configuration for RPC interfaces.\r\n * @beta\r\n */\r\nexport class RpcManager {\r\n /** Initializes an RPC interface class.\r\n * @note This function must be called on the frontend and on the backend for each RPC interface class used by an application.\r\n */\r\n public static initializeInterface<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>): void {\r\n RpcRegistry.instance.initializeRpcInterface(definition);\r\n }\r\n\r\n /** Terminates an RPC interface class. */\r\n public static terminateInterface<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>): void {\r\n RpcRegistry.instance.terminateRpcInterface(definition);\r\n }\r\n\r\n /** Returns the RPC client instance for the frontend. */\r\n public static getClientForInterface<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>, routing: RpcRoutingToken = RpcRoutingToken.default): T {\r\n return RpcRegistry.instance.getClientForInterface(definition, routing);\r\n }\r\n\r\n /** Register the RPC implementation class for the backend. */\r\n public static registerImpl<TDefinition extends RpcInterface, TImplementation extends TDefinition>(definition: RpcInterfaceDefinition<TDefinition>, implementation: RpcInterfaceImplementation<TImplementation>): void {\r\n RpcRegistry.instance.registerImpl(definition, implementation);\r\n }\r\n\r\n /** Supply the instance of the RPC interface implementation class for the backend (optional). */\r\n public static supplyImplInstance<TDefinition extends RpcInterface, TImplementation extends TDefinition>(definition: RpcInterfaceDefinition<TDefinition>, instance: TImplementation): void {\r\n RpcRegistry.instance.supplyImplInstance(definition, instance);\r\n }\r\n\r\n /** Unregister the RPC implementation class for the backend. */\r\n public static unregisterImpl<TDefinition extends RpcInterface>(definition: RpcInterfaceDefinition<TDefinition>): void {\r\n RpcRegistry.instance.unregisterImpl(definition);\r\n }\r\n\r\n /** Describes the RPC interfaces and endpoints that are currently available from the backend.\r\n * @note Some endpoints may be marked incompatible if the frontend expected a different interface declaration than the backend supplied. RPC operations against an incompatible interface will fail.\r\n */\r\n public static async describeAvailableEndpoints(): Promise<RpcInterfaceEndpoints[]> {\r\n return RpcRegistry.instance.describeAvailableEndpoints();\r\n }\r\n\r\n /** Configures RPC protocols that employ iModel-based routing infrastructure. */\r\n public static setIModel(props: IModelRpcProps) {\r\n RpcOperation.fallbackToken = props;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"RpcManager.js","sourceRoot":"","sources":["../../src/RpcManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,0DAAuD;AACvD,wDAAqD;AAErD,gEAA6D;AAc7D;;GAEG;AACH,MAAa,UAAU;IACrB;;OAEG;IACI,MAAM,CAAC,mBAAmB,CAAyB,UAAqC;QAC7F,yBAAW,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC1D,CAAC;IAED,yCAAyC;IAClC,MAAM,CAAC,kBAAkB,CAAyB,UAAqC;QAC5F,yBAAW,CAAC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACzD,CAAC;IAED,wDAAwD;IACjD,MAAM,CAAC,qBAAqB,CAAyB,UAAqC,EAAE,UAA2B,iCAAe,CAAC,OAAO;QACnJ,OAAO,yBAAW,CAAC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED,6DAA6D;IACtD,MAAM,CAAC,YAAY,CAAwE,UAA+C,EAAE,cAA2D;QAC5M,yBAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAChE,CAAC;IAED,gGAAgG;IACzF,MAAM,CAAC,kBAAkB,CAAwE,UAA+C,EAAE,QAAyB;QAChL,yBAAW,CAAC,QAAQ,CAAC,kBAAkB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAChE,CAAC;IAED,+DAA+D;IACxD,MAAM,CAAC,cAAc,CAAmC,UAA+C;QAC5G,yBAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,0BAA0B;QAC5C,OAAO,yBAAW,CAAC,QAAQ,CAAC,0BAA0B,EAAE,CAAC;IAC3D,CAAC;IAED,gFAAgF;IACzE,MAAM,CAAC,SAAS,CAAC,KAAqB;QAC3C,2BAAY,CAAC,aAAa,GAAG,KAAK,CAAC;IACrC,CAAC;CACF;AA5CD,gCA4CC","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 RpcInterface\n */\n\nimport { IModelRpcProps } from \"./IModel\";\nimport { RpcOperation } from \"./rpc/core/RpcOperation\";\nimport { RpcRegistry } from \"./rpc/core/RpcRegistry\";\nimport { RpcInterface, RpcInterfaceDefinition, RpcInterfaceImplementation } from \"./RpcInterface\";\nimport { RpcRoutingToken } from \"./rpc/core/RpcRoutingToken\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Describes the endpoints of an RPC interface.\n * @beta\n */\nexport interface RpcInterfaceEndpoints {\n interfaceName: string;\n interfaceVersion: string;\n operationNames: string[];\n compatible: boolean;\n}\n\n/** RPC interface management is concerned with coordination of access and configuration for RPC interfaces.\n * @beta\n */\nexport class RpcManager {\n /** Initializes an RPC interface class.\n * @note This function must be called on the frontend and on the backend for each RPC interface class used by an application.\n */\n public static initializeInterface<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>): void {\n RpcRegistry.instance.initializeRpcInterface(definition);\n }\n\n /** Terminates an RPC interface class. */\n public static terminateInterface<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>): void {\n RpcRegistry.instance.terminateRpcInterface(definition);\n }\n\n /** Returns the RPC client instance for the frontend. */\n public static getClientForInterface<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>, routing: RpcRoutingToken = RpcRoutingToken.default): T {\n return RpcRegistry.instance.getClientForInterface(definition, routing);\n }\n\n /** Register the RPC implementation class for the backend. */\n public static registerImpl<TDefinition extends RpcInterface, TImplementation extends TDefinition>(definition: RpcInterfaceDefinition<TDefinition>, implementation: RpcInterfaceImplementation<TImplementation>): void {\n RpcRegistry.instance.registerImpl(definition, implementation);\n }\n\n /** Supply the instance of the RPC interface implementation class for the backend (optional). */\n public static supplyImplInstance<TDefinition extends RpcInterface, TImplementation extends TDefinition>(definition: RpcInterfaceDefinition<TDefinition>, instance: TImplementation): void {\n RpcRegistry.instance.supplyImplInstance(definition, instance);\n }\n\n /** Unregister the RPC implementation class for the backend. */\n public static unregisterImpl<TDefinition extends RpcInterface>(definition: RpcInterfaceDefinition<TDefinition>): void {\n RpcRegistry.instance.unregisterImpl(definition);\n }\n\n /** Describes the RPC interfaces and endpoints that are currently available from the backend.\n * @note Some endpoints may be marked incompatible if the frontend expected a different interface declaration than the backend supplied. RPC operations against an incompatible interface will fail.\n */\n public static async describeAvailableEndpoints(): Promise<RpcInterfaceEndpoints[]> {\n return RpcRegistry.instance.describeAvailableEndpoints();\n }\n\n /** Configures RPC protocols that employ iModel-based routing infrastructure. */\n public static setIModel(props: IModelRpcProps) {\n RpcOperation.fallbackToken = props;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SessionProps.js","sourceRoot":"","sources":["../../src/SessionProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { GuidString } from \"@itwin/core-bentley\";\r\n\r\n/** Properties that identify a session.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SessionProps {\r\n /** Used for logging and usage tracking to identify the application */\r\n readonly applicationId: string;\r\n\r\n /** Used for logging and usage tracking to identify the application version */\r\n readonly applicationVersion: string;\r\n\r\n /** Used for logging to identify a session */\r\n readonly sessionId: GuidString;\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"SessionProps.js","sourceRoot":"","sources":["../../src/SessionProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RpcInterface\n */\n\nimport { GuidString } from \"@itwin/core-bentley\";\n\n/** Properties that identify a session.\n * @public\n * @extensions\n */\nexport interface SessionProps {\n /** Used for logging and usage tracking to identify the application */\n readonly applicationId: string;\n\n /** Used for logging and usage tracking to identify the application version */\n readonly applicationVersion: string;\n\n /** Used for logging to identify a session */\n readonly sessionId: GuidString;\n}\n\n"]}
@@ -193,7 +193,7 @@ export declare class SkySphere extends SkyBox {
193
193
  * @param gradient Optionally overrides the default gradient settings used if the image cannot be obtained.
194
194
  */
195
195
  constructor(image: TextureImageSpec, gradient?: SkyGradient);
196
- /** @internal override */
196
+ /** See [[SkyBox.toJSON]]. */
197
197
  toJSON(display?: boolean): SkyBoxProps;
198
198
  /** @internal */
199
199
  get textureIds(): Iterable<Id64String>;
@@ -207,10 +207,10 @@ export declare class SkyCube extends SkyBox {
207
207
  readonly images: SkyCubeProps;
208
208
  /** Create a new sky cube using the specified images.
209
209
  * @param images The images to map to each face of the cube.
210
- * @param Optionally overrides the default gradient settings used if the images cannot be obtained.
210
+ * @param gradient Optionally overrides the default gradient settings used if the images cannot be obtained.
211
211
  */
212
212
  constructor(images: SkyCubeProps, gradient?: SkyGradient);
213
- /** @internal override */
213
+ /** See [[SkyBox.toJSON]]. */
214
214
  toJSON(display?: boolean): SkyBoxProps;
215
215
  /** @internal */
216
216
  get textureIds(): Iterable<Id64String>;
@@ -1 +1 @@
1
- {"version":3,"file":"SkyBox.d.ts","sourceRoot":"","sources":["../../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AI3C,kDAAkD;IAClD,gBAAuB,QAAQ,SAAoC;IAEnE,yGAAyG;WAC3F,cAAc,CAAC,QAAQ,CAAC,EAAE,WAAW,GAAG,MAAM;IAI5D,uCAAuC;WACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM;IAuBnD;;OAEG;IACI,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW;IAQ7C,gBAAgB;IAChB,IAAW,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,CAE5C;CACF;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,MAAM;IACnC,sDAAsD;IACtD,SAAgB,KAAK,EAAE,gBAAgB,CAAC;IAExC;;;OAGG;gBACgB,KAAK,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,WAAW;IAKlE,6BAA6B;IACb,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW;IAUtD,gBAAgB;IAChB,IAAoB,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,CAErD;CACF;AAED;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,MAAM;IACjC,kDAAkD;IAClD,SAAgB,MAAM,EAAE,YAAY,CAAC;IAErC;;;OAGG;gBACgB,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,WAAW;IAK/D,6BAA6B;IACb,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW;IAUtD,gBAAgB;IAChB,IAAoB,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,CAGrD;CACF"}
package/lib/cjs/SkyBox.js CHANGED
@@ -163,7 +163,7 @@ class SkySphere extends SkyBox {
163
163
  super(gradient ?? SkyGradient.defaults);
164
164
  this.image = image;
165
165
  }
166
- /** @internal override */
166
+ /** See [[SkyBox.toJSON]]. */
167
167
  toJSON(display) {
168
168
  const props = super.toJSON(display);
169
169
  props.image = {
@@ -185,13 +185,13 @@ exports.SkySphere = SkySphere;
185
185
  class SkyCube extends SkyBox {
186
186
  /** Create a new sky cube using the specified images.
187
187
  * @param images The images to map to each face of the cube.
188
- * @param Optionally overrides the default gradient settings used if the images cannot be obtained.
188
+ * @param gradient Optionally overrides the default gradient settings used if the images cannot be obtained.
189
189
  */
190
190
  constructor(images, gradient) {
191
191
  super(gradient ?? SkyGradient.defaults);
192
192
  this.images = { ...images };
193
193
  }
194
- /** @internal override */
194
+ /** See [[SkyBox.toJSON]]. */
195
195
  toJSON(display) {
196
196
  const props = super.toJSON(display);
197
197
  props.image = {