@itwin/frontend-devtools 4.0.0-dev.7 → 4.0.0-dev.70
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 +11 -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 +12 -12
|
@@ -1,357 +1,365 @@
|
|
|
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 Tools
|
|
7
|
-
*/
|
|
8
|
-
import { ColorDef, RenderMode, SkyCube, SkySphere, SubCategoryOverride, ViewFlags, WhiteOnWhiteReversalSettings, } from "@itwin/core-common";
|
|
9
|
-
import { IModelApp, NotifyMessageDetails, OutputMessagePriority, Tool, } from "@itwin/core-frontend";
|
|
10
|
-
import { copyStringToClipboard } from "../ClipboardUtilities";
|
|
11
|
-
import { parseArgs } from "./parseArgs";
|
|
12
|
-
import { parseToggle } from "./parseToggle";
|
|
13
|
-
// Compiler has the info to construct this array for us, but we have no access to it...
|
|
14
|
-
const booleanFlagNames = [
|
|
15
|
-
"dimensions", "patterns", "weights", "styles", "transparency", "fill", "textures", "materials", "acsTriad", "grid", "visibleEdges",
|
|
16
|
-
"hiddenEdges", "lighting", "shadows", "clipVolume", "constructions", "monochrome", "backgroundMap", "ambientOcclusion", "forceSurfaceDiscard",
|
|
17
|
-
"wiremesh",
|
|
18
|
-
];
|
|
19
|
-
const lowercaseBooleanFlagNames = booleanFlagNames.map((name) => name.toLowerCase());
|
|
20
|
-
/** Modifies the selected viewport's DisplayStyleState.
|
|
21
|
-
* @beta
|
|
22
|
-
*/
|
|
23
|
-
export class DisplayStyleTool extends Tool {
|
|
24
|
-
get require3d() { return false; }
|
|
25
|
-
async run() {
|
|
26
|
-
const vp = IModelApp.viewManager.selectedView;
|
|
27
|
-
if (undefined !== vp && (!this.require3d || vp.view.is3d()) && await this.execute(vp))
|
|
28
|
-
vp.displayStyle = vp.view.displayStyle;
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
async parseAndRun(...args) {
|
|
32
|
-
const vp = IModelApp.viewManager.selectedView;
|
|
33
|
-
if (undefined !== vp && (!this.require3d || vp.view.is3d()) && await this.parse(args, vp))
|
|
34
|
-
return this.run();
|
|
35
|
-
else
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/** Modifies the selected viewport's ViewFlags.
|
|
40
|
-
* The keyin syntax is as follows:
|
|
41
|
-
* fdt change viewflags flag=value
|
|
42
|
-
* Where 'flag' is one of the BooleanFlagName values, or "renderMode"; and value is an integer.
|
|
43
|
-
* For boolean flags, value is 0 for false or 1 for true. For renderMode, value is one of the RenderMode enum values.
|
|
44
|
-
* Flag names are case-insensitive.
|
|
45
|
-
* @beta
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
static get maxArgs() { return undefined; }
|
|
49
|
-
static get minArgs() { return 1; }
|
|
50
|
-
async run(vf, vp) {
|
|
51
|
-
if (undefined !== vf && undefined !== vp)
|
|
52
|
-
vp.viewFlags = vf;
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
async parseAndRun(...args) {
|
|
56
|
-
const vp = IModelApp.viewManager.selectedView;
|
|
57
|
-
if (undefined === vp || 0 === args.length)
|
|
58
|
-
return true;
|
|
59
|
-
const vf = { ...vp.viewFlags };
|
|
60
|
-
for (const arg of args) {
|
|
61
|
-
const parts = arg.split("=");
|
|
62
|
-
if (2 !== parts.length)
|
|
63
|
-
continue;
|
|
64
|
-
const value = parseInt(parts[1], 10);
|
|
65
|
-
if (Number.isNaN(value))
|
|
66
|
-
continue;
|
|
67
|
-
const name = parts[0].toLowerCase();
|
|
68
|
-
if (name === "rendermode") {
|
|
69
|
-
switch (value) {
|
|
70
|
-
case RenderMode.SmoothShade:
|
|
71
|
-
case RenderMode.Wireframe:
|
|
72
|
-
case RenderMode.HiddenLine:
|
|
73
|
-
case RenderMode.SolidFill:
|
|
74
|
-
vf.renderMode = value;
|
|
75
|
-
vp.invalidateRenderPlan();
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if (0 !== value && 1 !== value)
|
|
81
|
-
continue;
|
|
82
|
-
const index = lowercaseBooleanFlagNames.indexOf(name);
|
|
83
|
-
if (-1 !== index) {
|
|
84
|
-
const propName = booleanFlagNames[index];
|
|
85
|
-
vf[propName] = 0 !== value;
|
|
86
|
-
vp.invalidateRenderPlan();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return this.run(new ViewFlags(vf), vp);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
ChangeViewFlagsTool.toolId = "ChangeViewFlags";
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
async
|
|
100
|
-
|
|
101
|
-
style
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
get
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
case
|
|
153
|
-
top = bottom = imgs[0];
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* * `
|
|
201
|
-
* * `
|
|
202
|
-
* * `
|
|
203
|
-
*
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this._options.
|
|
224
|
-
this.
|
|
225
|
-
this.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
export
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
const
|
|
286
|
-
props.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
return true;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
async
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
async
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
|
|
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 Tools
|
|
7
|
+
*/
|
|
8
|
+
import { ColorDef, RenderMode, SkyCube, SkySphere, SubCategoryOverride, ViewFlags, WhiteOnWhiteReversalSettings, } from "@itwin/core-common";
|
|
9
|
+
import { IModelApp, NotifyMessageDetails, OutputMessagePriority, Tool, } from "@itwin/core-frontend";
|
|
10
|
+
import { copyStringToClipboard } from "../ClipboardUtilities";
|
|
11
|
+
import { parseArgs } from "./parseArgs";
|
|
12
|
+
import { parseToggle } from "./parseToggle";
|
|
13
|
+
// Compiler has the info to construct this array for us, but we have no access to it...
|
|
14
|
+
const booleanFlagNames = [
|
|
15
|
+
"dimensions", "patterns", "weights", "styles", "transparency", "fill", "textures", "materials", "acsTriad", "grid", "visibleEdges",
|
|
16
|
+
"hiddenEdges", "lighting", "shadows", "clipVolume", "constructions", "monochrome", "backgroundMap", "ambientOcclusion", "forceSurfaceDiscard",
|
|
17
|
+
"wiremesh",
|
|
18
|
+
];
|
|
19
|
+
const lowercaseBooleanFlagNames = booleanFlagNames.map((name) => name.toLowerCase());
|
|
20
|
+
/** Modifies the selected viewport's DisplayStyleState.
|
|
21
|
+
* @beta
|
|
22
|
+
*/
|
|
23
|
+
export class DisplayStyleTool extends Tool {
|
|
24
|
+
get require3d() { return false; }
|
|
25
|
+
async run() {
|
|
26
|
+
const vp = IModelApp.viewManager.selectedView;
|
|
27
|
+
if (undefined !== vp && (!this.require3d || vp.view.is3d()) && await this.execute(vp))
|
|
28
|
+
vp.displayStyle = vp.view.displayStyle;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
async parseAndRun(...args) {
|
|
32
|
+
const vp = IModelApp.viewManager.selectedView;
|
|
33
|
+
if (undefined !== vp && (!this.require3d || vp.view.is3d()) && await this.parse(args, vp))
|
|
34
|
+
return this.run();
|
|
35
|
+
else
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** Modifies the selected viewport's ViewFlags.
|
|
40
|
+
* The keyin syntax is as follows:
|
|
41
|
+
* fdt change viewflags flag=value
|
|
42
|
+
* Where 'flag' is one of the BooleanFlagName values, or "renderMode"; and value is an integer.
|
|
43
|
+
* For boolean flags, value is 0 for false or 1 for true. For renderMode, value is one of the RenderMode enum values.
|
|
44
|
+
* Flag names are case-insensitive.
|
|
45
|
+
* @beta
|
|
46
|
+
*/
|
|
47
|
+
class ChangeViewFlagsTool extends Tool {
|
|
48
|
+
static get maxArgs() { return undefined; }
|
|
49
|
+
static get minArgs() { return 1; }
|
|
50
|
+
async run(vf, vp) {
|
|
51
|
+
if (undefined !== vf && undefined !== vp)
|
|
52
|
+
vp.viewFlags = vf;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
async parseAndRun(...args) {
|
|
56
|
+
const vp = IModelApp.viewManager.selectedView;
|
|
57
|
+
if (undefined === vp || 0 === args.length)
|
|
58
|
+
return true;
|
|
59
|
+
const vf = { ...vp.viewFlags };
|
|
60
|
+
for (const arg of args) {
|
|
61
|
+
const parts = arg.split("=");
|
|
62
|
+
if (2 !== parts.length)
|
|
63
|
+
continue;
|
|
64
|
+
const value = parseInt(parts[1], 10);
|
|
65
|
+
if (Number.isNaN(value))
|
|
66
|
+
continue;
|
|
67
|
+
const name = parts[0].toLowerCase();
|
|
68
|
+
if (name === "rendermode") {
|
|
69
|
+
switch (value) {
|
|
70
|
+
case RenderMode.SmoothShade:
|
|
71
|
+
case RenderMode.Wireframe:
|
|
72
|
+
case RenderMode.HiddenLine:
|
|
73
|
+
case RenderMode.SolidFill:
|
|
74
|
+
vf.renderMode = value;
|
|
75
|
+
vp.invalidateRenderPlan();
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (0 !== value && 1 !== value)
|
|
81
|
+
continue;
|
|
82
|
+
const index = lowercaseBooleanFlagNames.indexOf(name);
|
|
83
|
+
if (-1 !== index) {
|
|
84
|
+
const propName = booleanFlagNames[index];
|
|
85
|
+
vf[propName] = 0 !== value;
|
|
86
|
+
vp.invalidateRenderPlan();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return this.run(new ViewFlags(vf), vp);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
ChangeViewFlagsTool.toolId = "ChangeViewFlags";
|
|
93
|
+
export { ChangeViewFlagsTool };
|
|
94
|
+
/** Toggles the skybox.
|
|
95
|
+
* @beta
|
|
96
|
+
*/
|
|
97
|
+
class ToggleSkyboxTool extends DisplayStyleTool {
|
|
98
|
+
get require3d() { return true; }
|
|
99
|
+
async parse(_args) { return true; } // no arguments
|
|
100
|
+
async execute(vp) {
|
|
101
|
+
const style = vp.view.displayStyle;
|
|
102
|
+
style.environment = style.environment.withDisplay({ sky: !style.environment.displaySky });
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
ToggleSkyboxTool.toolId = "ToggleSkybox";
|
|
107
|
+
export { ToggleSkyboxTool };
|
|
108
|
+
/** Defines a [SkySphere]($common) to apply to the current view.
|
|
109
|
+
* @beta
|
|
110
|
+
*/
|
|
111
|
+
class SkySphereTool extends DisplayStyleTool {
|
|
112
|
+
static get minArgs() { return 1; }
|
|
113
|
+
static get maxArgs() { return 1; }
|
|
114
|
+
get require3d() { return true; }
|
|
115
|
+
async parse(args) {
|
|
116
|
+
this._image = args[0];
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
async execute(vp) {
|
|
120
|
+
if (this._image && vp.view.is3d()) {
|
|
121
|
+
vp.view.displayStyle.environment = vp.view.displayStyle.environment.clone({
|
|
122
|
+
displaySky: true,
|
|
123
|
+
sky: new SkySphere(this._image),
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
SkySphereTool.toolId = "SetSkySphere";
|
|
130
|
+
export { SkySphereTool };
|
|
131
|
+
/** Defines a [SkyCube]($common) to apply to the current view.
|
|
132
|
+
* @beta
|
|
133
|
+
*/
|
|
134
|
+
class SkyCubeTool extends DisplayStyleTool {
|
|
135
|
+
constructor() {
|
|
136
|
+
super(...arguments);
|
|
137
|
+
this._images = [];
|
|
138
|
+
}
|
|
139
|
+
static get minArgs() { return 1; }
|
|
140
|
+
static get maxArgs() { return 6; }
|
|
141
|
+
get require3d() { return true; }
|
|
142
|
+
async parse(args) {
|
|
143
|
+
this._images = [...args];
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
async execute(vp) {
|
|
147
|
+
const imgs = this._images;
|
|
148
|
+
if (imgs.length === 0 || !vp.view.is3d())
|
|
149
|
+
return true;
|
|
150
|
+
let top, bottom, left, right, front, back;
|
|
151
|
+
switch (imgs.length) {
|
|
152
|
+
case 1:
|
|
153
|
+
top = bottom = left = right = front = back = imgs[0];
|
|
154
|
+
break;
|
|
155
|
+
case 2:
|
|
156
|
+
top = bottom = imgs[0];
|
|
157
|
+
left = right = front = back = imgs[1];
|
|
158
|
+
break;
|
|
159
|
+
case 3:
|
|
160
|
+
top = bottom = imgs[0];
|
|
161
|
+
left = right = imgs[1];
|
|
162
|
+
front = back = imgs[2];
|
|
163
|
+
break;
|
|
164
|
+
case 4:
|
|
165
|
+
top = imgs[0];
|
|
166
|
+
bottom = imgs[1];
|
|
167
|
+
left = right = imgs[2];
|
|
168
|
+
front = back = imgs[3];
|
|
169
|
+
break;
|
|
170
|
+
case 5:
|
|
171
|
+
top = bottom = imgs[0];
|
|
172
|
+
left = imgs[1];
|
|
173
|
+
right = imgs[2];
|
|
174
|
+
front = imgs[3];
|
|
175
|
+
back = imgs[4];
|
|
176
|
+
break;
|
|
177
|
+
default:
|
|
178
|
+
top = imgs[0];
|
|
179
|
+
bottom = imgs[1];
|
|
180
|
+
left = imgs[2];
|
|
181
|
+
right = imgs[3];
|
|
182
|
+
front = imgs[4];
|
|
183
|
+
back = imgs[5];
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
vp.view.displayStyle.environment = vp.view.displayStyle.environment.clone({
|
|
187
|
+
displaySky: true,
|
|
188
|
+
sky: new SkyCube({ top, bottom, left, right, front, back }),
|
|
189
|
+
});
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
SkyCubeTool.toolId = "SetSkyCube";
|
|
194
|
+
export { SkyCubeTool };
|
|
195
|
+
/** Outputs (and optionally copies to the clipboard) a "rendering style" as a partial DisplayStyle3dSettingsProps JSON object based
|
|
196
|
+
* on the current view's display style settings.
|
|
197
|
+
* All arguments are optional, of the form "name=value" where `value` is 0 for false or 1 for true. All arguments default to `false` if omitted.
|
|
198
|
+
* @see [DisplayStyleSettings.toOverrides]($common) for details.
|
|
199
|
+
* Arguments:
|
|
200
|
+
* * `all`: include all settings.
|
|
201
|
+
* * `imodel`: include iModel-specific settings.
|
|
202
|
+
* * `project`: include iTwin-specific (formerly known as project) settings.
|
|
203
|
+
* * `map`: include background map settings.
|
|
204
|
+
* * `drawingaids`: include drawing aid decoration settings.
|
|
205
|
+
* * `copy`: copy result to system clipboard.
|
|
206
|
+
* * `quote`: format the JSON so it can be parsed directly by [ApplyRenderingStyleTool].
|
|
207
|
+
* @beta
|
|
208
|
+
*/
|
|
209
|
+
class SaveRenderingStyleTool extends DisplayStyleTool {
|
|
210
|
+
constructor() {
|
|
211
|
+
super(...arguments);
|
|
212
|
+
this._options = {};
|
|
213
|
+
this._copyToClipboard = false;
|
|
214
|
+
this._quote = false;
|
|
215
|
+
}
|
|
216
|
+
static get minArgs() { return 0; }
|
|
217
|
+
static get maxArgs() { return 7; }
|
|
218
|
+
async parse(inputArgs) {
|
|
219
|
+
const args = parseArgs(inputArgs);
|
|
220
|
+
function getArg(name) {
|
|
221
|
+
return args.getBoolean(name) ? true : undefined;
|
|
222
|
+
}
|
|
223
|
+
this._options.includeAll = getArg("a");
|
|
224
|
+
this._options.includeIModelSpecific = getArg("i");
|
|
225
|
+
this._options.includeITwinSpecific = getArg("p"); // "p" for backwards compatibility with old "project" terminology
|
|
226
|
+
this._options.includeBackgroundMap = getArg("m");
|
|
227
|
+
this._options.includeDrawingAids = getArg("d");
|
|
228
|
+
this._copyToClipboard = true === getArg("c");
|
|
229
|
+
this._quote = true === getArg("q");
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
async execute(vp) {
|
|
233
|
+
let json = JSON.stringify(vp.displayStyle.settings.toOverrides(this._options));
|
|
234
|
+
if (this._quote)
|
|
235
|
+
json = `"${json.replace(/"/g, '""')}"`;
|
|
236
|
+
IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "Rendering style saved", json));
|
|
237
|
+
if (this._copyToClipboard)
|
|
238
|
+
copyStringToClipboard(json);
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
SaveRenderingStyleTool.toolId = "SaveRenderingStyle";
|
|
243
|
+
export { SaveRenderingStyleTool };
|
|
244
|
+
/** Given a "rendering style" as a partial DisplayStyle3dSettingsProperties JSON string, apply it to the selected viewport's display style.
|
|
245
|
+
* @see [DisplayStyleSettings.applyOverrides]($common) for details.
|
|
246
|
+
* @beta
|
|
247
|
+
*/
|
|
248
|
+
class ApplyRenderingStyleTool extends DisplayStyleTool {
|
|
249
|
+
static get minArgs() { return 1; }
|
|
250
|
+
static get maxArgs() { return 1; }
|
|
251
|
+
async parse(args) {
|
|
252
|
+
try {
|
|
253
|
+
this._overrides = JSON.parse(args[0]);
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
catch {
|
|
257
|
+
IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, "Invalid JSON"));
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
async execute(vp) {
|
|
262
|
+
if (this._overrides)
|
|
263
|
+
vp.overrideDisplayStyle(this._overrides);
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
ApplyRenderingStyleTool.toolId = "ApplyRenderingStyle";
|
|
268
|
+
export { ApplyRenderingStyleTool };
|
|
269
|
+
/** Apply appearance overrides to one or more subcategories in the active viewport.
|
|
270
|
+
* @beta
|
|
271
|
+
*/
|
|
272
|
+
class OverrideSubCategoryTool extends DisplayStyleTool {
|
|
273
|
+
constructor() {
|
|
274
|
+
super(...arguments);
|
|
275
|
+
this._overrideProps = {};
|
|
276
|
+
this._subcategoryIds = [];
|
|
277
|
+
}
|
|
278
|
+
static get minArgs() { return 1; }
|
|
279
|
+
static get maxArgs() { return 7; }
|
|
280
|
+
async parse(inArgs) {
|
|
281
|
+
const args = parseArgs(inArgs);
|
|
282
|
+
const ids = args.get("i");
|
|
283
|
+
if (ids)
|
|
284
|
+
this._subcategoryIds = ids.split(",");
|
|
285
|
+
const props = this._overrideProps;
|
|
286
|
+
props.color = args.getInteger("c");
|
|
287
|
+
props.weight = args.getInteger("w");
|
|
288
|
+
props.priority = args.getInteger("p");
|
|
289
|
+
props.transp = args.getFloat("t");
|
|
290
|
+
props.material = args.get("m");
|
|
291
|
+
const visible = args.getBoolean("v");
|
|
292
|
+
props.invisible = typeof visible === "boolean" ? !visible : undefined;
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
async execute(vp) {
|
|
296
|
+
const ovr = SubCategoryOverride.fromJSON(this._overrideProps);
|
|
297
|
+
for (const id of this._subcategoryIds)
|
|
298
|
+
vp.displayStyle.overrideSubCategory(id, ovr);
|
|
299
|
+
return true;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
OverrideSubCategoryTool.toolId = "OverrideSubCategory";
|
|
303
|
+
export { OverrideSubCategoryTool };
|
|
304
|
+
/** Set whether background color is ignored when applying white-on-white reversal.
|
|
305
|
+
* @beta
|
|
306
|
+
*/
|
|
307
|
+
class WoWIgnoreBackgroundTool extends DisplayStyleTool {
|
|
308
|
+
static get minArgs() { return 0; }
|
|
309
|
+
static get maxArgs() { return 1; }
|
|
310
|
+
async parse(args) {
|
|
311
|
+
const ignore = parseToggle(args[0]);
|
|
312
|
+
if (typeof ignore === "string")
|
|
313
|
+
return false;
|
|
314
|
+
this._ignore = ignore;
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
317
|
+
async execute(vp) {
|
|
318
|
+
const ignoreBackgroundColor = this._ignore ?? !vp.displayStyle.settings.whiteOnWhiteReversal.ignoreBackgroundColor;
|
|
319
|
+
vp.displayStyle.settings.whiteOnWhiteReversal = WhiteOnWhiteReversalSettings.fromJSON({ ignoreBackgroundColor });
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
WoWIgnoreBackgroundTool.toolId = "WoWIgnoreBackground";
|
|
324
|
+
export { WoWIgnoreBackgroundTool };
|
|
325
|
+
/** Toggle whether surfaces display with overlaid wiremesh in the active viewport.
|
|
326
|
+
* @see [ViewFlags.wiremesh]($common).
|
|
327
|
+
* @beta
|
|
328
|
+
*/
|
|
329
|
+
class ToggleWiremeshTool extends DisplayStyleTool {
|
|
330
|
+
static get minArgs() { return 0; }
|
|
331
|
+
static get maxArgs() { return 1; }
|
|
332
|
+
async parse(args) {
|
|
333
|
+
const enable = parseToggle(args[0]);
|
|
334
|
+
if (typeof enable === "string")
|
|
335
|
+
return false;
|
|
336
|
+
this._enable = enable;
|
|
337
|
+
return true;
|
|
338
|
+
}
|
|
339
|
+
async execute(vp) {
|
|
340
|
+
vp.viewFlags = vp.viewFlags.with("wiremesh", this._enable ?? !vp.viewFlags.wiremesh);
|
|
341
|
+
return true;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
ToggleWiremeshTool.toolId = "ToggleWiremesh";
|
|
345
|
+
export { ToggleWiremeshTool };
|
|
346
|
+
/** Change the background color of the active viewport and optionally its transparency.
|
|
347
|
+
* @beta
|
|
348
|
+
*/
|
|
349
|
+
class ChangeBackgroundColorTool extends DisplayStyleTool {
|
|
350
|
+
static get minArgs() { return 1; }
|
|
351
|
+
static get maxArgs() { return 1; }
|
|
352
|
+
async parse(args) {
|
|
353
|
+
this._color = ColorDef.fromString(args[0]);
|
|
354
|
+
return true;
|
|
355
|
+
}
|
|
356
|
+
async execute(vp) {
|
|
357
|
+
if (!this._color)
|
|
358
|
+
return false;
|
|
359
|
+
vp.displayStyle.backgroundColor = this._color;
|
|
360
|
+
return true;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
ChangeBackgroundColorTool.toolId = "ChangeBackgroundColor";
|
|
364
|
+
export { ChangeBackgroundColorTool };
|
|
357
365
|
//# sourceMappingURL=DisplayStyleTools.js.map
|