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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (724) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/lib/cjs/AmbientOcclusion.js +17 -9
  3. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  4. package/lib/cjs/AnalysisStyle.d.ts +0 -3
  5. package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
  6. package/lib/cjs/AnalysisStyle.js +20 -4
  7. package/lib/cjs/AnalysisStyle.js.map +1 -1
  8. package/lib/cjs/Atmosphere.js +39 -21
  9. package/lib/cjs/Atmosphere.js.map +1 -1
  10. package/lib/cjs/BackgroundMapProvider.js +4 -0
  11. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  12. package/lib/cjs/BackgroundMapSettings.js +19 -0
  13. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  14. package/lib/cjs/BlobReader.js +8 -6
  15. package/lib/cjs/BlobReader.js.map +1 -1
  16. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  17. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  18. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  19. package/lib/cjs/Camera.js +3 -0
  20. package/lib/cjs/Camera.js.map +1 -1
  21. package/lib/cjs/ChangesetProps.d.ts +1 -1
  22. package/lib/cjs/ChangesetProps.js.map +1 -1
  23. package/lib/cjs/ClipStyle.js +31 -5
  24. package/lib/cjs/ClipStyle.js.map +1 -1
  25. package/lib/cjs/Code.d.ts +0 -5
  26. package/lib/cjs/Code.d.ts.map +1 -1
  27. package/lib/cjs/Code.js +16 -11
  28. package/lib/cjs/Code.js.map +1 -1
  29. package/lib/cjs/ColorDef.js +11 -10
  30. package/lib/cjs/ColorDef.js.map +1 -1
  31. package/lib/cjs/ConcurrentQuery.d.ts +37 -1
  32. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  33. package/lib/cjs/ConcurrentQuery.js +16 -3
  34. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  35. package/lib/cjs/ContextRealityModel.js +53 -27
  36. package/lib/cjs/ContextRealityModel.js.map +1 -1
  37. package/lib/cjs/ContourDisplay.js +40 -5
  38. package/lib/cjs/ContourDisplay.js.map +1 -1
  39. package/lib/cjs/DisplayStyleSettings.js +95 -63
  40. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  41. package/lib/cjs/ECSqlReader.d.ts +2 -0
  42. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  43. package/lib/cjs/ECSqlReader.js +56 -50
  44. package/lib/cjs/ECSqlReader.js.map +1 -1
  45. package/lib/cjs/ElementProps.d.ts.map +1 -1
  46. package/lib/cjs/ElementProps.js +7 -3
  47. package/lib/cjs/ElementProps.js.map +1 -1
  48. package/lib/cjs/EntityProps.js +31 -0
  49. package/lib/cjs/EntityProps.js.map +1 -1
  50. package/lib/cjs/Environment.js +25 -2
  51. package/lib/cjs/Environment.js.map +1 -1
  52. package/lib/cjs/FeatureIndex.js +15 -6
  53. package/lib/cjs/FeatureIndex.js.map +1 -1
  54. package/lib/cjs/FeatureSymbology.d.ts +25 -73
  55. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  56. package/lib/cjs/FeatureSymbology.js +88 -103
  57. package/lib/cjs/FeatureSymbology.js.map +1 -1
  58. package/lib/cjs/FeatureTable.d.ts +6 -108
  59. package/lib/cjs/FeatureTable.d.ts.map +1 -1
  60. package/lib/cjs/FeatureTable.js +13 -329
  61. package/lib/cjs/FeatureTable.js.map +1 -1
  62. package/lib/cjs/Fonts.d.ts +68 -10
  63. package/lib/cjs/Fonts.d.ts.map +1 -1
  64. package/lib/cjs/Fonts.js +19 -4
  65. package/lib/cjs/Fonts.js.map +1 -1
  66. package/lib/cjs/Frustum.js +2 -2
  67. package/lib/cjs/Frustum.js.map +1 -1
  68. package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
  69. package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
  70. package/lib/cjs/GeoCoordinateServices.js +2 -1
  71. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  72. package/lib/cjs/GeometryParams.js +58 -0
  73. package/lib/cjs/GeometryParams.js.map +1 -1
  74. package/lib/cjs/Gradient.d.ts +3 -4
  75. package/lib/cjs/Gradient.d.ts.map +1 -1
  76. package/lib/cjs/Gradient.js +21 -19
  77. package/lib/cjs/Gradient.js.map +1 -1
  78. package/lib/cjs/GraphicParams.js +14 -12
  79. package/lib/cjs/GraphicParams.js.map +1 -1
  80. package/lib/cjs/GroundPlane.js +8 -2
  81. package/lib/cjs/GroundPlane.js.map +1 -1
  82. package/lib/cjs/HSLColor.js +6 -0
  83. package/lib/cjs/HSLColor.js.map +1 -1
  84. package/lib/cjs/HSVColor.js +6 -0
  85. package/lib/cjs/HSVColor.js.map +1 -1
  86. package/lib/cjs/HiddenLine.d.ts +17 -18
  87. package/lib/cjs/HiddenLine.d.ts.map +1 -1
  88. package/lib/cjs/HiddenLine.js +24 -5
  89. package/lib/cjs/HiddenLine.js.map +1 -1
  90. package/lib/cjs/Hilite.js +10 -0
  91. package/lib/cjs/Hilite.js.map +1 -1
  92. package/lib/cjs/IModel.d.ts +3 -12
  93. package/lib/cjs/IModel.d.ts.map +1 -1
  94. package/lib/cjs/IModel.js +47 -23
  95. package/lib/cjs/IModel.js.map +1 -1
  96. package/lib/cjs/IModelError.d.ts +0 -2
  97. package/lib/cjs/IModelError.d.ts.map +1 -1
  98. package/lib/cjs/IModelError.js +3 -8
  99. package/lib/cjs/IModelError.js.map +1 -1
  100. package/lib/cjs/IModelVersion.js +4 -0
  101. package/lib/cjs/IModelVersion.js.map +1 -1
  102. package/lib/cjs/ITwinError.d.ts +1 -1
  103. package/lib/cjs/ITwinError.d.ts.map +1 -1
  104. package/lib/cjs/ITwinError.js +1 -1
  105. package/lib/cjs/ITwinError.js.map +1 -1
  106. package/lib/cjs/Image.d.ts +22 -8
  107. package/lib/cjs/Image.d.ts.map +1 -1
  108. package/lib/cjs/Image.js +20 -4
  109. package/lib/cjs/Image.js.map +1 -1
  110. package/lib/cjs/IpcAppProps.d.ts +2 -0
  111. package/lib/cjs/IpcAppProps.d.ts.map +1 -1
  112. package/lib/cjs/IpcAppProps.js.map +1 -1
  113. package/lib/cjs/LightSettings.js +39 -1
  114. package/lib/cjs/LightSettings.js.map +1 -1
  115. package/lib/cjs/Localization.d.ts +0 -10
  116. package/lib/cjs/Localization.d.ts.map +1 -1
  117. package/lib/cjs/Localization.js +0 -1
  118. package/lib/cjs/Localization.js.map +1 -1
  119. package/lib/cjs/MapImagerySettings.js +3 -2
  120. package/lib/cjs/MapImagerySettings.js.map +1 -1
  121. package/lib/cjs/MapLayerSettings.d.ts +20 -0
  122. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  123. package/lib/cjs/MapLayerSettings.js +50 -1
  124. package/lib/cjs/MapLayerSettings.js.map +1 -1
  125. package/lib/cjs/MassProperties.d.ts +2 -0
  126. package/lib/cjs/MassProperties.d.ts.map +1 -1
  127. package/lib/cjs/MassProperties.js.map +1 -1
  128. package/lib/cjs/ModelClipGroup.js +6 -0
  129. package/lib/cjs/ModelClipGroup.js.map +1 -1
  130. package/lib/cjs/OctEncodedNormal.js +4 -0
  131. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  132. package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
  133. package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
  134. package/lib/cjs/PlanProjectionSettings.js +8 -1
  135. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  136. package/lib/cjs/PlanarClipMask.d.ts +0 -12
  137. package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
  138. package/lib/cjs/PlanarClipMask.js +24 -2
  139. package/lib/cjs/PlanarClipMask.js.map +1 -1
  140. package/lib/cjs/QPoint.d.ts +5 -5
  141. package/lib/cjs/QPoint.d.ts.map +1 -1
  142. package/lib/cjs/QPoint.js +37 -29
  143. package/lib/cjs/QPoint.js.map +1 -1
  144. package/lib/cjs/RealityModelDisplaySettings.js +81 -4
  145. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  146. package/lib/cjs/RenderMaterial.d.ts +0 -43
  147. package/lib/cjs/RenderMaterial.d.ts.map +1 -1
  148. package/lib/cjs/RenderMaterial.js +6 -51
  149. package/lib/cjs/RenderMaterial.js.map +1 -1
  150. package/lib/cjs/RenderPolyline.d.ts +36 -0
  151. package/lib/cjs/RenderPolyline.d.ts.map +1 -0
  152. package/lib/cjs/RenderPolyline.js +26 -0
  153. package/lib/cjs/RenderPolyline.js.map +1 -0
  154. package/lib/cjs/RenderSchedule.d.ts +1 -2
  155. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  156. package/lib/cjs/RenderSchedule.js +138 -11
  157. package/lib/cjs/RenderSchedule.js.map +1 -1
  158. package/lib/cjs/RenderTexture.d.ts +5 -23
  159. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  160. package/lib/cjs/RenderTexture.js +13 -16
  161. package/lib/cjs/RenderTexture.js.map +1 -1
  162. package/lib/cjs/RgbColor.js +3 -0
  163. package/lib/cjs/RgbColor.js.map +1 -1
  164. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  165. package/lib/cjs/RpcInterface.js +7 -1
  166. package/lib/cjs/RpcInterface.js.map +1 -1
  167. package/lib/cjs/SkyBox.js +17 -4
  168. package/lib/cjs/SkyBox.js.map +1 -1
  169. package/lib/cjs/SolarShadows.js +5 -1
  170. package/lib/cjs/SolarShadows.js.map +1 -1
  171. package/lib/cjs/SpatialClassification.js +19 -1
  172. package/lib/cjs/SpatialClassification.js.map +1 -1
  173. package/lib/cjs/SubCategoryAppearance.js +35 -1
  174. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  175. package/lib/cjs/SubCategoryOverride.js +16 -2
  176. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  177. package/lib/cjs/TerrainSettings.d.ts +0 -7
  178. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  179. package/lib/cjs/TerrainSettings.js +19 -0
  180. package/lib/cjs/TerrainSettings.js.map +1 -1
  181. package/lib/cjs/TextureMapping.d.ts +17 -14
  182. package/lib/cjs/TextureMapping.d.ts.map +1 -1
  183. package/lib/cjs/TextureMapping.js +47 -19
  184. package/lib/cjs/TextureMapping.js.map +1 -1
  185. package/lib/cjs/ThematicDisplay.js +53 -2
  186. package/lib/cjs/ThematicDisplay.js.map +1 -1
  187. package/lib/cjs/Thumbnail.d.ts +1 -1
  188. package/lib/cjs/Thumbnail.js.map +1 -1
  189. package/lib/cjs/Tween.js +28 -19
  190. package/lib/cjs/Tween.js.map +1 -1
  191. package/lib/cjs/ViewDetails.js +10 -6
  192. package/lib/cjs/ViewDetails.js.map +1 -1
  193. package/lib/cjs/ViewFlags.d.ts +1 -3
  194. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  195. package/lib/cjs/ViewFlags.js +86 -5
  196. package/lib/cjs/ViewFlags.js.map +1 -1
  197. package/lib/cjs/ViewProps.d.ts +0 -4
  198. package/lib/cjs/ViewProps.d.ts.map +1 -1
  199. package/lib/cjs/ViewProps.js.map +1 -1
  200. package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
  201. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  202. package/lib/cjs/annotation/TextAnnotation.js +10 -0
  203. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  204. package/lib/cjs/annotation/TextBlock.js +27 -6
  205. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  206. package/lib/cjs/annotation/TextStyle.js +65 -19
  207. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  208. package/lib/cjs/core-common.d.ts +1 -2
  209. package/lib/cjs/core-common.d.ts.map +1 -1
  210. package/lib/cjs/core-common.js +1 -2
  211. package/lib/cjs/core-common.js.map +1 -1
  212. package/lib/cjs/geometry/AdditionalTransform.js +12 -0
  213. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  214. package/lib/cjs/geometry/AreaPattern.js +17 -0
  215. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  216. package/lib/cjs/geometry/BoundingSphere.js +4 -0
  217. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  218. package/lib/cjs/geometry/Cartographic.js +23 -20
  219. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  220. package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
  221. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  222. package/lib/cjs/geometry/ElementGeometry.js +26 -8
  223. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  224. package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
  225. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  226. package/lib/cjs/geometry/FrustumPlanes.js +1 -0
  227. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  228. package/lib/cjs/geometry/GeodeticDatum.js +100 -0
  229. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  230. package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
  231. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  232. package/lib/cjs/geometry/GeometryStream.js +19 -6
  233. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  234. package/lib/cjs/geometry/ImageGraphic.js +10 -0
  235. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  236. package/lib/cjs/geometry/LineStyle.js +14 -0
  237. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  238. package/lib/cjs/geometry/Placement.js +6 -0
  239. package/lib/cjs/geometry/Placement.js.map +1 -1
  240. package/lib/cjs/geometry/Projection.js +75 -0
  241. package/lib/cjs/geometry/Projection.js.map +1 -1
  242. package/lib/cjs/geometry/TextString.js +18 -0
  243. package/lib/cjs/geometry/TextString.js.map +1 -1
  244. package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  245. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
  246. package/lib/cjs/internal/BackendTypes.js.map +1 -0
  247. package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
  248. package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
  249. package/lib/cjs/internal/PackedFeatureTable.js +359 -0
  250. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
  251. package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
  252. package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
  253. package/lib/cjs/internal/RenderMaterialParams.js +68 -0
  254. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
  255. package/lib/cjs/internal/RenderMesh.d.ts +52 -0
  256. package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
  257. package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
  258. package/lib/cjs/internal/RenderMesh.js.map +1 -0
  259. package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
  260. package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
  261. package/lib/cjs/internal/RenderTextureParams.js +37 -0
  262. package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
  263. package/lib/cjs/internal/cross-package.d.ts +5 -0
  264. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  265. package/lib/cjs/internal/cross-package.js +16 -0
  266. package/lib/cjs/internal/cross-package.js.map +1 -1
  267. package/lib/cjs/ipc/IpcSession.js +1 -0
  268. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  269. package/lib/cjs/ipc/IpcSocket.d.ts +2 -0
  270. package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
  271. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  272. package/lib/cjs/ipc/IpcWebSocket.js +7 -6
  273. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  274. package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
  275. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  276. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  277. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  278. package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
  279. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  280. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  281. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  282. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  283. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  284. package/lib/cjs/rpc/TestRpcManager.js +1 -4
  285. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  286. package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
  287. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  288. package/lib/cjs/rpc/core/RpcControl.js +29 -38
  289. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  290. package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
  291. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  292. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
  293. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  294. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  295. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  296. package/lib/cjs/rpc/core/RpcOperation.js +29 -31
  297. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  298. package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
  299. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  300. package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
  301. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  302. package/lib/cjs/rpc/core/RpcPush.js +15 -8
  303. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  304. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  305. package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
  306. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  307. package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
  308. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  309. package/lib/cjs/rpc/core/RpcRequest.js +51 -29
  310. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  311. package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
  312. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  313. package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
  314. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  315. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
  316. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  317. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  318. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  319. package/lib/cjs/rpc/web/OpenAPI.js +2 -0
  320. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  321. package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
  322. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  323. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  324. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  325. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
  326. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  327. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
  328. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  329. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  330. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  331. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
  332. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  333. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  334. package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
  335. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  336. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  337. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  338. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
  339. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  340. package/lib/cjs/tile/B3dmTileIO.js +7 -0
  341. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  342. package/lib/cjs/tile/CompositeTileIO.js +3 -0
  343. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  344. package/lib/cjs/tile/GltfTileIO.js +4 -3
  345. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  346. package/lib/cjs/tile/I3dmTileIO.js +8 -0
  347. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  348. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  349. package/lib/cjs/tile/IModelTileIO.js +26 -3
  350. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  351. package/lib/cjs/tile/PntsTileIO.js +5 -0
  352. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  353. package/lib/cjs/tile/TileIO.js +2 -0
  354. package/lib/cjs/tile/TileIO.js.map +1 -1
  355. package/lib/cjs/tile/TileMetadata.js +9 -1
  356. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  357. package/lib/esm/AmbientOcclusion.js +17 -9
  358. package/lib/esm/AmbientOcclusion.js.map +1 -1
  359. package/lib/esm/AnalysisStyle.d.ts +0 -3
  360. package/lib/esm/AnalysisStyle.d.ts.map +1 -1
  361. package/lib/esm/AnalysisStyle.js +20 -4
  362. package/lib/esm/AnalysisStyle.js.map +1 -1
  363. package/lib/esm/Atmosphere.js +39 -21
  364. package/lib/esm/Atmosphere.js.map +1 -1
  365. package/lib/esm/BackgroundMapProvider.js +4 -0
  366. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  367. package/lib/esm/BackgroundMapSettings.js +19 -0
  368. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  369. package/lib/esm/BlobReader.js +8 -6
  370. package/lib/esm/BlobReader.js.map +1 -1
  371. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  372. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  373. package/lib/esm/BriefcaseTypes.js.map +1 -1
  374. package/lib/esm/Camera.js +3 -0
  375. package/lib/esm/Camera.js.map +1 -1
  376. package/lib/esm/ChangesetProps.d.ts +1 -1
  377. package/lib/esm/ChangesetProps.js.map +1 -1
  378. package/lib/esm/ClipStyle.js +31 -5
  379. package/lib/esm/ClipStyle.js.map +1 -1
  380. package/lib/esm/Code.d.ts +0 -5
  381. package/lib/esm/Code.d.ts.map +1 -1
  382. package/lib/esm/Code.js +16 -11
  383. package/lib/esm/Code.js.map +1 -1
  384. package/lib/esm/ColorDef.js +11 -10
  385. package/lib/esm/ColorDef.js.map +1 -1
  386. package/lib/esm/ConcurrentQuery.d.ts +37 -1
  387. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  388. package/lib/esm/ConcurrentQuery.js +16 -3
  389. package/lib/esm/ConcurrentQuery.js.map +1 -1
  390. package/lib/esm/ContextRealityModel.js +53 -27
  391. package/lib/esm/ContextRealityModel.js.map +1 -1
  392. package/lib/esm/ContourDisplay.js +40 -5
  393. package/lib/esm/ContourDisplay.js.map +1 -1
  394. package/lib/esm/DisplayStyleSettings.js +95 -63
  395. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  396. package/lib/esm/ECSqlReader.d.ts +2 -0
  397. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  398. package/lib/esm/ECSqlReader.js +56 -50
  399. package/lib/esm/ECSqlReader.js.map +1 -1
  400. package/lib/esm/ElementProps.d.ts.map +1 -1
  401. package/lib/esm/ElementProps.js +8 -4
  402. package/lib/esm/ElementProps.js.map +1 -1
  403. package/lib/esm/EntityProps.js +31 -0
  404. package/lib/esm/EntityProps.js.map +1 -1
  405. package/lib/esm/Environment.js +25 -2
  406. package/lib/esm/Environment.js.map +1 -1
  407. package/lib/esm/FeatureIndex.js +15 -6
  408. package/lib/esm/FeatureIndex.js.map +1 -1
  409. package/lib/esm/FeatureSymbology.d.ts +25 -73
  410. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  411. package/lib/esm/FeatureSymbology.js +88 -103
  412. package/lib/esm/FeatureSymbology.js.map +1 -1
  413. package/lib/esm/FeatureTable.d.ts +6 -108
  414. package/lib/esm/FeatureTable.d.ts.map +1 -1
  415. package/lib/esm/FeatureTable.js +11 -324
  416. package/lib/esm/FeatureTable.js.map +1 -1
  417. package/lib/esm/Fonts.d.ts +68 -10
  418. package/lib/esm/Fonts.d.ts.map +1 -1
  419. package/lib/esm/Fonts.js +19 -4
  420. package/lib/esm/Fonts.js.map +1 -1
  421. package/lib/esm/Frustum.js +2 -2
  422. package/lib/esm/Frustum.js.map +1 -1
  423. package/lib/esm/GeoCoordinateServices.d.ts +1 -0
  424. package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
  425. package/lib/esm/GeoCoordinateServices.js +2 -1
  426. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  427. package/lib/esm/GeometryParams.js +58 -0
  428. package/lib/esm/GeometryParams.js.map +1 -1
  429. package/lib/esm/Gradient.d.ts +3 -4
  430. package/lib/esm/Gradient.d.ts.map +1 -1
  431. package/lib/esm/Gradient.js +21 -19
  432. package/lib/esm/Gradient.js.map +1 -1
  433. package/lib/esm/GraphicParams.js +14 -12
  434. package/lib/esm/GraphicParams.js.map +1 -1
  435. package/lib/esm/GroundPlane.js +8 -2
  436. package/lib/esm/GroundPlane.js.map +1 -1
  437. package/lib/esm/HSLColor.js +6 -0
  438. package/lib/esm/HSLColor.js.map +1 -1
  439. package/lib/esm/HSVColor.js +6 -0
  440. package/lib/esm/HSVColor.js.map +1 -1
  441. package/lib/esm/HiddenLine.d.ts +17 -18
  442. package/lib/esm/HiddenLine.d.ts.map +1 -1
  443. package/lib/esm/HiddenLine.js +24 -5
  444. package/lib/esm/HiddenLine.js.map +1 -1
  445. package/lib/esm/Hilite.js +10 -0
  446. package/lib/esm/Hilite.js.map +1 -1
  447. package/lib/esm/IModel.d.ts +3 -12
  448. package/lib/esm/IModel.d.ts.map +1 -1
  449. package/lib/esm/IModel.js +47 -23
  450. package/lib/esm/IModel.js.map +1 -1
  451. package/lib/esm/IModelError.d.ts +0 -2
  452. package/lib/esm/IModelError.d.ts.map +1 -1
  453. package/lib/esm/IModelError.js +2 -1
  454. package/lib/esm/IModelError.js.map +1 -1
  455. package/lib/esm/IModelVersion.js +4 -0
  456. package/lib/esm/IModelVersion.js.map +1 -1
  457. package/lib/esm/ITwinError.d.ts +1 -1
  458. package/lib/esm/ITwinError.d.ts.map +1 -1
  459. package/lib/esm/ITwinError.js +1 -1
  460. package/lib/esm/ITwinError.js.map +1 -1
  461. package/lib/esm/Image.d.ts +22 -8
  462. package/lib/esm/Image.d.ts.map +1 -1
  463. package/lib/esm/Image.js +19 -4
  464. package/lib/esm/Image.js.map +1 -1
  465. package/lib/esm/IpcAppProps.d.ts +2 -0
  466. package/lib/esm/IpcAppProps.d.ts.map +1 -1
  467. package/lib/esm/IpcAppProps.js.map +1 -1
  468. package/lib/esm/LightSettings.js +39 -1
  469. package/lib/esm/LightSettings.js.map +1 -1
  470. package/lib/esm/Localization.d.ts +0 -10
  471. package/lib/esm/Localization.d.ts.map +1 -1
  472. package/lib/esm/Localization.js +0 -1
  473. package/lib/esm/Localization.js.map +1 -1
  474. package/lib/esm/MapImagerySettings.js +3 -2
  475. package/lib/esm/MapImagerySettings.js.map +1 -1
  476. package/lib/esm/MapLayerSettings.d.ts +20 -0
  477. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  478. package/lib/esm/MapLayerSettings.js +50 -1
  479. package/lib/esm/MapLayerSettings.js.map +1 -1
  480. package/lib/esm/MassProperties.d.ts +2 -0
  481. package/lib/esm/MassProperties.d.ts.map +1 -1
  482. package/lib/esm/MassProperties.js.map +1 -1
  483. package/lib/esm/ModelClipGroup.js +6 -0
  484. package/lib/esm/ModelClipGroup.js.map +1 -1
  485. package/lib/esm/OctEncodedNormal.js +4 -0
  486. package/lib/esm/OctEncodedNormal.js.map +1 -1
  487. package/lib/esm/PlanProjectionSettings.d.ts +1 -2
  488. package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
  489. package/lib/esm/PlanProjectionSettings.js +8 -1
  490. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  491. package/lib/esm/PlanarClipMask.d.ts +0 -12
  492. package/lib/esm/PlanarClipMask.d.ts.map +1 -1
  493. package/lib/esm/PlanarClipMask.js +24 -2
  494. package/lib/esm/PlanarClipMask.js.map +1 -1
  495. package/lib/esm/QPoint.d.ts +5 -5
  496. package/lib/esm/QPoint.d.ts.map +1 -1
  497. package/lib/esm/QPoint.js +37 -29
  498. package/lib/esm/QPoint.js.map +1 -1
  499. package/lib/esm/RealityModelDisplaySettings.js +81 -4
  500. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  501. package/lib/esm/RenderMaterial.d.ts +0 -43
  502. package/lib/esm/RenderMaterial.d.ts.map +1 -1
  503. package/lib/esm/RenderMaterial.js +6 -51
  504. package/lib/esm/RenderMaterial.js.map +1 -1
  505. package/lib/esm/RenderPolyline.d.ts +36 -0
  506. package/lib/esm/RenderPolyline.d.ts.map +1 -0
  507. package/lib/esm/RenderPolyline.js +23 -0
  508. package/lib/esm/RenderPolyline.js.map +1 -0
  509. package/lib/esm/RenderSchedule.d.ts +1 -2
  510. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  511. package/lib/esm/RenderSchedule.js +138 -11
  512. package/lib/esm/RenderSchedule.js.map +1 -1
  513. package/lib/esm/RenderTexture.d.ts +5 -23
  514. package/lib/esm/RenderTexture.d.ts.map +1 -1
  515. package/lib/esm/RenderTexture.js +13 -16
  516. package/lib/esm/RenderTexture.js.map +1 -1
  517. package/lib/esm/RgbColor.js +3 -0
  518. package/lib/esm/RgbColor.js.map +1 -1
  519. package/lib/esm/RpcInterface.d.ts.map +1 -1
  520. package/lib/esm/RpcInterface.js +8 -2
  521. package/lib/esm/RpcInterface.js.map +1 -1
  522. package/lib/esm/SkyBox.js +17 -4
  523. package/lib/esm/SkyBox.js.map +1 -1
  524. package/lib/esm/SolarShadows.js +5 -1
  525. package/lib/esm/SolarShadows.js.map +1 -1
  526. package/lib/esm/SpatialClassification.js +19 -1
  527. package/lib/esm/SpatialClassification.js.map +1 -1
  528. package/lib/esm/SubCategoryAppearance.js +35 -1
  529. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  530. package/lib/esm/SubCategoryOverride.js +16 -2
  531. package/lib/esm/SubCategoryOverride.js.map +1 -1
  532. package/lib/esm/TerrainSettings.d.ts +0 -7
  533. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  534. package/lib/esm/TerrainSettings.js +19 -0
  535. package/lib/esm/TerrainSettings.js.map +1 -1
  536. package/lib/esm/TextureMapping.d.ts +17 -14
  537. package/lib/esm/TextureMapping.d.ts.map +1 -1
  538. package/lib/esm/TextureMapping.js +47 -19
  539. package/lib/esm/TextureMapping.js.map +1 -1
  540. package/lib/esm/ThematicDisplay.js +53 -2
  541. package/lib/esm/ThematicDisplay.js.map +1 -1
  542. package/lib/esm/Thumbnail.d.ts +1 -1
  543. package/lib/esm/Thumbnail.js.map +1 -1
  544. package/lib/esm/Tween.js +28 -19
  545. package/lib/esm/Tween.js.map +1 -1
  546. package/lib/esm/ViewDetails.js +10 -6
  547. package/lib/esm/ViewDetails.js.map +1 -1
  548. package/lib/esm/ViewFlags.d.ts +1 -3
  549. package/lib/esm/ViewFlags.d.ts.map +1 -1
  550. package/lib/esm/ViewFlags.js +86 -5
  551. package/lib/esm/ViewFlags.js.map +1 -1
  552. package/lib/esm/ViewProps.d.ts +0 -4
  553. package/lib/esm/ViewProps.d.ts.map +1 -1
  554. package/lib/esm/ViewProps.js.map +1 -1
  555. package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
  556. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  557. package/lib/esm/annotation/TextAnnotation.js +10 -0
  558. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  559. package/lib/esm/annotation/TextBlock.js +27 -6
  560. package/lib/esm/annotation/TextBlock.js.map +1 -1
  561. package/lib/esm/annotation/TextStyle.js +65 -19
  562. package/lib/esm/annotation/TextStyle.js.map +1 -1
  563. package/lib/esm/core-common.d.ts +1 -2
  564. package/lib/esm/core-common.d.ts.map +1 -1
  565. package/lib/esm/core-common.js +1 -2
  566. package/lib/esm/core-common.js.map +1 -1
  567. package/lib/esm/geometry/AdditionalTransform.js +12 -0
  568. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  569. package/lib/esm/geometry/AreaPattern.js +17 -0
  570. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  571. package/lib/esm/geometry/BoundingSphere.js +4 -0
  572. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  573. package/lib/esm/geometry/Cartographic.js +23 -20
  574. package/lib/esm/geometry/Cartographic.js.map +1 -1
  575. package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
  576. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  577. package/lib/esm/geometry/ElementGeometry.js +26 -8
  578. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  579. package/lib/esm/geometry/ElementGeometryFB.js +54 -108
  580. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  581. package/lib/esm/geometry/FrustumPlanes.js +1 -0
  582. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  583. package/lib/esm/geometry/GeodeticDatum.js +100 -0
  584. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  585. package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
  586. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  587. package/lib/esm/geometry/GeometryStream.js +19 -6
  588. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  589. package/lib/esm/geometry/ImageGraphic.js +10 -0
  590. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  591. package/lib/esm/geometry/LineStyle.js +14 -0
  592. package/lib/esm/geometry/LineStyle.js.map +1 -1
  593. package/lib/esm/geometry/Placement.js +6 -0
  594. package/lib/esm/geometry/Placement.js.map +1 -1
  595. package/lib/esm/geometry/Projection.js +75 -0
  596. package/lib/esm/geometry/Projection.js.map +1 -1
  597. package/lib/esm/geometry/TextString.js +18 -0
  598. package/lib/esm/geometry/TextString.js.map +1 -1
  599. package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  600. package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
  601. package/lib/esm/internal/BackendTypes.js.map +1 -0
  602. package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
  603. package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
  604. package/lib/esm/internal/PackedFeatureTable.js +352 -0
  605. package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
  606. package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
  607. package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
  608. package/lib/esm/internal/RenderMaterialParams.js +64 -0
  609. package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
  610. package/lib/esm/internal/RenderMesh.d.ts +52 -0
  611. package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
  612. package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
  613. package/lib/esm/internal/RenderMesh.js.map +1 -0
  614. package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
  615. package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
  616. package/lib/esm/internal/RenderTextureParams.js +33 -0
  617. package/lib/esm/internal/RenderTextureParams.js.map +1 -0
  618. package/lib/esm/internal/cross-package.d.ts +5 -0
  619. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  620. package/lib/esm/internal/cross-package.js +4 -1
  621. package/lib/esm/internal/cross-package.js.map +1 -1
  622. package/lib/esm/ipc/IpcSession.js +1 -0
  623. package/lib/esm/ipc/IpcSession.js.map +1 -1
  624. package/lib/esm/ipc/IpcSocket.d.ts +2 -0
  625. package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
  626. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  627. package/lib/esm/ipc/IpcWebSocket.js +7 -6
  628. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  629. package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
  630. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  631. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  632. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  633. package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
  634. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  635. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  636. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  637. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  638. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  639. package/lib/esm/rpc/TestRpcManager.js +1 -4
  640. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  641. package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
  642. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  643. package/lib/esm/rpc/core/RpcControl.js +29 -38
  644. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  645. package/lib/esm/rpc/core/RpcInvocation.js +19 -13
  646. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  647. package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
  648. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  649. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  650. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  651. package/lib/esm/rpc/core/RpcOperation.js +29 -31
  652. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  653. package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
  654. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  655. package/lib/esm/rpc/core/RpcProtocol.js +32 -30
  656. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  657. package/lib/esm/rpc/core/RpcPush.js +15 -8
  658. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  659. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  660. package/lib/esm/rpc/core/RpcRegistry.js +10 -9
  661. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  662. package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
  663. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  664. package/lib/esm/rpc/core/RpcRequest.js +51 -29
  665. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  666. package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
  667. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  668. package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
  669. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  670. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
  671. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  672. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  673. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  674. package/lib/esm/rpc/web/OpenAPI.js +2 -0
  675. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  676. package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
  677. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  678. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  679. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  680. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
  681. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  682. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
  683. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  684. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  685. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  686. package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
  687. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  688. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  689. package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
  690. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  691. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  692. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  693. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
  694. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  695. package/lib/esm/tile/B3dmTileIO.js +7 -0
  696. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  697. package/lib/esm/tile/CompositeTileIO.js +3 -0
  698. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  699. package/lib/esm/tile/GltfTileIO.js +4 -3
  700. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  701. package/lib/esm/tile/I3dmTileIO.js +8 -0
  702. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  703. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  704. package/lib/esm/tile/IModelTileIO.js +26 -3
  705. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  706. package/lib/esm/tile/PntsTileIO.js +5 -0
  707. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  708. package/lib/esm/tile/TileIO.js +2 -0
  709. package/lib/esm/tile/TileIO.js.map +1 -1
  710. package/lib/esm/tile/TileMetadata.js +9 -1
  711. package/lib/esm/tile/TileMetadata.js.map +1 -1
  712. package/package.json +14 -14
  713. package/lib/cjs/BackendTypes.d.ts.map +0 -1
  714. package/lib/cjs/BackendTypes.js.map +0 -1
  715. package/lib/cjs/Render.d.ts +0 -85
  716. package/lib/cjs/Render.d.ts.map +0 -1
  717. package/lib/cjs/Render.js.map +0 -1
  718. package/lib/esm/BackendTypes.d.ts.map +0 -1
  719. package/lib/esm/BackendTypes.js.map +0 -1
  720. package/lib/esm/Render.d.ts +0 -85
  721. package/lib/esm/Render.d.ts.map +0 -1
  722. package/lib/esm/Render.js.map +0 -1
  723. /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
  724. /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ITwinError.js","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoE;AAuDpE,YAAY;AACZ,IAAiB,eAAe,CA0B/B;AA1BD,WAAiB,eAAe;IAE9B;;;OAGG;IACH,SAAgB,iBAAiB,CAAC,KAAc;QAC9C,OAAO,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,KAAK,cAAc,IAAI,KAAK,CAAC,QAAQ,KAAK,cAAc,CAAC;IACnH,CAAC;IAFe,iCAAiB,oBAEhC,CAAA;IAED,iFAAiF;IACjF,SAAgB,oBAAoB,CAAC,UAAuB,EAAE,OAAgB,EAAE,QAA0B;QACxG,MAAM,WAAW,GAAG,IAAI,KAAK,EAAE,CAAC;QAChC,WAAW,CAAC,IAAI,GAAG,iBAAiB,CAAC,CAAC,sIAAsI;QAC5K,KAAK,CAAC,iBAAiB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,oGAAoG;QAChK,MAAM,SAAS,GAAoB;YACjC,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,cAAc;YACxB,OAAO,EAAE,OAAO,IAAI,8DAA8D;YAClF,QAAQ;YACR,UAAU;SACX,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACtC,MAAM,WAAW,CAAC;IACpB,CAAC;IAbe,oCAAoB,uBAanC,CAAA;AAEH,CAAC,EA1BgB,eAAe,+BAAf,eAAe,QA0B/B;AACD,YAAY;AACZ,IAAiB,UAAU,CAW1B;AAXD,WAAiB,UAAU;IACzB,mGAAmG;IACnG,SAAgB,YAAY,CAAC,KAAc;QACzC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,IAAI,KAAK,IAAI,UAAU,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,CAAC;IACjJ,CAAC;IAFe,uBAAY,eAE3B,CAAA;IAED,iEAAiE;IACjE,SAAgB,WAAW,CAAC,GAAe;QACzC,OAAO,2BAAY,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAFe,sBAAW,cAE1B,CAAA;AAEH,CAAC,EAXgB,UAAU,0BAAV,UAAU,QAW1B;AAAA,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 iModels\n */\n\nimport { BentleyError, LoggingMetaData } from \"@itwin/core-bentley\";\nimport { LockState } from \"./IModelError\";\n\n/**\n * Detailed information about a particular object Lock that is causing the Lock update conflict.\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\n * @beta\n */\nexport interface InUseLock {\n /** Id of the object that is causing conflict. */\n objectId: string;\n /**\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\n * See {@link LockState}.\n */\n state: LockState;\n /** An array of Briefcase ids that hold this lock. */\n briefcaseIds: number[];\n}\n\n/**\n * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.\n * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.\n * When extending ITwinError, one should typically add a type guard function and a function to throw the error either to a namespace for their error or as standalone functions.\n * See [[InUseLocksError.throwInUseLocksError]] and [[InUseLocksError.isInUseLocksError]] for examples of how to throw and check that an error is of type InUseLocksError.\n * * Example of catching a ITwinError:\n * ``` ts\n * [[include:ITwinError.catchAndHandleITwinError]]\n * ```\n * @beta\n */\nexport interface ITwinError {\n /** namespace for the error. This is a unique qualifier for the errorKey. */\n namespace: string;\n /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */\n errorKey: string;\n /** explanation of what went wrong. Intended to be read by a developer. */\n message: string;\n /** stack trace of the error. */\n stack?: string;\n /** metadata about the exception. */\n metadata?: LoggingMetaData;\n}\n\n/**\n * An error raised when there is a lock conflict detected.\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\n * @beta\n*/\nexport interface InUseLocksError extends ITwinError {\n namespace: \"itwinjs-core\";\n errorKey: \"in-use-locks\";\n inUseLocks: InUseLock[];\n}\n\n/** @beta */\nexport namespace InUseLocksError {\n\n /**\n * type guard function that returns whether or not the passed in parameter is an [[InUseLocksError]].\n * it first checks [[ITwinError.isITwinError]] and then checks that the namespace property is \"itwinjs-core\" and the errorKey property is \"in-use-locks\".\n */\n export function isInUseLocksError(error: unknown): error is InUseLocksError {\n return ITwinError.isITwinError(error) && error.namespace === \"itwinjs-core\" && error.errorKey === \"in-use-locks\";\n }\n\n /** throws an error which passes the [[isInUseLocksError]] type guard function */\n export function throwInUseLocksError(inUseLocks: InUseLock[], message?: string, metadata?: LoggingMetaData): never {\n const errorObject = new Error();\n errorObject.name = \"InUseLocksError\"; // optional but makes it so that when the error is thrown and not caught we see InUseLocksError: 'message' instead of Error: 'message'\n Error.captureStackTrace(errorObject, throwInUseLocksError); // optional: whether we want to hide throwInUseLocksError or not from the stack. not super important\n const lockError: InUseLocksError = {\n namespace: \"itwinjs-core\",\n errorKey: \"in-use-locks\",\n message: message ?? \"One or more objects are already locked by another briefcase.\",\n metadata,\n inUseLocks,\n };\n Object.assign(errorObject, lockError);\n throw errorObject;\n }\n\n}\n/** @beta */\nexport namespace ITwinError {\n /** type guard function that returns whether or not the passed in parameter is an [[ITwinError]] */\n export function isITwinError(error: unknown): error is ITwinError {\n return error !== undefined && error !== null && typeof error === \"object\" && \"namespace\" in error && \"errorKey\" in error && \"message\" in error;\n }\n\n /** get the meta data associated with this ITwinError, if any. */\n export function getMetaData(err: ITwinError): object | undefined {\n return BentleyError.getMetaData(err.metadata);\n }\n\n};\n"]}
