@itwin/core-common 5.2.0-dev.8 → 5.2.0

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 (404) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  3. package/lib/cjs/AnalysisStyle.js.map +1 -1
  4. package/lib/cjs/Atmosphere.js.map +1 -1
  5. package/lib/cjs/AuthorizationClient.js.map +1 -1
  6. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  7. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  8. package/lib/cjs/Base64EncodedString.js.map +1 -1
  9. package/lib/cjs/BlobReader.js.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.d.ts +2 -0
  11. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  12. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  13. package/lib/cjs/Camera.js.map +1 -1
  14. package/lib/cjs/CatalogIModel.js.map +1 -1
  15. package/lib/cjs/CesiumIonAssets.js.map +1 -1
  16. package/lib/cjs/ChangedElements.js.map +1 -1
  17. package/lib/cjs/ChangedEntities.js.map +1 -1
  18. package/lib/cjs/ChangesetProps.js.map +1 -1
  19. package/lib/cjs/ClipStyle.js.map +1 -1
  20. package/lib/cjs/Code.js.map +1 -1
  21. package/lib/cjs/ColorByName.js.map +1 -1
  22. package/lib/cjs/ColorDef.js.map +1 -1
  23. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  24. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  25. package/lib/cjs/ContextRealityModel.js.map +1 -1
  26. package/lib/cjs/ContourDisplay.js.map +1 -1
  27. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  28. package/lib/cjs/ECSchemaProps.js.map +1 -1
  29. package/lib/cjs/ECSqlReader.js.map +1 -1
  30. package/lib/cjs/ECSqlTypes.js.map +1 -1
  31. package/lib/cjs/ElementMesh.js.map +1 -1
  32. package/lib/cjs/ElementProps.d.ts +32 -6
  33. package/lib/cjs/ElementProps.d.ts.map +1 -1
  34. package/lib/cjs/ElementProps.js.map +1 -1
  35. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  36. package/lib/cjs/EntityProps.js.map +1 -1
  37. package/lib/cjs/EntityReference.js.map +1 -1
  38. package/lib/cjs/Environment.js.map +1 -1
  39. package/lib/cjs/FeatureIndex.js.map +1 -1
  40. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  41. package/lib/cjs/FeatureSymbology.js +0 -2
  42. package/lib/cjs/FeatureSymbology.js.map +1 -1
  43. package/lib/cjs/FeatureTable.js.map +1 -1
  44. package/lib/cjs/Fonts.js.map +1 -1
  45. package/lib/cjs/Frustum.js.map +1 -1
  46. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  47. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  48. package/lib/cjs/GeometryContainment.js.map +1 -1
  49. package/lib/cjs/GeometryParams.js.map +1 -1
  50. package/lib/cjs/GeometrySummary.js.map +1 -1
  51. package/lib/cjs/Gradient.js.map +1 -1
  52. package/lib/cjs/GraphicParams.js.map +1 -1
  53. package/lib/cjs/GroundPlane.js.map +1 -1
  54. package/lib/cjs/HSLColor.js.map +1 -1
  55. package/lib/cjs/HSVColor.js.map +1 -1
  56. package/lib/cjs/HiddenLine.js.map +1 -1
  57. package/lib/cjs/Hilite.js.map +1 -1
  58. package/lib/cjs/IModel.js.map +1 -1
  59. package/lib/cjs/IModelError.js.map +1 -1
  60. package/lib/cjs/IModelVersion.js.map +1 -1
  61. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  62. package/lib/cjs/Image.js.map +1 -1
  63. package/lib/cjs/IpcAppProps.js.map +1 -1
  64. package/lib/cjs/LightSettings.js.map +1 -1
  65. package/lib/cjs/LinePixels.js.map +1 -1
  66. package/lib/cjs/Localization.js.map +1 -1
  67. package/lib/cjs/MapImagerySettings.js.map +1 -1
  68. package/lib/cjs/MapLayerSettings.js.map +1 -1
  69. package/lib/cjs/MassProperties.js.map +1 -1
  70. package/lib/cjs/MaterialProps.js.map +1 -1
  71. package/lib/cjs/ModelClipGroup.js.map +1 -1
  72. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  73. package/lib/cjs/ModelProps.js.map +1 -1
  74. package/lib/cjs/NativeAppProps.js.map +1 -1
  75. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  76. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  77. package/lib/cjs/PlanarClipMask.js.map +1 -1
  78. package/lib/cjs/QPoint.js.map +1 -1
  79. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  80. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  81. package/lib/cjs/RenderMaterial.js.map +1 -1
  82. package/lib/cjs/RenderPolyline.js.map +1 -1
  83. package/lib/cjs/RenderTexture.js.map +1 -1
  84. package/lib/cjs/RgbColor.js.map +1 -1
  85. package/lib/cjs/RpcInterface.js.map +1 -1
  86. package/lib/cjs/RpcManager.js.map +1 -1
  87. package/lib/cjs/SessionProps.js.map +1 -1
  88. package/lib/cjs/SkyBox.js.map +1 -1
  89. package/lib/cjs/SolarCalculate.js.map +1 -1
  90. package/lib/cjs/SolarShadows.js.map +1 -1
  91. package/lib/cjs/SpatialClassification.js.map +1 -1
  92. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  93. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  94. package/lib/cjs/TerrainSettings.js.map +1 -1
  95. package/lib/cjs/TextureMapping.js.map +1 -1
  96. package/lib/cjs/TextureProps.js.map +1 -1
  97. package/lib/cjs/ThematicDisplay.js.map +1 -1
  98. package/lib/cjs/Thumbnail.js.map +1 -1
  99. package/lib/cjs/TileProps.js.map +1 -1
  100. package/lib/cjs/Tween.js.map +1 -1
  101. package/lib/cjs/TxnAction.js.map +1 -1
  102. package/lib/cjs/ViewDetails.js.map +1 -1
  103. package/lib/cjs/ViewFlags.js.map +1 -1
  104. package/lib/cjs/ViewProps.js.map +1 -1
  105. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  106. package/lib/cjs/annotation/TextAnnotation.d.ts +1 -1
  107. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  108. package/lib/cjs/annotation/TextAnnotation.js +1 -1
  109. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  110. package/lib/cjs/annotation/TextBlock.d.ts +111 -126
  111. package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
  112. package/lib/cjs/annotation/TextBlock.js +234 -142
  113. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  114. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  115. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts +3 -5
  116. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  117. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  118. package/lib/cjs/annotation/TextField.d.ts +86 -0
  119. package/lib/cjs/annotation/TextField.d.ts.map +1 -0
  120. package/lib/cjs/annotation/TextField.js +10 -0
  121. package/lib/cjs/annotation/TextField.js.map +1 -0
  122. package/lib/cjs/annotation/TextStyle.d.ts +125 -35
  123. package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
  124. package/lib/cjs/annotation/TextStyle.js +105 -46
  125. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  126. package/lib/cjs/core-common.d.ts +1 -0
  127. package/lib/cjs/core-common.d.ts.map +1 -1
  128. package/lib/cjs/core-common.js +1 -0
  129. package/lib/cjs/core-common.js.map +1 -1
  130. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  131. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  132. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  133. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  134. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  135. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  136. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  137. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  138. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  139. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  140. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  141. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  142. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  143. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  144. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  145. package/lib/cjs/geometry/Placement.js.map +1 -1
  146. package/lib/cjs/geometry/Projection.js.map +1 -1
  147. package/lib/cjs/geometry/TextString.js.map +1 -1
  148. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  149. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  150. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  151. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  152. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  153. package/lib/cjs/internal/Snapping.js.map +1 -1
  154. package/lib/cjs/internal/annotations/FieldFormatter.d.ts +18 -0
  155. package/lib/cjs/internal/annotations/FieldFormatter.d.ts.map +1 -0
  156. package/lib/cjs/internal/annotations/FieldFormatter.js +66 -0
  157. package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -0
  158. package/lib/cjs/internal/cross-package.d.ts +1 -0
  159. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  160. package/lib/cjs/internal/cross-package.js +4 -1
  161. package/lib/cjs/internal/cross-package.js.map +1 -1
  162. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  163. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  164. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  165. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  166. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  167. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  168. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  169. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  170. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  171. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  172. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  173. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  174. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  175. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  176. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  177. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  178. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  179. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  180. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  181. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  182. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  183. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  184. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  185. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  186. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  187. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  188. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  189. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  190. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  191. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  192. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  193. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  194. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  195. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  196. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  197. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  198. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  199. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  200. package/lib/cjs/tile/TileIO.js.map +1 -1
  201. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  202. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  203. package/lib/esm/AmbientOcclusion.js.map +1 -1
  204. package/lib/esm/AnalysisStyle.js.map +1 -1
  205. package/lib/esm/Atmosphere.js.map +1 -1
  206. package/lib/esm/AuthorizationClient.js.map +1 -1
  207. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  208. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  209. package/lib/esm/Base64EncodedString.js.map +1 -1
  210. package/lib/esm/BlobReader.js.map +1 -1
  211. package/lib/esm/BriefcaseTypes.d.ts +2 -0
  212. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  213. package/lib/esm/BriefcaseTypes.js.map +1 -1
  214. package/lib/esm/Camera.js.map +1 -1
  215. package/lib/esm/CatalogIModel.js.map +1 -1
  216. package/lib/esm/CesiumIonAssets.js.map +1 -1
  217. package/lib/esm/ChangedElements.js.map +1 -1
  218. package/lib/esm/ChangedEntities.js.map +1 -1
  219. package/lib/esm/ChangesetProps.js.map +1 -1
  220. package/lib/esm/ClipStyle.js.map +1 -1
  221. package/lib/esm/Code.js.map +1 -1
  222. package/lib/esm/ColorByName.js.map +1 -1
  223. package/lib/esm/ColorDef.js.map +1 -1
  224. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  225. package/lib/esm/ConcurrentQuery.js.map +1 -1
  226. package/lib/esm/ContextRealityModel.js.map +1 -1
  227. package/lib/esm/ContourDisplay.js.map +1 -1
  228. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  229. package/lib/esm/ECSchemaProps.js.map +1 -1
  230. package/lib/esm/ECSqlReader.js.map +1 -1
  231. package/lib/esm/ECSqlTypes.js.map +1 -1
  232. package/lib/esm/ElementMesh.js.map +1 -1
  233. package/lib/esm/ElementProps.d.ts +32 -6
  234. package/lib/esm/ElementProps.d.ts.map +1 -1
  235. package/lib/esm/ElementProps.js.map +1 -1
  236. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  237. package/lib/esm/EntityProps.js.map +1 -1
  238. package/lib/esm/EntityReference.js.map +1 -1
  239. package/lib/esm/Environment.js.map +1 -1
  240. package/lib/esm/FeatureIndex.js.map +1 -1
  241. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  242. package/lib/esm/FeatureSymbology.js +0 -2
  243. package/lib/esm/FeatureSymbology.js.map +1 -1
  244. package/lib/esm/FeatureTable.js.map +1 -1
  245. package/lib/esm/Fonts.js.map +1 -1
  246. package/lib/esm/Frustum.js.map +1 -1
  247. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  248. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  249. package/lib/esm/GeometryContainment.js.map +1 -1
  250. package/lib/esm/GeometryParams.js.map +1 -1
  251. package/lib/esm/GeometrySummary.js.map +1 -1
  252. package/lib/esm/Gradient.js.map +1 -1
  253. package/lib/esm/GraphicParams.js.map +1 -1
  254. package/lib/esm/GroundPlane.js.map +1 -1
  255. package/lib/esm/HSLColor.js.map +1 -1
  256. package/lib/esm/HSVColor.js.map +1 -1
  257. package/lib/esm/HiddenLine.js.map +1 -1
  258. package/lib/esm/Hilite.js.map +1 -1
  259. package/lib/esm/IModel.js.map +1 -1
  260. package/lib/esm/IModelError.js.map +1 -1
  261. package/lib/esm/IModelVersion.js.map +1 -1
  262. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  263. package/lib/esm/Image.js.map +1 -1
  264. package/lib/esm/IpcAppProps.js.map +1 -1
  265. package/lib/esm/LightSettings.js.map +1 -1
  266. package/lib/esm/LinePixels.js.map +1 -1
  267. package/lib/esm/Localization.js.map +1 -1
  268. package/lib/esm/MapImagerySettings.js.map +1 -1
  269. package/lib/esm/MapLayerSettings.js.map +1 -1
  270. package/lib/esm/MassProperties.js.map +1 -1
  271. package/lib/esm/MaterialProps.js.map +1 -1
  272. package/lib/esm/ModelClipGroup.js.map +1 -1
  273. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  274. package/lib/esm/ModelProps.js.map +1 -1
  275. package/lib/esm/NativeAppProps.js.map +1 -1
  276. package/lib/esm/OctEncodedNormal.js.map +1 -1
  277. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  278. package/lib/esm/PlanarClipMask.js.map +1 -1
  279. package/lib/esm/QPoint.js.map +1 -1
  280. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  281. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  282. package/lib/esm/RenderMaterial.js.map +1 -1
  283. package/lib/esm/RenderPolyline.js.map +1 -1
  284. package/lib/esm/RenderTexture.js.map +1 -1
  285. package/lib/esm/RgbColor.js.map +1 -1
  286. package/lib/esm/RpcInterface.js.map +1 -1
  287. package/lib/esm/RpcManager.js.map +1 -1
  288. package/lib/esm/SessionProps.js.map +1 -1
  289. package/lib/esm/SkyBox.js.map +1 -1
  290. package/lib/esm/SolarCalculate.js.map +1 -1
  291. package/lib/esm/SolarShadows.js.map +1 -1
  292. package/lib/esm/SpatialClassification.js.map +1 -1
  293. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  294. package/lib/esm/SubCategoryOverride.js.map +1 -1
  295. package/lib/esm/TerrainSettings.js.map +1 -1
  296. package/lib/esm/TextureMapping.js.map +1 -1
  297. package/lib/esm/TextureProps.js.map +1 -1
  298. package/lib/esm/ThematicDisplay.js.map +1 -1
  299. package/lib/esm/Thumbnail.js.map +1 -1
  300. package/lib/esm/TileProps.js.map +1 -1
  301. package/lib/esm/Tween.js.map +1 -1
  302. package/lib/esm/TxnAction.js.map +1 -1
  303. package/lib/esm/ViewDetails.js.map +1 -1
  304. package/lib/esm/ViewFlags.js.map +1 -1
  305. package/lib/esm/ViewProps.js.map +1 -1
  306. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  307. package/lib/esm/annotation/TextAnnotation.d.ts +1 -1
  308. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  309. package/lib/esm/annotation/TextAnnotation.js +1 -1
  310. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  311. package/lib/esm/annotation/TextBlock.d.ts +111 -126
  312. package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
  313. package/lib/esm/annotation/TextBlock.js +230 -141
  314. package/lib/esm/annotation/TextBlock.js.map +1 -1
  315. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  316. package/lib/esm/annotation/TextBlockLayoutResult.d.ts +3 -5
  317. package/lib/esm/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  318. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  319. package/lib/esm/annotation/TextField.d.ts +86 -0
  320. package/lib/esm/annotation/TextField.d.ts.map +1 -0
  321. package/lib/esm/annotation/TextField.js +9 -0
  322. package/lib/esm/annotation/TextField.js.map +1 -0
  323. package/lib/esm/annotation/TextStyle.d.ts +125 -35
  324. package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
  325. package/lib/esm/annotation/TextStyle.js +104 -45
  326. package/lib/esm/annotation/TextStyle.js.map +1 -1
  327. package/lib/esm/core-common.d.ts +1 -0
  328. package/lib/esm/core-common.d.ts.map +1 -1
  329. package/lib/esm/core-common.js +1 -0
  330. package/lib/esm/core-common.js.map +1 -1
  331. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  332. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  333. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  334. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  335. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  336. package/lib/esm/geometry/Cartographic.js.map +1 -1
  337. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  338. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  339. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  340. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  341. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  342. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  343. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  344. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  345. package/lib/esm/geometry/LineStyle.js.map +1 -1
  346. package/lib/esm/geometry/Placement.js.map +1 -1
  347. package/lib/esm/geometry/Projection.js.map +1 -1
  348. package/lib/esm/geometry/TextString.js.map +1 -1
  349. package/lib/esm/internal/BackendTypes.js.map +1 -1
  350. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  351. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  352. package/lib/esm/internal/RenderMesh.js.map +1 -1
  353. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  354. package/lib/esm/internal/Snapping.js.map +1 -1
  355. package/lib/esm/internal/annotations/FieldFormatter.d.ts +18 -0
  356. package/lib/esm/internal/annotations/FieldFormatter.d.ts.map +1 -0
  357. package/lib/esm/internal/annotations/FieldFormatter.js +62 -0
  358. package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -0
  359. package/lib/esm/internal/cross-package.d.ts +1 -0
  360. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  361. package/lib/esm/internal/cross-package.js +1 -0
  362. package/lib/esm/internal/cross-package.js.map +1 -1
  363. package/lib/esm/ipc/IpcSession.js.map +1 -1
  364. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  365. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  366. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  367. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  368. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  369. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  370. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  371. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  372. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  373. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  374. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  375. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  376. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  377. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  378. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  379. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  380. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  381. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  382. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  383. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  384. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  385. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  386. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  387. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  388. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  389. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  390. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  391. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  392. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  393. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  394. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  395. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  396. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  397. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  398. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  399. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  400. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  401. package/lib/esm/tile/TileIO.js.map +1 -1
  402. package/lib/esm/tile/TileMetadata.js.map +1 -1
  403. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  404. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ModelClipGroup.js","sourceRoot":"","sources":["../../src/ModelClipGroup.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAAmE;AAanE;;;GAGG;AACH,MAAa,cAAc;IACzB,0FAA0F;IAC1E,MAAM,CAAa;IACnC,2GAA2G;IAC3F,IAAI,CAAc;IAElC,YAAoB,MAA6B,EAAE,IAA4B;QAC7E,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,2HAA2H;IACpH,MAAM,CAAC,MAAM,CAAC,IAA4B,EAAE,MAAkB;QACnE,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;IAED,wCAAwC;IACjC,KAAK;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1D,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,oEAAoE;IAC7D,aAAa,CAAC,OAAmB;QACtC,OAAO,SAAS,KAAK,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAA0B;QAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC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QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,eAAe,CAAC,OAAmB;QACxC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC;IACvC,CAAC;IAED,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAwC;QAC7D,MAAM,MAAM,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,sCAAsC;IAC/B,MAAM;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;CACF;AA5CD,0CA4CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\n\nimport { Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { ClipVector, ClipVectorProps } from \"@itwin/core-geometry\";\n\n/** JSON representation of a [[ModelClipGroup]].\n * @public\n * @extensions\n */\nexport interface ModelClipGroupProps {\n /** The Ids of the models in the group. */\n models?: Id64Array;\n /** JSON representation of the [ClipVector]($core-geometry) applied to the group. */\n clip?: ClipVectorProps;\n}\n\n/** Describes how to clip a group of models in the context of a [ViewDefinition3d]($backend) by applying a single [ClipVector]($core-geometry] to each model in the group.\n * @see [[ModelClipGroups]] to define multiple groups of models with different clip vectors.\n * @public\n */\nexport class ModelClipGroup {\n /** The Ids of the models to be clipped, or undefined if the group includes all models. */\n public readonly models?: Id64Array;\n /** The clip to apply to the group of models. `undefined` indicates the models are exempt from clipping. */\n public readonly clip?: ClipVector;\n\n private constructor(models: Id64Array | undefined, clip: ClipVector | undefined) {\n this.models = models;\n this.clip = clip;\n }\n\n /** Create a new ModelClipGroup. The input arguments are captured as references and should not be subsequently modified. */\n public static create(clip: ClipVector | undefined, models?: Id64Array): ModelClipGroup {\n return new ModelClipGroup(models, clip);\n }\n\n /** Create a deep copy of this group. */\n public clone(): ModelClipGroup {\n const models = this.models ? [...this.models] : undefined;\n return new ModelClipGroup(models, this.clip?.clone());\n }\n\n /** Returns whether the specified model Id belongs to this group. */\n public includesModel(modelId: Id64String): boolean {\n return undefined === this.models || this.models.includes(modelId);\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props: ModelClipGroupProps): ModelClipGroup {\n const models = props.models ? [...props.models] : undefined;\n const clip = props.clip ? ClipVector.fromJSON(props.clip) : undefined;\n return new ModelClipGroup(models, undefined !== clip && clip.isValid ? clip : undefined);\n }\n\n /** Convert to JSON representation. */\n public toJSON(): ModelClipGroupProps {\n const props: ModelClipGroupProps = {};\n if (this.models)\n props.models = [...this.models];\n\n if (this.clip)\n props.clip = this.clip.toJSON();\n\n return props;\n }\n}\n\n/** Describes how to clip groups of models in the context of a [ViewDefinition3d]($backend) or [ViewState3d]($frontend).\n * Each group will be clipped by the [ClipVector]($core-geometry) associated with the group to which it belongs.\n * A model belongs to the first group in the list for which `ModelClipGroup.includesModel()` returns `true`.\n * A catch-all group can be defined by a ModelClipGroup with an `undefined` array of model Ids; any model whose Id does not appear in any group's list would belong to this group. If a catch-all group exists, it should appear last in the list.\n * A group of models can be exempted from clipping by a ModelClipGroup with an `undefined` ClipVector.\n * @note A ModelClipGroups obtained from a [[ViewDetails3d]] should **not** be modified directly. Clone it instead and modify the clone.\n * @see [[ViewDetails3d.modelClipGroups]] to define the clip groups for a [ViewDefinition3d]($backend) or [ViewState3d]($frontend).\n * @public\n */\nexport class ModelClipGroups {\n /** The groups of models and their associated clips. */\n public readonly groups: ModelClipGroup[];\n\n /** Create a new ModelClipGroups.\n * @note The ModelClipGroup takes ownership of the input array, which should not be subsequently modified.\n */\n public constructor(groups: ModelClipGroup[] = []) {\n this.groups = groups;\n }\n\n /** Create a deep copy of this ModelClipGroups. */\n public clone(): ModelClipGroups {\n const groups = this.groups.map((group) => group.clone());\n return new ModelClipGroups(groups);\n }\n\n /** Find the first group to which the specified model Id belongs, if any. */\n public findGroup(modelId: Id64String): ModelClipGroup | undefined {\n return this.groups.find((group) => group.includesModel(modelId));\n }\n\n /** Returns the array index of the group to which the specified model belongs, or -1 if the model belongs to no group. */\n public findGroupIndex(modelId: Id64String): number {\n return this.groups.findIndex((group) => group.includesModel(modelId));\n }\n\n /** Find the clip that should be applied to the specified model.\n * @note This may return `undefined` if the model belongs to no group, **or** it belongs to a group that should not be clipped.\n */\n public getClipForModel(modelId: Id64String): ClipVector | undefined {\n return this.findGroup(modelId)?.clip;\n }\n\n /** Create from JSON representation. */\n public static fromJSON(props: ModelClipGroupProps[] | undefined): ModelClipGroups {\n const groups = props?.map((prop) => ModelClipGroup.fromJSON(prop));\n return new ModelClipGroups(groups);\n }\n\n /** Convert to JSON representation. */\n public toJSON(): ModelClipGroupProps[] {\n return this.groups.map((group) => group.toJSON());\n }\n}\n"]}
