@itwin/frontend-devtools 4.0.0-dev.51 → 4.0.0-dev.54

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 (346) hide show
  1. package/lib/cjs/ClipboardUtilities.d.ts +8 -8
  2. package/lib/cjs/ClipboardUtilities.js +26 -26
  3. package/lib/cjs/FrontEndDevTools.d.ts +19 -19
  4. package/lib/cjs/FrontEndDevTools.js +221 -221
  5. package/lib/cjs/FrontEndDevTools.js.map +1 -1
  6. package/lib/cjs/effects/Convolution.d.ts +68 -68
  7. package/lib/cjs/effects/Convolution.js +148 -148
  8. package/lib/cjs/effects/Convolution.js.map +1 -1
  9. package/lib/cjs/effects/EffectTools.d.ts +33 -33
  10. package/lib/cjs/effects/EffectTools.js +67 -67
  11. package/lib/cjs/effects/EffectTools.js.map +1 -1
  12. package/lib/cjs/effects/Explosion.d.ts +12 -12
  13. package/lib/cjs/effects/Explosion.js +168 -168
  14. package/lib/cjs/effects/Explosion.js.map +1 -1
  15. package/lib/cjs/effects/FlipImage.d.ts +30 -30
  16. package/lib/cjs/effects/FlipImage.js +79 -79
  17. package/lib/cjs/effects/FlipImage.js.map +1 -1
  18. package/lib/cjs/effects/LensDistortion.d.ts +34 -34
  19. package/lib/cjs/effects/LensDistortion.js +88 -88
  20. package/lib/cjs/effects/LensDistortion.js.map +1 -1
  21. package/lib/cjs/effects/Random.d.ts +24 -24
  22. package/lib/cjs/effects/Random.js +49 -49
  23. package/lib/cjs/effects/Saturation.d.ts +30 -30
  24. package/lib/cjs/effects/Saturation.js +59 -59
  25. package/lib/cjs/effects/Saturation.js.map +1 -1
  26. package/lib/cjs/effects/Snow.d.ts +76 -76
  27. package/lib/cjs/effects/Snow.js +187 -187
  28. package/lib/cjs/effects/Snow.js.map +1 -1
  29. package/lib/cjs/effects/Vignette.d.ts +39 -39
  30. package/lib/cjs/effects/Vignette.js +79 -79
  31. package/lib/cjs/effects/Vignette.js.map +1 -1
  32. package/lib/cjs/frontend-devtools.d.ts +82 -82
  33. package/lib/cjs/frontend-devtools.js +102 -98
  34. package/lib/cjs/frontend-devtools.js.map +1 -1
  35. package/lib/cjs/tools/AnimationIntervalTool.d.ts +15 -15
  36. package/lib/cjs/tools/AnimationIntervalTool.js +30 -30
  37. package/lib/cjs/tools/AnimationIntervalTool.js.map +1 -1
  38. package/lib/cjs/tools/ChangeUnitsTool.d.ts +15 -15
  39. package/lib/cjs/tools/ChangeUnitsTool.js +41 -41
  40. package/lib/cjs/tools/ChangeUnitsTool.js.map +1 -1
  41. package/lib/cjs/tools/ClipTools.d.ts +67 -67
  42. package/lib/cjs/tools/ClipTools.js +161 -161
  43. package/lib/cjs/tools/ClipTools.js.map +1 -1
  44. package/lib/cjs/tools/DisplayStyleTools.d.ts +145 -145
  45. package/lib/cjs/tools/DisplayStyleTools.js +368 -368
  46. package/lib/cjs/tools/DisplayStyleTools.js.map +1 -1
  47. package/lib/cjs/tools/EmphasizeElementsTool.d.ts +60 -60
  48. package/lib/cjs/tools/EmphasizeElementsTool.js +154 -154
  49. package/lib/cjs/tools/EmphasizeElementsTool.js.map +1 -1
  50. package/lib/cjs/tools/FrustumDecoration.d.ts +57 -57
  51. package/lib/cjs/tools/FrustumDecoration.js +374 -374
  52. package/lib/cjs/tools/FrustumDecoration.js.map +1 -1
  53. package/lib/cjs/tools/InspectElementTool.d.ts +42 -42
  54. package/lib/cjs/tools/InspectElementTool.js +198 -198
  55. package/lib/cjs/tools/InspectElementTool.js.map +1 -1
  56. package/lib/cjs/tools/MapLayerTool.d.ts +264 -264
  57. package/lib/cjs/tools/MapLayerTool.js +507 -507
  58. package/lib/cjs/tools/MapLayerTool.js.map +1 -1
  59. package/lib/cjs/tools/MeasureTileLoadTime.d.ts +12 -12
  60. package/lib/cjs/tools/MeasureTileLoadTime.js +63 -63
  61. package/lib/cjs/tools/MeasureTileLoadTime.js.map +1 -1
  62. package/lib/cjs/tools/ModelAppearanceTools.d.ts +86 -86
  63. package/lib/cjs/tools/ModelAppearanceTools.js +183 -183
  64. package/lib/cjs/tools/ModelAppearanceTools.js.map +1 -1
  65. package/lib/cjs/tools/PlanProjectionTools.d.ts +40 -40
  66. package/lib/cjs/tools/PlanProjectionTools.js +149 -149
  67. package/lib/cjs/tools/PlanProjectionTools.js.map +1 -1
  68. package/lib/cjs/tools/PlanarMaskTools.d.ts +182 -182
  69. package/lib/cjs/tools/PlanarMaskTools.js +391 -391
  70. package/lib/cjs/tools/PlanarMaskTools.js.map +1 -1
  71. package/lib/cjs/tools/ProjectExtents.d.ts +41 -41
  72. package/lib/cjs/tools/ProjectExtents.js +110 -110
  73. package/lib/cjs/tools/ProjectExtents.js.map +1 -1
  74. package/lib/cjs/tools/RealityModelTools.d.ts +116 -116
  75. package/lib/cjs/tools/RealityModelTools.js +281 -281
  76. package/lib/cjs/tools/RealityModelTools.js.map +1 -1
  77. package/lib/cjs/tools/RealityTransitionTool.d.ts +25 -25
  78. package/lib/cjs/tools/RealityTransitionTool.js +115 -115
  79. package/lib/cjs/tools/RealityTransitionTool.js.map +1 -1
  80. package/lib/cjs/tools/RenderSystemTools.d.ts +38 -38
  81. package/lib/cjs/tools/RenderSystemTools.js +69 -69
  82. package/lib/cjs/tools/RenderSystemTools.js.map +1 -1
  83. package/lib/cjs/tools/RenderTargetTools.d.ts +107 -107
  84. package/lib/cjs/tools/RenderTargetTools.d.ts.map +1 -1
  85. package/lib/cjs/tools/RenderTargetTools.js +174 -174
  86. package/lib/cjs/tools/RenderTargetTools.js.map +1 -1
  87. package/lib/cjs/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
  88. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js +30 -30
  89. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  90. package/lib/cjs/tools/SavedViews.d.ts +46 -46
  91. package/lib/cjs/tools/SavedViews.js +136 -136
  92. package/lib/cjs/tools/SavedViews.js.map +1 -1
  93. package/lib/cjs/tools/ScheduleScriptTools.d.ts +37 -37
  94. package/lib/cjs/tools/ScheduleScriptTools.js +157 -157
  95. package/lib/cjs/tools/ScheduleScriptTools.js.map +1 -1
  96. package/lib/cjs/tools/SelectionTools.d.ts +28 -28
  97. package/lib/cjs/tools/SelectionTools.js +87 -87
  98. package/lib/cjs/tools/SelectionTools.js.map +1 -1
  99. package/lib/cjs/tools/SetGpuMemoryLimitTool.d.ts +15 -15
  100. package/lib/cjs/tools/SetGpuMemoryLimitTool.js +33 -33
  101. package/lib/cjs/tools/SetGpuMemoryLimitTool.js.map +1 -1
  102. package/lib/cjs/tools/SourceAspectIdTools.d.ts +40 -40
  103. package/lib/cjs/tools/SourceAspectIdTools.d.ts.map +1 -1
  104. package/lib/cjs/tools/SourceAspectIdTools.js +86 -85
  105. package/lib/cjs/tools/SourceAspectIdTools.js.map +1 -1
  106. package/lib/cjs/tools/TileRequestDecoration.d.ts +12 -12
  107. package/lib/cjs/tools/TileRequestDecoration.js +83 -83
  108. package/lib/cjs/tools/TileRequestDecoration.js.map +1 -1
  109. package/lib/cjs/tools/TileTreeBoundsDecoration.d.ts +11 -11
  110. package/lib/cjs/tools/TileTreeBoundsDecoration.js +74 -74
  111. package/lib/cjs/tools/TileTreeBoundsDecoration.js.map +1 -1
  112. package/lib/cjs/tools/ToolTipProvider.d.ts +15 -15
  113. package/lib/cjs/tools/ToolTipProvider.js +66 -66
  114. package/lib/cjs/tools/ToolTipProvider.js.map +1 -1
  115. package/lib/cjs/tools/ViewportTools.d.ts +218 -218
  116. package/lib/cjs/tools/ViewportTools.js +516 -516
  117. package/lib/cjs/tools/ViewportTools.js.map +1 -1
  118. package/lib/cjs/tools/parseArgs.d.ts +23 -23
  119. package/lib/cjs/tools/parseArgs.js +51 -51
  120. package/lib/cjs/tools/parseBoolean.d.ts +8 -8
  121. package/lib/cjs/tools/parseBoolean.js +26 -26
  122. package/lib/cjs/tools/parseToggle.d.ts +8 -8
  123. package/lib/cjs/tools/parseToggle.js +25 -25
  124. package/lib/cjs/ui/Button.d.ts +29 -29
  125. package/lib/cjs/ui/Button.d.ts.map +1 -1
  126. package/lib/cjs/ui/Button.js +26 -26
  127. package/lib/cjs/ui/CheckBox.d.ts +23 -23
  128. package/lib/cjs/ui/CheckBox.d.ts.map +1 -1
  129. package/lib/cjs/ui/CheckBox.js +27 -27
  130. package/lib/cjs/ui/ColorInput.d.ts +27 -27
  131. package/lib/cjs/ui/ColorInput.d.ts.map +1 -1
  132. package/lib/cjs/ui/ColorInput.js +53 -53
  133. package/lib/cjs/ui/ComboBox.d.ts +28 -28
  134. package/lib/cjs/ui/ComboBox.d.ts.map +1 -1
  135. package/lib/cjs/ui/ComboBox.js +42 -42
  136. package/lib/cjs/ui/DataList.d.ts +27 -27
  137. package/lib/cjs/ui/DataList.d.ts.map +1 -1
  138. package/lib/cjs/ui/DataList.js +39 -39
  139. package/lib/cjs/ui/NestedMenu.d.ts +19 -19
  140. package/lib/cjs/ui/NestedMenu.d.ts.map +1 -1
  141. package/lib/cjs/ui/NestedMenu.js +46 -46
  142. package/lib/cjs/ui/NumericInput.d.ts +35 -35
  143. package/lib/cjs/ui/NumericInput.d.ts.map +1 -1
  144. package/lib/cjs/ui/NumericInput.js +61 -61
  145. package/lib/cjs/ui/RadioBox.d.ts +29 -29
  146. package/lib/cjs/ui/RadioBox.d.ts.map +1 -1
  147. package/lib/cjs/ui/RadioBox.js +76 -76
  148. package/lib/cjs/ui/Slider.d.ts +28 -28
  149. package/lib/cjs/ui/Slider.d.ts.map +1 -1
  150. package/lib/cjs/ui/Slider.js +42 -42
  151. package/lib/cjs/ui/TextBox.d.ts +32 -32
  152. package/lib/cjs/ui/TextBox.d.ts.map +1 -1
  153. package/lib/cjs/ui/TextBox.js +56 -56
  154. package/lib/cjs/widgets/DiagnosticsPanel.d.ts +37 -37
  155. package/lib/cjs/widgets/DiagnosticsPanel.js +81 -81
  156. package/lib/cjs/widgets/FpsTracker.d.ts +19 -19
  157. package/lib/cjs/widgets/FpsTracker.js +56 -56
  158. package/lib/cjs/widgets/GpuProfiler.d.ts +16 -16
  159. package/lib/cjs/widgets/GpuProfiler.js +192 -192
  160. package/lib/cjs/widgets/KeyinField.d.ts +61 -61
  161. package/lib/cjs/widgets/KeyinField.js +186 -186
  162. package/lib/cjs/widgets/MemoryTracker.d.ts +27 -27
  163. package/lib/cjs/widgets/MemoryTracker.js +242 -242
  164. package/lib/cjs/widgets/MemoryTracker.js.map +1 -1
  165. package/lib/cjs/widgets/RenderCommandBreakdown.d.ts +15 -15
  166. package/lib/cjs/widgets/RenderCommandBreakdown.js +67 -67
  167. package/lib/cjs/widgets/TileMemoryBreakdown.d.ts +30 -30
  168. package/lib/cjs/widgets/TileMemoryBreakdown.js +203 -203
  169. package/lib/cjs/widgets/TileStatisticsTracker.d.ts +21 -21
  170. package/lib/cjs/widgets/TileStatisticsTracker.js +144 -144
  171. package/lib/cjs/widgets/ToolSettingsTracker.d.ts +9 -9
  172. package/lib/cjs/widgets/ToolSettingsTracker.js +211 -211
  173. package/lib/cjs/widgets/ToolSettingsTracker.js.map +1 -1
  174. package/lib/esm/ClipboardUtilities.d.ts +8 -8
  175. package/lib/esm/ClipboardUtilities.js +22 -22
  176. package/lib/esm/FrontEndDevTools.d.ts +19 -19
  177. package/lib/esm/FrontEndDevTools.js +218 -217
  178. package/lib/esm/FrontEndDevTools.js.map +1 -1
  179. package/lib/esm/effects/Convolution.d.ts +68 -68
  180. package/lib/esm/effects/Convolution.js +144 -138
  181. package/lib/esm/effects/Convolution.js.map +1 -1
  182. package/lib/esm/effects/EffectTools.d.ts +33 -33
  183. package/lib/esm/effects/EffectTools.js +63 -61
  184. package/lib/esm/effects/EffectTools.js.map +1 -1
  185. package/lib/esm/effects/Explosion.d.ts +12 -12
  186. package/lib/esm/effects/Explosion.js +165 -164
  187. package/lib/esm/effects/Explosion.js.map +1 -1
  188. package/lib/esm/effects/FlipImage.d.ts +30 -30
  189. package/lib/esm/effects/FlipImage.js +76 -74
  190. package/lib/esm/effects/FlipImage.js.map +1 -1
  191. package/lib/esm/effects/LensDistortion.d.ts +34 -34
  192. package/lib/esm/effects/LensDistortion.js +85 -83
  193. package/lib/esm/effects/LensDistortion.js.map +1 -1
  194. package/lib/esm/effects/Random.d.ts +24 -24
  195. package/lib/esm/effects/Random.js +41 -41
  196. package/lib/esm/effects/Saturation.d.ts +30 -30
  197. package/lib/esm/effects/Saturation.js +56 -54
  198. package/lib/esm/effects/Saturation.js.map +1 -1
  199. package/lib/esm/effects/Snow.d.ts +76 -76
  200. package/lib/esm/effects/Snow.js +184 -182
  201. package/lib/esm/effects/Snow.js.map +1 -1
  202. package/lib/esm/effects/Vignette.d.ts +39 -39
  203. package/lib/esm/effects/Vignette.js +76 -74
  204. package/lib/esm/effects/Vignette.js.map +1 -1
  205. package/lib/esm/frontend-devtools.d.ts +82 -82
  206. package/lib/esm/frontend-devtools.js +86 -86
  207. package/lib/esm/tools/AnimationIntervalTool.d.ts +15 -15
  208. package/lib/esm/tools/AnimationIntervalTool.js +27 -26
  209. package/lib/esm/tools/AnimationIntervalTool.js.map +1 -1
  210. package/lib/esm/tools/ChangeUnitsTool.d.ts +15 -15
  211. package/lib/esm/tools/ChangeUnitsTool.js +38 -37
  212. package/lib/esm/tools/ChangeUnitsTool.js.map +1 -1
  213. package/lib/esm/tools/ClipTools.d.ts +67 -67
  214. package/lib/esm/tools/ClipTools.js +158 -155
  215. package/lib/esm/tools/ClipTools.js.map +1 -1
  216. package/lib/esm/tools/DisplayStyleTools.d.ts +145 -145
  217. package/lib/esm/tools/DisplayStyleTools.js +364 -354
  218. package/lib/esm/tools/DisplayStyleTools.js.map +1 -1
  219. package/lib/esm/tools/EmphasizeElementsTool.d.ts +60 -60
  220. package/lib/esm/tools/EmphasizeElementsTool.js +150 -145
  221. package/lib/esm/tools/EmphasizeElementsTool.js.map +1 -1
  222. package/lib/esm/tools/FrustumDecoration.d.ts +57 -57
  223. package/lib/esm/tools/FrustumDecoration.js +370 -367
  224. package/lib/esm/tools/FrustumDecoration.js.map +1 -1
  225. package/lib/esm/tools/InspectElementTool.d.ts +42 -42
  226. package/lib/esm/tools/InspectElementTool.js +195 -194
  227. package/lib/esm/tools/InspectElementTool.js.map +1 -1
  228. package/lib/esm/tools/MapLayerTool.d.ts +264 -264
  229. package/lib/esm/tools/MapLayerTool.js +504 -485
  230. package/lib/esm/tools/MapLayerTool.js.map +1 -1
  231. package/lib/esm/tools/MeasureTileLoadTime.d.ts +12 -12
  232. package/lib/esm/tools/MeasureTileLoadTime.js +60 -59
  233. package/lib/esm/tools/MeasureTileLoadTime.js.map +1 -1
  234. package/lib/esm/tools/ModelAppearanceTools.d.ts +86 -86
  235. package/lib/esm/tools/ModelAppearanceTools.js +180 -172
  236. package/lib/esm/tools/ModelAppearanceTools.js.map +1 -1
  237. package/lib/esm/tools/PlanProjectionTools.d.ts +40 -40
  238. package/lib/esm/tools/PlanProjectionTools.js +146 -143
  239. package/lib/esm/tools/PlanProjectionTools.js.map +1 -1
  240. package/lib/esm/tools/PlanarMaskTools.d.ts +182 -182
  241. package/lib/esm/tools/PlanarMaskTools.js +387 -375
  242. package/lib/esm/tools/PlanarMaskTools.js.map +1 -1
  243. package/lib/esm/tools/ProjectExtents.d.ts +41 -41
  244. package/lib/esm/tools/ProjectExtents.js +105 -104
  245. package/lib/esm/tools/ProjectExtents.js.map +1 -1
  246. package/lib/esm/tools/RealityModelTools.d.ts +116 -116
  247. package/lib/esm/tools/RealityModelTools.js +278 -268
  248. package/lib/esm/tools/RealityModelTools.js.map +1 -1
  249. package/lib/esm/tools/RealityTransitionTool.d.ts +25 -25
  250. package/lib/esm/tools/RealityTransitionTool.js +112 -111
  251. package/lib/esm/tools/RealityTransitionTool.js.map +1 -1
  252. package/lib/esm/tools/RenderSystemTools.d.ts +38 -38
  253. package/lib/esm/tools/RenderSystemTools.js +65 -62
  254. package/lib/esm/tools/RenderSystemTools.js.map +1 -1
  255. package/lib/esm/tools/RenderTargetTools.d.ts +107 -107
  256. package/lib/esm/tools/RenderTargetTools.d.ts.map +1 -1
  257. package/lib/esm/tools/RenderTargetTools.js +169 -159
  258. package/lib/esm/tools/RenderTargetTools.js.map +1 -1
  259. package/lib/esm/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
  260. package/lib/esm/tools/ReportWebGLCompatibilityTool.js +27 -26
  261. package/lib/esm/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  262. package/lib/esm/tools/SavedViews.d.ts +46 -46
  263. package/lib/esm/tools/SavedViews.js +131 -128
  264. package/lib/esm/tools/SavedViews.js.map +1 -1
  265. package/lib/esm/tools/ScheduleScriptTools.d.ts +37 -37
  266. package/lib/esm/tools/ScheduleScriptTools.js +154 -151
  267. package/lib/esm/tools/ScheduleScriptTools.js.map +1 -1
  268. package/lib/esm/tools/SelectionTools.d.ts +28 -28
  269. package/lib/esm/tools/SelectionTools.js +84 -82
  270. package/lib/esm/tools/SelectionTools.js.map +1 -1
  271. package/lib/esm/tools/SetGpuMemoryLimitTool.d.ts +15 -15
  272. package/lib/esm/tools/SetGpuMemoryLimitTool.js +30 -29
  273. package/lib/esm/tools/SetGpuMemoryLimitTool.js.map +1 -1
  274. package/lib/esm/tools/SourceAspectIdTools.d.ts +40 -40
  275. package/lib/esm/tools/SourceAspectIdTools.d.ts.map +1 -1
  276. package/lib/esm/tools/SourceAspectIdTools.js +82 -79
  277. package/lib/esm/tools/SourceAspectIdTools.js.map +1 -1
  278. package/lib/esm/tools/TileRequestDecoration.d.ts +12 -12
  279. package/lib/esm/tools/TileRequestDecoration.js +80 -79
  280. package/lib/esm/tools/TileRequestDecoration.js.map +1 -1
  281. package/lib/esm/tools/TileTreeBoundsDecoration.d.ts +11 -11
  282. package/lib/esm/tools/TileTreeBoundsDecoration.js +71 -70
  283. package/lib/esm/tools/TileTreeBoundsDecoration.js.map +1 -1
  284. package/lib/esm/tools/ToolTipProvider.d.ts +15 -15
  285. package/lib/esm/tools/ToolTipProvider.js +63 -62
  286. package/lib/esm/tools/ToolTipProvider.js.map +1 -1
  287. package/lib/esm/tools/ViewportTools.d.ts +218 -218
  288. package/lib/esm/tools/ViewportTools.js +511 -492
  289. package/lib/esm/tools/ViewportTools.js.map +1 -1
  290. package/lib/esm/tools/parseArgs.d.ts +23 -23
  291. package/lib/esm/tools/parseArgs.js +47 -47
  292. package/lib/esm/tools/parseBoolean.d.ts +8 -8
  293. package/lib/esm/tools/parseBoolean.js +22 -22
  294. package/lib/esm/tools/parseToggle.d.ts +8 -8
  295. package/lib/esm/tools/parseToggle.js +21 -21
  296. package/lib/esm/ui/Button.d.ts +29 -29
  297. package/lib/esm/ui/Button.d.ts.map +1 -1
  298. package/lib/esm/ui/Button.js +22 -22
  299. package/lib/esm/ui/CheckBox.d.ts +23 -23
  300. package/lib/esm/ui/CheckBox.d.ts.map +1 -1
  301. package/lib/esm/ui/CheckBox.js +23 -23
  302. package/lib/esm/ui/ColorInput.d.ts +27 -27
  303. package/lib/esm/ui/ColorInput.d.ts.map +1 -1
  304. package/lib/esm/ui/ColorInput.js +48 -48
  305. package/lib/esm/ui/ComboBox.d.ts +28 -28
  306. package/lib/esm/ui/ComboBox.d.ts.map +1 -1
  307. package/lib/esm/ui/ComboBox.js +38 -38
  308. package/lib/esm/ui/DataList.d.ts +27 -27
  309. package/lib/esm/ui/DataList.d.ts.map +1 -1
  310. package/lib/esm/ui/DataList.js +34 -34
  311. package/lib/esm/ui/NestedMenu.d.ts +19 -19
  312. package/lib/esm/ui/NestedMenu.d.ts.map +1 -1
  313. package/lib/esm/ui/NestedMenu.js +42 -42
  314. package/lib/esm/ui/NumericInput.d.ts +35 -35
  315. package/lib/esm/ui/NumericInput.d.ts.map +1 -1
  316. package/lib/esm/ui/NumericInput.js +56 -56
  317. package/lib/esm/ui/RadioBox.d.ts +29 -29
  318. package/lib/esm/ui/RadioBox.d.ts.map +1 -1
  319. package/lib/esm/ui/RadioBox.js +72 -72
  320. package/lib/esm/ui/Slider.d.ts +28 -28
  321. package/lib/esm/ui/Slider.d.ts.map +1 -1
  322. package/lib/esm/ui/Slider.js +38 -38
  323. package/lib/esm/ui/TextBox.d.ts +32 -32
  324. package/lib/esm/ui/TextBox.d.ts.map +1 -1
  325. package/lib/esm/ui/TextBox.js +52 -52
  326. package/lib/esm/widgets/DiagnosticsPanel.d.ts +37 -37
  327. package/lib/esm/widgets/DiagnosticsPanel.js +77 -77
  328. package/lib/esm/widgets/FpsTracker.d.ts +19 -19
  329. package/lib/esm/widgets/FpsTracker.js +52 -52
  330. package/lib/esm/widgets/GpuProfiler.d.ts +16 -16
  331. package/lib/esm/widgets/GpuProfiler.js +188 -188
  332. package/lib/esm/widgets/KeyinField.d.ts +61 -61
  333. package/lib/esm/widgets/KeyinField.js +182 -182
  334. package/lib/esm/widgets/MemoryTracker.d.ts +27 -27
  335. package/lib/esm/widgets/MemoryTracker.js +237 -237
  336. package/lib/esm/widgets/MemoryTracker.js.map +1 -1
  337. package/lib/esm/widgets/RenderCommandBreakdown.d.ts +15 -15
  338. package/lib/esm/widgets/RenderCommandBreakdown.js +63 -63
  339. package/lib/esm/widgets/TileMemoryBreakdown.d.ts +30 -30
  340. package/lib/esm/widgets/TileMemoryBreakdown.js +199 -199
  341. package/lib/esm/widgets/TileStatisticsTracker.d.ts +21 -21
  342. package/lib/esm/widgets/TileStatisticsTracker.js +140 -140
  343. package/lib/esm/widgets/ToolSettingsTracker.d.ts +9 -9
  344. package/lib/esm/widgets/ToolSettingsTracker.js +208 -207
  345. package/lib/esm/widgets/ToolSettingsTracker.js.map +1 -1
  346. package/package.json +8 -8