1
+ {"version":3,"file":"ITwinError.js","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoE;AAuDpE,YAAY;AACZ,IAAiB,eAAe,CA0B/B;AA1BD,WAAiB,eAAe;IAE9B;;;OAGG;IACH,SAAgB,iBAAiB,CAAC,KAAc;QAC9C,OAAO,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,KAAK,cAAc,IAAI,KAAK,CAAC,QAAQ,KAAK,cAAc,CAAC;IACnH,CAAC;IAFe,iCAAiB,oBAEhC,CAAA;IAED,iGAAiG;IACjG,SAAgB,oBAAoB,CAAC,UAAuB,EAAE,OAAgB,EAAE,QAA0B;QACxG,MAAM,WAAW,GAAG,IAAI,KAAK,EAAE,CAAC;QAChC,WAAW,CAAC,IAAI,GAAG,iBAAiB,CAAC,CAAC,sIAAsI;QAC5K,KAAK,CAAC,iBAAiB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,oGAAoG;QAChK,MAAM,SAAS,GAAoB;YACjC,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,cAAc;YACxB,OAAO,EAAE,OAAO,IAAI,8DAA8D;YAClF,QAAQ;YACR,UAAU;SACX,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACtC,MAAM,WAAW,CAAC;IACpB,CAAC;IAbe,oCAAoB,uBAanC,CAAA;AAEH,CAAC,EA1BgB,eAAe,+BAAf,eAAe,QA0B/B;AACD,YAAY;AACZ,IAAiB,UAAU,CAW1B;AAXD,WAAiB,UAAU;IACzB,mGAAmG;IACnG,SAAgB,YAAY,CAAC,KAAc;QACzC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,IAAI,KAAK,IAAI,UAAU,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,CAAC;IACjJ,CAAC;IAFe,uBAAY,eAE3B,CAAA;IAED,iEAAiE;IACjE,SAAgB,WAAW,CAAC,GAAe;QACzC,OAAO,2BAAY,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAFe,sBAAW,cAE1B,CAAA;AAEH,CAAC,EAXgB,UAAU,0BAAV,UAAU,QAW1B;AAAA,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 iModels\n */\n\nimport { BentleyError, LoggingMetaData } from \"@itwin/core-bentley\";\nimport { LockState } from \"./IModelError\";\n\n/**\n * Detailed information about a particular object Lock that is causing the Lock update conflict.\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\n * @beta\n */\nexport interface InUseLock {\n /** Id of the object that is causing conflict. */\n objectId: string;\n /**\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\n * See {@link LockState}.\n */\n state: LockState;\n /** An array of Briefcase ids that hold this lock. */\n briefcaseIds: number[];\n}\n\n/**\n * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.\n * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.\n * When extending ITwinError, one should typically add a type guard function and a function to throw the error either to a namespace for their error or as standalone functions.\n * See [[InUseLocksError.throwInUseLocksError]] and [[InUseLocksError.isInUseLocksError]] for examples of how to throw and check that an error is of type InUseLocksError.\n * * Example of catching a ITwinError:\n * ``` ts\n * [[include:ITwinError.catchAndHandleITwinError]]\n * ```\n * @beta\n */\nexport interface ITwinError {\n /** namespace for the error. This is a unique qualifier for the errorKey. */\n namespace: string;\n /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */\n errorKey: string;\n /** explanation of what went wrong. Intended to be read by a developer. */\n message: string;\n /** stack trace of the error. */\n stack?: string;\n /** metadata about the exception. */\n metadata?: LoggingMetaData;\n}\n\n/**\n * An error raised when there is a lock conflict detected.\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\n * @beta\n*/\nexport interface InUseLocksError extends ITwinError {\n namespace: \"itwinjs-core\";\n errorKey: \"in-use-locks\";\n inUseLocks: InUseLock[];\n}\n\n/** @beta */\nexport namespace InUseLocksError {\n\n /**\n * type guard function that returns whether or not the passed in parameter is an [[InUseLocksError]].\n * it first checks [[ITwinError.isITwinError]] and then checks that the namespace property is \"itwinjs-core\" and the errorKey property is \"in-use-locks\".\n */\n export function isInUseLocksError(error: unknown): error is InUseLocksError {\n return ITwinError.isITwinError(error) && error.namespace === \"itwinjs-core\" && error.errorKey === \"in-use-locks\";\n }\n\n /** throws an error which passes the [[InUseLocksError.isInUseLocksError]] type guard function */\n export function throwInUseLocksError(inUseLocks: InUseLock[], message?: string, metadata?: LoggingMetaData): never {\n const errorObject = new Error();\n errorObject.name = \"InUseLocksError\"; // optional but makes it so that when the error is thrown and not caught we see InUseLocksError: 'message' instead of Error: 'message'\n Error.captureStackTrace(errorObject, throwInUseLocksError); // optional: whether we want to hide throwInUseLocksError or not from the stack. not super important\n const lockError: InUseLocksError = {\n namespace: \"itwinjs-core\",\n errorKey: \"in-use-locks\",\n message: message ?? \"One or more objects are already locked by another briefcase.\",\n metadata,\n inUseLocks,\n };\n Object.assign(errorObject, lockError);\n throw errorObject;\n }\n\n}\n/** @beta */\nexport namespace ITwinError {\n /** type guard function that returns whether or not the passed in parameter is an [[ITwinError]] */\n export function isITwinError(error: unknown): error is ITwinError {\n return error !== undefined && error !== null && typeof error === \"object\" && \"namespace\" in error && \"errorKey\" in error && \"message\" in error;\n }\n\n /** get the meta data associated with this ITwinError, if any. */\n export function getMetaData(err: ITwinError): object | undefined {\n return BentleyError.getMetaData(err.metadata);\n }\n\n};\n"]}
@@ -40,12 +40,9 @@ export declare class ImageBuffer {
40
40
  * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.
41
41
  */
42
42
  static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer;
43
- /** @internal */
44
- protected static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean;
45
- /** @internal */
46
- protected static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number;
47
- /** @internal */
48
- protected constructor(data: Uint8Array, format: ImageBufferFormat, width: number);
43
+ private static isValidData;
44
+ private static computeHeight;
45
+ private constructor();
49
46
  }