1
+ {"version":3,"file":"ModelClipGroup.js","sourceRoot":"","sources":["../../src/ModelClipGroup.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAAmE;AAanE;;;GAGG;AACH,MAAa,cAAc;IACzB,0FAA0F;IAC1E,MAAM,CAAa;IACnC,2GAA2G;IAC3F,IAAI,CAAc;IAElC,YAAoB,MAA6B,EAAE,IAA4B;QAC7E,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,2HAA2H;IACpH,MAAM,CAAC,MAAM,CAAC,IAA4B,E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,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;CACF;AA5CD,0CA4CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { ClipVector, ClipVectorProps } from \"@itwin/core-geometry\";\r\n\r\n/** JSON representation of a [[ModelClipGroup]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelClipGroupProps {\r\n /** The Ids of the models in the group. */\r\n models?: Id64Array;\r\n /** JSON representation of the [ClipVector]($core-geometry) applied to the group. */\r\n clip?: ClipVectorProps;\r\n}\r\n\r\n/** Describes how to clip a group of models in the context of a [ViewDefinition3d]($backend) by applying a single [ClipVector]($core-geometry] to each model in the group.\r\n * @see [[ModelClipGroups]] to define multiple groups of models with different clip vectors.\r\n * @public\r\n */\r\nexport class ModelClipGroup {\r\n /** The Ids of the models to be clipped, or undefined if the group includes all models. */\r\n public readonly models?: Id64Array;\r\n /** The clip to apply to the group of models. `undefined` indicates the models are exempt from clipping. */\r\n public readonly clip?: ClipVector;\r\n\r\n private constructor(models: Id64Array | undefined, clip: ClipVector | undefined) {\r\n this.models = models;\r\n this.clip = clip;\r\n }\r\n\r\n /** Create a new ModelClipGroup. The input arguments are captured as references and should not be subsequently modified. */\r\n public static create(clip: ClipVector | undefined, models?: Id64Array): ModelClipGroup {\r\n return new ModelClipGroup(models, clip);\r\n }\r\n\r\n /** Create a deep copy of this group. */\r\n public clone(): ModelClipGroup {\r\n const models = this.models ? [...this.models] : undefined;\r\n return new ModelClipGroup(models, this.clip?.clone());\r\n }\r\n\r\n /** Returns whether the specified model Id belongs to this group. */\r\n public includesModel(modelId: Id64String): boolean {\r\n return undefined === this.models || this.models.includes(modelId);\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props: ModelClipGroupProps): ModelClipGroup {\r\n const models = props.models ? [...props.models] : undefined;\r\n const clip = props.clip ? ClipVector.fromJSON(props.clip) : undefined;\r\n return new ModelClipGroup(models, undefined !== clip && clip.isValid ? clip : undefined);\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): ModelClipGroupProps {\r\n const props: ModelClipGroupProps = {};\r\n if (this.models)\r\n props.models = [...this.models];\r\n\r\n if (this.clip)\r\n props.clip = this.clip.toJSON();\r\n\r\n return props;\r\n }\r\n}\r\n\r\n/** Describes how to clip groups of models in the context of a [ViewDefinition3d]($backend) or [ViewState3d]($frontend).\r\n * Each group will be clipped by the [ClipVector]($core-geometry) associated with the group to which it belongs.\r\n * A model belongs to the first group in the list for which `ModelClipGroup.includesModel()` returns `true`.\r\n * A catch-all group can be defined by a ModelClipGroup with an `undefined` array of model Ids; any model whose Id does not appear in any group's list would belong to this group. If a catch-all group exists, it should appear last in the list.\r\n * A group of models can be exempted from clipping by a ModelClipGroup with an `undefined` ClipVector.\r\n * @note A ModelClipGroups obtained from a [[ViewDetails3d]] should **not** be modified directly. Clone it instead and modify the clone.\r\n * @see [[ViewDetails3d.modelClipGroups]] to define the clip groups for a [ViewDefinition3d]($backend) or [ViewState3d]($frontend).\r\n * @public\r\n */\r\nexport class ModelClipGroups {\r\n /** The groups of models and their associated clips. */\r\n public readonly groups: ModelClipGroup[];\r\n\r\n /** Create a new ModelClipGroups.\r\n * @note The ModelClipGroup takes ownership of the input array, which should not be subsequently modified.\r\n */\r\n public constructor(groups: ModelClipGroup[] = []) {\r\n this.groups = groups;\r\n }\r\n\r\n /** Create a deep copy of this ModelClipGroups. */\r\n public clone(): ModelClipGroups {\r\n const groups = this.groups.map((group) => group.clone());\r\n return new ModelClipGroups(groups);\r\n }\r\n\r\n /** Find the first group to which the specified model Id belongs, if any. */\r\n public findGroup(modelId: Id64String): ModelClipGroup | undefined {\r\n return this.groups.find((group) => group.includesModel(modelId));\r\n }\r\n\r\n /** Returns the array index of the group to which the specified model belongs, or -1 if the model belongs to no group. */\r\n public findGroupIndex(modelId: Id64String): number {\r\n return this.groups.findIndex((group) => group.includesModel(modelId));\r\n }\r\n\r\n /** Find the clip that should be applied to the specified model.\r\n * @note This may return `undefined` if the model belongs to no group, **or** it belongs to a group that should not be clipped.\r\n */\r\n public getClipForModel(modelId: Id64String): ClipVector | undefined {\r\n return this.findGroup(modelId)?.clip;\r\n }\r\n\r\n /** Create from JSON representation. */\r\n public static fromJSON(props: ModelClipGroupProps[] | undefined): ModelClipGroups {\r\n const groups = props?.map((prop) => ModelClipGroup.fromJSON(prop));\r\n return new ModelClipGroups(groups);\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): ModelClipGroupProps[] {\r\n return this.groups.map((group) => group.toJSON());\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModelGeometryChanges.js","sourceRoot":"","sources":["../../src/ModelGeometryChanges.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAkG;AAClG,wDAA6D;AAwE7D;;GAEG;AACH,IAAiB,qBAAqB,CAiCrC;AAjCD,WAAiB,qBAAqB;IACpC,QAAQ,CAAC,CAAC,cAAc,CAAC,KAA+B,EAAE,IAAuC;QAC/F,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,GAAG,GAAG,gCAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClD,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;YACrB,IAAA,qBAAM,EAAC,SAAS,KAAK,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,MAAM,KAAK,GAAG,uBAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACpD,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,IAA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,CAAC;IAC1B,CAAC;IAHgB,6BAAQ,WAGxB,CAAA;IAED,gHAAgH;IAChH,SAAgB,QAAQ,CAAC,YAAyC;QAChE,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;IAC7D,CAAC;IAFe,6BAAQ,WAEvB,CAAA;IAED,oCAAoC;IACpC,SAAgB,QAAQ,CAAC,KAAgC;QACvD,OAAO;YACL,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,YAAY,EAAE,KAAK,CAAC,IAAI;YACxB,KAAK,EAAE,uBAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;YACpC,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC;SAChD,CAAC;IACJ,CAAC;IAPe,6BAAQ,WAOvB,CAAA;IAED,kEAAkE;IAClE,SAAgB,aAAa,CAAC,OAAuC,EAAE,OAAmB;QACxF,KAAK,MAAM,MAAM,IAAI,OAAO;YAC1B,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO;gBACvB,OAAO,MAAM,CAAC;QAElB,OAAO,SAAS,CAAC;IACnB,CAAC;IANe,kCAAa,gBAM5B,CAAA;AACH,CAAC,EA9BgB,oBAAoB,oCAApB,oBAAoB,QA8BpC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { assert, CompressedId64Set, DbOpcode, GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { Range3d, Range3dProps } from \"@itwin/core-geometry\";\n\n/** Compact wire format representing geometric changes to a set of elements as part of a [[ModelGeometryChangesProps]].\n * All of the elements belong to the same model.\n * The number of [[ids]] and [[ranges]] are guaranteed to be the same.\n * @see [[ElementGeometryChange]] for a more useful representation of an individual element change.\n * @see [[ModelGeometryChanges.iterable]] to iterate over [[ElementGeometryChange]]s.\n * @public\n * @extensions\n */\nexport interface ElementIdsAndRangesProps {\n /** The Ids of the elements, compressed and sorted in ascending order. */\n readonly ids: CompressedId64Set;\n /** The range of each element, indexed by the position of the corresponding element's Id in [[ids]]. */\n readonly ranges: Range3dProps[];\n}\n\n/** Compact wire format representing geometric changes to [GeometricElement]($backend)s within a [GeometricModel]($backend).\n * A given element Id will appear in no more than one of [[inserted]], [[updated]], or [[deleted]].\n * @see [[ModelGeometryChanges]] for a more useful representation.\n * @public\n * @extensions\n */\nexport interface ModelGeometryChangesProps {\n /** The Id of the model. */\n readonly id: Id64String;\n /** The range of the model, computed as the union of the ranges of all geometric elements within the model. */\n readonly range: Range3dProps;\n /** The geometry GUID of the model. */\n readonly guid: GuidString;\n /** If defined, the Ids and ranges of newly-inserted [GeometricElement]($backend)s. */\n readonly inserted?: ElementIdsAndRangesProps;\n /** If defined, the Ids and ranges of [GeometricElement]($backend)s whose geometric properties were modified. */\n readonly updated?: ElementIdsAndRangesProps;\n /** If defined, the Ids of deleted [GeometricElement]($backend)s. */\n readonly deleted?: CompressedId64Set;\n}\n\n/** Represents the insertion of a new [GeometricElement]($backend), or a change to the geometric properties of an existing [GeometricElement]($backend).\n * @see [[ElementGeometryChange]].\n * @public\n * @extensions\n */\nexport interface ExtantElementGeometryChange {\n /** Indicates whether this change resulted from the insertion of a new element or modification of an existing one.\n * Used as discriminant for [[ElementGeometryChange]] union.\n */\n readonly type: DbOpcode.Insert | DbOpcode.Update;\n /** The element's Id. */\n readonly id: Id64String;\n /** The element's range. */\n readonly range: Range3d;\n}\n\n/** Represents the deletion of a [GeometricElement]($backend).\n * @see [[ElementGeometryChange]].\n * @public\n * @extensions\n */\nexport interface DeletedElementGeometryChange {\n /** Discriminant for [[ElementGeometryChange]] union. */\n readonly type: DbOpcode.Delete;\n /** The element's Id. */\n readonly id: Id64String;\n}\n\n/**\n * @public\n * @extensions\n */\nexport type ElementGeometryChange = ExtantElementGeometryChange | DeletedElementGeometryChange;\n\n/** Represents a change to the geometry of a [GeometricElement]($backend), as exposed by [[ModelGeometryChanges.elements]].\n * @public\n */\nexport namespace ElementGeometryChange { // eslint-disable-line @typescript-eslint/no-redeclare\n function* extantIterator(props: ElementIdsAndRangesProps, type: DbOpcode.Insert | DbOpcode.Update): Iterator<ElementGeometryChange> {\n let index = 0;\n const ids = CompressedId64Set.iterable(props.ids);\n for (const id of ids) {\n assert(undefined !== props.ranges[index]);\n const range = Range3d.fromJSON(props.ranges[index]);\n index++;\n yield { type, id, range };\n }\n }\n\n function extantIterable(props: ElementIdsAndRangesProps, type: DbOpcode.Insert | DbOpcode.Update): Iterable<ElementGeometryChange> {\n return { [Symbol.iterator]: () => extantIterator(props, type) };\n }\n\n /** Obtain an iterator over the geometry changes for a single [GeometricModel]($backend). A given element will appear at most once. */\n export function* iterator(modelChanges: ModelGeometryChangesProps): Iterator<ElementGeometryChange> {\n if (modelChanges.inserted)\n yield* extantIterable(modelChanges.inserted, DbOpcode.Insert);\n\n if (modelChanges.updated)\n yield* extantIterable(modelChanges.updated, DbOpcode.Update);\n\n if (modelChanges.deleted)\n for (const id of CompressedId64Set.iterable(modelChanges.deleted))\n yield { type: DbOpcode.Delete, id };\n }\n\n /** Obtain an iterable over the geometry changes for a single [GeometricModel]($backend). A given element will appear at most once. */\n export function iterable(modelChanges: ModelGeometryChangesProps): Iterable<ElementGeometryChange> {\n return { [Symbol.iterator]: () => iterator(modelChanges) };\n }\n}\n\n/** Represents geometric changes to a set of [GeometricElement]($backend)s belonging to a single [GeometricModel]($backend).\n * @public\n * @extensions\n */\nexport interface ModelGeometryChanges {\n /** The model's Id. */\n readonly id: Id64String;\n /** The model's geometry GUID. */\n readonly geometryGuid: GuidString;\n /** The model's range. */\n readonly range: Range3d;\n /** The individual geometric element changes. */\n readonly elements: Iterable<ElementGeometryChange>;\n}\n\n/** Represents geometric changes to a set of [GeometricElement]($backend)s belonging to a single [GeometricModel]($backend).\n * @see [GraphicalEditingScope]($frontend) to monitor these changes.\n * @public\n */\nexport namespace ModelGeometryChanges {\n /** Obtain an iterator over the geometry changes for a set of models. A given model will appear at most once. */\n export function* iterator(modelChanges: ModelGeometryChangesProps[]): Iterator<ModelGeometryChanges> {\n for (const props of modelChanges)\n yield fromJSON(props);\n }\n\n /** Obtain an iterable over the geometry changes for a set of models. A given model will appear at most once. */\n export function iterable(modelChanges: ModelGeometryChangesProps[]): Iterable<ModelGeometryChanges> {\n return { [Symbol.iterator]: () => iterator(modelChanges) };\n }\n\n /** Instantiate from wire format. */\n export function fromJSON(props: ModelGeometryChangesProps): ModelGeometryChanges {\n return {\n id: props.id,\n geometryGuid: props.guid,\n range: Range3d.fromJSON(props.range),\n elements: ElementGeometryChange.iterable(props),\n };\n }\n\n /** Obtain the ModelGeometryChanges for the specified model Id. */\n export function findByModelId(changes: Iterable<ModelGeometryChanges>, modelId: Id64String): ModelGeometryChanges | undefined {\n for (const change of changes)\n if (change.id === modelId)\n return change;\n\n return undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"ModelGeometryChanges.js","sourceRoot":"","sources":["../../src/ModelGeometryChanges.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAkG;AAClG,wDAA6D;AAwE7D;;GAEG;AACH,IAAiB,qBAAqB,CAiCrC;AAjCD,WAAiB,qBAAqB;IACpC,QAAQ,CAAC,CAAC,cAAc,CAAC,KAA+B,EAAE,IAAuC;QAC/F,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,GAAG,GAAG,gCAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClD,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;YACrB,IAAA,qBAAM,EAAC,SAAS,KAAK,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,MAAM,KAAK,GAAG,uBAAO,CAAC,QAAQ,CA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C,QAAQ,CAAC,YAAyC;QACjE,KAAK,MAAM,KAAK,IAAI,YAAY;YAC9B,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAHgB,6BAAQ,WAGxB,CAAA;IAED,gHAAgH;IAChH,SAAgB,QAAQ,CAAC,YAAyC;QAChE,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;IAC7D,CAAC;IAFe,6BAAQ,WAEvB,CAAA;IAED,oCAAoC;IACpC,SAAgB,QAAQ,CAAC,KAAgC;QACvD,OAAO;YACL,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,YAAY,EAAE,KAAK,CAAC,IAAI;YACxB,KAAK,EAAE,uBAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;YACpC,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC;SAChD,CAAC;IACJ,CAAC;IAPe,6BAAQ,WAOvB,CAAA;IAED,kEAAkE;IAClE,SAAgB,aAAa,CAAC,OAAuC,EAAE,OAAmB;QACxF,KAAK,MAAM,MAAM,IAAI,OAAO;YAC1B,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO;gBACvB,OAAO,MAAM,CAAC;QAElB,OAAO,SAAS,CAAC;IACnB,CAAC;IANe,kCAAa,gBAM5B,CAAA;AACH,CAAC,EA9BgB,oBAAoB,oCAApB,oBAAoB,QA8BpC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { assert, CompressedId64Set, DbOpcode, GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { Range3d, Range3dProps } from \"@itwin/core-geometry\";\r\n\r\n/** Compact wire format representing geometric changes to a set of elements as part of a [[ModelGeometryChangesProps]].\r\n * All of the elements belong to the same model.\r\n * The number of [[ids]] and [[ranges]] are guaranteed to be the same.\r\n * @see [[ElementGeometryChange]] for a more useful representation of an individual element change.\r\n * @see [[ModelGeometryChanges.iterable]] to iterate over [[ElementGeometryChange]]s.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementIdsAndRangesProps {\r\n /** The Ids of the elements, compressed and sorted in ascending order. */\r\n readonly ids: CompressedId64Set;\r\n /** The range of each element, indexed by the position of the corresponding element's Id in [[ids]]. */\r\n readonly ranges: Range3dProps[];\r\n}\r\n\r\n/** Compact wire format representing geometric changes to [GeometricElement]($backend)s within a [GeometricModel]($backend).\r\n * A given element Id will appear in no more than one of [[inserted]], [[updated]], or [[deleted]].\r\n * @see [[ModelGeometryChanges]] for a more useful representation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelGeometryChangesProps {\r\n /** The Id of the model. */\r\n readonly id: Id64String;\r\n /** The range of the model, computed as the union of the ranges of all geometric elements within the model. */\r\n readonly range: Range3dProps;\r\n /** The geometry GUID of the model. */\r\n readonly guid: GuidString;\r\n /** If defined, the Ids and ranges of newly-inserted [GeometricElement]($backend)s. */\r\n readonly inserted?: ElementIdsAndRangesProps;\r\n /** If defined, the Ids and ranges of [GeometricElement]($backend)s whose geometric properties were modified. */\r\n readonly updated?: ElementIdsAndRangesProps;\r\n /** If defined, the Ids of deleted [GeometricElement]($backend)s. */\r\n readonly deleted?: CompressedId64Set;\r\n}\r\n\r\n/** Represents the insertion of a new [GeometricElement]($backend), or a change to the geometric properties of an existing [GeometricElement]($backend).\r\n * @see [[ElementGeometryChange]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ExtantElementGeometryChange {\r\n /** Indicates whether this change resulted from the insertion of a new element or modification of an existing one.\r\n * Used as discriminant for [[ElementGeometryChange]] union.\r\n */\r\n readonly type: DbOpcode.Insert | DbOpcode.Update;\r\n /** The element's Id. */\r\n readonly id: Id64String;\r\n /** The element's range. */\r\n readonly range: Range3d;\r\n}\r\n\r\n/** Represents the deletion of a [GeometricElement]($backend).\r\n * @see [[ElementGeometryChange]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DeletedElementGeometryChange {\r\n /** Discriminant for [[ElementGeometryChange]] union. */\r\n readonly type: DbOpcode.Delete;\r\n /** The element's Id. */\r\n readonly id: Id64String;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport type ElementGeometryChange = ExtantElementGeometryChange | DeletedElementGeometryChange;\r\n\r\n/** Represents a change to the geometry of a [GeometricElement]($backend), as exposed by [[ModelGeometryChanges.elements]].\r\n * @public\r\n */\r\nexport namespace ElementGeometryChange { // eslint-disable-line @typescript-eslint/no-redeclare\r\n function* extantIterator(props: ElementIdsAndRangesProps, type: DbOpcode.Insert | DbOpcode.Update): Iterator<ElementGeometryChange> {\r\n let index = 0;\r\n const ids = CompressedId64Set.iterable(props.ids);\r\n for (const id of ids) {\r\n assert(undefined !== props.ranges[index]);\r\n const range = Range3d.fromJSON(props.ranges[index]);\r\n index++;\r\n yield { type, id, range };\r\n }\r\n }\r\n\r\n function extantIterable(props: ElementIdsAndRangesProps, type: DbOpcode.Insert | DbOpcode.Update): Iterable<ElementGeometryChange> {\r\n return { [Symbol.iterator]: () => extantIterator(props, type) };\r\n }\r\n\r\n /** Obtain an iterator over the geometry changes for a single [GeometricModel]($backend). A given element will appear at most once. */\r\n export function* iterator(modelChanges: ModelGeometryChangesProps): Iterator<ElementGeometryChange> {\r\n if (modelChanges.inserted)\r\n yield* extantIterable(modelChanges.inserted, DbOpcode.Insert);\r\n\r\n if (modelChanges.updated)\r\n yield* extantIterable(modelChanges.updated, DbOpcode.Update);\r\n\r\n if (modelChanges.deleted)\r\n for (const id of CompressedId64Set.iterable(modelChanges.deleted))\r\n yield { type: DbOpcode.Delete, id };\r\n }\r\n\r\n /** Obtain an iterable over the geometry changes for a single [GeometricModel]($backend). A given element will appear at most once. */\r\n export function iterable(modelChanges: ModelGeometryChangesProps): Iterable<ElementGeometryChange> {\r\n return { [Symbol.iterator]: () => iterator(modelChanges) };\r\n }\r\n}\r\n\r\n/** Represents geometric changes to a set of [GeometricElement]($backend)s belonging to a single [GeometricModel]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelGeometryChanges {\r\n /** The model's Id. */\r\n readonly id: Id64String;\r\n /** The model's geometry GUID. */\r\n readonly geometryGuid: GuidString;\r\n /** The model's range. */\r\n readonly range: Range3d;\r\n /** The individual geometric element changes. */\r\n readonly elements: Iterable<ElementGeometryChange>;\r\n}\r\n\r\n/** Represents geometric changes to a set of [GeometricElement]($backend)s belonging to a single [GeometricModel]($backend).\r\n * @see [GraphicalEditingScope]($frontend) to monitor these changes.\r\n * @public\r\n */\r\nexport namespace ModelGeometryChanges {\r\n /** Obtain an iterator over the geometry changes for a set of models. A given model will appear at most once. */\r\n export function* iterator(modelChanges: ModelGeometryChangesProps[]): Iterator<ModelGeometryChanges> {\r\n for (const props of modelChanges)\r\n yield fromJSON(props);\r\n }\r\n\r\n /** Obtain an iterable over the geometry changes for a set of models. A given model will appear at most once. */\r\n export function iterable(modelChanges: ModelGeometryChangesProps[]): Iterable<ModelGeometryChanges> {\r\n return { [Symbol.iterator]: () => iterator(modelChanges) };\r\n }\r\n\r\n /** Instantiate from wire format. */\r\n export function fromJSON(props: ModelGeometryChangesProps): ModelGeometryChanges {\r\n return {\r\n id: props.id,\r\n geometryGuid: props.guid,\r\n range: Range3d.fromJSON(props.range),\r\n elements: ElementGeometryChange.iterable(props),\r\n };\r\n }\r\n\r\n /** Obtain the ModelGeometryChanges for the specified model Id. */\r\n export function findByModelId(changes: Iterable<ModelGeometryChanges>, modelId: Id64String): ModelGeometryChanges | undefined {\r\n for (const change of changes)\r\n if (change.id === modelId)\r\n return change;\r\n\r\n return undefined;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModelProps.js","sourceRoot":"","sources":["../../src/ModelProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { XYProps } from \"@itwin/core-geometry\";\nimport { CodeProps } from \"./Code\";\nimport { RelatedElementProps } from \"./ElementProps\";\nimport { EntityProps, EntityQueryParams } from \"./EntityProps\";\n\n/** Properties that define a [Model]($docs/bis/guide/fundamentals/model-fundamentals)\n * @public\n * @extensions\n */\nexport interface ModelProps extends EntityProps {\n modeledElement: RelatedElementProps;\n name?: string;\n /** @note must always match the model of the [[ModelProps.modeledElement]] */\n parentModel?: Id64String;\n isPrivate?: boolean;\n isTemplate?: boolean;\n jsonProperties?: any;\n}\n\n/** Properties that specify what model should be loaded.\n * @public\n * @extensions\n */\nexport interface ModelLoadProps {\n id?: Id64String;\n code?: CodeProps;\n}\n\n/** Parameters for performing a query on [Model]($backend) classes.\n * @public\n * @extensions\n */\nexport interface ModelQueryParams extends EntityQueryParams {\n wantTemplate?: boolean;\n wantPrivate?: boolean;\n}\n\n/** Properties that describe a [GeometricModel]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricModelProps extends ModelProps {\n /** A unique identifier that is updated each time a change affecting the appearance of a geometric element within this model\n * is committed to the iModel. In other words, between versions of the iModel, if this value is the same you can\n * assume the appearance of all of the geometry in the model is the same (Note: other properties of elements may have changed.)\n * If undefined, the state of the geometry is unknown.\n */\n geometryGuid?: GuidString;\n}\n\n/** Properties that define a [GeometricModel2d]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricModel2dProps extends GeometricModelProps {\n /** The actual coordinates of (0,0) in modeling coordinates. An offset applied to all modeling coordinates. */\n globalOrigin?: XYProps;\n}\n\n/** Properties that define a [GeometricModel3d]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricModel3dProps extends GeometricModelProps {\n /** If true, then the elements in this GeometricModel3d are not in real-world coordinates and will not be in the spatial index. */\n isNotSpatiallyLocated?: boolean;\n /** If true, then the elements in this GeometricModel3d are expected to be in an XY plane. */\n isPlanProjection?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ModelProps.js","sourceRoot":"","sources":["../../src/ModelProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { XYProps } from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"./Code\";\r\nimport { RelatedElementProps } from \"./ElementProps\";\r\nimport { EntityProps, EntityQueryParams } from \"./EntityProps\";\r\n\r\n/** Properties that define a [Model]($docs/bis/guide/fundamentals/model-fundamentals)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelProps extends EntityProps {\r\n modeledElement: RelatedElementProps;\r\n name?: string;\r\n /** @note must always match the model of the [[ModelProps.modeledElement]] */\r\n parentModel?: Id64String;\r\n isPrivate?: boolean;\r\n isTemplate?: boolean;\r\n jsonProperties?: any;\r\n}\r\n\r\n/** Properties that specify what model should be loaded.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelLoadProps {\r\n id?: Id64String;\r\n code?: CodeProps;\r\n}\r\n\r\n/** Parameters for performing a query on [Model]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelQueryParams extends EntityQueryParams {\r\n wantTemplate?: boolean;\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Properties that describe a [GeometricModel]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricModelProps extends ModelProps {\r\n /** A unique identifier that is updated each time a change affecting the appearance of a geometric element within this model\r\n * is committed to the iModel. In other words, between versions of the iModel, if this value is the same you can\r\n * assume the appearance of all of the geometry in the model is the same (Note: other properties of elements may have changed.)\r\n * If undefined, the state of the geometry is unknown.\r\n */\r\n geometryGuid?: GuidString;\r\n}\r\n\r\n/** Properties that define a [GeometricModel2d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricModel2dProps extends GeometricModelProps {\r\n /** The actual coordinates of (0,0) in modeling coordinates. An offset applied to all modeling coordinates. */\r\n globalOrigin?: XYProps;\r\n}\r\n\r\n/** Properties that define a [GeometricModel3d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricModel3dProps extends GeometricModelProps {\r\n /** If true, then the elements in this GeometricModel3d are not in real-world coordinates and will not be in the spatial index. */\r\n isNotSpatiallyLocated?: boolean;\r\n /** If true, then the elements in this GeometricModel3d are expected to be in an XY plane. */\r\n isPlanProjection?: boolean;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NativeAppProps.js","sourceRoot":"","sources":["../../src/NativeAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,gBAAgB;AACH,QAAA,mBAAmB,GAAG;IACjC,WAAW,EAAE,wBAAwB;IACrC,aAAa,EAAE,+BAA+B;CACtC,CAAC;AAQX;;GAEG;AACH,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,+EAAM,CAAA;IACN,iFAAO,CAAA;AACT,CAAC,EAHW,0BAA0B,0CAA1B,0BAA0B,QAGrC;AAED;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qDAAO,CAAA;IACP,+CAAI,CAAA;AACN,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB","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 { AccessToken, GuidString } from \"@itwin/core-bentley\";\nimport { BriefcaseProps, LocalBriefcaseProps, RequestNewBriefcaseProps } from \"./BriefcaseTypes\";\n\n/** @internal */\nexport const nativeAppIpcStrings = {\n channelName: \"itwinjs-core/nativeApp\",\n notifyChannel: \"itwinjs-core/nativeApp-notify\",\n} as const;\n\n/**\n * Type of value for storage values\n * @beta\n */\nexport type StorageValue = string | number | boolean | undefined | Uint8Array;\n\n/** Indicates whether or not the computer is currently connected to the internet.\n * @beta\n */\nexport enum InternetConnectivityStatus {\n Online,\n Offline,\n}\n\n/** Describes whether the user or the browser overrode the internet connectivity status.\n * @beta\n */\nexport enum OverriddenBy {\n Browser,\n User,\n}\n\n/**\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from NativeApp backend.\n * @internal\n */\nexport interface NativeAppNotifications {\n notifyInternetConnectivityChanged(status: InternetConnectivityStatus): void;\n}\n\n/**\n * The methods that may be invoked via Ipc from the frontend of a Native App and are implemented on its backend.\n * @internal\n */\nexport interface NativeAppFunctions {\n\n /** If the user is signed in a valid access token will be returned. */\n getAccessToken: () => Promise<AccessToken | undefined>;\n\n /** Check if the internet is reachable. */\n checkInternetConnectivity(): Promise<InternetConnectivityStatus>;\n\n /** Manually override internet reachability for testing purposes.\n * @param _status New status to set on backend.\n */\n overrideInternetConnectivity(_overriddenBy: OverriddenBy, _status: InternetConnectivityStatus): Promise<void>;\n\n /** Acquire a new BriefcaseId for the supplied iModelId from iModelHub */\n acquireNewBriefcaseId(_iModelId: GuidString): Promise<number>;\n\n /** Get the filename in the briefcase cache for the supplied BriefcaseId and iModelId.\n * @note this merely returns the full path fileName. It does not test for the existence of the file.\n */\n getBriefcaseFileName(_props: BriefcaseProps): Promise<string>;\n\n /** Download a briefcase file for the supplied briefcase properties. */\n downloadBriefcase(_requestProps: RequestNewBriefcaseProps, _reportProgress: boolean, _interval?: number): Promise<LocalBriefcaseProps>;\n\n /**\n * Cancels the previously requested download of a briefcase\n * @param _key Key to locate the briefcase in the disk cache\n * @note returns true if the cancel request was acknowledged. false otherwise\n */\n requestCancelDownloadBriefcase(_fileName: string): Promise<boolean>;\n\n /**\n * Delete a previously downloaded briefcase. The briefcase must be closed.\n * @param _fileName the Briefcase to delete\n */\n deleteBriefcaseFiles(_fileName: string): Promise<void>;\n\n /**\n * Gets a list of all briefcases that were previously downloaded to the system briefcase cache.\n * @note returns array of LocalBriefcaseProps.\n */\n getCachedBriefcases(_iModelId?: GuidString): Promise<LocalBriefcaseProps[]>;\n\n /**\n * Open a key/value pair base storage\n * @param _storageId string identifier of storage\n */\n storageMgrOpen(_storageId: string): Promise<string>;\n\n /**\n * Close a key/value pair base storage\n * @param _storageId string identifier of storage\n * @param _deleteOnClose delete the storage on close\n */\n storageMgrClose(_storageId: string, _deleteOnClose: boolean): Promise<void>;\n\n /**\n * Get the names of available storages\n * @note returns list of storage names\n */\n storageMgrNames(): Promise<string[]>;\n\n /**\n * Get the value associated with a key.\n * @param _storageId string identifier of storage\n * @param _key key identifier for value\n * @note returns key value or undefined\n */\n storageGet(_storageId: string, _key: string): Promise<StorageValue | undefined>;\n\n /**\n * Set a value for a key.\n * @param _storageId string identifier of storage\n * @param _key key identifier for value\n * @param _value value to be set\n */\n storageSet(_storageId: string, _key: string, _value: StorageValue): Promise<void>;\n\n /**\n * Remove a key/value pair.\n * @param _storageId string identifier of storage\n * @param _key key identifier for value\n */\n storageRemove(_storageId: string, _key: string): Promise<void>;\n\n /**\n * Get list of keys in a storage.\n * @param _storageId string identifier of storage\n * @note returns list of storage ids\n */\n storageKeys(_storageId: string): Promise<string[]>;\n\n /**\n * Delete all key/value pairs.\n * @param _storageId string identifier of storage\n */\n storageRemoveAll(_storageId: string): Promise<void>;\n\n /** get the type of a value for a key, or undefined if not present. */\n storageGetValueType(_storageId: string, _key: string): Promise<\"number\" | \"string\" | \"boolean\" | \"Uint8Array\" | \"null\" | undefined>;\n}\n"]}
1
+ {"version":3,"file":"NativeAppProps.js","sourceRoot":"","sources":["../../src/NativeAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,gBAAgB;AACH,QAAA,mBAAmB,GAAG;IACjC,WAAW,EAAE,wBAAwB;IACrC,aAAa,EAAE,+BAA+B;CACtC,CAAC;AAQX;;GAEG;AACH,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,+EAAM,CAAA;IACN,iFAAO,CAAA;AACT,CAAC,EAHW,0BAA0B,0CAA1B,0BAA0B,QAGrC;AAED;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qDAAO,CAAA;IACP,+CAAI,CAAA;AACN,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB","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 { AccessToken, GuidString } from \"@itwin/core-bentley\";\r\nimport { BriefcaseProps, LocalBriefcaseProps, RequestNewBriefcaseProps } from \"./BriefcaseTypes\";\r\n\r\n/** @internal */\r\nexport const nativeAppIpcStrings = {\r\n channelName: \"itwinjs-core/nativeApp\",\r\n notifyChannel: \"itwinjs-core/nativeApp-notify\",\r\n} as const;\r\n\r\n/**\r\n * Type of value for storage values\r\n * @beta\r\n */\r\nexport type StorageValue = string | number | boolean | undefined | Uint8Array;\r\n\r\n/** Indicates whether or not the computer is currently connected to the internet.\r\n * @beta\r\n */\r\nexport enum InternetConnectivityStatus {\r\n Online,\r\n Offline,\r\n}\r\n\r\n/** Describes whether the user or the browser overrode the internet connectivity status.\r\n * @beta\r\n */\r\nexport enum OverriddenBy {\r\n Browser,\r\n User,\r\n}\r\n\r\n/**\r\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from NativeApp backend.\r\n * @internal\r\n */\r\nexport interface NativeAppNotifications {\r\n notifyInternetConnectivityChanged(status: InternetConnectivityStatus): void;\r\n}\r\n\r\n/**\r\n * The methods that may be invoked via Ipc from the frontend of a Native App and are implemented on its backend.\r\n * @internal\r\n */\r\nexport interface NativeAppFunctions {\r\n\r\n /** If the user is signed in a valid access token will be returned. */\r\n getAccessToken: () => Promise<AccessToken | undefined>;\r\n\r\n /** Check if the internet is reachable. */\r\n checkInternetConnectivity(): Promise<InternetConnectivityStatus>;\r\n\r\n /** Manually override internet reachability for testing purposes.\r\n * @param _status New status to set on backend.\r\n */\r\n overrideInternetConnectivity(_overriddenBy: OverriddenBy, _status: InternetConnectivityStatus): Promise<void>;\r\n\r\n /** Acquire a new BriefcaseId for the supplied iModelId from iModelHub */\r\n acquireNewBriefcaseId(_iModelId: GuidString): Promise<number>;\r\n\r\n /** Get the filename in the briefcase cache for the supplied BriefcaseId and iModelId.\r\n * @note this merely returns the full path fileName. It does not test for the existence of the file.\r\n */\r\n getBriefcaseFileName(_props: BriefcaseProps): Promise<string>;\r\n\r\n /** Download a briefcase file for the supplied briefcase properties. */\r\n downloadBriefcase(_requestProps: RequestNewBriefcaseProps, _reportProgress: boolean, _interval?: number): Promise<LocalBriefcaseProps>;\r\n\r\n /**\r\n * Cancels the previously requested download of a briefcase\r\n * @param _key Key to locate the briefcase in the disk cache\r\n * @note returns true if the cancel request was acknowledged. false otherwise\r\n */\r\n requestCancelDownloadBriefcase(_fileName: string): Promise<boolean>;\r\n\r\n /**\r\n * Delete a previously downloaded briefcase. The briefcase must be closed.\r\n * @param _fileName the Briefcase to delete\r\n */\r\n deleteBriefcaseFiles(_fileName: string): Promise<void>;\r\n\r\n /**\r\n * Gets a list of all briefcases that were previously downloaded to the system briefcase cache.\r\n * @note returns array of LocalBriefcaseProps.\r\n */\r\n getCachedBriefcases(_iModelId?: GuidString): Promise<LocalBriefcaseProps[]>;\r\n\r\n /**\r\n * Open a key/value pair base storage\r\n * @param _storageId string identifier of storage\r\n */\r\n storageMgrOpen(_storageId: string): Promise<string>;\r\n\r\n /**\r\n * Close a key/value pair base storage\r\n * @param _storageId string identifier of storage\r\n * @param _deleteOnClose delete the storage on close\r\n */\r\n storageMgrClose(_storageId: string, _deleteOnClose: boolean): Promise<void>;\r\n\r\n /**\r\n * Get the names of available storages\r\n * @note returns list of storage names\r\n */\r\n storageMgrNames(): Promise<string[]>;\r\n\r\n /**\r\n * Get the value associated with a key.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n * @note returns key value or undefined\r\n */\r\n storageGet(_storageId: string, _key: string): Promise<StorageValue | undefined>;\r\n\r\n /**\r\n * Set a value for a key.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n * @param _value value to be set\r\n */\r\n storageSet(_storageId: string, _key: string, _value: StorageValue): Promise<void>;\r\n\r\n /**\r\n * Remove a key/value pair.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n */\r\n storageRemove(_storageId: string, _key: string): Promise<void>;\r\n\r\n /**\r\n * Get list of keys in a storage.\r\n * @param _storageId string identifier of storage\r\n * @note returns list of storage ids\r\n */\r\n storageKeys(_storageId: string): Promise<string[]>;\r\n\r\n /**\r\n * Delete all key/value pairs.\r\n * @param _storageId string identifier of storage\r\n */\r\n storageRemoveAll(_storageId: string): Promise<void>;\r\n\r\n /** get the type of a value for a key, or undefined if not present. */\r\n storageGetValueType(_storageId: string, _key: string): Promise<\"number\" | \"string\" | \"boolean\" | \"Uint8Array\" | \"null\" | undefined>;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"OctEncodedNormal.js","sourceRoot":"","sources":["../../src/OctEncodedNormal.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAwD;AAExD,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEzC,SAAS,KAAK,CAAC,GAAW,EAAE,MAAc,EAAE,MAAc;IACxD,OAAO,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AAE,CAAC;YACzB,CAAC,GAAG,IAAI,wBAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,CAAC,GAAG,MAAM,CAAC;YACX,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YACT,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YACT,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;QACX,CAAC;QAED,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YACZ,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACd,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACd,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;YACzC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QAED,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AApED,4CAoEC;AAED,gBAAgB;AAChB,MAAa,oBAAoB;IACZ;IAAgC;IAAnD,YAAmB,KAAuB,EAAS,MAAwB;QAAxD,UAAK,GAAL,KAAK,CAAkB;QAAS,WAAM,GAAN,MAAM,CAAkB;IAAI,CAAC;CACjF;AAFD,oDAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { Vector3d, XYAndZ } from \"@itwin/core-geometry\";\n\nconst scratchUInt16 = new Uint16Array(1);\n\nfunction clamp(val: number, minVal: number, maxVal: number): number {\n return val < minVal ? minVal : (val > maxVal ? maxVal : val);\n}\n\nfunction clampUint8(val: number): number {\n return roundUint16(0.5 + (clamp(val, -1, 1) * 0.5 + 0.5) * 255);\n}\n\nfunction roundUint16(val: number): number {\n scratchUInt16[0] = val;\n return scratchUInt16[0];\n}\n\nfunction signNotZero(val: number): number {\n return val < 0.0 ? -1.0 : 1.0;\n}\n\n/** Represents a 3d normal vector compressed into a single 16-bit integer using [oct-encoding](http://jcgt.org/published/0003/02/01/paper.pdf).\n * These are chiefly used to reduce the space required to store normal vectors for [RenderGraphic]($frontend)s.\n * @public\n */\nexport class OctEncodedNormal {\n /** The encoded normal. */\n public readonly value: number;\n\n /** Construct directly from a 16-bit encoded value.\n * @see [[encode]] to compute the encoded value.\n * @see [[fromVector]] to construct from a vector.\n */\n public constructor(val: number) {\n this.value = roundUint16(val);\n }\n\n /** Compute the encoded 16-bit value of the supplied normalized vector. */\n public static encode(vec: XYAndZ): number {\n return this.encodeXYZ(vec.x, vec.y, vec.z);\n }\n\n /** Compute the encoded 16-bit value of the supplied normalized vector components. */\n public static encodeXYZ(nx: number, ny: number, nz: number): number {\n const denom = Math.abs(nx) + Math.abs(ny) + Math.abs(nz);\n let rx = nx / denom;\n let ry = ny / denom;\n if (nz < 0) {\n const x = rx;\n const y = ry;\n rx = (1 - Math.abs(y)) * signNotZero(x);\n ry = (1 - Math.abs(x)) * signNotZero(y);\n }\n return clampUint8(ry) << 8 | clampUint8(rx);\n }\n\n /** Create an OctEncodedNormal from a normalized vector. */\n public static fromVector(val: XYAndZ): OctEncodedNormal {\n return new OctEncodedNormal(this.encode(val));\n }\n\n /** Decode this oct-encoded normal into a normalized vector. */\n public decode(): Vector3d {\n return OctEncodedNormal.decodeValue(this.value);\n }\n\n /** Decode a 16-bit encoded value into a normalized vector. */\n public static decodeValue(val: number, result?: Vector3d): Vector3d {\n let ex = val & 0xff;\n let ey = val >> 8;\n ex = ex / 255.0 * 2.0 - 1.0;\n ey = ey / 255.0 * 2.0 - 1.0;\n const ez = 1 - (Math.abs(ex) + Math.abs(ey));\n let n;\n if (result === undefined) {\n n = new Vector3d(ex, ey, ez);\n } else {\n n = result;\n n.x = ex;\n n.y = ey;\n n.z = ez;\n }\n\n if (n.z < 0) {\n const x = n.x;\n const y = n.y;\n n.x = (1 - Math.abs(y)) * signNotZero(x);\n n.y = (1 - Math.abs(x)) * signNotZero(y);\n }\n\n n.normalizeInPlace();\n return n;\n }\n}\n\n/** @internal */\nexport class OctEncodedNormalPair {\n constructor(public first: OctEncodedNormal, public second: OctEncodedNormal) { }\n}\n"]}
1
+ {"version":3,"file":"OctEncodedNormal.js","sourceRoot":"","sources":["../../src/OctEncodedNormal.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAwD;AAExD,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEzC,SAAS,KAAK,CAAC,GAAW,EAAE,MAAc,EAAE,MAAc;IACxD,OAAO,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,WAAW,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IACvB,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,OAAO,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AAChC,CAAC;AAED;;;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,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QAED,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AApED,4CAoEC;AAED,gBAAgB;AAChB,MAAa,oBAAoB;IACZ;IAAgC;IAAnD,YAAmB,KAAuB,EAAS,MAAwB;QAAxD,UAAK,GAAL,KAAK,CAAkB;QAAS,WAAM,GAAN,MAAM,CAAkB;IAAI,CAAC;CACjF;AAFD,oDAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Vector3d, XYAndZ } from \"@itwin/core-geometry\";\r\n\r\nconst scratchUInt16 = new Uint16Array(1);\r\n\r\nfunction clamp(val: number, minVal: number, maxVal: number): number {\r\n return val < minVal ? minVal : (val > maxVal ? maxVal : val);\r\n}\r\n\r\nfunction clampUint8(val: number): number {\r\n return roundUint16(0.5 + (clamp(val, -1, 1) * 0.5 + 0.5) * 255);\r\n}\r\n\r\nfunction roundUint16(val: number): number {\r\n scratchUInt16[0] = val;\r\n return scratchUInt16[0];\r\n}\r\n\r\nfunction signNotZero(val: number): number {\r\n return val < 0.0 ? -1.0 : 1.0;\r\n}\r\n\r\n/** Represents a 3d normal vector compressed into a single 16-bit integer using [oct-encoding](http://jcgt.org/published/0003/02/01/paper.pdf).\r\n * These are chiefly used to reduce the space required to store normal vectors for [RenderGraphic]($frontend)s.\r\n * @public\r\n */\r\nexport class OctEncodedNormal {\r\n /** The encoded normal. */\r\n public readonly value: number;\r\n\r\n /** Construct directly from a 16-bit encoded value.\r\n * @see [[encode]] to compute the encoded value.\r\n * @see [[fromVector]] to construct from a vector.\r\n */\r\n public constructor(val: number) {\r\n this.value = roundUint16(val);\r\n }\r\n\r\n /** Compute the encoded 16-bit value of the supplied normalized vector. */\r\n public static encode(vec: XYAndZ): number {\r\n return this.encodeXYZ(vec.x, vec.y, vec.z);\r\n }\r\n\r\n /** Compute the encoded 16-bit value of the supplied normalized vector components. */\r\n public static encodeXYZ(nx: number, ny: number, nz: number): number {\r\n const denom = Math.abs(nx) + Math.abs(ny) + Math.abs(nz);\r\n let rx = nx / denom;\r\n let ry = ny / denom;\r\n if (nz < 0) {\r\n const x = rx;\r\n const y = ry;\r\n rx = (1 - Math.abs(y)) * signNotZero(x);\r\n ry = (1 - Math.abs(x)) * signNotZero(y);\r\n }\r\n return clampUint8(ry) << 8 | clampUint8(rx);\r\n }\r\n\r\n /** Create an OctEncodedNormal from a normalized vector. */\r\n public static fromVector(val: XYAndZ): OctEncodedNormal {\r\n return new OctEncodedNormal(this.encode(val));\r\n }\r\n\r\n /** Decode this oct-encoded normal into a normalized vector. */\r\n public decode(): Vector3d {\r\n return OctEncodedNormal.decodeValue(this.value);\r\n }\r\n\r\n /** Decode a 16-bit encoded value into a normalized vector. */\r\n public static decodeValue(val: number, result?: Vector3d): Vector3d {\r\n let ex = val & 0xff;\r\n let ey = val >> 8;\r\n ex = ex / 255.0 * 2.0 - 1.0;\r\n ey = ey / 255.0 * 2.0 - 1.0;\r\n const ez = 1 - (Math.abs(ex) + Math.abs(ey));\r\n let n;\r\n if (result === undefined) {\r\n n = new Vector3d(ex, ey, ez);\r\n } else {\r\n n = result;\r\n n.x = ex;\r\n n.y = ey;\r\n n.z = ez;\r\n }\r\n\r\n if (n.z < 0) {\r\n const x = n.x;\r\n const y = n.y;\r\n n.x = (1 - Math.abs(y)) * signNotZero(x);\r\n n.y = (1 - Math.abs(x)) * signNotZero(y);\r\n }\r\n\r\n n.normalizeInPlace();\r\n return n;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class OctEncodedNormalPair {\r\n constructor(public first: OctEncodedNormal, public second: OctEncodedNormal) { }\r\n}\r\n"]}
@@ -1 +1 @@
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YAC5B,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;QAExD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAA0C;QACrD,IAAI,SAAS,KAAK,YAAY;YAC5B,OAAO,IAAI,CAAC;QAEd,MAAM,KAAK,GAAgC,IAAI,CAAC,MAAM,EAAE,CAAC;QACzD,IAAI,SAAS,KAAK,YAAY,CAAC,SAAS;YACtC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC;QAE3C,IAAI,SAAS,KAAK,YAAY,CAAC,YAAY;YACzC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC;QAEjD,IAAI,SAAS,KAAK,YAAY,CAAC,OAAO;YACpC,KAAK,CAAC,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;QAEvC,IAAI,SAAS,KAAK,YAAY,CAAC,sBAAsB;YACnD,KAAK,CAAC,sBAAsB,GAAG,YAAY,CAAC,sBAAsB,CAAC;QAErE,OAAO,IAAI,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,8EAA8E;IACvE,MAAM,CAAC,KAA6B;QACzC,IAAI,IAAI,KAAK,KAAK;YAChB,OAAO,IAAI,CAAC;QAEd,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,sBAAsB,KAAK,KAAK,CAAC,sBAAsB,CAAC;IAC1L,CAAC;CACF;AAxED,wDAwEC","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\n/** Wire format describing [[PlanProjectionSettings]].\n * @public\n * @extensions\n */\nexport interface PlanProjectionSettingsProps {\n /** If defined, the absolute height in meters at which to display the model. */\n elevation?: number;\n /** If defined, specifies a uniform transparency applied to all of the geometry in the model, in the range 0.0 (fully opaque) to 1.0 (fully transparent). */\n transparency?: number;\n /** If defined and true, the model is displayed as an overlay in the view (without depth testing) so that it is always visible behind other geometry. */\n overlay?: boolean;\n /** If defined and true, subcategory display priority is used to specify the draw order of portions of the model. Geometry belonging to a subcategory with a higher priority\n * value is drawn on top of coincident geometry belonging to a subcategory with a lower priority value. The priorities can be modified at display time using\n * [FeatureSymbology.Overrides]($frontend). Note that subcategory \"layers\" cross model boundaries; that is, geometry belonging to the same subcategory in different models\n * are drawn as part of the same layer.\n */\n enforceDisplayPriority?: boolean;\n}\n\n/** Describes how to draw a plan projection model. A plan projection model is a [GeometricModel3d]($backend) whose geometry all lies in\n * a single XY plane, wherein the Z coordinate of the plane may be arbitrary or flexible. Multiple plan projection models can be combined into one view\n * and drawn as \"layers\" with relative priorities.\n * @see [[DisplayStyle3dSettings.setPlanProjectionSettings]] to define plan projection settings for a [DisplayStyle3dState]($frontend).\n * @see [GeometricModel3d.isPlanProjection]($backend).\n * @public\n */\nexport class PlanProjectionSettings {\n /** See [[PlanProjectionSettingsProps.elevation]] */\n public readonly elevation?: number;\n /** See [[PlanProjectionSettingsProps.transparency]] */\n public readonly transparency?: number;\n /** See [[PlanProjectionSettingsProps.overlay]] */\n public readonly overlay: boolean;\n /** See [[PlanProjectionSettingsProps.enforceDisplayPriority]] */\n public readonly enforceDisplayPriority?: boolean;\n\n public toJSON(): PlanProjectionSettingsProps {\n return {\n elevation: this.elevation,\n transparency: this.transparency,\n overlay: true === this.overlay ? true : undefined,\n enforceDisplayPriority: true === this.enforceDisplayPriority ? true : undefined,\n };\n }\n\n public static fromJSON(props: PlanProjectionSettingsProps | undefined): PlanProjectionSettings | undefined {\n if (undefined === props)\n return undefined;\n\n if (undefined === props.elevation && undefined === props.transparency && undefined === props.overlay && undefined === props.enforceDisplayPriority)\n return undefined;\n\n return new PlanProjectionSettings(props);\n }\n\n private constructor(props: PlanProjectionSettingsProps) {\n this.elevation = props.elevation;\n this.overlay = true === props.overlay;\n this.enforceDisplayPriority = true === props.enforceDisplayPriority;\n\n let transparency = props.transparency;\n if (undefined !== transparency)\n transparency = Math.max(0, Math.min(1, transparency));\n\n this.transparency = transparency;\n }\n\n /** Create a copy of this PlanProjectionSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A PlanProjectionSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: PlanProjectionSettingsProps): PlanProjectionSettings {\n if (undefined === changedProps)\n return this;\n\n const props: PlanProjectionSettingsProps = this.toJSON();\n if (undefined !== changedProps.elevation)\n props.elevation = changedProps.elevation;\n\n if (undefined !== changedProps.transparency)\n props.transparency = changedProps.transparency;\n\n if (undefined !== changedProps.overlay)\n props.overlay = changedProps.overlay;\n\n if (undefined !== changedProps.enforceDisplayPriority)\n props.enforceDisplayPriority = changedProps.enforceDisplayPriority;\n\n return new PlanProjectionSettings(props);\n }\n\n /** Return true if these settings are equivalent to the specified settings. */\n public equals(other: PlanProjectionSettings): boolean {\n if (this === other)\n return true;\n\n return this.elevation === other.elevation && this.transparency === other.transparency && this.overlay === other.overlay && this.enforceDisplayPriority === other.enforceDisplayPriority;\n }\n}\n"]}
1
+ {"version":3,"file":"PlanProjectionSettings.js","sourceRoot":"","sources":["../../src/PlanProjectionSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqBH;;;;;;GAMG;AACH,MAAa,sBAAsB;IACjC,oDAAoD;IACpC,SAAS,CAAU;IACnC,uDAAuD;IACvC,YAAY,CAAU;IACtC,kDAAkD;IAClC,OAAO,CAAU;IACjC,iEAAiE;IACjD,sBAAsB,CAAW;IAE1C,M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AC,MAAM,EAAE,CAAC;QACzD,IAAI,SAAS,KAAK,YAAY,CAAC,SAAS;YACtC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC;QAE3C,IAAI,SAAS,KAAK,YAAY,CAAC,YAAY;YACzC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC;QAEjD,IAAI,SAAS,KAAK,YAAY,CAAC,OAAO;YACpC,KAAK,CAAC,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;QAEvC,IAAI,SAAS,KAAK,YAAY,CAAC,sBAAsB;YACnD,KAAK,CAAC,sBAAsB,GAAG,YAAY,CAAC,sBAAsB,CAAC;QAErE,OAAO,IAAI,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,8EAA8E;IACvE,MAAM,CAAC,KAA6B;QACzC,IAAI,IAAI,KAAK,KAAK;YAChB,OAAO,IAAI,CAAC;QAEd,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,sBAAsB,KAAK,KAAK,CAAC,sBAAsB,CAAC;IAC1L,CAAC;CACF;AAxED,wDAwEC","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\n/** Wire format describing [[PlanProjectionSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PlanProjectionSettingsProps {\r\n /** If defined, the absolute height in meters at which to display the model. */\r\n elevation?: number;\r\n /** If defined, specifies a uniform transparency applied to all of the geometry in the model, in the range 0.0 (fully opaque) to 1.0 (fully transparent). */\r\n transparency?: number;\r\n /** If defined and true, the model is displayed as an overlay in the view (without depth testing) so that it is always visible behind other geometry. */\r\n overlay?: boolean;\r\n /** If defined and true, subcategory display priority is used to specify the draw order of portions of the model. Geometry belonging to a subcategory with a higher priority\r\n * value is drawn on top of coincident geometry belonging to a subcategory with a lower priority value. The priorities can be modified at display time using\r\n * [FeatureSymbology.Overrides]($frontend). Note that subcategory \"layers\" cross model boundaries; that is, geometry belonging to the same subcategory in different models\r\n * are drawn as part of the same layer.\r\n */\r\n enforceDisplayPriority?: boolean;\r\n}\r\n\r\n/** Describes how to draw a plan projection model. A plan projection model is a [GeometricModel3d]($backend) whose geometry all lies in\r\n * a single XY plane, wherein the Z coordinate of the plane may be arbitrary or flexible. Multiple plan projection models can be combined into one view\r\n * and drawn as \"layers\" with relative priorities.\r\n * @see [[DisplayStyle3dSettings.setPlanProjectionSettings]] to define plan projection settings for a [DisplayStyle3dState]($frontend).\r\n * @see [GeometricModel3d.isPlanProjection]($backend).\r\n * @public\r\n */\r\nexport class PlanProjectionSettings {\r\n /** See [[PlanProjectionSettingsProps.elevation]] */\r\n public readonly elevation?: number;\r\n /** See [[PlanProjectionSettingsProps.transparency]] */\r\n public readonly transparency?: number;\r\n /** See [[PlanProjectionSettingsProps.overlay]] */\r\n public readonly overlay: boolean;\r\n /** See [[PlanProjectionSettingsProps.enforceDisplayPriority]] */\r\n public readonly enforceDisplayPriority?: boolean;\r\n\r\n public toJSON(): PlanProjectionSettingsProps {\r\n return {\r\n elevation: this.elevation,\r\n transparency: this.transparency,\r\n overlay: true === this.overlay ? true : undefined,\r\n enforceDisplayPriority: true === this.enforceDisplayPriority ? true : undefined,\r\n };\r\n }\r\n\r\n public static fromJSON(props: PlanProjectionSettingsProps | undefined): PlanProjectionSettings | undefined {\r\n if (undefined === props)\r\n return undefined;\r\n\r\n if (undefined === props.elevation && undefined === props.transparency && undefined === props.overlay && undefined === props.enforceDisplayPriority)\r\n return undefined;\r\n\r\n return new PlanProjectionSettings(props);\r\n }\r\n\r\n private constructor(props: PlanProjectionSettingsProps) {\r\n this.elevation = props.elevation;\r\n this.overlay = true === props.overlay;\r\n this.enforceDisplayPriority = true === props.enforceDisplayPriority;\r\n\r\n let transparency = props.transparency;\r\n if (undefined !== transparency)\r\n transparency = Math.max(0, Math.min(1, transparency));\r\n\r\n this.transparency = transparency;\r\n }\r\n\r\n /** Create a copy of this PlanProjectionSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A PlanProjectionSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: PlanProjectionSettingsProps): PlanProjectionSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n const props: PlanProjectionSettingsProps = this.toJSON();\r\n if (undefined !== changedProps.elevation)\r\n props.elevation = changedProps.elevation;\r\n\r\n if (undefined !== changedProps.transparency)\r\n props.transparency = changedProps.transparency;\r\n\r\n if (undefined !== changedProps.overlay)\r\n props.overlay = changedProps.overlay;\r\n\r\n if (undefined !== changedProps.enforceDisplayPriority)\r\n props.enforceDisplayPriority = changedProps.enforceDisplayPriority;\r\n\r\n return new PlanProjectionSettings(props);\r\n }\r\n\r\n /** Return true if these settings are equivalent to the specified settings. */\r\n public equals(other: PlanProjectionSettings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.elevation === other.elevation && this.transparency === other.transparency && this.overlay === other.overlay && this.enforceDisplayPriority === other.enforceDisplayPriority;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PlanarClipMask.js","sourceRoot":"","sources":["../../src/PlanarClipMask.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyF;AAEzF;;;GAGG;AACH,IAAY,kBAyBX;AAzBD,WAAY,kBAAkB;IAC5B,kBAAkB;IAClB,2DAAQ,CAAA;IACR;;;;OAIG;IACH,mEAAY,CAAA;IACZ;;OAEG;IACH,+DAAU,CAAA;IACV;;OAEG;IACH,2FAAwB,CAAA;IACxB;;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C;QACxD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAEpG,IAAI,QAAQ;YACV,IAAI,CAAC,QAAQ,GAAG,gCAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEvD,IAAI,uBAAuB;YACzB,IAAI,CAAC,uBAAuB,GAAG,gCAAiB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACvF,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;;AAnH/E,wDAoHC","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 { CompressedId64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\n\n/** The different modes by which a [[PlanarClipMaskSettings]] collects the geometry used to mask a model.\n * @public\n * @extensions\n */\nexport enum PlanarClipMaskMode {\n /** No masking. */\n None = 0,\n /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]].\n * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked.\n * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one.\n * Everything visible in the view creates the mask, so turning off models, categories, or elements (via fully transparent overrides) will make things not be in the mask.\n */\n Priority = 1,\n /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s, regardless of what model is on or off in the view.\n * However, things that are off from category settings or element feature overrides in the view will not be in the mask for these models.\n */\n Models = 2,\n /** Indicates that masks should be produced from geometry belonging to a set of subcategories.\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\n */\n IncludeSubCategories = 3,\n /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s.\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\n */\n IncludeElements = 4,\n /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements.\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\n */\n ExcludeElements = 5,\n}\n\n/** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority.\n * The default can be overridden by [[PlanarClipMaskSettings.priority]].\n * @public\n * @extensions\n */\nexport enum PlanarClipMaskPriority {\n /** Background map. */\n BackgroundMap = -2048,\n /** A reality model that spans the globe - e.g., OpenStreetMaps Buildings. */\n GlobalRealityModel = -1024,\n /** A reality model with a bounded range. */\n RealityModel = 0,\n /** A design model stored in the [IModelDb]($backend). */\n DesignModel = 2048,\n}\n\n/** JSON representation of a [[PlanarClipMaskSettings]].\n * @see [[DisplayStyleSettingsProps.planarClipOvr]] and [[ContextRealityModelProps.planarClipMask]].\n * @public\n * @extensions\n */\nexport interface PlanarClipMaskProps {\n /** Controls how the mask geometry is collected */\n mode: PlanarClipMaskMode;\n /** See [[PlanarClipMaskSettings.modelIds]]. */\n modelIds?: CompressedId64Set;\n /** See [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\n subCategoryOrElementIds?: CompressedId64Set;\n /** See [[PlanarClipMaskSettings.priority]]. */\n priority?: number;\n /** See [[PlanarClipMaskSettings.transparency]]. */\n transparency?: number;\n /** See PlanarClipMaskSettings.invert */\n invert?: boolean;\n}\n\n/** Basic arguments supplied to [[PlanarClipMaskSettings.create]].\n * @public\n */\nexport interface BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.transparency]]. */\n transparency?: number;\n /** See [[PlanarClipMaskSettings.invert]]. */\n invert?: boolean;\n}\n\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Models]].\n * @public\n */\nexport interface ModelPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.modelIds]]. */\n modelIds?: Iterable<Id64String>;\n exclude?: never;\n elementIds?: never;\n subCategoryIds?: never;\n priority?: never;\n}\n\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludeElements]].\n * @public\n */\nexport interface ElementPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.modelIds]]. */\n modelIds?: Iterable<Id64String>;\n /** The elements used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\n elementIds: Iterable<Id64String>;\n /** If true, creates a mask of [[PlanarClipMaskMode.ExcludeElements]]; otherwise, [[PlanarClipMaskMode.IncludeElements]]. */\n exclude?: boolean;\n subCategoryIds?: never;\n priority?: never;\n}\n\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeSubCategories]].\n * @public\n */\nexport interface SubCategoryPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.modelIds]]. */\n modelIds?: Iterable<Id64String>;\n /** The subcategories used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\n subCategoryIds: Iterable<Id64String>;\n exclude?: never;\n elementIds?: never;\n priority?: never;\n}\n\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Priority]].\n * @public\n */\nexport interface PriorityPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.priority]]. */\n priority: number;\n exclude?: never;\n elementIds?: never;\n modelIds?: never;\n}\n\n/** Describes how to mask the geometry of one [GeometricModel]($backend) for display. The mask is produced by projecting geometry from any number of other models -\n * optionally filtered by [SubCategory]($backend) or by a set of specific [GeometricElement]($backend)s - onto a plane. Regions of the masked model that intersect the\n * mask are rendered partially or completely transparent. This is useful for, e.g., making subsurface geometry visible below the background map, or clipping out portions\n * of a reality model that intersect a design model.\n * @note Currently reality models (including background maps and terrain) can be masked, but design models can only produce masks.\n * @see [[DisplayStyleSettings.planarClipMasks]] to define clip masks for a [DisplayStyle]($backend).\n * @see [[ContextRealityModel.planarClipMaskSettings]] to apply a clip mask to a context reality model.\n * @public\n */\nexport class PlanarClipMaskSettings {\n /** Specifies how the mask geometry is produced. */\n public readonly mode: PlanarClipMaskMode;\n /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask,\n * and if `undefined`, no mask geometry will be created.\n * The mask geometry can be filtered by [[subCategoryOrElementIds]].\n */\n public readonly modelIds?: OrderedId64Iterable;\n /** For [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludedElements]], the Ids of the [GeometricElement]($backend)s to include or exclude from masking;\n * for [[PlanarClipMaskMode.IncludeSubCategories]], the Ids of the subcategories whose geometry contributes to the mask.\n * If undefined, Modes IncludeSubCategories, IncludeElements, and ExcludeElements behave like Models mode.\n */\n public readonly subCategoryOrElementIds?: OrderedId64Iterable;\n /** For [[PlanarClipMaskMode.Priority]], the priority value. */\n public readonly priority?: number;\n /** A value between 0 and 1 indicating an override for mask transparency. A transparency of 0 indicates complete masking. 1 is completely transparent (no masking).\n If no transparency is defined then the transparencies of the mask elements are used.\n */\n public readonly transparency?: number;\n /** A value of true indicates that the mask should be inverted and only content within the mask should be displayed, in other words the area inside the mask is displayed rather than outside. */\n public readonly invert: boolean;\n private readonly _modelIds?: CompressedId64Set;\n private readonly _subCategoryOrElementIds?: CompressedId64Set;\n\n /** The compressed representation of [[modelIds]]. */\n public get compressedModelIds(): CompressedId64Set | undefined {\n return this._modelIds;\n }\n\n /** Create a new [[PlanarClipMaskSettings]] object from its JSON representation. */\n public static fromJSON(json?: PlanarClipMaskProps): PlanarClipMaskSettings {\n if (!json || undefined === json.mode)\n return this.defaults;\n\n return new PlanarClipMaskSettings(json.mode, json.transparency, json.modelIds, json.subCategoryOrElementIds, json.priority, json.invert);\n }\n\n /** Create a new PlanarClipMaskSettings. */\n public static create(args: ModelPlanarClipMaskArgs | ElementPlanarClipMaskArgs | SubCategoryPlanarClipMaskArgs | PriorityPlanarClipMaskArgs): PlanarClipMaskSettings {\n const modelIds = args.modelIds ? CompressedId64Set.sortAndCompress(args.modelIds) : undefined;\n if (undefined !== args.priority)\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Priority, args.transparency, undefined, undefined, args.priority, args.invert);\n else if (undefined !== args.subCategoryIds)\n return new PlanarClipMaskSettings(PlanarClipMaskMode.IncludeSubCategories, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.subCategoryIds), undefined, args.invert);\n else if (undefined !== args.elementIds)\n return new PlanarClipMaskSettings(args.exclude ? PlanarClipMaskMode.ExcludeElements : PlanarClipMaskMode.IncludeElements, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.elementIds), undefined, args.invert);\n else\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Models, args.transparency, modelIds, undefined, undefined, args.invert);\n }\n\n /** Create JSON object representing this [[PlanarClipMaskSettings]] */\n public toJSON(): PlanarClipMaskProps {\n const props: PlanarClipMaskProps = { mode: this.mode };\n if (undefined !== this._modelIds)\n props.modelIds = this._modelIds;\n\n if (undefined !== this._subCategoryOrElementIds)\n props.subCategoryOrElementIds = this._subCategoryOrElementIds;\n\n if (undefined !== this.priority)\n props.priority = this.priority;\n\n if (undefined !== this.transparency)\n props.transparency = this.transparency;\n\n if (this.invert)\n props.invert = true;\n\n return props;\n }\n\n /** Returns true if masking is enabled. */\n public get isValid(): boolean {\n return this.mode !== PlanarClipMaskMode.None;\n }\n\n public equals(other: PlanarClipMaskSettings): boolean {\n return this.mode === other.mode &&\n this.priority === other.priority &&\n this.transparency === other.transparency &&\n this.invert === other.invert &&\n this._modelIds === other._modelIds &&\n this._subCategoryOrElementIds === other._subCategoryOrElementIds;\n }\n\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A PlanarClipMaskSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: PlanarClipMaskProps): PlanarClipMaskSettings {\n if (undefined === changedProps)\n return this;\n\n return PlanarClipMaskSettings.fromJSON({\n ...this.toJSON(),\n ...changedProps,\n });\n }\n\n private constructor(mode: PlanarClipMaskMode, transparency?: number, modelIds?: CompressedId64Set, subCategoryOrElementIds?: CompressedId64Set, priority?: number, invert?: boolean) {\n this.mode = mode;\n this._modelIds = modelIds;\n this._subCategoryOrElementIds = subCategoryOrElementIds;\n this.priority = priority;\n this.invert = true === invert;\n this.transparency = undefined !== transparency ? Math.max(0, Math.min(1, transparency)) : undefined;\n\n if (modelIds)\n this.modelIds = CompressedId64Set.iterable(modelIds);\n\n if (subCategoryOrElementIds)\n this.subCategoryOrElementIds = CompressedId64Set.iterable(subCategoryOrElementIds);\n }\n\n /** A default PlanarClipMask which masks nothing. */\n public static defaults = new PlanarClipMaskSettings(PlanarClipMaskMode.None);\n}\n"]}
1
+ {"version":3,"file":"PlanarClipMask.js","sourceRoot":"","sources":["../../src/PlanarClipMask.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyF;AAEzF;;;GAGG;AACH,IAAY,kBAyBX;AAzBD,WAAY,kBAAkB;IAC5B,kBAAkB;IAClB,2DAAQ,CAAA;IACR;;;;OAIG;IACH,mEAAY,CAAA;IACZ;;O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G,QAAQ,CAAC;QAC1B,IAAI,CAAC,wBAAwB,GAAG,uBAAuB,CAAC;QACxD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAEpG,IAAI,QAAQ;YACV,IAAI,CAAC,QAAQ,GAAG,gCAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEvD,IAAI,uBAAuB;YACzB,IAAI,CAAC,uBAAuB,GAAG,gCAAiB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACvF,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;;AAnH/E,wDAoHC","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 { CompressedId64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\r\n\r\n/** The different modes by which a [[PlanarClipMaskSettings]] collects the geometry used to mask a model.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum PlanarClipMaskMode {\r\n /** No masking. */\r\n None = 0,\r\n /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]].\r\n * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked.\r\n * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one.\r\n * Everything visible in the view creates the mask, so turning off models, categories, or elements (via fully transparent overrides) will make things not be in the mask.\r\n */\r\n Priority = 1,\r\n /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s, regardless of what model is on or off in the view.\r\n * However, things that are off from category settings or element feature overrides in the view will not be in the mask for these models.\r\n */\r\n Models = 2,\r\n /** Indicates that masks should be produced from geometry belonging to a set of subcategories.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n IncludeSubCategories = 3,\r\n /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n IncludeElements = 4,\r\n /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n ExcludeElements = 5,\r\n}\r\n\r\n/** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority.\r\n * The default can be overridden by [[PlanarClipMaskSettings.priority]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum PlanarClipMaskPriority {\r\n /** Background map. */\r\n BackgroundMap = -2048,\r\n /** A reality model that spans the globe - e.g., OpenStreetMaps Buildings. */\r\n GlobalRealityModel = -1024,\r\n /** A reality model with a bounded range. */\r\n RealityModel = 0,\r\n /** A design model stored in the [IModelDb]($backend). */\r\n DesignModel = 2048,\r\n}\r\n\r\n/** JSON representation of a [[PlanarClipMaskSettings]].\r\n * @see [[DisplayStyleSettingsProps.planarClipOvr]] and [[ContextRealityModelProps.planarClipMask]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PlanarClipMaskProps {\r\n /** Controls how the mask geometry is collected */\r\n mode: PlanarClipMaskMode;\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: CompressedId64Set;\r\n /** See [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n subCategoryOrElementIds?: CompressedId64Set;\r\n /** See [[PlanarClipMaskSettings.priority]]. */\r\n priority?: number;\r\n /** See [[PlanarClipMaskSettings.transparency]]. */\r\n transparency?: number;\r\n /** See PlanarClipMaskSettings.invert */\r\n invert?: boolean;\r\n}\r\n\r\n/** Basic arguments supplied to [[PlanarClipMaskSettings.create]].\r\n * @public\r\n */\r\nexport interface BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.transparency]]. */\r\n transparency?: number;\r\n /** See [[PlanarClipMaskSettings.invert]]. */\r\n invert?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Models]].\r\n * @public\r\n */\r\nexport interface ModelPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n exclude?: never;\r\n elementIds?: never;\r\n subCategoryIds?: never;\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludeElements]].\r\n * @public\r\n */\r\nexport interface ElementPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** The elements used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n elementIds: Iterable<Id64String>;\r\n /** If true, creates a mask of [[PlanarClipMaskMode.ExcludeElements]]; otherwise, [[PlanarClipMaskMode.IncludeElements]]. */\r\n exclude?: boolean;\r\n subCategoryIds?: never;\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeSubCategories]].\r\n * @public\r\n */\r\nexport interface SubCategoryPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** The subcategories used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n subCategoryIds: Iterable<Id64String>;\r\n exclude?: never;\r\n elementIds?: never;\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Priority]].\r\n * @public\r\n */\r\nexport interface PriorityPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.priority]]. */\r\n priority: number;\r\n exclude?: never;\r\n elementIds?: never;\r\n modelIds?: never;\r\n}\r\n\r\n/** Describes how to mask the geometry of one [GeometricModel]($backend) for display. The mask is produced by projecting geometry from any number of other models -\r\n * optionally filtered by [SubCategory]($backend) or by a set of specific [GeometricElement]($backend)s - onto a plane. Regions of the masked model that intersect the\r\n * mask are rendered partially or completely transparent. This is useful for, e.g., making subsurface geometry visible below the background map, or clipping out portions\r\n * of a reality model that intersect a design model.\r\n * @note Currently reality models (including background maps and terrain) can be masked, but design models can only produce masks.\r\n * @see [[DisplayStyleSettings.planarClipMasks]] to define clip masks for a [DisplayStyle]($backend).\r\n * @see [[ContextRealityModel.planarClipMaskSettings]] to apply a clip mask to a context reality model.\r\n * @public\r\n */\r\nexport class PlanarClipMaskSettings {\r\n /** Specifies how the mask geometry is produced. */\r\n public readonly mode: PlanarClipMaskMode;\r\n /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask,\r\n * and if `undefined`, no mask geometry will be created.\r\n * The mask geometry can be filtered by [[subCategoryOrElementIds]].\r\n */\r\n public readonly modelIds?: OrderedId64Iterable;\r\n /** For [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludedElements]], the Ids of the [GeometricElement]($backend)s to include or exclude from masking;\r\n * for [[PlanarClipMaskMode.IncludeSubCategories]], the Ids of the subcategories whose geometry contributes to the mask.\r\n * If undefined, Modes IncludeSubCategories, IncludeElements, and ExcludeElements behave like Models mode.\r\n */\r\n public readonly subCategoryOrElementIds?: OrderedId64Iterable;\r\n /** For [[PlanarClipMaskMode.Priority]], the priority value. */\r\n public readonly priority?: number;\r\n /** A value between 0 and 1 indicating an override for mask transparency. A transparency of 0 indicates complete masking. 1 is completely transparent (no masking).\r\n If no transparency is defined then the transparencies of the mask elements are used.\r\n */\r\n public readonly transparency?: number;\r\n /** A value of true indicates that the mask should be inverted and only content within the mask should be displayed, in other words the area inside the mask is displayed rather than outside. */\r\n public readonly invert: boolean;\r\n private readonly _modelIds?: CompressedId64Set;\r\n private readonly _subCategoryOrElementIds?: CompressedId64Set;\r\n\r\n /** The compressed representation of [[modelIds]]. */\r\n public get compressedModelIds(): CompressedId64Set | undefined {\r\n return this._modelIds;\r\n }\r\n\r\n /** Create a new [[PlanarClipMaskSettings]] object from its JSON representation. */\r\n public static fromJSON(json?: PlanarClipMaskProps): PlanarClipMaskSettings {\r\n if (!json || undefined === json.mode)\r\n return this.defaults;\r\n\r\n return new PlanarClipMaskSettings(json.mode, json.transparency, json.modelIds, json.subCategoryOrElementIds, json.priority, json.invert);\r\n }\r\n\r\n /** Create a new PlanarClipMaskSettings. */\r\n public static create(args: ModelPlanarClipMaskArgs | ElementPlanarClipMaskArgs | SubCategoryPlanarClipMaskArgs | PriorityPlanarClipMaskArgs): PlanarClipMaskSettings {\r\n const modelIds = args.modelIds ? CompressedId64Set.sortAndCompress(args.modelIds) : undefined;\r\n if (undefined !== args.priority)\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Priority, args.transparency, undefined, undefined, args.priority, args.invert);\r\n else if (undefined !== args.subCategoryIds)\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.IncludeSubCategories, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.subCategoryIds), undefined, args.invert);\r\n else if (undefined !== args.elementIds)\r\n return new PlanarClipMaskSettings(args.exclude ? PlanarClipMaskMode.ExcludeElements : PlanarClipMaskMode.IncludeElements, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.elementIds), undefined, args.invert);\r\n else\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Models, args.transparency, modelIds, undefined, undefined, args.invert);\r\n }\r\n\r\n /** Create JSON object representing this [[PlanarClipMaskSettings]] */\r\n public toJSON(): PlanarClipMaskProps {\r\n const props: PlanarClipMaskProps = { mode: this.mode };\r\n if (undefined !== this._modelIds)\r\n props.modelIds = this._modelIds;\r\n\r\n if (undefined !== this._subCategoryOrElementIds)\r\n props.subCategoryOrElementIds = this._subCategoryOrElementIds;\r\n\r\n if (undefined !== this.priority)\r\n props.priority = this.priority;\r\n\r\n if (undefined !== this.transparency)\r\n props.transparency = this.transparency;\r\n\r\n if (this.invert)\r\n props.invert = true;\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if masking is enabled. */\r\n public get isValid(): boolean {\r\n return this.mode !== PlanarClipMaskMode.None;\r\n }\r\n\r\n public equals(other: PlanarClipMaskSettings): boolean {\r\n return this.mode === other.mode &&\r\n this.priority === other.priority &&\r\n this.transparency === other.transparency &&\r\n this.invert === other.invert &&\r\n this._modelIds === other._modelIds &&\r\n this._subCategoryOrElementIds === other._subCategoryOrElementIds;\r\n }\r\n\r\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A PlanarClipMaskSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: PlanarClipMaskProps): PlanarClipMaskSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n return PlanarClipMaskSettings.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n\r\n private constructor(mode: PlanarClipMaskMode, transparency?: number, modelIds?: CompressedId64Set, subCategoryOrElementIds?: CompressedId64Set, priority?: number, invert?: boolean) {\r\n this.mode = mode;\r\n this._modelIds = modelIds;\r\n this._subCategoryOrElementIds = subCategoryOrElementIds;\r\n this.priority = priority;\r\n this.invert = true === invert;\r\n this.transparency = undefined !== transparency ? Math.max(0, Math.min(1, transparency)) : undefined;\r\n\r\n if (modelIds)\r\n this.modelIds = CompressedId64Set.iterable(modelIds);\r\n\r\n if (subCategoryOrElementIds)\r\n this.subCategoryOrElementIds = CompressedId64Set.iterable(subCategoryOrElementIds);\r\n }\r\n\r\n /** A default PlanarClipMask which masks nothing. */\r\n public static defaults = new PlanarClipMaskSettings(PlanarClipMaskMode.None);\r\n}\r\n"]}