@@ -1,68 +1,68 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Widgets
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.RenderCommandBreakdown = void 0;
11
- const core_frontend_1 = require("@itwin/core-frontend");
12
- const CheckBox_1 = require("../ui/CheckBox");
13
- class RenderCommandBreakdown {
14
- constructor(parent) {
15
- this._cells = new Map();
16
- (0, CheckBox_1.createCheckBox)({
17
- parent,
18
- name: "Render Commands",
19
- id: "renderCommandBreakdown",
20
- handler: () => this.toggle(),
21
- });
22
- parent.appendChild(this._div = document.createElement("div"));
23
- this._div.style.display = "none";
24
- this._div.style.textAlign = "right";
25
- this._div.appendChild(this._cellDiv = document.createElement("div"));
26
- this._div.appendChild(this._total = document.createElement("div"));
27
- this._total.innerText = "Total: 0";
28
- }
29
- dispose() {
30
- this.clearInterval();
31
- }
32
- toggle() {
33
- if (undefined !== this._curIntervalId) {
34
- this._div.style.display = "none";
35
- this.clearInterval();
36
- }
37
- else {
38
- this._div.style.display = "block";
39
- this.update();
40
- this._curIntervalId = setInterval(() => this.update(), 500);
41
- }
42
- }
43
- clearInterval() {
44
- if (undefined !== this._curIntervalId) {
45
- clearInterval(this._curIntervalId);
46
- this._curIntervalId = undefined;
47
- }
48
- }
49
- update() {
50
- const ctrl = core_frontend_1.IModelApp.viewManager.selectedView?.target.debugControl;
51
- if (!ctrl)
52
- return;
53
- const cmds = ctrl.getRenderCommands();
54
- let total = 0;
55
- for (const cmd of cmds) {
56
- let cell = this._cells.get(cmd.name);
57
- if (!cell) {
58
- this._cellDiv.appendChild(cell = document.createElement("div"));
59
- this._cells.set(cmd.name, cell);
60
- }
61
- total += cmd.count;
62
- cell.innerText = `${cmd.name}: ${cmd.count}`;
63
- }
64
- this._total.innerText = `Total: ${total}`;
65
- }
66
- }
67
- exports.RenderCommandBreakdown = RenderCommandBreakdown;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Widgets
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.RenderCommandBreakdown = void 0;
11
+ const core_frontend_1 = require("@itwin/core-frontend");
12
+ const CheckBox_1 = require("../ui/CheckBox");
13
+ class RenderCommandBreakdown {
14
+ constructor(parent) {
15
+ this._cells = new Map();
16
+ (0, CheckBox_1.createCheckBox)({
17
+ parent,
18
+ name: "Render Commands",
19
+ id: "renderCommandBreakdown",
20
+ handler: () => this.toggle(),
21
+ });
22
+ parent.appendChild(this._div = document.createElement("div"));
23
+ this._div.style.display = "none";
24
+ this._div.style.textAlign = "right";
25
+ this._div.appendChild(this._cellDiv = document.createElement("div"));
26
+ this._div.appendChild(this._total = document.createElement("div"));
27
+ this._total.innerText = "Total: 0";
28
+ }
29
+ dispose() {
30
+ this.clearInterval();
31
+ }
32
+ toggle() {
33
+ if (undefined !== this._curIntervalId) {
34
+ this._div.style.display = "none";
35
+ this.clearInterval();
36
+ }
37
+ else {
38
+ this._div.style.display = "block";
39
+ this.update();
40
+ this._curIntervalId = setInterval(() => this.update(), 500);
41
+ }
42
+ }
43
+ clearInterval() {
44
+ if (undefined !== this._curIntervalId) {
45
+ clearInterval(this._curIntervalId);
46
+ this._curIntervalId = undefined;
47
+ }
48
+ }
49
+ update() {
50
+ const ctrl = core_frontend_1.IModelApp.viewManager.selectedView?.target.debugControl;
51
+ if (!ctrl)
52
+ return;
53
+ const cmds = ctrl.getRenderCommands();
54
+ let total = 0;
55
+ for (const cmd of cmds) {
56
+ let cell = this._cells.get(cmd.name);
57
+ if (!cell) {
58
+ this._cellDiv.appendChild(cell = document.createElement("div"));
59
+ this._cells.set(cmd.name, cell);
60
+ }
61
+ total += cmd.count;
62
+ cell.innerText = `${cmd.name}: ${cmd.count}`;
63
+ }
64
+ this._total.innerText = `Total: ${total}`;
65
+ }
66
+ }
67
+ exports.RenderCommandBreakdown = RenderCommandBreakdown;
68
68
  //# sourceMappingURL=RenderCommandBreakdown.js.map