50
47
  /** Returns whether the input is a power of two.
51
48
  * @note Floating point inputs are truncated.
@@ -71,8 +68,10 @@ export declare enum ImageSourceFormat {
71
68
  */
72
69
  Svg = 3
73
70
  }
74
- /** @internal */
75
- export declare function isValidImageSourceFormat(format: ImageSourceFormat): boolean;
71
+ /** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.
72
+ * @public
73
+ */
74
+ export declare function isValidImageSourceFormat(format: number): format is ImageSourceFormat;
76
75
  /** Image data encoded and compressed in either Jpeg or Png format.
77
76
  * @public
78
77
  */
@@ -84,4 +83,19 @@ export declare class ImageSource {
84
83
  /** Construct a new ImageSource, which takes ownership of the Uint8Array. */
85
84
  constructor(data: Uint8Array | string, format: ImageSourceFormat);
86
85
  }
86
+ /** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded
87
+ * in string format as an Svg.
88
+ * Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.
89
+ * @public
90
+ */
91
+ export interface BinaryImageSource {
92
+ /** The format in which the [[data]] is encoded. */
93
+ readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;
94
+ /** The image data encoded according to [[format]]. */
95
+ readonly data: Uint8Array;
96
+ }
97
+ /** Returns true if `source` is a [[BinaryImageSource]].
98
+ * @public
99
+ */
100
+ export declare function isBinaryImageSource(source: ImageSource): source is BinaryImageSource;
87
101
  //# sourceMappingURL=Image.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;GAKG;AACH,oBAAY,iBAAiB;IAC3B,uCAAuC;IACvC,IAAI,IAAI;IACR,sCAAsC;IACtC,GAAG,IAAI;IACP,wBAAwB;IACxB,KAAK,IAAI;CACV;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,sGAAsG;IACtG,SAAgB,IAAI,EAAE,UAAU,CAAC;IACjC,wCAAwC;IACxC,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAC1C,+BAA+B;IAC/B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAE9B,2DAA2D;IAC3D,IAAW,gBAAgB,IAAI,MAAM,CAAyD;IAE9F,0FAA0F;WAC5E,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM;IAQpE,8CAA8C;IAC9C,IAAW,MAAM,IAAI,MAAM,CAA0E;IAErG;;;;;;;OAOG;WACW,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,GAAG,W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AAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,GAAG,iBAAiB,CAAC,GAAG,CAAC;IAChE,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,iBAAiB,CAEpF"}
