@itwin/core-frontend 3.2.0-dev.9 → 3.3.0-dev.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 (1218) hide show
  1. package/CHANGELOG.md +55 -1
  2. package/lib/cjs/AccuDraw.d.ts +2 -0
  3. package/lib/cjs/AccuDraw.d.ts.map +1 -1
  4. package/lib/cjs/AccuDraw.js +2 -0
  5. package/lib/cjs/AccuDraw.js.map +1 -1
  6. package/lib/cjs/AccuSnap.d.ts +1 -0
  7. package/lib/cjs/AccuSnap.d.ts.map +1 -1
  8. package/lib/cjs/AccuSnap.js +1 -0
  9. package/lib/cjs/AccuSnap.js.map +1 -1
  10. package/lib/cjs/ApproximateTerrainHeights.d.ts.map +1 -1
  11. package/lib/cjs/ApproximateTerrainHeights.js +4 -2
  12. package/lib/cjs/ApproximateTerrainHeights.js.map +1 -1
  13. package/lib/cjs/ApproximateTerrainHeightsProps.d.ts +1 -1
  14. package/lib/cjs/ApproximateTerrainHeightsProps.d.ts.map +1 -1
  15. package/lib/cjs/ApproximateTerrainHeightsProps.js +2 -2
  16. package/lib/cjs/ApproximateTerrainHeightsProps.js.map +1 -1
  17. package/lib/cjs/AuxCoordSys.d.ts +12 -2
  18. package/lib/cjs/AuxCoordSys.d.ts.map +1 -1
  19. package/lib/cjs/AuxCoordSys.js +12 -2
  20. package/lib/cjs/AuxCoordSys.js.map +1 -1
  21. package/lib/cjs/BingLocation.d.ts +1 -0
  22. package/lib/cjs/BingLocation.d.ts.map +1 -1
  23. package/lib/cjs/BingLocation.js +1 -0
  24. package/lib/cjs/BingLocation.js.map +1 -1
  25. package/lib/cjs/BriefcaseConnection.d.ts +35 -1
  26. package/lib/cjs/BriefcaseConnection.d.ts.map +1 -1
  27. package/lib/cjs/BriefcaseConnection.js +52 -1
  28. package/lib/cjs/BriefcaseConnection.js.map +1 -1
  29. package/lib/cjs/CategorySelectorState.d.ts +1 -0
  30. package/lib/cjs/CategorySelectorState.d.ts.map +1 -1
  31. package/lib/cjs/CategorySelectorState.js +1 -0
  32. package/lib/cjs/CategorySelectorState.js.map +1 -1
  33. package/lib/cjs/ChangeFlags.d.ts +1 -0
  34. package/lib/cjs/ChangeFlags.d.ts.map +1 -1
  35. package/lib/cjs/ChangeFlags.js +1 -0
  36. package/lib/cjs/ChangeFlags.js.map +1 -1
  37. package/lib/cjs/ContextRealityModelState.d.ts +1 -0
  38. package/lib/cjs/ContextRealityModelState.d.ts.map +1 -1
  39. package/lib/cjs/ContextRealityModelState.js +1 -0
  40. package/lib/cjs/ContextRealityModelState.js.map +1 -1
  41. package/lib/cjs/CoordSystem.d.ts +1 -0
  42. package/lib/cjs/CoordSystem.d.ts.map +1 -1
  43. package/lib/cjs/CoordSystem.js +1 -0
  44. package/lib/cjs/CoordSystem.js.map +1 -1
  45. package/lib/cjs/DisplayStyleState.d.ts +4 -0
  46. package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
  47. package/lib/cjs/DisplayStyleState.js +9 -4
  48. package/lib/cjs/DisplayStyleState.js.map +1 -1
  49. package/lib/cjs/DrawingViewState.d.ts +5 -2
  50. package/lib/cjs/DrawingViewState.d.ts.map +1 -1
  51. package/lib/cjs/DrawingViewState.js +34 -3
  52. package/lib/cjs/DrawingViewState.js.map +1 -1
  53. package/lib/cjs/ElementLocateManager.d.ts +23 -5
  54. package/lib/cjs/ElementLocateManager.d.ts.map +1 -1
  55. package/lib/cjs/ElementLocateManager.js +19 -4
  56. package/lib/cjs/ElementLocateManager.js.map +1 -1
  57. package/lib/cjs/EmphasizeElements.d.ts +1 -0
  58. package/lib/cjs/EmphasizeElements.d.ts.map +1 -1
  59. package/lib/cjs/EmphasizeElements.js +1 -0
  60. package/lib/cjs/EmphasizeElements.js.map +1 -1
  61. package/lib/cjs/EntityState.d.ts +2 -0
  62. package/lib/cjs/EntityState.d.ts.map +1 -1
  63. package/lib/cjs/EntityState.js +2 -0
  64. package/lib/cjs/EntityState.js.map +1 -1
  65. package/lib/cjs/FeatureOverrideProvider.d.ts +1 -0
  66. package/lib/cjs/FeatureOverrideProvider.d.ts.map +1 -1
  67. package/lib/cjs/FeatureOverrideProvider.js.map +1 -1
  68. package/lib/cjs/FlashSettings.d.ts +3 -0
  69. package/lib/cjs/FlashSettings.d.ts.map +1 -1
  70. package/lib/cjs/FlashSettings.js +2 -0
  71. package/lib/cjs/FlashSettings.js.map +1 -1
  72. package/lib/cjs/FrontendHubAccess.d.ts +4 -1
  73. package/lib/cjs/FrontendHubAccess.d.ts.map +1 -1
  74. package/lib/cjs/FrontendHubAccess.js.map +1 -1
  75. package/lib/cjs/FrontendLoggerCategory.d.ts +6 -1
  76. package/lib/cjs/FrontendLoggerCategory.d.ts.map +1 -1
  77. package/lib/cjs/FrontendLoggerCategory.js +5 -0
  78. package/lib/cjs/FrontendLoggerCategory.js.map +1 -1
  79. package/lib/cjs/FrustumAnimator.d.ts +2 -0
  80. package/lib/cjs/FrustumAnimator.d.ts.map +1 -1
  81. package/lib/cjs/FrustumAnimator.js +2 -0
  82. package/lib/cjs/FrustumAnimator.js.map +1 -1
  83. package/lib/cjs/FuzzySearch.d.ts +1 -0
  84. package/lib/cjs/FuzzySearch.d.ts.map +1 -1
  85. package/lib/cjs/FuzzySearch.js.map +1 -1
  86. package/lib/cjs/GlobeAnimator.d.ts +1 -0
  87. package/lib/cjs/GlobeAnimator.d.ts.map +1 -1
  88. package/lib/cjs/GlobeAnimator.js +1 -0
  89. package/lib/cjs/GlobeAnimator.js.map +1 -1
  90. package/lib/cjs/HitDetail.d.ts +26 -5
  91. package/lib/cjs/HitDetail.d.ts.map +1 -1
  92. package/lib/cjs/HitDetail.js +26 -5
  93. package/lib/cjs/HitDetail.js.map +1 -1
  94. package/lib/cjs/IModelApp.d.ts +9 -0
  95. package/lib/cjs/IModelApp.d.ts.map +1 -1
  96. package/lib/cjs/IModelApp.js +38 -23
  97. package/lib/cjs/IModelApp.js.map +1 -1
  98. package/lib/cjs/IModelConnection.d.ts +11 -2
  99. package/lib/cjs/IModelConnection.d.ts.map +1 -1
  100. package/lib/cjs/IModelConnection.js +23 -2
  101. package/lib/cjs/IModelConnection.js.map +1 -1
  102. package/lib/cjs/ImageUtil.d.ts +15 -2
  103. package/lib/cjs/ImageUtil.d.ts.map +1 -1
  104. package/lib/cjs/ImageUtil.js +19 -4
  105. package/lib/cjs/ImageUtil.js.map +1 -1
  106. package/lib/cjs/IpcApp.d.ts +1 -0
  107. package/lib/cjs/IpcApp.d.ts.map +1 -1
  108. package/lib/cjs/IpcApp.js +1 -0
  109. package/lib/cjs/IpcApp.js.map +1 -1
  110. package/lib/cjs/MarginPercent.d.ts +1 -0
  111. package/lib/cjs/MarginPercent.d.ts.map +1 -1
  112. package/lib/cjs/MarginPercent.js +1 -0
  113. package/lib/cjs/MarginPercent.js.map +1 -1
  114. package/lib/cjs/Marker.d.ts +16 -3
  115. package/lib/cjs/Marker.d.ts.map +1 -1
  116. package/lib/cjs/Marker.js +3 -0
  117. package/lib/cjs/Marker.js.map +1 -1
  118. package/lib/cjs/ModelSelectorState.d.ts +1 -0
  119. package/lib/cjs/ModelSelectorState.d.ts.map +1 -1
  120. package/lib/cjs/ModelSelectorState.js +1 -0
  121. package/lib/cjs/ModelSelectorState.js.map +1 -1
  122. package/lib/cjs/ModelState.d.ts +10 -0
  123. package/lib/cjs/ModelState.d.ts.map +1 -1
  124. package/lib/cjs/ModelState.js +10 -0
  125. package/lib/cjs/ModelState.js.map +1 -1
  126. package/lib/cjs/NotificationManager.d.ts +11 -0
  127. package/lib/cjs/NotificationManager.d.ts.map +1 -1
  128. package/lib/cjs/NotificationManager.js +10 -0
  129. package/lib/cjs/NotificationManager.js.map +1 -1
  130. package/lib/cjs/PerModelCategoryVisibility.d.ts +1 -0
  131. package/lib/cjs/PerModelCategoryVisibility.d.ts.map +1 -1
  132. package/lib/cjs/PerModelCategoryVisibility.js +1 -0
  133. package/lib/cjs/PerModelCategoryVisibility.js.map +1 -1
  134. package/lib/cjs/SelectionSet.d.ts +7 -0
  135. package/lib/cjs/SelectionSet.d.ts.map +1 -1
  136. package/lib/cjs/SelectionSet.js +3 -0
  137. package/lib/cjs/SelectionSet.js.map +1 -1
  138. package/lib/cjs/SheetViewState.d.ts +6 -5
  139. package/lib/cjs/SheetViewState.d.ts.map +1 -1
  140. package/lib/cjs/SheetViewState.js +58 -6
  141. package/lib/cjs/SheetViewState.js.map +1 -1
  142. package/lib/cjs/SpatialViewState.d.ts +7 -2
  143. package/lib/cjs/SpatialViewState.d.ts.map +1 -1
  144. package/lib/cjs/SpatialViewState.js +17 -3
  145. package/lib/cjs/SpatialViewState.js.map +1 -1
  146. package/lib/cjs/Sprites.d.ts +3 -0
  147. package/lib/cjs/Sprites.d.ts.map +1 -1
  148. package/lib/cjs/Sprites.js +3 -0
  149. package/lib/cjs/Sprites.js.map +1 -1
  150. package/lib/cjs/StandardView.d.ts +1 -0
  151. package/lib/cjs/StandardView.d.ts.map +1 -1
  152. package/lib/cjs/StandardView.js +1 -0
  153. package/lib/cjs/StandardView.js.map +1 -1
  154. package/lib/cjs/SubCategoriesCache.d.ts +14 -7
  155. package/lib/cjs/SubCategoriesCache.d.ts.map +1 -1
  156. package/lib/cjs/SubCategoriesCache.js +36 -8
  157. package/lib/cjs/SubCategoriesCache.js.map +1 -1
  158. package/lib/cjs/TentativePoint.d.ts +4 -1
  159. package/lib/cjs/TentativePoint.d.ts.map +1 -1
  160. package/lib/cjs/TentativePoint.js +4 -1
  161. package/lib/cjs/TentativePoint.js.map +1 -1
  162. package/lib/cjs/Tiles.d.ts +1 -0
  163. package/lib/cjs/Tiles.d.ts.map +1 -1
  164. package/lib/cjs/Tiles.js +1 -0
  165. package/lib/cjs/Tiles.js.map +1 -1
  166. package/lib/cjs/ViewAnimation.d.ts +6 -0
  167. package/lib/cjs/ViewAnimation.d.ts.map +1 -1
  168. package/lib/cjs/ViewAnimation.js.map +1 -1
  169. package/lib/cjs/ViewCreator2d.d.ts +2 -0
  170. package/lib/cjs/ViewCreator2d.d.ts.map +1 -1
  171. package/lib/cjs/ViewCreator2d.js +1 -0
  172. package/lib/cjs/ViewCreator2d.js.map +1 -1
  173. package/lib/cjs/ViewCreator3d.d.ts +2 -8
  174. package/lib/cjs/ViewCreator3d.d.ts.map +1 -1
  175. package/lib/cjs/ViewCreator3d.js +12 -38
  176. package/lib/cjs/ViewCreator3d.js.map +1 -1
  177. package/lib/cjs/ViewGlobalLocation.d.ts +3 -0
  178. package/lib/cjs/ViewGlobalLocation.d.ts.map +1 -1
  179. package/lib/cjs/ViewGlobalLocation.js +1 -0
  180. package/lib/cjs/ViewGlobalLocation.js.map +1 -1
  181. package/lib/cjs/ViewManager.d.ts +3 -0
  182. package/lib/cjs/ViewManager.d.ts.map +1 -1
  183. package/lib/cjs/ViewManager.js +2 -0
  184. package/lib/cjs/ViewManager.js.map +1 -1
  185. package/lib/cjs/ViewPose.d.ts +1 -0
  186. package/lib/cjs/ViewPose.d.ts.map +1 -1
  187. package/lib/cjs/ViewPose.js +1 -0
  188. package/lib/cjs/ViewPose.js.map +1 -1
  189. package/lib/cjs/ViewRect.d.ts +1 -0
  190. package/lib/cjs/ViewRect.d.ts.map +1 -1
  191. package/lib/cjs/ViewRect.js +1 -0
  192. package/lib/cjs/ViewRect.js.map +1 -1
  193. package/lib/cjs/ViewState.d.ts +17 -2
  194. package/lib/cjs/ViewState.d.ts.map +1 -1
  195. package/lib/cjs/ViewState.js +40 -9
  196. package/lib/cjs/ViewState.js.map +1 -1
  197. package/lib/cjs/ViewStatus.d.ts +1 -0
  198. package/lib/cjs/ViewStatus.d.ts.map +1 -1
  199. package/lib/cjs/ViewStatus.js +1 -0
  200. package/lib/cjs/ViewStatus.js.map +1 -1
  201. package/lib/cjs/ViewingSpace.d.ts +1 -0
  202. package/lib/cjs/ViewingSpace.d.ts.map +1 -1
  203. package/lib/cjs/ViewingSpace.js +1 -0
  204. package/lib/cjs/ViewingSpace.js.map +1 -1
  205. package/lib/cjs/Viewport.d.ts +6 -2
  206. package/lib/cjs/Viewport.d.ts.map +1 -1
  207. package/lib/cjs/Viewport.js +12 -4
  208. package/lib/cjs/Viewport.js.map +1 -1
  209. package/lib/cjs/ViewportSync.d.ts +119 -0
  210. package/lib/cjs/ViewportSync.d.ts.map +1 -0
  211. package/lib/cjs/ViewportSync.js +187 -0
  212. package/lib/cjs/ViewportSync.js.map +1 -0
  213. package/lib/cjs/core-frontend.d.ts +10 -6
  214. package/lib/cjs/core-frontend.d.ts.map +1 -1
  215. package/lib/cjs/core-frontend.js +11 -6
  216. package/lib/cjs/core-frontend.js.map +1 -1
  217. package/lib/cjs/extension/Extension.d.ts +24 -15
  218. package/lib/cjs/extension/Extension.d.ts.map +1 -1
  219. package/lib/cjs/extension/Extension.js +0 -8
  220. package/lib/cjs/extension/Extension.js.map +1 -1
  221. package/lib/cjs/extension/ExtensionAdmin.d.ts +21 -44
  222. package/lib/cjs/extension/ExtensionAdmin.d.ts.map +1 -1
  223. package/lib/cjs/extension/ExtensionAdmin.js +55 -64
  224. package/lib/cjs/extension/ExtensionAdmin.js.map +1 -1
  225. package/lib/cjs/extension/ExtensionRuntime.js +231 -59
  226. package/lib/cjs/extension/ExtensionRuntime.js.map +1 -1
  227. package/lib/cjs/extension/providers/ExtensionLoadScript.d.ts +10 -0
  228. package/lib/cjs/extension/providers/ExtensionLoadScript.d.ts.map +1 -0
  229. package/lib/cjs/extension/providers/ExtensionLoadScript.js +55 -0
  230. package/lib/cjs/extension/providers/ExtensionLoadScript.js.map +1 -0
  231. package/lib/cjs/extension/providers/ExtensionServiceClient.d.ts +52 -0
  232. package/lib/cjs/extension/providers/ExtensionServiceClient.d.ts.map +1 -0
  233. package/lib/cjs/extension/providers/ExtensionServiceClient.js +131 -0
  234. package/lib/cjs/extension/providers/ExtensionServiceClient.js.map +1 -0
  235. package/lib/cjs/extension/providers/LocalExtensionProvider.d.ts +26 -0
  236. package/lib/cjs/extension/providers/LocalExtensionProvider.d.ts.map +1 -0
  237. package/lib/cjs/extension/providers/LocalExtensionProvider.js +24 -0
  238. package/lib/cjs/extension/providers/LocalExtensionProvider.js.map +1 -0
  239. package/lib/cjs/extension/providers/RemoteExtensionProvider.d.ts +36 -0
  240. package/lib/cjs/extension/providers/RemoteExtensionProvider.d.ts.map +1 -0
  241. package/lib/cjs/extension/providers/RemoteExtensionProvider.js +53 -0
  242. package/lib/cjs/extension/providers/RemoteExtensionProvider.js.map +1 -0
  243. package/lib/cjs/extension/providers/ServiceExtensionProvider.d.ts +37 -0
  244. package/lib/cjs/extension/providers/ServiceExtensionProvider.d.ts.map +1 -0
  245. package/lib/cjs/extension/providers/ServiceExtensionProvider.js +84 -0
  246. package/lib/cjs/extension/providers/ServiceExtensionProvider.js.map +1 -0
  247. package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
  248. package/lib/cjs/quantity-formatting/QuantityFormatter.js +2 -1
  249. package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
  250. package/lib/cjs/render/CanvasDecoration.d.ts +2 -0
  251. package/lib/cjs/render/CanvasDecoration.d.ts.map +1 -1
  252. package/lib/cjs/render/CanvasDecoration.js.map +1 -1
  253. package/lib/cjs/render/Decorations.d.ts +1 -0
  254. package/lib/cjs/render/Decorations.d.ts.map +1 -1
  255. package/lib/cjs/render/Decorations.js +1 -0
  256. package/lib/cjs/render/Decorations.js.map +1 -1
  257. package/lib/cjs/render/FeatureSymbology.d.ts +1 -0
  258. package/lib/cjs/render/FeatureSymbology.d.ts.map +1 -1
  259. package/lib/cjs/render/FeatureSymbology.js +1 -0
  260. package/lib/cjs/render/FeatureSymbology.js.map +1 -1
  261. package/lib/cjs/render/GraphicBranch.d.ts +2 -0
  262. package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
  263. package/lib/cjs/render/GraphicBranch.js +1 -0
  264. package/lib/cjs/render/GraphicBranch.js.map +1 -1
  265. package/lib/cjs/render/GraphicBuilder.d.ts +33 -2
  266. package/lib/cjs/render/GraphicBuilder.d.ts.map +1 -1
  267. package/lib/cjs/render/GraphicBuilder.js +26 -0
  268. package/lib/cjs/render/GraphicBuilder.js.map +1 -1
  269. package/lib/cjs/render/GraphicPrimitive.d.ts +14 -0
  270. package/lib/cjs/render/GraphicPrimitive.d.ts.map +1 -1
  271. package/lib/cjs/render/GraphicPrimitive.js.map +1 -1
  272. package/lib/cjs/render/ParticleCollectionBuilder.d.ts +3 -0
  273. package/lib/cjs/render/ParticleCollectionBuilder.d.ts.map +1 -1
  274. package/lib/cjs/render/ParticleCollectionBuilder.js.map +1 -1
  275. package/lib/cjs/render/Pixel.d.ts +1 -0
  276. package/lib/cjs/render/Pixel.d.ts.map +1 -1
  277. package/lib/cjs/render/Pixel.js +1 -0
  278. package/lib/cjs/render/Pixel.js.map +1 -1
  279. package/lib/cjs/render/RenderClipVolume.d.ts +1 -0
  280. package/lib/cjs/render/RenderClipVolume.d.ts.map +1 -1
  281. package/lib/cjs/render/RenderClipVolume.js +1 -0
  282. package/lib/cjs/render/RenderClipVolume.js.map +1 -1
  283. package/lib/cjs/render/RenderGraphic.d.ts +3 -0
  284. package/lib/cjs/render/RenderGraphic.d.ts.map +1 -1
  285. package/lib/cjs/render/RenderGraphic.js +2 -0
  286. package/lib/cjs/render/RenderGraphic.js.map +1 -1
  287. package/lib/cjs/render/RenderSystem.d.ts +4 -3
  288. package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
  289. package/lib/cjs/render/RenderSystem.js +4 -3
  290. package/lib/cjs/render/RenderSystem.js.map +1 -1
  291. package/lib/cjs/render/RenderTexture.d.ts +7 -0
  292. package/lib/cjs/render/RenderTexture.d.ts.map +1 -1
  293. package/lib/cjs/render/RenderTexture.js.map +1 -1
  294. package/lib/cjs/render/Scene.d.ts +1 -0
  295. package/lib/cjs/render/Scene.d.ts.map +1 -1
  296. package/lib/cjs/render/Scene.js +1 -0
  297. package/lib/cjs/render/Scene.js.map +1 -1
  298. package/lib/cjs/render/ScreenSpaceEffectBuilder.d.ts +10 -0
  299. package/lib/cjs/render/ScreenSpaceEffectBuilder.d.ts.map +1 -1
  300. package/lib/cjs/render/ScreenSpaceEffectBuilder.js +2 -0
  301. package/lib/cjs/render/ScreenSpaceEffectBuilder.js.map +1 -1
  302. package/lib/cjs/render/primitives/VertexKey.d.ts +4 -2
  303. package/lib/cjs/render/primitives/VertexKey.d.ts.map +1 -1
  304. package/lib/cjs/render/primitives/VertexKey.js +23 -12
  305. package/lib/cjs/render/primitives/VertexKey.js.map +1 -1
  306. package/lib/cjs/render/primitives/VertexTable.d.ts +1 -1
  307. package/lib/cjs/render/primitives/VertexTable.js +30 -2
  308. package/lib/cjs/render/primitives/VertexTable.js.map +1 -1
  309. package/lib/cjs/render/primitives/geometry/GeometryAccumulator.d.ts +12 -4
  310. package/lib/cjs/render/primitives/geometry/GeometryAccumulator.d.ts.map +1 -1
  311. package/lib/cjs/render/primitives/geometry/GeometryAccumulator.js +20 -15
  312. package/lib/cjs/render/primitives/geometry/GeometryAccumulator.js.map +1 -1
  313. package/lib/cjs/render/primitives/geometry/GeometryListBuilder.d.ts +2 -1
  314. package/lib/cjs/render/primitives/geometry/GeometryListBuilder.d.ts.map +1 -1
  315. package/lib/cjs/render/primitives/geometry/GeometryListBuilder.js +6 -1
  316. package/lib/cjs/render/primitives/geometry/GeometryListBuilder.js.map +1 -1
  317. package/lib/cjs/render/primitives/geometry/GeometryPrimitives.d.ts +14 -12
  318. package/lib/cjs/render/primitives/geometry/GeometryPrimitives.d.ts.map +1 -1
  319. package/lib/cjs/render/primitives/geometry/GeometryPrimitives.js +26 -25
  320. package/lib/cjs/render/primitives/geometry/GeometryPrimitives.js.map +1 -1
  321. package/lib/cjs/render/primitives/mesh/MeshBuilder.d.ts +8 -8
  322. package/lib/cjs/render/primitives/mesh/MeshBuilder.d.ts.map +1 -1
  323. package/lib/cjs/render/primitives/mesh/MeshBuilder.js +15 -15
  324. package/lib/cjs/render/primitives/mesh/MeshBuilder.js.map +1 -1
  325. package/lib/cjs/render/primitives/mesh/MeshBuilderMap.d.ts +11 -6
  326. package/lib/cjs/render/primitives/mesh/MeshBuilderMap.d.ts.map +1 -1
  327. package/lib/cjs/render/primitives/mesh/MeshBuilderMap.js +12 -15
  328. package/lib/cjs/render/primitives/mesh/MeshBuilderMap.js.map +1 -1
  329. package/lib/cjs/render/primitives/mesh/MeshPrimitives.d.ts +1 -1
  330. package/lib/cjs/render/primitives/mesh/MeshPrimitives.d.ts.map +1 -1
  331. package/lib/cjs/render/primitives/mesh/MeshPrimitives.js +6 -2
  332. package/lib/cjs/render/primitives/mesh/MeshPrimitives.js.map +1 -1
  333. package/lib/cjs/render/webgl/AttributeMap.js +1 -1
  334. package/lib/cjs/render/webgl/CachedGeometry.d.ts +7 -1
  335. package/lib/cjs/render/webgl/CachedGeometry.d.ts.map +1 -1
  336. package/lib/cjs/render/webgl/CachedGeometry.js +20 -10
  337. package/lib/cjs/render/webgl/CachedGeometry.js.map +1 -1
  338. package/lib/cjs/render/webgl/DrawCommand.d.ts.map +1 -1
  339. package/lib/cjs/render/webgl/DrawCommand.js +2 -1
  340. package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
  341. package/lib/cjs/render/webgl/InstancedGeometry.d.ts +1 -0
  342. package/lib/cjs/render/webgl/InstancedGeometry.d.ts.map +1 -1
  343. package/lib/cjs/render/webgl/InstancedGeometry.js +1 -0
  344. package/lib/cjs/render/webgl/InstancedGeometry.js.map +1 -1
  345. package/lib/cjs/render/webgl/RealityMesh.d.ts +14 -11
  346. package/lib/cjs/render/webgl/RealityMesh.d.ts.map +1 -1
  347. package/lib/cjs/render/webgl/RealityMesh.js +26 -17
  348. package/lib/cjs/render/webgl/RealityMesh.js.map +1 -1
  349. package/lib/cjs/render/webgl/SceneCompositor.d.ts +2 -0
  350. package/lib/cjs/render/webgl/SceneCompositor.d.ts.map +1 -1
  351. package/lib/cjs/render/webgl/SceneCompositor.js +219 -52
  352. package/lib/cjs/render/webgl/SceneCompositor.js.map +1 -1
  353. package/lib/cjs/render/webgl/ShaderBuilder.d.ts +5 -4
  354. package/lib/cjs/render/webgl/ShaderBuilder.d.ts.map +1 -1
  355. package/lib/cjs/render/webgl/ShaderBuilder.js +7 -6
  356. package/lib/cjs/render/webgl/ShaderBuilder.js.map +1 -1
  357. package/lib/cjs/render/webgl/System.d.ts +4 -4
  358. package/lib/cjs/render/webgl/System.d.ts.map +1 -1
  359. package/lib/cjs/render/webgl/System.js +6 -6
  360. package/lib/cjs/render/webgl/System.js.map +1 -1
  361. package/lib/cjs/render/webgl/Target.d.ts +6 -1
  362. package/lib/cjs/render/webgl/Target.d.ts.map +1 -1
  363. package/lib/cjs/render/webgl/Target.js +64 -13
  364. package/lib/cjs/render/webgl/Target.js.map +1 -1
  365. package/lib/cjs/render/webgl/Technique.d.ts +4 -2
  366. package/lib/cjs/render/webgl/Technique.d.ts.map +1 -1
  367. package/lib/cjs/render/webgl/Technique.js +166 -135
  368. package/lib/cjs/render/webgl/Technique.js.map +1 -1
  369. package/lib/cjs/render/webgl/TechniqueFlags.d.ts +7 -3
  370. package/lib/cjs/render/webgl/TechniqueFlags.d.ts.map +1 -1
  371. package/lib/cjs/render/webgl/TechniqueFlags.js +17 -4
  372. package/lib/cjs/render/webgl/TechniqueFlags.js.map +1 -1
  373. package/lib/cjs/render/webgl/TechniqueId.d.ts +8 -7
  374. package/lib/cjs/render/webgl/TechniqueId.d.ts.map +1 -1
  375. package/lib/cjs/render/webgl/TechniqueId.js.map +1 -1
  376. package/lib/cjs/render/webgl/glsl/Animation.d.ts.map +1 -1
  377. package/lib/cjs/render/webgl/glsl/Animation.js +2 -0
  378. package/lib/cjs/render/webgl/glsl/Animation.js.map +1 -1
  379. package/lib/cjs/render/webgl/glsl/Blur.d.ts +2 -1
  380. package/lib/cjs/render/webgl/glsl/Blur.d.ts.map +1 -1
  381. package/lib/cjs/render/webgl/glsl/Blur.js +38 -6
  382. package/lib/cjs/render/webgl/glsl/Blur.js.map +1 -1
  383. package/lib/cjs/render/webgl/glsl/Color.d.ts.map +1 -1
  384. package/lib/cjs/render/webgl/glsl/Color.js +8 -7
  385. package/lib/cjs/render/webgl/glsl/Color.js.map +1 -1
  386. package/lib/cjs/render/webgl/glsl/CopyStencil.js +1 -1
  387. package/lib/cjs/render/webgl/glsl/Decode.d.ts +2 -1
  388. package/lib/cjs/render/webgl/glsl/Decode.d.ts.map +1 -1
  389. package/lib/cjs/render/webgl/glsl/Decode.js +16 -2
  390. package/lib/cjs/render/webgl/glsl/Decode.js.map +1 -1
  391. package/lib/cjs/render/webgl/glsl/Edge.d.ts +2 -2
  392. package/lib/cjs/render/webgl/glsl/Edge.d.ts.map +1 -1
  393. package/lib/cjs/render/webgl/glsl/Edge.js +6 -19
  394. package/lib/cjs/render/webgl/glsl/Edge.js.map +1 -1
  395. package/lib/cjs/render/webgl/glsl/FeatureSymbology.d.ts.map +1 -1
  396. package/lib/cjs/render/webgl/glsl/FeatureSymbology.js +0 -2
  397. package/lib/cjs/render/webgl/glsl/FeatureSymbology.js.map +1 -1
  398. package/lib/cjs/render/webgl/glsl/PointString.d.ts +3 -3
  399. package/lib/cjs/render/webgl/glsl/PointString.d.ts.map +1 -1
  400. package/lib/cjs/render/webgl/glsl/PointString.js +6 -6
  401. package/lib/cjs/render/webgl/glsl/PointString.js.map +1 -1
  402. package/lib/cjs/render/webgl/glsl/Polyline.d.ts +3 -3
  403. package/lib/cjs/render/webgl/glsl/Polyline.d.ts.map +1 -1
  404. package/lib/cjs/render/webgl/glsl/Polyline.js +6 -21
  405. package/lib/cjs/render/webgl/glsl/Polyline.js.map +1 -1
  406. package/lib/cjs/render/webgl/glsl/Surface.d.ts +2 -2
  407. package/lib/cjs/render/webgl/glsl/Surface.d.ts.map +1 -1
  408. package/lib/cjs/render/webgl/glsl/Surface.js +50 -34
  409. package/lib/cjs/render/webgl/glsl/Surface.js.map +1 -1
  410. package/lib/cjs/render/webgl/glsl/Vertex.d.ts +3 -3
  411. package/lib/cjs/render/webgl/glsl/Vertex.d.ts.map +1 -1
  412. package/lib/cjs/render/webgl/glsl/Vertex.js +143 -57
  413. package/lib/cjs/render/webgl/glsl/Vertex.js.map +1 -1
  414. package/lib/cjs/tile/ClassifierTileTree.d.ts.map +1 -1
  415. package/lib/cjs/tile/ClassifierTileTree.js +3 -4
  416. package/lib/cjs/tile/ClassifierTileTree.js.map +1 -1
  417. package/lib/cjs/tile/DisclosedTileTreeSet.d.ts +2 -0
  418. package/lib/cjs/tile/DisclosedTileTreeSet.d.ts.map +1 -1
  419. package/lib/cjs/tile/DisclosedTileTreeSet.js +1 -0
  420. package/lib/cjs/tile/DisclosedTileTreeSet.js.map +1 -1
  421. package/lib/cjs/tile/DynamicIModelTile.js +4 -2
  422. package/lib/cjs/tile/DynamicIModelTile.js.map +1 -1
  423. package/lib/cjs/tile/GltfReader.d.ts +19 -9
  424. package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
  425. package/lib/cjs/tile/GltfReader.js +24 -7
  426. package/lib/cjs/tile/GltfReader.js.map +1 -1
  427. package/lib/cjs/tile/IModelTile.js +1 -1
  428. package/lib/cjs/tile/IModelTile.js.map +1 -1
  429. package/lib/cjs/tile/IModelTileRequestChannels.d.ts +3 -3
  430. package/lib/cjs/tile/IModelTileRequestChannels.d.ts.map +1 -1
  431. package/lib/cjs/tile/IModelTileRequestChannels.js +7 -11
  432. package/lib/cjs/tile/IModelTileRequestChannels.js.map +1 -1
  433. package/lib/cjs/tile/IModelTileTree.d.ts +3 -3
  434. package/lib/cjs/tile/IModelTileTree.d.ts.map +1 -1
  435. package/lib/cjs/tile/IModelTileTree.js +1 -1
  436. package/lib/cjs/tile/IModelTileTree.js.map +1 -1
  437. package/lib/cjs/tile/ImdlReader.d.ts +2 -0
  438. package/lib/cjs/tile/ImdlReader.d.ts.map +1 -1
  439. package/lib/cjs/tile/ImdlReader.js +2 -0
  440. package/lib/cjs/tile/ImdlReader.js.map +1 -1
  441. package/lib/cjs/tile/OPCFormatInterpreter.d.ts.map +1 -1
  442. package/lib/cjs/tile/OPCFormatInterpreter.js +1 -2
  443. package/lib/cjs/tile/OPCFormatInterpreter.js.map +1 -1
  444. package/lib/cjs/tile/PrimaryTileTree.d.ts.map +1 -1
  445. package/lib/cjs/tile/PrimaryTileTree.js +4 -4
  446. package/lib/cjs/tile/PrimaryTileTree.js.map +1 -1
  447. package/lib/cjs/tile/RealityTileLoader.d.ts +1 -1
  448. package/lib/cjs/tile/RealityTileLoader.d.ts.map +1 -1
  449. package/lib/cjs/tile/RealityTileLoader.js +34 -6
  450. package/lib/cjs/tile/RealityTileLoader.js.map +1 -1
  451. package/lib/cjs/tile/Tile.d.ts +5 -0
  452. package/lib/cjs/tile/Tile.d.ts.map +1 -1
  453. package/lib/cjs/tile/Tile.js +5 -0
  454. package/lib/cjs/tile/Tile.js.map +1 -1
  455. package/lib/cjs/tile/TileAdmin.d.ts +18 -1
  456. package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
  457. package/lib/cjs/tile/TileAdmin.js +26 -19
  458. package/lib/cjs/tile/TileAdmin.js.map +1 -1
  459. package/lib/cjs/tile/TileContent.d.ts +1 -0
  460. package/lib/cjs/tile/TileContent.d.ts.map +1 -1
  461. package/lib/cjs/tile/TileContent.js.map +1 -1
  462. package/lib/cjs/tile/TileDrawArgs.d.ts +2 -0
  463. package/lib/cjs/tile/TileDrawArgs.d.ts.map +1 -1
  464. package/lib/cjs/tile/TileDrawArgs.js +1 -0
  465. package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
  466. package/lib/cjs/tile/TileParams.d.ts +1 -0
  467. package/lib/cjs/tile/TileParams.d.ts.map +1 -1
  468. package/lib/cjs/tile/TileParams.js.map +1 -1
  469. package/lib/cjs/tile/TileRequest.d.ts +1 -0
  470. package/lib/cjs/tile/TileRequest.d.ts.map +1 -1
  471. package/lib/cjs/tile/TileRequest.js +1 -0
  472. package/lib/cjs/tile/TileRequest.js.map +1 -1
  473. package/lib/cjs/tile/TileRequestChannel.d.ts +2 -0
  474. package/lib/cjs/tile/TileRequestChannel.d.ts.map +1 -1
  475. package/lib/cjs/tile/TileRequestChannel.js +2 -0
  476. package/lib/cjs/tile/TileRequestChannel.js.map +1 -1
  477. package/lib/cjs/tile/TileRequestChannels.d.ts +1 -4
  478. package/lib/cjs/tile/TileRequestChannels.d.ts.map +1 -1
  479. package/lib/cjs/tile/TileRequestChannels.js +2 -6
  480. package/lib/cjs/tile/TileRequestChannels.js.map +1 -1
  481. package/lib/cjs/tile/TileTree.d.ts +2 -0
  482. package/lib/cjs/tile/TileTree.d.ts.map +1 -1
  483. package/lib/cjs/tile/TileTree.js +2 -0
  484. package/lib/cjs/tile/TileTree.js.map +1 -1
  485. package/lib/cjs/tile/TileTreeOwner.d.ts +1 -0
  486. package/lib/cjs/tile/TileTreeOwner.d.ts.map +1 -1
  487. package/lib/cjs/tile/TileTreeOwner.js.map +1 -1
  488. package/lib/cjs/tile/TileTreeParams.d.ts +1 -0
  489. package/lib/cjs/tile/TileTreeParams.d.ts.map +1 -1
  490. package/lib/cjs/tile/TileTreeParams.js.map +1 -1
  491. package/lib/cjs/tile/TileTreeReference.d.ts +2 -0
  492. package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
  493. package/lib/cjs/tile/TileTreeReference.js +2 -0
  494. package/lib/cjs/tile/TileTreeReference.js.map +1 -1
  495. package/lib/cjs/tile/TileTreeSupplier.d.ts +1 -0
  496. package/lib/cjs/tile/TileTreeSupplier.d.ts.map +1 -1
  497. package/lib/cjs/tile/TileTreeSupplier.js.map +1 -1
  498. package/lib/cjs/tile/TileUsageMarker.d.ts +1 -0
  499. package/lib/cjs/tile/TileUsageMarker.d.ts.map +1 -1
  500. package/lib/cjs/tile/TileUsageMarker.js +1 -0
  501. package/lib/cjs/tile/TileUsageMarker.js.map +1 -1
  502. package/lib/cjs/tile/TiledGraphicsProvider.d.ts +1 -0
  503. package/lib/cjs/tile/TiledGraphicsProvider.d.ts.map +1 -1
  504. package/lib/cjs/tile/TiledGraphicsProvider.js.map +1 -1
  505. package/lib/cjs/tile/internal.d.ts +0 -2
  506. package/lib/cjs/tile/internal.d.ts.map +1 -1
  507. package/lib/cjs/tile/internal.js +0 -2
  508. package/lib/cjs/tile/internal.js.map +1 -1
  509. package/lib/cjs/tile/map/ArcGisUtilities.d.ts +2 -1
  510. package/lib/cjs/tile/map/ArcGisUtilities.d.ts.map +1 -1
  511. package/lib/cjs/tile/map/ArcGisUtilities.js +31 -20
  512. package/lib/cjs/tile/map/ArcGisUtilities.js.map +1 -1
  513. package/lib/cjs/tile/map/BingElevation.d.ts +1 -0
  514. package/lib/cjs/tile/map/BingElevation.d.ts.map +1 -1
  515. package/lib/cjs/tile/map/BingElevation.js +1 -0
  516. package/lib/cjs/tile/map/BingElevation.js.map +1 -1
  517. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +2 -1
  518. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  519. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +50 -27
  520. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  521. package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts +0 -1
  522. package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts.map +1 -1
  523. package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +12 -10
  524. package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
  525. package/lib/cjs/tile/map/MapLayerAuthentication.d.ts +20 -9
  526. package/lib/cjs/tile/map/MapLayerAuthentication.d.ts.map +1 -1
  527. package/lib/cjs/tile/map/MapLayerAuthentication.js +0 -8
  528. package/lib/cjs/tile/map/MapLayerAuthentication.js.map +1 -1
  529. package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +24 -6
  530. package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
  531. package/lib/cjs/tile/map/MapLayerFormatRegistry.js +28 -7
  532. package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
  533. package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
  534. package/lib/cjs/tile/map/MapLayerImageryFormats.js +1 -3
  535. package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
  536. package/lib/cjs/tile/map/MapLayerSources.d.ts +1 -1
  537. package/lib/cjs/tile/map/MapLayerSources.d.ts.map +1 -1
  538. package/lib/cjs/tile/map/MapLayerSources.js +1 -1
  539. package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
  540. package/lib/cjs/tile/map/MapTile.js +2 -2
  541. package/lib/cjs/tile/map/MapTile.js.map +1 -1
  542. package/lib/cjs/tile/map/MapTileLoader.js +1 -1
  543. package/lib/cjs/tile/map/MapTileLoader.js.map +1 -1
  544. package/lib/cjs/tile/map/MapTileTree.js +2 -2
  545. package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
  546. package/lib/cjs/tile/map/WmsCapabilities.d.ts +3 -2
  547. package/lib/cjs/tile/map/WmsCapabilities.d.ts.map +1 -1
  548. package/lib/cjs/tile/map/WmsCapabilities.js +11 -10
  549. package/lib/cjs/tile/map/WmsCapabilities.js.map +1 -1
  550. package/lib/cjs/tools/ClipViewTool.d.ts +5 -3
  551. package/lib/cjs/tools/ClipViewTool.d.ts.map +1 -1
  552. package/lib/cjs/tools/ClipViewTool.js +4 -3
  553. package/lib/cjs/tools/ClipViewTool.js.map +1 -1
  554. package/lib/cjs/tools/EditManipulator.d.ts +1 -0
  555. package/lib/cjs/tools/EditManipulator.d.ts.map +1 -1
  556. package/lib/cjs/tools/EditManipulator.js +1 -0
  557. package/lib/cjs/tools/EditManipulator.js.map +1 -1
  558. package/lib/cjs/tools/EventController.d.ts +1 -0
  559. package/lib/cjs/tools/EventController.d.ts.map +1 -1
  560. package/lib/cjs/tools/EventController.js +1 -0
  561. package/lib/cjs/tools/EventController.js.map +1 -1
  562. package/lib/cjs/tools/PrimitiveTool.d.ts +4 -0
  563. package/lib/cjs/tools/PrimitiveTool.d.ts.map +1 -1
  564. package/lib/cjs/tools/PrimitiveTool.js +7 -0
  565. package/lib/cjs/tools/PrimitiveTool.js.map +1 -1
  566. package/lib/cjs/tools/SelectTool.d.ts +3 -0
  567. package/lib/cjs/tools/SelectTool.d.ts.map +1 -1
  568. package/lib/cjs/tools/SelectTool.js +3 -0
  569. package/lib/cjs/tools/SelectTool.js.map +1 -1
  570. package/lib/cjs/tools/Tool.d.ts +41 -6
  571. package/lib/cjs/tools/Tool.d.ts.map +1 -1
  572. package/lib/cjs/tools/Tool.js +27 -4
  573. package/lib/cjs/tools/Tool.js.map +1 -1
  574. package/lib/cjs/tools/ToolAdmin.d.ts +16 -22
  575. package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
  576. package/lib/cjs/tools/ToolAdmin.js +47 -8
  577. package/lib/cjs/tools/ToolAdmin.js.map +1 -1
  578. package/lib/cjs/tools/ToolAssistance.d.ts +7 -0
  579. package/lib/cjs/tools/ToolAssistance.d.ts.map +1 -1
  580. package/lib/cjs/tools/ToolAssistance.js +3 -0
  581. package/lib/cjs/tools/ToolAssistance.js.map +1 -1
  582. package/lib/cjs/tools/ToolSettings.d.ts +3 -0
  583. package/lib/cjs/tools/ToolSettings.d.ts.map +1 -1
  584. package/lib/cjs/tools/ToolSettings.js +3 -0
  585. package/lib/cjs/tools/ToolSettings.js.map +1 -1
  586. package/lib/cjs/tools/ViewTool.d.ts +3 -1
  587. package/lib/cjs/tools/ViewTool.d.ts.map +1 -1
  588. package/lib/cjs/tools/ViewTool.js +9 -5
  589. package/lib/cjs/tools/ViewTool.js.map +1 -1
  590. package/lib/esm/AccuDraw.d.ts +2 -0
  591. package/lib/esm/AccuDraw.d.ts.map +1 -1
  592. package/lib/esm/AccuDraw.js +2 -0
  593. package/lib/esm/AccuDraw.js.map +1 -1
  594. package/lib/esm/AccuSnap.d.ts +1 -0
  595. package/lib/esm/AccuSnap.d.ts.map +1 -1
  596. package/lib/esm/AccuSnap.js +1 -0
  597. package/lib/esm/AccuSnap.js.map +1 -1
  598. package/lib/esm/ApproximateTerrainHeights.d.ts.map +1 -1
  599. package/lib/esm/ApproximateTerrainHeights.js +4 -2
  600. package/lib/esm/ApproximateTerrainHeights.js.map +1 -1
  601. package/lib/esm/ApproximateTerrainHeightsProps.d.ts +1 -1
  602. package/lib/esm/ApproximateTerrainHeightsProps.d.ts.map +1 -1
  603. package/lib/esm/ApproximateTerrainHeightsProps.js +1 -1
  604. package/lib/esm/ApproximateTerrainHeightsProps.js.map +1 -1
  605. package/lib/esm/AuxCoordSys.d.ts +12 -2
  606. package/lib/esm/AuxCoordSys.d.ts.map +1 -1
  607. package/lib/esm/AuxCoordSys.js +12 -2
  608. package/lib/esm/AuxCoordSys.js.map +1 -1
  609. package/lib/esm/BingLocation.d.ts +1 -0
  610. package/lib/esm/BingLocation.d.ts.map +1 -1
  611. package/lib/esm/BingLocation.js +1 -0
  612. package/lib/esm/BingLocation.js.map +1 -1
  613. package/lib/esm/BriefcaseConnection.d.ts +35 -1
  614. package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
  615. package/lib/esm/BriefcaseConnection.js +50 -0
  616. package/lib/esm/BriefcaseConnection.js.map +1 -1
  617. package/lib/esm/CategorySelectorState.d.ts +1 -0
  618. package/lib/esm/CategorySelectorState.d.ts.map +1 -1
  619. package/lib/esm/CategorySelectorState.js +1 -0
  620. package/lib/esm/CategorySelectorState.js.map +1 -1
  621. package/lib/esm/ChangeFlags.d.ts +1 -0
  622. package/lib/esm/ChangeFlags.d.ts.map +1 -1
  623. package/lib/esm/ChangeFlags.js +1 -0
  624. package/lib/esm/ChangeFlags.js.map +1 -1
  625. package/lib/esm/ContextRealityModelState.d.ts +1 -0
  626. package/lib/esm/ContextRealityModelState.d.ts.map +1 -1
  627. package/lib/esm/ContextRealityModelState.js +1 -0
  628. package/lib/esm/ContextRealityModelState.js.map +1 -1
  629. package/lib/esm/CoordSystem.d.ts +1 -0
  630. package/lib/esm/CoordSystem.d.ts.map +1 -1
  631. package/lib/esm/CoordSystem.js +1 -0
  632. package/lib/esm/CoordSystem.js.map +1 -1
  633. package/lib/esm/DisplayStyleState.d.ts +4 -0
  634. package/lib/esm/DisplayStyleState.d.ts.map +1 -1
  635. package/lib/esm/DisplayStyleState.js +9 -4
  636. package/lib/esm/DisplayStyleState.js.map +1 -1
  637. package/lib/esm/DrawingViewState.d.ts +5 -2
  638. package/lib/esm/DrawingViewState.d.ts.map +1 -1
  639. package/lib/esm/DrawingViewState.js +34 -3
  640. package/lib/esm/DrawingViewState.js.map +1 -1
  641. package/lib/esm/ElementLocateManager.d.ts +23 -5
  642. package/lib/esm/ElementLocateManager.d.ts.map +1 -1
  643. package/lib/esm/ElementLocateManager.js +19 -4
  644. package/lib/esm/ElementLocateManager.js.map +1 -1
  645. package/lib/esm/EmphasizeElements.d.ts +1 -0
  646. package/lib/esm/EmphasizeElements.d.ts.map +1 -1
  647. package/lib/esm/EmphasizeElements.js +1 -0
  648. package/lib/esm/EmphasizeElements.js.map +1 -1
  649. package/lib/esm/EntityState.d.ts +2 -0
  650. package/lib/esm/EntityState.d.ts.map +1 -1
  651. package/lib/esm/EntityState.js +2 -0
  652. package/lib/esm/EntityState.js.map +1 -1
  653. package/lib/esm/FeatureOverrideProvider.d.ts +1 -0
  654. package/lib/esm/FeatureOverrideProvider.d.ts.map +1 -1
  655. package/lib/esm/FeatureOverrideProvider.js.map +1 -1
  656. package/lib/esm/FlashSettings.d.ts +3 -0
  657. package/lib/esm/FlashSettings.d.ts.map +1 -1
  658. package/lib/esm/FlashSettings.js +2 -0
  659. package/lib/esm/FlashSettings.js.map +1 -1
  660. package/lib/esm/FrontendHubAccess.d.ts +4 -1
  661. package/lib/esm/FrontendHubAccess.d.ts.map +1 -1
  662. package/lib/esm/FrontendHubAccess.js.map +1 -1
  663. package/lib/esm/FrontendLoggerCategory.d.ts +6 -1
  664. package/lib/esm/FrontendLoggerCategory.d.ts.map +1 -1
  665. package/lib/esm/FrontendLoggerCategory.js +5 -0
  666. package/lib/esm/FrontendLoggerCategory.js.map +1 -1
  667. package/lib/esm/FrustumAnimator.d.ts +2 -0
  668. package/lib/esm/FrustumAnimator.d.ts.map +1 -1
  669. package/lib/esm/FrustumAnimator.js +2 -0
  670. package/lib/esm/FrustumAnimator.js.map +1 -1
  671. package/lib/esm/FuzzySearch.d.ts +1 -0
  672. package/lib/esm/FuzzySearch.d.ts.map +1 -1
  673. package/lib/esm/FuzzySearch.js.map +1 -1
  674. package/lib/esm/GlobeAnimator.d.ts +1 -0
  675. package/lib/esm/GlobeAnimator.d.ts.map +1 -1
  676. package/lib/esm/GlobeAnimator.js +1 -0
  677. package/lib/esm/GlobeAnimator.js.map +1 -1
  678. package/lib/esm/HitDetail.d.ts +26 -5
  679. package/lib/esm/HitDetail.d.ts.map +1 -1
  680. package/lib/esm/HitDetail.js +26 -5
  681. package/lib/esm/HitDetail.js.map +1 -1
  682. package/lib/esm/IModelApp.d.ts +9 -0
  683. package/lib/esm/IModelApp.d.ts.map +1 -1
  684. package/lib/esm/IModelApp.js +37 -22
  685. package/lib/esm/IModelApp.js.map +1 -1
  686. package/lib/esm/IModelConnection.d.ts +11 -2
  687. package/lib/esm/IModelConnection.d.ts.map +1 -1
  688. package/lib/esm/IModelConnection.js +23 -2
  689. package/lib/esm/IModelConnection.js.map +1 -1
  690. package/lib/esm/ImageUtil.d.ts +15 -2
  691. package/lib/esm/ImageUtil.d.ts.map +1 -1
  692. package/lib/esm/ImageUtil.js +19 -4
  693. package/lib/esm/ImageUtil.js.map +1 -1
  694. package/lib/esm/IpcApp.d.ts +1 -0
  695. package/lib/esm/IpcApp.d.ts.map +1 -1
  696. package/lib/esm/IpcApp.js +1 -0
  697. package/lib/esm/IpcApp.js.map +1 -1
  698. package/lib/esm/MarginPercent.d.ts +1 -0
  699. package/lib/esm/MarginPercent.d.ts.map +1 -1
  700. package/lib/esm/MarginPercent.js +1 -0
  701. package/lib/esm/MarginPercent.js.map +1 -1
  702. package/lib/esm/Marker.d.ts +16 -3
  703. package/lib/esm/Marker.d.ts.map +1 -1
  704. package/lib/esm/Marker.js +3 -0
  705. package/lib/esm/Marker.js.map +1 -1
  706. package/lib/esm/ModelSelectorState.d.ts +1 -0
  707. package/lib/esm/ModelSelectorState.d.ts.map +1 -1
  708. package/lib/esm/ModelSelectorState.js +1 -0
  709. package/lib/esm/ModelSelectorState.js.map +1 -1
  710. package/lib/esm/ModelState.d.ts +10 -0
  711. package/lib/esm/ModelState.d.ts.map +1 -1
  712. package/lib/esm/ModelState.js +10 -0
  713. package/lib/esm/ModelState.js.map +1 -1
  714. package/lib/esm/NotificationManager.d.ts +11 -0
  715. package/lib/esm/NotificationManager.d.ts.map +1 -1
  716. package/lib/esm/NotificationManager.js +10 -0
  717. package/lib/esm/NotificationManager.js.map +1 -1
  718. package/lib/esm/PerModelCategoryVisibility.d.ts +1 -0
  719. package/lib/esm/PerModelCategoryVisibility.d.ts.map +1 -1
  720. package/lib/esm/PerModelCategoryVisibility.js +1 -0
  721. package/lib/esm/PerModelCategoryVisibility.js.map +1 -1
  722. package/lib/esm/SelectionSet.d.ts +7 -0
  723. package/lib/esm/SelectionSet.d.ts.map +1 -1
  724. package/lib/esm/SelectionSet.js +3 -0
  725. package/lib/esm/SelectionSet.js.map +1 -1
  726. package/lib/esm/SheetViewState.d.ts +6 -5
  727. package/lib/esm/SheetViewState.d.ts.map +1 -1
  728. package/lib/esm/SheetViewState.js +59 -7
  729. package/lib/esm/SheetViewState.js.map +1 -1
  730. package/lib/esm/SpatialViewState.d.ts +7 -2
  731. package/lib/esm/SpatialViewState.d.ts.map +1 -1
  732. package/lib/esm/SpatialViewState.js +18 -4
  733. package/lib/esm/SpatialViewState.js.map +1 -1
  734. package/lib/esm/Sprites.d.ts +3 -0
  735. package/lib/esm/Sprites.d.ts.map +1 -1
  736. package/lib/esm/Sprites.js +3 -0
  737. package/lib/esm/Sprites.js.map +1 -1
  738. package/lib/esm/StandardView.d.ts +1 -0
  739. package/lib/esm/StandardView.d.ts.map +1 -1
  740. package/lib/esm/StandardView.js +1 -0
  741. package/lib/esm/StandardView.js.map +1 -1
  742. package/lib/esm/SubCategoriesCache.d.ts +14 -7
  743. package/lib/esm/SubCategoriesCache.d.ts.map +1 -1
  744. package/lib/esm/SubCategoriesCache.js +37 -9
  745. package/lib/esm/SubCategoriesCache.js.map +1 -1
  746. package/lib/esm/TentativePoint.d.ts +4 -1
  747. package/lib/esm/TentativePoint.d.ts.map +1 -1
  748. package/lib/esm/TentativePoint.js +4 -1
  749. package/lib/esm/TentativePoint.js.map +1 -1
  750. package/lib/esm/Tiles.d.ts +1 -0
  751. package/lib/esm/Tiles.d.ts.map +1 -1
  752. package/lib/esm/Tiles.js +1 -0
  753. package/lib/esm/Tiles.js.map +1 -1
  754. package/lib/esm/ViewAnimation.d.ts +6 -0
  755. package/lib/esm/ViewAnimation.d.ts.map +1 -1
  756. package/lib/esm/ViewAnimation.js.map +1 -1
  757. package/lib/esm/ViewCreator2d.d.ts +2 -0
  758. package/lib/esm/ViewCreator2d.d.ts.map +1 -1
  759. package/lib/esm/ViewCreator2d.js +1 -0
  760. package/lib/esm/ViewCreator2d.js.map +1 -1
  761. package/lib/esm/ViewCreator3d.d.ts +2 -8
  762. package/lib/esm/ViewCreator3d.d.ts.map +1 -1
  763. package/lib/esm/ViewCreator3d.js +12 -38
  764. package/lib/esm/ViewCreator3d.js.map +1 -1
  765. package/lib/esm/ViewGlobalLocation.d.ts +3 -0
  766. package/lib/esm/ViewGlobalLocation.d.ts.map +1 -1
  767. package/lib/esm/ViewGlobalLocation.js +1 -0
  768. package/lib/esm/ViewGlobalLocation.js.map +1 -1
  769. package/lib/esm/ViewManager.d.ts +3 -0
  770. package/lib/esm/ViewManager.d.ts.map +1 -1
  771. package/lib/esm/ViewManager.js +2 -0
  772. package/lib/esm/ViewManager.js.map +1 -1
  773. package/lib/esm/ViewPose.d.ts +1 -0
  774. package/lib/esm/ViewPose.d.ts.map +1 -1
  775. package/lib/esm/ViewPose.js +1 -0
  776. package/lib/esm/ViewPose.js.map +1 -1
  777. package/lib/esm/ViewRect.d.ts +1 -0
  778. package/lib/esm/ViewRect.d.ts.map +1 -1
  779. package/lib/esm/ViewRect.js +1 -0
  780. package/lib/esm/ViewRect.js.map +1 -1
  781. package/lib/esm/ViewState.d.ts +17 -2
  782. package/lib/esm/ViewState.d.ts.map +1 -1
  783. package/lib/esm/ViewState.js +41 -10
  784. package/lib/esm/ViewState.js.map +1 -1
  785. package/lib/esm/ViewStatus.d.ts +1 -0
  786. package/lib/esm/ViewStatus.d.ts.map +1 -1
  787. package/lib/esm/ViewStatus.js +1 -0
  788. package/lib/esm/ViewStatus.js.map +1 -1
  789. package/lib/esm/ViewingSpace.d.ts +1 -0
  790. package/lib/esm/ViewingSpace.d.ts.map +1 -1
  791. package/lib/esm/ViewingSpace.js +1 -0
  792. package/lib/esm/ViewingSpace.js.map +1 -1
  793. package/lib/esm/Viewport.d.ts +6 -2
  794. package/lib/esm/Viewport.d.ts.map +1 -1
  795. package/lib/esm/Viewport.js +12 -4
  796. package/lib/esm/Viewport.js.map +1 -1
  797. package/lib/esm/ViewportSync.d.ts +119 -0
  798. package/lib/esm/ViewportSync.d.ts.map +1 -0
  799. package/lib/esm/ViewportSync.js +177 -0
  800. package/lib/esm/ViewportSync.js.map +1 -0
  801. package/lib/esm/core-frontend.d.ts +10 -6
  802. package/lib/esm/core-frontend.d.ts.map +1 -1
  803. package/lib/esm/core-frontend.js +11 -6
  804. package/lib/esm/core-frontend.js.map +1 -1
  805. package/lib/esm/extension/Extension.d.ts +24 -15
  806. package/lib/esm/extension/Extension.d.ts.map +1 -1
  807. package/lib/esm/extension/Extension.js +1 -7
  808. package/lib/esm/extension/Extension.js.map +1 -1
  809. package/lib/esm/extension/ExtensionAdmin.d.ts +21 -44
  810. package/lib/esm/extension/ExtensionAdmin.d.ts.map +1 -1
  811. package/lib/esm/extension/ExtensionAdmin.js +55 -64
  812. package/lib/esm/extension/ExtensionAdmin.js.map +1 -1
  813. package/lib/esm/extension/ExtensionRuntime.js +239 -59
  814. package/lib/esm/extension/ExtensionRuntime.js.map +1 -1
  815. package/lib/esm/extension/providers/ExtensionLoadScript.d.ts +10 -0
  816. package/lib/esm/extension/providers/ExtensionLoadScript.d.ts.map +1 -0
  817. package/lib/esm/extension/providers/ExtensionLoadScript.js +51 -0
  818. package/lib/esm/extension/providers/ExtensionLoadScript.js.map +1 -0
  819. package/lib/esm/extension/providers/ExtensionServiceClient.d.ts +52 -0
  820. package/lib/esm/extension/providers/ExtensionServiceClient.d.ts.map +1 -0
  821. package/lib/esm/extension/providers/ExtensionServiceClient.js +127 -0
  822. package/lib/esm/extension/providers/ExtensionServiceClient.js.map +1 -0
  823. package/lib/esm/extension/providers/LocalExtensionProvider.d.ts +26 -0
  824. package/lib/esm/extension/providers/LocalExtensionProvider.d.ts.map +1 -0
  825. package/lib/esm/extension/providers/LocalExtensionProvider.js +20 -0
  826. package/lib/esm/extension/providers/LocalExtensionProvider.js.map +1 -0
  827. package/lib/esm/extension/providers/RemoteExtensionProvider.d.ts +36 -0
  828. package/lib/esm/extension/providers/RemoteExtensionProvider.d.ts.map +1 -0
  829. package/lib/esm/extension/providers/RemoteExtensionProvider.js +49 -0
  830. package/lib/esm/extension/providers/RemoteExtensionProvider.js.map +1 -0
  831. package/lib/esm/extension/providers/ServiceExtensionProvider.d.ts +37 -0
  832. package/lib/esm/extension/providers/ServiceExtensionProvider.d.ts.map +1 -0
  833. package/lib/esm/extension/providers/ServiceExtensionProvider.js +80 -0
  834. package/lib/esm/extension/providers/ServiceExtensionProvider.js.map +1 -0
  835. package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
  836. package/lib/esm/quantity-formatting/QuantityFormatter.js +3 -2
  837. package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
  838. package/lib/esm/render/CanvasDecoration.d.ts +2 -0
  839. package/lib/esm/render/CanvasDecoration.d.ts.map +1 -1
  840. package/lib/esm/render/CanvasDecoration.js.map +1 -1
  841. package/lib/esm/render/Decorations.d.ts +1 -0
  842. package/lib/esm/render/Decorations.d.ts.map +1 -1
  843. package/lib/esm/render/Decorations.js +1 -0
  844. package/lib/esm/render/Decorations.js.map +1 -1
  845. package/lib/esm/render/FeatureSymbology.d.ts +1 -0
  846. package/lib/esm/render/FeatureSymbology.d.ts.map +1 -1
  847. package/lib/esm/render/FeatureSymbology.js +1 -0
  848. package/lib/esm/render/FeatureSymbology.js.map +1 -1
  849. package/lib/esm/render/GraphicBranch.d.ts +2 -0
  850. package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
  851. package/lib/esm/render/GraphicBranch.js +1 -0
  852. package/lib/esm/render/GraphicBranch.js.map +1 -1
  853. package/lib/esm/render/GraphicBuilder.d.ts +33 -2
  854. package/lib/esm/render/GraphicBuilder.d.ts.map +1 -1
  855. package/lib/esm/render/GraphicBuilder.js +27 -1
  856. package/lib/esm/render/GraphicBuilder.js.map +1 -1
  857. package/lib/esm/render/GraphicPrimitive.d.ts +14 -0
  858. package/lib/esm/render/GraphicPrimitive.d.ts.map +1 -1
  859. package/lib/esm/render/GraphicPrimitive.js.map +1 -1
  860. package/lib/esm/render/ParticleCollectionBuilder.d.ts +3 -0
  861. package/lib/esm/render/ParticleCollectionBuilder.d.ts.map +1 -1
  862. package/lib/esm/render/ParticleCollectionBuilder.js.map +1 -1
  863. package/lib/esm/render/Pixel.d.ts +1 -0
  864. package/lib/esm/render/Pixel.d.ts.map +1 -1
  865. package/lib/esm/render/Pixel.js +1 -0
  866. package/lib/esm/render/Pixel.js.map +1 -1
  867. package/lib/esm/render/RenderClipVolume.d.ts +1 -0
  868. package/lib/esm/render/RenderClipVolume.d.ts.map +1 -1
  869. package/lib/esm/render/RenderClipVolume.js +1 -0
  870. package/lib/esm/render/RenderClipVolume.js.map +1 -1
  871. package/lib/esm/render/RenderGraphic.d.ts +3 -0
  872. package/lib/esm/render/RenderGraphic.d.ts.map +1 -1
  873. package/lib/esm/render/RenderGraphic.js +2 -0
  874. package/lib/esm/render/RenderGraphic.js.map +1 -1
  875. package/lib/esm/render/RenderSystem.d.ts +4 -3
  876. package/lib/esm/render/RenderSystem.d.ts.map +1 -1
  877. package/lib/esm/render/RenderSystem.js +4 -3
  878. package/lib/esm/render/RenderSystem.js.map +1 -1
  879. package/lib/esm/render/RenderTexture.d.ts +7 -0
  880. package/lib/esm/render/RenderTexture.d.ts.map +1 -1
  881. package/lib/esm/render/RenderTexture.js.map +1 -1
  882. package/lib/esm/render/Scene.d.ts +1 -0
  883. package/lib/esm/render/Scene.d.ts.map +1 -1
  884. package/lib/esm/render/Scene.js +1 -0
  885. package/lib/esm/render/Scene.js.map +1 -1
  886. package/lib/esm/render/ScreenSpaceEffectBuilder.d.ts +10 -0
  887. package/lib/esm/render/ScreenSpaceEffectBuilder.d.ts.map +1 -1
  888. package/lib/esm/render/ScreenSpaceEffectBuilder.js +2 -0
  889. package/lib/esm/render/ScreenSpaceEffectBuilder.js.map +1 -1
  890. package/lib/esm/render/primitives/VertexKey.d.ts +4 -2
  891. package/lib/esm/render/primitives/VertexKey.d.ts.map +1 -1
  892. package/lib/esm/render/primitives/VertexKey.js +24 -13
  893. package/lib/esm/render/primitives/VertexKey.js.map +1 -1
  894. package/lib/esm/render/primitives/VertexTable.d.ts +1 -1
  895. package/lib/esm/render/primitives/VertexTable.js +30 -2
  896. package/lib/esm/render/primitives/VertexTable.js.map +1 -1
  897. package/lib/esm/render/primitives/geometry/GeometryAccumulator.d.ts +12 -4
  898. package/lib/esm/render/primitives/geometry/GeometryAccumulator.d.ts.map +1 -1
  899. package/lib/esm/render/primitives/geometry/GeometryAccumulator.js +20 -15
  900. package/lib/esm/render/primitives/geometry/GeometryAccumulator.js.map +1 -1
  901. package/lib/esm/render/primitives/geometry/GeometryListBuilder.d.ts +2 -1
  902. package/lib/esm/render/primitives/geometry/GeometryListBuilder.d.ts.map +1 -1
  903. package/lib/esm/render/primitives/geometry/GeometryListBuilder.js +7 -2
  904. package/lib/esm/render/primitives/geometry/GeometryListBuilder.js.map +1 -1
  905. package/lib/esm/render/primitives/geometry/GeometryPrimitives.d.ts +14 -12
  906. package/lib/esm/render/primitives/geometry/GeometryPrimitives.d.ts.map +1 -1
  907. package/lib/esm/render/primitives/geometry/GeometryPrimitives.js +26 -25
  908. package/lib/esm/render/primitives/geometry/GeometryPrimitives.js.map +1 -1
  909. package/lib/esm/render/primitives/mesh/MeshBuilder.d.ts +8 -8
  910. package/lib/esm/render/primitives/mesh/MeshBuilder.d.ts.map +1 -1
  911. package/lib/esm/render/primitives/mesh/MeshBuilder.js +15 -15
  912. package/lib/esm/render/primitives/mesh/MeshBuilder.js.map +1 -1
  913. package/lib/esm/render/primitives/mesh/MeshBuilderMap.d.ts +11 -6
  914. package/lib/esm/render/primitives/mesh/MeshBuilderMap.d.ts.map +1 -1
  915. package/lib/esm/render/primitives/mesh/MeshBuilderMap.js +13 -16
  916. package/lib/esm/render/primitives/mesh/MeshBuilderMap.js.map +1 -1
  917. package/lib/esm/render/primitives/mesh/MeshPrimitives.d.ts +1 -1
  918. package/lib/esm/render/primitives/mesh/MeshPrimitives.d.ts.map +1 -1
  919. package/lib/esm/render/primitives/mesh/MeshPrimitives.js +6 -2
  920. package/lib/esm/render/primitives/mesh/MeshPrimitives.js.map +1 -1
  921. package/lib/esm/render/webgl/AttributeMap.js +1 -1
  922. package/lib/esm/render/webgl/CachedGeometry.d.ts +7 -1
  923. package/lib/esm/render/webgl/CachedGeometry.d.ts.map +1 -1
  924. package/lib/esm/render/webgl/CachedGeometry.js +19 -9
  925. package/lib/esm/render/webgl/CachedGeometry.js.map +1 -1
  926. package/lib/esm/render/webgl/DrawCommand.d.ts.map +1 -1
  927. package/lib/esm/render/webgl/DrawCommand.js +2 -1
  928. package/lib/esm/render/webgl/DrawCommand.js.map +1 -1
  929. package/lib/esm/render/webgl/InstancedGeometry.d.ts +1 -0
  930. package/lib/esm/render/webgl/InstancedGeometry.d.ts.map +1 -1
  931. package/lib/esm/render/webgl/InstancedGeometry.js +1 -0
  932. package/lib/esm/render/webgl/InstancedGeometry.js.map +1 -1
  933. package/lib/esm/render/webgl/RealityMesh.d.ts +14 -11
  934. package/lib/esm/render/webgl/RealityMesh.d.ts.map +1 -1
  935. package/lib/esm/render/webgl/RealityMesh.js +27 -18
  936. package/lib/esm/render/webgl/RealityMesh.js.map +1 -1
  937. package/lib/esm/render/webgl/SceneCompositor.d.ts +2 -0
  938. package/lib/esm/render/webgl/SceneCompositor.d.ts.map +1 -1
  939. package/lib/esm/render/webgl/SceneCompositor.js +220 -53
  940. package/lib/esm/render/webgl/SceneCompositor.js.map +1 -1
  941. package/lib/esm/render/webgl/ShaderBuilder.d.ts +5 -4
  942. package/lib/esm/render/webgl/ShaderBuilder.d.ts.map +1 -1
  943. package/lib/esm/render/webgl/ShaderBuilder.js +7 -6
  944. package/lib/esm/render/webgl/ShaderBuilder.js.map +1 -1
  945. package/lib/esm/render/webgl/System.d.ts +4 -4
  946. package/lib/esm/render/webgl/System.d.ts.map +1 -1
  947. package/lib/esm/render/webgl/System.js +6 -6
  948. package/lib/esm/render/webgl/System.js.map +1 -1
  949. package/lib/esm/render/webgl/Target.d.ts +6 -1
  950. package/lib/esm/render/webgl/Target.d.ts.map +1 -1
  951. package/lib/esm/render/webgl/Target.js +64 -13
  952. package/lib/esm/render/webgl/Target.js.map +1 -1
  953. package/lib/esm/render/webgl/Technique.d.ts +4 -2
  954. package/lib/esm/render/webgl/Technique.d.ts.map +1 -1
  955. package/lib/esm/render/webgl/Technique.js +166 -135
  956. package/lib/esm/render/webgl/Technique.js.map +1 -1
  957. package/lib/esm/render/webgl/TechniqueFlags.d.ts +7 -3
  958. package/lib/esm/render/webgl/TechniqueFlags.d.ts.map +1 -1
  959. package/lib/esm/render/webgl/TechniqueFlags.js +17 -4
  960. package/lib/esm/render/webgl/TechniqueFlags.js.map +1 -1
  961. package/lib/esm/render/webgl/TechniqueId.d.ts +8 -7
  962. package/lib/esm/render/webgl/TechniqueId.d.ts.map +1 -1
  963. package/lib/esm/render/webgl/TechniqueId.js.map +1 -1
  964. package/lib/esm/render/webgl/glsl/Animation.d.ts.map +1 -1
  965. package/lib/esm/render/webgl/glsl/Animation.js +2 -0
  966. package/lib/esm/render/webgl/glsl/Animation.js.map +1 -1
  967. package/lib/esm/render/webgl/glsl/Blur.d.ts +2 -1
  968. package/lib/esm/render/webgl/glsl/Blur.d.ts.map +1 -1
  969. package/lib/esm/render/webgl/glsl/Blur.js +38 -6
  970. package/lib/esm/render/webgl/glsl/Blur.js.map +1 -1
  971. package/lib/esm/render/webgl/glsl/Color.d.ts.map +1 -1
  972. package/lib/esm/render/webgl/glsl/Color.js +8 -7
  973. package/lib/esm/render/webgl/glsl/Color.js.map +1 -1
  974. package/lib/esm/render/webgl/glsl/CopyStencil.js +1 -1
  975. package/lib/esm/render/webgl/glsl/Decode.d.ts +2 -1
  976. package/lib/esm/render/webgl/glsl/Decode.d.ts.map +1 -1
  977. package/lib/esm/render/webgl/glsl/Decode.js +15 -1
  978. package/lib/esm/render/webgl/glsl/Decode.js.map +1 -1
  979. package/lib/esm/render/webgl/glsl/Edge.d.ts +2 -2
  980. package/lib/esm/render/webgl/glsl/Edge.d.ts.map +1 -1
  981. package/lib/esm/render/webgl/glsl/Edge.js +7 -20
  982. package/lib/esm/render/webgl/glsl/Edge.js.map +1 -1
  983. package/lib/esm/render/webgl/glsl/FeatureSymbology.d.ts.map +1 -1
  984. package/lib/esm/render/webgl/glsl/FeatureSymbology.js +1 -3
  985. package/lib/esm/render/webgl/glsl/FeatureSymbology.js.map +1 -1
  986. package/lib/esm/render/webgl/glsl/PointString.d.ts +3 -3
  987. package/lib/esm/render/webgl/glsl/PointString.d.ts.map +1 -1
  988. package/lib/esm/render/webgl/glsl/PointString.js +6 -6
  989. package/lib/esm/render/webgl/glsl/PointString.js.map +1 -1
  990. package/lib/esm/render/webgl/glsl/Polyline.d.ts +3 -3
  991. package/lib/esm/render/webgl/glsl/Polyline.d.ts.map +1 -1
  992. package/lib/esm/render/webgl/glsl/Polyline.js +7 -22
  993. package/lib/esm/render/webgl/glsl/Polyline.js.map +1 -1
  994. package/lib/esm/render/webgl/glsl/Surface.d.ts +2 -2
  995. package/lib/esm/render/webgl/glsl/Surface.d.ts.map +1 -1
  996. package/lib/esm/render/webgl/glsl/Surface.js +51 -35
  997. package/lib/esm/render/webgl/glsl/Surface.js.map +1 -1
  998. package/lib/esm/render/webgl/glsl/Vertex.d.ts +3 -3
  999. package/lib/esm/render/webgl/glsl/Vertex.d.ts.map +1 -1
  1000. package/lib/esm/render/webgl/glsl/Vertex.js +142 -56
  1001. package/lib/esm/render/webgl/glsl/Vertex.js.map +1 -1
  1002. package/lib/esm/tile/ClassifierTileTree.d.ts.map +1 -1
  1003. package/lib/esm/tile/ClassifierTileTree.js +3 -4
  1004. package/lib/esm/tile/ClassifierTileTree.js.map +1 -1
  1005. package/lib/esm/tile/DisclosedTileTreeSet.d.ts +2 -0
  1006. package/lib/esm/tile/DisclosedTileTreeSet.d.ts.map +1 -1
  1007. package/lib/esm/tile/DisclosedTileTreeSet.js +1 -0
  1008. package/lib/esm/tile/DisclosedTileTreeSet.js.map +1 -1
  1009. package/lib/esm/tile/DynamicIModelTile.js +4 -2
  1010. package/lib/esm/tile/DynamicIModelTile.js.map +1 -1
  1011. package/lib/esm/tile/GltfReader.d.ts +19 -9
  1012. package/lib/esm/tile/GltfReader.d.ts.map +1 -1
  1013. package/lib/esm/tile/GltfReader.js +23 -6
  1014. package/lib/esm/tile/GltfReader.js.map +1 -1
  1015. package/lib/esm/tile/IModelTile.js +1 -1
  1016. package/lib/esm/tile/IModelTile.js.map +1 -1
  1017. package/lib/esm/tile/IModelTileRequestChannels.d.ts +3 -3
  1018. package/lib/esm/tile/IModelTileRequestChannels.d.ts.map +1 -1
  1019. package/lib/esm/tile/IModelTileRequestChannels.js +7 -11
  1020. package/lib/esm/tile/IModelTileRequestChannels.js.map +1 -1
  1021. package/lib/esm/tile/IModelTileTree.d.ts +3 -3
  1022. package/lib/esm/tile/IModelTileTree.d.ts.map +1 -1
  1023. package/lib/esm/tile/IModelTileTree.js +1 -1
  1024. package/lib/esm/tile/IModelTileTree.js.map +1 -1
  1025. package/lib/esm/tile/ImdlReader.d.ts +2 -0
  1026. package/lib/esm/tile/ImdlReader.d.ts.map +1 -1
  1027. package/lib/esm/tile/ImdlReader.js +2 -0
  1028. package/lib/esm/tile/ImdlReader.js.map +1 -1
  1029. package/lib/esm/tile/OPCFormatInterpreter.d.ts.map +1 -1
  1030. package/lib/esm/tile/OPCFormatInterpreter.js +2 -3
  1031. package/lib/esm/tile/OPCFormatInterpreter.js.map +1 -1
  1032. package/lib/esm/tile/PrimaryTileTree.d.ts.map +1 -1
  1033. package/lib/esm/tile/PrimaryTileTree.js +5 -5
  1034. package/lib/esm/tile/PrimaryTileTree.js.map +1 -1
  1035. package/lib/esm/tile/RealityTileLoader.d.ts +1 -1
  1036. package/lib/esm/tile/RealityTileLoader.d.ts.map +1 -1
  1037. package/lib/esm/tile/RealityTileLoader.js +36 -8
  1038. package/lib/esm/tile/RealityTileLoader.js.map +1 -1
  1039. package/lib/esm/tile/Tile.d.ts +5 -0
  1040. package/lib/esm/tile/Tile.d.ts.map +1 -1
  1041. package/lib/esm/tile/Tile.js +5 -0
  1042. package/lib/esm/tile/Tile.js.map +1 -1
  1043. package/lib/esm/tile/TileAdmin.d.ts +18 -1
  1044. package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
  1045. package/lib/esm/tile/TileAdmin.js +27 -20
  1046. package/lib/esm/tile/TileAdmin.js.map +1 -1
  1047. package/lib/esm/tile/TileContent.d.ts +1 -0
  1048. package/lib/esm/tile/TileContent.d.ts.map +1 -1
  1049. package/lib/esm/tile/TileContent.js.map +1 -1
  1050. package/lib/esm/tile/TileDrawArgs.d.ts +2 -0
  1051. package/lib/esm/tile/TileDrawArgs.d.ts.map +1 -1
  1052. package/lib/esm/tile/TileDrawArgs.js +1 -0
  1053. package/lib/esm/tile/TileDrawArgs.js.map +1 -1
  1054. package/lib/esm/tile/TileParams.d.ts +1 -0
  1055. package/lib/esm/tile/TileParams.d.ts.map +1 -1
  1056. package/lib/esm/tile/TileParams.js.map +1 -1
  1057. package/lib/esm/tile/TileRequest.d.ts +1 -0
  1058. package/lib/esm/tile/TileRequest.d.ts.map +1 -1
  1059. package/lib/esm/tile/TileRequest.js +1 -0
  1060. package/lib/esm/tile/TileRequest.js.map +1 -1
  1061. package/lib/esm/tile/TileRequestChannel.d.ts +2 -0
  1062. package/lib/esm/tile/TileRequestChannel.d.ts.map +1 -1
  1063. package/lib/esm/tile/TileRequestChannel.js +2 -0
  1064. package/lib/esm/tile/TileRequestChannel.js.map +1 -1
  1065. package/lib/esm/tile/TileRequestChannels.d.ts +1 -4
  1066. package/lib/esm/tile/TileRequestChannels.d.ts.map +1 -1
  1067. package/lib/esm/tile/TileRequestChannels.js +2 -6
  1068. package/lib/esm/tile/TileRequestChannels.js.map +1 -1
  1069. package/lib/esm/tile/TileTree.d.ts +2 -0
  1070. package/lib/esm/tile/TileTree.d.ts.map +1 -1
  1071. package/lib/esm/tile/TileTree.js +2 -0
  1072. package/lib/esm/tile/TileTree.js.map +1 -1
  1073. package/lib/esm/tile/TileTreeOwner.d.ts +1 -0
  1074. package/lib/esm/tile/TileTreeOwner.d.ts.map +1 -1
  1075. package/lib/esm/tile/TileTreeOwner.js.map +1 -1
  1076. package/lib/esm/tile/TileTreeParams.d.ts +1 -0
  1077. package/lib/esm/tile/TileTreeParams.d.ts.map +1 -1
  1078. package/lib/esm/tile/TileTreeParams.js.map +1 -1
  1079. package/lib/esm/tile/TileTreeReference.d.ts +2 -0
  1080. package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
  1081. package/lib/esm/tile/TileTreeReference.js +2 -0
  1082. package/lib/esm/tile/TileTreeReference.js.map +1 -1
  1083. package/lib/esm/tile/TileTreeSupplier.d.ts +1 -0
  1084. package/lib/esm/tile/TileTreeSupplier.d.ts.map +1 -1
  1085. package/lib/esm/tile/TileTreeSupplier.js.map +1 -1
  1086. package/lib/esm/tile/TileUsageMarker.d.ts +1 -0
  1087. package/lib/esm/tile/TileUsageMarker.d.ts.map +1 -1
  1088. package/lib/esm/tile/TileUsageMarker.js +1 -0
  1089. package/lib/esm/tile/TileUsageMarker.js.map +1 -1
  1090. package/lib/esm/tile/TiledGraphicsProvider.d.ts +1 -0
  1091. package/lib/esm/tile/TiledGraphicsProvider.d.ts.map +1 -1
  1092. package/lib/esm/tile/TiledGraphicsProvider.js.map +1 -1
  1093. package/lib/esm/tile/internal.d.ts +0 -2
  1094. package/lib/esm/tile/internal.d.ts.map +1 -1
  1095. package/lib/esm/tile/internal.js +0 -2
  1096. package/lib/esm/tile/internal.js.map +1 -1
  1097. package/lib/esm/tile/map/ArcGisUtilities.d.ts +2 -1
  1098. package/lib/esm/tile/map/ArcGisUtilities.d.ts.map +1 -1
  1099. package/lib/esm/tile/map/ArcGisUtilities.js +32 -21
  1100. package/lib/esm/tile/map/ArcGisUtilities.js.map +1 -1
  1101. package/lib/esm/tile/map/BingElevation.d.ts +1 -0
  1102. package/lib/esm/tile/map/BingElevation.d.ts.map +1 -1
  1103. package/lib/esm/tile/map/BingElevation.js +1 -0
  1104. package/lib/esm/tile/map/BingElevation.js.map +1 -1
  1105. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +2 -1
  1106. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  1107. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +51 -28
  1108. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  1109. package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts +0 -1
  1110. package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.d.ts.map +1 -1
  1111. package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js +12 -10
  1112. package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
  1113. package/lib/esm/tile/map/MapLayerAuthentication.d.ts +20 -9
  1114. package/lib/esm/tile/map/MapLayerAuthentication.d.ts.map +1 -1
  1115. package/lib/esm/tile/map/MapLayerAuthentication.js +1 -7
  1116. package/lib/esm/tile/map/MapLayerAuthentication.js.map +1 -1
  1117. package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +24 -6
  1118. package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
  1119. package/lib/esm/tile/map/MapLayerFormatRegistry.js +28 -7
  1120. package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
  1121. package/lib/esm/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
  1122. package/lib/esm/tile/map/MapLayerImageryFormats.js +2 -4
  1123. package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
  1124. package/lib/esm/tile/map/MapLayerSources.d.ts +1 -1
  1125. package/lib/esm/tile/map/MapLayerSources.d.ts.map +1 -1
  1126. package/lib/esm/tile/map/MapLayerSources.js +1 -1
  1127. package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
  1128. package/lib/esm/tile/map/MapTile.js +2 -2
  1129. package/lib/esm/tile/map/MapTile.js.map +1 -1
  1130. package/lib/esm/tile/map/MapTileLoader.js +1 -1
  1131. package/lib/esm/tile/map/MapTileLoader.js.map +1 -1
  1132. package/lib/esm/tile/map/MapTileTree.js +2 -2
  1133. package/lib/esm/tile/map/MapTileTree.js.map +1 -1
  1134. package/lib/esm/tile/map/WmsCapabilities.d.ts +3 -2
  1135. package/lib/esm/tile/map/WmsCapabilities.d.ts.map +1 -1
  1136. package/lib/esm/tile/map/WmsCapabilities.js +11 -10
  1137. package/lib/esm/tile/map/WmsCapabilities.js.map +1 -1
  1138. package/lib/esm/tools/ClipViewTool.d.ts +5 -3
  1139. package/lib/esm/tools/ClipViewTool.d.ts.map +1 -1
  1140. package/lib/esm/tools/ClipViewTool.js +4 -3
  1141. package/lib/esm/tools/ClipViewTool.js.map +1 -1
  1142. package/lib/esm/tools/EditManipulator.d.ts +1 -0
  1143. package/lib/esm/tools/EditManipulator.d.ts.map +1 -1
  1144. package/lib/esm/tools/EditManipulator.js +1 -0
  1145. package/lib/esm/tools/EditManipulator.js.map +1 -1
  1146. package/lib/esm/tools/EventController.d.ts +1 -0
  1147. package/lib/esm/tools/EventController.d.ts.map +1 -1
  1148. package/lib/esm/tools/EventController.js +1 -0
  1149. package/lib/esm/tools/EventController.js.map +1 -1
  1150. package/lib/esm/tools/PrimitiveTool.d.ts +4 -0
  1151. package/lib/esm/tools/PrimitiveTool.d.ts.map +1 -1
  1152. package/lib/esm/tools/PrimitiveTool.js +7 -0
  1153. package/lib/esm/tools/PrimitiveTool.js.map +1 -1
  1154. package/lib/esm/tools/SelectTool.d.ts +3 -0
  1155. package/lib/esm/tools/SelectTool.d.ts.map +1 -1
  1156. package/lib/esm/tools/SelectTool.js +3 -0
  1157. package/lib/esm/tools/SelectTool.js.map +1 -1
  1158. package/lib/esm/tools/Tool.d.ts +41 -6
  1159. package/lib/esm/tools/Tool.d.ts.map +1 -1
  1160. package/lib/esm/tools/Tool.js +27 -4
  1161. package/lib/esm/tools/Tool.js.map +1 -1
  1162. package/lib/esm/tools/ToolAdmin.d.ts +16 -22
  1163. package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
  1164. package/lib/esm/tools/ToolAdmin.js +48 -9
  1165. package/lib/esm/tools/ToolAdmin.js.map +1 -1
  1166. package/lib/esm/tools/ToolAssistance.d.ts +7 -0
  1167. package/lib/esm/tools/ToolAssistance.d.ts.map +1 -1
  1168. package/lib/esm/tools/ToolAssistance.js +3 -0
  1169. package/lib/esm/tools/ToolAssistance.js.map +1 -1
  1170. package/lib/esm/tools/ToolSettings.d.ts +3 -0
  1171. package/lib/esm/tools/ToolSettings.d.ts.map +1 -1
  1172. package/lib/esm/tools/ToolSettings.js +3 -0
  1173. package/lib/esm/tools/ToolSettings.js.map +1 -1
  1174. package/lib/esm/tools/ViewTool.d.ts +3 -1
  1175. package/lib/esm/tools/ViewTool.d.ts.map +1 -1
  1176. package/lib/esm/tools/ViewTool.js +9 -5
  1177. package/lib/esm/tools/ViewTool.js.map +1 -1
  1178. package/package.json +34 -25
  1179. package/lib/cjs/TwoWayViewportSync.d.ts +0 -51
  1180. package/lib/cjs/TwoWayViewportSync.d.ts.map +0 -1
  1181. package/lib/cjs/TwoWayViewportSync.js +0 -87
  1182. package/lib/cjs/TwoWayViewportSync.js.map +0 -1
  1183. package/lib/cjs/extension/ExtensionLoader.d.ts +0 -26
  1184. package/lib/cjs/extension/ExtensionLoader.d.ts.map +0 -1
  1185. package/lib/cjs/extension/ExtensionLoader.js +0 -10
  1186. package/lib/cjs/extension/ExtensionLoader.js.map +0 -1
  1187. package/lib/cjs/extension/extensions.d.ts +0 -19
  1188. package/lib/cjs/extension/extensions.d.ts.map +0 -1
  1189. package/lib/cjs/extension/extensions.js +0 -36
  1190. package/lib/cjs/extension/extensions.js.map +0 -1
  1191. package/lib/cjs/tile/map/ArcGisTokenGenerator.d.ts +0 -35
  1192. package/lib/cjs/tile/map/ArcGisTokenGenerator.d.ts.map +0 -1
  1193. package/lib/cjs/tile/map/ArcGisTokenGenerator.js +0 -116
  1194. package/lib/cjs/tile/map/ArcGisTokenGenerator.js.map +0 -1
  1195. package/lib/cjs/tile/map/ArcGisTokenManager.d.ts +0 -13
  1196. package/lib/cjs/tile/map/ArcGisTokenManager.d.ts.map +0 -1
  1197. package/lib/cjs/tile/map/ArcGisTokenManager.js +0 -39
  1198. package/lib/cjs/tile/map/ArcGisTokenManager.js.map +0 -1
  1199. package/lib/esm/TwoWayViewportSync.d.ts +0 -51
  1200. package/lib/esm/TwoWayViewportSync.d.ts.map +0 -1
  1201. package/lib/esm/TwoWayViewportSync.js +0 -82
  1202. package/lib/esm/TwoWayViewportSync.js.map +0 -1
  1203. package/lib/esm/extension/ExtensionLoader.d.ts +0 -26
  1204. package/lib/esm/extension/ExtensionLoader.d.ts.map +0 -1
  1205. package/lib/esm/extension/ExtensionLoader.js +0 -9
  1206. package/lib/esm/extension/ExtensionLoader.js.map +0 -1
  1207. package/lib/esm/extension/extensions.d.ts +0 -19
  1208. package/lib/esm/extension/extensions.d.ts.map +0 -1
  1209. package/lib/esm/extension/extensions.js +0 -24
  1210. package/lib/esm/extension/extensions.js.map +0 -1
  1211. package/lib/esm/tile/map/ArcGisTokenGenerator.d.ts +0 -35
  1212. package/lib/esm/tile/map/ArcGisTokenGenerator.d.ts.map +0 -1
  1213. package/lib/esm/tile/map/ArcGisTokenGenerator.js +0 -112
  1214. package/lib/esm/tile/map/ArcGisTokenGenerator.js.map +0 -1
  1215. package/lib/esm/tile/map/ArcGisTokenManager.d.ts +0 -13
  1216. package/lib/esm/tile/map/ArcGisTokenManager.d.ts.map +0 -1
  1217. package/lib/esm/tile/map/ArcGisTokenManager.js +0 -35
  1218. package/lib/esm/tile/map/ArcGisTokenManager.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicBuilder.js","sourceRoot":"","sources":["../../../src/render/GraphicBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAE8B;AAC9B,oDAAsG;AAMtG;;;;;;;GAOG;AACH,IAAY,WAkDX;AAlDD,WAAY,WAAW;IACrB;;;;;;;OAOG;IACH,iEAAc,CAAA;IACd,qEAAqE;IACrE;;;;;;OAMG;IACH,+CAAK,CAAA;IACL,8GAA8G;IAC9G;;;;;;OAMG;IACH,mEAAe,CAAA;IACf;;;;;;;;;;OAUG;IACH,6DAAY,CAAA;IACZ;;;;;;;;OAQG;IACH,2DAAW,CAAA;AACb,CAAC,EAlDW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkDtB;AAgID;;;;;;;;;;;;;GAaG;AACH,MAAsB,cAAc;IAuClC,gBAAgB;IA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I,IAAI,CAAC,qBAAqB,CAAC,2BAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CACvH;AArTD,wCAqTC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AnyCurvePrimitive, Arc3d, Loop, Path, Point2d, Point3d, Polyface, Range3d, SolidPrimitive, Transform,\r\n} from \"@itwin/core-geometry\";\r\nimport { AnalysisStyle, ColorDef, Frustum, GraphicParams, LinePixels, Npc } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicPrimitive } from \"./GraphicPrimitive\";\r\n\r\n/**\r\n * Describes the type of a [[GraphicBuilder]], which defines the coordinate system in which the builder's geometry is defined and\r\n * controls the behavior of the [[RenderGraphic]] produced by the builder.\r\n * @note For those types for which depth-testing is disabled, the order in which the individual geometric primitives are drawn determines which geometry draws on top of other geometry.\r\n * - Within a [[GraphicList]], each [[RenderGraphic]] is rendered in the order in which it appears in the list; and\r\n * - Within a single [[RenderGraphic]], each geometric primitive is rendered in the ordered in which it was added to the GraphicBuilder.\r\n * @public\r\n */\r\nexport enum GraphicType {\r\n /**\r\n * Renders behind all other graphics. For example, the border of a [[SheetViewState]] is of this type.\r\n * Coordinates: [[CoordSystem.View]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]].\r\n * Lighting: none.\r\n * Depth-testing: disabled.\r\n * @see [[Decorations.viewBackground]]\r\n */\r\n ViewBackground,\r\n /** Used for the scene itself, dynamics, and 'normal' decorations. */\r\n /**\r\n * Renders as if it were part of the scene. All of the [[ViewFlags]] applied to the view's normal geometry also applies to these types of decorations.\r\n * Coordinates: [[CoordSystem.World]].\r\n * Lighting and [[RenderMode]]: from view.\r\n * Depth-testing: enabled.\r\n * @see [[Decorations.normal]].\r\n */\r\n Scene,\r\n /** Renders within the scene. Coordinates: world. RenderMode: smooth. Lighting: default. Z-testing: enabled */\r\n /** Renders within the scene, but ignores the view's [[ViewFlags]].\r\n * Coordinates: [[CoordSystem.World]].\r\n * Lighting: default.\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]].\r\n * Depth-testing: enabled.\r\n * @see [[Decorations.world]].\r\n */\r\n WorldDecoration,\r\n /**\r\n * Renders as an overlay on top of the scene. These decorations differ from [[GraphicType.WorldDecoration]] only in that depth-testing is disabled.\r\n * For example, the ACS triad and [[WindowAreaTool]] decorations are of this type.\r\n * Coordinates: [[CoordSystem.World]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]]\r\n * Lighting: default.\r\n * Depth-testing: disabled.\r\n * Renders atop the scene. Coordinates: world. RenderMode: smooth. Lighting: none. Z-testing: disabled\r\n * @note Overlay decorations typically employ some degree of transparency to ensure that they do not fully obscure the scene.\r\n * @see [[Decorations.worldOverlay]]\r\n */\r\n WorldOverlay,\r\n /**\r\n * Renders as an overlay on top of the scene. These decorations differ from [[GraphicType.WorldOverlay]] only in that their geometry is defined in view coordinates rather than world.\r\n * Coordinates: [[CoordSystem.View]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]]\r\n * Lighting: default.\r\n * Depth-testing: disabled.\r\n * @note For more flexibility in defining view overlay decorations, consider using a [[CanvasDecorationList]].\r\n * @see [[Decorations.viewOverlay]]\r\n */\r\n ViewOverlay,\r\n}\r\n\r\n/** Options used when constructing a `Batch` - that is, a [[RenderGraphic]] with an associated [FeatureTable]($common) describing individual [Feature]($common)s within the\r\n * graphic. Individual features can be resymbolized in a variety of ways including flashing and hiliting.\r\n * For example, to prevent graphics produced by [[readElementGraphics]] from being hilited when their corresponding element is in the [[SelectionSet]],\r\n * pass `{ noHilite: true }` to [[readElementGraphics]].\r\n * @public\r\n */\r\nexport interface BatchOptions {\r\n /** Identifies the [[Tile]] associated with the batch, chiefly for debugging purposes.\r\n * @beta\r\n */\r\n tileId?: string;\r\n /** If true, features within the batch will not be flashed on mouseover. */\r\n noFlash?: boolean;\r\n /** If true, features within the batch will not be hilited when their corresponding element is in the [[SelectionSet]]. */\r\n noHilite?: boolean;\r\n /** If true, features within the batch will not be emphasized when the corresponding [[Feature]] is emphasized using [FeatureOverrides]($common). */\r\n noEmphasis?: boolean;\r\n /** If true, the contents of the batch will only be drawn by [[Viewport.readPixels]], not [[Viewport.renderFrame]], causing them to be locatable but invisible. */\r\n locateOnly?: boolean;\r\n}\r\n\r\n/** Options used as part of [[GraphicBuilderOptions]] to describe a [pickable]($docs/learning/frontend/ViewDecorations#pickable-view-graphic-decorations) [[RenderGraphic]].\r\n * @public\r\n */\r\nexport interface PickableGraphicOptions extends BatchOptions {\r\n /** Unique identifier for the graphic.\r\n * @see [[IModelConnection.transientIds]] to obtain a unique Id in the context of an iModel.\r\n */\r\n id: Id64String;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] used by functions like [[DecorateContext.createGraphic]] and [[RenderSystem.createGraphic]].\r\n * @see [[ViewportGraphicBuilderOptions]] to create a graphic builder for a [[Viewport]].\r\n * @see [[CustomGraphicBuilderOptions]] to create a graphic builder unassociated with any [[Viewport]].\r\n * @public\r\n */\r\nexport interface GraphicBuilderOptions {\r\n /** The type of graphic to produce. */\r\n type: GraphicType;\r\n\r\n /** The local-to-world transform in which the builder's geometry is to be defined - by default, an identity transform. */\r\n placement?: Transform;\r\n\r\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\r\n pickable?: PickableGraphicOptions;\r\n\r\n /** If true, the order in which geometry is added to the builder is preserved.\r\n * This is useful for overlay and background graphics because they draw without using the depth buffer. For example, to draw an overlay containing a red shape with a white outline,\r\n * you would add the shape to the GraphicBuilder first, followed by the outline, to ensure the outline draws \"in front of\" the shape.\r\n * It defaults to true for overlays and background graphics, and false for other graphic types.\r\n * It is not useful for other types of graphics and imposes a performance penalty due to increased number of draw calls.\r\n * For overlay and background graphics that do not need to draw in any particular order, the performance penalty can be eliminated by setting this to `false`.\r\n */\r\n preserveOrder?: boolean;\r\n\r\n /** Controls whether normals are generated for surfaces. Normals allow 3d geometry to receive lighting; without them the geometry will be unaffected by lighting.\r\n * By default, normals are generated only for graphics of type [[GraphicType.Scene]]; or for any type of graphic if [[GraphicBuilder.wantEdges]] is true, because\r\n * normals are required to prevent z-fighting between surfaces and their edges. This default can be overridden by explicitly specifying `true` or `false`.\r\n * @see [[GraphicType]] for a description of whether and how different types of graphics are affected by lighting.\r\n */\r\n wantNormals?: boolean;\r\n\r\n /** Controls whether edges are generated for surfaces.\r\n * Edges are only displayed if [ViewFlags.renderMode]($common) is not [RenderMode.SmoothShade]($common) or [ViewFlags.visibleEdges]($common) is `true`.\r\n * Since all decoration graphics except [[GraphicType.Scene]] are drawn in smooth shaded mode with no visible edges, by default edges are only produced for scene graphics, and\r\n * - if a [[Viewport]] is supplied with the options - only if [ViewFlags.edgesRequired]($common) is true for the viewport.\r\n * That default can be overridden by explicitly specifying `true` or `false`. This can be useful for non-scene decorations contained in a [[GraphicBranch]] that applies [ViewFlagOverrides]($common)\r\n * that change the edge display settings; or for scene decorations that might be cached for reuse after the viewport's edge settings are changed.\r\n * @note Edges will tend to z-fight with their surfaces unless the graphic is [[pickable]].\r\n */\r\n generateEdges?: boolean;\r\n\r\n /** If defined, specifies a point about which the graphic will rotate such that it always faces the viewer.\r\n * This can be particular useful for planar regions to create a billboarding effect - e.g., to implement [[Marker]]-like WebGL decorations.\r\n * The graphic's [[placement]] transform is not applied to the point.\r\n * @note This has no effect for graphics displayed in a 2d view.\r\n */\r\n viewIndependentOrigin?: Point3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] to be displayed in a specific [[Viewport]].\r\n * The level of detail of the graphic will be computed from the position of its geometry within the viewport's [Frustum]($common).\r\n * Default values for [[GraphicBuilderOptions.wantNormals]] and [[GraphicBuilderOptions.generateEdges]] will be determined by the viewport's [ViewFlags]($common).\r\n * The [[GraphicBuilder.iModel]] will be set to the viewport's [[IModelConnection]].\r\n * @public\r\n */\r\nexport interface ViewportGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** The viewport in which the resultant [[RenderGraphic]] is to be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, [[ViewState.getAspectRatioSkew]] will be taken into account when computing the level of detail for the produced graphics. */\r\n applyAspectRatioSkew?: boolean;\r\n\r\n iModel?: never;\r\n computeChordTolerance?: never;\r\n}\r\n\r\n/** Arguments used to compute the chord tolerance (level of detail) of the [[RenderGraphic]]s produced by a [[GraphicBuilder]].\r\n * Generally, the chord tolerance should be roughly equivalent to the size in meters of one pixel on screen where the graphic is to be displayed.\r\n * For [[GraphicType.ViewOverlay]] and [[GraphicType.ViewBackground]], which already define their geometry in pixels, the chord tolerance should typically be 1.\r\n * @see [[CustomGraphicBuilderOptions.computeChordTolerance]].\r\n * @public\r\n */\r\nexport interface ComputeChordToleranceArgs {\r\n /** The graphic builder being used to produce the graphics. */\r\n readonly graphic: GraphicBuilder;\r\n /** A function that computes a range enclosing all of the geometry that was added to the builder. */\r\n readonly computeRange: () => Range3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] that is not associated with any particular [[Viewport]] and may not be associated with\r\n * any particular [[IModelConnection]].\r\n * This is primarily useful when the same graphic is to be saved and reused for display in multiple viewports and for which a chord tolerance can be computed\r\n * independently of each viewport's [Frustum]($common).\r\n * @public\r\n */\r\nexport interface CustomGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** Optionally, the IModelConnection with which the graphic is associated. */\r\n iModel?: IModelConnection;\r\n /** A function that can compute the level of detail for the graphics produced by the builder. */\r\n computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n\r\n applyAspectRatioSkew?: never;\r\n viewport?: never;\r\n}\r\n\r\n/** Provides methods for constructing a [[RenderGraphic]] from geometric primitives.\r\n * GraphicBuilder is primarily used for creating [[Decorations]] to be displayed inside a [[Viewport]].\r\n *\r\n * The typical process for constructing a [[RenderGraphic]] proceeds as follows:\r\n * 1. Use [[DecorateContext.createGraphic]] or [[RenderSystem.createGraphic]] to obtain a builder.\r\n * 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].\r\n * 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.\r\n * 4. Use [[GraphicBuilder.finish]] to produce the finished [[RenderGraphic]].\r\n *\r\n * @note Most of the methods which add geometry to the builder take ownership of their inputs rather than cloning them.\r\n * So, for example, if you pass an array of points to addLineString(), you should not subsequently modify that array.\r\n *\r\n * @public\r\n */\r\nexport abstract class GraphicBuilder {\r\n /** The local coordinate system transform applied to this builder's geometry.\r\n * @see [[GraphicBuilderOptions.placement]].\r\n */\r\n public readonly placement: Transform;\r\n\r\n /** The iModel associated with this builder, if any. */\r\n public readonly iModel?: IModelConnection;\r\n\r\n /** The type of graphic to be produced by this builder.\r\n * @see [[GraphicBuilderOptions.type]].\r\n */\r\n public readonly type: GraphicType;\r\n\r\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\r\n public readonly pickable?: Readonly<PickableGraphicOptions>;\r\n\r\n /** If true, the order in which geometry is added to the builder is preserved.\r\n * @see [[GraphicBuilderOptions.preserveOrder]] for more details.\r\n */\r\n public readonly preserveOrder: boolean;\r\n\r\n /** Controls whether normals are generated for surfaces.\r\n * @note Normals are required for proper edge display, so by default they are always produced if [[wantEdges]] is `true`.\r\n * @see [[GraphicBuilderOptions.wantNormals]] for more details.\r\n */\r\n public readonly wantNormals: boolean;\r\n\r\n /** Controls whether edges are generated for surfaces.\r\n * @see [[GraphicBuilderOptions.generateEdges]] for more details.\r\n */\r\n public readonly wantEdges: boolean;\r\n\r\n /** @alpha */\r\n public readonly analysisStyle?: AnalysisStyle;\r\n\r\n protected readonly _computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n protected readonly _options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions;\r\n\r\n /** @internal */\r\n protected constructor(options: ViewportGraphicBuilderOptions | CustomGraphicBuilderOptions) {\r\n // Stored for potential use later in creating a new GraphicBuilder from this one (see PrimitiveBuilder.finishGraphic).\r\n this._options = options;\r\n\r\n const vp = options.viewport;\r\n this.placement = options.placement ?? Transform.createIdentity();\r\n this.iModel = vp?.iModel ?? options.iModel;\r\n this.type = options.type;\r\n this.pickable = options.pickable;\r\n this.wantEdges = options.generateEdges ?? (this.type === GraphicType.Scene && (!vp || vp.viewFlags.edgesRequired()));\r\n this.wantNormals = options.wantNormals ?? (this.wantEdges || this.type === GraphicType.Scene);\r\n this.preserveOrder = options.preserveOrder ?? (this.isOverlay || this.isViewBackground);\r\n\r\n if (!options.viewport) {\r\n this._computeChordTolerance = options.computeChordTolerance;\r\n return;\r\n }\r\n\r\n this.analysisStyle = options.viewport.displayStyle.settings.analysisStyle;\r\n\r\n this._computeChordTolerance = (args: ComputeChordToleranceArgs) => {\r\n let pixelSize = 1;\r\n if (!this.isViewCoordinates) {\r\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\r\n pixelSize = options.viewport.getPixelSizeAtPoint(args.computeRange().center);\r\n pixelSize = options.viewport.target.adjustPixelSizeForLOD(pixelSize);\r\n\r\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\r\n const skew = options.applyAspectRatioSkew ? options.viewport.view.getAspectRatioSkew() : 0;\r\n if (skew > 1)\r\n pixelSize /= skew;\r\n }\r\n\r\n return pixelSize * 0.25;\r\n };\r\n }\r\n\r\n /** The Id to be associated with the graphic for picking.\r\n * @see [[GraphicBuilderOptions.pickable]] for more options.\r\n */\r\n public get pickId(): Id64String | undefined {\r\n return this.pickable?.id;\r\n }\r\n\r\n /** Whether the builder's geometry is defined in [[CoordSystem.View]] coordinates.\r\n * @see [[isWorldCoordinates]].\r\n */\r\n public get isViewCoordinates(): boolean {\r\n return this.type === GraphicType.ViewBackground || this.type === GraphicType.ViewOverlay;\r\n }\r\n\r\n /** Whether the builder's geometry is defined in [[CoordSystem.World]] coordinates.\r\n * @see [[isViewCoordinates]].\r\n */\r\n public get isWorldCoordinates(): boolean {\r\n return !this.isViewCoordinates;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.Scene]]. */\r\n public get isSceneGraphic(): boolean {\r\n return this.type === GraphicType.Scene;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.ViewBackground]]. */\r\n public get isViewBackground(): boolean {\r\n return this.type === GraphicType.ViewBackground;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.WorldOverlay]] or [[GraphicType.ViewOerlay]]. */\r\n public get isOverlay(): boolean {\r\n return this.type === GraphicType.ViewOverlay || this.type === GraphicType.WorldOverlay;\r\n }\r\n\r\n /**\r\n * Processes the accumulated symbology and geometry to produce a renderable graphic.\r\n * This function can only be called once; after the [[RenderGraphic]] has been extracted the [[GraphicBuilder]] should no longer be used.\r\n */\r\n public abstract finish(): RenderGraphic;\r\n\r\n /** Sets the current active symbology for this builder. Any new geometry subsequently added to the builder will be drawn using the specified symbology.\r\n * @param graphicParams The symbology to apply to subsequent geometry.\r\n * @see [[GraphicBuilder.setSymbology]] for a convenient way to set common symbology options.\r\n */\r\n public abstract activateGraphicParams(graphicParams: GraphicParams): void;\r\n\r\n /**\r\n * Appends a 3d line string to the builder.\r\n * @param points Array of vertices in the line string.\r\n */\r\n public abstract addLineString(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a 2d line string to the builder.\r\n * @param points Array of vertices in the line string.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addLineString2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a 3d point string to the builder. The points are drawn disconnected, with a diameter in pixels defined by the builder's active [[GraphicParams.rasterWidth]].\r\n * @param points Array of vertices in the point string.\r\n */\r\n public abstract addPointString(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a 2d point string to the builder. The points are drawn disconnected, with a diameter in pixels defined by the builder's active [[GraphicParams.rasterWidth]].\r\n * @param points Array of vertices in the point string.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addPointString2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a closed 3d planar region to the builder.\r\n * @param points Array of vertices of the shape.\r\n */\r\n public abstract addShape(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a closed 2d region to the builder.\r\n * @param points Array of vertices of the shape.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addShape2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a 3d open arc or closed ellipse to the builder.\r\n * @param arc Description of the arc or ellipse.\r\n * @param isEllipse If true, and if the arc defines a full sweep, then draw as a closed ellipse instead of an arc.\r\n * @param filled If true, and isEllipse is also true, then draw ellipse filled.\r\n */\r\n public abstract addArc(arc: Arc3d, isEllipse: boolean, filled: boolean): void;\r\n\r\n /**\r\n * Appends a 2d open arc or closed ellipse to the builder.\r\n * @param arc Description of the arc or ellipse.\r\n * @param isEllipse If true, and if the arc defines a full sweep, then draw as a closed ellipse instead of an arc.\r\n * @param filled If true, and isEllipse is also true, then draw ellipse filled.\r\n * @param zDepth Z value in local coordinates to use for each point in the arc or ellipse.\r\n */\r\n public abstract addArc2d(ellipse: Arc3d, isEllipse: boolean, filled: boolean, zDepth: number): void;\r\n\r\n /** Append a 3d open path to the builder. */\r\n public abstract addPath(path: Path): void;\r\n\r\n /** Append a 3d planar region to the builder. */\r\n public abstract addLoop(loop: Loop): void;\r\n\r\n /** Append a [CurvePrimitive]($core-geometry) to the builder. */\r\n public addCurvePrimitive(curve: AnyCurvePrimitive): void {\r\n switch (curve.curvePrimitiveType) {\r\n case \"lineString\":\r\n this.addLineString(curve.points);\r\n break;\r\n case \"lineSegment\":\r\n this.addLineString([curve.startPoint(), curve.endPoint()]);\r\n break;\r\n case \"arc\":\r\n this.addArc(curve, false, false);\r\n break;\r\n default:\r\n const path = new Path();\r\n if (path.tryAddChild(curve))\r\n this.addPath(path);\r\n\r\n break;\r\n }\r\n }\r\n\r\n /** Append a mesh to the builder.\r\n * @param meshData Describes the mesh\r\n * @param filled If the mesh describes a planar region, indicates whether its interior area should be drawn with fill in [[RenderMode.Wireframe]].\r\n */\r\n public abstract addPolyface(meshData: Polyface, filled: boolean): void;\r\n\r\n /** Append a solid primitive to the builder. */\r\n public abstract addSolidPrimitive(solidPrimitive: SolidPrimitive): void;\r\n\r\n /** Append any primitive to the builder.\r\n * @param primitive The graphic primitive to append.\r\n */\r\n public addPrimitive(primitive: GraphicPrimitive): void {\r\n switch (primitive.type) {\r\n case \"linestring\":\r\n this.addLineString(primitive.points);\r\n break;\r\n case \"linestring2d\":\r\n this.addLineString2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"pointstring\":\r\n this.addPointString(primitive.points);\r\n break;\r\n case \"pointstring2d\":\r\n this.addPointString2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"shape\":\r\n this.addShape(primitive.points);\r\n break;\r\n case \"shape2d\":\r\n this.addShape2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"arc\":\r\n this.addArc(primitive.arc, true === primitive.isEllipse, true === primitive.filled);\r\n break;\r\n case \"arc2d\":\r\n this.addArc2d(primitive.arc, true === primitive.isEllipse, true === primitive.filled, primitive.zDepth);\r\n break;\r\n case \"path\":\r\n this.addPath(primitive.path);\r\n break;\r\n case \"loop\":\r\n this.addLoop(primitive.loop);\r\n break;\r\n case \"polyface\":\r\n this.addPolyface(primitive.polyface, true === primitive.filled);\r\n break;\r\n case \"solidPrimitive\":\r\n this.addSolidPrimitive(primitive.solidPrimitive);\r\n break;\r\n }\r\n }\r\n\r\n /** Add Range3d edges. Useful for debugging. */\r\n public addRangeBox(range: Range3d) {\r\n this.addFrustum(Frustum.fromRange(range));\r\n }\r\n\r\n /** Add Frustum edges. Useful for debugging. */\r\n public addFrustum(frustum: Frustum) {\r\n this.addRangeBoxFromCorners(frustum.points);\r\n }\r\n\r\n /** Add range edges from corner points */\r\n public addRangeBoxFromCorners(p: Point3d[]) {\r\n this.addLineString([\r\n p[Npc.LeftBottomFront],\r\n p[Npc.LeftTopFront],\r\n p[Npc.RightTopFront],\r\n p[Npc.RightBottomFront],\r\n p[Npc.RightBottomRear],\r\n p[Npc.RightTopRear],\r\n p[Npc.LeftTopRear],\r\n p[Npc.LeftBottomRear],\r\n p[Npc.LeftBottomFront].clone(),\r\n p[Npc.RightBottomFront].clone(),\r\n ]);\r\n\r\n this.addLineString([p[Npc.LeftTopFront].clone(), p[Npc.LeftTopRear].clone()]);\r\n this.addLineString([p[Npc.RightTopFront].clone(), p[Npc.RightTopRear].clone()]);\r\n this.addLineString([p[Npc.LeftBottomRear].clone(), p[Npc.RightBottomRear].clone()]);\r\n }\r\n\r\n /** Sets the current active symbology for this builder. Any new geometry subsequently added will be drawn using the specified symbology.\r\n * @param lineColor The color in which to draw lines.\r\n * @param fillColor The color in which to draw filled regions.\r\n * @param lineWidth The width in pixels to draw lines. The renderer will clamp this value to an integer in the range [1, 32].\r\n * @param linePixels The pixel pattern in which to draw lines.\r\n * @see [[GraphicBuilder.activateGraphicParams]] for additional symbology options.\r\n */\r\n public setSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels = LinePixels.Solid) {\r\n this.activateGraphicParams(GraphicParams.fromSymbology(lineColor, fillColor, lineWidth, linePixels));\r\n }\r\n\r\n /** Set the current active symbology for this builder to be a blanking fill before adding a planar region.\r\n * A planar region drawn with blanking fill renders behind other geometry in the same graphic.\r\n * Blanking fill is not affected by the fill [[ViewFlags]] being disabled.\r\n * An example would be to add a line to a graphic containing a shape with blanking fill so that the line is always shown in front of the fill.\r\n * @param fillColor The color in which to draw filled regions.\r\n */\r\n public setBlankingFill(fillColor: ColorDef) { this.activateGraphicParams(GraphicParams.fromBlankingFill(fillColor)); }\r\n}\r\n"]}
