@itwin/core-common 5.5.0-dev.1 → 5.5.0-dev.2

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 (345) hide show
  1. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  2. package/lib/cjs/AnalysisStyle.js.map +1 -1
  3. package/lib/cjs/Atmosphere.js.map +1 -1
  4. package/lib/cjs/AuthorizationClient.js.map +1 -1
  5. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  6. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  7. package/lib/cjs/Base64EncodedString.js.map +1 -1
  8. package/lib/cjs/BlobReader.js.map +1 -1
  9. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  10. package/lib/cjs/Camera.js.map +1 -1
  11. package/lib/cjs/CatalogIModel.js.map +1 -1
  12. package/lib/cjs/CesiumIonAssets.js.map +1 -1
  13. package/lib/cjs/ChangedElements.js.map +1 -1
  14. package/lib/cjs/ChangedEntities.js.map +1 -1
  15. package/lib/cjs/ChangesetProps.js.map +1 -1
  16. package/lib/cjs/ClipStyle.js.map +1 -1
  17. package/lib/cjs/Code.js.map +1 -1
  18. package/lib/cjs/ColorByName.js.map +1 -1
  19. package/lib/cjs/ColorDef.js.map +1 -1
  20. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  21. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  22. package/lib/cjs/ContextRealityModel.js.map +1 -1
  23. package/lib/cjs/ContourDisplay.js.map +1 -1
  24. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  25. package/lib/cjs/ECSchemaProps.js.map +1 -1
  26. package/lib/cjs/ECSqlReader.js.map +1 -1
  27. package/lib/cjs/ECSqlTypes.js.map +1 -1
  28. package/lib/cjs/ElementMesh.js.map +1 -1
  29. package/lib/cjs/ElementProps.js.map +1 -1
  30. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  31. package/lib/cjs/EntityProps.js.map +1 -1
  32. package/lib/cjs/EntityReference.js.map +1 -1
  33. package/lib/cjs/Environment.js.map +1 -1
  34. package/lib/cjs/FeatureIndex.js.map +1 -1
  35. package/lib/cjs/FeatureSymbology.js.map +1 -1
  36. package/lib/cjs/FeatureTable.js.map +1 -1
  37. package/lib/cjs/Fonts.js.map +1 -1
  38. package/lib/cjs/Frustum.js.map +1 -1
  39. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  40. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  41. package/lib/cjs/GeometryContainment.js.map +1 -1
  42. package/lib/cjs/GeometryParams.js.map +1 -1
  43. package/lib/cjs/GeometrySummary.js.map +1 -1
  44. package/lib/cjs/Gradient.js.map +1 -1
  45. package/lib/cjs/GraphicParams.js.map +1 -1
  46. package/lib/cjs/GroundPlane.js.map +1 -1
  47. package/lib/cjs/HSLColor.js.map +1 -1
  48. package/lib/cjs/HSVColor.js.map +1 -1
  49. package/lib/cjs/HiddenLine.js.map +1 -1
  50. package/lib/cjs/Hilite.js.map +1 -1
  51. package/lib/cjs/IModel.js.map +1 -1
  52. package/lib/cjs/IModelError.js.map +1 -1
  53. package/lib/cjs/IModelVersion.js.map +1 -1
  54. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  55. package/lib/cjs/Image.js.map +1 -1
  56. package/lib/cjs/IpcAppProps.js.map +1 -1
  57. package/lib/cjs/LightSettings.js.map +1 -1
  58. package/lib/cjs/LinePixels.js.map +1 -1
  59. package/lib/cjs/Localization.js.map +1 -1
  60. package/lib/cjs/MapImagerySettings.js.map +1 -1
  61. package/lib/cjs/MapLayerSettings.js.map +1 -1
  62. package/lib/cjs/MassProperties.js.map +1 -1
  63. package/lib/cjs/MaterialProps.js.map +1 -1
  64. package/lib/cjs/ModelClipGroup.js.map +1 -1
  65. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  66. package/lib/cjs/ModelProps.js.map +1 -1
  67. package/lib/cjs/NativeAppProps.js.map +1 -1
  68. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  69. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  70. package/lib/cjs/PlanarClipMask.js.map +1 -1
  71. package/lib/cjs/QPoint.js.map +1 -1
  72. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  73. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  74. package/lib/cjs/RenderMaterial.js.map +1 -1
  75. package/lib/cjs/RenderPolyline.js.map +1 -1
  76. package/lib/cjs/RenderTexture.js.map +1 -1
  77. package/lib/cjs/RgbColor.js.map +1 -1
  78. package/lib/cjs/RpcInterface.js.map +1 -1
  79. package/lib/cjs/RpcManager.js.map +1 -1
  80. package/lib/cjs/SessionProps.js.map +1 -1
  81. package/lib/cjs/SkyBox.js.map +1 -1
  82. package/lib/cjs/SolarCalculate.js.map +1 -1
  83. package/lib/cjs/SolarShadows.js.map +1 -1
  84. package/lib/cjs/SpatialClassification.js.map +1 -1
  85. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  86. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  87. package/lib/cjs/TerrainSettings.js.map +1 -1
  88. package/lib/cjs/TextureMapping.js.map +1 -1
  89. package/lib/cjs/TextureProps.js.map +1 -1
  90. package/lib/cjs/ThematicDisplay.js.map +1 -1
  91. package/lib/cjs/Thumbnail.js.map +1 -1
  92. package/lib/cjs/TileProps.js.map +1 -1
  93. package/lib/cjs/Tween.js.map +1 -1
  94. package/lib/cjs/TxnAction.js.map +1 -1
  95. package/lib/cjs/ViewDetails.js.map +1 -1
  96. package/lib/cjs/ViewFlags.js.map +1 -1
  97. package/lib/cjs/ViewProps.js.map +1 -1
  98. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  99. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  100. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  101. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  102. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  103. package/lib/cjs/annotation/TextField.js.map +1 -1
  104. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  105. package/lib/cjs/core-common.js.map +1 -1
  106. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  107. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  108. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  109. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  110. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  111. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  112. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  113. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  114. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  115. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  116. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  117. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  118. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  119. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  120. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  121. package/lib/cjs/geometry/Placement.js.map +1 -1
  122. package/lib/cjs/geometry/Projection.js.map +1 -1
  123. package/lib/cjs/geometry/TextString.js.map +1 -1
  124. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  125. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  126. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  127. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  128. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  129. package/lib/cjs/internal/Snapping.js.map +1 -1
  130. package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
  131. package/lib/cjs/internal/cross-package.js.map +1 -1
  132. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  133. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  134. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  135. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  136. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  137. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  138. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  139. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  140. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  141. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  142. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  143. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  144. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  145. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  146. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  147. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  148. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  149. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  150. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  151. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  152. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  153. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  154. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  155. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  156. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  157. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  158. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  159. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  160. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  161. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  162. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  163. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  164. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  165. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  166. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  167. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  168. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  169. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  170. package/lib/cjs/tile/TileIO.js.map +1 -1
  171. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  172. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  173. package/lib/esm/AmbientOcclusion.js.map +1 -1
  174. package/lib/esm/AnalysisStyle.js.map +1 -1
  175. package/lib/esm/Atmosphere.js.map +1 -1
  176. package/lib/esm/AuthorizationClient.js.map +1 -1
  177. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  178. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  179. package/lib/esm/Base64EncodedString.js.map +1 -1
  180. package/lib/esm/BlobReader.js.map +1 -1
  181. package/lib/esm/BriefcaseTypes.js.map +1 -1
  182. package/lib/esm/Camera.js.map +1 -1
  183. package/lib/esm/CatalogIModel.js.map +1 -1
  184. package/lib/esm/CesiumIonAssets.js.map +1 -1
  185. package/lib/esm/ChangedElements.js.map +1 -1
  186. package/lib/esm/ChangedEntities.js.map +1 -1
  187. package/lib/esm/ChangesetProps.js.map +1 -1
  188. package/lib/esm/ClipStyle.js.map +1 -1
  189. package/lib/esm/Code.js.map +1 -1
  190. package/lib/esm/ColorByName.js.map +1 -1
  191. package/lib/esm/ColorDef.js.map +1 -1
  192. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  193. package/lib/esm/ConcurrentQuery.js.map +1 -1
  194. package/lib/esm/ContextRealityModel.js.map +1 -1
  195. package/lib/esm/ContourDisplay.js.map +1 -1
  196. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  197. package/lib/esm/ECSchemaProps.js.map +1 -1
  198. package/lib/esm/ECSqlReader.js.map +1 -1
  199. package/lib/esm/ECSqlTypes.js.map +1 -1
  200. package/lib/esm/ElementMesh.js.map +1 -1
  201. package/lib/esm/ElementProps.js.map +1 -1
  202. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  203. package/lib/esm/EntityProps.js.map +1 -1
  204. package/lib/esm/EntityReference.js.map +1 -1
  205. package/lib/esm/Environment.js.map +1 -1
  206. package/lib/esm/FeatureIndex.js.map +1 -1
  207. package/lib/esm/FeatureSymbology.js.map +1 -1
  208. package/lib/esm/FeatureTable.js.map +1 -1
  209. package/lib/esm/Fonts.js.map +1 -1
  210. package/lib/esm/Frustum.js.map +1 -1
  211. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  212. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  213. package/lib/esm/GeometryContainment.js.map +1 -1
  214. package/lib/esm/GeometryParams.js.map +1 -1
  215. package/lib/esm/GeometrySummary.js.map +1 -1
  216. package/lib/esm/Gradient.js.map +1 -1
  217. package/lib/esm/GraphicParams.js.map +1 -1
  218. package/lib/esm/GroundPlane.js.map +1 -1
  219. package/lib/esm/HSLColor.js.map +1 -1
  220. package/lib/esm/HSVColor.js.map +1 -1
  221. package/lib/esm/HiddenLine.js.map +1 -1
  222. package/lib/esm/Hilite.js.map +1 -1
  223. package/lib/esm/IModel.js.map +1 -1
  224. package/lib/esm/IModelError.js.map +1 -1
  225. package/lib/esm/IModelVersion.js.map +1 -1
  226. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  227. package/lib/esm/Image.js.map +1 -1
  228. package/lib/esm/IpcAppProps.js.map +1 -1
  229. package/lib/esm/LightSettings.js.map +1 -1
  230. package/lib/esm/LinePixels.js.map +1 -1
  231. package/lib/esm/Localization.js.map +1 -1
  232. package/lib/esm/MapImagerySettings.js.map +1 -1
  233. package/lib/esm/MapLayerSettings.js.map +1 -1
  234. package/lib/esm/MassProperties.js.map +1 -1
  235. package/lib/esm/MaterialProps.js.map +1 -1
  236. package/lib/esm/ModelClipGroup.js.map +1 -1
  237. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  238. package/lib/esm/ModelProps.js.map +1 -1
  239. package/lib/esm/NativeAppProps.js.map +1 -1
  240. package/lib/esm/OctEncodedNormal.js.map +1 -1
  241. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  242. package/lib/esm/PlanarClipMask.js.map +1 -1
  243. package/lib/esm/QPoint.js.map +1 -1
  244. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  245. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  246. package/lib/esm/RenderMaterial.js.map +1 -1
  247. package/lib/esm/RenderPolyline.js.map +1 -1
  248. package/lib/esm/RenderTexture.js.map +1 -1
  249. package/lib/esm/RgbColor.js.map +1 -1
  250. package/lib/esm/RpcInterface.js.map +1 -1
  251. package/lib/esm/RpcManager.js.map +1 -1
  252. package/lib/esm/SessionProps.js.map +1 -1
  253. package/lib/esm/SkyBox.js.map +1 -1
  254. package/lib/esm/SolarCalculate.js.map +1 -1
  255. package/lib/esm/SolarShadows.js.map +1 -1
  256. package/lib/esm/SpatialClassification.js.map +1 -1
  257. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  258. package/lib/esm/SubCategoryOverride.js.map +1 -1
  259. package/lib/esm/TerrainSettings.js.map +1 -1
  260. package/lib/esm/TextureMapping.js.map +1 -1
  261. package/lib/esm/TextureProps.js.map +1 -1
  262. package/lib/esm/ThematicDisplay.js.map +1 -1
  263. package/lib/esm/Thumbnail.js.map +1 -1
  264. package/lib/esm/TileProps.js.map +1 -1
  265. package/lib/esm/Tween.js.map +1 -1
  266. package/lib/esm/TxnAction.js.map +1 -1
  267. package/lib/esm/ViewDetails.js.map +1 -1
  268. package/lib/esm/ViewFlags.js.map +1 -1
  269. package/lib/esm/ViewProps.js.map +1 -1
  270. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  271. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  272. package/lib/esm/annotation/TextBlock.js.map +1 -1
  273. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  274. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  275. package/lib/esm/annotation/TextField.js.map +1 -1
  276. package/lib/esm/annotation/TextStyle.js.map +1 -1
  277. package/lib/esm/core-common.js.map +1 -1
  278. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  279. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  280. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  281. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  282. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  283. package/lib/esm/geometry/Cartographic.js.map +1 -1
  284. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  285. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  286. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  287. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  288. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  289. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  290. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  291. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  292. package/lib/esm/geometry/LineStyle.js.map +1 -1
  293. package/lib/esm/geometry/Placement.js.map +1 -1
  294. package/lib/esm/geometry/Projection.js.map +1 -1
  295. package/lib/esm/geometry/TextString.js.map +1 -1
  296. package/lib/esm/internal/BackendTypes.js.map +1 -1
  297. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  298. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  299. package/lib/esm/internal/RenderMesh.js.map +1 -1
  300. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  301. package/lib/esm/internal/Snapping.js.map +1 -1
  302. package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
  303. package/lib/esm/internal/cross-package.js.map +1 -1
  304. package/lib/esm/ipc/IpcSession.js.map +1 -1
  305. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  306. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  307. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  308. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  309. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  310. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  311. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  312. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  313. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  314. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  315. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  316. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  317. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  318. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  319. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  320. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  321. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  322. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  323. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  324. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  325. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  326. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  327. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  328. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  329. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  330. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  331. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  332. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  333. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  334. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  335. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  336. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  337. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  338. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  339. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  340. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  341. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  342. package/lib/esm/tile/TileIO.js.map +1 -1
  343. package/lib/esm/tile/TileMetadata.js.map +1 -1
  344. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  345. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAM,OAAO,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,C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,IAAI,YAAY,UAAU,CAAC;AACtF,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\n/** Format of an [[ImageBuffer]].\r\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\r\n * @see [[ImageBuffer.getNumBytesPerPixel]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ImageBufferFormat {\r\n /** RGBA format - 4 bytes per pixel. */\r\n Rgba = 0,\r\n /** RGB format - 3 bytes per pixel. */\r\n Rgb = 2,\r\n /** 1 byte per pixel. */\r\n Alpha = 5,\r\n}\r\n\r\n/** Uncompressed rectangular bitmap image data.\r\n * @public\r\n */\r\nexport class ImageBuffer {\r\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\r\n public readonly data: Uint8Array;\r\n /** Format of the bytes in the image. */\r\n public readonly format: ImageBufferFormat;\r\n /** Width of image in pixels */\r\n public readonly width: number;\r\n\r\n /** Return the number of bytes allocated for each pixel. */\r\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\r\n\r\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\r\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\r\n switch (format) {\r\n case ImageBufferFormat.Alpha: return 1;\r\n case ImageBufferFormat.Rgb: return 3;\r\n default: return 4;\r\n }\r\n }\r\n\r\n /** Get the height of this image in pixels. */\r\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\r\n\r\n /** Create a new ImageBuffer.\r\n * @note The ImageBuffer takes ownership of the input Uint8Array.\r\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.\r\n * @param format The format of the image.\r\n * @param width The width of the image in pixels.\r\n * @returns A new ImageBuffer.\r\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\r\n */\r\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\r\n if (!this.isValidData(data, format, width))\r\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\r\n\r\n return new ImageBuffer(data, format, width);\r\n }\r\n\r\n private static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\r\n const height = this.computeHeight(data, format, width);\r\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\r\n }\r\n\r\n private static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\r\n return data.length / (width * this.getNumBytesPerPixel(format));\r\n }\r\n\r\n private constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\r\n this.data = data;\r\n this.format = format;\r\n this.width = width;\r\n }\r\n}\r\n\r\n/** Returns whether the input is a power of two.\r\n * @note Floating point inputs are truncated.\r\n * @public\r\n */\r\nexport function isPowerOfTwo(num: number): boolean {\r\n return 0 === (num & (num - 1));\r\n}\r\n\r\n/** Returns the first power-of-two value greater than or equal to the input.\r\n * @note Floating point inputs are truncated.\r\n * @public\r\n */\r\nexport function nextHighestPowerOfTwo(num: number): number {\r\n --num;\r\n for (let i = 1; i < 32; i <<= 1)\r\n num = num | num >> i;\r\n\r\n return num + 1;\r\n}\r\n\r\n/** The format of an ImageSource.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ImageSourceFormat {\r\n /** Image data is stored with JPEG compression. */\r\n Jpeg = 0,\r\n /** Image data is stored with PNG compression. */\r\n Png = 2,\r\n /** Image is stored as an Svg stream.\r\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\r\n */\r\n Svg = 3,\r\n}\r\n\r\n/** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.\r\n * @public\r\n */\r\nexport function isValidImageSourceFormat(format: number): format is ImageSourceFormat {\r\n switch (format) {\r\n case ImageSourceFormat.Jpeg:\r\n case ImageSourceFormat.Png:\r\n case ImageSourceFormat.Svg:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\n/** Image data encoded and compressed in either Jpeg or Png format.\r\n * @public\r\n */\r\nexport class ImageSource {\r\n /** The content of the image, compressed */\r\n public readonly data: Uint8Array | string;\r\n /** The compression type. */\r\n public readonly format: ImageSourceFormat;\r\n\r\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\r\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\r\n this.data = data;\r\n this.format = format;\r\n }\r\n}\r\n\r\n/** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded\r\n * in string format as an Svg.\r\n * Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.\r\n * @public\r\n */\r\nexport interface BinaryImageSource {\r\n /** The format in which the [[data]] is encoded. */\r\n readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;\r\n /** The image data encoded according to [[format]]. */\r\n readonly data: Uint8Array;\r\n}\r\n\r\n/** Returns true if `source` is a [[BinaryImageSource]].\r\n * @public\r\n */\r\nexport function isBinaryImageSource(source: ImageSource): source is BinaryImageSource {\r\n return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;\r\n}\r\n"]}
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAM,OAAO,WAAW;IACtB,sGAAsG;IACtF,IAAI,CAAa;IACjC,wCAAwC;IACxB,MAAM,CAAoB;IAC1C,+BAA+B;IACf,KAAK,CAAS;IAE9B,2DAA2D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;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;AAcD;;GAEG;AACH,MAAM,UAAU,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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAuBH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,cAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAwBpH,gBAAgB;AAChB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NativeApp\r\n */\r\n\r\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\r\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\r\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\r\nimport { ChangedEntities } from \"./ChangedEntities\";\r\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\r\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\r\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\r\n\r\n/** Options for pulling changes into iModel.\r\n * @internal\r\n */\r\nexport interface PullChangesOptions {\r\n /** Enables progress reporting. */\r\n reportProgress?: boolean;\r\n /** Interval for reporting progress (in milliseconds). */\r\n progressInterval?: number;\r\n /** Enables checks for abort. */\r\n enableCancellation?: boolean;\r\n}\r\n\r\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\r\n * @internal\r\n */\r\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\r\n\r\n/** Identifies a list of tile content Ids belonging to a single tile tree.\r\n * @internal\r\n */\r\nexport interface TileTreeContentIds {\r\n treeId: string;\r\n contentIds: string[];\r\n}\r\n\r\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\r\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelIdAndGeometryGuid {\r\n /** The model's Id. */\r\n id: Id64String;\r\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.\r\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\r\n */\r\n guid: GuidString;\r\n}\r\n\r\n/** @internal */\r\nexport const ipcAppChannels = {\r\n functions: \"itwinjs-core/ipc-app\",\r\n appNotify: \"itwinjs-core/ipcApp-notify\",\r\n txns: \"itwinjs-core/txns\",\r\n editingScope: \"itwinjs-core/editing-scope\",\r\n} as const;\r\n\r\n/**\r\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\r\n * @internal\r\n */\r\nexport interface IpcAppNotifications {\r\n notifyApp: () => void;\r\n}\r\n\r\n/** @internal */\r\nexport interface NotifyEntitiesChangedMetadata {\r\n /** Class full name (\"Schema:Class\") */\r\n name: string;\r\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\r\n bases: number[];\r\n}\r\n\r\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\r\n * @internal\r\n */\r\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\r\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\r\n * metadata for each entity's class is located.\r\n */\r\n insertedMeta: number[];\r\n /** See insertedMeta. */\r\n updatedMeta: number[];\r\n /** See insertedMeta. */\r\n deletedMeta: number[];\r\n\r\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. */\r\n meta: NotifyEntitiesChangedMetadata[];\r\n}\r\n\r\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\r\n * @see [TxnManager]($backend) for the source of these events.\r\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\r\n * @internal\r\n */\r\nexport interface TxnNotifications {\r\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\r\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\r\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\r\n notifyCommit: () => void;\r\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\r\n notifyReplayExternalTxns: () => void;\r\n notifyReplayedExternalTxns: () => void;\r\n notifyChangesApplied: () => void;\r\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\r\n notifyAfterUndoRedo: (isUndo: boolean) => void;\r\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\r\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\r\n\r\n notifyIModelNameChanged: (name: string) => void;\r\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\r\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\r\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\r\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\r\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\r\n}\r\n\r\n/**\r\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\r\n * @internal\r\n */\r\nexport interface EditingScopeNotifications {\r\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\r\n}\r\n\r\n/**\r\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\r\n * @internal\r\n */\r\nexport interface IpcAppFunctions {\r\n /** Send frontend log to backend.\r\n * @param _level Specify log level.\r\n * @param _category Specify log category.\r\n * @param _message Specify log message.\r\n * @param _metaData metaData if any.\r\n */\r\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\r\n\r\n /** see BriefcaseConnection.openFile */\r\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.openStandalone */\r\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.openStandalone */\r\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\r\n /** see SnapshotConnection.openFile */\r\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.close */\r\n closeIModel: (key: string) => Promise<void>;\r\n /** see BriefcaseConnection.saveChanges */\r\n saveChanges: (key: string, description?: string) => Promise<void>;\r\n /** see BriefcaseConnection.abandonChanges */\r\n abandonChanges: (key: string) => Promise<void>;\r\n /** see BriefcaseTxns.hasPendingTxns */\r\n hasPendingTxns: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.isUndoPossible */\r\n isUndoPossible: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.isRedoPossible */\r\n isRedoPossible: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.getUndoString */\r\n getUndoString: (key: string) => Promise<string>;\r\n /** see BriefcaseTxns.getRedoString */\r\n getRedoString: (key: string) => Promise<string>;\r\n\r\n /** see BriefcaseConnection.pullChanges */\r\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\r\n /** Cancels pull of changes. */\r\n cancelPullChangesRequest: (key: string) => Promise<void>;\r\n /** see BriefcaseConnection.pushChanges */\r\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\r\n /** Cancels currently pending or active generation of tile content. */\r\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\r\n\r\n /** Cancel element graphics requests.\r\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\r\n */\r\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\r\n\r\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\r\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\r\n\r\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\r\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\r\n reinstateTxn: (key: string) => Promise<IModelStatus>;\r\n restartTxnSession: (key: string) => Promise<void>;\r\n\r\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\r\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAuBH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,cAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAwBpH,gBAAgB;AAChB,MAAM,CAAC,MAAM,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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LightSettings.js","sourceRoot":"","sources":["../../src/LightSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;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,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE5E;;;GAGG;AACH,MAAM,OAAO,UAAU;IACrB,gJAAgJ;IAChI,SAAS,CAAqB;IAC9C,sFAAsF;IACtE,SAAS,CAAS;IAClC;;;OAGG;IACa,aAAa,CAAU;IACvC;;OAEG;IACa,SAAS,CAAU;IAEnC,YAAmB,IAAsB;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC,IAAI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AEd,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","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { Vector3d, XYZProps } from \"@itwin/core-geometry\";\r\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\r\n\r\nfunction extractIntensity(value: number | undefined, defaultValue: number) {\r\n const maxIntensity = 5;\r\n return typeof value === \"number\" ? Math.max(0, Math.min(maxIntensity, value)) : defaultValue;\r\n}\r\n\r\n/** Wire format for the solar directional light associated with a [[LightSettingsProps]].\r\n * The light is colored white and oriented in any direction in world coordinates.\r\n * It will cast shadows if it is above the world XY plane and if the shadows view flag is enabled for the view.\r\n * By default, the solar light is only applied when shadows are enabled, but can be set to be applied unconditionally.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SolarLightProps {\r\n /** Intensity of the light, typically in [0..1] but can range up to 5. Default: 1.0 */\r\n intensity?: number;\r\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. */\r\n direction?: XYZProps;\r\n /** If true, the light will be applied even when shadows are turned off for the view.\r\n * If false, a roughly overhead light of the same intensity oriented in view space will be used instead.\r\n * Default: false.\r\n */\r\n alwaysEnabled?: boolean;\r\n /** If defined, the time in UNIX milliseconds from which [[direction]] was calculated.\r\n * @see [[DisplayStyleSettings.setSunTime]] to compute the solar direction from a point in time.\r\n */\r\n timePoint?: number;\r\n}\r\n\r\nconst defaultSolarDirection = Vector3d.create(0.272166, 0.680414, 0.680414);\r\n\r\n/** Describes the solar directional light associated with a [[LightSettings]].\r\n * @see [[SolarLightProps]].\r\n * @public\r\n */\r\nexport class SolarLight {\r\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. */\r\n public readonly direction: Readonly<Vector3d>;\r\n /** Intensity of the light, typically in [0..1] but can range up to 5. Default: 1.0 */\r\n public readonly intensity: number;\r\n /** If true, the light will be applied even when shadows are turned off for the view.\r\n * If false, a roughly overhead light of the same intensity oriented in view space will be used instead.\r\n * Default: false.\r\n */\r\n public readonly alwaysEnabled: boolean;\r\n /** If defined, the time in UNIX milliseconds from which [[direction]] was calculated.\r\n * @see [[DisplayStyleSettings.setSunTime]] to compute the solar direction from a point in time.\r\n */\r\n public readonly timePoint?: number;\r\n\r\n public constructor(json?: SolarLightProps) {\r\n json = json || {};\r\n this.intensity = extractIntensity(json.intensity, 1);\r\n this.alwaysEnabled = JsonUtils.asBool(json.alwaysEnabled);\r\n\r\n if (json.direction)\r\n this.direction = Vector3d.fromJSON(json.direction);\r\n else\r\n this.direction = defaultSolarDirection.clone();\r\n\r\n if (typeof json.timePoint === \"number\")\r\n this.timePoint = json.timePoint;\r\n }\r\n\r\n public toJSON(): SolarLightProps | undefined {\r\n const direction = this.direction.isAlmostEqual(defaultSolarDirection) ? undefined : this.direction.toJSON();\r\n const intensity = this.intensity !== 1 ? this.intensity : undefined;\r\n const alwaysEnabled = this.alwaysEnabled ? true : undefined;\r\n const timePoint = this.timePoint;\r\n\r\n if (undefined === direction && undefined === intensity && undefined === alwaysEnabled && undefined === timePoint)\r\n return undefined;\r\n\r\n const json: SolarLightProps = {};\r\n if (direction)\r\n json.direction = direction;\r\n\r\n if (undefined !== intensity)\r\n json.intensity = intensity;\r\n\r\n if (undefined !== alwaysEnabled)\r\n json.alwaysEnabled = alwaysEnabled;\r\n\r\n if (undefined !== timePoint)\r\n json.timePoint = timePoint;\r\n\r\n return json;\r\n }\r\n\r\n /** Create a copy of this SolarLight, identical except in any properties explicitly specified by `changedProps`, with a possible exception for [[timePoint]].\r\n * If `this.timePoint` is defined and `changedProps` defines `direction` but **doesn't** define `timePoint`, the time point will only be preserved in the\r\n * copy if `changesProps.direction` is equal to `this.direction`.\r\n */\r\n public clone(changedProps?: SolarLightProps): SolarLight {\r\n if (!changedProps)\r\n return this;\r\n\r\n const props = this.toJSON() ?? {};\r\n if (undefined !== changedProps.direction)\r\n props.direction = changedProps.direction;\r\n\r\n if (undefined !== changedProps.intensity)\r\n props.intensity = changedProps.intensity;\r\n\r\n if (undefined !== changedProps.alwaysEnabled)\r\n props.alwaysEnabled = changedProps.alwaysEnabled;\r\n\r\n if (undefined !== changedProps.timePoint)\r\n props.timePoint = changedProps.timePoint;\r\n\r\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.\r\n // If caller explicitly supplied a timePoint, trust it.\r\n if (undefined !== this.timePoint && undefined === changedProps.timePoint && undefined !== changedProps.direction) {\r\n const newDirection = Vector3d.fromJSON(changedProps.direction);\r\n if (!newDirection.isAlmostEqual(this.direction))\r\n props.timePoint = undefined;\r\n }\r\n\r\n return new SolarLight(props);\r\n }\r\n\r\n public equals(rhs: SolarLight): boolean {\r\n return this.intensity === rhs.intensity && this.alwaysEnabled === rhs.alwaysEnabled && this.direction.isExactEqual(rhs.direction) && this.timePoint === rhs.timePoint;\r\n }\r\n}\r\n\r\n/** Wire format for the ambient light associated with a [[LightSettingsProps]].\r\n * Ambient light applies equally to all surfaces in the scene.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AmbientLightProps {\r\n /** The color of the light. Black is treated as a special case, indicating that the surface's own diffuse color should be used. */\r\n color?: RgbColorProps;\r\n /** The intensity of the light. Default: 0.2. */\r\n intensity?: number;\r\n}\r\n\r\n/** Describes the ambient light associated with a [[LightSettings]].\r\n * @see [[AmbientLightProps]]\r\n * @public\r\n */\r\nexport class AmbientLight {\r\n public readonly color: RgbColor;\r\n public readonly intensity: number;\r\n\r\n public constructor(json?: AmbientLightProps) {\r\n json = json || {};\r\n this.intensity = extractIntensity(json.intensity, 0.2);\r\n this.color = json.color ? RgbColor.fromJSON(json.color) : new RgbColor(0, 0, 0);\r\n }\r\n\r\n public toJSON(): AmbientLightProps | undefined {\r\n const color = this.color.r !== 0 || this.color.g !== 0 || this.color.b !== 0 ? this.color.toJSON() : undefined;\r\n const intensity = 0.2 !== this.intensity ? this.intensity : undefined;\r\n if (undefined === color && undefined === intensity)\r\n return undefined;\r\n\r\n const json: AmbientLightProps = {};\r\n if (color)\r\n json.color = color;\r\n\r\n if (undefined !== intensity)\r\n json.intensity = intensity;\r\n\r\n return json;\r\n }\r\n\r\n /** Create a copy of this light, identical except for any properties explicitly specified by `changed`. */\r\n public clone(changed?: AmbientLightProps): AmbientLight {\r\n if (!changed)\r\n return this;\r\n\r\n const props = this.toJSON() ?? {};\r\n if (undefined !== changed.intensity)\r\n props.intensity = changed.intensity;\r\n\r\n if (undefined !== changed.color)\r\n props.color = changed.color;\r\n\r\n return new AmbientLight(props);\r\n }\r\n\r\n public equals(rhs: AmbientLight): boolean {\r\n return this.intensity === rhs.intensity && this.color.equals(rhs.color);\r\n }\r\n}\r\n\r\n/** Wire format for a pair of hemisphere lights associated with a [[LightSettingsProps]].\r\n * Hemisphere lights are oriented in opposite directions along the world Z axis. Each has its own color; they share one intensity.\r\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\r\n * of the [[SkyBox]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface HemisphereLightsProps {\r\n /** The color of the downward-facing light. Default: (143, 205, 255). */\r\n upperColor?: RgbColorProps;\r\n /** The color of the upward-facing light. Default: (120, 143, 125). */\r\n lowerColor?: RgbColorProps;\r\n /** Intensity of the lights. Default: 0. */\r\n intensity?: number;\r\n}\r\n\r\nconst defaultUpperHemisphereColor = new RgbColor(143, 205, 255);\r\nconst defaultLowerHemisphereColor = new RgbColor(120, 143, 125);\r\n\r\n/** Describes a pair of hemisphere lights associated with a [[LightSettings]].\r\n * @see [[HemisphereLightsProps]]\r\n * @public\r\n */\r\nexport class HemisphereLights {\r\n public readonly upperColor: RgbColor;\r\n public readonly lowerColor: RgbColor;\r\n public readonly intensity: number;\r\n\r\n public constructor(json?: HemisphereLightsProps) {\r\n json = json || {};\r\n this.intensity = extractIntensity(json.intensity, 0);\r\n this.upperColor = json.upperColor ? RgbColor.fromJSON(json.upperColor) : defaultUpperHemisphereColor;\r\n this.lowerColor = json.lowerColor ? RgbColor.fromJSON(json.lowerColor) : defaultLowerHemisphereColor;\r\n }\r\n\r\n public toJSON(): HemisphereLightsProps | undefined {\r\n const upperColor = this.upperColor.equals(defaultUpperHemisphereColor) ? undefined : this.upperColor.toJSON();\r\n const lowerColor = this.lowerColor.equals(defaultLowerHemisphereColor) ? undefined : this.lowerColor.toJSON();\r\n const intensity = 0 === this.intensity ? undefined : this.intensity;\r\n\r\n if (undefined === upperColor && undefined === lowerColor && undefined === intensity)\r\n return undefined;\r\n\r\n const json: HemisphereLightsProps = {};\r\n if (upperColor)\r\n json.upperColor = upperColor;\r\n\r\n if (lowerColor)\r\n json.lowerColor = lowerColor;\r\n\r\n if (undefined !== intensity)\r\n json.intensity = intensity;\r\n\r\n return json;\r\n }\r\n\r\n /** Create a copy of these lights, identical except for any properties explicitly specified by `changed`. */\r\n public clone(changed?: HemisphereLightsProps): HemisphereLights {\r\n if (!changed)\r\n return this;\r\n\r\n const props = this.toJSON() || {};\r\n if (undefined !== changed.upperColor)\r\n props.upperColor = changed.upperColor;\r\n\r\n if (undefined !== changed.lowerColor)\r\n props.lowerColor = changed.lowerColor;\r\n\r\n if (undefined !== changed.intensity)\r\n props.intensity = changed.intensity;\r\n\r\n return new HemisphereLights(props);\r\n }\r\n\r\n public equals(rhs: HemisphereLights): boolean {\r\n return this.intensity === rhs.intensity && this.upperColor.equals(rhs.upperColor) && this.lowerColor.equals(rhs.lowerColor);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[FresnelSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FresnelSettingsProps {\r\n /** See [[FresnelSettings.intensity]].\r\n * Default value: 0\r\n */\r\n intensity?: number;\r\n\r\n /** See [[FresnelSettings.invert]].\r\n * Default value: false\r\n */\r\n invert?: boolean;\r\n}\r\n\r\nfunction clampIntensity(intensity = 0): number {\r\n return Math.max(intensity, 0);\r\n}\r\n\r\n/** As part of a [[LightSettings]], describes how to apply a Fresnel effect to the contents of the view.\r\n * The \"Fresnel effect\" is based on the observation that the reflectivity of a surface varies based on the angle between the surface and\r\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\r\n * viewed from above; and a sphere will appear more reflective around its edges than at its center.\r\n *\r\n * This principle can be used to improve photorealism, but the implementation provided here is intended to produce non-realistic but\r\n * aesthetically-pleasing results.\r\n * @see [[LightSettings.fresnel]].\r\n * @public\r\n */\r\nexport class FresnelSettings {\r\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\r\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\r\n * perpendicular, and zero intensity is produced when those vectors are parallel (unless [[invert]] is `true`).\r\n *\r\n * A value of zero turns off the effect. Values less than zero are clamped to zero. Typical values range between 0 and 1.\r\n */\r\n public readonly intensity: number;\r\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\r\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.\r\n */\r\n public readonly invert: boolean;\r\n\r\n private constructor(intensity: number, invert: boolean) {\r\n assert(intensity >= 0);\r\n this.intensity = intensity;\r\n this.invert = invert;\r\n }\r\n\r\n private static readonly _defaults = new FresnelSettings(0, false);\r\n\r\n /** Create from JSON representation, using default values for any unspecified or `undefined` properties. */\r\n public static fromJSON(props?: FresnelSettingsProps): FresnelSettings {\r\n const intensity = clampIntensity(JsonUtils.asDouble(props?.intensity));\r\n const invert = JsonUtils.asBool(props?.invert);\r\n if (0 === intensity && !invert)\r\n return this._defaults;\r\n\r\n return new this(intensity, invert);\r\n }\r\n\r\n /** Create a new FresnelSettings.\r\n * @note Intensity values less than zero will be set to zero.\r\n */\r\n public static create(intensity = 0, invert = false): FresnelSettings {\r\n return this.fromJSON({ intensity, invert });\r\n }\r\n\r\n /** Convert to JSON representation.\r\n * @note If all settings match the default values, `undefined` will be returned.\r\n */\r\n public toJSON(): FresnelSettingsProps | undefined {\r\n if (0 === this.intensity && !this.invert)\r\n return undefined;\r\n\r\n const props: FresnelSettingsProps = {};\r\n if (0 !== this.intensity)\r\n props.intensity = this.intensity;\r\n\r\n if (this.invert)\r\n props.invert = true;\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of these settings, modified to match any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps?: FresnelSettingsProps): FresnelSettings {\r\n if ((undefined === changedProps?.intensity || changedProps.intensity === this.intensity)\r\n && (undefined === changedProps?.invert || changedProps.invert === this.invert))\r\n return this;\r\n\r\n const intensity = changedProps?.intensity ?? this.intensity;\r\n const invert = changedProps?.invert ?? this.invert;\r\n return FresnelSettings.fromJSON({ intensity, invert });\r\n }\r\n\r\n /** Return true if these settings are equivalent to `rhs`. */\r\n public equals(rhs: FresnelSettings): boolean {\r\n return this === rhs || (this.intensity === rhs.intensity && this.invert === rhs.invert);\r\n }\r\n}\r\n\r\n/** Wire format for a [[LightSettings]] describing lighting for a 3d scene.\r\n * 3d lighting provides the following lights, all of which are optional:\r\n * - A \"portrait\" light affixed to the camera and pointing directly forward into the scene. Color: white.\r\n * - A second directional light. Color: white.\r\n * - This can be a solar shadow-casting light, or (when shadows are disabled) a roughly overhead light oriented in view space.\r\n * - A pair of hemisphere lights pointing in opposite directions along the world Z axis. Each has its own customizable color.\r\n * - An ambient light of any color applied equally to all surfaces.\r\n * Specular intensity of all lights is controlled separately.\r\n * Light intensities are typically expressed in [0..1] but can be as large as 5.\r\n * @see [[DisplayStyle3dSettingsProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LightSettingsProps {\r\n /** A white portrait light affixed to the camera and pointing directly forward into the scene. */\r\n portrait?: {\r\n /** Intensity, typically in [0..1], maximum 5. Default: 0.3. */\r\n intensity?: number;\r\n };\r\n /** Solar light settings. */\r\n solar?: SolarLightProps;\r\n /** Hemisphere light settings. */\r\n hemisphere?: HemisphereLightsProps;\r\n /** Ambient light settings. */\r\n ambient?: AmbientLightProps;\r\n /** Specular intensity applied to all lights. */\r\n specularIntensity?: number;\r\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\r\n * are computed, then quantized to the specified number of cels. Values greater than 254 have no visible effect.\r\n * Typically a value of 2 is appropriate if specular intensity is close to zero; 3 if specular intensity is larger.\r\n * Cel-shading is often combined with thick, dark visible edges for a cartoon or comic book effect.\r\n * Default: 0\r\n */\r\n numCels?: number;\r\n\r\n /** Fresnel settings.\r\n * @see [[FresnelSettings]].\r\n */\r\n fresnel?: FresnelSettingsProps;\r\n}\r\n\r\n/** Describes the lighting for a 3d scene, associated with a [[DisplayStyle3dSettings]] in turn associated with a [DisplayStyle3d]($backend) or [DisplayStyle3dState]($frontend).\r\n * @see [[LightSettingsProps]]\r\n * @public\r\n */\r\nexport class LightSettings {\r\n public readonly solar: SolarLight;\r\n public readonly ambient: AmbientLight;\r\n public readonly hemisphere: HemisphereLights;\r\n /** See [[LightSettingsProps.portrait]]. */\r\n public readonly portraitIntensity: number;\r\n public readonly specularIntensity: number;\r\n /** See [[LightSettingsProps.numCels]]. */\r\n public readonly numCels: number;\r\n public readonly fresnel: FresnelSettings;\r\n\r\n private constructor(solar: SolarLight, ambient: AmbientLight, hemisphere: HemisphereLights, portraitIntensity: number, specularIntensity: number, numCels: number,\r\n fresnel: FresnelSettings) {\r\n this.solar = solar;\r\n this.ambient = ambient;\r\n this.hemisphere = hemisphere;\r\n this.portraitIntensity = portraitIntensity;\r\n this.specularIntensity = specularIntensity;\r\n this.numCels = numCels;\r\n this.fresnel = fresnel;\r\n }\r\n\r\n public static fromJSON(props?: LightSettingsProps): LightSettings {\r\n const solar = new SolarLight(props?.solar);\r\n const ambient = new AmbientLight(props?.ambient);\r\n const hemisphere = new HemisphereLights(props?.hemisphere);\r\n const portraitIntensity = extractIntensity(props?.portrait?.intensity, 0.3);\r\n const specularIntensity = extractIntensity(props?.specularIntensity, 1.0);\r\n const numCels = JsonUtils.asInt(props?.numCels, 0);\r\n const fresnel = FresnelSettings.fromJSON(props?.fresnel);\r\n\r\n return new LightSettings(solar, ambient, hemisphere, portraitIntensity, specularIntensity, numCels, fresnel);\r\n }\r\n\r\n public toJSON(): LightSettingsProps | undefined {\r\n const solar = this.solar.toJSON();\r\n const ambient = this.ambient.toJSON();\r\n const hemisphere = this.hemisphere.toJSON();\r\n const portrait = 0.3 !== this.portraitIntensity ? { intensity: this.portraitIntensity } : undefined;\r\n const specularIntensity = 1 !== this.specularIntensity ? this.specularIntensity : undefined;\r\n const numCels = 0 !== this.numCels ? this.numCels : undefined;\r\n const fresnel = this.fresnel.toJSON();\r\n\r\n if (!solar && !ambient && !hemisphere && !portrait && undefined === specularIntensity && undefined === numCels && undefined === fresnel)\r\n return undefined;\r\n\r\n const json: LightSettingsProps = {};\r\n if (solar)\r\n json.solar = solar;\r\n\r\n if (ambient)\r\n json.ambient = ambient;\r\n\r\n if (hemisphere)\r\n json.hemisphere = hemisphere;\r\n\r\n if (portrait)\r\n json.portrait = portrait;\r\n\r\n if (undefined !== specularIntensity)\r\n json.specularIntensity = specularIntensity;\r\n\r\n if (undefined !== numCels)\r\n json.numCels = numCels;\r\n\r\n if (fresnel)\r\n json.fresnel = fresnel;\r\n\r\n return json;\r\n }\r\n\r\n /** Create a copy of these light settings, identical except for any properties explicitly specified by `changed`.\r\n * Note that the solar, ambient, and hemisphere lights will also be cloned using their own `clone` methods - so for example, the following:\r\n * ` clone({ ambient: { intensity: 0.5 } })`\r\n * will overwrite the ambient light's intensity but preserve its current color, rather than replacing the color with the default color.\r\n */\r\n public clone(changed?: LightSettingsProps): LightSettings {\r\n if (!changed)\r\n return this;\r\n\r\n const solar = this.solar.clone(changed.solar);\r\n const ambient = this.ambient.clone(changed.ambient);\r\n const hemisphere = this.hemisphere.clone(changed.hemisphere);\r\n const portrait = changed.portrait?.intensity ?? this.portraitIntensity;\r\n const specular = changed.specularIntensity ?? this.specularIntensity;\r\n const numCels = changed.numCels ?? this.numCels;\r\n const fresnel = this.fresnel.clone(changed.fresnel);\r\n\r\n return new LightSettings(solar, ambient, hemisphere, portrait, specular, numCels, fresnel);\r\n }\r\n\r\n public equals(rhs: LightSettings): boolean {\r\n if (this === rhs)\r\n return true;\r\n\r\n return this.portraitIntensity === rhs.portraitIntensity && this.specularIntensity === rhs.specularIntensity && this.numCels === rhs.numCels\r\n && this.ambient.equals(rhs.ambient) && this.solar.equals(rhs.solar) && this.hemisphere.equals(rhs.hemisphere) && this.fresnel.equals(rhs.fresnel);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LightSettings.js","sourceRoot":"","sources":["../../src/LightSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAErD,SAAS,gBAAgB,CAAC,KAAyB,EAAE,YAAoB;IACvE,MAAM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AC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAAE,SAAS,IAAI,IAAI,CAAC,iBAAiB,CAAC;QACvE,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,CAAC;QACrE,MAAM,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","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 +1 @@
1
- {"version":3,"file":"LinePixels.js","sourceRoot":"","sources":["../../src/LinePixels.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAyBX;AAzBD,WAAY,UAAU;IACpB,oBAAoB;IACpB,6CAAS,CAAA;IACT,oBAAoB;IACpB,6CAAa,CAAA;IACb,sIAAsI;IACtI,sDAAkB,CAAA;IAClB,mGAAmG;IACnG,sDAAkB,CAAA;IAClB,qGAAqG;IACrG,sDAAkB,CAAA;IAClB,wLAAwL;IACxL,sDAAkB,CAAA;IAClB,qHAAqH;IACrH,sDAAkB,CAAA;IAClB,uLAAuL;IACvL,sDAAkB,CAAA;IAClB,qIAAqI;IACrI,sDAAkB,CAAA;IAClB,qIAAqI;IACrI,gEAAuB,CAAA;IACvB,gEAAgE;IAChE,qDAAsB,CAAA;IACtB,6EAA6E;IAC7E,kDAAY,CAAA;AACd,CAAC,EAzBW,UAAU,KAAV,UAAU,QAyBrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\n/** Enumerates the available patterns for drawing patterned lines.\r\n * Each is a 32-bit pattern in which each bit specifies the on- or off-state of a pixel along the line. The pattern repeats along the length of the entire line.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum LinePixels {\r\n /** A solid line. */\r\n Solid = 0,\r\n /** A solid line. */\r\n Code0 = Solid,\r\n /** 1 lit pixel followed by 7 unlit pixels: =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= */\r\n Code1 = 0x80808080,\r\n /** 5 lit pixels followed by 3 unlit pixels: =====&nbsp;&nbsp;&nbsp;=====&nbsp;&nbsp;&nbsp;===== */\r\n Code2 = 0xf8f8f8f8,\r\n /** 11 lit pixels followed by 5 unlit pixels: ===========&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=========== */\r\n Code3 = 0xffe0ffe0,\r\n /** 7 lit pixels followed by 4 unlit pixels followed by 1 lit pixel followed by 1 lit pixel: =======&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;=======&nbsp;&nbsp;&nbsp;&nbsp;= */\r\n Code4 = 0xfe10fe10,\r\n /** 3 lit pixels followed by 5 unlit pixels: ===&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=== */\r\n Code5 = 0xe0e0e0e0,\r\n /** 5 lit pixels followed by 3 unlit followed by 1 lit followed by 3 unlit followed by 1 lit followed by 3 unlit: =====&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;===== */\r\n Code6 = 0xf888f888,\r\n /** 8 lit pixels followed by 3 unlit followed by 2 lit followed by 3 unlit: ========&nbsp;&nbsp;&nbsp;==&nbsp;&nbsp;&nbsp;======== */\r\n Code7 = 0xff18ff18,\r\n /** 2 lit pixels followed by 2 unlit pixels - default style for drawing hidden edges: ==&nbsp;&nbsp;==&nbsp;&nbsp;==&nbsp;&nbsp;== */\r\n HiddenLine = 0xcccccccc,\r\n /** Barely visible - 1 lit pixel followed by 31 unlit pixels. */\r\n Invisible = 0x00000001,\r\n /** Indicates no valid line style or none specified, depending on context. */\r\n Invalid = -1,\r\n}\r\n"]}
1
+ {"version":3,"file":"LinePixels.js","sourceRoot":"","sources":["../../src/LinePixels.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAyBX;AAzBD,WAAY,UAAU;IACpB,oBAAoB;IACpB,6CAAS,CAAA;IACT,oBAAoB;IACpB,6CAAa,CAAA;IACb,sIAAsI;IACtI,sDAAkB,CAAA;IAClB,mGAAmG;IACnG,sDAAkB,CAAA;IAClB,qGAAqG;IACrG,sDAAkB,CAAA;IAClB,wLAAwL;IACxL,sDAAkB,CAAA;IAClB,qHAAqH;IACrH,sDAAkB,CAAA;IAClB,uLAAuL;IACvL,sDAAkB,CAAA;IAClB,qIAAqI;IACrI,sDAAkB,CAAA;IAClB,qIAAqI;IACrI,gEAAuB,CAAA;IACvB,gEAAgE;IAChE,qDAAsB,CAAA;IACtB,6EAA6E;IAC7E,kDAAY,CAAA;AACd,CAAC,EAzBW,UAAU,KAAV,UAAU,QAyBrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\n/** Enumerates the available patterns for drawing patterned lines.\n * Each is a 32-bit pattern in which each bit specifies the on- or off-state of a pixel along the line. The pattern repeats along the length of the entire line.\n * @public\n * @extensions\n */\nexport enum LinePixels {\n /** A solid line. */\n Solid = 0,\n /** A solid line. */\n Code0 = Solid,\n /** 1 lit pixel followed by 7 unlit pixels: =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= */\n Code1 = 0x80808080,\n /** 5 lit pixels followed by 3 unlit pixels: =====&nbsp;&nbsp;&nbsp;=====&nbsp;&nbsp;&nbsp;===== */\n Code2 = 0xf8f8f8f8,\n /** 11 lit pixels followed by 5 unlit pixels: ===========&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=========== */\n Code3 = 0xffe0ffe0,\n /** 7 lit pixels followed by 4 unlit pixels followed by 1 lit pixel followed by 1 lit pixel: =======&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;=======&nbsp;&nbsp;&nbsp;&nbsp;= */\n Code4 = 0xfe10fe10,\n /** 3 lit pixels followed by 5 unlit pixels: ===&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=== */\n Code5 = 0xe0e0e0e0,\n /** 5 lit pixels followed by 3 unlit followed by 1 lit followed by 3 unlit followed by 1 lit followed by 3 unlit: =====&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;===== */\n Code6 = 0xf888f888,\n /** 8 lit pixels followed by 3 unlit followed by 2 lit followed by 3 unlit: ========&nbsp;&nbsp;&nbsp;==&nbsp;&nbsp;&nbsp;======== */\n Code7 = 0xff18ff18,\n /** 2 lit pixels followed by 2 unlit pixels - default style for drawing hidden edges: ==&nbsp;&nbsp;==&nbsp;&nbsp;==&nbsp;&nbsp;== */\n HiddenLine = 0xcccccccc,\n /** Barely visible - 1 lit pixel followed by 31 unlit pixels. */\n Invisible = 0x00000001,\n /** Indicates no valid line style or none specified, depending on context. */\n Invalid = -1,\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Localization.js","sourceRoot":"","sources":["../../src/Localization.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAoGH;;GAEG;AACH,MAAM,OAAO,iBAAiB;IACrB,KAAK,CAAC,UAAU,KAAoB,CAAC;IACrC,kBAAkB,CAAC,GAAsB;QAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC9B,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;QACD,sEAAsE;QACtE,iEAAiE;QACjE,+FAA+F;QAC/F,iCAAiC;QACjC,oEAAoE;QACpE,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,EAAG,CAAC;IAClC,CAAC;IACM,gBAAgB,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,gBAAgB,CAAC,WAAmB,IAAY,OAAO,WAAW,CAAC,CAAC,CAAC;IACrE,KAAK,CAAC,iBAAiB,KAAoB,CAAC;IAC5C,mBAAmB,KAAW,CAAC;IAC/B,mBAAmB,KAAgC,OAAO,SAAS,CAAC,CAAC,CAAC;IACtE,eAAe,KAAwB,OAAO,EAAE,CAAC,CAAC,CAAC;IACnD,KAAK,CAAC,cAAc,KAAK,CAAC;CAClC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\n/** Options for Localization\r\n * @public\r\n */\r\nexport interface TranslationOptions {\r\n /** for interpolation values */\r\n [key: string]: any;\r\n /**\r\n * defaultValue to return if a translation was not found\r\n */\r\n defaultValue?: any;\r\n /**\r\n * count value used for plurals\r\n */\r\n count?: number;\r\n /**\r\n * used for contexts (eg. male\\female)\r\n */\r\n context?: any;\r\n /**\r\n * override languages to use\r\n */\r\n lngs?: string[];\r\n /**\r\n * override language to lookup key if not found see fallbacks for details\r\n */\r\n fallbackLng?: string;\r\n}\r\n\r\n/** The interface defining the localization requirements of [IModelApp]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Localization {\r\n /** This method must be called and awaited before using an instance of Localization.\r\n * @param namespaces an array of namespaces to load. There must be at least one namespace, and it\r\n * becomes the default namespace.\r\n * @note IModelApp.startup calls this internally, so you should not call this method directly\r\n * except for Localization instances outside of IModelApp (e.g., for tests.)\r\n */\r\n initialize(namespaces: string[]): Promise<void>;\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n */\r\n getLocalizedString(key: string | string[], options?: TranslationOptions): string;\r\n /** get the English string for a key. */\r\n getEnglishString(namespace: string, key: string | string[], options?: TranslationOptions): string;\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * getLocalizedKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n */\r\n getLocalizedKeys(inputString: string): string;\r\n\r\n /** Register a new Namespace and return a Promise that is fulfilled when the content is loaded.\r\n * If the namespace is already registered, its Promise will be returned.\r\n * @param namespace - the name of the namespace.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of returned Promise.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n */\r\n registerNamespace(namespace: string): Promise<void>;\r\n\r\n /** Unregister a namespace.\r\n * @param namespace - the name of the namespace.\r\n */\r\n unregisterNamespace(namespace: string): void;\r\n\r\n /** @internal */\r\n getNamespacePromise(name: string): Promise<void> | undefined;\r\n\r\n /** Get the list of available languages for translations */\r\n getLanguageList(): readonly string[];\r\n\r\n /** Change the language for translations. This overrides the language from the browser, for tests.\r\n * @param language - the language to change to.\r\n */\r\n changeLanguage(language: string): Promise<void>;\r\n}\r\n\r\n/** An empty [[Localization]] used if one is not provided to [IModelApp]($frontend). Does not perform localizations (merely returns the key.)\r\n * @public\r\n */\r\nexport class EmptyLocalization implements Localization {\r\n public async initialize(): Promise<void> { }\r\n public getLocalizedString(key: string | string[]): string {\r\n if (typeof (key) !== \"string\") {\r\n key = key[0];\r\n }\r\n // Simulate correct and simple usage of i18next's translation function\r\n // Namely, remove the leading namespace substring if there is one\r\n // Note: if there are no colons, split will return an array with a single element, which is the\r\n // key itself. So pop()! is safe.\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n return key.split(\":\", 2).pop()!;\r\n }\r\n public getEnglishString(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\r\n public getLocalizedKeys(inputString: string): string { return inputString; }\r\n public async registerNamespace(): Promise<void> { }\r\n public unregisterNamespace(): void { }\r\n public getNamespacePromise(): Promise<void> | undefined { return undefined; }\r\n public getLanguageList(): readonly string[] { return []; }\r\n public async changeLanguage() { }\r\n}\r\n"]}
1
+ {"version":3,"file":"Localization.js","sourceRoot":"","sources":["../../src/Localization.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAoGH;;GAEG;AACH,MAAM,OAAO,iBAAiB;IACrB,KAAK,CAAC,UAAU,KAAoB,CAAC;IACrC,kBAAkB,CAAC,GAAsB;QAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC9B,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;QACD,sEAAsE;QACtE,iEAAiE;QACjE,+FAA+F;QAC/F,iCAAiC;QACjC,oEAAoE;QACpE,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,EAAG,CAAC;IAClC,CAAC;IACM,gBAAgB,CAAC,UAAkB,EAAE,GAAsB,IAAY,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,gBAAgB,CAAC,WAAmB,IAAY,OAAO,WAAW,CAAC,CAAC,CAAC;IACrE,KAAK,CAAC,iBAAiB,KAAoB,CAAC;IAC5C,mBAAmB,KAAW,CAAC;IAC/B,mBAAmB,KAAgC,OAAO,SAAS,CAAC,CAAC,CAAC;IACtE,eAAe,KAAwB,OAAO,EAAE,CAAC,CAAC,CAAC;IACnD,KAAK,CAAC,cAAc,KAAK,CAAC;CAClC","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 Localization\n */\n\n/** Options for Localization\n * @public\n */\nexport interface TranslationOptions {\n /** for interpolation values */\n [key: string]: any;\n /**\n * defaultValue to return if a translation was not found\n */\n defaultValue?: any;\n /**\n * count value used for plurals\n */\n count?: number;\n /**\n * used for contexts (eg. male\\female)\n */\n context?: any;\n /**\n * override languages to use\n */\n lngs?: string[];\n /**\n * override language to lookup key if not found see fallbacks for details\n */\n fallbackLng?: string;\n}\n\n/** The interface defining the localization requirements of [IModelApp]($frontend).\n * @public\n * @extensions\n */\nexport interface Localization {\n /** This method must be called and awaited before using an instance of Localization.\n * @param namespaces an array of namespaces to load. There must be at least one namespace, and it\n * becomes the default namespace.\n * @note IModelApp.startup calls this internally, so you should not call this method directly\n * except for Localization instances outside of IModelApp (e.g., for tests.)\n */\n initialize(namespaces: string[]): Promise<void>;\n\n /** Return the translated value of a key.\n * @param key - the key that matches a property in the JSON localization file.\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\n * followed by a colon, followed by the property in the JSON file.\n * For example:\n * ``` ts\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\n * ```\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\n * @returns The string corresponding to the first key that resolves.\n * @throws Error if no keys resolve to a string.\n */\n getLocalizedString(key: string | string[], options?: TranslationOptions): string;\n /** get the English string for a key. */\n getEnglishString(namespace: string, key: string | string[], options?: TranslationOptions): string;\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\n * For example:\n * ``` ts\n * \"MyKeys\": {\n * \"Key1\": \"First value\",\n * \"Key2\": \"Second value\"\n * }\n * ```\n *\n * ``` ts\n * getLocalizedKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\n * ```\n */\n getLocalizedKeys(inputString: string): string;\n\n /** Register a new Namespace and return a Promise that is fulfilled when the content is loaded.\n * If the namespace is already registered, its Promise will be returned.\n * @param namespace - the name of the namespace.\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\n * fulfillment of returned Promise.\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\n */\n registerNamespace(namespace: string): Promise<void>;\n\n /** Unregister a namespace.\n * @param namespace - the name of the namespace.\n */\n unregisterNamespace(namespace: string): void;\n\n /** @internal */\n getNamespacePromise(name: string): Promise<void> | undefined;\n\n /** Get the list of available languages for translations */\n getLanguageList(): readonly string[];\n\n /** Change the language for translations. This overrides the language from the browser, for tests.\n * @param language - the language to change to.\n */\n changeLanguage(language: string): Promise<void>;\n}\n\n/** An empty [[Localization]] used if one is not provided to [IModelApp]($frontend). Does not perform localizations (merely returns the key.)\n * @public\n */\nexport class EmptyLocalization implements Localization {\n public async initialize(): Promise<void> { }\n public getLocalizedString(key: string | string[]): string {\n if (typeof (key) !== \"string\") {\n key = key[0];\n }\n // Simulate correct and simple usage of i18next's translation function\n // Namely, remove the leading namespace substring if there is one\n // Note: if there are no colons, split will return an array with a single element, which is the\n // key itself. So pop()! is safe.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return key.split(\":\", 2).pop()!;\n }\n public getEnglishString(_namespace: string, key: string | string[]): string { return this.getLocalizedString(key); }\n public getLocalizedKeys(inputString: string): string { return inputString; }\n public async registerNamespace(): Promise<void> { }\n public unregisterNamespace(): void { }\n public getNamespacePromise(): Promise<void> | undefined { return undefined; }\n public getLanguageList(): readonly string[] { return []; }\n public async changeLanguage() { }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MapImagerySettings.js","sourceRoot":"","sources":["../../src/MapImagerySettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAqB,oBAAoB,EAAiB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA4B9G,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,iBAAiB,CAKjC;AALD,WAAiB,iBAAiB;IAChC,wDAAwD;IACxD,SAAgB,QAAQ,CAAC,KAAqB;QAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrG,CAAC;IAFe,0BAAQ,WAEvB,CAAA;AACH,CAAC,EALgB,iBAAiB,KAAjB,iBAAiB,QAKjC;AAED;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IACrB,eAAe,CAAoB;IACnC,iBAAiB,GAAG,IAAI,KAAK,EAAoB,CAAC;IAClD,cAAc,GAAG,IAAI,KAAK,EAAoB,CAAC;IAEvD,YAAoB,IAAuB,EAAE,oBAAsC,EAAE,kBAAoC;QACvH,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,oBAAoB,EAAE,CAAC;YACzB,KAAK,MAAM,UAAU,IAAI,oBAAoB,EAAE,CAAC;gBAC9C,MAAM,KA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GAAG,SAAS,KAAK,cAAc,CAAC,CAAC;YAC9C,iBAAiB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;YAC5C,oBAAoB,CAAC,sBAAsB,CAAC,QAAQ,IAAI,EAAG,CAAC,CAAC;QAE/D,OAAO,IAAI,kBAAkB,CAAC,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IACtG,CAAC;IAEM,MAAM;QACX,MAAM,KAAK,GAAoB,EAAE,cAAc,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC;QACjF,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC;YACnC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAEjF,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;YAChC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAE3E,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { BaseMapLayerProps, BaseMapLayerSettings, MapLayerProps, MapLayerSettings } from \"./MapLayerSettings\";\r\n\r\n/** JSON representation of a [[BaseLayerSettings]].\r\n * @public\r\n */\r\nexport type BaseLayerProps = BaseMapLayerProps | ColorDefProps;\r\n\r\n/** The JSON representation of the map imagery. Map imagery include the specification for the base layer (which was originally\r\n * represented by [[BackgroundMapProps.providerName]] && [[BackgroundMapProps.providerData]]) and additional map layers.\r\n * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.\r\n * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as\r\n * the settings are compatible.\r\n * The non-base map layers may represent image layers generated by tile servers or model layers that are generated by 2d projection of model geometry, typically from a model\r\n * that is generated from two dimensional GIS data.\r\n * @public\r\n */\r\nexport interface MapImageryProps {\r\n backgroundBase?: BaseLayerProps;\r\n backgroundLayers?: MapLayerProps[];\r\n overlayLayers?: MapLayerProps[];\r\n}\r\n\r\n/** The base layer for a [[MapImagerySettings]].\r\n * @see [[MapImagerySettings.backgroundBase]].\r\n * @public\r\n */\r\nexport type BaseLayerSettings = BaseMapLayerSettings | ColorDef;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace BaseLayerSettings {\r\n /** Create a base layer from its JSON representation. */\r\n export function fromJSON(props: BaseLayerProps): BaseLayerSettings {\r\n return typeof props === \"number\" ? ColorDef.fromJSON(props) : BaseMapLayerSettings.fromJSON(props);\r\n }\r\n}\r\n\r\n/** Provides access to the map imagery settings (Base and layers).\r\n * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.\r\n * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as\r\n * the settings are compatible.\r\n * @public\r\n */\r\nexport class MapImagerySettings {\r\n private _backgroundBase: BaseLayerSettings;\r\n private _backgroundLayers = new Array<MapLayerSettings>();\r\n private _overlayLayers = new Array<MapLayerSettings>();\r\n\r\n private constructor(base: BaseLayerSettings, backgroundLayerProps?: MapLayerProps[], overlayLayersProps?: MapLayerProps[]) {\r\n this._backgroundBase = base;\r\n if (backgroundLayerProps) {\r\n for (const layerProps of backgroundLayerProps) {\r\n const layer = MapLayerSettings.fromJSON(layerProps);\r\n if (layer)\r\n this._backgroundLayers.push(layer);\r\n }\r\n }\r\n if (overlayLayersProps) {\r\n for (const overlayLayerProps of overlayLayersProps) {\r\n const overlayLayer = MapLayerSettings.fromJSON(overlayLayerProps);\r\n if (overlayLayer)\r\n this._overlayLayers.push(overlayLayer);\r\n }\r\n }\r\n }\r\n\r\n /** The settings for the base layer.\r\n * @note If changing the base provider it is currently necessary to also update the background map settings.\r\n */\r\n public get backgroundBase(): BaseLayerSettings { return this._backgroundBase; }\r\n public set backgroundBase(base: BaseLayerSettings) { this._backgroundBase = base; }\r\n\r\n public get backgroundLayers(): MapLayerSettings[] { return this._backgroundLayers; }\r\n public get overlayLayers(): MapLayerSettings[] { return this._overlayLayers; }\r\n\r\n /** Return base transparency as a number between 0 and 1.\r\n * @internal\r\n */\r\n public get baseTransparency(): number {\r\n return (this._backgroundBase instanceof ColorDef) ? (this._backgroundBase.getTransparency() / 255) : this._backgroundBase.transparency;\r\n\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\r\n public static fromJSON(imageryJson?: MapImageryProps) {\r\n return this.createFromJSON(imageryJson, undefined);\r\n }\r\n\r\n /** @internal */\r\n public static createFromJSON(imageryJson?: MapImageryProps, mapProps?: DeprecatedBackgroundMapProps) {\r\n const backgroundBase = imageryJson?.backgroundBase;\r\n const baseLayer = undefined !== backgroundBase ?\r\n BaseLayerSettings.fromJSON(backgroundBase) :\r\n BaseMapLayerSettings.fromBackgroundMapProps(mapProps ?? { });\r\n\r\n return new MapImagerySettings(baseLayer, imageryJson?.backgroundLayers, imageryJson?.overlayLayers);\r\n }\r\n\r\n public toJSON(): MapImageryProps {\r\n const props: MapImageryProps = { backgroundBase: this._backgroundBase.toJSON() };\r\n if (this._backgroundLayers.length > 0)\r\n props.backgroundLayers = this._backgroundLayers.map((layer) => layer.toJSON());\r\n\r\n if (this._overlayLayers.length > 0)\r\n props.overlayLayers = this._overlayLayers.map((layer) => layer.toJSON());\r\n\r\n return props;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MapImagerySettings.js","sourceRoot":"","sources":["../../src/MapImagerySettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAqB,oBAAoB,EAAiB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA4B9G,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,iBAAiB,CAKjC;AALD,WAAiB,iBAAiB;IAChC,wDAAwD;IACxD,SAAgB,QAAQ,CAAC,KAAqB;QAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrG,CAAC;IAFe,0BAAQ,WAEvB,CAAA;AACH,CAAC,EALgB,iBAAiB,KAAjB,iBAAiB,QAKjC;AAED;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IACrB,eAAe,CAAoB;IACnC,iBAAiB,GAAG,IAAI,KAAK,EAAoB,CAAC;IAClD,cAAc,GAAG,IAAI,KAAK,EAAoB,CAAC;IAEvD,YAAoB,IAAuB,EAAE,oBAAsC,EAAE,kBAAoC;QACvH,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,oBAAoB,EAAE,CAAC;YACzB,KAAK,MAAM,UAAU,IAAI,oBAAoB,EAAE,CAAC;gBAC9C,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;gBACpD,IAAI,KAAK;oBACP,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;QACD,IAAI,kBAAkB,EAAE,CAAC;YACvB,KAAK,MAAM,iBAAiB,IAAI,kBA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,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IACtG,CAAC;IAEM,MAAM;QACX,MAAM,KAAK,GAAoB,EAAE,cAAc,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC;QACjF,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC;YACnC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAEjF,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;YAChC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAE3E,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { BaseMapLayerProps, BaseMapLayerSettings, MapLayerProps, MapLayerSettings } from \"./MapLayerSettings\";\n\n/** JSON representation of a [[BaseLayerSettings]].\n * @public\n */\nexport type BaseLayerProps = BaseMapLayerProps | ColorDefProps;\n\n/** The JSON representation of the map imagery. Map imagery include the specification for the base layer (which was originally\n * represented by [[BackgroundMapProps.providerName]] && [[BackgroundMapProps.providerData]]) and additional map layers.\n * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.\n * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as\n * the settings are compatible.\n * The non-base map layers may represent image layers generated by tile servers or model layers that are generated by 2d projection of model geometry, typically from a model\n * that is generated from two dimensional GIS data.\n * @public\n */\nexport interface MapImageryProps {\n backgroundBase?: BaseLayerProps;\n backgroundLayers?: MapLayerProps[];\n overlayLayers?: MapLayerProps[];\n}\n\n/** The base layer for a [[MapImagerySettings]].\n * @see [[MapImagerySettings.backgroundBase]].\n * @public\n */\nexport type BaseLayerSettings = BaseMapLayerSettings | ColorDef;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace BaseLayerSettings {\n /** Create a base layer from its JSON representation. */\n export function fromJSON(props: BaseLayerProps): BaseLayerSettings {\n return typeof props === \"number\" ? ColorDef.fromJSON(props) : BaseMapLayerSettings.fromJSON(props);\n }\n}\n\n/** Provides access to the map imagery settings (Base and layers).\n * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.\n * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as\n * the settings are compatible.\n * @public\n */\nexport class MapImagerySettings {\n private _backgroundBase: BaseLayerSettings;\n private _backgroundLayers = new Array<MapLayerSettings>();\n private _overlayLayers = new Array<MapLayerSettings>();\n\n private constructor(base: BaseLayerSettings, backgroundLayerProps?: MapLayerProps[], overlayLayersProps?: MapLayerProps[]) {\n this._backgroundBase = base;\n if (backgroundLayerProps) {\n for (const layerProps of backgroundLayerProps) {\n const layer = MapLayerSettings.fromJSON(layerProps);\n if (layer)\n this._backgroundLayers.push(layer);\n }\n }\n if (overlayLayersProps) {\n for (const overlayLayerProps of overlayLayersProps) {\n const overlayLayer = MapLayerSettings.fromJSON(overlayLayerProps);\n if (overlayLayer)\n this._overlayLayers.push(overlayLayer);\n }\n }\n }\n\n /** The settings for the base layer.\n * @note If changing the base provider it is currently necessary to also update the background map settings.\n */\n public get backgroundBase(): BaseLayerSettings { return this._backgroundBase; }\n public set backgroundBase(base: BaseLayerSettings) { this._backgroundBase = base; }\n\n public get backgroundLayers(): MapLayerSettings[] { return this._backgroundLayers; }\n public get overlayLayers(): MapLayerSettings[] { return this._overlayLayers; }\n\n /** Return base transparency as a number between 0 and 1.\n * @internal\n */\n public get baseTransparency(): number {\n return (this._backgroundBase instanceof ColorDef) ? (this._backgroundBase.getTransparency() / 255) : this._backgroundBase.transparency;\n\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static fromJSON(imageryJson?: MapImageryProps) {\n return this.createFromJSON(imageryJson, undefined);\n }\n\n /** @internal */\n public static createFromJSON(imageryJson?: MapImageryProps, mapProps?: DeprecatedBackgroundMapProps) {\n const backgroundBase = imageryJson?.backgroundBase;\n const baseLayer = undefined !== backgroundBase ?\n BaseLayerSettings.fromJSON(backgroundBase) :\n BaseMapLayerSettings.fromBackgroundMapProps(mapProps ?? { });\n\n return new MapImagerySettings(baseLayer, imageryJson?.backgroundLayers, imageryJson?.overlayLayers);\n }\n\n public toJSON(): MapImageryProps {\n const props: MapImageryProps = { backgroundBase: this._backgroundBase.toJSON() };\n if (this._backgroundLayers.length > 0)\n props.backgroundLayers = this._backgroundLayers.map((layer) => layer.toJSON());\n\n if (this._overlayLayers.length > 0)\n props.overlayLayers = this._overlayLayers.map((layer) => layer.toJSON());\n\n return props;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerSettings.js","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAA8B,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAsBS,CAAC;AAiBzH;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAmB;IAC9B,mIAAmI;IACnH,IAAI,CAAS;IAC7B,aAAa;IACG,KAAK,CAAU;IAC/B,gIAAgI;IAChH,OAAO,CAAU;IACjC,oFAAoF;IACpE,EAAE,CAAa;IAC/B,oCAAoC;IACpB,QAAQ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CAAC;gBACrE,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;oBACtB,KAAK,iBAAiB,CAAC,MAAM;wBAC3B,GAAG,GAAG,4DAA4D,CAAC;wBACnE,MAAM;oBACR,KAAK,iBAAiB,CAAC,MAAM;wBAC3B,GAAG,GAAG,6DAA6D,CAAC;wBACpE,MAAM;oBACR,KAAK,iBAAiB,CAAC,MAAM;wBAC3B,GAAG,GAAG,sEAAsE,CAAC;wBAC7E,MAAM;gBACV,CAAC;gBAED,MAAM;QACV,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;YAC9B,IAAI;YACJ,QAAQ;YACR,GAAG;YACH,qBAAqB,EAAE,KAAK;YAC5B,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS;YAC5B,YAAY,EAAE,OAAO,EAAE,YAAY;SACpC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;QAC/B,MAAM,CAAC,QAAQ,YAAY,oBAAoB,CAAC,CAAC;QAEjD,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,sBAAsB,CAAC,KAAmC;QACtE,OAAO,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,aAAa;IACN,iBAAiB,CAAC,QAA+B;QACtD,OAAO,oBAAoB,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACpH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module MapLayers\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from \"./BackgroundMapProvider\";\r\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\r\n\r\n/** The current set of supported map layer formats.\r\n * In order to be displayed, a corresponding format must have been registered in the [MapLayerFormatRegistry]($frontend)\r\n * @public\r\n */\r\nexport type ImageryMapLayerFormatId = \"ArcGIS\" | \"BingMaps\" | \"MapboxImagery\" | \"TileURL\" | \"WMS\" | \"WMTS\";\r\n\r\n/** @public */\r\nexport type SubLayerId = string | number;\r\n\r\n/**\r\n * Type for map layer provider array property.\r\n * @beta\r\n */\r\nexport type MapLayerProviderArrayProperty = number[] | string[] | boolean[];\r\n\r\n/**\r\n * Type for map layer provider properties.\r\n * @beta\r\n */\r\nexport interface MapLayerProviderProperties { [key: string]: number | string | boolean | MapLayerProviderArrayProperty };\r\n\r\n/** JSON representation of the settings associated with a map sublayer included within a [[MapLayerProps]].\r\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\r\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\r\n * @see [[MapLayerProps]]\r\n * @public\r\n */\r\nexport interface MapSubLayerProps {\r\n name: string;\r\n title?: string;\r\n visible?: boolean;\r\n id?: SubLayerId;\r\n parent?: SubLayerId;\r\n children?: SubLayerId[];\r\n}\r\n\r\n/** Normalized representation of a [[MapSubLayerProps]] for which values\r\n * have been validated and default values have been applied where explicit values not defined.\r\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\r\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\r\n * This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.\r\n * @see [[MapLayerSettings]]\r\n * @public\r\n */\r\nexport class MapSubLayerSettings {\r\n /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */\r\n public readonly name: string;\r\n /** Title. */\r\n public readonly title?: string;\r\n /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */\r\n public readonly visible: boolean;\r\n /** A unique string or number that may be used to identify the sub layer (ArcGIS) */\r\n public readonly id: SubLayerId;\r\n /** One or more sublayer children */\r\n public readonly children?: SubLayerId[];\r\n /** sublayer parent. */\r\n public readonly parent?: SubLayerId;\r\n\r\n constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]) {\r\n this.name = name;\r\n this.title = title;\r\n this.visible = visible !== undefined && visible;\r\n this.id = (id === undefined) ? this.name : id;\r\n this.parent = parent;\r\n this.children = children;\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\r\n public static fromJSON(json: MapSubLayerProps): MapSubLayerSettings {\r\n return new MapSubLayerSettings(json.name, json.title, json.visible, (json.id === json.name) ? undefined : json.id, json.parent, json.children);\r\n }\r\n\r\n public toJSON(): MapSubLayerProps {\r\n const props: MapSubLayerProps = { name: this.name, visible: this.visible };\r\n\r\n if (undefined !== this.id && this.id !== this.name)\r\n props.id = this.id;\r\n\r\n if (undefined !== this.title)\r\n props.title = this.title;\r\n\r\n if (this.children)\r\n props.children = [...this.children];\r\n\r\n if (undefined !== this.parent)\r\n props.parent = this.parent;\r\n\r\n return props;\r\n }\r\n\r\n /** Creating a copy of this MapSubLayer, optionally modifying some if its properties */\r\n public clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n const props = {\r\n name: undefined !== changedProps.name ? changedProps.name : this.name,\r\n id: undefined !== changedProps.id ? changedProps.id : this.id,\r\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\r\n parent: undefined !== changedProps.parent ? changedProps.parent : this.parent,\r\n children: undefined !== changedProps.children ? changedProps.children.slice() : this.children?.slice(),\r\n title: undefined !== changedProps.title ? changedProps.title : this.title,\r\n };\r\n return MapSubLayerSettings.fromJSON(props);\r\n }\r\n\r\n /** @internal */\r\n public displayMatches(other: MapSubLayerSettings): boolean {\r\n return this.name === other.name && this.visible === other.visible;\r\n }\r\n\r\n /** return true if this sublayer is named. */\r\n public get isNamed(): boolean { return this.name.length > 0; }\r\n\r\n /** return true if this sublayer is a leaf (has no children) */\r\n public get isLeaf(): boolean { return this.children === undefined || this.children.length === 0; }\r\n\r\n /** return true if this sublayer is an unnamed group */\r\n public get isUnnamedGroup(): boolean { return !this.isLeaf && !this.isNamed; }\r\n\r\n /** return a string representing this sublayer id (converting to string if underlying id is number) */\r\n public get idString(): string { return (typeof this.id === \"number\") ? this.id.toString(10) : this.id; }\r\n}\r\n\r\n/** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].\r\n * @see [[MapImageryProps]]\r\n * @public\r\n */\r\nexport interface CommonMapLayerProps {\r\n /** Controls visibility of layer. Defaults to 'true'. */\r\n visible?: boolean;\r\n\r\n /** A user-friendly name for the layer. */\r\n name: string;\r\n\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,\r\n * or false to indicate the transparency should not be overridden.\r\n * Default value: 0.\r\n */\r\n\r\n transparency?: number;\r\n /** True to indicate background is transparent.\r\n * Default: true.\r\n */\r\n transparentBackground?: boolean;\r\n}\r\n\r\n/** JSON representation of an [[ImageMapLayerSettings]].\r\n * @see [[MapImagerySettings]].\r\n * @see [[ImageryMapLayerFormatId]].\r\n * @public\r\n */\r\nexport interface ImageMapLayerProps extends CommonMapLayerProps {\r\n /** URL */\r\n url: string;\r\n /** Identifies the map layers source.*/\r\n formatId: string;\r\n /** Source layers. If undefined all layers are displayed. */\r\n subLayers?: MapSubLayerProps[];\r\n /** Access Key for the Layer, like a subscription key or access token.\r\n * ###TODO This does not belong in the props object. It should never be persisted.\r\n */\r\n /** @internal */\r\n accessKey?: MapLayerKey;\r\n\r\n /** @internal */\r\n modelId?: never;\r\n\r\n /** List of query parameters that will get appended to the source.\r\n * @beta\r\n */\r\n queryParams?: { [key: string]: string };\r\n\r\n /** Properties specific to the map layer provider.\r\n * @beta\r\n */\r\n properties?: MapLayerProviderProperties;\r\n\r\n}\r\n\r\n/** The target onto which to drape a model map layer.\r\n * @beta\r\n */\r\nexport enum ModelMapLayerDrapeTarget {\r\n /** Drape only onto the globe. */\r\n Globe = 1 << 0,\r\n /** Drape only onto all attached reality data. */\r\n RealityData = 1 << 1,\r\n /** Drape only onto all models within the iModel. */\r\n IModel = 1 << 2,\r\n}\r\n\r\n/** JSON representation of a [[ModelMapLayerSettings]].\r\n * @see [[MapImagerySettings]].\r\n * @public\r\n */\r\nexport interface ModelMapLayerProps extends CommonMapLayerProps {\r\n /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */\r\n modelId: Id64String;\r\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\r\n * @beta\r\n */\r\n drapeTarget?: ModelMapLayerDrapeTarget;\r\n /** @internal */\r\n url?: never;\r\n /** @internal */\r\n formatId?: never;\r\n /** @internal */\r\n subLayers?: never;\r\n /** @internal */\r\n accessKey?: never;\r\n}\r\n\r\n/** JSON representation of a [[MapLayerSettings]].\r\n * @see [[MapImagerySettings]].\r\n * @public\r\n */\r\nexport type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;\r\n\r\n/**\r\n * stores key-value pair to be added to all requests made involving map layer.\r\n * @public\r\n */\r\nexport interface MapLayerKey {\r\n key: string;\r\n value: string;\r\n}\r\n\r\n/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\r\n * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.\r\n * One or more map layers may be included within [[MapImagerySettings]] object.\r\n * @see [[MapImagerySettings]]\r\n * @public\r\n */\r\nexport abstract class MapLayerSettings {\r\n public readonly visible: boolean;\r\n\r\n public readonly name: string;\r\n public readonly transparency: number;\r\n public readonly transparentBackground: boolean;\r\n public abstract get allSubLayersInvisible(): boolean;\r\n public abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;\r\n public abstract toJSON(): MapLayerProps;\r\n\r\n /** @internal */\r\n protected constructor(name: string, visible = true, transparency: number = 0, transparentBackground = true) {\r\n this.name = name;\r\n this.visible = visible;\r\n this.transparentBackground = transparentBackground;\r\n this.transparency = transparency;\r\n }\r\n\r\n /** Create a map layer settings from its JSON representation. */\r\n public static fromJSON(props: MapLayerProps): MapLayerSettings {\r\n return undefined !== props.modelId ? ModelMapLayerSettings.fromJSON(props) : ImageMapLayerSettings.fromJSON(props);\r\n }\r\n\r\n /** @internal */\r\n protected _toJSON(): CommonMapLayerProps {\r\n const props: CommonMapLayerProps = {\r\n name: this.name,\r\n visible: this.visible,\r\n };\r\n\r\n if (0 !== this.transparency)\r\n props.transparency = this.transparency;\r\n\r\n if (this.transparentBackground === false)\r\n props.transparentBackground = this.transparentBackground;\r\n\r\n return props;\r\n }\r\n\r\n /** @internal */\r\n protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps {\r\n return {\r\n name: undefined !== changedProps.name ? changedProps.name : this.name,\r\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\r\n transparency: undefined !== changedProps.transparency ? changedProps.transparency : this.transparency,\r\n transparentBackground: undefined !== changedProps.transparentBackground ? changedProps.transparentBackground : this.transparentBackground,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public displayMatches(other: MapLayerSettings): boolean {\r\n return this.name === other.name && this.visible === other.visible && this.transparency === other.transparency && this.transparentBackground === other.transparentBackground;\r\n }\r\n\r\n /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */\r\n public abstract get source(): string;\r\n\r\n /** @internal */\r\n public matchesNameAndSource(name: string, source: string): boolean {\r\n return this.name === name && this.source === source;\r\n }\r\n}\r\n\r\n/** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\r\n * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.\r\n * One or more map layers may be included within [[MapImagerySettings]] object.\r\n * @see [[MapImagerySettings]]\r\n * @see [[ModelMapLayerSettings]] for model based map layer settings.\r\n * @public\r\n */\r\nexport class ImageMapLayerSettings extends MapLayerSettings {\r\n public readonly formatId: string;\r\n public readonly url: string;\r\n public userName?: string;\r\n public password?: string;\r\n public accessKey?: MapLayerKey;\r\n\r\n /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.\r\n * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.\r\n * @beta\r\n */\r\n public savedQueryParams?: { [key: string]: string };\r\n\r\n /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.\r\n * @beta\r\n */\r\n public unsavedQueryParams?: { [key: string]: string };\r\n\r\n /** Properties specific to the map layer provider.\r\n * @beta\r\n */\r\n public readonly properties?: MapLayerProviderProperties;\r\n\r\n public readonly subLayers: MapSubLayerSettings[];\r\n public override get source(): string { return this.url; }\r\n\r\n /** @internal */\r\n protected constructor(props: ImageMapLayerProps) {\r\n const transparentBackground = props.transparentBackground ?? true;\r\n super(props.name, props.visible, props.transparency, transparentBackground);\r\n\r\n this.formatId = props.formatId;\r\n this.url = props.url;\r\n this.accessKey = props.accessKey;\r\n if (props.queryParams) {\r\n this.savedQueryParams = {...props.queryParams};\r\n }\r\n\r\n if (props.properties) {\r\n this.properties = {...props.properties}\r\n }\r\n\r\n this.subLayers = [];\r\n if (!props.subLayers)\r\n return;\r\n\r\n for (const subLayerProps of props.subLayers) {\r\n const subLayer = MapSubLayerSettings.fromJSON(subLayerProps);\r\n if (subLayer)\r\n this.subLayers.push(subLayer);\r\n }\r\n }\r\n\r\n public static override fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings {\r\n return new this(props);\r\n }\r\n\r\n /** return JSON representation of this MapLayerSettings object */\r\n public override toJSON(): ImageMapLayerProps {\r\n const props = super._toJSON() as ImageMapLayerProps;\r\n props.url = this.url;\r\n props.formatId = this.formatId;\r\n\r\n if (this.subLayers.length > 0)\r\n props.subLayers = this.subLayers.map((x) => x.toJSON());\r\n\r\n if (this.savedQueryParams)\r\n props.queryParams = {...this.savedQueryParams};\r\n\r\n if (this.properties) {\r\n props.properties = structuredClone(this.properties);\r\n }\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings {\r\n const clone = ImageMapLayerSettings.fromJSON(this.cloneProps(changedProps));\r\n\r\n // Clone members not part of MapLayerProps\r\n clone.userName = this.userName;\r\n clone.password = this.password;\r\n if (this.unsavedQueryParams)\r\n clone.unsavedQueryParams = {...this.unsavedQueryParams};\r\n if (this.savedQueryParams)\r\n clone.savedQueryParams = {...this.savedQueryParams};\r\n\r\n return clone;\r\n }\r\n\r\n /** @internal */\r\n protected override cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps {\r\n const props = super.cloneProps(changedProps) as ImageMapLayerProps;\r\n\r\n props.formatId = changedProps.formatId ?? this.formatId;\r\n props.url = changedProps.url ?? this.url;\r\n props.accessKey = changedProps.accessKey ?? this.accessKey;\r\n props.subLayers = changedProps.subLayers ?? this.subLayers;\r\n if (changedProps.queryParams) {\r\n props.queryParams = {...changedProps.queryParams};\r\n } else if (this.savedQueryParams) {\r\n props.queryParams = {...this.savedQueryParams};\r\n }\r\n\r\n if (changedProps.properties) {\r\n props.properties = {...changedProps.properties}\r\n } else if (this.properties) {\r\n props.properties = {...this.properties}\r\n }\r\n return props;\r\n }\r\n\r\n /** @internal */\r\n public override displayMatches(other: MapLayerSettings): boolean {\r\n if (! (other instanceof ImageMapLayerSettings) || !super.displayMatches(other))\r\n return false;\r\n\r\n if (this.userName !== other.userName || this.password !== other.password || this.subLayers.length !== other.subLayers.length) {\r\n return false;\r\n }\r\n\r\n for (let i = 0; i < this.subLayers.length; i++)\r\n if (!this.subLayers[i].displayMatches(other.subLayers[i]))\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n /** Return a sublayer matching id -- or undefined if not found */\r\n public subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined {\r\n return id === undefined ? undefined : this.subLayers.find((subLayer) => subLayer.id === id);\r\n }\r\n\r\n private hasInvisibleAncestors(subLayer?: MapSubLayerSettings): boolean {\r\n if (!subLayer || !subLayer.parent)\r\n return false;\r\n\r\n const parent = this.subLayerById(subLayer.parent);\r\n if (!parent)\r\n return false;\r\n\r\n // Visibility of named group has no impact on the visibility of children (only unnamed group does)\r\n // i.e For WMS, its should be possible to request a child layer when its parent is not visible (if the parent is also named)\r\n return (!parent.visible && !parent.isNamed) || this.hasInvisibleAncestors(parent);\r\n }\r\n\r\n /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */\r\n public isSubLayerVisible(subLayer: MapSubLayerSettings): boolean {\r\n if (!subLayer.visible)\r\n return false;\r\n\r\n return !this.hasInvisibleAncestors(subLayer);\r\n }\r\n\r\n /** Return true if all sublayers are invisible. */\r\n public get allSubLayersInvisible(): boolean {\r\n if (this.subLayers.length === 0)\r\n return false;\r\n\r\n return this.subLayers.every((subLayer) => (subLayer.isUnnamedGroup || !this.isSubLayerVisible(subLayer)));\r\n }\r\n\r\n /** Return the children for a sublayer */\r\n public getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined {\r\n if (!subLayer.children)\r\n return undefined;\r\n\r\n const children = new Array<MapSubLayerSettings>();\r\n subLayer.children.forEach((childId) => {\r\n const child = this.subLayerById(childId);\r\n if (child !== undefined)\r\n children.push(child);\r\n });\r\n\r\n return children;\r\n }\r\n\r\n /** @internal */\r\n protected static mapTypeName(type: BackgroundMapType) { // TBD.. Localization.\r\n switch (type) {\r\n case BackgroundMapType.Aerial:\r\n return \"Aerial Imagery\";\r\n default:\r\n case BackgroundMapType.Hybrid:\r\n return \"Aerial Imagery with labels\";\r\n case BackgroundMapType.Street:\r\n return \"Streets\";\r\n }\r\n }\r\n\r\n public setCredentials(userName?: string, password?: string) {\r\n this.userName = userName;\r\n this.password = password;\r\n }\r\n\r\n /** Collect all query parameters\r\n * @beta\r\n */\r\n public collectQueryParams() {\r\n let queryParams: {[key: string]: string} = {};\r\n if (this.savedQueryParams)\r\n queryParams = {...this.savedQueryParams};\r\n\r\n if (this.unsavedQueryParams)\r\n queryParams = {...queryParams, ...this.unsavedQueryParams};\r\n\r\n return queryParams;\r\n }\r\n}\r\n\r\n/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\r\n * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.\r\n * One or more map layers may be included within [[MapImagerySettings]] object.\r\n * @see [[MapImagerySettings]]\r\n * @see [[ImageMapLayerSettings]] for image based map layer settings.\r\n * @public\r\n */\r\nexport class ModelMapLayerSettings extends MapLayerSettings {\r\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\r\n * @beta\r\n */\r\n public readonly drapeTarget: ModelMapLayerDrapeTarget;\r\n public readonly modelId: Id64String;\r\n public override get source(): string { return this.modelId; }\r\n\r\n /** @internal */\r\n protected constructor(modelId: Id64String, name: string, visible = true,\r\n transparency: number = 0, transparentBackground = true, drapeTarget = ModelMapLayerDrapeTarget.Globe) {\r\n super(name, visible, transparency, transparentBackground);\r\n this.modelId = modelId;\r\n this.drapeTarget = drapeTarget;\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\r\n public static override fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings {\r\n const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;\r\n return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground, json.drapeTarget);\r\n }\r\n\r\n /** return JSON representation of this MapLayerSettings object */\r\n public override toJSON(): ModelMapLayerProps {\r\n const props = super._toJSON() as ModelMapLayerProps;\r\n props.modelId = this.modelId;\r\n if (this.drapeTarget !== ModelMapLayerDrapeTarget.Globe)\r\n props.drapeTarget = this.drapeTarget;\r\n return props;\r\n }\r\n\r\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings {\r\n return ModelMapLayerSettings.fromJSON(this.cloneProps(changedProps));\r\n }\r\n\r\n /** @internal */\r\n protected override cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps {\r\n const props = super.cloneProps(changedProps) as ModelMapLayerProps;\r\n props.modelId = changedProps.modelId ?? this.modelId;\r\n props.drapeTarget = changedProps.drapeTarget ?? this.drapeTarget;\r\n return props;\r\n }\r\n\r\n /** @internal */\r\n public override displayMatches(other: MapLayerSettings): boolean {\r\n if (!(other instanceof ModelMapLayerSettings) || !super.displayMatches(other))\r\n return false;\r\n\r\n return this.modelId === other.modelId;\r\n }\r\n\r\n /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */\r\n public get allSubLayersInvisible(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\n/** JSON representation of a [[BaseMapLayerSettings]].\r\n * @public\r\n */\r\nexport interface BaseMapLayerProps extends ImageMapLayerProps {\r\n provider?: BackgroundMapProviderProps;\r\n}\r\n\r\n/** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].\r\n * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based\r\n * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).\r\n * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows\r\n * the imagery provider and/or type to be easily modified.\r\n * @see [[MapImagerySettings.backgroundBase]].\r\n * @public\r\n */\r\nexport class BaseMapLayerSettings extends ImageMapLayerSettings {\r\n private _provider?: BackgroundMapProvider;\r\n\r\n /** The provider from which this base layer was configured, if any. */\r\n public get provider(): BackgroundMapProvider | undefined { return this._provider; }\r\n\r\n /** Create a base layer from its JSON representation.\r\n * TODO: This, MapLayerSettings.fromJSON, and MapSubLayerSettings.fromJSON should never return undefined.\r\n * That means they should not accept undefined for props and should define props such that it fully describes the\r\n * layer - e.g., url and name must be defined.\r\n */\r\n public static override fromJSON(props: BaseMapLayerProps): BaseMapLayerSettings {\r\n const settings = super.fromJSON(props);\r\n assert(settings instanceof BaseMapLayerSettings);\r\n if (props.provider)\r\n settings._provider = BackgroundMapProvider.fromJSON(props.provider);\r\n\r\n return settings;\r\n }\r\n\r\n /** Convert this layer to its JSON representation. */\r\n public override toJSON(): BaseMapLayerProps {\r\n const props = super.toJSON() as BaseMapLayerProps;\r\n if (this.provider)\r\n props.provider = this.provider.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** @internal */\r\n public override cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps {\r\n const props = super.cloneProps(changedProps) as BaseMapLayerProps;\r\n\r\n if (changedProps.provider)\r\n props.provider = changedProps.provider;\r\n else if (this.provider)\r\n props.provider = this.provider.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Create a copy of this layer. */\r\n public override clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings {\r\n const prevUrl = this.url;\r\n const clone = BaseMapLayerSettings.fromJSON(this.cloneProps(changedProps));\r\n\r\n if (this.provider && prevUrl !== this.url)\r\n clone._provider = undefined;\r\n\r\n return clone;\r\n }\r\n\r\n /** Create a base layer from a BackgroundMapProvider. */\r\n public static fromProvider(provider: BackgroundMapProvider, options?: { invisible?: boolean, transparency?: number }): BaseMapLayerSettings {\r\n let formatId: string, url: string, name: string;\r\n switch (provider.name) {\r\n case \"BingProvider\":\r\n default:\r\n formatId = \"BingMaps\";\r\n\r\n let imagerySet;\r\n switch (provider.type) {\r\n case BackgroundMapType.Street:\r\n imagerySet = \"Road\";\r\n break;\r\n case BackgroundMapType.Aerial:\r\n imagerySet = \"Aerial\";\r\n break;\r\n case BackgroundMapType.Hybrid:\r\n default:\r\n imagerySet = \"AerialWithLabels\";\r\n break;\r\n }\r\n\r\n name = `Bing Maps: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\r\n url = `https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${imagerySet}?o=json&incl=ImageryProviders&key={bingKey}`;\r\n break;\r\n\r\n case \"MapBoxProvider\":\r\n formatId = \"MapboxImagery\";\r\n name = `MapBox: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\r\n switch (provider.type) {\r\n case BackgroundMapType.Street:\r\n url = \"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/\";\r\n break;\r\n case BackgroundMapType.Aerial:\r\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/\";\r\n break;\r\n case BackgroundMapType.Hybrid:\r\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/\";\r\n break;\r\n }\r\n\r\n break;\r\n }\r\n\r\n const settings = super.fromJSON({\r\n name,\r\n formatId,\r\n url,\r\n transparentBackground: false,\r\n visible: !options?.invisible,\r\n transparency: options?.transparency,\r\n });\r\n\r\n assert(undefined !== settings);\r\n assert(settings instanceof BaseMapLayerSettings);\r\n\r\n settings._provider = provider;\r\n return settings;\r\n }\r\n\r\n /** @internal */\r\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BaseMapLayerSettings {\r\n return this.fromProvider(BackgroundMapProvider.fromBackgroundMapProps(props));\r\n }\r\n\r\n /** @alpha */\r\n public cloneWithProvider(provider: BackgroundMapProvider): BaseMapLayerSettings {\r\n return BaseMapLayerSettings.fromProvider(provider, { invisible: !this.visible, transparency: this.transparency });\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MapLayerSettings.js","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH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AiB,CAAC,QAA+B;QACtD,OAAO,oBAAoB,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACpH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** The current set of supported map layer formats.\n * In order to be displayed, a corresponding format must have been registered in the [MapLayerFormatRegistry]($frontend)\n * @public\n */\nexport type ImageryMapLayerFormatId = \"ArcGIS\" | \"BingMaps\" | \"MapboxImagery\" | \"TileURL\" | \"WMS\" | \"WMTS\";\n\n/** @public */\nexport type SubLayerId = string | number;\n\n/**\n * Type for map layer provider array property.\n * @beta\n */\nexport type MapLayerProviderArrayProperty = number[] | string[] | boolean[];\n\n/**\n * Type for map layer provider properties.\n * @beta\n */\nexport interface MapLayerProviderProperties { [key: string]: number | string | boolean | MapLayerProviderArrayProperty };\n\n/** JSON representation of the settings associated with a map sublayer included within a [[MapLayerProps]].\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * @see [[MapLayerProps]]\n * @public\n */\nexport interface MapSubLayerProps {\n name: string;\n title?: string;\n visible?: boolean;\n id?: SubLayerId;\n parent?: SubLayerId;\n children?: SubLayerId[];\n}\n\n/** Normalized representation of a [[MapSubLayerProps]] for which values\n * have been validated and default values have been applied where explicit values not defined.\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.\n * @see [[MapLayerSettings]]\n * @public\n */\nexport class MapSubLayerSettings {\n /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */\n public readonly name: string;\n /** Title. */\n public readonly title?: string;\n /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */\n public readonly visible: boolean;\n /** A unique string or number that may be used to identify the sub layer (ArcGIS) */\n public readonly id: SubLayerId;\n /** One or more sublayer children */\n public readonly children?: SubLayerId[];\n /** sublayer parent. */\n public readonly parent?: SubLayerId;\n\n constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]) {\n this.name = name;\n this.title = title;\n this.visible = visible !== undefined && visible;\n this.id = (id === undefined) ? this.name : id;\n this.parent = parent;\n this.children = children;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static fromJSON(json: MapSubLayerProps): MapSubLayerSettings {\n return new MapSubLayerSettings(json.name, json.title, json.visible, (json.id === json.name) ? undefined : json.id, json.parent, json.children);\n }\n\n public toJSON(): MapSubLayerProps {\n const props: MapSubLayerProps = { name: this.name, visible: this.visible };\n\n if (undefined !== this.id && this.id !== this.name)\n props.id = this.id;\n\n if (undefined !== this.title)\n props.title = this.title;\n\n if (this.children)\n props.children = [...this.children];\n\n if (undefined !== this.parent)\n props.parent = this.parent;\n\n return props;\n }\n\n /** Creating a copy of this MapSubLayer, optionally modifying some if its properties */\n public clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n id: undefined !== changedProps.id ? changedProps.id : this.id,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n parent: undefined !== changedProps.parent ? changedProps.parent : this.parent,\n children: undefined !== changedProps.children ? changedProps.children.slice() : this.children?.slice(),\n title: undefined !== changedProps.title ? changedProps.title : this.title,\n };\n return MapSubLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n public displayMatches(other: MapSubLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible;\n }\n\n /** return true if this sublayer is named. */\n public get isNamed(): boolean { return this.name.length > 0; }\n\n /** return true if this sublayer is a leaf (has no children) */\n public get isLeaf(): boolean { return this.children === undefined || this.children.length === 0; }\n\n /** return true if this sublayer is an unnamed group */\n public get isUnnamedGroup(): boolean { return !this.isLeaf && !this.isNamed; }\n\n /** return a string representing this sublayer id (converting to string if underlying id is number) */\n public get idString(): string { return (typeof this.id === \"number\") ? this.id.toString(10) : this.id; }\n}\n\n/** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].\n * @see [[MapImageryProps]]\n * @public\n */\nexport interface CommonMapLayerProps {\n /** Controls visibility of layer. Defaults to 'true'. */\n visible?: boolean;\n\n /** A user-friendly name for the layer. */\n name: string;\n\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,\n * or false to indicate the transparency should not be overridden.\n * Default value: 0.\n */\n\n transparency?: number;\n /** True to indicate background is transparent.\n * Default: true.\n */\n transparentBackground?: boolean;\n}\n\n/** JSON representation of an [[ImageMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @see [[ImageryMapLayerFormatId]].\n * @public\n */\nexport interface ImageMapLayerProps extends CommonMapLayerProps {\n /** URL */\n url: string;\n /** Identifies the map layers source.*/\n formatId: string;\n /** Source layers. If undefined all layers are displayed. */\n subLayers?: MapSubLayerProps[];\n /** Access Key for the Layer, like a subscription key or access token.\n * ###TODO This does not belong in the props object. It should never be persisted.\n */\n /** @internal */\n accessKey?: MapLayerKey;\n\n /** @internal */\n modelId?: never;\n\n /** List of query parameters that will get appended to the source.\n * @beta\n */\n queryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n properties?: MapLayerProviderProperties;\n\n}\n\n/** The target onto which to drape a model map layer.\n * @beta\n */\nexport enum ModelMapLayerDrapeTarget {\n /** Drape only onto the globe. */\n Globe = 1 << 0,\n /** Drape only onto all attached reality data. */\n RealityData = 1 << 1,\n /** Drape only onto all models within the iModel. */\n IModel = 1 << 2,\n}\n\n/** JSON representation of a [[ModelMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport interface ModelMapLayerProps extends CommonMapLayerProps {\n /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */\n modelId: Id64String;\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\n * @beta\n */\n drapeTarget?: ModelMapLayerDrapeTarget;\n /** @internal */\n url?: never;\n /** @internal */\n formatId?: never;\n /** @internal */\n subLayers?: never;\n /** @internal */\n accessKey?: never;\n}\n\n/** JSON representation of a [[MapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;\n\n/**\n * stores key-value pair to be added to all requests made involving map layer.\n * @public\n */\nexport interface MapLayerKey {\n key: string;\n value: string;\n}\n\n/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @public\n */\nexport abstract class MapLayerSettings {\n public readonly visible: boolean;\n\n public readonly name: string;\n public readonly transparency: number;\n public readonly transparentBackground: boolean;\n public abstract get allSubLayersInvisible(): boolean;\n public abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;\n public abstract toJSON(): MapLayerProps;\n\n /** @internal */\n protected constructor(name: string, visible = true, transparency: number = 0, transparentBackground = true) {\n this.name = name;\n this.visible = visible;\n this.transparentBackground = transparentBackground;\n this.transparency = transparency;\n }\n\n /** Create a map layer settings from its JSON representation. */\n public static fromJSON(props: MapLayerProps): MapLayerSettings {\n return undefined !== props.modelId ? ModelMapLayerSettings.fromJSON(props) : ImageMapLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n protected _toJSON(): CommonMapLayerProps {\n const props: CommonMapLayerProps = {\n name: this.name,\n visible: this.visible,\n };\n\n if (0 !== this.transparency)\n props.transparency = this.transparency;\n\n if (this.transparentBackground === false)\n props.transparentBackground = this.transparentBackground;\n\n return props;\n }\n\n /** @internal */\n protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps {\n return {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n transparency: undefined !== changedProps.transparency ? changedProps.transparency : this.transparency,\n transparentBackground: undefined !== changedProps.transparentBackground ? changedProps.transparentBackground : this.transparentBackground,\n };\n }\n\n /** @internal */\n public displayMatches(other: MapLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible && this.transparency === other.transparency && this.transparentBackground === other.transparentBackground;\n }\n\n /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */\n public abstract get source(): string;\n\n /** @internal */\n public matchesNameAndSource(name: string, source: string): boolean {\n return this.name === name && this.source === source;\n }\n}\n\n/** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ModelMapLayerSettings]] for model based map layer settings.\n * @public\n */\nexport class ImageMapLayerSettings extends MapLayerSettings {\n public readonly formatId: string;\n public readonly url: string;\n public userName?: string;\n public password?: string;\n public accessKey?: MapLayerKey;\n\n /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.\n * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.\n * @beta\n */\n public savedQueryParams?: { [key: string]: string };\n\n /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.\n * @beta\n */\n public unsavedQueryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n public readonly properties?: MapLayerProviderProperties;\n\n public readonly subLayers: MapSubLayerSettings[];\n public override get source(): string { return this.url; }\n\n /** @internal */\n protected constructor(props: ImageMapLayerProps) {\n const transparentBackground = props.transparentBackground ?? true;\n super(props.name, props.visible, props.transparency, transparentBackground);\n\n this.formatId = props.formatId;\n this.url = props.url;\n this.accessKey = props.accessKey;\n if (props.queryParams) {\n this.savedQueryParams = {...props.queryParams};\n }\n\n if (props.properties) {\n this.properties = {...props.properties}\n }\n\n this.subLayers = [];\n if (!props.subLayers)\n return;\n\n for (const subLayerProps of props.subLayers) {\n const subLayer = MapSubLayerSettings.fromJSON(subLayerProps);\n if (subLayer)\n this.subLayers.push(subLayer);\n }\n }\n\n public static override fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings {\n return new this(props);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ImageMapLayerProps {\n const props = super._toJSON() as ImageMapLayerProps;\n props.url = this.url;\n props.formatId = this.formatId;\n\n if (this.subLayers.length > 0)\n props.subLayers = this.subLayers.map((x) => x.toJSON());\n\n if (this.savedQueryParams)\n props.queryParams = {...this.savedQueryParams};\n\n if (this.properties) {\n props.properties = structuredClone(this.properties);\n }\n\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings {\n const clone = ImageMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n // Clone members not part of MapLayerProps\n clone.userName = this.userName;\n clone.password = this.password;\n if (this.unsavedQueryParams)\n clone.unsavedQueryParams = {...this.unsavedQueryParams};\n if (this.savedQueryParams)\n clone.savedQueryParams = {...this.savedQueryParams};\n\n return clone;\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps {\n const props = super.cloneProps(changedProps) as ImageMapLayerProps;\n\n props.formatId = changedProps.formatId ?? this.formatId;\n props.url = changedProps.url ?? this.url;\n props.accessKey = changedProps.accessKey ?? this.accessKey;\n props.subLayers = changedProps.subLayers ?? this.subLayers;\n if (changedProps.queryParams) {\n props.queryParams = {...changedProps.queryParams};\n } else if (this.savedQueryParams) {\n props.queryParams = {...this.savedQueryParams};\n }\n\n if (changedProps.properties) {\n props.properties = {...changedProps.properties}\n } else if (this.properties) {\n props.properties = {...this.properties}\n }\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (! (other instanceof ImageMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n if (this.userName !== other.userName || this.password !== other.password || this.subLayers.length !== other.subLayers.length) {\n return false;\n }\n\n for (let i = 0; i < this.subLayers.length; i++)\n if (!this.subLayers[i].displayMatches(other.subLayers[i]))\n return false;\n\n return true;\n }\n\n /** Return a sublayer matching id -- or undefined if not found */\n public subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined {\n return id === undefined ? undefined : this.subLayers.find((subLayer) => subLayer.id === id);\n }\n\n private hasInvisibleAncestors(subLayer?: MapSubLayerSettings): boolean {\n if (!subLayer || !subLayer.parent)\n return false;\n\n const parent = this.subLayerById(subLayer.parent);\n if (!parent)\n return false;\n\n // Visibility of named group has no impact on the visibility of children (only unnamed group does)\n // i.e For WMS, its should be possible to request a child layer when its parent is not visible (if the parent is also named)\n return (!parent.visible && !parent.isNamed) || this.hasInvisibleAncestors(parent);\n }\n\n /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */\n public isSubLayerVisible(subLayer: MapSubLayerSettings): boolean {\n if (!subLayer.visible)\n return false;\n\n return !this.hasInvisibleAncestors(subLayer);\n }\n\n /** Return true if all sublayers are invisible. */\n public get allSubLayersInvisible(): boolean {\n if (this.subLayers.length === 0)\n return false;\n\n return this.subLayers.every((subLayer) => (subLayer.isUnnamedGroup || !this.isSubLayerVisible(subLayer)));\n }\n\n /** Return the children for a sublayer */\n public getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined {\n if (!subLayer.children)\n return undefined;\n\n const children = new Array<MapSubLayerSettings>();\n subLayer.children.forEach((childId) => {\n const child = this.subLayerById(childId);\n if (child !== undefined)\n children.push(child);\n });\n\n return children;\n }\n\n /** @internal */\n protected static mapTypeName(type: BackgroundMapType) { // TBD.. Localization.\n switch (type) {\n case BackgroundMapType.Aerial:\n return \"Aerial Imagery\";\n default:\n case BackgroundMapType.Hybrid:\n return \"Aerial Imagery with labels\";\n case BackgroundMapType.Street:\n return \"Streets\";\n }\n }\n\n public setCredentials(userName?: string, password?: string) {\n this.userName = userName;\n this.password = password;\n }\n\n /** Collect all query parameters\n * @beta\n */\n public collectQueryParams() {\n let queryParams: {[key: string]: string} = {};\n if (this.savedQueryParams)\n queryParams = {...this.savedQueryParams};\n\n if (this.unsavedQueryParams)\n queryParams = {...queryParams, ...this.unsavedQueryParams};\n\n return queryParams;\n }\n}\n\n/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ImageMapLayerSettings]] for image based map layer settings.\n * @public\n */\nexport class ModelMapLayerSettings extends MapLayerSettings {\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\n * @beta\n */\n public readonly drapeTarget: ModelMapLayerDrapeTarget;\n public readonly modelId: Id64String;\n public override get source(): string { return this.modelId; }\n\n /** @internal */\n protected constructor(modelId: Id64String, name: string, visible = true,\n transparency: number = 0, transparentBackground = true, drapeTarget = ModelMapLayerDrapeTarget.Globe) {\n super(name, visible, transparency, transparentBackground);\n this.modelId = modelId;\n this.drapeTarget = drapeTarget;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static override fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings {\n const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;\n return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground, json.drapeTarget);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ModelMapLayerProps {\n const props = super._toJSON() as ModelMapLayerProps;\n props.modelId = this.modelId;\n if (this.drapeTarget !== ModelMapLayerDrapeTarget.Globe)\n props.drapeTarget = this.drapeTarget;\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings {\n return ModelMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps {\n const props = super.cloneProps(changedProps) as ModelMapLayerProps;\n props.modelId = changedProps.modelId ?? this.modelId;\n props.drapeTarget = changedProps.drapeTarget ?? this.drapeTarget;\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (!(other instanceof ModelMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n return this.modelId === other.modelId;\n }\n\n /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */\n public get allSubLayersInvisible(): boolean {\n return false;\n }\n}\n\n/** JSON representation of a [[BaseMapLayerSettings]].\n * @public\n */\nexport interface BaseMapLayerProps extends ImageMapLayerProps {\n provider?: BackgroundMapProviderProps;\n}\n\n/** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].\n * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based\n * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).\n * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows\n * the imagery provider and/or type to be easily modified.\n * @see [[MapImagerySettings.backgroundBase]].\n * @public\n */\nexport class BaseMapLayerSettings extends ImageMapLayerSettings {\n private _provider?: BackgroundMapProvider;\n\n /** The provider from which this base layer was configured, if any. */\n public get provider(): BackgroundMapProvider | undefined { return this._provider; }\n\n /** Create a base layer from its JSON representation.\n * TODO: This, MapLayerSettings.fromJSON, and MapSubLayerSettings.fromJSON should never return undefined.\n * That means they should not accept undefined for props and should define props such that it fully describes the\n * layer - e.g., url and name must be defined.\n */\n public static override fromJSON(props: BaseMapLayerProps): BaseMapLayerSettings {\n const settings = super.fromJSON(props);\n assert(settings instanceof BaseMapLayerSettings);\n if (props.provider)\n settings._provider = BackgroundMapProvider.fromJSON(props.provider);\n\n return settings;\n }\n\n /** Convert this layer to its JSON representation. */\n public override toJSON(): BaseMapLayerProps {\n const props = super.toJSON() as BaseMapLayerProps;\n if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** @internal */\n public override cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps {\n const props = super.cloneProps(changedProps) as BaseMapLayerProps;\n\n if (changedProps.provider)\n props.provider = changedProps.provider;\n else if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** Create a copy of this layer. */\n public override clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings {\n const prevUrl = this.url;\n const clone = BaseMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n if (this.provider && prevUrl !== this.url)\n clone._provider = undefined;\n\n return clone;\n }\n\n /** Create a base layer from a BackgroundMapProvider. */\n public static fromProvider(provider: BackgroundMapProvider, options?: { invisible?: boolean, transparency?: number }): BaseMapLayerSettings {\n let formatId: string, url: string, name: string;\n switch (provider.name) {\n case \"BingProvider\":\n default:\n formatId = \"BingMaps\";\n\n let imagerySet;\n switch (provider.type) {\n case BackgroundMapType.Street:\n imagerySet = \"Road\";\n break;\n case BackgroundMapType.Aerial:\n imagerySet = \"Aerial\";\n break;\n case BackgroundMapType.Hybrid:\n default:\n imagerySet = \"AerialWithLabels\";\n break;\n }\n\n name = `Bing Maps: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n url = `https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${imagerySet}?o=json&incl=ImageryProviders&key={bingKey}`;\n break;\n\n case \"MapBoxProvider\":\n formatId = \"MapboxImagery\";\n name = `MapBox: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n switch (provider.type) {\n case BackgroundMapType.Street:\n url = \"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/\";\n break;\n case BackgroundMapType.Aerial:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/\";\n break;\n case BackgroundMapType.Hybrid:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/\";\n break;\n }\n\n break;\n }\n\n const settings = super.fromJSON({\n name,\n formatId,\n url,\n transparentBackground: false,\n visible: !options?.invisible,\n transparency: options?.transparency,\n });\n\n assert(undefined !== settings);\n assert(settings instanceof BaseMapLayerSettings);\n\n settings._provider = provider;\n return settings;\n }\n\n /** @internal */\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BaseMapLayerSettings {\n return this.fromProvider(BackgroundMapProvider.fromBackgroundMapProps(props));\n }\n\n /** @alpha */\n public cloneWithProvider(provider: BackgroundMapProvider): BaseMapLayerSettings {\n return BaseMapLayerSettings.fromProvider(provider, { invisible: !this.visible, transparency: this.transparency });\n }\n}\n"]}