package/lib/cjs/Image.js CHANGED
@@ -11,6 +11,7 @@ exports.ImageSource = exports.ImageSourceFormat = exports.ImageBuffer = exports.
11
11
  exports.isPowerOfTwo = isPowerOfTwo;
12
12
  exports.nextHighestPowerOfTwo = nextHighestPowerOfTwo;
13
13
  exports.isValidImageSourceFormat = isValidImageSourceFormat;
14
+ exports.isBinaryImageSource = isBinaryImageSource;
14
15
  /** Format of an [[ImageBuffer]].
15
16
  * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.
16
17
  * @see [[ImageBuffer.getNumBytesPerPixel]]
@@ -30,6 +31,12 @@ var ImageBufferFormat;
30
31
  * @public
31
32
  */
32
33
  class ImageBuffer {
34
+ /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */
35
+ data;
36
+ /** Format of the bytes in the image. */
37
+ format;
38
+ /** Width of image in pixels */
39
+ width;
33
40
  /** Return the number of bytes allocated for each pixel. */
34
41
  get numBytesPerPixel() { return ImageBuffer.getNumBytesPerPixel(this.format); }
35
42
  /** Determine the number of bytes allocated to a single pixel for the specified format. */
@@ -55,16 +62,13 @@ class ImageBuffer {
55
62
  throw new Error("The number of bytes supplied for ImageBuffer do not match its width and format.");
56
63
  return new ImageBuffer(data, format, width);
57
64
  }
58
- /** @internal */
59
65
  static isValidData(data, format, width) {
60
66
  const height = this.computeHeight(data, format, width);
61
67
  return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;
62
68
  }
63
- /** @internal */
64
69
  static computeHeight(data, format, width) {
65
70
  return data.length / (width * this.getNumBytesPerPixel(format));
66
71
  }
67
- /** @internal */
68
72
  constructor(data, format, width) {
69
73
  this.data = data;
70
74
  this.format = format;
@@ -104,7 +108,9 @@ var ImageSourceFormat;
104
108
  */
105
109
  ImageSourceFormat[ImageSourceFormat["Svg"] = 3] = "Svg";
106
110
  })(ImageSourceFormat || (exports.ImageSourceFormat = ImageSourceFormat = {}));