@@ -1,31 +1,31 @@
1
- /** @packageDocumentation
2
- * @module Widgets
3
- */
4
- /** Breaks down the GPU memory allocated to tiles into categories displayed in two panes.
5
- * The left-hand pane obtains its information from [TileAdmin]($frontend), displaying the number of selected and unselected tiles that are consuming graphics memory along with the amount of memory consumed.
6
- * The right-hand pane computes its information from the set of all [TileTree]($frontend)s, broken down into groups:
7
- * - "Selected" - tiles that have been selected for display in at least one viewport.
8
- * - "Ancestors" - tiles not selected for display, but have descendents selected for display.
9
- * - "Descendants" - tiles not selected for display, but have ancestors selected for display.
10
- * - "Orphans" - tiles not selected for display that have no ancestors nor descendants selected for display.
11
- * - "Total" - totals of the above categories.
12
- *
13
- * Each row of data shows `(number of tiles) Group Name: amount of memory consumed by group`.
14
- * The number of tiles in each group includes only those tiles that are consuming a non-zero amount of GPU memory.
15
- * The widget includes a checkbox to toggle tracking and display of these statistics.
16
- * @beta
17
- */
18
- export declare class TileMemoryBreakdown {
19
- private readonly _tracer;
20
- private readonly _div;
21
- private _curIntervalId?;
22
- private readonly _statsElements;
23
- private readonly _totalsElements;
24
- /** Construct a new breakdown widget as a child of the specified parent element. */
25
- constructor(parent: HTMLElement);
26
- dispose(): void;
27
- private toggle;
28
- private clearInterval;
29
- private update;
30
- }
1
+ /** @packageDocumentation
2
+ * @module Widgets
3
+ */
4
+ /** Breaks down the GPU memory allocated to tiles into categories displayed in two panes.
5
+ * The left-hand pane obtains its information from [TileAdmin]($frontend), displaying the number of selected and unselected tiles that are consuming graphics memory along with the amount of memory consumed.
6
+ * The right-hand pane computes its information from the set of all [TileTree]($frontend)s, broken down into groups:
7
+ * - "Selected" - tiles that have been selected for display in at least one viewport.
8
+ * - "Ancestors" - tiles not selected for display, but have descendents selected for display.
9
+ * - "Descendants" - tiles not selected for display, but have ancestors selected for display.
10
+ * - "Orphans" - tiles not selected for display that have no ancestors nor descendants selected for display.
11
+ * - "Total" - totals of the above categories.
12
+ *
13
+ * Each row of data shows `(number of tiles) Group Name: amount of memory consumed by group`.
14
+ * The number of tiles in each group includes only those tiles that are consuming a non-zero amount of GPU memory.
15
+ * The widget includes a checkbox to toggle tracking and display of these statistics.
16
+ * @beta
17
+ */
18
+ export declare class TileMemoryBreakdown {
19
+ private readonly _tracer;
20
+ private readonly _div;
21
+ private _curIntervalId?;
22
+ private readonly _statsElements;
23
+ private readonly _totalsElements;
24
+ /** Construct a new breakdown widget as a child of the specified parent element. */
25
+ constructor(parent: HTMLElement);
26
+ dispose(): void;
27
+ private toggle;
28
+ private clearInterval;
29
+ private update;
30
+ }
31
31
  //# sourceMappingURL=TileMemoryBreakdown.d.ts.map