1
+ {"version":3,"file":"GraphicBuilder.js","sourceRoot":"","sources":["../../../src/render/GraphicBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AACzD,wDAE8B;AAC9B,oDAA8H;AAM9H;;;;;;;;GAQG;AACH,IAAY,WAkDX;AAlDD,WAAY,WAAW;IACrB;;;;;;;OAOG;IACH,iEAAc,CAAA;IACd,qEAAqE;IACrE;;;;;;OAMG;IACH,+CAAK,CAAA;IACL,8GAA8G;IAC9G;;;;;;OAMG;IACH,mEAAe,CAAA;IACf;;;;;;;;;;OAUG;IACH,6DAAY,CAAA;IACZ;;;;;;;;OAQG;IACH,2DAAW,CAAA;AACb,CAAC,EAlDW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkDtB;AA6ID;;;;;;;;;;;;;;GAcG;AACH,MAAsB,cAAc;IAuClC,gBAAgB;IAChB,YAAsB,OAAoE;;QACxF,sHAAsH;QACtH,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAExB,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,yBAAS,CAAC,cAAc,EAAE,CAAC;QACjE,IAAI,CAAC,MAAM,GAAG,MAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,MAAM,mCAAI,OAAO,CAAC,MAAM,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,aAAa,mCAAI,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,IAA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B,IAAI,IAAI,CAAC,qBAAqB,CAAC,2BAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CACvH;AA/UD,wCA+UC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AnyCurvePrimitive, Arc3d, Loop, Path, Point2d, Point3d, Polyface, Range3d, SolidPrimitive, Transform,\r\n} from \"@itwin/core-geometry\";\r\nimport { AnalysisStyle, ColorDef, Feature, Frustum, GeometryClass, GraphicParams, LinePixels, Npc } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicPrimitive } from \"./GraphicPrimitive\";\r\n\r\n/**\r\n * Describes the type of a [[GraphicBuilder]], which defines the coordinate system in which the builder's geometry is defined and\r\n * controls the behavior of the [[RenderGraphic]] produced by the builder.\r\n * @note For those types for which depth-testing is disabled, the order in which the individual geometric primitives are drawn determines which geometry draws on top of other geometry.\r\n * - Within a [[GraphicList]], each [[RenderGraphic]] is rendered in the order in which it appears in the list; and\r\n * - Within a single [[RenderGraphic]], each geometric primitive is rendered in the ordered in which it was added to the GraphicBuilder.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GraphicType {\r\n /**\r\n * Renders behind all other graphics. For example, the border of a [[SheetViewState]] is of this type.\r\n * Coordinates: [[CoordSystem.View]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]].\r\n * Lighting: none.\r\n * Depth-testing: disabled.\r\n * @see [[Decorations.viewBackground]]\r\n */\r\n ViewBackground,\r\n /** Used for the scene itself, dynamics, and 'normal' decorations. */\r\n /**\r\n * Renders as if it were part of the scene. All of the [[ViewFlags]] applied to the view's normal geometry also applies to these types of decorations.\r\n * Coordinates: [[CoordSystem.World]].\r\n * Lighting and [[RenderMode]]: from view.\r\n * Depth-testing: enabled.\r\n * @see [[Decorations.normal]].\r\n */\r\n Scene,\r\n /** Renders within the scene. Coordinates: world. RenderMode: smooth. Lighting: default. Z-testing: enabled */\r\n /** Renders within the scene, but ignores the view's [[ViewFlags]].\r\n * Coordinates: [[CoordSystem.World]].\r\n * Lighting: default.\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]].\r\n * Depth-testing: enabled.\r\n * @see [[Decorations.world]].\r\n */\r\n WorldDecoration,\r\n /**\r\n * Renders as an overlay on top of the scene. These decorations differ from [[GraphicType.WorldDecoration]] only in that depth-testing is disabled.\r\n * For example, the ACS triad and [[WindowAreaTool]] decorations are of this type.\r\n * Coordinates: [[CoordSystem.World]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]]\r\n * Lighting: default.\r\n * Depth-testing: disabled.\r\n * Renders atop the scene. Coordinates: world. RenderMode: smooth. Lighting: none. Z-testing: disabled\r\n * @note Overlay decorations typically employ some degree of transparency to ensure that they do not fully obscure the scene.\r\n * @see [[Decorations.worldOverlay]]\r\n */\r\n WorldOverlay,\r\n /**\r\n * Renders as an overlay on top of the scene. These decorations differ from [[GraphicType.WorldOverlay]] only in that their geometry is defined in view coordinates rather than world.\r\n * Coordinates: [[CoordSystem.View]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]]\r\n * Lighting: default.\r\n * Depth-testing: disabled.\r\n * @note For more flexibility in defining view overlay decorations, consider using a [[CanvasDecorationList]].\r\n * @see [[Decorations.viewOverlay]]\r\n */\r\n ViewOverlay,\r\n}\r\n\r\n/** Options used when constructing a `Batch` - that is, a [[RenderGraphic]] with an associated [FeatureTable]($common) describing individual [Feature]($common)s within the\r\n * graphic. Individual features can be resymbolized in a variety of ways including flashing and hiliting.\r\n * For example, to prevent graphics produced by [[readElementGraphics]] from being hilited when their corresponding element is in the [[SelectionSet]],\r\n * pass `{ noHilite: true }` to [[readElementGraphics]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface BatchOptions {\r\n /** Identifies the [[Tile]] associated with the batch, chiefly for debugging purposes.\r\n * @beta\r\n */\r\n tileId?: string;\r\n /** If true, features within the batch will not be flashed on mouseover. */\r\n noFlash?: boolean;\r\n /** If true, features within the batch will not be hilited when their corresponding element is in the [[SelectionSet]]. */\r\n noHilite?: boolean;\r\n /** If true, features within the batch will not be emphasized when the corresponding [[Feature]] is emphasized using [FeatureOverrides]($common). */\r\n noEmphasis?: boolean;\r\n /** If true, the contents of the batch will only be drawn by [[Viewport.readPixels]], not [[Viewport.renderFrame]], causing them to be locatable but invisible. */\r\n locateOnly?: boolean;\r\n}\r\n\r\n/** Options used as part of [[GraphicBuilderOptions]] to describe a [pickable]($docs/learning/frontend/ViewDecorations#pickable-view-graphic-decorations) [[RenderGraphic]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PickableGraphicOptions extends BatchOptions {\r\n /** A unique identifier for the graphic.\r\n * @see [[IModelConnection.transientIds]] to obtain a unique Id in the context of an iModel.\r\n * @see [[GraphicBuilder.activatePickableId]] or [[GraphicBuilder.activateFeature]] to change the pickable object while adding geometry.\r\n */\r\n id: Id64String;\r\n /** Optional Id of the subcategory with which the graphic should be associated. */\r\n subCategoryId?: Id64String;\r\n /** Optional geometry class for the graphic - defaults to [GeometryClass.Primary]($common). */\r\n geometryClass?: GeometryClass;\r\n /** The optional Id of the model with which the graphic should be associated. */\r\n modelId?: Id64String;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] used by functions like [[DecorateContext.createGraphic]] and [[RenderSystem.createGraphic]].\r\n * @see [[ViewportGraphicBuilderOptions]] to create a graphic builder for a [[Viewport]].\r\n * @see [[CustomGraphicBuilderOptions]] to create a graphic builder unassociated with any [[Viewport]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBuilderOptions {\r\n /** The type of graphic to produce. */\r\n type: GraphicType;\r\n\r\n /** The local-to-world transform in which the builder's geometry is to be defined - by default, an identity transform. */\r\n placement?: Transform;\r\n\r\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\r\n pickable?: PickableGraphicOptions;\r\n\r\n /** If true, the order in which geometry is added to the builder is preserved.\r\n * This is useful for overlay and background graphics because they draw without using the depth buffer. For example, to draw an overlay containing a red shape with a white outline,\r\n * you would add the shape to the GraphicBuilder first, followed by the outline, to ensure the outline draws \"in front of\" the shape.\r\n * It defaults to true for overlays and background graphics, and false for other graphic types.\r\n * It is not useful for other types of graphics and imposes a performance penalty due to increased number of draw calls.\r\n * For overlay and background graphics that do not need to draw in any particular order, the performance penalty can be eliminated by setting this to `false`.\r\n */\r\n preserveOrder?: boolean;\r\n\r\n /** Controls whether normals are generated for surfaces. Normals allow 3d geometry to receive lighting; without them the geometry will be unaffected by lighting.\r\n * By default, normals are generated only for graphics of type [[GraphicType.Scene]]; or for any type of graphic if [[GraphicBuilder.wantEdges]] is true, because\r\n * normals are required to prevent z-fighting between surfaces and their edges. This default can be overridden by explicitly specifying `true` or `false`.\r\n * @see [[GraphicType]] for a description of whether and how different types of graphics are affected by lighting.\r\n */\r\n wantNormals?: boolean;\r\n\r\n /** Controls whether edges are generated for surfaces.\r\n * Edges are only displayed if [ViewFlags.renderMode]($common) is not [RenderMode.SmoothShade]($common) or [ViewFlags.visibleEdges]($common) is `true`.\r\n * Since all decoration graphics except [[GraphicType.Scene]] are drawn in smooth shaded mode with no visible edges, by default edges are only produced for scene graphics, and\r\n * - if a [[Viewport]] is supplied with the options - only if [ViewFlags.edgesRequired]($common) is true for the viewport.\r\n * That default can be overridden by explicitly specifying `true` or `false`. This can be useful for non-scene decorations contained in a [[GraphicBranch]] that applies [ViewFlagOverrides]($common)\r\n * that change the edge display settings; or for scene decorations that might be cached for reuse after the viewport's edge settings are changed.\r\n * @note Edges will tend to z-fight with their surfaces unless the graphic is [[pickable]].\r\n */\r\n generateEdges?: boolean;\r\n\r\n /** If defined, specifies a point about which the graphic will rotate such that it always faces the viewer.\r\n * This can be particular useful for planar regions to create a billboarding effect - e.g., to implement [[Marker]]-like WebGL decorations.\r\n * The graphic's [[placement]] transform is not applied to the point.\r\n * @note This has no effect for graphics displayed in a 2d view.\r\n */\r\n viewIndependentOrigin?: Point3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] to be displayed in a specific [[Viewport]].\r\n * The level of detail of the graphic will be computed from the position of its geometry within the viewport's [Frustum]($common).\r\n * Default values for [[GraphicBuilderOptions.wantNormals]] and [[GraphicBuilderOptions.generateEdges]] will be determined by the viewport's [ViewFlags]($common).\r\n * The [[GraphicBuilder.iModel]] will be set to the viewport's [[IModelConnection]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewportGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** The viewport in which the resultant [[RenderGraphic]] is to be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, [[ViewState.getAspectRatioSkew]] will be taken into account when computing the level of detail for the produced graphics. */\r\n applyAspectRatioSkew?: boolean;\r\n\r\n iModel?: never;\r\n computeChordTolerance?: never;\r\n}\r\n\r\n/** Arguments used to compute the chord tolerance (level of detail) of the [[RenderGraphic]]s produced by a [[GraphicBuilder]].\r\n * Generally, the chord tolerance should be roughly equivalent to the size in meters of one pixel on screen where the graphic is to be displayed.\r\n * For [[GraphicType.ViewOverlay]] and [[GraphicType.ViewBackground]], which already define their geometry in pixels, the chord tolerance should typically be 1.\r\n * @see [[CustomGraphicBuilderOptions.computeChordTolerance]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ComputeChordToleranceArgs {\r\n /** The graphic builder being used to produce the graphics. */\r\n readonly graphic: GraphicBuilder;\r\n /** A function that computes a range enclosing all of the geometry that was added to the builder. */\r\n readonly computeRange: () => Range3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] that is not associated with any particular [[Viewport]] and may not be associated with\r\n * any particular [[IModelConnection]].\r\n * This is primarily useful when the same graphic is to be saved and reused for display in multiple viewports and for which a chord tolerance can be computed\r\n * independently of each viewport's [Frustum]($common).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CustomGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** Optionally, the IModelConnection with which the graphic is associated. */\r\n iModel?: IModelConnection;\r\n /** A function that can compute the level of detail for the graphics produced by the builder. */\r\n computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n\r\n applyAspectRatioSkew?: never;\r\n viewport?: never;\r\n}\r\n\r\n/** Provides methods for constructing a [[RenderGraphic]] from geometric primitives.\r\n * GraphicBuilder is primarily used for creating [[Decorations]] to be displayed inside a [[Viewport]].\r\n *\r\n * The typical process for constructing a [[RenderGraphic]] proceeds as follows:\r\n * 1. Use [[DecorateContext.createGraphic]] or [[RenderSystem.createGraphic]] to obtain a builder.\r\n * 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].\r\n * 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.\r\n * 4. Use [[GraphicBuilder.finish]] to produce the finished [[RenderGraphic]].\r\n *\r\n * @note Most of the methods which add geometry to the builder take ownership of their inputs rather than cloning them.\r\n * So, for example, if you pass an array of points to addLineString(), you should not subsequently modify that array.\r\n *\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class GraphicBuilder {\r\n /** The local coordinate system transform applied to this builder's geometry.\r\n * @see [[GraphicBuilderOptions.placement]].\r\n */\r\n public readonly placement: Transform;\r\n\r\n /** The iModel associated with this builder, if any. */\r\n public readonly iModel?: IModelConnection;\r\n\r\n /** The type of graphic to be produced by this builder.\r\n * @see [[GraphicBuilderOptions.type]].\r\n */\r\n public readonly type: GraphicType;\r\n\r\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\r\n public readonly pickable?: Readonly<PickableGraphicOptions>;\r\n\r\n /** If true, the order in which geometry is added to the builder is preserved.\r\n * @see [[GraphicBuilderOptions.preserveOrder]] for more details.\r\n */\r\n public readonly preserveOrder: boolean;\r\n\r\n /** Controls whether normals are generated for surfaces.\r\n * @note Normals are required for proper edge display, so by default they are always produced if [[wantEdges]] is `true`.\r\n * @see [[GraphicBuilderOptions.wantNormals]] for more details.\r\n */\r\n public readonly wantNormals: boolean;\r\n\r\n /** Controls whether edges are generated for surfaces.\r\n * @see [[GraphicBuilderOptions.generateEdges]] for more details.\r\n */\r\n public readonly wantEdges: boolean;\r\n\r\n /** @alpha */\r\n public readonly analysisStyle?: AnalysisStyle;\r\n\r\n protected readonly _computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n protected readonly _options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions;\r\n\r\n /** @internal */\r\n protected constructor(options: ViewportGraphicBuilderOptions | CustomGraphicBuilderOptions) {\r\n // Stored for potential use later in creating a new GraphicBuilder from this one (see PrimitiveBuilder.finishGraphic).\r\n this._options = options;\r\n\r\n const vp = options.viewport;\r\n this.placement = options.placement ?? Transform.createIdentity();\r\n this.iModel = vp?.iModel ?? options.iModel;\r\n this.type = options.type;\r\n this.pickable = options.pickable;\r\n this.wantEdges = options.generateEdges ?? (this.type === GraphicType.Scene && (!vp || vp.viewFlags.edgesRequired()));\r\n this.wantNormals = options.wantNormals ?? (this.wantEdges || this.type === GraphicType.Scene);\r\n this.preserveOrder = options.preserveOrder ?? (this.isOverlay || this.isViewBackground);\r\n\r\n if (!options.viewport) {\r\n this._computeChordTolerance = options.computeChordTolerance;\r\n return;\r\n }\r\n\r\n this.analysisStyle = options.viewport.displayStyle.settings.analysisStyle;\r\n\r\n this._computeChordTolerance = (args: ComputeChordToleranceArgs) => {\r\n let pixelSize = 1;\r\n if (!this.isViewCoordinates) {\r\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\r\n pixelSize = options.viewport.getPixelSizeAtPoint(args.computeRange().center);\r\n pixelSize = options.viewport.target.adjustPixelSizeForLOD(pixelSize);\r\n\r\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\r\n const skew = options.applyAspectRatioSkew ? options.viewport.view.getAspectRatioSkew() : 0;\r\n if (skew > 1)\r\n pixelSize /= skew;\r\n }\r\n\r\n return pixelSize * 0.25;\r\n };\r\n }\r\n\r\n /** The Id to be associated with the graphic for picking.\r\n * @see [[GraphicBuilderOptions.pickable]] for more options.\r\n * @deprecated This provides only the **first** pickable Id for this graphic - you should keep track of the **current** pickable Id yourself.\r\n */\r\n public get pickId(): Id64String | undefined {\r\n return this.pickable?.id;\r\n }\r\n\r\n /** Whether the builder's geometry is defined in [[CoordSystem.View]] coordinates.\r\n * @see [[isWorldCoordinates]].\r\n */\r\n public get isViewCoordinates(): boolean {\r\n return this.type === GraphicType.ViewBackground || this.type === GraphicType.ViewOverlay;\r\n }\r\n\r\n /** Whether the builder's geometry is defined in [[CoordSystem.World]] coordinates.\r\n * @see [[isViewCoordinates]].\r\n */\r\n public get isWorldCoordinates(): boolean {\r\n return !this.isViewCoordinates;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.Scene]]. */\r\n public get isSceneGraphic(): boolean {\r\n return this.type === GraphicType.Scene;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.ViewBackground]]. */\r\n public get isViewBackground(): boolean {\r\n return this.type === GraphicType.ViewBackground;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.WorldOverlay]] or [[GraphicType.ViewOerlay]]. */\r\n public get isOverlay(): boolean {\r\n return this.type === GraphicType.ViewOverlay || this.type === GraphicType.WorldOverlay;\r\n }\r\n\r\n /**\r\n * Processes the accumulated symbology and geometry to produce a renderable graphic.\r\n * This function can only be called once; after the [[RenderGraphic]] has been extracted the [[GraphicBuilder]] should no longer be used.\r\n */\r\n public abstract finish(): RenderGraphic;\r\n\r\n /** Sets the current active symbology for this builder. Any new geometry subsequently added to the builder will be drawn using the specified symbology.\r\n * @param graphicParams The symbology to apply to subsequent geometry.\r\n * @see [[GraphicBuilder.setSymbology]] for a convenient way to set common symbology options.\r\n */\r\n public abstract activateGraphicParams(graphicParams: GraphicParams): void;\r\n\r\n /** Called by [[activateFeature]] after validation to change the [Feature]($common) to be associated with subsequently-added geometry.\r\n * This default implementation does nothing.\r\n */\r\n protected _activateFeature(_feature: Feature): void { }\r\n\r\n /** Change the [Feature]($common) to be associated with subsequently-added geometry. This permits multiple features to be batched together into a single graphic\r\n * for more efficient rendering.\r\n * @note This method has no effect if [[GraphicBuilderOptions.pickable]] was not supplied to the GraphicBuilder's constructor.\r\n */\r\n public activateFeature(feature: Feature): void {\r\n assert(undefined !== this._options.pickable, \"GraphicBuilder.activateFeature has no effect if PickableGraphicOptions were not supplied\");\r\n if (this._options.pickable)\r\n this._activateFeature(feature);\r\n }\r\n\r\n /** Change the pickable Id to be associated with subsequently-added geometry. This permits multiple pickable objects to be batched together into a single graphic\r\n * for more efficient rendering. This method calls [[activateFeature]], using the subcategory Id and [GeometryClass]($common) specified in [[GraphicBuilder.pickable]]\r\n * at construction, if any.\r\n * @note This method has no effect if [[GraphicBuilderOptions.pickable]] was not supplied to the GraphicBuilder's constructor.\r\n */\r\n public activatePickableId(id: Id64String): void {\r\n const pick = this._options.pickable;\r\n this.activateFeature(new Feature(id, pick?.subCategoryId, pick?.geometryClass));\r\n }\r\n\r\n /**\r\n * Appends a 3d line string to the builder.\r\n * @param points Array of vertices in the line string.\r\n */\r\n public abstract addLineString(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a 2d line string to the builder.\r\n * @param points Array of vertices in the line string.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addLineString2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a 3d point string to the builder. The points are drawn disconnected, with a diameter in pixels defined by the builder's active [[GraphicParams.rasterWidth]].\r\n * @param points Array of vertices in the point string.\r\n */\r\n public abstract addPointString(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a 2d point string to the builder. The points are drawn disconnected, with a diameter in pixels defined by the builder's active [[GraphicParams.rasterWidth]].\r\n * @param points Array of vertices in the point string.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addPointString2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a closed 3d planar region to the builder.\r\n * @param points Array of vertices of the shape.\r\n */\r\n public abstract addShape(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a closed 2d region to the builder.\r\n * @param points Array of vertices of the shape.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addShape2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a 3d open arc or closed ellipse to the builder.\r\n * @param arc Description of the arc or ellipse.\r\n * @param isEllipse If true, and if the arc defines a full sweep, then draw as a closed ellipse instead of an arc.\r\n * @param filled If true, and isEllipse is also true, then draw ellipse filled.\r\n */\r\n public abstract addArc(arc: Arc3d, isEllipse: boolean, filled: boolean): void;\r\n\r\n /**\r\n * Appends a 2d open arc or closed ellipse to the builder.\r\n * @param arc Description of the arc or ellipse.\r\n * @param isEllipse If true, and if the arc defines a full sweep, then draw as a closed ellipse instead of an arc.\r\n * @param filled If true, and isEllipse is also true, then draw ellipse filled.\r\n * @param zDepth Z value in local coordinates to use for each point in the arc or ellipse.\r\n */\r\n public abstract addArc2d(ellipse: Arc3d, isEllipse: boolean, filled: boolean, zDepth: number): void;\r\n\r\n /** Append a 3d open path to the builder. */\r\n public abstract addPath(path: Path): void;\r\n\r\n /** Append a 3d planar region to the builder. */\r\n public abstract addLoop(loop: Loop): void;\r\n\r\n /** Append a [CurvePrimitive]($core-geometry) to the builder. */\r\n public addCurvePrimitive(curve: AnyCurvePrimitive): void {\r\n switch (curve.curvePrimitiveType) {\r\n case \"lineString\":\r\n this.addLineString(curve.points);\r\n break;\r\n case \"lineSegment\":\r\n this.addLineString([curve.startPoint(), curve.endPoint()]);\r\n break;\r\n case \"arc\":\r\n this.addArc(curve, false, false);\r\n break;\r\n default:\r\n const path = new Path();\r\n if (path.tryAddChild(curve))\r\n this.addPath(path);\r\n\r\n break;\r\n }\r\n }\r\n\r\n /** Append a mesh to the builder.\r\n * @param meshData Describes the mesh\r\n * @param filled If the mesh describes a planar region, indicates whether its interior area should be drawn with fill in [[RenderMode.Wireframe]].\r\n */\r\n public abstract addPolyface(meshData: Polyface, filled: boolean): void;\r\n\r\n /** Append a solid primitive to the builder. */\r\n public abstract addSolidPrimitive(solidPrimitive: SolidPrimitive): void;\r\n\r\n /** Append any primitive to the builder.\r\n * @param primitive The graphic primitive to append.\r\n */\r\n public addPrimitive(primitive: GraphicPrimitive): void {\r\n switch (primitive.type) {\r\n case \"linestring\":\r\n this.addLineString(primitive.points);\r\n break;\r\n case \"linestring2d\":\r\n this.addLineString2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"pointstring\":\r\n this.addPointString(primitive.points);\r\n break;\r\n case \"pointstring2d\":\r\n this.addPointString2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"shape\":\r\n this.addShape(primitive.points);\r\n break;\r\n case \"shape2d\":\r\n this.addShape2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"arc\":\r\n this.addArc(primitive.arc, true === primitive.isEllipse, true === primitive.filled);\r\n break;\r\n case \"arc2d\":\r\n this.addArc2d(primitive.arc, true === primitive.isEllipse, true === primitive.filled, primitive.zDepth);\r\n break;\r\n case \"path\":\r\n this.addPath(primitive.path);\r\n break;\r\n case \"loop\":\r\n this.addLoop(primitive.loop);\r\n break;\r\n case \"polyface\":\r\n this.addPolyface(primitive.polyface, true === primitive.filled);\r\n break;\r\n case \"solidPrimitive\":\r\n this.addSolidPrimitive(primitive.solidPrimitive);\r\n break;\r\n }\r\n }\r\n\r\n /** Add Range3d edges. Useful for debugging. */\r\n public addRangeBox(range: Range3d) {\r\n this.addFrustum(Frustum.fromRange(range));\r\n }\r\n\r\n /** Add Frustum edges. Useful for debugging. */\r\n public addFrustum(frustum: Frustum) {\r\n this.addRangeBoxFromCorners(frustum.points);\r\n }\r\n\r\n /** Add range edges from corner points */\r\n public addRangeBoxFromCorners(p: Point3d[]) {\r\n this.addLineString([\r\n p[Npc.LeftBottomFront],\r\n p[Npc.LeftTopFront],\r\n p[Npc.RightTopFront],\r\n p[Npc.RightBottomFront],\r\n p[Npc.RightBottomRear],\r\n p[Npc.RightTopRear],\r\n p[Npc.LeftTopRear],\r\n p[Npc.LeftBottomRear],\r\n p[Npc.LeftBottomFront].clone(),\r\n p[Npc.RightBottomFront].clone(),\r\n ]);\r\n\r\n this.addLineString([p[Npc.LeftTopFront].clone(), p[Npc.LeftTopRear].clone()]);\r\n this.addLineString([p[Npc.RightTopFront].clone(), p[Npc.RightTopRear].clone()]);\r\n this.addLineString([p[Npc.LeftBottomRear].clone(), p[Npc.RightBottomRear].clone()]);\r\n }\r\n\r\n /** Sets the current active symbology for this builder. Any new geometry subsequently added will be drawn using the specified symbology.\r\n * @param lineColor The color in which to draw lines.\r\n * @param fillColor The color in which to draw filled regions.\r\n * @param lineWidth The width in pixels to draw lines. The renderer will clamp this value to an integer in the range [1, 32].\r\n * @param linePixels The pixel pattern in which to draw lines.\r\n * @see [[GraphicBuilder.activateGraphicParams]] for additional symbology options.\r\n */\r\n public setSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels = LinePixels.Solid) {\r\n this.activateGraphicParams(GraphicParams.fromSymbology(lineColor, fillColor, lineWidth, linePixels));\r\n }\r\n\r\n /** Set the current active symbology for this builder to be a blanking fill before adding a planar region.\r\n * A planar region drawn with blanking fill renders behind other geometry in the same graphic.\r\n * Blanking fill is not affected by the fill [[ViewFlags]] being disabled.\r\n * An example would be to add a line to a graphic containing a shape with blanking fill so that the line is always shown in front of the fill.\r\n * @param fillColor The color in which to draw filled regions.\r\n */\r\n public setBlankingFill(fillColor: ColorDef) { this.activateGraphicParams(GraphicParams.fromBlankingFill(fillColor)); }\r\n}\r\n"]}
@@ -4,6 +4,7 @@
4
4
  import { Arc3d, Loop, Path, Point2d, Point3d, Polyface, SolidPrimitive } from "@itwin/core-geometry";