107
- /** @internal */
111
+ /** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.
112
+ * @public
113
+ */
108
114
  function isValidImageSourceFormat(format) {
109
115
  switch (format) {
110
116
  case ImageSourceFormat.Jpeg:
@@ -119,6 +125,10 @@ function isValidImageSourceFormat(format) {
119
125
  * @public
120
126
  */
121
127
  class ImageSource {
128
+ /** The content of the image, compressed */
129
+ data;
130
+ /** The compression type. */
131
+ format;
122
132
  /** Construct a new ImageSource, which takes ownership of the Uint8Array. */
123
133
  constructor(data, format) {
124
134
  this.data = data;
@@ -126,4 +136,10 @@ class ImageSource {
126
136
  }
127
137
  }
128
138
  exports.ImageSource = ImageSource;
139
+ /** Returns true if `source` is a [[BinaryImageSource]].
140
+ * @public
141
+ */
142
+ function isBinaryImageSource(source) {
143
+ return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;
144
+ }
129
145
  //# sourceMappingURL=Image.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAiFH,oCAEC;AAMD,sDAMC;AAkBD,4DASC;AAxHD;;;;;GAKG;AACH,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAa,WAAW;IAQtB,2DAA2D;IAC3D,IAAW,gBAAgB,KAAa,OAAO,WAAW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mB,IAAyB,EAAE,MAAyB;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAXD,kCAWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\n/** Format of an [[ImageBuffer]].\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\n * @see [[ImageBuffer.getNumBytesPerPixel]]\n * @public\n * @extensions\n */\nexport enum ImageBufferFormat {\n /** RGBA format - 4 bytes per pixel. */\n Rgba = 0,\n /** RGB format - 3 bytes per pixel. */\n Rgb = 2,\n /** 1 byte per pixel. */\n Alpha = 5,\n}\n\n/** Uncompressed rectangular bitmap image data.\n * @public\n */\nexport class ImageBuffer {\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\n public readonly data: Uint8Array;\n /** Format of the bytes in the image. */\n public readonly format: ImageBufferFormat;\n /** Width of image in pixels */\n public readonly width: number;\n\n /** Return the number of bytes allocated for each pixel. */\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\n\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\n switch (format) {\n case ImageBufferFormat.Alpha: return 1;\n case ImageBufferFormat.Rgb: return 3;\n default: return 4;\n }\n }\n\n /** Get the height of this image in pixels. */\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\n\n /** Create a new ImageBuffer.\n * @note The ImageBuffer takes ownership of the input Uint8Array.\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\n * @param format The format of the image.\n * @param width The width of the image in pixels.\n * @returns A new ImageBuffer.\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\n */\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\n if (!this.isValidData(data, format, width))\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\n\n return new ImageBuffer(data, format, width);\n }\n\n /** @internal */\n protected static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\n const height = this.computeHeight(data, format, width);\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\n }\n\n /** @internal */\n protected static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\n return data.length / (width * this.getNumBytesPerPixel(format));\n }\n\n /** @internal */\n protected constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\n this.data = data;\n this.format = format;\n this.width = width;\n }\n}\n\n/** Returns whether the input is a power of two.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function isPowerOfTwo(num: number): boolean {\n return 0 === (num & (num - 1));\n}\n\n/** Returns the first power-of-two value greater than or equal to the input.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function nextHighestPowerOfTwo(num: number): number {\n --num;\n for (let i = 1; i < 32; i <<= 1)\n num = num | num >> i;\n\n return num + 1;\n}\n\n/** The format of an ImageSource.\n * @public\n * @extensions\n */\nexport enum ImageSourceFormat {\n /** Image data is stored with JPEG compression. */\n Jpeg = 0,\n /** Image data is stored with PNG compression. */\n Png = 2,\n /** Image is stored as an Svg stream.\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\n */\n Svg = 3,\n}\n\n/** @internal */\nexport function isValidImageSourceFormat(format: ImageSourceFormat): boolean {\n switch (format) {\n case ImageSourceFormat.Jpeg:\n case ImageSourceFormat.Png:\n case ImageSourceFormat.Svg:\n return true;\n default:\n return false;\n }\n}\n\n/** Image data encoded and compressed in either Jpeg or Png format.\n * @public\n */\nexport class ImageSource {\n /** The content of the image, compressed */\n public readonly data: Uint8Array | string;\n /** The compression type. */\n public readonly format: ImageSourceFormat;\n\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\n this.data = data;\n this.format = format;\n }\n}\n"]}
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA8EH,oCAEC;AAMD,sDAMC;AAoBD,4DASC;AAiCD,kDAEC;AA1JD;;;;;GAKG;AACH,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAa,WAAW;IACtB,sGAAsG;IACtF,IAAI,CAAa;IACjC,wCAAwC;IACxB,MAAM,CAAoB;IAC1C,+BAA+B;IACf,KAAK,CAAS;IAE9B,2DAA2D;IAC3D,IAAW,gBAAgB,KAAa,OAAO,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAE9F,0FAA0F;IACnF,MAAM,CAAC,mBAAmB,CAAC,MAAyB;QACzD,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,iBAAiB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;YACvC,KAAK,iBAAiB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,8CAA8C;IAC9C,IAAW,MAAM,KAAa,OAAO,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAErG;;;;;;;OAOG;IACI,MAAM,CAAC,MAAM,CAAC,IAAgB,EAAE,MAAyB,EAAE,KAAa;QAC7E,IAAI,CAAC,IAAI,CAAC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IAAI,CAAC,CAAC;IAEvB,OAAO,GAAG,GAAG,CAAC,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,kDAAkD;IAClD,yDAAQ,CAAA;IACR,iDAAiD;IACjD,uDAAO,CAAA;IACP;;OAEG;IACH,uDAAO,CAAA;AACT,CAAC,EATW,iBAAiB,iCAAjB,iBAAiB,QAS5B;AAED;;GAEG;AACH,SAAgB,wBAAwB,CAAC,MAAc;IACrD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,iBAAiB,CAAC,IAAI,CAAC;QAC5B,KAAK,iBAAiB,CAAC,GAAG,CAAC;QAC3B,KAAK,iBAAiB,CAAC,GAAG;YACxB,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAa,WAAW;IACtB,2CAA2C;IAC3B,IAAI,CAAsB;IAC1C,4BAA4B;IACZ,MAAM,CAAoB;IAE1C,4EAA4E;IAC5E,YAAmB,IAAyB,EAAE,MAAyB;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAXD,kCAWC;AAcD;;GAEG;AACH,SAAgB,mBAAmB,CAAC,MAAmB;IACrD,OAAO,MAAM,CAAC,MAAM,KAAK,iBAAiB,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,YAAY,UAAU,CAAC;AACtF,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\n/** Format of an [[ImageBuffer]].\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\n * @see [[ImageBuffer.getNumBytesPerPixel]]\n * @public\n * @extensions\n */\nexport enum ImageBufferFormat {\n /** RGBA format - 4 bytes per pixel. */\n Rgba = 0,\n /** RGB format - 3 bytes per pixel. */\n Rgb = 2,\n /** 1 byte per pixel. */\n Alpha = 5,\n}\n\n/** Uncompressed rectangular bitmap image data.\n * @public\n */\nexport class ImageBuffer {\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\n public readonly data: Uint8Array;\n /** Format of the bytes in the image. */\n public readonly format: ImageBufferFormat;\n /** Width of image in pixels */\n public readonly width: number;\n\n /** Return the number of bytes allocated for each pixel. */\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\n\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\n switch (format) {\n case ImageBufferFormat.Alpha: return 1;\n case ImageBufferFormat.Rgb: return 3;\n default: return 4;\n }\n }\n\n /** Get the height of this image in pixels. */\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\n\n /** Create a new ImageBuffer.\n * @note The ImageBuffer takes ownership of the input Uint8Array.\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\n * @param format The format of the image.\n * @param width The width of the image in pixels.\n * @returns A new ImageBuffer.\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\n */\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\n if (!this.isValidData(data, format, width))\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\n\n return new ImageBuffer(data, format, width);\n }\n\n private static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\n const height = this.computeHeight(data, format, width);\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\n }\n\n private static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\n return data.length / (width * this.getNumBytesPerPixel(format));\n }\n\n private constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\n this.data = data;\n this.format = format;\n this.width = width;\n }\n}\n\n/** Returns whether the input is a power of two.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function isPowerOfTwo(num: number): boolean {\n return 0 === (num & (num - 1));\n}\n\n/** Returns the first power-of-two value greater than or equal to the input.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function nextHighestPowerOfTwo(num: number): number {\n --num;\n for (let i = 1; i < 32; i <<= 1)\n num = num | num >> i;\n\n return num + 1;\n}\n\n/** The format of an ImageSource.\n * @public\n * @extensions\n */\nexport enum ImageSourceFormat {\n /** Image data is stored with JPEG compression. */\n Jpeg = 0,\n /** Image data is stored with PNG compression. */\n Png = 2,\n /** Image is stored as an Svg stream.\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\n */\n Svg = 3,\n}\n\n/** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.\n * @public\n */\nexport function isValidImageSourceFormat(format: number): format is ImageSourceFormat {\n switch (format) {\n case ImageSourceFormat.Jpeg:\n case ImageSourceFormat.Png:\n case ImageSourceFormat.Svg:\n return true;\n default:\n return false;\n }\n}\n\n/** Image data encoded and compressed in either Jpeg or Png format.\n * @public\n */\nexport class ImageSource {\n /** The content of the image, compressed */\n public readonly data: Uint8Array | string;\n /** The compression type. */\n public readonly format: ImageSourceFormat;\n\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\n this.data = data;\n this.format = format;\n }\n}\n\n/** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded\n * in string format as an Svg.\n * Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.\n * @public\n */\nexport interface BinaryImageSource {\n /** The format in which the [[data]] is encoded. */\n readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;\n /** The image data encoded according to [[format]]. */\n readonly data: Uint8Array;\n}\n\n/** Returns true if `source` is a [[BinaryImageSource]].\n * @public\n */\nexport function isBinaryImageSource(source: ImageSource): source is BinaryImageSource {\n return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;\n}\n"]}
@@ -136,6 +136,8 @@ export interface IpcAppFunctions {
136
136
  closeIModel: (key: string) => Promise<void>;
137
137
  /** see BriefcaseConnection.saveChanges */
138
138
  saveChanges: (key: string, description?: string) => Promise<void>;
139
+ /** see BriefcaseConnection.abandonChanges */
140
+ abandonChanges: (key: string) => Promise<void>;
139
141
  /** see BriefcaseTxns.hasPendingTxns */
140
142
  hasPendingTxns: (key: string) => Promise<boolean>;
141
143
  /** see BriefcaseTxns.isUndoPossible */
@@ -1 +1 @@
1
- {"version":3,"file":"IpcAppProps.d.ts","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAClJ,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAA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M,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAErF,2BAA2B,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACvF,2BAA2B,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAE/D,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3E,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACrD,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD,4FAA4F;IAC5F,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuBH;;GAEG;AACI,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,sBAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAAvG,QAAA,wBAAwB,4BAA+E;AAwBpH,gBAAgB;AACH,QAAA,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,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 NativeApp\n */\n\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\nimport { ChangedEntities } from \"./ChangedEntities\";\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\n\n/** Options for pulling changes into iModel.\n * @internal\n */\nexport interface PullChangesOptions {\n /** Enables progress reporting. */\n reportProgress?: boolean;\n /** Interval for reporting progress (in milliseconds). */\n progressInterval?: number;\n /** Enables checks for abort. */\n enableCancellation?: boolean;\n}\n\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\n * @internal\n */\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\n\n/** Identifies a list of tile content Ids belonging to a single tile tree.\n * @internal\n */\nexport interface TileTreeContentIds {\n treeId: string;\n contentIds: string[];\n}\n\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ModelIdAndGeometryGuid {\n /** The model's Id. */\n id: Id64String;\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\n */\n guid: GuidString;\n}\n\n/** @internal */\nexport const ipcAppChannels = {\n functions: \"itwinjs-core/ipc-app\",\n appNotify: \"itwinjs-core/ipcApp-notify\",\n txns: \"itwinjs-core/txns\",\n editingScope: \"itwinjs-core/editing-scope\",\n} as const;\n\n/**\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\n * @internal\n */\nexport interface IpcAppNotifications {\n notifyApp: () => void;\n}\n\n/** @internal */\nexport interface NotifyEntitiesChangedMetadata {\n /** Class full name (\"Schema:Class\") */\n name: string;\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\n bases: number[];\n}\n\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\n * @internal\n */\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\n /** An array of the same length as [[ChangedEntities.inserted]] (or empty if that array is undefined), containing the index in the [[meta]] array at which the\n * metadata for each entity's class is located.\n */\n insertedMeta: number[];\n /** See insertedMeta. */\n updatedMeta: number[];\n /** See insertedMeta. */\n deletedMeta: number[];\n\n /** Metadata describing each unique class of entity in this set of changes, followed by each unique direct or indirect base class of those classes. */\n meta: NotifyEntitiesChangedMetadata[];\n}\n\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\n * @see [TxnManager]($backend) for the source of these events.\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\n * @internal\n */\nexport interface TxnNotifications {\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\n notifyCommit: () => void;\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\n notifyReplayExternalTxns: () => void;\n notifyReplayedExternalTxns: () => void;\n notifyChangesApplied: () => void;\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\n notifyAfterUndoRedo: (isUndo: boolean) => void;\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n\n notifyIModelNameChanged: (name: string) => void;\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\n}\n\n/**\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\n * @internal\n */\nexport interface EditingScopeNotifications {\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\n}\n\n/**\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\n * @internal\n */\nexport interface IpcAppFunctions {\n /** Send frontend log to backend.\n * @param _level Specify log level.\n * @param _category Specify log category.\n * @param _message Specify log message.\n * @param _metaData metaData if any.\n */\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\n\n /** see BriefcaseConnection.openFile */\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\n /** see SnapshotConnection.openFile */\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.close */\n closeIModel: (key: string) => Promise<void>;\n /** see BriefcaseConnection.saveChanges */\n saveChanges: (key: string, description?: string) => Promise<void>;\n /** see BriefcaseTxns.hasPendingTxns */\n hasPendingTxns: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isUndoPossible */\n isUndoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isRedoPossible */\n isRedoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.getUndoString */\n getUndoString: (key: string) => Promise<string>;\n /** see BriefcaseTxns.getRedoString */\n getRedoString: (key: string) => Promise<string>;\n\n /** see BriefcaseConnection.pullChanges */\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\n /** Cancels pull of changes. */\n cancelPullChangesRequest: (key: string) => Promise<void>;\n /** see BriefcaseConnection.pushChanges */\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\n /** Cancels currently pending or active generation of tile content. */\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\n\n /** Cancel element graphics requests.\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\n */\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\n\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\n\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\n reinstateTxn: (key: string) => Promise<IModelStatus>;\n restartTxnSession: (key: string) => Promise<void>;\n\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\n}\n\n"]}
1
+ {"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuBH;;GAEG;AACI,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,sBAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAAvG,QAAA,wBAAwB,4BAA+E;AAwBpH,gBAAgB;AACH,QAAA,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,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 NativeApp\n */\n\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\nimport { ChangedEntities } from \"./ChangedEntities\";\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\n\n/** Options for pulling changes into iModel.\n * @internal\n */\nexport interface PullChangesOptions {\n /** Enables progress reporting. */\n reportProgress?: boolean;\n /** Interval for reporting progress (in milliseconds). */\n progressInterval?: number;\n /** Enables checks for abort. */\n enableCancellation?: boolean;\n}\n\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\n * @internal\n */\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\n\n/** Identifies a list of tile content Ids belonging to a single tile tree.\n * @internal\n */\nexport interface TileTreeContentIds {\n treeId: string;\n contentIds: string[];\n}\n\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ModelIdAndGeometryGuid {\n /** The model's Id. */\n id: Id64String;\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\n */\n guid: GuidString;\n}\n\n/** @internal */\nexport const ipcAppChannels = {\n functions: \"itwinjs-core/ipc-app\",\n appNotify: \"itwinjs-core/ipcApp-notify\",\n txns: \"itwinjs-core/txns\",\n editingScope: \"itwinjs-core/editing-scope\",\n} as const;\n\n/**\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\n * @internal\n */\nexport interface IpcAppNotifications {\n notifyApp: () => void;\n}\n\n/** @internal */\nexport interface NotifyEntitiesChangedMetadata {\n /** Class full name (\"Schema:Class\") */\n name: string;\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\n bases: number[];\n}\n\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\n * @internal\n */\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\n /** An array of the same length as [[ChangedEntities.inserted]] (or empty if that array is undefined), containing the index in the [[meta]] array at which the\n * metadata for each entity's class is located.\n */\n insertedMeta: number[];\n /** See insertedMeta. */\n updatedMeta: number[];\n /** See insertedMeta. */\n deletedMeta: number[];\n\n /** Metadata describing each unique class of entity in this set of changes, followed by each unique direct or indirect base class of those classes. */\n meta: NotifyEntitiesChangedMetadata[];\n}\n\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\n * @see [TxnManager]($backend) for the source of these events.\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\n * @internal\n */\nexport interface TxnNotifications {\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\n notifyCommit: () => void;\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\n notifyReplayExternalTxns: () => void;\n notifyReplayedExternalTxns: () => void;\n notifyChangesApplied: () => void;\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\n notifyAfterUndoRedo: (isUndo: boolean) => void;\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n\n notifyIModelNameChanged: (name: string) => void;\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\n}\n\n/**\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\n * @internal\n */\nexport interface EditingScopeNotifications {\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\n}\n\n/**\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\n * @internal\n */\nexport interface IpcAppFunctions {\n /** Send frontend log to backend.\n * @param _level Specify log level.\n * @param _category Specify log category.\n * @param _message Specify log message.\n * @param _metaData metaData if any.\n */\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\n\n /** see BriefcaseConnection.openFile */\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\n /** see SnapshotConnection.openFile */\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.close */\n closeIModel: (key: string) => Promise<void>;\n /** see BriefcaseConnection.saveChanges */\n saveChanges: (key: string, description?: string) => Promise<void>;\n /** see BriefcaseConnection.abandonChanges */\n abandonChanges: (key: string) => Promise<void>;\n /** see BriefcaseTxns.hasPendingTxns */\n hasPendingTxns: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isUndoPossible */\n isUndoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isRedoPossible */\n isRedoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.getUndoString */\n getUndoString: (key: string) => Promise<string>;\n /** see BriefcaseTxns.getRedoString */\n getRedoString: (key: string) => Promise<string>;\n\n /** see BriefcaseConnection.pullChanges */\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\n /** Cancels pull of changes. */\n cancelPullChangesRequest: (key: string) => Promise<void>;\n /** see BriefcaseConnection.pushChanges */\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\n /** Cancels currently pending or active generation of tile content. */\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\n\n /** Cancel element graphics requests.\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\n */\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\n\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\n\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\n reinstateTxn: (key: string) => Promise<IModelStatus>;\n restartTxnSession: (key: string) => Promise<void>;\n\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\n}\n\n"]}
@@ -21,6 +21,19 @@ const defaultSolarDirection = core_geometry_1.Vector3d.create(0.272166, 0.680414
21
21
  * @public
22
22
  */
23
23
  class SolarLight {
24
+ /** Direction of the light in world coordinates. Defaults to a vector looking down on the scene at a 45 degree angle mostly along the Y axis. */
25
+ direction;
26
+ /** Intensity of the light, typically in [0..1] but can range up to 5. Default: 1.0 */
27
+ intensity;
28
+ /** If true, the light will be applied even when shadows are turned off for the view.
29
+ * If false, a roughly overhead light of the same intensity oriented in view space will be used instead.
30
+ * Default: false.
31
+ */
32
+ alwaysEnabled;
33
+ /** If defined, the time in UNIX milliseconds from which [[direction]] was calculated.
34
+ * @see [[DisplayStyleSettings.setSunTime]] to compute the solar direction from a point in time.
35
+ */
36
+ timePoint;
24
37
  constructor(json) {
25
38
  json = json || {};
26
39
  this.intensity = extractIntensity(json.intensity, 1);
@@ -85,6 +98,8 @@ exports.SolarLight = SolarLight;
85
98
  * @public
86
99
  */
87
100
  class AmbientLight {
101
+ color;
102
+ intensity;
88
103
  constructor(json) {
89
104
  json = json || {};
90
105
  this.intensity = extractIntensity(json.intensity, 0.2);
@@ -125,6 +140,9 @@ const defaultLowerHemisphereColor = new RgbColor_1.RgbColor(120, 143, 125);
125
140
  * @public
126
141
  */
127
142
  class HemisphereLights {
143
+ upperColor;
144
+ lowerColor;
145
+ intensity;
128
146
  constructor(json) {
129
147
  json = json || {};
130
148
  this.intensity = extractIntensity(json.intensity, 0);
@@ -178,11 +196,23 @@ function clampIntensity(intensity = 0) {
178
196
  * @public
179
197
  */
180
198
  class FresnelSettings {
199
+ /** The strength of the effect in terms of how much brighter the surface becomes. The intensity at a given point on the surface is determined by
200
+ * the angle between the viewer's line of sight and the vector from the viewer to that point. Maximum intensity is produced when those vectors are
201
+ * perpendicular, and zero intensity is produced when those vectors are parallel (unless [[invert]] is `true`).
202
+ *
203
+ * A value of zero turns off the effect. Values less than zero are clamped to zero. Typical values range between 0 and 1.
204
+ */
205
+ intensity;
206
+ /** If true, inverts the effect's [[intensity]] such that maximum intensity is produced when the viewer's line of sight is parallel to the vector between
207
+ * the viewer and the point on the surface, and zero intensity is produced when the viewer's line of sight is perpendicular to that vector.
208
+ */
209
+ invert;
181
210
  constructor(intensity, invert) {
182
211
  (0, core_bentley_1.assert)(intensity >= 0);
183
212
  this.intensity = intensity;
184
213
  this.invert = invert;
185
214
  }
215
+ static _defaults = new FresnelSettings(0, false);
186
216
  /** Create from JSON representation, using default values for any unspecified or `undefined` properties. */
187
217
  static fromJSON(props) {
188
218
  const intensity = clampIntensity(core_bentley_1.JsonUtils.asDouble(props?.intensity));
@@ -225,12 +255,20 @@ class FresnelSettings {
225
255
  }
226
256
  }
227
257
  exports.FresnelSettings = FresnelSettings;
228
- FresnelSettings._defaults = new FresnelSettings(0, false);
229
258
  /** Describes the lighting for a 3d scene, associated with a [[DisplayStyle3dSettings]] in turn associated with a [DisplayStyle3d]($backend) or [DisplayStyle3dState]($frontend).
230
259
  * @see [[LightSettingsProps]]
231
260
  * @public
232
261
  */
233
262
  class LightSettings {
263
+ solar;
264
+ ambient;
265
+ hemisphere;
266
+ /** See [[LightSettingsProps.portrait]]. */
267
+ portraitIntensity;
268
+ specularIntensity;
269
+ /** See [[LightSettingsProps.numCels]]. */
270
+ numCels;
271
+ fresnel;
234
272
  constructor(solar, ambient, hemisphere, portraitIntensity, specularIntensity, numCels, fresnel) {
235
273
  this.solar = solar;
236
274
  this.ambient = ambient;
@@ -1 +1 @@
1
- {"version":3,"file":"LightSettings.js","sourceRoot":"","sources":["../../src/LightSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAwD;AACxD,wDAA0D;AAC1D,yCAAqD;AAErD,SAAS,gBAAgB,CAAC,KAAyB,EAAE,YAAoB;IACvE,MAAM,YAAY,GAAG,CAAC,CAAC;IACvB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;AAC/F,CAAC;AAyBD,MAAM,qBAAqB,GAAG,wBAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE5E;;;GAGG;AACH,MAA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CAAC,OAAO;eACtI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACtJ,CAAC;CACF;AAlGD,sCAkGC","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 DisplayStyles\n */\n\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\nimport { Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\n\nfunction extractIntensity(value: number | undefined, defaultValue: number) {\n const maxIntensity = 5;\n return typeof value === \"number\" ? Math.max(0, Math.min(maxIntensity, value)) : defaultValue;\n}\n\n/** Wire format for the solar directional light associated with a [[LightSettingsProps]].\n * The light is colored white and oriented in any direction in world coordinates.\n * It will cast shadows if it is above the world XY plane and if the shadows view flag is enabled for the view.\n * By default, the solar light is only applied when shadows are enabled, but can be set to be applied unconditionally.\n * @public\n * @extensions\n */\nexport interface SolarLightProps {\n /** Intensity of the light, typically in [0..1] but can range up to 5. Default: 1.0 */\n intensity?: number;\n /** Direction of the light in world coordinates. Defaults to a vector looking down on the scene at a 45 degree angle mostly along the Y axis. */\n direction?: XYZProps;\n /** If true, the light will be applied even when shadows are turned off for the view.\n * If false, a roughly overhead light of the same intensity oriented in view space will be used instead.\n * Default: false.\n */\n alwaysEnabled?: boolean;\n /** If defined, the time in UNIX milliseconds from which [[direction]] was calculated.\n * @see [[DisplayStyleSettings.setSunTime]] to compute the solar direction from a point in time.\n */\n timePoint?: number;\n}\n\nconst defaultSolarDirection = Vector3d.create(0.272166, 0.680414, 0.680414);\n\n/** Describes the solar directional light associated with a [[LightSettings]].\n * @see [[SolarLightProps]].\n * @public\n */\nexport class SolarLight {\n /** Direction of the light in world coordinates. Defaults to a vector looking down on the scene at a 45 degree angle mostly along the Y axis. */\n public readonly direction: Readonly<Vector3d>;\n /** Intensity of the light, typically in [0..1] but can range up to 5. Default: 1.0 */\n public readonly intensity: number;\n /** If true, the light will be applied even when shadows are turned off for the view.\n * If false, a roughly overhead light of the same intensity oriented in view space will be used instead.\n * Default: false.\n */\n public readonly alwaysEnabled: boolean;\n /** If defined, the time in UNIX milliseconds from which [[direction]] was calculated.\n * @see [[DisplayStyleSettings.setSunTime]] to compute the solar direction from a point in time.\n */\n public readonly timePoint?: number;\n\n public constructor(json?: SolarLightProps) {\n json = json || {};\n this.intensity = extractIntensity(json.intensity, 1);\n this.alwaysEnabled = JsonUtils.asBool(json.alwaysEnabled);\n\n if (json.direction)\n this.direction = Vector3d.fromJSON(json.direction);\n else\n this.direction = defaultSolarDirection.clone();\n\n if (typeof json.timePoint === \"number\")\n this.timePoint = json.timePoint;\n }\n\n public toJSON(): SolarLightProps | undefined {\n const direction = this.direction.isAlmostEqual(defaultSolarDirection) ? undefined : this.direction.toJSON();\n const intensity = this.intensity !== 1 ? this.intensity : undefined;\n const alwaysEnabled = this.alwaysEnabled ? true : undefined;\n const timePoint = this.timePoint;\n\n if (undefined === direction && undefined === intensity && undefined === alwaysEnabled && undefined === timePoint)\n return undefined;\n\n const json: SolarLightProps = {};\n if (direction)\n json.direction = direction;\n\n if (undefined !== intensity)\n json.intensity = intensity;\n\n if (undefined !== alwaysEnabled)\n json.alwaysEnabled = alwaysEnabled;\n\n if (undefined !== timePoint)\n json.timePoint = timePoint;\n\n return json;\n }\n\n /** Create a copy of this SolarLight, identical except in any properties explicitly specified by `changedProps`, with a possible exception for [[timePoint]].\n * If `this.timePoint` is defined and `changedProps` defines `direction` but **doesn't** define `timePoint`, the time point will only be preserved in the\n * copy if `changesProps.direction` is equal to `this.direction`.\n */\n public clone(changedProps?: SolarLightProps): SolarLight {\n if (!changedProps)\n return this;\n\n const props = this.toJSON() ?? {};\n if (undefined !== changedProps.direction)\n props.direction = changedProps.direction;\n\n if (undefined !== changedProps.intensity)\n props.intensity = changedProps.intensity;\n\n if (undefined !== changedProps.alwaysEnabled)\n props.alwaysEnabled = changedProps.alwaysEnabled;\n\n if (undefined !== changedProps.timePoint)\n props.timePoint = changedProps.timePoint;\n\n // If our direction was computed from a time point and the caller only supplies a direction, invalidate the time point unless the input direction matches our direction.\n // If caller explicitly supplied a timePoint, trust it.\n if (undefined !== this.timePoint && undefined === changedProps.timePoint && undefined !== changedProps.direction) {\n const newDirection = Vector3d.fromJSON(changedProps.direction);\n if (!newDirection.isAlmostEqual(this.direction))\n props.timePoint = undefined;\n }\n\n return new SolarLight(props);\n }\n\n public equals(rhs: SolarLight): boolean {\n return this.intensity === rhs.intensity && this.alwaysEnabled === rhs.alwaysEnabled && this.direction.isExactEqual(rhs.direction) && this.timePoint === rhs.timePoint;\n }\n}\n\n/** Wire format for the ambient light associated with a [[LightSettingsProps]].\n * Ambient light applies equally to all surfaces in the scene.\n * @public\n * @extensions\n */\nexport interface AmbientLightProps {\n /** The color of the light. Black is treated as a special case, indicating that the surface's own diffuse color should be used. */\n color?: RgbColorProps;\n /** The intensity of the light. Default: 0.2. */\n intensity?: number;\n}\n\n/** Describes the ambient light associated with a [[LightSettings]].\n * @see [[AmbientLightProps]]\n * @public\n */\nexport class AmbientLight {\n public readonly color: RgbColor;\n public readonly intensity: number;\n\n public constructor(json?: AmbientLightProps) {\n json = json || {};\n this.intensity = extractIntensity(json.intensity, 0.2);\n this.color = json.color ? RgbColor.fromJSON(json.color) : new RgbColor(0, 0, 0);\n }\n\n public toJSON(): AmbientLightProps | undefined {\n const color = this.color.r !== 0 || this.color.g !== 0 || this.color.b !== 0 ? this.color.toJSON() : undefined;\n const intensity = 0.2 !== this.intensity ? this.intensity : undefined;\n if (undefined === color && undefined === intensity)\n return undefined;\n\n const json: AmbientLightProps = {};\n if (color)\n json.color = color;\n\n if (undefined !== intensity)\n json.intensity = intensity;\n\n return json;\n }\n\n /** Create a copy of this light, identical except for any properties explicitly specified by `changed`. */\n public clone(changed?: AmbientLightProps): AmbientLight {\n if (!changed)\n return this;\n\n const props = this.toJSON() ?? {};\n if (undefined !== changed.intensity)\n props.intensity = changed.intensity;\n\n if (undefined !== changed.color)\n props.color = changed.color;\n\n return new AmbientLight(props);\n }\n\n public equals(rhs: AmbientLight): boolean {\n return this.intensity === rhs.intensity && this.color.equals(rhs.color);\n }\n}\n\n/** Wire format for a pair of hemisphere lights associated with a [[LightSettingsProps]].\n * Hemisphere lights are oriented in opposite directions along the world Z axis. Each has its own color; they share one intensity.\n * They are often used to simulate outdoor reflection of light from the ground and sky, so the colors often match the ground and sky colors\n * of the [[SkyBox]].\n * @public\n * @extensions\n */\nexport interface HemisphereLightsProps {\n /** The color of the downward-facing light. Default: (143, 205, 255). */\n upperColor?: RgbColorProps;\n /** The color of the upward-facing light. Default: (120, 143, 125). */\n lowerColor?: RgbColorProps;\n /** Intensity of the lights. Default: 0. */\n intensity?: number;\n}\n\nconst defaultUpperHemisphereColor = new RgbColor(143, 205, 255);\nconst defaultLowerHemisphereColor = new RgbColor(120, 143, 125);\n\n/** Describes a pair of hemisphere lights associated with a [[LightSettings]].\n * @see [[HemisphereLightsProps]]\n * @public\n */\nexport class HemisphereLights {\n public readonly upperColor: RgbColor;\n public readonly lowerColor: RgbColor;\n public readonly intensity: number;\n\n public constructor(json?: HemisphereLightsProps) {\n json = json || {};\n this.intensity = extractIntensity(json.intensity, 0);\n this.upperColor = json.upperColor ? RgbColor.fromJSON(json.upperColor) : defaultUpperHemisphereColor;\n this.lowerColor = json.lowerColor ? RgbColor.fromJSON(json.lowerColor) : defaultLowerHemisphereColor;\n }\n\n public toJSON(): HemisphereLightsProps | undefined {\n const upperColor = this.upperColor.equals(defaultUpperHemisphereColor) ? undefined : this.upperColor.toJSON();\n const lowerColor = this.lowerColor.equals(defaultLowerHemisphereColor) ? undefined : this.lowerColor.toJSON();\n const intensity = 0 === this.intensity ? undefined : this.intensity;\n\n if (undefined === upperColor && undefined === lowerColor && undefined === intensity)\n return undefined;\n\n const json: HemisphereLightsProps = {};\n if (upperColor)\n json.upperColor = upperColor;\n\n if (lowerColor)\n json.lowerColor = lowerColor;\n\n if (undefined !== intensity)\n json.intensity = intensity;\n\n return json;\n }\n\n /** Create a copy of these lights, identical except for any properties explicitly specified by `changed`. */\n public clone(changed?: HemisphereLightsProps): HemisphereLights {\n if (!changed)\n return this;\n\n const props = this.toJSON() || {};\n if (undefined !== changed.upperColor)\n props.upperColor = changed.upperColor;\n\n if (undefined !== changed.lowerColor)\n props.lowerColor = changed.lowerColor;\n\n if (undefined !== changed.intensity)\n props.intensity = changed.intensity;\n\n return new HemisphereLights(props);\n }\n\n public equals(rhs: HemisphereLights): boolean {\n return this.intensity === rhs.intensity && this.upperColor.equals(rhs.upperColor) && this.lowerColor.equals(rhs.lowerColor);\n }\n}\n\n/** JSON representation of a [[FresnelSettings]].\n * @public\n * @extensions\n */\nexport interface FresnelSettingsProps {\n /** See [[FresnelSettings.intensity]].\n * Default value: 0\n */\n intensity?: number;\n\n /** See [[FresnelSettings.invert]].\n * Default value: false\n */\n invert?: boolean;\n}\n\nfunction clampIntensity(intensity = 0): number {\n return Math.max(intensity, 0);\n}\n\n/** As part of a [[LightSettings]], describes how to apply a Fresnel effect to the contents of the view.\n * The \"Fresnel effect\" is based on the observation that the reflectivity of a surface varies based on the angle between the surface and\n * the viewer's line of sight. For example, a flat surface will appear more reflective when viewed at a glancing angle than it will when\n * viewed from above; and a sphere will appear more reflective around its edges than at its center.\n *\n * This principle can be used to improve photorealism, but the implementation provided here is intended to produce non-realistic but\n * aesthetically-pleasing results.\n * @see [[LightSettings.fresnel]].\n * @public\n */\nexport class FresnelSettings {\n /** The strength of the effect in terms of how much brighter the surface becomes. The intensity at a given point on the surface is determined by\n * the angle between the viewer's line of sight and the vector from the viewer to that point. Maximum intensity is produced when those vectors are\n * perpendicular, and zero intensity is produced when those vectors are parallel (unless [[invert]] is `true`).\n *\n * A value of zero turns off the effect. Values less than zero are clamped to zero. Typical values range between 0 and 1.\n */\n public readonly intensity: number;\n /** If true, inverts the effect's [[intensity]] such that maximum intensity is produced when the viewer's line of sight is parallel to the vector between\n * the viewer and the point on the surface, and zero intensity is produced when the viewer's line of sight is perpendicular to that vector.\n */\n public readonly invert: boolean;\n\n private constructor(intensity: number, invert: boolean) {\n assert(intensity >= 0);\n this.intensity = intensity;\n this.invert = invert;\n }\n\n private static readonly _defaults = new FresnelSettings(0, false);\n\n /** Create from JSON representation, using default values for any unspecified or `undefined` properties. */\n public static fromJSON(props?: FresnelSettingsProps): FresnelSettings {\n const intensity = clampIntensity(JsonUtils.asDouble(props?.intensity));\n const invert = JsonUtils.asBool(props?.invert);\n if (0 === intensity && !invert)\n return this._defaults;\n\n return new this(intensity, invert);\n }\n\n /** Create a new FresnelSettings.\n * @note Intensity values less than zero will be set to zero.\n */\n public static create(intensity = 0, invert = false): FresnelSettings {\n return this.fromJSON({ intensity, invert });\n }\n\n /** Convert to JSON representation.\n * @note If all settings match the default values, `undefined` will be returned.\n */\n public toJSON(): FresnelSettingsProps | undefined {\n if (0 === this.intensity && !this.invert)\n return undefined;\n\n const props: FresnelSettingsProps = {};\n if (0 !== this.intensity)\n props.intensity = this.intensity;\n\n if (this.invert)\n props.invert = true;\n\n return props;\n }\n\n /** Create a copy of these settings, modified to match any properties explicitly specified by `changedProps`. */\n public clone(changedProps?: FresnelSettingsProps): FresnelSettings {\n if ((undefined === changedProps?.intensity || changedProps.intensity === this.intensity)\n && (undefined === changedProps?.invert || changedProps.invert === this.invert))\n return this;\n\n const intensity = changedProps?.intensity ?? this.intensity;\n const invert = changedProps?.invert ?? this.invert;\n return FresnelSettings.fromJSON({ intensity, invert });\n }\n\n /** Return true if these settings are equivalent to `rhs`. */\n public equals(rhs: FresnelSettings): boolean {\n return this === rhs || (this.intensity === rhs.intensity && this.invert === rhs.invert);\n }\n}\n\n/** Wire format for a [[LightSettings]] describing lighting for a 3d scene.\n * 3d lighting provides the following lights, all of which are optional:\n * - A \"portrait\" light affixed to the camera and pointing directly forward into the scene. Color: white.\n * - A second directional light. Color: white.\n * - This can be a solar shadow-casting light, or (when shadows are disabled) a roughly overhead light oriented in view space.\n * - A pair of hemisphere lights pointing in opposite directions along the world Z axis. Each has its own customizable color.\n * - An ambient light of any color applied equally to all surfaces.\n * Specular intensity of all lights is controlled separately.\n * Light intensities are typically expressed in [0..1] but can be as large as 5.\n * @see [[DisplayStyle3dSettingsProps]]\n * @public\n * @extensions\n */\nexport interface LightSettingsProps {\n /** A white portrait light affixed to the camera and pointing directly forward into the scene. */\n portrait?: {\n /** Intensity, typically in [0..1], maximum 5. Default: 0.3. */\n intensity?: number;\n };\n /** Solar light settings. */\n solar?: SolarLightProps;\n /** Hemisphere light settings. */\n hemisphere?: HemisphereLightsProps;\n /** Ambient light settings. */\n ambient?: AmbientLightProps;\n /** Specular intensity applied to all lights. */\n specularIntensity?: number;\n /** Applies a [cel-shaded](https://en.wikipedia.org/wiki/Cel_shading) effect. If greater than zero, specifies the number of cels. Continuous lighting intensities\n * are computed, then quantized to the specified number of cels. Values greater than 254 have no visible effect.\n * Typically a value of 2 is appropriate if specular intensity is close to zero; 3 if specular intensity is larger.\n * Cel-shading is often combined with thick, dark visible edges for a cartoon or comic book effect.\n * Default: 0\n */\n numCels?: number;\n\n /** Fresnel settings.\n * @see [[FresnelSettings]].\n */\n fresnel?: FresnelSettingsProps;\n}\n\n/** Describes the lighting for a 3d scene, associated with a [[DisplayStyle3dSettings]] in turn associated with a [DisplayStyle3d]($backend) or [DisplayStyle3dState]($frontend).\n * @see [[LightSettingsProps]]\n * @public\n */\nexport class LightSettings {\n public readonly solar: SolarLight;\n public readonly ambient: AmbientLight;\n public readonly hemisphere: HemisphereLights;\n /** See [[LightSettingsProps.portrait]]. */\n public readonly portraitIntensity: number;\n public readonly specularIntensity: number;\n /** See [[LightSettingsProps.numCels]]. */\n public readonly numCels: number;\n public readonly fresnel: FresnelSettings;\n\n private constructor(solar: SolarLight, ambient: AmbientLight, hemisphere: HemisphereLights, portraitIntensity: number, specularIntensity: number, numCels: number,\n fresnel: FresnelSettings) {\n this.solar = solar;\n this.ambient = ambient;\n this.hemisphere = hemisphere;\n this.portraitIntensity = portraitIntensity;\n this.specularIntensity = specularIntensity;\n this.numCels = numCels;\n this.fresnel = fresnel;\n }\n\n public static fromJSON(props?: LightSettingsProps): LightSettings {\n const solar = new SolarLight(props?.solar);\n const ambient = new AmbientLight(props?.ambient);\n const hemisphere = new HemisphereLights(props?.hemisphere);\n const portraitIntensity = extractIntensity(props?.portrait?.intensity, 0.3);\n const specularIntensity = extractIntensity(props?.specularIntensity, 1.0);\n const numCels = JsonUtils.asInt(props?.numCels, 0);\n const fresnel = FresnelSettings.fromJSON(props?.fresnel);\n\n return new LightSettings(solar, ambient, hemisphere, portraitIntensity, specularIntensity, numCels, fresnel);\n }\n\n public toJSON(): LightSettingsProps | undefined {\n const solar = this.solar.toJSON();\n const ambient = this.ambient.toJSON();\n const hemisphere = this.hemisphere.toJSON();\n const portrait = 0.3 !== this.portraitIntensity ? { intensity: this.portraitIntensity } : undefined;\n const specularIntensity = 1 !== this.specularIntensity ? this.specularIntensity : undefined;\n const numCels = 0 !== this.numCels ? this.numCels : undefined;\n const fresnel = this.fresnel.toJSON();\n\n if (!solar && !ambient && !hemisphere && !portrait && undefined === specularIntensity && undefined === numCels && undefined === fresnel)\n return undefined;\n\n const json: LightSettingsProps = {};\n if (solar)\n json.solar = solar;\n\n if (ambient)\n json.ambient = ambient;\n\n if (hemisphere)\n json.hemisphere = hemisphere;\n\n if (portrait)\n json.portrait = portrait;\n\n if (undefined !== specularIntensity)\n json.specularIntensity = specularIntensity;\n\n if (undefined !== numCels)\n json.numCels = numCels;\n\n if (fresnel)\n json.fresnel = fresnel;\n\n return json;\n }\n\n /** Create a copy of these light settings, identical except for any properties explicitly specified by `changed`.\n * Note that the solar, ambient, and hemisphere lights will also be cloned using their own `clone` methods - so for example, the following:\n * ` clone({ ambient: { intensity: 0.5 } })`\n * will overwrite the ambient light's intensity but preserve its current color, rather than replacing the color with the default color.\n */\n public clone(changed?: LightSettingsProps): LightSettings {\n if (!changed)\n return this;\n\n const solar = this.solar.clone(changed.solar);\n const ambient = this.ambient.clone(changed.ambient);\n const hemisphere = this.hemisphere.clone(changed.hemisphere);\n const portrait = changed.portrait?.intensity ?? this.portraitIntensity;\n const specular = changed.specularIntensity ?? this.specularIntensity;\n const numCels = changed.numCels ?? this.numCels;\n const fresnel = this.fresnel.clone(changed.fresnel);\n\n return new LightSettings(solar, ambient, hemisphere, portrait, specular, numCels, fresnel);\n }\n\n public equals(rhs: LightSettings): boolean {\n if (this === rhs)\n return true;\n\n return this.portraitIntensity === rhs.portraitIntensity && this.specularIntensity === rhs.specularIntensity && this.numCels === rhs.numCels\n && this.ambient.equals(rhs.ambient) && this.solar.equals(rhs.solar) && this.hemisphere.equals(rhs.hemisphere) && this.fresnel.equals(rhs.fresnel);\n }\n}\n"]}
1
+ {"version":3,"file":"LightSettings.js","sourceRoot":"","sources":["../../src/LightSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAwD;AACxD,wDAA0D;AAC1D,yCAAqD;AAErD,SAAS,gBAAgB,CAAC,KAAyB,EAAE,YAAoB;IACvE,MAAM,YAAY,GAAG,CAAC,CAAC;IACvB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;AAC/F,CAAC;AAyBD,MAAM,qBAAqB,GAAG,wBAAQ,CAAC,MAAM,CAAC,QAAQ,EAA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,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEpD,OAAO,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7F,CAAC;IAEM,MAAM,CAAC,GAAkB;QAC9B,IAAI,IAAI,KAAK,GAAG;YACd,OAAO,IAAI,CAAC;QAEd,OAAO,IAAI,CAAC,iBAAiB,KAAK,GAAG,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,KAAK,GAAG,CAAC,iBAAiB,IAAI,IAAI,CAAC,OAAO,KAAK,GAAG,CAAC,OAAO;eACtI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACtJ,CAAC;CACF;AAlGD,sCAkGC","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 DisplayStyles\n */\n\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\nimport { Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\n\nfunction extractIntensity(value: number | undefined, defaultValue: number) {\n const maxIntensity = 5;\n return typeof value === \"number\" ? Math.max(0, Math.min(maxIntensity, value)) : defaultValue;\n}\n\n/** Wire format for the solar directional light associated with a [[LightSettingsProps]].\n * The light is colored white and oriented in any direction in world coordinates.\n * It will cast shadows if it is above the world XY plane and if the shadows view flag is enabled for the view.\n * By default, the solar light is only applied when shadows are enabled, but can be set to be applied unconditionally.\n * @public\n * @extensions\n */\nexport interface SolarLightProps {\n /** Intensity of the light, typically in [0..1] but can range up to 5. Default: 1.0 */\n intensity?: number;\n /** Direction of the light in world coordinates. Defaults to a vector looking down on the scene at a 45 degree angle mostly along the Y axis. */\n direction?: XYZProps;\n /** If true, the light will be applied even when shadows are turned off for the view.\n * If false, a roughly overhead light of the same intensity oriented in view space will be used instead.\n * Default: false.\n */\n alwaysEnabled?: boolean;\n /** If defined, the time in UNIX milliseconds from which [[direction]] was calculated.\n * @see [[DisplayStyleSettings.setSunTime]] to compute the solar direction from a point in time.\n */\n timePoint?: number;\n}\n\nconst defaultSolarDirection = Vector3d.create(0.272166, 0.680414, 0.680414);\n\n/** Describes the solar directional light associated with a [[LightSettings]].\n * @see [[SolarLightProps]].\n * @public\n */\nexport class SolarLight {\n /** Direction of the light in world coordinates. Defaults to a vector looking down on the scene at a 45 degree angle mostly along the Y axis. */\n public readonly direction: Readonly<Vector3d>;\n /** Intensity of the light, typically in [0..1] but can range up to 5. Default: 1.0 */\n public readonly intensity: number;\n /** If true, the light will be applied even when shadows are turned off for the view.\n * If false, a roughly overhead light of the same intensity oriented in view space will be used instead.\n * Default: false.\n */\n public readonly alwaysEnabled: boolean;\n /** If defined, the time in UNIX milliseconds from which [[direction]] was calculated.\n * @see [[DisplayStyleSettings.setSunTime]] to compute the solar direction from a point in time.\n */\n public readonly timePoint?: number;\n\n public constructor(json?: SolarLightProps) {\n json = json || {};\n this.intensity = extractIntensity(json.intensity, 1);\n this.alwaysEnabled = JsonUtils.asBool(json.alwaysEnabled);\n\n if (json.direction)\n this.direction = Vector3d.fromJSON(json.direction);\n else\n this.direction = defaultSolarDirection.clone();\n\n if (typeof json.timePoint === \"number\")\n this.timePoint = json.timePoint;\n }\n\n public toJSON(): SolarLightProps | undefined {\n const direction = this.direction.isAlmostEqual(defaultSolarDirection) ? undefined : this.direction.toJSON();\n const intensity = this.intensity !== 1 ? this.intensity : undefined;\n const alwaysEnabled = this.alwaysEnabled ? true : undefined;\n const timePoint = this.timePoint;\n\n if (undefined === direction && undefined === intensity && undefined === alwaysEnabled && undefined === timePoint)\n return undefined;\n\n const json: SolarLightProps = {};\n if (direction)\n json.direction = direction;\n\n if (undefined !== intensity)\n json.intensity = intensity;\n\n if (undefined !== alwaysEnabled)\n json.alwaysEnabled = alwaysEnabled;\n\n if (undefined !== timePoint)\n json.timePoint = timePoint;\n\n return json;\n }\n\n /** Create a copy of this SolarLight, identical except in any properties explicitly specified by `changedProps`, with a possible exception for [[timePoint]].\n * If `this.timePoint` is defined and `changedProps` defines `direction` but **doesn't** define `timePoint`, the time point will only be preserved in the\n * copy if `changesProps.direction` is equal to `this.direction`.\n */\n public clone(changedProps?: SolarLightProps): SolarLight {\n if (!changedProps)\n return this;\n\n const props = this.toJSON() ?? {};\n if (undefined !== changedProps.direction)\n props.direction = changedProps.direction;\n\n if (undefined !== changedProps.intensity)\n props.intensity = changedProps.intensity;\n\n if (undefined !== changedProps.alwaysEnabled)\n props.alwaysEnabled = changedProps.alwaysEnabled;\n\n if (undefined !== changedProps.timePoint)\n props.timePoint = changedProps.timePoint;\n\n // If our direction was computed from a time point and the caller only supplies a direction, invalidate the time point unless the input direction matches our direction.\n // If caller explicitly supplied a timePoint, trust it.\n if (undefined !== this.timePoint && undefined === changedProps.timePoint && undefined !== changedProps.direction) {\n const newDirection = Vector3d.fromJSON(changedProps.direction);\n if (!newDirection.isAlmostEqual(this.direction))\n props.timePoint = undefined;\n }\n\n return new SolarLight(props);\n }\n\n public equals(rhs: SolarLight): boolean {\n return this.intensity === rhs.intensity && this.alwaysEnabled === rhs.alwaysEnabled && this.direction.isExactEqual(rhs.direction) && this.timePoint === rhs.timePoint;\n }\n}\n\n/** Wire format for the ambient light associated with a [[LightSettingsProps]].\n * Ambient light applies equally to all surfaces in the scene.\n * @public\n * @extensions\n */\nexport interface AmbientLightProps {\n /** The color of the light. Black is treated as a special case, indicating that the surface's own diffuse color should be used. */\n color?: RgbColorProps;\n /** The intensity of the light. Default: 0.2. */\n intensity?: number;\n}\n\n/** Describes the ambient light associated with a [[LightSettings]].\n * @see [[AmbientLightProps]]\n * @public\n */\nexport class AmbientLight {\n public readonly color: RgbColor;\n public readonly intensity: number;\n\n public constructor(json?: AmbientLightProps) {\n json = json || {};\n this.intensity = extractIntensity(json.intensity, 0.2);\n this.color = json.color ? RgbColor.fromJSON(json.color) : new RgbColor(0, 0, 0);\n }\n\n public toJSON(): AmbientLightProps | undefined {\n const color = this.color.r !== 0 || this.color.g !== 0 || this.color.b !== 0 ? this.color.toJSON() : undefined;\n const intensity = 0.2 !== this.intensity ? this.intensity : undefined;\n if (undefined === color && undefined === intensity)\n return undefined;\n\n const json: AmbientLightProps = {};\n if (color)\n json.color = color;\n\n if (undefined !== intensity)\n json.intensity = intensity;\n\n return json;\n }\n\n /** Create a copy of this light, identical except for any properties explicitly specified by `changed`. */\n public clone(changed?: AmbientLightProps): AmbientLight {\n if (!changed)\n return this;\n\n const props = this.toJSON() ?? {};\n if (undefined !== changed.intensity)\n props.intensity = changed.intensity;\n\n if (undefined !== changed.color)\n props.color = changed.color;\n\n return new AmbientLight(props);\n }\n\n public equals(rhs: AmbientLight): boolean {\n return this.intensity === rhs.intensity && this.color.equals(rhs.color);\n }\n}\n\n/** Wire format for a pair of hemisphere lights associated with a [[LightSettingsProps]].\n * Hemisphere lights are oriented in opposite directions along the world Z axis. Each has its own color; they share one intensity.\n * They are often used to simulate outdoor reflection of light from the ground and sky, so the colors often match the ground and sky colors\n * of the [[SkyBox]].\n * @public\n * @extensions\n */\nexport interface HemisphereLightsProps {\n /** The color of the downward-facing light. Default: (143, 205, 255). */\n upperColor?: RgbColorProps;\n /** The color of the upward-facing light. Default: (120, 143, 125). */\n lowerColor?: RgbColorProps;\n /** Intensity of the lights. Default: 0. */\n intensity?: number;\n}\n\nconst defaultUpperHemisphereColor = new RgbColor(143, 205, 255);\nconst defaultLowerHemisphereColor = new RgbColor(120, 143, 125);\n\n/** Describes a pair of hemisphere lights associated with a [[LightSettings]].\n * @see [[HemisphereLightsProps]]\n * @public\n */\nexport class HemisphereLights {\n public readonly upperColor: RgbColor;\n public readonly lowerColor: RgbColor;\n public readonly intensity: number;\n\n public constructor(json?: HemisphereLightsProps) {\n json = json || {};\n this.intensity = extractIntensity(json.intensity, 0);\n this.upperColor = json.upperColor ? RgbColor.fromJSON(json.upperColor) : defaultUpperHemisphereColor;\n this.lowerColor = json.lowerColor ? RgbColor.fromJSON(json.lowerColor) : defaultLowerHemisphereColor;\n }\n\n public toJSON(): HemisphereLightsProps | undefined {\n const upperColor = this.upperColor.equals(defaultUpperHemisphereColor) ? undefined : this.upperColor.toJSON();\n const lowerColor = this.lowerColor.equals(defaultLowerHemisphereColor) ? undefined : this.lowerColor.toJSON();\n const intensity = 0 === this.intensity ? undefined : this.intensity;\n\n if (undefined === upperColor && undefined === lowerColor && undefined === intensity)\n return undefined;\n\n const json: HemisphereLightsProps = {};\n if (upperColor)\n json.upperColor = upperColor;\n\n if (lowerColor)\n json.lowerColor = lowerColor;\n\n if (undefined !== intensity)\n json.intensity = intensity;\n\n return json;\n }\n\n /** Create a copy of these lights, identical except for any properties explicitly specified by `changed`. */\n public clone(changed?: HemisphereLightsProps): HemisphereLights {\n if (!changed)\n return this;\n\n const props = this.toJSON() || {};\n if (undefined !== changed.upperColor)\n props.upperColor = changed.upperColor;\n\n if (undefined !== changed.lowerColor)\n props.lowerColor = changed.lowerColor;\n\n if (undefined !== changed.intensity)\n props.intensity = changed.intensity;\n\n return new HemisphereLights(props);\n }\n\n public equals(rhs: HemisphereLights): boolean {\n return this.intensity === rhs.intensity && this.upperColor.equals(rhs.upperColor) && this.lowerColor.equals(rhs.lowerColor);\n }\n}\n\n/** JSON representation of a [[FresnelSettings]].\n * @public\n * @extensions\n */\nexport interface FresnelSettingsProps {\n /** See [[FresnelSettings.intensity]].\n * Default value: 0\n */\n intensity?: number;\n\n /** See [[FresnelSettings.invert]].\n * Default value: false\n */\n invert?: boolean;\n}\n\nfunction clampIntensity(intensity = 0): number {\n return Math.max(intensity, 0);\n}\n\n/** As part of a [[LightSettings]], describes how to apply a Fresnel effect to the contents of the view.\n * The \"Fresnel effect\" is based on the observation that the reflectivity of a surface varies based on the angle between the surface and\n * the viewer's line of sight. For example, a flat surface will appear more reflective when viewed at a glancing angle than it will when\n * viewed from above; and a sphere will appear more reflective around its edges than at its center.\n *\n * This principle can be used to improve photorealism, but the implementation provided here is intended to produce non-realistic but\n * aesthetically-pleasing results.\n * @see [[LightSettings.fresnel]].\n * @public\n */\nexport class FresnelSettings {\n /** The strength of the effect in terms of how much brighter the surface becomes. The intensity at a given point on the surface is determined by\n * the angle between the viewer's line of sight and the vector from the viewer to that point. Maximum intensity is produced when those vectors are\n * perpendicular, and zero intensity is produced when those vectors are parallel (unless [[invert]] is `true`).\n *\n * A value of zero turns off the effect. Values less than zero are clamped to zero. Typical values range between 0 and 1.\n */\n public readonly intensity: number;\n /** If true, inverts the effect's [[intensity]] such that maximum intensity is produced when the viewer's line of sight is parallel to the vector between\n * the viewer and the point on the surface, and zero intensity is produced when the viewer's line of sight is perpendicular to that vector.\n */\n public readonly invert: boolean;\n\n private constructor(intensity: number, invert: boolean) {\n assert(intensity >= 0);\n this.intensity = intensity;\n this.invert = invert;\n }\n\n private static readonly _defaults = new FresnelSettings(0, false);\n\n /** Create from JSON representation, using default values for any unspecified or `undefined` properties. */\n public static fromJSON(props?: FresnelSettingsProps): FresnelSettings {\n const intensity = clampIntensity(JsonUtils.asDouble(props?.intensity));\n const invert = JsonUtils.asBool(props?.invert);\n if (0 === intensity && !invert)\n return this._defaults;\n\n return new this(intensity, invert);\n }\n\n /** Create a new FresnelSettings.\n * @note Intensity values less than zero will be set to zero.\n */\n public static create(intensity = 0, invert = false): FresnelSettings {\n return this.fromJSON({ intensity, invert });\n }\n\n /** Convert to JSON representation.\n * @note If all settings match the default values, `undefined` will be returned.\n */\n public toJSON(): FresnelSettingsProps | undefined {\n if (0 === this.intensity && !this.invert)\n return undefined;\n\n const props: FresnelSettingsProps = {};\n if (0 !== this.intensity)\n props.intensity = this.intensity;\n\n if (this.invert)\n props.invert = true;\n\n return props;\n }\n\n /** Create a copy of these settings, modified to match any properties explicitly specified by `changedProps`. */\n public clone(changedProps?: FresnelSettingsProps): FresnelSettings {\n if ((undefined === changedProps?.intensity || changedProps.intensity === this.intensity)\n && (undefined === changedProps?.invert || changedProps.invert === this.invert))\n return this;\n\n const intensity = changedProps?.intensity ?? this.intensity;\n const invert = changedProps?.invert ?? this.invert;\n return FresnelSettings.fromJSON({ intensity, invert });\n }\n\n /** Return true if these settings are equivalent to `rhs`. */\n public equals(rhs: FresnelSettings): boolean {\n return this === rhs || (this.intensity === rhs.intensity && this.invert === rhs.invert);\n }\n}\n\n/** Wire format for a [[LightSettings]] describing lighting for a 3d scene.\n * 3d lighting provides the following lights, all of which are optional:\n * - A \"portrait\" light affixed to the camera and pointing directly forward into the scene. Color: white.\n * - A second directional light. Color: white.\n * - This can be a solar shadow-casting light, or (when shadows are disabled) a roughly overhead light oriented in view space.\n * - A pair of hemisphere lights pointing in opposite directions along the world Z axis. Each has its own customizable color.\n * - An ambient light of any color applied equally to all surfaces.\n * Specular intensity of all lights is controlled separately.\n * Light intensities are typically expressed in [0..1] but can be as large as 5.\n * @see [[DisplayStyle3dSettingsProps]]\n * @public\n * @extensions\n */\nexport interface LightSettingsProps {\n /** A white portrait light affixed to the camera and pointing directly forward into the scene. */\n portrait?: {\n /** Intensity, typically in [0..1], maximum 5. Default: 0.3. */\n intensity?: number;\n };\n /** Solar light settings. */\n solar?: SolarLightProps;\n /** Hemisphere light settings. */\n hemisphere?: HemisphereLightsProps;\n /** Ambient light settings. */\n ambient?: AmbientLightProps;\n /** Specular intensity applied to all lights. */\n specularIntensity?: number;\n /** Applies a [cel-shaded](https://en.wikipedia.org/wiki/Cel_shading) effect. If greater than zero, specifies the number of cels. Continuous lighting intensities\n * are computed, then quantized to the specified number of cels. Values greater than 254 have no visible effect.\n * Typically a value of 2 is appropriate if specular intensity is close to zero; 3 if specular intensity is larger.\n * Cel-shading is often combined with thick, dark visible edges for a cartoon or comic book effect.\n * Default: 0\n */\n numCels?: number;\n\n /** Fresnel settings.\n * @see [[FresnelSettings]].\n */\n fresnel?: FresnelSettingsProps;\n}\n\n/** Describes the lighting for a 3d scene, associated with a [[DisplayStyle3dSettings]] in turn associated with a [DisplayStyle3d]($backend) or [DisplayStyle3dState]($frontend).\n * @see [[LightSettingsProps]]\n * @public\n */\nexport class LightSettings {\n public readonly solar: SolarLight;\n public readonly ambient: AmbientLight;\n public readonly hemisphere: HemisphereLights;\n /** See [[LightSettingsProps.portrait]]. */\n public readonly portraitIntensity: number;\n public readonly specularIntensity: number;\n /** See [[LightSettingsProps.numCels]]. */\n public readonly numCels: number;\n public readonly fresnel: FresnelSettings;\n\n private constructor(solar: SolarLight, ambient: AmbientLight, hemisphere: HemisphereLights, portraitIntensity: number, specularIntensity: number, numCels: number,\n fresnel: FresnelSettings) {\n this.solar = solar;\n this.ambient = ambient;\n this.hemisphere = hemisphere;\n this.portraitIntensity = portraitIntensity;\n this.specularIntensity = specularIntensity;\n this.numCels = numCels;\n this.fresnel = fresnel;\n }\n\n public static fromJSON(props?: LightSettingsProps): LightSettings {\n const solar = new SolarLight(props?.solar);\n const ambient = new AmbientLight(props?.ambient);\n const hemisphere = new HemisphereLights(props?.hemisphere);\n const portraitIntensity = extractIntensity(props?.portrait?.intensity, 0.3);\n const specularIntensity = extractIntensity(props?.specularIntensity, 1.0);\n const numCels = JsonUtils.asInt(props?.numCels, 0);\n const fresnel = FresnelSettings.fromJSON(props?.fresnel);\n\n return new LightSettings(solar, ambient, hemisphere, portraitIntensity, specularIntensity, numCels, fresnel);\n }\n\n public toJSON(): LightSettingsProps | undefined {\n const solar = this.solar.toJSON();\n const ambient = this.ambient.toJSON();\n const hemisphere = this.hemisphere.toJSON();\n const portrait = 0.3 !== this.portraitIntensity ? { intensity: this.portraitIntensity } : undefined;\n const specularIntensity = 1 !== this.specularIntensity ? this.specularIntensity : undefined;\n const numCels = 0 !== this.numCels ? this.numCels : undefined;\n const fresnel = this.fresnel.toJSON();\n\n if (!solar && !ambient && !hemisphere && !portrait && undefined === specularIntensity && undefined === numCels && undefined === fresnel)\n return undefined;\n\n const json: LightSettingsProps = {};\n if (solar)\n json.solar = solar;\n\n if (ambient)\n json.ambient = ambient;\n\n if (hemisphere)\n json.hemisphere = hemisphere;\n\n if (portrait)\n json.portrait = portrait;\n\n if (undefined !== specularIntensity)\n json.specularIntensity = specularIntensity;\n\n if (undefined !== numCels)\n json.numCels = numCels;\n\n if (fresnel)\n json.fresnel = fresnel;\n\n return json;\n }\n\n /** Create a copy of these light settings, identical except for any properties explicitly specified by `changed`.\n * Note that the solar, ambient, and hemisphere lights will also be cloned using their own `clone` methods - so for example, the following:\n * ` clone({ ambient: { intensity: 0.5 } })`\n * will overwrite the ambient light's intensity but preserve its current color, rather than replacing the color with the default color.\n */\n public clone(changed?: LightSettingsProps): LightSettings {\n if (!changed)\n return this;\n\n const solar = this.solar.clone(changed.solar);\n const ambient = this.ambient.clone(changed.ambient);\n const hemisphere = this.hemisphere.clone(changed.hemisphere);\n const portrait = changed.portrait?.intensity ?? this.portraitIntensity;\n const specular = changed.specularIntensity ?? this.specularIntensity;\n const numCels = changed.numCels ?? this.numCels;\n const fresnel = this.fresnel.clone(changed.fresnel);\n\n return new LightSettings(solar, ambient, hemisphere, portrait, specular, numCels, fresnel);\n }\n\n public equals(rhs: LightSettings): boolean {\n if (this === rhs)\n return true;\n\n return this.portraitIntensity === rhs.portraitIntensity && this.specularIntensity === rhs.specularIntensity && this.numCels === rhs.numCels\n && this.ambient.equals(rhs.ambient) && this.solar.equals(rhs.solar) && this.hemisphere.equals(rhs.hemisphere) && this.fresnel.equals(rhs.fresnel);\n }\n}\n"]}
@@ -53,15 +53,6 @@ export interface Localization {
53
53
  * @throws Error if no keys resolve to a string.
54
54
  */
55
55
  getLocalizedString(key: string | string[], options?: TranslationOptions): string;
56
- /** Similar to `getLocalizedString` but the namespace is a separate param and the key does not include the namespace.
57
- * @param namespace - the namespace that identifies the particular localization file that contains the property.
58
- * @param key - the key that matches a property in the JSON localization file.
59
- * @returns The string corresponding to the first key that resolves.
60
- * @throws Error if no keys resolve to a string.
61
- * @deprecated in 3.x. Use `getLocalizedString` instead; providing either a key with a namespace `<namespace>:<key>` or
62
- * including `{ ns: <namespace> }` in the options.
63
- */
64
- getLocalizedStringWithNamespace(namespace: string, key: string | string[], options?: TranslationOptions): string;
65
56
  /** get the English string for a key. */
66
57
  getEnglishString(namespace: string, key: string | string[], options?: TranslationOptions): string;
67
58
  /** Replace all instances of `%{key}` within a string with the translations of those keys.
@@ -106,7 +97,6 @@ export interface Localization {
106
97
  export declare class EmptyLocalization implements Localization {
107
98
  initialize(): Promise<void>;
108
99
  getLocalizedString(key: string | string[]): string;
109
- getLocalizedStringWithNamespace(_namespace: string, key: string | string[]): string;
110
100
  getEnglishString(_namespace: string, key: string | string[]): string;
111
101
  getLocalizedKeys(inputString: string): string;
112
102
  registerNamespace(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"Localization.d.ts","sourceRoot":"","sources":["../../src/Localization.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAA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C,EAAE,kBAAkB,GAAG,MAAM,CAAC;IAClG;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAE9C;;;;;;;OAOG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;OAEG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7C,gBAAgB;IAChB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IAE7D,2DAA2D;IAC3D,eAAe,IAAI,SAAS,MAAM,EAAE,CAAC;IAErC;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,qBAAa,iBAAkB,YAAW,YAAY;IACvC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IACjC,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IAQlD,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IACpE,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IACvC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IACxC,mBAAmB,IAAI,IAAI;IAC3B,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS;IAChD,eAAe,IAAI,SAAS,MAAM,EAAE;IAC9B,cAAc;CAC5B"}
@@ -21,7 +21,6 @@ class EmptyLocalization {
21
21
  // Namely, remove the leading namespace substring if there is one
22
22
  return key.split(":", 2).pop();
23
23
  }
24
- getLocalizedStringWithNamespace(_namespace, key) { return this.getLocalizedString(key); }
25
24
  getEnglishString(_namespace, key) { return this.getLocalizedString(key); }
26
25
  getLocalizedKeys(inputString) { return inputString; }
27
26
  async registerNamespace() { }