@@ -1,204 +1,204 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Widgets
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.TileMemoryBreakdown = void 0;
11
- const core_frontend_1 = require("@itwin/core-frontend");
12
- const CheckBox_1 = require("../ui/CheckBox");
13
- const MemoryTracker_1 = require("./MemoryTracker");
14
- var TileMemorySelector;
15
- (function (TileMemorySelector) {
16
- TileMemorySelector[TileMemorySelector["Selected"] = 0] = "Selected";
17
- TileMemorySelector[TileMemorySelector["Ancestors"] = 1] = "Ancestors";
18
- TileMemorySelector[TileMemorySelector["Descendants"] = 2] = "Descendants";
19
- TileMemorySelector[TileMemorySelector["Orphaned"] = 3] = "Orphaned";
20
- TileMemorySelector[TileMemorySelector["Total"] = 4] = "Total";
21
- TileMemorySelector[TileMemorySelector["Count"] = 5] = "Count";
22
- })(TileMemorySelector || (TileMemorySelector = {}));
23
- class TileMemoryTracer {
24
- constructor() {
25
- this._stats = new core_frontend_1.RenderMemory.Statistics();
26
- this._processedTiles = new Set();
27
- this.counters = [];
28
- this.numSelected = 0;
29
- for (let i = 0; i < TileMemorySelector.Count; i++)
30
- this.counters.push({ numTiles: 0, bytesUsed: 0 });
31
- }
32
- update() {
33
- this.reset();
34
- const imodels = new Set();
35
- const selectedTiles = new Set();
36
- for (const vp of core_frontend_1.IModelApp.viewManager) {
37
- imodels.add(vp.iModel);
38
- const tiles = core_frontend_1.IModelApp.tileAdmin.getTilesForUser(vp)?.selected;
39
- if (tiles)
40
- for (const tile of tiles)
41
- selectedTiles.add(tile);
42
- }
43
- for (const selected of selectedTiles)
44
- this.add(selected, TileMemorySelector.Selected);
45
- for (const selected of selectedTiles) {
46
- this.processParent(selected.parent);
47
- this.processChildren(selected.children);
48
- }
49
- for (const imodel of imodels) {
50
- imodel.tiles.forEachTreeOwner((owner) => {
51
- const tree = owner.tileTree;
52
- if (tree)
53
- this.processOrphan(tree.rootTile);
54
- });
55
- }
56
- this.counters[TileMemorySelector.Total].numTiles = this.counters.reduce((accum, counter) => accum + counter.numTiles, 0);
57
- this.counters[TileMemorySelector.Total].bytesUsed = this.counters.reduce((accum, counter) => accum + counter.bytesUsed, 0);
58
- }
59
- reset() {
60
- this._processedTiles.clear();
61
- this.numSelected = 0;
62
- for (const counter of this.counters)
63
- counter.numTiles = counter.bytesUsed = 0;
64
- }
65
- add(tile, selector) {
66
- this._processedTiles.add(tile);
67
- this._stats.clear();
68
- tile.collectStatistics(this._stats, false);
69
- const bytesUsed = this._stats.totalBytes;
70
- if (bytesUsed > 0) {
71
- const counter = this.counters[selector];
72
- ++counter.numTiles;
73
- counter.bytesUsed += bytesUsed;
74
- }
75
- }
76
- processParent(parent) {
77
- if (parent && !this._processedTiles.has(parent)) {
78
- this.add(parent, TileMemorySelector.Ancestors);
79
- this.processParent(parent.parent);
80
- }
81
- }
82
- processChildren(children) {
83
- if (!children)
84
- return;
85
- for (const child of children) {
86
- if (!this._processedTiles.has(child)) {
87
- this.add(child, TileMemorySelector.Descendants);
88
- this.processChildren(child.children);
89
- }
90
- }
91
- }
92
- processOrphan(tile) {
93
- if (!this._processedTiles.has(tile))
94
- this.add(tile, TileMemorySelector.Orphaned);
95
- const children = tile.children;
96
- if (children)
97
- for (const child of children)
98
- this.processOrphan(child);
99
- }
100
- }
101
- const statsLabels = ["Selected", "Ancestors", "Descendants", "Orphaned", "Total"];
102
- function format(count, label, bytesUsed) {
103
- return `${count} ${label}: ${(0, MemoryTracker_1.formatMemory)(bytesUsed)}`;
104
- }
105
- /** Breaks down the GPU memory allocated to tiles into categories displayed in two panes.
106
- * The left-hand pane obtains its information from [TileAdmin]($frontend), displaying the number of selected and unselected tiles that are consuming graphics memory along with the amount of memory consumed.
107
- * The right-hand pane computes its information from the set of all [TileTree]($frontend)s, broken down into groups:
108
- * - "Selected" - tiles that have been selected for display in at least one viewport.
109
- * - "Ancestors" - tiles not selected for display, but have descendents selected for display.
110
- * - "Descendants" - tiles not selected for display, but have ancestors selected for display.
111
- * - "Orphans" - tiles not selected for display that have no ancestors nor descendants selected for display.
112
- * - "Total" - totals of the above categories.
113
- *
114
- * Each row of data shows `(number of tiles) Group Name: amount of memory consumed by group`.
115
- * The number of tiles in each group includes only those tiles that are consuming a non-zero amount of GPU memory.
116
- * The widget includes a checkbox to toggle tracking and display of these statistics.
117
- * @beta
118
- */
119
- class TileMemoryBreakdown {
120
- /** Construct a new breakdown widget as a child of the specified parent element. */
121
- constructor(parent) {
122
- this._tracer = new TileMemoryTracer();
123
- this._statsElements = [];
124
- this._totalsElements = [];
125
- (0, CheckBox_1.createCheckBox)({
126
- parent,
127
- name: "Tile Memory Breakdown",
128
- id: "tileMemoryBreakdown",
129
- handler: (_cb) => this.toggle(),
130
- });
131
- parent.appendChild(this._div = document.createElement("div"));
132
- this._div.style.display = "none";
133
- this._div.style.textAlign = "right";
134
- const table = document.createElement("table");
135
- table.style.width = "100%";
136
- table.setAttribute("border", "1");
137
- this._div.appendChild(table);
138
- const row = document.createElement("tr");
139
- const leftCell = document.createElement("td");
140
- const rightCell = document.createElement("td");
141
- leftCell.style.width = rightCell.style.width = "50%";
142
- row.appendChild(leftCell);
143
- row.appendChild(rightCell);
144
- table.appendChild(row);
145
- for (let i = 0; i < TileMemorySelector.Count; i++) {
146
- const div = document.createElement("div");
147
- const elem = document.createElement("text");
148
- this._statsElements.push(elem);
149
- div.appendChild(elem);
150
- rightCell.appendChild(div);
151
- }
152
- for (let i = 0; i < 3; i++) {
153
- const div = document.createElement("div");
154
- const elem = document.createElement("text");
155
- this._totalsElements.push(elem);
156
- div.appendChild(elem);
157
- leftCell.appendChild(div);
158
- }
159
- }
160
- dispose() {
161
- this.clearInterval();
162
- }
163
- toggle() {
164
- if (undefined !== this._curIntervalId) {
165
- this._div.style.display = "none";
166
- this.clearInterval();
167
- }
168
- else {
169
- this._div.style.display = "block";
170
- this.update();
171
- this._curIntervalId = setInterval(() => this.update(), 500);
172
- }
173
- }
174
- clearInterval() {
175
- if (undefined !== this._curIntervalId) {
176
- clearInterval(this._curIntervalId);
177
- this._curIntervalId = undefined;
178
- }
179
- }
180
- update() {
181
- this._tracer.update();
182
- for (let i = 0; i < this._statsElements.length; i++) {
183
- const counter = this._tracer.counters[i];
184
- this._statsElements[i].innerText = format(counter.numTiles, statsLabels[i], counter.bytesUsed);
185
- }
186
- let numUnselected = 0;
187
- let unselectedBytes = 0;
188
- for (const unselected of core_frontend_1.IModelApp.tileAdmin.unselectedLoadedTiles) {
189
- ++numUnselected;
190
- unselectedBytes += unselected.bytesUsed;
191
- }
192
- let numSelected = 0;
193
- let selectedBytes = 0;
194
- for (const selected of core_frontend_1.IModelApp.tileAdmin.selectedLoadedTiles) {
195
- ++numSelected;
196
- selectedBytes += selected.bytesUsed;
197
- }
198
- this._totalsElements[0].innerText = format(numSelected, "Selected", selectedBytes);
199
- this._totalsElements[1].innerText = format(numUnselected, "Unselected", unselectedBytes);
200
- this._totalsElements[2].innerText = format(numSelected + numUnselected, "Total", core_frontend_1.IModelApp.tileAdmin.totalTileContentBytes);
201
- }
202
- }
203
- exports.TileMemoryBreakdown = TileMemoryBreakdown;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Widgets
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.TileMemoryBreakdown = void 0;
11
+ const core_frontend_1 = require("@itwin/core-frontend");
12
+ const CheckBox_1 = require("../ui/CheckBox");
13
+ const MemoryTracker_1 = require("./MemoryTracker");
14
+ var TileMemorySelector;
15
+ (function (TileMemorySelector) {
16
+ TileMemorySelector[TileMemorySelector["Selected"] = 0] = "Selected";
17
+ TileMemorySelector[TileMemorySelector["Ancestors"] = 1] = "Ancestors";
18
+ TileMemorySelector[TileMemorySelector["Descendants"] = 2] = "Descendants";
19
+ TileMemorySelector[TileMemorySelector["Orphaned"] = 3] = "Orphaned";
20
+ TileMemorySelector[TileMemorySelector["Total"] = 4] = "Total";
21
+ TileMemorySelector[TileMemorySelector["Count"] = 5] = "Count";
22
+ })(TileMemorySelector || (TileMemorySelector = {}));
23
+ class TileMemoryTracer {
24
+ constructor() {
25
+ this._stats = new core_frontend_1.RenderMemory.Statistics();
26
+ this._processedTiles = new Set();
27
+ this.counters = [];
28
+ this.numSelected = 0;
29
+ for (let i = 0; i < TileMemorySelector.Count; i++)
30
+ this.counters.push({ numTiles: 0, bytesUsed: 0 });
31
+ }
32
+ update() {
33
+ this.reset();
34
+ const imodels = new Set();
35
+ const selectedTiles = new Set();
36
+ for (const vp of core_frontend_1.IModelApp.viewManager) {
37
+ imodels.add(vp.iModel);
38
+ const tiles = core_frontend_1.IModelApp.tileAdmin.getTilesForUser(vp)?.selected;
39
+ if (tiles)
40
+ for (const tile of tiles)
41
+ selectedTiles.add(tile);
42
+ }
43
+ for (const selected of selectedTiles)
44
+ this.add(selected, TileMemorySelector.Selected);
45
+ for (const selected of selectedTiles) {
46
+ this.processParent(selected.parent);
47
+ this.processChildren(selected.children);
48
+ }
49
+ for (const imodel of imodels) {
50
+ imodel.tiles.forEachTreeOwner((owner) => {
51
+ const tree = owner.tileTree;
52
+ if (tree)
53
+ this.processOrphan(tree.rootTile);
54
+ });
55
+ }
56
+ this.counters[TileMemorySelector.Total].numTiles = this.counters.reduce((accum, counter) => accum + counter.numTiles, 0);
57
+ this.counters[TileMemorySelector.Total].bytesUsed = this.counters.reduce((accum, counter) => accum + counter.bytesUsed, 0);
58
+ }
59
+ reset() {
60
+ this._processedTiles.clear();
61
+ this.numSelected = 0;
62
+ for (const counter of this.counters)
63
+ counter.numTiles = counter.bytesUsed = 0;
64
+ }
65
+ add(tile, selector) {
66
+ this._processedTiles.add(tile);
67
+ this._stats.clear();
68
+ tile.collectStatistics(this._stats, false);
69
+ const bytesUsed = this._stats.totalBytes;
70
+ if (bytesUsed > 0) {
71
+ const counter = this.counters[selector];
72
+ ++counter.numTiles;
73
+ counter.bytesUsed += bytesUsed;
74
+ }
75
+ }
76
+ processParent(parent) {
77
+ if (parent && !this._processedTiles.has(parent)) {
78
+ this.add(parent, TileMemorySelector.Ancestors);
79
+ this.processParent(parent.parent);
80
+ }
81
+ }
82
+ processChildren(children) {
83
+ if (!children)
84
+ return;
85
+ for (const child of children) {
86
+ if (!this._processedTiles.has(child)) {
87
+ this.add(child, TileMemorySelector.Descendants);
88
+ this.processChildren(child.children);
89
+ }
90
+ }
91
+ }
92
+ processOrphan(tile) {
93
+ if (!this._processedTiles.has(tile))
94
+ this.add(tile, TileMemorySelector.Orphaned);
95
+ const children = tile.children;
96
+ if (children)
97
+ for (const child of children)
98
+ this.processOrphan(child);
99
+ }
100
+ }
101
+ const statsLabels = ["Selected", "Ancestors", "Descendants", "Orphaned", "Total"];
102
+ function format(count, label, bytesUsed) {
103
+ return `${count} ${label}: ${(0, MemoryTracker_1.formatMemory)(bytesUsed)}`;
104
+ }
105
+ /** Breaks down the GPU memory allocated to tiles into categories displayed in two panes.
106
+ * The left-hand pane obtains its information from [TileAdmin]($frontend), displaying the number of selected and unselected tiles that are consuming graphics memory along with the amount of memory consumed.
107
+ * The right-hand pane computes its information from the set of all [TileTree]($frontend)s, broken down into groups:
108
+ * - "Selected" - tiles that have been selected for display in at least one viewport.
109
+ * - "Ancestors" - tiles not selected for display, but have descendents selected for display.
110
+ * - "Descendants" - tiles not selected for display, but have ancestors selected for display.
111
+ * - "Orphans" - tiles not selected for display that have no ancestors nor descendants selected for display.
112
+ * - "Total" - totals of the above categories.
113
+ *
114
+ * Each row of data shows `(number of tiles) Group Name: amount of memory consumed by group`.
115
+ * The number of tiles in each group includes only those tiles that are consuming a non-zero amount of GPU memory.
116
+ * The widget includes a checkbox to toggle tracking and display of these statistics.
117
+ * @beta
118
+ */
119
+ class TileMemoryBreakdown {
120
+ /** Construct a new breakdown widget as a child of the specified parent element. */
121
+ constructor(parent) {
122
+ this._tracer = new TileMemoryTracer();
123
+ this._statsElements = [];
124
+ this._totalsElements = [];
125
+ (0, CheckBox_1.createCheckBox)({
126
+ parent,
127
+ name: "Tile Memory Breakdown",
128
+ id: "tileMemoryBreakdown",
129
+ handler: (_cb) => this.toggle(),
130
+ });
131
+ parent.appendChild(this._div = document.createElement("div"));
132
+ this._div.style.display = "none";
133
+ this._div.style.textAlign = "right";
134
+ const table = document.createElement("table");
135
+ table.style.width = "100%";
136
+ table.setAttribute("border", "1");
137
+ this._div.appendChild(table);
138
+ const row = document.createElement("tr");
139
+ const leftCell = document.createElement("td");
140
+ const rightCell = document.createElement("td");
141
+ leftCell.style.width = rightCell.style.width = "50%";
142
+ row.appendChild(leftCell);
143
+ row.appendChild(rightCell);
144
+ table.appendChild(row);
145
+ for (let i = 0; i < TileMemorySelector.Count; i++) {
146
+ const div = document.createElement("div");
147
+ const elem = document.createElement("text");
148
+ this._statsElements.push(elem);
149
+ div.appendChild(elem);
150
+ rightCell.appendChild(div);
151
+ }
152
+ for (let i = 0; i < 3; i++) {
153
+ const div = document.createElement("div");
154
+ const elem = document.createElement("text");
155
+ this._totalsElements.push(elem);
156
+ div.appendChild(elem);
157
+ leftCell.appendChild(div);
158
+ }
159
+ }
160
+ dispose() {
161
+ this.clearInterval();
162
+ }
163
+ toggle() {
164
+ if (undefined !== this._curIntervalId) {
165
+ this._div.style.display = "none";
166
+ this.clearInterval();
167
+ }
168
+ else {
169
+ this._div.style.display = "block";
170
+ this.update();
171
+ this._curIntervalId = setInterval(() => this.update(), 500);
172
+ }
173
+ }
174
+ clearInterval() {
175
+ if (undefined !== this._curIntervalId) {
176
+ clearInterval(this._curIntervalId);
177
+ this._curIntervalId = undefined;
178
+ }
179
+ }
180
+ update() {
181
+ this._tracer.update();
182
+ for (let i = 0; i < this._statsElements.length; i++) {
183
+ const counter = this._tracer.counters[i];
184
+ this._statsElements[i].innerText = format(counter.numTiles, statsLabels[i], counter.bytesUsed);
185
+ }
186
+ let numUnselected = 0;
187
+ let unselectedBytes = 0;
188
+ for (const unselected of core_frontend_1.IModelApp.tileAdmin.unselectedLoadedTiles) {
189
+ ++numUnselected;
190
+ unselectedBytes += unselected.bytesUsed;
191
+ }
192
+ let numSelected = 0;
193
+ let selectedBytes = 0;
194
+ for (const selected of core_frontend_1.IModelApp.tileAdmin.selectedLoadedTiles) {
195
+ ++numSelected;
196
+ selectedBytes += selected.bytesUsed;
197
+ }
198
+ this._totalsElements[0].innerText = format(numSelected, "Selected", selectedBytes);
199
+ this._totalsElements[1].innerText = format(numUnselected, "Unselected", unselectedBytes);
200
+ this._totalsElements[2].innerText = format(numSelected + numUnselected, "Total", core_frontend_1.IModelApp.tileAdmin.totalTileContentBytes);
201
+ }
202
+ }
203
+ exports.TileMemoryBreakdown = TileMemoryBreakdown;
204
204
  //# sourceMappingURL=TileMemoryBreakdown.js.map
