@itwin/frontend-devtools 4.0.0-dev.7 → 4.0.0-dev.72
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.
- package/CHANGELOG.md +41 -1
- package/lib/cjs/ClipboardUtilities.d.ts +8 -8
- package/lib/cjs/ClipboardUtilities.js +26 -26
- package/lib/cjs/FrontEndDevTools.d.ts +19 -19
- package/lib/cjs/FrontEndDevTools.js +221 -221
- package/lib/cjs/FrontEndDevTools.js.map +1 -1
- package/lib/cjs/effects/Convolution.d.ts +68 -68
- package/lib/cjs/effects/Convolution.js +148 -148
- package/lib/cjs/effects/Convolution.js.map +1 -1
- package/lib/cjs/effects/EffectTools.d.ts +33 -33
- package/lib/cjs/effects/EffectTools.js +67 -68
- package/lib/cjs/effects/EffectTools.js.map +1 -1
- package/lib/cjs/effects/Explosion.d.ts +12 -12
- package/lib/cjs/effects/Explosion.js +168 -168
- package/lib/cjs/effects/Explosion.js.map +1 -1
- package/lib/cjs/effects/FlipImage.d.ts +30 -30
- package/lib/cjs/effects/FlipImage.js +79 -79
- package/lib/cjs/effects/FlipImage.js.map +1 -1
- package/lib/cjs/effects/LensDistortion.d.ts +34 -34
- package/lib/cjs/effects/LensDistortion.js +88 -88
- package/lib/cjs/effects/LensDistortion.js.map +1 -1
- package/lib/cjs/effects/Random.d.ts +24 -24
- package/lib/cjs/effects/Random.js +49 -49
- package/lib/cjs/effects/Saturation.d.ts +30 -30
- package/lib/cjs/effects/Saturation.js +59 -59
- package/lib/cjs/effects/Saturation.js.map +1 -1
- package/lib/cjs/effects/Snow.d.ts +76 -76
- package/lib/cjs/effects/Snow.js +187 -187
- package/lib/cjs/effects/Snow.js.map +1 -1
- package/lib/cjs/effects/Vignette.d.ts +39 -39
- package/lib/cjs/effects/Vignette.js +79 -79
- package/lib/cjs/effects/Vignette.js.map +1 -1
- package/lib/cjs/frontend-devtools.d.ts +82 -82
- package/lib/cjs/frontend-devtools.js +102 -98
- package/lib/cjs/frontend-devtools.js.map +1 -1
- package/lib/cjs/tools/AnimationIntervalTool.d.ts +15 -15
- package/lib/cjs/tools/AnimationIntervalTool.js +30 -30
- package/lib/cjs/tools/AnimationIntervalTool.js.map +1 -1
- package/lib/cjs/tools/ChangeUnitsTool.d.ts +15 -15
- package/lib/cjs/tools/ChangeUnitsTool.js +41 -41
- package/lib/cjs/tools/ChangeUnitsTool.js.map +1 -1
- package/lib/cjs/tools/ClipTools.d.ts +67 -67
- package/lib/cjs/tools/ClipTools.js +161 -164
- package/lib/cjs/tools/ClipTools.js.map +1 -1
- package/lib/cjs/tools/DisplayStyleTools.d.ts +145 -145
- package/lib/cjs/tools/DisplayStyleTools.js +368 -370
- package/lib/cjs/tools/DisplayStyleTools.js.map +1 -1
- package/lib/cjs/tools/EmphasizeElementsTool.d.ts +60 -60
- package/lib/cjs/tools/EmphasizeElementsTool.js +154 -154
- package/lib/cjs/tools/EmphasizeElementsTool.js.map +1 -1
- package/lib/cjs/tools/FrustumDecoration.d.ts +57 -57
- package/lib/cjs/tools/FrustumDecoration.js +374 -374
- package/lib/cjs/tools/FrustumDecoration.js.map +1 -1
- package/lib/cjs/tools/InspectElementTool.d.ts +42 -42
- package/lib/cjs/tools/InspectElementTool.js +198 -198
- package/lib/cjs/tools/InspectElementTool.js.map +1 -1
- package/lib/cjs/tools/MapLayerTool.d.ts +264 -264
- package/lib/cjs/tools/MapLayerTool.js +507 -507
- package/lib/cjs/tools/MapLayerTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTileLoadTime.d.ts +12 -12
- package/lib/cjs/tools/MeasureTileLoadTime.js +63 -63
- package/lib/cjs/tools/MeasureTileLoadTime.js.map +1 -1
- package/lib/cjs/tools/ModelAppearanceTools.d.ts +86 -86
- package/lib/cjs/tools/ModelAppearanceTools.js +183 -183
- package/lib/cjs/tools/ModelAppearanceTools.js.map +1 -1
- package/lib/cjs/tools/PlanProjectionTools.d.ts +40 -40
- package/lib/cjs/tools/PlanProjectionTools.js +149 -149
- package/lib/cjs/tools/PlanProjectionTools.js.map +1 -1
- package/lib/cjs/tools/PlanarMaskTools.d.ts +182 -182
- package/lib/cjs/tools/PlanarMaskTools.js +391 -393
- package/lib/cjs/tools/PlanarMaskTools.js.map +1 -1
- package/lib/cjs/tools/ProjectExtents.d.ts +41 -41
- package/lib/cjs/tools/ProjectExtents.js +110 -110
- package/lib/cjs/tools/ProjectExtents.js.map +1 -1
- package/lib/cjs/tools/RealityModelTools.d.ts +116 -116
- package/lib/cjs/tools/RealityModelTools.js +281 -281
- package/lib/cjs/tools/RealityModelTools.js.map +1 -1
- package/lib/cjs/tools/RealityTransitionTool.d.ts +25 -25
- package/lib/cjs/tools/RealityTransitionTool.js +115 -116
- package/lib/cjs/tools/RealityTransitionTool.js.map +1 -1
- package/lib/cjs/tools/RenderSystemTools.d.ts +38 -38
- package/lib/cjs/tools/RenderSystemTools.js +69 -70
- package/lib/cjs/tools/RenderSystemTools.js.map +1 -1
- package/lib/cjs/tools/RenderTargetTools.d.ts +107 -107
- package/lib/cjs/tools/RenderTargetTools.d.ts.map +1 -1
- package/lib/cjs/tools/RenderTargetTools.js +174 -174
- package/lib/cjs/tools/RenderTargetTools.js.map +1 -1
- package/lib/cjs/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
- package/lib/cjs/tools/ReportWebGLCompatibilityTool.js +30 -30
- package/lib/cjs/tools/ReportWebGLCompatibilityTool.js.map +1 -1
- package/lib/cjs/tools/SavedViews.d.ts +46 -46
- package/lib/cjs/tools/SavedViews.js +136 -136
- package/lib/cjs/tools/SavedViews.js.map +1 -1
- package/lib/cjs/tools/ScheduleScriptTools.d.ts +37 -37
- package/lib/cjs/tools/ScheduleScriptTools.js +157 -159
- package/lib/cjs/tools/ScheduleScriptTools.js.map +1 -1
- package/lib/cjs/tools/SelectionTools.d.ts +28 -28
- package/lib/cjs/tools/SelectionTools.js +87 -87
- package/lib/cjs/tools/SelectionTools.js.map +1 -1
- package/lib/cjs/tools/SetGpuMemoryLimitTool.d.ts +15 -15
- package/lib/cjs/tools/SetGpuMemoryLimitTool.js +33 -33
- package/lib/cjs/tools/SetGpuMemoryLimitTool.js.map +1 -1
- package/lib/cjs/tools/SourceAspectIdTools.d.ts +40 -40
- package/lib/cjs/tools/SourceAspectIdTools.d.ts.map +1 -1
- package/lib/cjs/tools/SourceAspectIdTools.js +86 -86
- package/lib/cjs/tools/SourceAspectIdTools.js.map +1 -1
- package/lib/cjs/tools/TileRequestDecoration.d.ts +12 -12
- package/lib/cjs/tools/TileRequestDecoration.js +83 -83
- package/lib/cjs/tools/TileRequestDecoration.js.map +1 -1
- package/lib/cjs/tools/TileTreeBoundsDecoration.d.ts +11 -11
- package/lib/cjs/tools/TileTreeBoundsDecoration.js +74 -74
- package/lib/cjs/tools/TileTreeBoundsDecoration.js.map +1 -1
- package/lib/cjs/tools/ToolTipProvider.d.ts +15 -15
- package/lib/cjs/tools/ToolTipProvider.js +66 -66
- package/lib/cjs/tools/ToolTipProvider.js.map +1 -1
- package/lib/cjs/tools/ViewportTools.d.ts +218 -218
- package/lib/cjs/tools/ViewportTools.d.ts.map +1 -1
- package/lib/cjs/tools/ViewportTools.js +516 -516
- package/lib/cjs/tools/ViewportTools.js.map +1 -1
- package/lib/cjs/tools/parseArgs.d.ts +23 -23
- package/lib/cjs/tools/parseArgs.js +51 -51
- package/lib/cjs/tools/parseBoolean.d.ts +8 -8
- package/lib/cjs/tools/parseBoolean.js +26 -26
- package/lib/cjs/tools/parseToggle.d.ts +8 -8
- package/lib/cjs/tools/parseToggle.js +25 -25
- package/lib/cjs/ui/Button.d.ts +29 -29
- package/lib/cjs/ui/Button.d.ts.map +1 -1
- package/lib/cjs/ui/Button.js +26 -26
- package/lib/cjs/ui/CheckBox.d.ts +23 -23
- package/lib/cjs/ui/CheckBox.d.ts.map +1 -1
- package/lib/cjs/ui/CheckBox.js +27 -27
- package/lib/cjs/ui/ColorInput.d.ts +27 -27
- package/lib/cjs/ui/ColorInput.d.ts.map +1 -1
- package/lib/cjs/ui/ColorInput.js +53 -53
- package/lib/cjs/ui/ComboBox.d.ts +28 -28
- package/lib/cjs/ui/ComboBox.d.ts.map +1 -1
- package/lib/cjs/ui/ComboBox.js +42 -42
- package/lib/cjs/ui/DataList.d.ts +27 -27
- package/lib/cjs/ui/DataList.d.ts.map +1 -1
- package/lib/cjs/ui/DataList.js +39 -39
- package/lib/cjs/ui/NestedMenu.d.ts +19 -19
- package/lib/cjs/ui/NestedMenu.d.ts.map +1 -1
- package/lib/cjs/ui/NestedMenu.js +46 -46
- package/lib/cjs/ui/NumericInput.d.ts +35 -35
- package/lib/cjs/ui/NumericInput.d.ts.map +1 -1
- package/lib/cjs/ui/NumericInput.js +61 -61
- package/lib/cjs/ui/RadioBox.d.ts +29 -29
- package/lib/cjs/ui/RadioBox.d.ts.map +1 -1
- package/lib/cjs/ui/RadioBox.js +76 -76
- package/lib/cjs/ui/Slider.d.ts +28 -28
- package/lib/cjs/ui/Slider.d.ts.map +1 -1
- package/lib/cjs/ui/Slider.js +42 -42
- package/lib/cjs/ui/TextBox.d.ts +32 -32
- package/lib/cjs/ui/TextBox.d.ts.map +1 -1
- package/lib/cjs/ui/TextBox.js +56 -56
- package/lib/cjs/widgets/DiagnosticsPanel.d.ts +37 -37
- package/lib/cjs/widgets/DiagnosticsPanel.js +81 -81
- package/lib/cjs/widgets/FpsTracker.d.ts +19 -19
- package/lib/cjs/widgets/FpsTracker.js +56 -56
- package/lib/cjs/widgets/GpuProfiler.d.ts +16 -16
- package/lib/cjs/widgets/GpuProfiler.js +192 -192
- package/lib/cjs/widgets/KeyinField.d.ts +61 -61
- package/lib/cjs/widgets/KeyinField.js +186 -187
- package/lib/cjs/widgets/KeyinField.js.map +1 -1
- package/lib/cjs/widgets/MemoryTracker.d.ts +27 -27
- package/lib/cjs/widgets/MemoryTracker.js +242 -243
- package/lib/cjs/widgets/MemoryTracker.js.map +1 -1
- package/lib/cjs/widgets/RenderCommandBreakdown.d.ts +15 -15
- package/lib/cjs/widgets/RenderCommandBreakdown.js +67 -68
- package/lib/cjs/widgets/RenderCommandBreakdown.js.map +1 -1
- package/lib/cjs/widgets/TileMemoryBreakdown.d.ts +30 -30
- package/lib/cjs/widgets/TileMemoryBreakdown.js +203 -204
- package/lib/cjs/widgets/TileMemoryBreakdown.js.map +1 -1
- package/lib/cjs/widgets/TileStatisticsTracker.d.ts +21 -21
- package/lib/cjs/widgets/TileStatisticsTracker.d.ts.map +1 -1
- package/lib/cjs/widgets/TileStatisticsTracker.js +144 -142
- package/lib/cjs/widgets/TileStatisticsTracker.js.map +1 -1
- package/lib/cjs/widgets/ToolSettingsTracker.d.ts +9 -9
- package/lib/cjs/widgets/ToolSettingsTracker.js +211 -211
- package/lib/cjs/widgets/ToolSettingsTracker.js.map +1 -1
- package/lib/esm/ClipboardUtilities.d.ts +8 -8
- package/lib/esm/ClipboardUtilities.js +22 -22
- package/lib/esm/FrontEndDevTools.d.ts +19 -19
- package/lib/esm/FrontEndDevTools.js +218 -217
- package/lib/esm/FrontEndDevTools.js.map +1 -1
- package/lib/esm/effects/Convolution.d.ts +68 -68
- package/lib/esm/effects/Convolution.js +144 -138
- package/lib/esm/effects/Convolution.js.map +1 -1
- package/lib/esm/effects/EffectTools.d.ts +33 -33
- package/lib/esm/effects/EffectTools.js +63 -62
- package/lib/esm/effects/EffectTools.js.map +1 -1
- package/lib/esm/effects/Explosion.d.ts +12 -12
- package/lib/esm/effects/Explosion.js +165 -164
- package/lib/esm/effects/Explosion.js.map +1 -1
- package/lib/esm/effects/FlipImage.d.ts +30 -30
- package/lib/esm/effects/FlipImage.js +76 -74
- package/lib/esm/effects/FlipImage.js.map +1 -1
- package/lib/esm/effects/LensDistortion.d.ts +34 -34
- package/lib/esm/effects/LensDistortion.js +85 -83
- package/lib/esm/effects/LensDistortion.js.map +1 -1
- package/lib/esm/effects/Random.d.ts +24 -24
- package/lib/esm/effects/Random.js +41 -41
- package/lib/esm/effects/Saturation.d.ts +30 -30
- package/lib/esm/effects/Saturation.js +56 -54
- package/lib/esm/effects/Saturation.js.map +1 -1
- package/lib/esm/effects/Snow.d.ts +76 -76
- package/lib/esm/effects/Snow.js +184 -182
- package/lib/esm/effects/Snow.js.map +1 -1
- package/lib/esm/effects/Vignette.d.ts +39 -39
- package/lib/esm/effects/Vignette.js +76 -74
- package/lib/esm/effects/Vignette.js.map +1 -1
- package/lib/esm/frontend-devtools.d.ts +82 -82
- package/lib/esm/frontend-devtools.js +86 -86
- package/lib/esm/tools/AnimationIntervalTool.d.ts +15 -15
- package/lib/esm/tools/AnimationIntervalTool.js +27 -26
- package/lib/esm/tools/AnimationIntervalTool.js.map +1 -1
- package/lib/esm/tools/ChangeUnitsTool.d.ts +15 -15
- package/lib/esm/tools/ChangeUnitsTool.js +38 -37
- package/lib/esm/tools/ChangeUnitsTool.js.map +1 -1
- package/lib/esm/tools/ClipTools.d.ts +67 -67
- package/lib/esm/tools/ClipTools.js +158 -158
- package/lib/esm/tools/ClipTools.js.map +1 -1
- package/lib/esm/tools/DisplayStyleTools.d.ts +145 -145
- package/lib/esm/tools/DisplayStyleTools.js +364 -356
- package/lib/esm/tools/DisplayStyleTools.js.map +1 -1
- package/lib/esm/tools/EmphasizeElementsTool.d.ts +60 -60
- package/lib/esm/tools/EmphasizeElementsTool.js +150 -145
- package/lib/esm/tools/EmphasizeElementsTool.js.map +1 -1
- package/lib/esm/tools/FrustumDecoration.d.ts +57 -57
- package/lib/esm/tools/FrustumDecoration.js +370 -367
- package/lib/esm/tools/FrustumDecoration.js.map +1 -1
- package/lib/esm/tools/InspectElementTool.d.ts +42 -42
- package/lib/esm/tools/InspectElementTool.js +195 -194
- package/lib/esm/tools/InspectElementTool.js.map +1 -1
- package/lib/esm/tools/MapLayerTool.d.ts +264 -264
- package/lib/esm/tools/MapLayerTool.js +504 -485
- package/lib/esm/tools/MapLayerTool.js.map +1 -1
- package/lib/esm/tools/MeasureTileLoadTime.d.ts +12 -12
- package/lib/esm/tools/MeasureTileLoadTime.js +60 -59
- package/lib/esm/tools/MeasureTileLoadTime.js.map +1 -1
- package/lib/esm/tools/ModelAppearanceTools.d.ts +86 -86
- package/lib/esm/tools/ModelAppearanceTools.js +180 -172
- package/lib/esm/tools/ModelAppearanceTools.js.map +1 -1
- package/lib/esm/tools/PlanProjectionTools.d.ts +40 -40
- package/lib/esm/tools/PlanProjectionTools.js +146 -143
- package/lib/esm/tools/PlanProjectionTools.js.map +1 -1
- package/lib/esm/tools/PlanarMaskTools.d.ts +182 -182
- package/lib/esm/tools/PlanarMaskTools.js +387 -377
- package/lib/esm/tools/PlanarMaskTools.js.map +1 -1
- package/lib/esm/tools/ProjectExtents.d.ts +41 -41
- package/lib/esm/tools/ProjectExtents.js +105 -104
- package/lib/esm/tools/ProjectExtents.js.map +1 -1
- package/lib/esm/tools/RealityModelTools.d.ts +116 -116
- package/lib/esm/tools/RealityModelTools.js +278 -268
- package/lib/esm/tools/RealityModelTools.js.map +1 -1
- package/lib/esm/tools/RealityTransitionTool.d.ts +25 -25
- package/lib/esm/tools/RealityTransitionTool.js +112 -112
- package/lib/esm/tools/RealityTransitionTool.js.map +1 -1
- package/lib/esm/tools/RenderSystemTools.d.ts +38 -38
- package/lib/esm/tools/RenderSystemTools.js +65 -63
- package/lib/esm/tools/RenderSystemTools.js.map +1 -1
- package/lib/esm/tools/RenderTargetTools.d.ts +107 -107
- package/lib/esm/tools/RenderTargetTools.d.ts.map +1 -1
- package/lib/esm/tools/RenderTargetTools.js +169 -159
- package/lib/esm/tools/RenderTargetTools.js.map +1 -1
- package/lib/esm/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
- package/lib/esm/tools/ReportWebGLCompatibilityTool.js +27 -26
- package/lib/esm/tools/ReportWebGLCompatibilityTool.js.map +1 -1
- package/lib/esm/tools/SavedViews.d.ts +46 -46
- package/lib/esm/tools/SavedViews.js +131 -128
- package/lib/esm/tools/SavedViews.js.map +1 -1
- package/lib/esm/tools/ScheduleScriptTools.d.ts +37 -37
- package/lib/esm/tools/ScheduleScriptTools.js +154 -153
- package/lib/esm/tools/ScheduleScriptTools.js.map +1 -1
- package/lib/esm/tools/SelectionTools.d.ts +28 -28
- package/lib/esm/tools/SelectionTools.js +84 -82
- package/lib/esm/tools/SelectionTools.js.map +1 -1
- package/lib/esm/tools/SetGpuMemoryLimitTool.d.ts +15 -15
- package/lib/esm/tools/SetGpuMemoryLimitTool.js +30 -29
- package/lib/esm/tools/SetGpuMemoryLimitTool.js.map +1 -1
- package/lib/esm/tools/SourceAspectIdTools.d.ts +40 -40
- package/lib/esm/tools/SourceAspectIdTools.d.ts.map +1 -1
- package/lib/esm/tools/SourceAspectIdTools.js +82 -80
- package/lib/esm/tools/SourceAspectIdTools.js.map +1 -1
- package/lib/esm/tools/TileRequestDecoration.d.ts +12 -12
- package/lib/esm/tools/TileRequestDecoration.js +80 -79
- package/lib/esm/tools/TileRequestDecoration.js.map +1 -1
- package/lib/esm/tools/TileTreeBoundsDecoration.d.ts +11 -11
- package/lib/esm/tools/TileTreeBoundsDecoration.js +71 -70
- package/lib/esm/tools/TileTreeBoundsDecoration.js.map +1 -1
- package/lib/esm/tools/ToolTipProvider.d.ts +15 -15
- package/lib/esm/tools/ToolTipProvider.js +63 -62
- package/lib/esm/tools/ToolTipProvider.js.map +1 -1
- package/lib/esm/tools/ViewportTools.d.ts +218 -218
- package/lib/esm/tools/ViewportTools.d.ts.map +1 -1
- package/lib/esm/tools/ViewportTools.js +511 -492
- package/lib/esm/tools/ViewportTools.js.map +1 -1
- package/lib/esm/tools/parseArgs.d.ts +23 -23
- package/lib/esm/tools/parseArgs.js +47 -47
- package/lib/esm/tools/parseBoolean.d.ts +8 -8
- package/lib/esm/tools/parseBoolean.js +22 -22
- package/lib/esm/tools/parseToggle.d.ts +8 -8
- package/lib/esm/tools/parseToggle.js +21 -21
- package/lib/esm/ui/Button.d.ts +29 -29
- package/lib/esm/ui/Button.d.ts.map +1 -1
- package/lib/esm/ui/Button.js +22 -22
- package/lib/esm/ui/CheckBox.d.ts +23 -23
- package/lib/esm/ui/CheckBox.d.ts.map +1 -1
- package/lib/esm/ui/CheckBox.js +23 -23
- package/lib/esm/ui/ColorInput.d.ts +27 -27
- package/lib/esm/ui/ColorInput.d.ts.map +1 -1
- package/lib/esm/ui/ColorInput.js +48 -48
- package/lib/esm/ui/ComboBox.d.ts +28 -28
- package/lib/esm/ui/ComboBox.d.ts.map +1 -1
- package/lib/esm/ui/ComboBox.js +38 -38
- package/lib/esm/ui/DataList.d.ts +27 -27
- package/lib/esm/ui/DataList.d.ts.map +1 -1
- package/lib/esm/ui/DataList.js +34 -34
- package/lib/esm/ui/NestedMenu.d.ts +19 -19
- package/lib/esm/ui/NestedMenu.d.ts.map +1 -1
- package/lib/esm/ui/NestedMenu.js +42 -42
- package/lib/esm/ui/NumericInput.d.ts +35 -35
- package/lib/esm/ui/NumericInput.d.ts.map +1 -1
- package/lib/esm/ui/NumericInput.js +56 -56
- package/lib/esm/ui/RadioBox.d.ts +29 -29
- package/lib/esm/ui/RadioBox.d.ts.map +1 -1
- package/lib/esm/ui/RadioBox.js +72 -72
- package/lib/esm/ui/Slider.d.ts +28 -28
- package/lib/esm/ui/Slider.d.ts.map +1 -1
- package/lib/esm/ui/Slider.js +38 -38
- package/lib/esm/ui/TextBox.d.ts +32 -32
- package/lib/esm/ui/TextBox.d.ts.map +1 -1
- package/lib/esm/ui/TextBox.js +52 -52
- package/lib/esm/widgets/DiagnosticsPanel.d.ts +37 -37
- package/lib/esm/widgets/DiagnosticsPanel.js +77 -77
- package/lib/esm/widgets/FpsTracker.d.ts +19 -19
- package/lib/esm/widgets/FpsTracker.js +52 -52
- package/lib/esm/widgets/GpuProfiler.d.ts +16 -16
- package/lib/esm/widgets/GpuProfiler.js +188 -188
- package/lib/esm/widgets/KeyinField.d.ts +61 -61
- package/lib/esm/widgets/KeyinField.js +182 -183
- package/lib/esm/widgets/KeyinField.js.map +1 -1
- package/lib/esm/widgets/MemoryTracker.d.ts +27 -27
- package/lib/esm/widgets/MemoryTracker.js +237 -238
- package/lib/esm/widgets/MemoryTracker.js.map +1 -1
- package/lib/esm/widgets/RenderCommandBreakdown.d.ts +15 -15
- package/lib/esm/widgets/RenderCommandBreakdown.js +63 -64
- package/lib/esm/widgets/RenderCommandBreakdown.js.map +1 -1
- package/lib/esm/widgets/TileMemoryBreakdown.d.ts +30 -30
- package/lib/esm/widgets/TileMemoryBreakdown.js +199 -200
- package/lib/esm/widgets/TileMemoryBreakdown.js.map +1 -1
- package/lib/esm/widgets/TileStatisticsTracker.d.ts +21 -21
- package/lib/esm/widgets/TileStatisticsTracker.d.ts.map +1 -1
- package/lib/esm/widgets/TileStatisticsTracker.js +140 -138
- package/lib/esm/widgets/TileStatisticsTracker.js.map +1 -1
- package/lib/esm/widgets/ToolSettingsTracker.d.ts +9 -9
- package/lib/esm/widgets/ToolSettingsTracker.js +208 -207
- package/lib/esm/widgets/ToolSettingsTracker.js.map +1 -1
- package/package.json +13 -13
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Widgets
|
|
7
|
-
*/
|
|
8
|
-
import { IModelApp } from "@itwin/core-frontend";
|
|
9
|
-
import { createCheckBox } from "../ui/CheckBox";
|
|
10
|
-
export class RenderCommandBreakdown {
|
|
11
|
-
constructor(parent) {
|
|
12
|
-
this._cells = new Map();
|
|
13
|
-
createCheckBox({
|
|
14
|
-
parent,
|
|
15
|
-
name: "Render Commands",
|
|
16
|
-
id: "renderCommandBreakdown",
|
|
17
|
-
handler: () => this.toggle(),
|
|
18
|
-
});
|
|
19
|
-
parent.appendChild(this._div = document.createElement("div"));
|
|
20
|
-
this._div.style.display = "none";
|
|
21
|
-
this._div.style.textAlign = "right";
|
|
22
|
-
this._div.appendChild(this._cellDiv = document.createElement("div"));
|
|
23
|
-
this._div.appendChild(this._total = document.createElement("div"));
|
|
24
|
-
this._total.innerText = "Total: 0";
|
|
25
|
-
}
|
|
26
|
-
dispose() {
|
|
27
|
-
this.clearInterval();
|
|
28
|
-
}
|
|
29
|
-
toggle() {
|
|
30
|
-
if (undefined !== this._curIntervalId) {
|
|
31
|
-
this._div.style.display = "none";
|
|
32
|
-
this.clearInterval();
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
this._div.style.display = "block";
|
|
36
|
-
this.update();
|
|
37
|
-
this._curIntervalId = setInterval(() => this.update(), 500);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
clearInterval() {
|
|
41
|
-
if (undefined !== this._curIntervalId) {
|
|
42
|
-
clearInterval(this._curIntervalId);
|
|
43
|
-
this._curIntervalId = undefined;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
update() {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Widgets
|
|
7
|
+
*/
|
|
8
|
+
import { IModelApp } from "@itwin/core-frontend";
|
|
9
|
+
import { createCheckBox } from "../ui/CheckBox";
|
|
10
|
+
export class RenderCommandBreakdown {
|
|
11
|
+
constructor(parent) {
|
|
12
|
+
this._cells = new Map();
|
|
13
|
+
createCheckBox({
|
|
14
|
+
parent,
|
|
15
|
+
name: "Render Commands",
|
|
16
|
+
id: "renderCommandBreakdown",
|
|
17
|
+
handler: () => this.toggle(),
|
|
18
|
+
});
|
|
19
|
+
parent.appendChild(this._div = document.createElement("div"));
|
|
20
|
+
this._div.style.display = "none";
|
|
21
|
+
this._div.style.textAlign = "right";
|
|
22
|
+
this._div.appendChild(this._cellDiv = document.createElement("div"));
|
|
23
|
+
this._div.appendChild(this._total = document.createElement("div"));
|
|
24
|
+
this._total.innerText = "Total: 0";
|
|
25
|
+
}
|
|
26
|
+
dispose() {
|
|
27
|
+
this.clearInterval();
|
|
28
|
+
}
|
|
29
|
+
toggle() {
|
|
30
|
+
if (undefined !== this._curIntervalId) {
|
|
31
|
+
this._div.style.display = "none";
|
|
32
|
+
this.clearInterval();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this._div.style.display = "block";
|
|
36
|
+
this.update();
|
|
37
|
+
this._curIntervalId = setInterval(() => this.update(), 500);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
clearInterval() {
|
|
41
|
+
if (undefined !== this._curIntervalId) {
|
|
42
|
+
clearInterval(this._curIntervalId);
|
|
43
|
+
this._curIntervalId = undefined;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
update() {
|
|
47
|
+
const ctrl = IModelApp.viewManager.selectedView?.target.debugControl;
|
|
48
|
+
if (!ctrl)
|
|
49
|
+
return;
|
|
50
|
+
const cmds = ctrl.getRenderCommands();
|
|
51
|
+
let total = 0;
|
|
52
|
+
for (const cmd of cmds) {
|
|
53
|
+
let cell = this._cells.get(cmd.name);
|
|
54
|
+
if (!cell) {
|
|
55
|
+
this._cellDiv.appendChild(cell = document.createElement("div"));
|
|
56
|
+
this._cells.set(cmd.name, cell);
|
|
57
|
+
}
|
|
58
|
+
total += cmd.count;
|
|
59
|
+
cell.innerText = `${cmd.name}: ${cmd.count}`;
|
|
60
|
+
}
|
|
61
|
+
this._total.innerText = `Total: ${total}`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
65
64
|
//# sourceMappingURL=RenderCommandBreakdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderCommandBreakdown.js","sourceRoot":"","sources":["../../../src/widgets/RenderCommandBreakdown.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,OAAO,sBAAsB;IAOjC,YAAmB,MAAmB;QAHrB,WAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAIvD,cAAc,CAAC;YACb,MAAM;YACN,IAAI,EAAE,iBAAiB;YACvB,EAAE,EAAE,wBAAwB;YAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE;SAC7B,CAAC,CAAC;QAEH,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,OAAO,CAAC;QAEpC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAErE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,UAAU,CAAC;IACrC,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAEO,MAAM;QACZ,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE;YACrC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YACjC,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB;aAAM;YACL,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;YAClC,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC;SAC7D;IACH,CAAC;IAEO,aAAa;QACnB,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE;YACrC,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACnC,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;SACjC;IACH,CAAC;IAEO,MAAM
|
|
1
|
+
{"version":3,"file":"RenderCommandBreakdown.js","sourceRoot":"","sources":["../../../src/widgets/RenderCommandBreakdown.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,OAAO,sBAAsB;IAOjC,YAAmB,MAAmB;QAHrB,WAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAIvD,cAAc,CAAC;YACb,MAAM;YACN,IAAI,EAAE,iBAAiB;YACvB,EAAE,EAAE,wBAAwB;YAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE;SAC7B,CAAC,CAAC;QAEH,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,OAAO,CAAC;QAEpC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAErE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,UAAU,CAAC;IACrC,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAEO,MAAM;QACZ,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE;YACrC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YACjC,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB;aAAM;YACL,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;YAClC,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC;SAC7D;IACH,CAAC;IAEO,aAAa;QACnB,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE;YACrC,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACnC,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;SACjC;IACH,CAAC;IAEO,MAAM;QACZ,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;QACrE,IAAI,CAAC,IAAI;YACP,OAAO;QAET,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACtC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,IAAI,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,IAAI,EAAE;gBACT,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;gBAChE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aACjC;YAED,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC;YACnB,IAAI,CAAC,SAAS,GAAG,GAAG,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC;SAC9C;QAED,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,UAAU,KAAK,EAAE,CAAC;IAC5C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Widgets\r\n */\r\n\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\nimport { createCheckBox } from \"../ui/CheckBox\";\r\n\r\nexport class RenderCommandBreakdown {\r\n private readonly _div: HTMLDivElement;\r\n private readonly _cellDiv: HTMLDivElement;\r\n private _curIntervalId?: NodeJS.Timer;\r\n private readonly _cells = new Map<string, HTMLElement>();\r\n private readonly _total: HTMLElement;\r\n\r\n public constructor(parent: HTMLElement) {\r\n createCheckBox({\r\n parent,\r\n name: \"Render Commands\",\r\n id: \"renderCommandBreakdown\",\r\n handler: () => this.toggle(),\r\n });\r\n\r\n parent.appendChild(this._div = document.createElement(\"div\"));\r\n this._div.style.display = \"none\";\r\n this._div.style.textAlign = \"right\";\r\n\r\n this._div.appendChild(this._cellDiv = document.createElement(\"div\"));\r\n\r\n this._div.appendChild(this._total = document.createElement(\"div\"));\r\n this._total.innerText = \"Total: 0\";\r\n }\r\n\r\n public dispose(): void {\r\n this.clearInterval();\r\n }\r\n\r\n private toggle(): void {\r\n if (undefined !== this._curIntervalId) {\r\n this._div.style.display = \"none\";\r\n this.clearInterval();\r\n } else {\r\n this._div.style.display = \"block\";\r\n this.update();\r\n this._curIntervalId = setInterval(() => this.update(), 500);\r\n }\r\n }\r\n\r\n private clearInterval(): void {\r\n if (undefined !== this._curIntervalId) {\r\n clearInterval(this._curIntervalId);\r\n this._curIntervalId = undefined;\r\n }\r\n }\r\n\r\n private update(): void {\r\n const ctrl = IModelApp.viewManager.selectedView?.target.debugControl;\r\n if (!ctrl)\r\n return;\r\n\r\n const cmds = ctrl.getRenderCommands();\r\n let total = 0;\r\n for (const cmd of cmds) {\r\n let cell = this._cells.get(cmd.name);\r\n if (!cell) {\r\n this._cellDiv.appendChild(cell = document.createElement(\"div\"));\r\n this._cells.set(cmd.name, cell);\r\n }\r\n\r\n total += cmd.count;\r\n cell.innerText = `${cmd.name}: ${cmd.count}`;\r\n }\r\n\r\n this._total.innerText = `Total: ${total}`;\r\n }\r\n}\r\n"]}
|
|
@@ -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,201 +1,200 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Widgets
|
|
7
|
-
*/
|
|
8
|
-
import { IModelApp, RenderMemory } from "@itwin/core-frontend";
|
|
9
|
-
import { createCheckBox } from "../ui/CheckBox";
|
|
10
|
-
import { formatMemory } from "./MemoryTracker";
|
|
11
|
-
var TileMemorySelector;
|
|
12
|
-
(function (TileMemorySelector) {
|
|
13
|
-
TileMemorySelector[TileMemorySelector["Selected"] = 0] = "Selected";
|
|
14
|
-
TileMemorySelector[TileMemorySelector["Ancestors"] = 1] = "Ancestors";
|
|
15
|
-
TileMemorySelector[TileMemorySelector["Descendants"] = 2] = "Descendants";
|
|
16
|
-
TileMemorySelector[TileMemorySelector["Orphaned"] = 3] = "Orphaned";
|
|
17
|
-
TileMemorySelector[TileMemorySelector["Total"] = 4] = "Total";
|
|
18
|
-
TileMemorySelector[TileMemorySelector["Count"] = 5] = "Count";
|
|
19
|
-
})(TileMemorySelector || (TileMemorySelector = {}));
|
|
20
|
-
class TileMemoryTracer {
|
|
21
|
-
constructor() {
|
|
22
|
-
this._stats = new RenderMemory.Statistics();
|
|
23
|
-
this._processedTiles = new Set();
|
|
24
|
-
this.counters = [];
|
|
25
|
-
this.numSelected = 0;
|
|
26
|
-
for (let i = 0; i < TileMemorySelector.Count; i++)
|
|
27
|
-
this.counters.push({ numTiles: 0, bytesUsed: 0 });
|
|
28
|
-
}
|
|
29
|
-
update() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.counters[TileMemorySelector.Total].
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.
|
|
65
|
-
this._stats
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
* The
|
|
105
|
-
*
|
|
106
|
-
* - "
|
|
107
|
-
* - "
|
|
108
|
-
* - "
|
|
109
|
-
* - "
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* The
|
|
114
|
-
*
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
this._div.style.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
table.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
leftCell
|
|
140
|
-
row.appendChild(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
this.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this.
|
|
168
|
-
this.update();
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
this.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
let
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
let
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
this._totalsElements[
|
|
197
|
-
this._totalsElements[
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Widgets
|
|
7
|
+
*/
|
|
8
|
+
import { IModelApp, RenderMemory } from "@itwin/core-frontend";
|
|
9
|
+
import { createCheckBox } from "../ui/CheckBox";
|
|
10
|
+
import { formatMemory } from "./MemoryTracker";
|
|
11
|
+
var TileMemorySelector;
|
|
12
|
+
(function (TileMemorySelector) {
|
|
13
|
+
TileMemorySelector[TileMemorySelector["Selected"] = 0] = "Selected";
|
|
14
|
+
TileMemorySelector[TileMemorySelector["Ancestors"] = 1] = "Ancestors";
|
|
15
|
+
TileMemorySelector[TileMemorySelector["Descendants"] = 2] = "Descendants";
|
|
16
|
+
TileMemorySelector[TileMemorySelector["Orphaned"] = 3] = "Orphaned";
|
|
17
|
+
TileMemorySelector[TileMemorySelector["Total"] = 4] = "Total";
|
|
18
|
+
TileMemorySelector[TileMemorySelector["Count"] = 5] = "Count";
|
|
19
|
+
})(TileMemorySelector || (TileMemorySelector = {}));
|
|
20
|
+
class TileMemoryTracer {
|
|
21
|
+
constructor() {
|
|
22
|
+
this._stats = new RenderMemory.Statistics();
|
|
23
|
+
this._processedTiles = new Set();
|
|
24
|
+
this.counters = [];
|
|
25
|
+
this.numSelected = 0;
|
|
26
|
+
for (let i = 0; i < TileMemorySelector.Count; i++)
|
|
27
|
+
this.counters.push({ numTiles: 0, bytesUsed: 0 });
|
|
28
|
+
}
|
|
29
|
+
update() {
|
|
30
|
+
this.reset();
|
|
31
|
+
const imodels = new Set();
|
|
32
|
+
const selectedTiles = new Set();
|
|
33
|
+
for (const vp of IModelApp.viewManager) {
|
|
34
|
+
imodels.add(vp.iModel);
|
|
35
|
+
const tiles = IModelApp.tileAdmin.getTilesForUser(vp)?.selected;
|
|
36
|
+
if (tiles)
|
|
37
|
+
for (const tile of tiles)
|
|
38
|
+
selectedTiles.add(tile);
|
|
39
|
+
}
|
|
40
|
+
for (const selected of selectedTiles)
|
|
41
|
+
this.add(selected, TileMemorySelector.Selected);
|
|
42
|
+
for (const selected of selectedTiles) {
|
|
43
|
+
this.processParent(selected.parent);
|
|
44
|
+
this.processChildren(selected.children);
|
|
45
|
+
}
|
|
46
|
+
for (const imodel of imodels) {
|
|
47
|
+
imodel.tiles.forEachTreeOwner((owner) => {
|
|
48
|
+
const tree = owner.tileTree;
|
|
49
|
+
if (tree)
|
|
50
|
+
this.processOrphan(tree.rootTile);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
this.counters[TileMemorySelector.Total].numTiles = this.counters.reduce((accum, counter) => accum + counter.numTiles, 0);
|
|
54
|
+
this.counters[TileMemorySelector.Total].bytesUsed = this.counters.reduce((accum, counter) => accum + counter.bytesUsed, 0);
|
|
55
|
+
}
|
|
56
|
+
reset() {
|
|
57
|
+
this._processedTiles.clear();
|
|
58
|
+
this.numSelected = 0;
|
|
59
|
+
for (const counter of this.counters)
|
|
60
|
+
counter.numTiles = counter.bytesUsed = 0;
|
|
61
|
+
}
|
|
62
|
+
add(tile, selector) {
|
|
63
|
+
this._processedTiles.add(tile);
|
|
64
|
+
this._stats.clear();
|
|
65
|
+
tile.collectStatistics(this._stats, false);
|
|
66
|
+
const bytesUsed = this._stats.totalBytes;
|
|
67
|
+
if (bytesUsed > 0) {
|
|
68
|
+
const counter = this.counters[selector];
|
|
69
|
+
++counter.numTiles;
|
|
70
|
+
counter.bytesUsed += bytesUsed;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
processParent(parent) {
|
|
74
|
+
if (parent && !this._processedTiles.has(parent)) {
|
|
75
|
+
this.add(parent, TileMemorySelector.Ancestors);
|
|
76
|
+
this.processParent(parent.parent);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
processChildren(children) {
|
|
80
|
+
if (!children)
|
|
81
|
+
return;
|
|
82
|
+
for (const child of children) {
|
|
83
|
+
if (!this._processedTiles.has(child)) {
|
|
84
|
+
this.add(child, TileMemorySelector.Descendants);
|
|
85
|
+
this.processChildren(child.children);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
processOrphan(tile) {
|
|
90
|
+
if (!this._processedTiles.has(tile))
|
|
91
|
+
this.add(tile, TileMemorySelector.Orphaned);
|
|
92
|
+
const children = tile.children;
|
|
93
|
+
if (children)
|
|
94
|
+
for (const child of children)
|
|
95
|
+
this.processOrphan(child);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const statsLabels = ["Selected", "Ancestors", "Descendants", "Orphaned", "Total"];
|
|
99
|
+
function format(count, label, bytesUsed) {
|
|
100
|
+
return `${count} ${label}: ${formatMemory(bytesUsed)}`;
|
|
101
|
+
}
|
|
102
|
+
/** Breaks down the GPU memory allocated to tiles into categories displayed in two panes.
|
|
103
|
+
* 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.
|
|
104
|
+
* The right-hand pane computes its information from the set of all [TileTree]($frontend)s, broken down into groups:
|
|
105
|
+
* - "Selected" - tiles that have been selected for display in at least one viewport.
|
|
106
|
+
* - "Ancestors" - tiles not selected for display, but have descendents selected for display.
|
|
107
|
+
* - "Descendants" - tiles not selected for display, but have ancestors selected for display.
|
|
108
|
+
* - "Orphans" - tiles not selected for display that have no ancestors nor descendants selected for display.
|
|
109
|
+
* - "Total" - totals of the above categories.
|
|
110
|
+
*
|
|
111
|
+
* Each row of data shows `(number of tiles) Group Name: amount of memory consumed by group`.
|
|
112
|
+
* The number of tiles in each group includes only those tiles that are consuming a non-zero amount of GPU memory.
|
|
113
|
+
* The widget includes a checkbox to toggle tracking and display of these statistics.
|
|
114
|
+
* @beta
|
|
115
|
+
*/
|
|
116
|
+
export class TileMemoryBreakdown {
|
|
117
|
+
/** Construct a new breakdown widget as a child of the specified parent element. */
|
|
118
|
+
constructor(parent) {
|
|
119
|
+
this._tracer = new TileMemoryTracer();
|
|
120
|
+
this._statsElements = [];
|
|
121
|
+
this._totalsElements = [];
|
|
122
|
+
createCheckBox({
|
|
123
|
+
parent,
|
|
124
|
+
name: "Tile Memory Breakdown",
|
|
125
|
+
id: "tileMemoryBreakdown",
|
|
126
|
+
handler: (_cb) => this.toggle(),
|
|
127
|
+
});
|
|
128
|
+
parent.appendChild(this._div = document.createElement("div"));
|
|
129
|
+
this._div.style.display = "none";
|
|
130
|
+
this._div.style.textAlign = "right";
|
|
131
|
+
const table = document.createElement("table");
|
|
132
|
+
table.style.width = "100%";
|
|
133
|
+
table.setAttribute("border", "1");
|
|
134
|
+
this._div.appendChild(table);
|
|
135
|
+
const row = document.createElement("tr");
|
|
136
|
+
const leftCell = document.createElement("td");
|
|
137
|
+
const rightCell = document.createElement("td");
|
|
138
|
+
leftCell.style.width = rightCell.style.width = "50%";
|
|
139
|
+
row.appendChild(leftCell);
|
|
140
|
+
row.appendChild(rightCell);
|
|
141
|
+
table.appendChild(row);
|
|
142
|
+
for (let i = 0; i < TileMemorySelector.Count; i++) {
|
|
143
|
+
const div = document.createElement("div");
|
|
144
|
+
const elem = document.createElement("text");
|
|
145
|
+
this._statsElements.push(elem);
|
|
146
|
+
div.appendChild(elem);
|
|
147
|
+
rightCell.appendChild(div);
|
|
148
|
+
}
|
|
149
|
+
for (let i = 0; i < 3; i++) {
|
|
150
|
+
const div = document.createElement("div");
|
|
151
|
+
const elem = document.createElement("text");
|
|
152
|
+
this._totalsElements.push(elem);
|
|
153
|
+
div.appendChild(elem);
|
|
154
|
+
leftCell.appendChild(div);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
dispose() {
|
|
158
|
+
this.clearInterval();
|
|
159
|
+
}
|
|
160
|
+
toggle() {
|
|
161
|
+
if (undefined !== this._curIntervalId) {
|
|
162
|
+
this._div.style.display = "none";
|
|
163
|
+
this.clearInterval();
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
this._div.style.display = "block";
|
|
167
|
+
this.update();
|
|
168
|
+
this._curIntervalId = setInterval(() => this.update(), 500);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
clearInterval() {
|
|
172
|
+
if (undefined !== this._curIntervalId) {
|
|
173
|
+
clearInterval(this._curIntervalId);
|
|
174
|
+
this._curIntervalId = undefined;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
update() {
|
|
178
|
+
this._tracer.update();
|
|
179
|
+
for (let i = 0; i < this._statsElements.length; i++) {
|
|
180
|
+
const counter = this._tracer.counters[i];
|
|
181
|
+
this._statsElements[i].innerText = format(counter.numTiles, statsLabels[i], counter.bytesUsed);
|
|
182
|
+
}
|
|
183
|
+
let numUnselected = 0;
|
|
184
|
+
let unselectedBytes = 0;
|
|
185
|
+
for (const unselected of IModelApp.tileAdmin.unselectedLoadedTiles) {
|
|
186
|
+
++numUnselected;
|
|
187
|
+
unselectedBytes += unselected.bytesUsed;
|
|
188
|
+
}
|
|
189
|
+
let numSelected = 0;
|
|
190
|
+
let selectedBytes = 0;
|
|
191
|
+
for (const selected of IModelApp.tileAdmin.selectedLoadedTiles) {
|
|
192
|
+
++numSelected;
|
|
193
|
+
selectedBytes += selected.bytesUsed;
|
|
194
|
+
}
|
|
195
|
+
this._totalsElements[0].innerText = format(numSelected, "Selected", selectedBytes);
|
|
196
|
+
this._totalsElements[1].innerText = format(numUnselected, "Unselected", unselectedBytes);
|
|
197
|
+
this._totalsElements[2].innerText = format(numSelected + numUnselected, "Total", IModelApp.tileAdmin.totalTileContentBytes);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
201
200
|
//# sourceMappingURL=TileMemoryBreakdown.js.map
|