5
5
  /** Base interface for a 2d [[GraphicPrimitive]] that can be supplied to [[GraphicBuilder.addPrimitive]].
6
6
  * @public
7
+ * @extensions
7
8
  */
8
9
  export interface GraphicPrimitive2d {
9
10
  /** Z value in local coordinates to use for each point. */
@@ -12,6 +13,7 @@ export interface GraphicPrimitive2d {
12
13
  /** A [[GraphicPrimitive]] representing a line string that can be supplied to [[GraphicBuilder.addPrimitive]].
13
14
  * @see [[GraphicBuilder.addLineString]].
14
15
  * @public
16
+ * @extensions
15
17
  */
16
18
  export interface GraphicLineString {
17
19
  type: "linestring";
@@ -20,6 +22,7 @@ export interface GraphicLineString {
20
22
  /** A [[GraphicPrimitive]] representing a 2d line string that can be supplied to [[GraphicBuilder.addPrimitive]].
21
23
  * @see [[GraphicBuilder.addLineString2d]].
22
24
  * @public
25
+ * @extensions
23
26
  */
24
27
  export interface GraphicLineString2d extends GraphicPrimitive2d {
25
28
  type: "linestring2d";
@@ -28,6 +31,7 @@ export interface GraphicLineString2d extends GraphicPrimitive2d {
28
31
  /** A [[GraphicPrimitive]] representing a point string that can be supplied to [[GraphicBuilder.addPrimitive]].
29
32
  * @see [[GraphicBuilder.addPointString]].
30
33
  * @public
34
+ * @extensions
31
35
  */
32
36
  export interface GraphicPointString {
33
37
  type: "pointstring";
@@ -36,6 +40,7 @@ export interface GraphicPointString {
36
40
  /** A [[GraphicPrimitive]] representing a 2d point string that can be supplied to [[GraphicBuilder.addPrimitive]].
37
41
  * @see [[GraphicBuilder.addPointString2d]].
38
42
  * @public
43
+ * @extensions
39
44
  */
40
45
  export interface GraphicPointString2d extends GraphicPrimitive2d {
41
46
  type: "pointstring2d";
@@ -44,6 +49,7 @@ export interface GraphicPointString2d extends GraphicPrimitive2d {
44
49
  /** A [[GraphicPrimitive]] representing a closed 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].
45
50
  * @see [[GraphicBuilder.addShape]].
46
51
  * @public
52
+ * @extensions
47
53
  */
48
54
  export interface GraphicShape {
49
55
  type: "shape";
@@ -52,6 +58,7 @@ export interface GraphicShape {
52
58
  /** A [[GraphicPrimitive]] representing a closed 2d region that can be supplied to [[GraphicBuilder.addPrimitive]].
53
59
  * @see [[GraphicBuilder.addShape2d]].
54
60
  * @public
61
+ * @extensions
55
62
  */
56
63
  export interface GraphicShape2d extends GraphicPrimitive2d {
57
64
  type: "shape2d";
@@ -60,6 +67,7 @@ export interface GraphicShape2d extends GraphicPrimitive2d {
60
67
  /** A [[GraphicPrimitive]] representing a 3d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].
61
68
  * @see [[GraphicBuilder.addArc]].
62
69
  * @public
70
+ * @extensions
63
71
  */
64
72
  export interface GraphicArc {
65
73
  type: "arc";
@@ -70,6 +78,7 @@ export interface GraphicArc {
70
78
  /** A [[GraphicPrimitive]] representing a 2d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].
71
79
  * @see [[GraphicBuilder.addArc2d]].
72
80
  * @public
81
+ * @extensions
73
82
  */
74
83
  export interface GraphicArc2d {
75
84
  type: "arc2d";
@@ -81,6 +90,7 @@ export interface GraphicArc2d {
81
90
  /** A [[GraphicPrimitive]] representing a 3d open path that can be supplied to [[GraphicBuilder.addPrimitive]].
82
91
  * @see [[GraphicBuilder.addPath]].
83
92
  * @public
93
+ * @extensions
84
94
  */
85
95
  export interface GraphicPath {
86
96
  type: "path";
@@ -89,6 +99,7 @@ export interface GraphicPath {
89
99
  /** A [[GraphicPrimitive]] representing a 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].
90
100
  * @see [[GraphicBuilder.addLoop]].
91
101
  * @public
102
+ * @extensions
92
103
  */
93
104
  export interface GraphicLoop {
94
105
  type: "loop";
@@ -97,6 +108,7 @@ export interface GraphicLoop {
97
108
  /** A [[GraphicPrimitive]] representing a mesh that can be supplied to [[GraphicBuilder.addPrimitive]].
98
109
  * @see [[GraphicBuilder.addPolyface]].
99
110
  * @public
111
+ * @extensions
100
112
  */
101
113
  export interface GraphicPolyface {
102
114
  type: "polyface";
@@ -106,6 +118,7 @@ export interface GraphicPolyface {
106
118
  /** A [[GraphicPrimitive]] representing a [SolidPrimitive]($core-geometry) to be supplied to [[GraphicBuilder.addPrimitive]].
107
119
  * @see [[GraphicBuilder.addSolidPrimitive]].
108
120
  * @public
121
+ * @extensions
109
122
  */
110
123
  export interface GraphicSolidPrimitive {
111
124
  type: "solidPrimitive";
@@ -131,6 +144,7 @@ export interface GraphicSolidPrimitive {
131
144
  * }
132
145
  * ```
133
146
  * @public
147
+ * @extensions
134
148
  */
135
149
  export declare type GraphicPrimitive = GraphicLineString | GraphicLineString2d | GraphicPointString | GraphicPointString2d | GraphicShape | GraphicShape2d | GraphicArc | GraphicArc2d | GraphicPath | GraphicLoop | GraphicPolyface | GraphicSolidPrimitive;
136
150
  //# sourceMappingURL=GraphicPrimitive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicPrimitive.d.ts","sourceRoot":"","sources":["../../../src/render/GraphicPrimitive.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAErG;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,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G","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 { Arc3d, Loop, Path, Point2d, Point3d, Polyface, SolidPrimitive } from \"@itwin/core-geometry\";\r\n\r\n/** Base interface for a 2d [[GraphicPrimitive]] that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @public\r\n */\r\nexport interface GraphicPrimitive2d {\r\n /** Z value in local coordinates to use for each point. */\r\n zDepth: number;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a line string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLineString]].\r\n * @public\r\n */\r\nexport interface GraphicLineString {\r\n type: \"linestring\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d line string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLineString2d]].\r\n * @public\r\n */\r\nexport interface GraphicLineString2d extends GraphicPrimitive2d {\r\n type: \"linestring2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a point string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPointString]].\r\n * @public\r\n */\r\nexport interface GraphicPointString {\r\n type: \"pointstring\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d point string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPointString2d]].\r\n * @public\r\n */\r\nexport interface GraphicPointString2d extends GraphicPrimitive2d {\r\n type: \"pointstring2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a closed 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addShape]].\r\n * @public\r\n */\r\nexport interface GraphicShape {\r\n type: \"shape\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a closed 2d region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addShape2d]].\r\n * @public\r\n */\r\nexport interface GraphicShape2d extends GraphicPrimitive2d {\r\n type: \"shape2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addArc]].\r\n * @public\r\n */\r\nexport interface GraphicArc {\r\n type: \"arc\";\r\n arc: Arc3d;\r\n isEllipse?: boolean;\r\n filled?: boolean;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addArc2d]].\r\n * @public\r\n */\r\nexport interface GraphicArc2d {\r\n type: \"arc2d\";\r\n arc: Arc3d;\r\n isEllipse?: boolean;\r\n filled?: boolean;\r\n zDepth: number;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d open path that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPath]].\r\n * @public\r\n */\r\nexport interface GraphicPath {\r\n type: \"path\";\r\n path: Path;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLoop]].\r\n * @public\r\n */\r\nexport interface GraphicLoop {\r\n type: \"loop\";\r\n loop: Loop;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a mesh that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPolyface]].\r\n * @public\r\n */\r\nexport interface GraphicPolyface {\r\n type: \"polyface\";\r\n polyface: Polyface;\r\n filled?: boolean;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a [SolidPrimitive]($core-geometry) to be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addSolidPrimitive]].\r\n * @public\r\n */\r\nexport interface GraphicSolidPrimitive {\r\n type: \"solidPrimitive\";\r\n solidPrimitive: SolidPrimitive;\r\n}\r\n\r\n/** Union type representing a graphic primitive that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * Each primitive type corresponds to one of GraphicBuilder's `addXXX` methods. This is useful when the precise type of\r\n * geometry is not known at the point at which it is added to the builder. As a simple example:\r\n * ```ts\r\n * function getPrimitives(): GraphicPrimitive[] {\r\n * const primitives: GraphicPrimitive[] = [{ type: \"polyface\", polyface: getPolyface(), filled: true }];\r\n * if (someCondition())\r\n * primitives.push({ type: \"linestring\", points: getPoints() });\r\n * else\r\n * primitives.push({ type: \"arc\", arc: getArc(), isEllipse: true });\r\n *\r\n * return primitives;\r\n * }\r\n *\r\n * function addGraphics(builder: GraphicBuilder) {\r\n * for (const primitive of getPrimitives())\r\n * builder.addPrimitive(primitive);\r\n * }\r\n * ```\r\n * @public\r\n */\r\nexport type GraphicPrimitive = GraphicLineString | GraphicLineString2d | GraphicPointString | GraphicPointString2d | GraphicShape | GraphicShape2d | GraphicArc | GraphicArc2d | GraphicPath | GraphicLoop | GraphicPolyface | GraphicSolidPrimitive;\r\n"]}
1
+ {"version":3,"file":"GraphicPrimitive.js","sourceRoot":"","sources":["../../../src/render/GraphicPrimitive.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 Rendering\r\n */\r\n\r\nimport { Arc3d, Loop, Path, Point2d, Point3d, Polyface, SolidPrimitive } from \"@itwin/core-geometry\";\r\n\r\n/** Base interface for a 2d [[GraphicPrimitive]] that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPrimitive2d {\r\n /** Z value in local coordinates to use for each point. */\r\n zDepth: number;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a line string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLineString]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicLineString {\r\n type: \"linestring\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d line string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLineString2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicLineString2d extends GraphicPrimitive2d {\r\n type: \"linestring2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a point string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPointString]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPointString {\r\n type: \"pointstring\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d point string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPointString2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPointString2d extends GraphicPrimitive2d {\r\n type: \"pointstring2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a closed 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addShape]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicShape {\r\n type: \"shape\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a closed 2d region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addShape2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicShape2d extends GraphicPrimitive2d {\r\n type: \"shape2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addArc]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicArc {\r\n type: \"arc\";\r\n arc: Arc3d;\r\n isEllipse?: boolean;\r\n filled?: boolean;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addArc2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicArc2d {\r\n type: \"arc2d\";\r\n arc: Arc3d;\r\n isEllipse?: boolean;\r\n filled?: boolean;\r\n zDepth: number;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d open path that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPath]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPath {\r\n type: \"path\";\r\n path: Path;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLoop]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicLoop {\r\n type: \"loop\";\r\n loop: Loop;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a mesh that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPolyface]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPolyface {\r\n type: \"polyface\";\r\n polyface: Polyface;\r\n filled?: boolean;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a [SolidPrimitive]($core-geometry) to be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addSolidPrimitive]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicSolidPrimitive {\r\n type: \"solidPrimitive\";\r\n solidPrimitive: SolidPrimitive;\r\n}\r\n\r\n/** Union type representing a graphic primitive that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * Each primitive type corresponds to one of GraphicBuilder's `addXXX` methods. This is useful when the precise type of\r\n * geometry is not known at the point at which it is added to the builder. As a simple example:\r\n * ```ts\r\n * function getPrimitives(): GraphicPrimitive[] {\r\n * const primitives: GraphicPrimitive[] = [{ type: \"polyface\", polyface: getPolyface(), filled: true }];\r\n * if (someCondition())\r\n * primitives.push({ type: \"linestring\", points: getPoints() });\r\n * else\r\n * primitives.push({ type: \"arc\", arc: getArc(), isEllipse: true });\r\n *\r\n * return primitives;\r\n * }\r\n *\r\n * function addGraphics(builder: GraphicBuilder) {\r\n * for (const primitive of getPrimitives())\r\n * builder.addPrimitive(primitive);\r\n * }\r\n * ```\r\n * @public\r\n * @extensions\r\n */\r\nexport type GraphicPrimitive = GraphicLineString | GraphicLineString2d | GraphicPointString | GraphicPointString2d | GraphicShape | GraphicShape2d | GraphicArc | GraphicArc2d | GraphicPath | GraphicLoop | GraphicPolyface | GraphicSolidPrimitive;\r\n"]}
@@ -8,6 +8,7 @@ import { Viewport } from "../Viewport";
8
8
  import { RenderGraphic } from "./RenderGraphic";
9
9
  /** Parameters used to construct a [[ParticleCollectionBuilder]].
10
10
  * @public
11
+ * @extensions
11
12
  */
12
13
  export interface ParticleCollectionBuilderParams {
13
14
  /** The image mapped to each particle quad.
@@ -38,6 +39,7 @@ export interface ParticleCollectionBuilderParams {
38
39
  /** Describes a particle to to add to a particle collection via [[ParticleCollectionBuilder.addParticle]].
39
40
  * The x, y, and z coordinates represent the centroid of the particle quad in the collection's coordinate space.
40
41
  * @public
42
+ * @extensions
41
43
  */
42
44
  export interface ParticleProps extends XYAndZ {
43
45
  /** The size of the particle, in the collection's coordinate space. If omitted, it defaults to the size supplied to the collection by [[ParticleCollectionBuilderParams.size]].
@@ -60,6 +62,7 @@ export interface ParticleProps extends XYAndZ {
60
62
  * [Fire and Smoke](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=fire-sample&imodel=Villa) particle effects.
61
63
  * @see [SnowEffect]($frontend-devtools) for an example of a particle effect.
62
64
  * @public
65
+ * @extensions
63
66
  */
64
67
  export interface ParticleCollectionBuilder {
65
68
  /** The default transparency for newly-added particles as an integer in [0,255], used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.transparency]] is omitted.
@@ -1 +1 @@
1
- {"version":3,"file":"ParticleCollectionBuilder.d.ts","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAkD,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC/G,OAAO,EAC8G,aAAa,EACjI,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IAErB,uGAAuG;IACvG,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,yDAAyD;IACzD,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEtB,6KAA6K;IAC7K,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sIAAsI;IACtI,cAAc,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,iIAAiI;IACjI,IAAI,EAAE,KAAK,CAAC;IAEZ;;;;OAIG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAE/C;;;OAGG;IACH,MAAM,EAAE,MAAM,aAAa,GAAG,SAAS,CAAC;CACzC;AAED,cAAc;AACd,yBAAiB,yBAAyB,CAAC;IACzC;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAM,EAAE,+BAA+B,GAAG,yBAAyB,CAEzF;CACF"}
1
+ {"version":3,"file":"ParticleCollectionBuilder.d.ts","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAkD,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC/G,OAAO,EAC8G,aAAa,EACjI,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IAErB,uGAAuG;IACvG,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,yDAAyD;IACzD,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,W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AC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,uBAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACvF;KACF,CAAC;IAEF,OAAO,wBAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,iBAAiB,CAAC,YAAoB;IAC7C,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IACtE,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACxC,IAAI,YAAY,GAAG,6BAAa,CAAC,eAAe;QAC9C,YAAY,GAAG,CAAC,CAAC;IAEnB,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,YAAY,CAAC,aAAsB,EAAE,MAAe,EAAE,OAAe;IAC5E,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;IACrC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,OAAO,GAAG,GAAG,CAAC;IAC/B,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC;IAC1B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix3d, Point2d, Point3d, Range3d, Transform, Vector2d, XAndY, XYAndZ } from \"@itwin/core-geometry\";\r\nimport {\r\n ColorDef, ColorIndex, Feature, FeatureIndex, FeatureTable, FillFlags, PackedFeatureTable, QParams3d, QPoint3dList, RenderTexture,\r\n} from \"@itwin/core-common\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicBranch } from \"./GraphicBranch\";\r\nimport { MeshParams } from \"./primitives/VertexTable\";\r\nimport { MeshArgs } from \"./primitives/mesh/MeshPrimitives\";\r\nimport { DisplayParams } from \"./primitives/DisplayParams\";\r\n\r\n/** Parameters used to construct a [[ParticleCollectionBuilder]].\r\n * @public\r\n */\r\nexport interface ParticleCollectionBuilderParams {\r\n /** The image mapped to each particle quad.\r\n * @note The texture should be disposed of when no longer needed to free up WebGL resources. For example, if a [[Decorator]] creates the texture, the\r\n * texture should probably be disposed of when the decorator is removed from the [[ViewManager]].\r\n */\r\n texture: RenderTexture;\r\n\r\n /** The default extents of the particle quad. Individual particles may apply a scale to these extents to produce particles of varying dimensions.\r\n * Must be positive.\r\n */\r\n size: XAndY | number;\r\n\r\n /** The initial transparency of the particles as an integer in [0,255]. Defaults to zero if omitted. */\r\n transparency?: number;\r\n\r\n /** The origin of the particle collection in world coordinates. Defaults to (0, 0, 0). */\r\n origin?: XYAndZ;\r\n\r\n /** If the particles are to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\r\n * @see [[IModelConnection.transientIdSequence]] to obtain an Id that is unique within an iModel.\r\n */\r\n pickableId?: Id64String;\r\n\r\n /** The viewport in which the particles will be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, the finished graphic will be defined in view coordinates, for use as a decoration of type [[GraphicType.ViewBackground]] or [[GraphicType.ViewOverlay]].\r\n * Defaults to false, indicating the graphic will be defined in world coordinates.\r\n * @see [[CoordSystem.View]] and [[CoordSystem.World]].\r\n */\r\n isViewCoords?: boolean;\r\n}\r\n\r\n/** Describes a particle to to add to a particle collection via [[ParticleCollectionBuilder.addParticle]].\r\n * The x, y, and z coordinates represent the centroid of the particle quad in the collection's coordinate space.\r\n * @public\r\n */\r\nexport interface ParticleProps extends XYAndZ {\r\n /** The size of the particle, in the collection's coordinate space. If omitted, it defaults to the size supplied to the collection by [[ParticleCollectionBuilderParams.size]].\r\n * Supplying a `number` produces a square; supplying a non-uniform `XAndY` produces a rectangle. Must be positive.\r\n */\r\n size?: XAndY | number;\r\n\r\n /** The transparency with which to draw the particle as an integer in [0,255]. If omitted, it defaults to the current value of [[ParticleCollectionBuilder.transparency]]. */\r\n transparency?: number;\r\n\r\n /** A rotation matrix to orient the particle. If supplied then the particle will not be automatically oriented towards the camera. */\r\n rotationMatrix?: Matrix3d;\r\n}\r\n\r\n/** Interface for producing a collection of particles suitable for use in particle effects.\r\n * Particle effects involve animating hundreds or thousands of small particles to simulate phenomena like smoke, fire, snow, etc.\r\n * A particle collection represents each particle as a quad (rectangle) displaying an image. The position of each particle corresponds to the\r\n * centroid of its quad. The transparency and size of each particle can be specified individually. By default, the quads will always rotate to face the camera\r\n * such that the image is fully visible.\r\n *\r\n * Creating a particle collection using a ParticleCollectionBuilder is far more efficient (in both CPU and GPU usage) than doing so using a [[GraphicBuilder]].\r\n * @see interactive demonstrations of [Snow and Rain](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=snow-rain-sample&imodel=Villa) and\r\n * [Fire and Smoke](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=fire-sample&imodel=Villa) particle effects.\r\n * @see [SnowEffect]($frontend-devtools) for an example of a particle effect.\r\n * @public\r\n */\r\nexport interface ParticleCollectionBuilder {\r\n /** The default transparency for newly-added particles as an integer in [0,255], used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.transparency]] is omitted.\r\n * Changing this value has no effect on the transparency of previously-added particles.\r\n */\r\n transparency: number;\r\n\r\n /** The default size of each particle, used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.size]] is omitted. */\r\n size: XAndY;\r\n\r\n /** Add a particle to the collection.\r\n * If `size` is omitted, `this.size` is used.\r\n * If `transparency` is omitted, `this.transparency` is used.\r\n * @throws Error if particle size is defined and not greater than zero.\r\n */\r\n addParticle: (particle: ParticleProps) => void;\r\n\r\n /** Produces a finished graphic from the accumulated particles.\r\n * It returns the finished graphic, or `undefined` if the collection contains no particles or the [[RenderSystem]] failed to produce the graphic.\r\n * @note After this method returns, the particle collection is empty.\r\n */\r\n finish: () => RenderGraphic | undefined;\r\n}\r\n\r\n/** @public */\r\nexport namespace ParticleCollectionBuilder {\r\n /** Creates a new ParticleCollectionBuilder.\r\n * @throws Error if size is not greater than zero.\r\n */\r\n export function create(params: ParticleCollectionBuilderParams): ParticleCollectionBuilder {\r\n return new Builder(params);\r\n }\r\n}\r\n\r\nclass Particle {\r\n public readonly centroid: Point3d;\r\n public readonly transparency: number;\r\n public readonly width: number;\r\n public readonly height: number;\r\n public readonly rotationMatrix?: Matrix3d;\r\n\r\n public constructor(centroid: XYAndZ, width: number, height: number, transparency: number, rotationMatrix?: Matrix3d) {\r\n this.centroid = Point3d.fromJSON(centroid);\r\n this.transparency = transparency;\r\n this.width = width;\r\n this.height = height;\r\n this.rotationMatrix = rotationMatrix;\r\n }\r\n}\r\n\r\nclass Builder implements ParticleCollectionBuilder {\r\n private readonly _viewport: Viewport;\r\n private readonly _isViewCoords: boolean;\r\n private readonly _pickableId?: Id64String;\r\n private readonly _texture: RenderTexture;\r\n private readonly _size: Vector2d;\r\n private _transparency: number;\r\n private _hasVaryingTransparency = false;\r\n private readonly _localToWorldTransform: Transform;\r\n private readonly _range = Range3d.createNull();\r\n private _particlesOpaque: Particle[] = [];\r\n private _particlesTranslucent: Particle[] = [];\r\n\r\n public constructor(params: ParticleCollectionBuilderParams) {\r\n this._viewport = params.viewport;\r\n this._isViewCoords = true === params.isViewCoords;\r\n this._pickableId = params.pickableId;\r\n this._texture = params.texture;\r\n this._transparency = undefined !== params.transparency ? clampTransparency(params.transparency) : 0;\r\n this._localToWorldTransform = params.origin ? Transform.createTranslationXYZ(params.origin.x, params.origin.y, params.origin.z) : Transform.createIdentity();\r\n\r\n if (\"number\" === typeof params.size)\r\n this._size = new Vector2d(params.size, params.size);\r\n else\r\n this._size = Vector2d.fromJSON(params.size);\r\n\r\n if (this._size.x <= 0 || this._size.y <= 0)\r\n throw new Error(\"Particle size must be greater than zero\");\r\n }\r\n\r\n public get size(): XAndY {\r\n return this._size;\r\n }\r\n\r\n public get transparency() {\r\n return this._transparency;\r\n }\r\n\r\n public set transparency(transparency: number) {\r\n transparency = clampTransparency(transparency);\r\n if (transparency !== this._transparency) {\r\n this._transparency = transparency;\r\n this._hasVaryingTransparency = this._particlesTranslucent.length > 0;\r\n }\r\n }\r\n\r\n public addParticle(props: ParticleProps): void {\r\n const size = props.size ?? this._size;\r\n let width, height;\r\n if (\"number\" === typeof size) {\r\n width = height = size;\r\n } else {\r\n width = size.x;\r\n height = size.y;\r\n }\r\n\r\n if (width <= 0 || height <= 0)\r\n throw new Error(\"A particle must have a size greater than zero\");\r\n\r\n const transparency = undefined !== props.transparency ? clampTransparency(props.transparency) : this.transparency;\r\n if (transparency !== this.transparency && this._particlesTranslucent.length > 0)\r\n this._hasVaryingTransparency = true;\r\n\r\n const particle = new Particle(props, width, height, transparency, props.rotationMatrix);\r\n if (transparency > 0)\r\n this._particlesTranslucent.push(particle);\r\n else\r\n this._particlesOpaque.push(particle);\r\n this._range.extendPoint(particle.centroid);\r\n }\r\n\r\n public finish(): RenderGraphic | undefined {\r\n if (0 === this._particlesTranslucent.length + this._particlesOpaque.length)\r\n return undefined;\r\n\r\n // Order-independent transparency doesn't work well with opaque geometry - it will look semi-transparent.\r\n // If we have a mix of opaque and transparent particles, put them in separate graphics to be rendered in separate passes.\r\n const opaque = this.createGraphic(this._particlesOpaque, 0);\r\n const transparent = this.createGraphic(this._particlesTranslucent, this._hasVaryingTransparency ? undefined : this._transparency);\r\n\r\n // Empty the collection before any return statements.\r\n const range = this._range.clone();\r\n this._range.setNull();\r\n this._particlesOpaque.length = 0;\r\n this._particlesTranslucent.length = 0;\r\n this._hasVaryingTransparency = false;\r\n\r\n if (!transparent && !opaque)\r\n return undefined;\r\n\r\n // Transform from origin to collection, then to world.\r\n const toCollection = Transform.createTranslation(range.center);\r\n const toWorld = toCollection.multiplyTransformTransform(this._localToWorldTransform);\r\n const branch = new GraphicBranch(true);\r\n if (opaque)\r\n branch.add(opaque);\r\n\r\n if (transparent)\r\n branch.add(transparent);\r\n\r\n let graphic = this._viewport.target.renderSystem.createGraphicBranch(branch, toWorld);\r\n\r\n // If we have a pickable Id, produce a batch.\r\n // NB: We pass this._pickableId as the FeatureTable's modelId so that it will be treated like a reality model or a map -\r\n // specifically, it can be located and display a tooltip, but can't be selected.\r\n const featureTable = this._pickableId ? new FeatureTable(1, this._pickableId) : undefined;\r\n if (featureTable) {\r\n this._localToWorldTransform.multiplyRange(range, range);\r\n featureTable.insert(new Feature(this._pickableId));\r\n graphic = this._viewport.target.renderSystem.createBatch(graphic, PackedFeatureTable.pack(featureTable), range);\r\n }\r\n\r\n return graphic;\r\n }\r\n\r\n private createGraphic(particles: Particle[], uniformTransparency: number | undefined): RenderGraphic | undefined {\r\n const numParticles = particles.length;\r\n if (numParticles <= 0)\r\n return undefined;\r\n\r\n // To keep scale values close to 1, compute mean size to use as size of quad.\r\n const meanSize = new Vector2d();\r\n let maxSize = 0;\r\n for (const particle of particles) {\r\n meanSize.x += particle.width;\r\n meanSize.y += particle.height;\r\n if (particle.width > maxSize)\r\n maxSize = particle.width;\r\n if (particle.height > maxSize)\r\n maxSize = particle.height;\r\n }\r\n meanSize.x /= numParticles;\r\n meanSize.y /= numParticles;\r\n\r\n // Define InstancedGraphicParams for particles.\r\n const rangeCenter = this._range.center;\r\n const floatsPerTransform = 12;\r\n const transforms = new Float32Array(floatsPerTransform * numParticles);\r\n const bytesPerOverride = 8;\r\n const symbologyOverrides = undefined === uniformTransparency ? new Uint8Array(bytesPerOverride * numParticles) : undefined;\r\n\r\n const viewToWorld = this._viewport.view.getRotation().transpose();\r\n let tfIndex = 0;\r\n let ovrIndex = 0;\r\n for (const particle of particles) {\r\n const scaleX = particle.width / meanSize.x;\r\n const scaleY = particle.height / meanSize.y;\r\n if (this._isViewCoords) {\r\n // Particles already face the camera in view coords - just apply the scale.\r\n transforms[tfIndex + 0] = scaleX;\r\n transforms[tfIndex + 5] = scaleY;\r\n transforms[tfIndex + 10] = 1;\r\n } else if (undefined !== particle.rotationMatrix) {\r\n // Scale rotation matrix relative to size of quad.\r\n transforms[tfIndex + 0] = particle.rotationMatrix.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = particle.rotationMatrix.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = particle.rotationMatrix.coffs[2];\r\n transforms[tfIndex + 4] = particle.rotationMatrix.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = particle.rotationMatrix.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = particle.rotationMatrix.coffs[5];\r\n transforms[tfIndex + 8] = particle.rotationMatrix.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = particle.rotationMatrix.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = particle.rotationMatrix.coffs[8];\r\n } else {\r\n // Rotate about origin by inverse view matrix so quads always face the camera and scale relative to size of quad.\r\n transforms[tfIndex + 0] = viewToWorld.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = viewToWorld.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = viewToWorld.coffs[2];\r\n transforms[tfIndex + 4] = viewToWorld.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = viewToWorld.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = viewToWorld.coffs[5];\r\n transforms[tfIndex + 8] = viewToWorld.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = viewToWorld.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = viewToWorld.coffs[8];\r\n }\r\n\r\n // Translate relative to center of particles range.\r\n transforms[tfIndex + 3] = particle.centroid.x - rangeCenter.x;\r\n transforms[tfIndex + 7] = particle.centroid.y - rangeCenter.y;\r\n transforms[tfIndex + 11] = particle.centroid.z - rangeCenter.z;\r\n\r\n tfIndex += floatsPerTransform;\r\n\r\n if (symbologyOverrides) {\r\n // See FeatureOverrides.buildLookupTable() for layout.\r\n symbologyOverrides[ovrIndex + 0] = 1 << 2; // OvrFlags.Alpha\r\n symbologyOverrides[ovrIndex + 7] = 0xff - particle.transparency;\r\n\r\n ovrIndex += bytesPerOverride;\r\n }\r\n }\r\n\r\n // Produce instanced quads.\r\n // Note: We do not need to allocate an array of featureIds. If we have a pickableId, all particles refer to the same Feature, with index 0.\r\n // So we leave the vertex attribute disabled causing the shader to receive the default (0, 0, 0) which happens to correspond to our feature index.\r\n const quad = createQuad(meanSize, this._texture, uniformTransparency ?? 0x7f);\r\n const transformCenter = new Point3d(0, 0, 0);\r\n const range = computeRange(this._range, rangeCenter, maxSize);\r\n const instances = { count: numParticles, transforms, transformCenter, symbologyOverrides, range };\r\n return this._viewport.target.renderSystem.createMesh(quad, instances);\r\n }\r\n}\r\n\r\nfunction createQuad(size: XAndY, texture: RenderTexture, transparency: number): MeshParams {\r\n const halfWidth = size.x / 2;\r\n const halfHeight = size.y / 2;\r\n const corners = [\r\n new Point3d(-halfWidth, -halfHeight, 0), new Point3d(halfWidth, -halfHeight, 0),\r\n new Point3d(-halfWidth, halfHeight, 0), new Point3d(halfWidth, halfHeight, 0),\r\n ];\r\n\r\n const range = new Range3d();\r\n range.low = corners[0];\r\n range.high = corners[3];\r\n\r\n const points = new QPoint3dList(QParams3d.fromRange(range));\r\n for (const corner of corners)\r\n points.add(corner);\r\n\r\n const colors = new ColorIndex();\r\n colors.initUniform(ColorDef.white.withTransparency(transparency));\r\n\r\n const quadArgs: MeshArgs = {\r\n points,\r\n vertIndices: [0, 1, 2, 2, 1, 3],\r\n fillFlags: FillFlags.None,\r\n isPlanar: true,\r\n colors,\r\n features: new FeatureIndex(),\r\n textureMapping: {\r\n texture,\r\n uvParams: [new Point2d(0, 1), new Point2d(1, 1), new Point2d(0, 0), new Point2d(1, 0)],\r\n },\r\n };\r\n\r\n return MeshParams.create(quadArgs);\r\n}\r\n\r\nfunction clampTransparency(transparency: number): number {\r\n transparency = Math.min(255, transparency, Math.max(0, transparency));\r\n transparency = Math.floor(transparency);\r\n if (transparency < DisplayParams.minTransparency)\r\n transparency = 0;\r\n\r\n return transparency;\r\n}\r\n\r\nfunction computeRange(centroidRange: Range3d, center: Point3d, maxSize: number): Range3d {\r\n const range2 = centroidRange.clone();\r\n range2.low.subtractInPlace(center);\r\n range2.high.subtractInPlace(center);\r\n const halfSize = maxSize * 0.5;\r\n range2.low.x -= halfSize;\r\n range2.low.y -= halfSize;\r\n range2.low.z -= halfSize;\r\n range2.high.x += halfSize;\r\n range2.high.y += halfSize;\r\n range2.high.z += halfSize;\r\n return range2;\r\n}\r\n"]}
1
+ {"version":3,"file":"ParticleCollectionBuilder.js","sourceRoot":"","sources":["../../../src/render/ParticleCollectionBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAA+G;AAC/G,oDAE4B;AAG5B,mDAAgD;AAChD,0DAAsD;AAEtD,8DAA2D;AA6F3D,cAAc;AACd,IAAiB,yBAAyB,CAOzC;AAPD,WAAiB,yBAAyB;IACxC;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAuC;QAC5D,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAFe,gCAAM,SAErB,CAAA;AACH,CAAC,EAPgB,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAOzC;AAED,MAAM,QAAQ;IAOZ,YAAmB,QA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AC1B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix3d, Point2d, Point3d, Range3d, Transform, Vector2d, XAndY, XYAndZ } from \"@itwin/core-geometry\";\r\nimport {\r\n ColorDef, ColorIndex, Feature, FeatureIndex, FeatureTable, FillFlags, PackedFeatureTable, QParams3d, QPoint3dList, RenderTexture,\r\n} from \"@itwin/core-common\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicBranch } from \"./GraphicBranch\";\r\nimport { MeshParams } from \"./primitives/VertexTable\";\r\nimport { MeshArgs } from \"./primitives/mesh/MeshPrimitives\";\r\nimport { DisplayParams } from \"./primitives/DisplayParams\";\r\n\r\n/** Parameters used to construct a [[ParticleCollectionBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilderParams {\r\n /** The image mapped to each particle quad.\r\n * @note The texture should be disposed of when no longer needed to free up WebGL resources. For example, if a [[Decorator]] creates the texture, the\r\n * texture should probably be disposed of when the decorator is removed from the [[ViewManager]].\r\n */\r\n texture: RenderTexture;\r\n\r\n /** The default extents of the particle quad. Individual particles may apply a scale to these extents to produce particles of varying dimensions.\r\n * Must be positive.\r\n */\r\n size: XAndY | number;\r\n\r\n /** The initial transparency of the particles as an integer in [0,255]. Defaults to zero if omitted. */\r\n transparency?: number;\r\n\r\n /** The origin of the particle collection in world coordinates. Defaults to (0, 0, 0). */\r\n origin?: XYAndZ;\r\n\r\n /** If the particles are to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\r\n * @see [[IModelConnection.transientIdSequence]] to obtain an Id that is unique within an iModel.\r\n */\r\n pickableId?: Id64String;\r\n\r\n /** The viewport in which the particles will be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, the finished graphic will be defined in view coordinates, for use as a decoration of type [[GraphicType.ViewBackground]] or [[GraphicType.ViewOverlay]].\r\n * Defaults to false, indicating the graphic will be defined in world coordinates.\r\n * @see [[CoordSystem.View]] and [[CoordSystem.World]].\r\n */\r\n isViewCoords?: boolean;\r\n}\r\n\r\n/** Describes a particle to to add to a particle collection via [[ParticleCollectionBuilder.addParticle]].\r\n * The x, y, and z coordinates represent the centroid of the particle quad in the collection's coordinate space.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleProps extends XYAndZ {\r\n /** The size of the particle, in the collection's coordinate space. If omitted, it defaults to the size supplied to the collection by [[ParticleCollectionBuilderParams.size]].\r\n * Supplying a `number` produces a square; supplying a non-uniform `XAndY` produces a rectangle. Must be positive.\r\n */\r\n size?: XAndY | number;\r\n\r\n /** The transparency with which to draw the particle as an integer in [0,255]. If omitted, it defaults to the current value of [[ParticleCollectionBuilder.transparency]]. */\r\n transparency?: number;\r\n\r\n /** A rotation matrix to orient the particle. If supplied then the particle will not be automatically oriented towards the camera. */\r\n rotationMatrix?: Matrix3d;\r\n}\r\n\r\n/** Interface for producing a collection of particles suitable for use in particle effects.\r\n * Particle effects involve animating hundreds or thousands of small particles to simulate phenomena like smoke, fire, snow, etc.\r\n * A particle collection represents each particle as a quad (rectangle) displaying an image. The position of each particle corresponds to the\r\n * centroid of its quad. The transparency and size of each particle can be specified individually. By default, the quads will always rotate to face the camera\r\n * such that the image is fully visible.\r\n *\r\n * Creating a particle collection using a ParticleCollectionBuilder is far more efficient (in both CPU and GPU usage) than doing so using a [[GraphicBuilder]].\r\n * @see interactive demonstrations of [Snow and Rain](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=snow-rain-sample&imodel=Villa) and\r\n * [Fire and Smoke](https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=fire-sample&imodel=Villa) particle effects.\r\n * @see [SnowEffect]($frontend-devtools) for an example of a particle effect.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ParticleCollectionBuilder {\r\n /** The default transparency for newly-added particles as an integer in [0,255], used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.transparency]] is omitted.\r\n * Changing this value has no effect on the transparency of previously-added particles.\r\n */\r\n transparency: number;\r\n\r\n /** The default size of each particle, used by [[ParticleCollectionBuilder.addParticle]] if [[ParticleProps.size]] is omitted. */\r\n size: XAndY;\r\n\r\n /** Add a particle to the collection.\r\n * If `size` is omitted, `this.size` is used.\r\n * If `transparency` is omitted, `this.transparency` is used.\r\n * @throws Error if particle size is defined and not greater than zero.\r\n */\r\n addParticle: (particle: ParticleProps) => void;\r\n\r\n /** Produces a finished graphic from the accumulated particles.\r\n * It returns the finished graphic, or `undefined` if the collection contains no particles or the [[RenderSystem]] failed to produce the graphic.\r\n * @note After this method returns, the particle collection is empty.\r\n */\r\n finish: () => RenderGraphic | undefined;\r\n}\r\n\r\n/** @public */\r\nexport namespace ParticleCollectionBuilder {\r\n /** Creates a new ParticleCollectionBuilder.\r\n * @throws Error if size is not greater than zero.\r\n */\r\n export function create(params: ParticleCollectionBuilderParams): ParticleCollectionBuilder {\r\n return new Builder(params);\r\n }\r\n}\r\n\r\nclass Particle {\r\n public readonly centroid: Point3d;\r\n public readonly transparency: number;\r\n public readonly width: number;\r\n public readonly height: number;\r\n public readonly rotationMatrix?: Matrix3d;\r\n\r\n public constructor(centroid: XYAndZ, width: number, height: number, transparency: number, rotationMatrix?: Matrix3d) {\r\n this.centroid = Point3d.fromJSON(centroid);\r\n this.transparency = transparency;\r\n this.width = width;\r\n this.height = height;\r\n this.rotationMatrix = rotationMatrix;\r\n }\r\n}\r\n\r\nclass Builder implements ParticleCollectionBuilder {\r\n private readonly _viewport: Viewport;\r\n private readonly _isViewCoords: boolean;\r\n private readonly _pickableId?: Id64String;\r\n private readonly _texture: RenderTexture;\r\n private readonly _size: Vector2d;\r\n private _transparency: number;\r\n private _hasVaryingTransparency = false;\r\n private readonly _localToWorldTransform: Transform;\r\n private readonly _range = Range3d.createNull();\r\n private _particlesOpaque: Particle[] = [];\r\n private _particlesTranslucent: Particle[] = [];\r\n\r\n public constructor(params: ParticleCollectionBuilderParams) {\r\n this._viewport = params.viewport;\r\n this._isViewCoords = true === params.isViewCoords;\r\n this._pickableId = params.pickableId;\r\n this._texture = params.texture;\r\n this._transparency = undefined !== params.transparency ? clampTransparency(params.transparency) : 0;\r\n this._localToWorldTransform = params.origin ? Transform.createTranslationXYZ(params.origin.x, params.origin.y, params.origin.z) : Transform.createIdentity();\r\n\r\n if (\"number\" === typeof params.size)\r\n this._size = new Vector2d(params.size, params.size);\r\n else\r\n this._size = Vector2d.fromJSON(params.size);\r\n\r\n if (this._size.x <= 0 || this._size.y <= 0)\r\n throw new Error(\"Particle size must be greater than zero\");\r\n }\r\n\r\n public get size(): XAndY {\r\n return this._size;\r\n }\r\n\r\n public get transparency() {\r\n return this._transparency;\r\n }\r\n\r\n public set transparency(transparency: number) {\r\n transparency = clampTransparency(transparency);\r\n if (transparency !== this._transparency) {\r\n this._transparency = transparency;\r\n this._hasVaryingTransparency = this._particlesTranslucent.length > 0;\r\n }\r\n }\r\n\r\n public addParticle(props: ParticleProps): void {\r\n const size = props.size ?? this._size;\r\n let width, height;\r\n if (\"number\" === typeof size) {\r\n width = height = size;\r\n } else {\r\n width = size.x;\r\n height = size.y;\r\n }\r\n\r\n if (width <= 0 || height <= 0)\r\n throw new Error(\"A particle must have a size greater than zero\");\r\n\r\n const transparency = undefined !== props.transparency ? clampTransparency(props.transparency) : this.transparency;\r\n if (transparency !== this.transparency && this._particlesTranslucent.length > 0)\r\n this._hasVaryingTransparency = true;\r\n\r\n const particle = new Particle(props, width, height, transparency, props.rotationMatrix);\r\n if (transparency > 0)\r\n this._particlesTranslucent.push(particle);\r\n else\r\n this._particlesOpaque.push(particle);\r\n this._range.extendPoint(particle.centroid);\r\n }\r\n\r\n public finish(): RenderGraphic | undefined {\r\n if (0 === this._particlesTranslucent.length + this._particlesOpaque.length)\r\n return undefined;\r\n\r\n // Order-independent transparency doesn't work well with opaque geometry - it will look semi-transparent.\r\n // If we have a mix of opaque and transparent particles, put them in separate graphics to be rendered in separate passes.\r\n const opaque = this.createGraphic(this._particlesOpaque, 0);\r\n const transparent = this.createGraphic(this._particlesTranslucent, this._hasVaryingTransparency ? undefined : this._transparency);\r\n\r\n // Empty the collection before any return statements.\r\n const range = this._range.clone();\r\n this._range.setNull();\r\n this._particlesOpaque.length = 0;\r\n this._particlesTranslucent.length = 0;\r\n this._hasVaryingTransparency = false;\r\n\r\n if (!transparent && !opaque)\r\n return undefined;\r\n\r\n // Transform from origin to collection, then to world.\r\n const toCollection = Transform.createTranslation(range.center);\r\n const toWorld = toCollection.multiplyTransformTransform(this._localToWorldTransform);\r\n const branch = new GraphicBranch(true);\r\n if (opaque)\r\n branch.add(opaque);\r\n\r\n if (transparent)\r\n branch.add(transparent);\r\n\r\n let graphic = this._viewport.target.renderSystem.createGraphicBranch(branch, toWorld);\r\n\r\n // If we have a pickable Id, produce a batch.\r\n // NB: We pass this._pickableId as the FeatureTable's modelId so that it will be treated like a reality model or a map -\r\n // specifically, it can be located and display a tooltip, but can't be selected.\r\n const featureTable = this._pickableId ? new FeatureTable(1, this._pickableId) : undefined;\r\n if (featureTable) {\r\n this._localToWorldTransform.multiplyRange(range, range);\r\n featureTable.insert(new Feature(this._pickableId));\r\n graphic = this._viewport.target.renderSystem.createBatch(graphic, PackedFeatureTable.pack(featureTable), range);\r\n }\r\n\r\n return graphic;\r\n }\r\n\r\n private createGraphic(particles: Particle[], uniformTransparency: number | undefined): RenderGraphic | undefined {\r\n const numParticles = particles.length;\r\n if (numParticles <= 0)\r\n return undefined;\r\n\r\n // To keep scale values close to 1, compute mean size to use as size of quad.\r\n const meanSize = new Vector2d();\r\n let maxSize = 0;\r\n for (const particle of particles) {\r\n meanSize.x += particle.width;\r\n meanSize.y += particle.height;\r\n if (particle.width > maxSize)\r\n maxSize = particle.width;\r\n if (particle.height > maxSize)\r\n maxSize = particle.height;\r\n }\r\n meanSize.x /= numParticles;\r\n meanSize.y /= numParticles;\r\n\r\n // Define InstancedGraphicParams for particles.\r\n const rangeCenter = this._range.center;\r\n const floatsPerTransform = 12;\r\n const transforms = new Float32Array(floatsPerTransform * numParticles);\r\n const bytesPerOverride = 8;\r\n const symbologyOverrides = undefined === uniformTransparency ? new Uint8Array(bytesPerOverride * numParticles) : undefined;\r\n\r\n const viewToWorld = this._viewport.view.getRotation().transpose();\r\n let tfIndex = 0;\r\n let ovrIndex = 0;\r\n for (const particle of particles) {\r\n const scaleX = particle.width / meanSize.x;\r\n const scaleY = particle.height / meanSize.y;\r\n if (this._isViewCoords) {\r\n // Particles already face the camera in view coords - just apply the scale.\r\n transforms[tfIndex + 0] = scaleX;\r\n transforms[tfIndex + 5] = scaleY;\r\n transforms[tfIndex + 10] = 1;\r\n } else if (undefined !== particle.rotationMatrix) {\r\n // Scale rotation matrix relative to size of quad.\r\n transforms[tfIndex + 0] = particle.rotationMatrix.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = particle.rotationMatrix.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = particle.rotationMatrix.coffs[2];\r\n transforms[tfIndex + 4] = particle.rotationMatrix.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = particle.rotationMatrix.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = particle.rotationMatrix.coffs[5];\r\n transforms[tfIndex + 8] = particle.rotationMatrix.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = particle.rotationMatrix.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = particle.rotationMatrix.coffs[8];\r\n } else {\r\n // Rotate about origin by inverse view matrix so quads always face the camera and scale relative to size of quad.\r\n transforms[tfIndex + 0] = viewToWorld.coffs[0] * scaleX;\r\n transforms[tfIndex + 1] = viewToWorld.coffs[1] * scaleY;\r\n transforms[tfIndex + 2] = viewToWorld.coffs[2];\r\n transforms[tfIndex + 4] = viewToWorld.coffs[3] * scaleX;\r\n transforms[tfIndex + 5] = viewToWorld.coffs[4] * scaleY;\r\n transforms[tfIndex + 6] = viewToWorld.coffs[5];\r\n transforms[tfIndex + 8] = viewToWorld.coffs[6] * scaleX;\r\n transforms[tfIndex + 9] = viewToWorld.coffs[7] * scaleY;\r\n transforms[tfIndex + 10] = viewToWorld.coffs[8];\r\n }\r\n\r\n // Translate relative to center of particles range.\r\n transforms[tfIndex + 3] = particle.centroid.x - rangeCenter.x;\r\n transforms[tfIndex + 7] = particle.centroid.y - rangeCenter.y;\r\n transforms[tfIndex + 11] = particle.centroid.z - rangeCenter.z;\r\n\r\n tfIndex += floatsPerTransform;\r\n\r\n if (symbologyOverrides) {\r\n // See FeatureOverrides.buildLookupTable() for layout.\r\n symbologyOverrides[ovrIndex + 0] = 1 << 2; // OvrFlags.Alpha\r\n symbologyOverrides[ovrIndex + 7] = 0xff - particle.transparency;\r\n\r\n ovrIndex += bytesPerOverride;\r\n }\r\n }\r\n\r\n // Produce instanced quads.\r\n // Note: We do not need to allocate an array of featureIds. If we have a pickableId, all particles refer to the same Feature, with index 0.\r\n // So we leave the vertex attribute disabled causing the shader to receive the default (0, 0, 0) which happens to correspond to our feature index.\r\n const quad = createQuad(meanSize, this._texture, uniformTransparency ?? 0x7f);\r\n const transformCenter = new Point3d(0, 0, 0);\r\n const range = computeRange(this._range, rangeCenter, maxSize);\r\n const instances = { count: numParticles, transforms, transformCenter, symbologyOverrides, range };\r\n return this._viewport.target.renderSystem.createMesh(quad, instances);\r\n }\r\n}\r\n\r\nfunction createQuad(size: XAndY, texture: RenderTexture, transparency: number): MeshParams {\r\n const halfWidth = size.x / 2;\r\n const halfHeight = size.y / 2;\r\n const corners = [\r\n new Point3d(-halfWidth, -halfHeight, 0), new Point3d(halfWidth, -halfHeight, 0),\r\n new Point3d(-halfWidth, halfHeight, 0), new Point3d(halfWidth, halfHeight, 0),\r\n ];\r\n\r\n const range = new Range3d();\r\n range.low = corners[0];\r\n range.high = corners[3];\r\n\r\n const points = new QPoint3dList(QParams3d.fromRange(range));\r\n for (const corner of corners)\r\n points.add(corner);\r\n\r\n const colors = new ColorIndex();\r\n colors.initUniform(ColorDef.white.withTransparency(transparency));\r\n\r\n const quadArgs: MeshArgs = {\r\n points,\r\n vertIndices: [0, 1, 2, 2, 1, 3],\r\n fillFlags: FillFlags.None,\r\n isPlanar: true,\r\n colors,\r\n features: new FeatureIndex(),\r\n textureMapping: {\r\n texture,\r\n uvParams: [new Point2d(0, 1), new Point2d(1, 1), new Point2d(0, 0), new Point2d(1, 0)],\r\n },\r\n };\r\n\r\n return MeshParams.create(quadArgs);\r\n}\r\n\r\nfunction clampTransparency(transparency: number): number {\r\n transparency = Math.min(255, transparency, Math.max(0, transparency));\r\n transparency = Math.floor(transparency);\r\n if (transparency < DisplayParams.minTransparency)\r\n transparency = 0;\r\n\r\n return transparency;\r\n}\r\n\r\nfunction computeRange(centroidRange: Range3d, center: Point3d, maxSize: number): Range3d {\r\n const range2 = centroidRange.clone();\r\n range2.low.subtractInPlace(center);\r\n range2.high.subtractInPlace(center);\r\n const halfSize = maxSize * 0.5;\r\n range2.low.x -= halfSize;\r\n range2.low.y -= halfSize;\r\n range2.low.z -= halfSize;\r\n range2.high.x += halfSize;\r\n range2.high.y += halfSize;\r\n range2.high.z += halfSize;\r\n return range2;\r\n}\r\n"]}
@@ -7,6 +7,7 @@ import { IModelConnection } from "../IModelConnection";
7
7
  /** Describes aspects of a pixel as read from a [[Viewport]].
8
8
  * @see [[Viewport.readPixels]].
9
9
  * @public
10
+ * @extensions
10
11
  */
11
12
  export declare namespace Pixel {
12
13
  /** Describes a single pixel within a [[Pixel.Buffer]]. */
@@ -1 +1 @@
1
- {"version":3,"file":"Pixel.d.ts","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAA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IAAI,CAAC;KACtC;IAED;;OAEG;IACH,KAAY,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAC7D"}
@@ -12,6 +12,7 @@ const core_common_1 = require("@itwin/core-common");
12
12
  /** Describes aspects of a pixel as read from a [[Viewport]].
13
13
  * @see [[Viewport.readPixels]].
14
14
  * @public
15
+ * @extensions
15
16
  */
16
17
  var Pixel;
17
18
  (function (Pixel) {
@@ -1 +1 @@
1
- {"version":3,"file":"Pixel.js","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAA2F;AAG3F;;;GAGG;AACH,IAAiB,KAAK,CAsGrB;AAtGD,WAAiB,KAAK;IACpB,0DAA0D;IAC1D,MAAa,IAAI;QAkBf,gBAAgB;QAChB,YAAmB,OAAiB,EAAE,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,YAAY,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,OAAO,EAAE,YAAiC,EAAE,MAAyB,EAAE,MAAe;YACtM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;YACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAZD,gBAAgB;QAChB,IAAW,YAAY,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,YAAY,IAAI,uBAAS,CAAC,OAAO,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAa9H,qDAAqD;QACrD,IAAW,SAAS;YAClB,OAAO,SAAS,KAAK,IAAI,CA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QAQnB;AAeH,CAAC,EAtGgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAsGrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature, GeometryClass, PackedFeatureTable } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Describes aspects of a pixel as read from a [[Viewport]].\r\n * @see [[Viewport.readPixels]].\r\n * @public\r\n */\r\nexport namespace Pixel {\r\n /** Describes a single pixel within a [[Pixel.Buffer]]. */\r\n export class Data {\r\n /** The feature that produced the pixel. */\r\n public readonly feature?: Feature;\r\n /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */\r\n public readonly distanceFraction: number;\r\n /** The type of geometry that produced the pixel. */\r\n public readonly type: GeometryType;\r\n /** The planarity of the geometry that produced the pixel. */\r\n public readonly planarity: Planarity;\r\n /** @internal */\r\n public readonly featureTable?: PackedFeatureTable;\r\n /** The iModel from which the geometry producing the pixel originated. */\r\n public readonly iModel?: IModelConnection;\r\n /** @internal */\r\n public readonly tileId?: string;\r\n /** @internal */\r\n public get isClassifier(): boolean { return undefined !== this.featureTable && BatchType.Primary !== this.featureTable.type; }\r\n\r\n /** @internal */\r\n public constructor(feature?: Feature, distanceFraction = -1.0, type = GeometryType.Unknown, planarity = Planarity.Unknown, featureTable?: PackedFeatureTable, iModel?: IModelConnection, tileId?: string) {\r\n this.feature = feature;\r\n this.distanceFraction = distanceFraction;\r\n this.type = type;\r\n this.planarity = planarity;\r\n this.featureTable = featureTable;\r\n this.iModel = iModel;\r\n this.tileId = tileId;\r\n }\r\n\r\n /** The Id of the element that produced the pixel. */\r\n public get elementId(): Id64String | undefined {\r\n return undefined !== this.feature ? this.feature.elementId : undefined;\r\n }\r\n\r\n /** The Id of the [SubCategory]($backend) that produced the pixel. */\r\n public get subCategoryId(): Id64String | undefined {\r\n return undefined !== this.feature ? this.feature.subCategoryId : undefined;\r\n }\r\n\r\n /** The class of geometry that produced the pixel. */\r\n public get geometryClass(): GeometryClass | undefined {\r\n return undefined !== this.feature ? this.feature.geometryClass : undefined;\r\n }\r\n }\r\n\r\n /** Describes the type of geometry that produced the [[Pixel.Data]]. */\r\n export enum GeometryType {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the type could not be determined. */\r\n Unknown, // Geometry was not selected, or type could not be determined\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** A surface produced this pixel. */\r\n Surface,\r\n /** A point primitive or polyline produced this pixel. */\r\n Linear,\r\n /** This pixel was produced by an edge of a surface. */\r\n Edge,\r\n /** This pixel was produced by a silhouette edge of a curved surface. */\r\n Silhouette,\r\n }\r\n\r\n /** Describes the planarity of the foremost geometry which produced the pixel. */\r\n export enum Planarity {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the planarity could not be determined. */\r\n Unknown,\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** Planar geometry produced this pixel. */\r\n Planar,\r\n /** Non-planar geometry produced this pixel. */\r\n NonPlanar,\r\n }\r\n\r\n /**\r\n * Bit-mask by which callers of [[Viewport.readPixels]] specify which aspects are of interest.\r\n * Aspects not specified will be omitted from the returned data.\r\n */\r\n export enum Selector {\r\n None = 0,\r\n /** Select the [[Feature]] which produced each pixel, as well as the [[PackedFeatureTable]] from which the feature originated. */\r\n Feature = 1 << 0, // eslint-disable-line @typescript-eslint/no-shadow\r\n /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */\r\n GeometryAndDistance = 1 << 2,\r\n /** Select all aspects of each pixel. */\r\n All = GeometryAndDistance | Feature,\r\n }\r\n\r\n /** A rectangular array of pixels as read from a [[Viewport]]'s frame buffer. Each pixel is represented as a [[Pixel.Data]] object.\r\n * The contents of the pixel buffer will be specified using device pixels, not CSS pixels. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[Viewport.readPixels]].\r\n */\r\n export interface Buffer {\r\n /** Retrieve the data associated with the pixel at (x,y) in view coordinates. */\r\n getPixel(x: number, y: number): Data;\r\n }\r\n\r\n /** A function which receives the results of a call to [[Viewport.readPixels]].\r\n * @note The contents of the buffer become invalid once the Receiver function returns. Do not store a reference to it.\r\n */\r\n export type Receiver = (pixels: Buffer | undefined) => void;\r\n}\r\n"]}
1
+ {"version":3,"file":"Pixel.js","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAA2F;AAG3F;;;;GAIG;AACH,IAAiB,KAAK,CAsGrB;AAtGD,WAAiB,KAAK;IACpB,0DAA0D;IAC1D,MAAa,IAAI;QAkBf,gBAAgB;QAChB,YAAmB,OAAiB,EAAE,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,YAAY,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,OAAO,EAAE,YAAiC,EAAE,MAAyB,EAAE,MAAe;YACtM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;YACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAZD,gBAAgB;QAChB,IAAW,YAAY,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,YAAY,IAAI,uBAAS,CAAC,OAAO,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAA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wC;QACxC,qCAAmC,CAAA;IACrC,CAAC,EARW,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAQnB;AAeH,CAAC,EAtGgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAsGrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature, GeometryClass, PackedFeatureTable } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Describes aspects of a pixel as read from a [[Viewport]].\r\n * @see [[Viewport.readPixels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Pixel {\r\n /** Describes a single pixel within a [[Pixel.Buffer]]. */\r\n export class Data {\r\n /** The feature that produced the pixel. */\r\n public readonly feature?: Feature;\r\n /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */\r\n public readonly distanceFraction: number;\r\n /** The type of geometry that produced the pixel. */\r\n public readonly type: GeometryType;\r\n /** The planarity of the geometry that produced the pixel. */\r\n public readonly planarity: Planarity;\r\n /** @internal */\r\n public readonly featureTable?: PackedFeatureTable;\r\n /** The iModel from which the geometry producing the pixel originated. */\r\n public readonly iModel?: IModelConnection;\r\n /** @internal */\r\n public readonly tileId?: string;\r\n /** @internal */\r\n public get isClassifier(): boolean { return undefined !== this.featureTable && BatchType.Primary !== this.featureTable.type; }\r\n\r\n /** @internal */\r\n public constructor(feature?: Feature, distanceFraction = -1.0, type = GeometryType.Unknown, planarity = Planarity.Unknown, featureTable?: PackedFeatureTable, iModel?: IModelConnection, tileId?: string) {\r\n this.feature = feature;\r\n this.distanceFraction = distanceFraction;\r\n this.type = type;\r\n this.planarity = planarity;\r\n this.featureTable = featureTable;\r\n this.iModel = iModel;\r\n this.tileId = tileId;\r\n }\r\n\r\n /** The Id of the element that produced the pixel. */\r\n public get elementId(): Id64String | undefined {\r\n return undefined !== this.feature ? this.feature.elementId : undefined;\r\n }\r\n\r\n /** The Id of the [SubCategory]($backend) that produced the pixel. */\r\n public get subCategoryId(): Id64String | undefined {\r\n return undefined !== this.feature ? this.feature.subCategoryId : undefined;\r\n }\r\n\r\n /** The class of geometry that produced the pixel. */\r\n public get geometryClass(): GeometryClass | undefined {\r\n return undefined !== this.feature ? this.feature.geometryClass : undefined;\r\n }\r\n }\r\n\r\n /** Describes the type of geometry that produced the [[Pixel.Data]]. */\r\n export enum GeometryType {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the type could not be determined. */\r\n Unknown, // Geometry was not selected, or type could not be determined\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** A surface produced this pixel. */\r\n Surface,\r\n /** A point primitive or polyline produced this pixel. */\r\n Linear,\r\n /** This pixel was produced by an edge of a surface. */\r\n Edge,\r\n /** This pixel was produced by a silhouette edge of a curved surface. */\r\n Silhouette,\r\n }\r\n\r\n /** Describes the planarity of the foremost geometry which produced the pixel. */\r\n export enum Planarity {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the planarity could not be determined. */\r\n Unknown,\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** Planar geometry produced this pixel. */\r\n Planar,\r\n /** Non-planar geometry produced this pixel. */\r\n NonPlanar,\r\n }\r\n\r\n /**\r\n * Bit-mask by which callers of [[Viewport.readPixels]] specify which aspects are of interest.\r\n * Aspects not specified will be omitted from the returned data.\r\n */\r\n export enum Selector {\r\n None = 0,\r\n /** Select the [[Feature]] which produced each pixel, as well as the [[PackedFeatureTable]] from which the feature originated. */\r\n Feature = 1 << 0, // eslint-disable-line @typescript-eslint/no-shadow\r\n /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */\r\n GeometryAndDistance = 1 << 2,\r\n /** Select all aspects of each pixel. */\r\n All = GeometryAndDistance | Feature,\r\n }\r\n\r\n /** A rectangular array of pixels as read from a [[Viewport]]'s frame buffer. Each pixel is represented as a [[Pixel.Data]] object.\r\n * The contents of the pixel buffer will be specified using device pixels, not CSS pixels. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[Viewport.readPixels]].\r\n */\r\n export interface Buffer {\r\n /** Retrieve the data associated with the pixel at (x,y) in view coordinates. */\r\n getPixel(x: number, y: number): Data;\r\n }\r\n\r\n /** A function which receives the results of a call to [[Viewport.readPixels]].\r\n * @note The contents of the buffer become invalid once the Receiver function returns. Do not store a reference to it.\r\n */\r\n export type Receiver = (pixels: Buffer | undefined) => void;\r\n}\r\n"]}
@@ -6,6 +6,7 @@ import { ClipVector } from "@itwin/core-geometry";
6
6
  * A RenderClipVolume is created from a [[ClipVector]] and takes ownership of that ClipVector, expecting that it will not be modified while the RenderClipVolume still references it.
7
7
  * @see [[RenderSystem.createClipVolume]] to create a clip volume.
8
8
  * @public
9
+ * @extensions
9
10
  */
10
11
  export declare abstract class RenderClipVolume {
11
12
  /** The ClipVector from which this volume was created. It must not be modified. */
@@ -1 +1 @@
1
- {"version":3,"file":"RenderClipVolume.d.ts","sourceRoot":"","sources":["../../../src/render/RenderClipVolume.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;GAIG;AACH,8BAAsB,gBAAgB;IACpC,kFAAkF;IAClF,SAAgB,UAAU,EAAE,UAAU,CAAC;IAEvC,SAAS,aAAa,UAAU,EAAE,UAAU;CAG7C"}
1
+ {"version":3,"file":"RenderClipVolume.d.ts","sourceRoot":"","sources":["../../../src/render/RenderClipVolume.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;;GAKG;AACH,8BAAsB,gBAAgB;IACpC,kFAAkF;IAClF,SAAgB,UAAU,EAAE,UAAU,CAAC;IAEvC,SAAS,aAAa,UAAU,EAAE,UAAU;CAG7C"}
@@ -12,6 +12,7 @@ exports.RenderClipVolume = void 0;
12
12
  * A RenderClipVolume is created from a [[ClipVector]] and takes ownership of that ClipVector, expecting that it will not be modified while the RenderClipVolume still references it.
13
13
  * @see [[RenderSystem.createClipVolume]] to create a clip volume.
14
14
  * @public
15
+ * @extensions
15
16
  */
16
17
  class RenderClipVolume {
17
18
  constructor(clipVector) {
@@ -1 +1 @@
1
- {"version":3,"file":"RenderClipVolume.js","sourceRoot":"","sources":["../../../src/render/RenderClipVolume.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;GAIG;AACH,MAAsB,gBAAgB;IAIpC,YAAsB,UAAsB;QAC1C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAPD,4CAOC","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 { ClipVector } from \"@itwin/core-geometry\";\r\n\r\n/** An opaque representation of a clip volume applied to geometry within a [[Viewport]].\r\n * A RenderClipVolume is created from a [[ClipVector]] and takes ownership of that ClipVector, expecting that it will not be modified while the RenderClipVolume still references it.\r\n * @see [[RenderSystem.createClipVolume]] to create a clip volume.\r\n * @public\r\n */\r\nexport abstract class RenderClipVolume {\r\n /** The ClipVector from which this volume was created. It must not be modified. */\r\n public readonly clipVector: ClipVector;\r\n\r\n protected constructor(clipVector: ClipVector) {\r\n this.clipVector = clipVector;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"RenderClipVolume.js","sourceRoot":"","sources":["../../../src/render/RenderClipVolume.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;;GAKG;AACH,MAAsB,gBAAgB;IAIpC,YAAsB,UAAsB;QAC1C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAPD,4CAOC","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 { ClipVector } from \"@itwin/core-geometry\";\r\n\r\n/** An opaque representation of a clip volume applied to geometry within a [[Viewport]].\r\n * A RenderClipVolume is created from a [[ClipVector]] and takes ownership of that ClipVector, expecting that it will not be modified while the RenderClipVolume still references it.\r\n * @see [[RenderSystem.createClipVolume]] to create a clip volume.\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class RenderClipVolume {\r\n /** The ClipVector from which this volume was created. It must not be modified. */\r\n public readonly clipVector: ClipVector;\r\n\r\n protected constructor(clipVector: ClipVector) {\r\n this.clipVector = clipVector;\r\n }\r\n}\r\n"]}