@@ -1,22 +1,22 @@
1
- /** @packageDocumentation
2
- * @module Widgets
3
- */
4
- import { Viewport } from "@itwin/core-frontend";
5
- /** Outputs statistics related to tile requests including the current number of active, pending, selected, and ready tile requests; as well as cumulative statistics for the session including the number of failed, timed-out, empty, and elided tile requests.
6
- * @beta
7
- */
8
- export declare class TileStatisticsTracker {
9
- private readonly _statElements;
10
- private readonly _div;
11
- private readonly _vp;
12
- private _curIntervalId?;
13
- constructor(parent: HTMLElement, vp: Viewport);
14
- dispose(): void;
15
- private addMaxActive;
16
- private updateMaxActive;
17
- private clearInterval;
18
- private toggle;
19
- private update;
20
- private reset;
21
- }
1
+ /** @packageDocumentation
2
+ * @module Widgets
3
+ */
4
+ import { Viewport } from "@itwin/core-frontend";
5
+ /** Outputs statistics related to tile requests including the current number of active, pending, selected, and ready tile requests; as well as cumulative statistics for the session including the number of failed, timed-out, empty, and elided tile requests.
6
+ * @beta
7
+ */
8
+ export declare class TileStatisticsTracker {
9
+ private readonly _statElements;
10
+ private readonly _div;
11
+ private readonly _vp;
12
+ private _curIntervalId?;
13
+ constructor(parent: HTMLElement, vp: Viewport);
14
+ dispose(): void;
15
+ private addMaxActive;
16
+ private updateMaxActive;
17
+ private clearInterval;
18
+ private toggle;
19
+ private update;
20
+ private reset;
21
+ }
22
22
  //# sourceMappingURL=TileStatisticsTracker.d.ts.map