@itwin/frontend-devtools 4.0.0-dev.8 → 4.0.0-dev.81
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/README.md +1 -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.d.ts.map +1 -1
- package/lib/cjs/tools/MapLayerTool.js +509 -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.js +85 -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.d.ts.map +1 -1
- package/lib/esm/tools/MapLayerTool.js +506 -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.js +81 -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 +14 -14
|
@@ -1,378 +1,388 @@
|
|
|
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
|
-
import { PlanarClipMaskMode, PlanarClipMaskPriority, PlanarClipMaskSettings } from "@itwin/core-common";
|
|
6
|
-
import { EventHandled, IModelApp, LocateFilterStatus, LocateResponse, PrimitiveTool, Tool, } from "@itwin/core-frontend";
|
|
7
|
-
import { parseBoolean } from "./parseBoolean";
|
|
8
|
-
/** Set Map Masking by selected models.
|
|
9
|
-
* @beta
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
static get minArgs() { return 0; }
|
|
13
|
-
static get maxArgs() { return 2; }
|
|
14
|
-
async run(transparency, invert) {
|
|
15
|
-
const vp = IModelApp.viewManager.selectedView;
|
|
16
|
-
if (undefined === vp)
|
|
17
|
-
return false;
|
|
18
|
-
vp.changeBackgroundMapProps({ planarClipMask: { mode: PlanarClipMaskMode.Priority, priority: PlanarClipMaskPriority.BackgroundMap, transparency, invert } });
|
|
19
|
-
vp.invalidateRenderPlan();
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
async parseAndRun(...args) {
|
|
23
|
-
const transparency = parseFloat(args[0]);
|
|
24
|
-
let invert;
|
|
25
|
-
if (args.length > 1)
|
|
26
|
-
invert = parseBoolean(args[1]);
|
|
27
|
-
return this.run((transparency !== undefined && transparency < 1.0) ? transparency : 0, invert === true);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
SetMapHigherPriorityMasking.toolId = "SetMapHigherPriorityMask";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
static get
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
vp.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
this.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
|
|
118
|
-
const vp = IModelApp.viewManager.selectedView;
|
|
119
|
-
if (undefined === vp)
|
|
120
|
-
return EventHandled.No;
|
|
121
|
-
if (undefined !== hit && undefined === this._targetMaskModel && this.targetModelRequired()) {
|
|
122
|
-
if (hit.modelId) {
|
|
123
|
-
this._targetMaskModel =
|
|
124
|
-
if (!this.elementRequired()) {
|
|
125
|
-
this.applyMask(vp);
|
|
126
|
-
await this.onRestartTool();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
else if (this._useSelection && this.iModel.selectionSet.isActive) {
|
|
131
|
-
const elements = await this.iModel.elements.getProps(this.iModel.selectionSet.elements);
|
|
132
|
-
for (const element of elements) {
|
|
133
|
-
if (element.id && element.model) {
|
|
134
|
-
this._acceptedElementIds.add(element.id);
|
|
135
|
-
this._acceptedModelIds.add(element.model);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
this.applyMask(vp);
|
|
139
|
-
await this.exitTool();
|
|
140
|
-
return EventHandled.No;
|
|
141
|
-
}
|
|
142
|
-
else if (undefined !== hit && hit.isElementHit) {
|
|
143
|
-
const sourceId = hit.sourceId;
|
|
144
|
-
if (!this._acceptedElementIds.has(sourceId)) {
|
|
145
|
-
this._acceptedElementIds.add(sourceId);
|
|
146
|
-
this._acceptedModelIds.add(hit.modelId);
|
|
147
|
-
if (hit.subCategoryId)
|
|
148
|
-
this._acceptedSubCategoryIds.add(hit.subCategoryId);
|
|
149
|
-
this.applyMask(vp);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
this.setupAndPromptForNextAction();
|
|
153
|
-
return EventHandled.No;
|
|
154
|
-
}
|
|
155
|
-
createSubCategoryMask() {
|
|
156
|
-
return PlanarClipMaskSettings.create({
|
|
157
|
-
subCategoryIds: this._acceptedSubCategoryIds,
|
|
158
|
-
modelIds: this._acceptedModelIds,
|
|
159
|
-
transparency: this._transparency,
|
|
160
|
-
invert: this._invert,
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
createElementMask(option) {
|
|
164
|
-
return PlanarClipMaskSettings.create({
|
|
165
|
-
elementIds: this._acceptedElementIds,
|
|
166
|
-
exclude: "exclude" === option,
|
|
167
|
-
modelIds: this._acceptedModelIds,
|
|
168
|
-
transparency: this._transparency,
|
|
169
|
-
invert: this._invert,
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
createModelMask() {
|
|
173
|
-
return PlanarClipMaskSettings.create({ modelIds: this._acceptedModelIds, transparency: this._transparency, invert: this._invert });
|
|
174
|
-
}
|
|
175
|
-
setRealityModelMask(vp, mask) {
|
|
176
|
-
if (typeof this._targetMaskModel === "string")
|
|
177
|
-
vp.displayStyle.settings.planarClipMasks.set(this._targetMaskModel, mask);
|
|
178
|
-
else if (undefined !== this._targetMaskModel)
|
|
179
|
-
this._targetMaskModel.planarClipMaskSettings = mask;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
/** Tool to mask background map by elements
|
|
183
|
-
* @beta
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
static get minArgs() { return 0; }
|
|
187
|
-
static get maxArgs() { return 2; }
|
|
188
|
-
targetModelRequired() { return false; }
|
|
189
|
-
showPrompt() {
|
|
190
|
-
IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByElement.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskElement"}`);
|
|
191
|
-
}
|
|
192
|
-
createToolInstance() { return new MaskBackgroundMapByElementTool(); }
|
|
193
|
-
applyMask(vp) {
|
|
194
|
-
vp.changeBackgroundMapProps({ planarClipMask: this.createElementMask("include").toJSON() });
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
MaskBackgroundMapByElementTool.toolId = "MaskBackgroundMapByElement";
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
static get
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
export
|
|
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
|
-
this.
|
|
278
|
-
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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
|
+
import { PlanarClipMaskMode, PlanarClipMaskPriority, PlanarClipMaskSettings } from "@itwin/core-common";
|
|
6
|
+
import { EventHandled, IModelApp, LocateFilterStatus, LocateResponse, PrimitiveTool, Tool, } from "@itwin/core-frontend";
|
|
7
|
+
import { parseBoolean } from "./parseBoolean";
|
|
8
|
+
/** Set Map Masking by selected models.
|
|
9
|
+
* @beta
|
|
10
|
+
*/
|
|
11
|
+
class SetMapHigherPriorityMasking extends Tool {
|
|
12
|
+
static get minArgs() { return 0; }
|
|
13
|
+
static get maxArgs() { return 2; }
|
|
14
|
+
async run(transparency, invert) {
|
|
15
|
+
const vp = IModelApp.viewManager.selectedView;
|
|
16
|
+
if (undefined === vp)
|
|
17
|
+
return false;
|
|
18
|
+
vp.changeBackgroundMapProps({ planarClipMask: { mode: PlanarClipMaskMode.Priority, priority: PlanarClipMaskPriority.BackgroundMap, transparency, invert } });
|
|
19
|
+
vp.invalidateRenderPlan();
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
async parseAndRun(...args) {
|
|
23
|
+
const transparency = parseFloat(args[0]);
|
|
24
|
+
let invert;
|
|
25
|
+
if (args.length > 1)
|
|
26
|
+
invert = parseBoolean(args[1]);
|
|
27
|
+
return this.run((transparency !== undefined && transparency < 1.0) ? transparency : 0, invert === true);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
SetMapHigherPriorityMasking.toolId = "SetMapHigherPriorityMask";
|
|
31
|
+
export { SetMapHigherPriorityMasking };
|
|
32
|
+
/** Unmask Mask.
|
|
33
|
+
* @beta
|
|
34
|
+
*/
|
|
35
|
+
class UnmaskMapTool extends Tool {
|
|
36
|
+
static get minArgs() { return 0; }
|
|
37
|
+
static get maxArgs() { return 0; }
|
|
38
|
+
async run() {
|
|
39
|
+
const vp = IModelApp.viewManager.selectedView;
|
|
40
|
+
if (undefined === vp)
|
|
41
|
+
return false;
|
|
42
|
+
vp.changeBackgroundMapProps({ planarClipMask: { mode: PlanarClipMaskMode.None, transparency: 0, invert: false } });
|
|
43
|
+
vp.invalidateRenderPlan();
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
UnmaskMapTool.toolId = "UnmaskMap";
|
|
48
|
+
export { UnmaskMapTool };
|
|
49
|
+
/** Base class for the reality model planar masking tools.
|
|
50
|
+
* @beta
|
|
51
|
+
*/
|
|
52
|
+
export class PlanarMaskBaseTool extends PrimitiveTool {
|
|
53
|
+
constructor() {
|
|
54
|
+
super(...arguments);
|
|
55
|
+
this._acceptedModelIds = new Set();
|
|
56
|
+
this._acceptedSubCategoryIds = new Set();
|
|
57
|
+
this._acceptedElementIds = new Set();
|
|
58
|
+
this._transparency = 0;
|
|
59
|
+
this._useSelection = false;
|
|
60
|
+
this._invert = false;
|
|
61
|
+
}
|
|
62
|
+
requireWriteableTarget() { return false; }
|
|
63
|
+
async onPostInstall() {
|
|
64
|
+
await super.onPostInstall();
|
|
65
|
+
this.setupAndPromptForNextAction();
|
|
66
|
+
}
|
|
67
|
+
async onUnsuspend() { this.showPrompt(); }
|
|
68
|
+
setupAndPromptForNextAction() {
|
|
69
|
+
this._useSelection = (undefined !== this.targetView && this.iModel.selectionSet.isActive);
|
|
70
|
+
this.initLocateElements(!this._useSelection || (this.targetModelRequired() && !this._targetMaskModel));
|
|
71
|
+
IModelApp.locateManager.options.allowDecorations = true; // So we can select "contextual" reality models.
|
|
72
|
+
this.showPrompt();
|
|
73
|
+
}
|
|
74
|
+
targetModelRequired() { return true; }
|
|
75
|
+
elementRequired() { return true; }
|
|
76
|
+
allowSelection() { return true; }
|
|
77
|
+
clearIds() {
|
|
78
|
+
this._acceptedElementIds.clear();
|
|
79
|
+
this._acceptedModelIds.clear();
|
|
80
|
+
}
|
|
81
|
+
async exitTool() {
|
|
82
|
+
await super.exitTool();
|
|
83
|
+
this._transparency = 0;
|
|
84
|
+
}
|
|
85
|
+
async onRestartTool() {
|
|
86
|
+
this.clearIds();
|
|
87
|
+
this._acceptedSubCategoryIds.clear();
|
|
88
|
+
const tool = this.createToolInstance();
|
|
89
|
+
if (!await tool.run())
|
|
90
|
+
await this.exitTool();
|
|
91
|
+
}
|
|
92
|
+
async parseAndRun(...args) {
|
|
93
|
+
const transparency = parseFloat(args[0]);
|
|
94
|
+
this._transparency = (transparency !== undefined && transparency < 1.0) ? transparency : 0;
|
|
95
|
+
if (args.length > 1)
|
|
96
|
+
this._invert = parseBoolean(args[1]) === true;
|
|
97
|
+
return this.run();
|
|
98
|
+
}
|
|
99
|
+
async onCleanup() {
|
|
100
|
+
if (0 !== this._acceptedElementIds.size)
|
|
101
|
+
this.iModel.hilited.setHilite(this._acceptedElementIds, false);
|
|
102
|
+
this.clearIds();
|
|
103
|
+
}
|
|
104
|
+
async filterHit(hit, _out) {
|
|
105
|
+
if (!hit.modelId)
|
|
106
|
+
return LocateFilterStatus.Reject;
|
|
107
|
+
if (undefined === this._targetMaskModel && this.targetModelRequired()) {
|
|
108
|
+
if (undefined !== hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId))
|
|
109
|
+
return LocateFilterStatus.Accept;
|
|
110
|
+
const model = this.iModel.models.getLoaded(hit.modelId)?.asSpatialModel;
|
|
111
|
+
return model?.isRealityModel ? LocateFilterStatus.Accept : LocateFilterStatus.Reject;
|
|
112
|
+
}
|
|
113
|
+
else
|
|
114
|
+
return (hit.isElementHit && !hit.isModelHit && !this._acceptedElementIds.has(hit.sourceId)) ? LocateFilterStatus.Accept : LocateFilterStatus.Reject;
|
|
115
|
+
}
|
|
116
|
+
async onDataButtonDown(ev) {
|
|
117
|
+
const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
|
|
118
|
+
const vp = IModelApp.viewManager.selectedView;
|
|
119
|
+
if (undefined === vp)
|
|
120
|
+
return EventHandled.No;
|
|
121
|
+
if (undefined !== hit && undefined === this._targetMaskModel && this.targetModelRequired()) {
|
|
122
|
+
if (hit.modelId) {
|
|
123
|
+
this._targetMaskModel = hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId) ?? hit.modelId;
|
|
124
|
+
if (!this.elementRequired()) {
|
|
125
|
+
this.applyMask(vp);
|
|
126
|
+
await this.onRestartTool();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else if (this._useSelection && this.iModel.selectionSet.isActive) {
|
|
131
|
+
const elements = await this.iModel.elements.getProps(this.iModel.selectionSet.elements);
|
|
132
|
+
for (const element of elements) {
|
|
133
|
+
if (element.id && element.model) {
|
|
134
|
+
this._acceptedElementIds.add(element.id);
|
|
135
|
+
this._acceptedModelIds.add(element.model);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
this.applyMask(vp);
|
|
139
|
+
await this.exitTool();
|
|
140
|
+
return EventHandled.No;
|
|
141
|
+
}
|
|
142
|
+
else if (undefined !== hit && hit.isElementHit) {
|
|
143
|
+
const sourceId = hit.sourceId;
|
|
144
|
+
if (!this._acceptedElementIds.has(sourceId)) {
|
|
145
|
+
this._acceptedElementIds.add(sourceId);
|
|
146
|
+
this._acceptedModelIds.add(hit.modelId);
|
|
147
|
+
if (hit.subCategoryId)
|
|
148
|
+
this._acceptedSubCategoryIds.add(hit.subCategoryId);
|
|
149
|
+
this.applyMask(vp);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
this.setupAndPromptForNextAction();
|
|
153
|
+
return EventHandled.No;
|
|
154
|
+
}
|
|
155
|
+
createSubCategoryMask() {
|
|
156
|
+
return PlanarClipMaskSettings.create({
|
|
157
|
+
subCategoryIds: this._acceptedSubCategoryIds,
|
|
158
|
+
modelIds: this._acceptedModelIds,
|
|
159
|
+
transparency: this._transparency,
|
|
160
|
+
invert: this._invert,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
createElementMask(option) {
|
|
164
|
+
return PlanarClipMaskSettings.create({
|
|
165
|
+
elementIds: this._acceptedElementIds,
|
|
166
|
+
exclude: "exclude" === option,
|
|
167
|
+
modelIds: this._acceptedModelIds,
|
|
168
|
+
transparency: this._transparency,
|
|
169
|
+
invert: this._invert,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
createModelMask() {
|
|
173
|
+
return PlanarClipMaskSettings.create({ modelIds: this._acceptedModelIds, transparency: this._transparency, invert: this._invert });
|
|
174
|
+
}
|
|
175
|
+
setRealityModelMask(vp, mask) {
|
|
176
|
+
if (typeof this._targetMaskModel === "string")
|
|
177
|
+
vp.displayStyle.settings.planarClipMasks.set(this._targetMaskModel, mask);
|
|
178
|
+
else if (undefined !== this._targetMaskModel)
|
|
179
|
+
this._targetMaskModel.planarClipMaskSettings = mask;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/** Tool to mask background map by elements
|
|
183
|
+
* @beta
|
|
184
|
+
*/
|
|
185
|
+
class MaskBackgroundMapByElementTool extends PlanarMaskBaseTool {
|
|
186
|
+
static get minArgs() { return 0; }
|
|
187
|
+
static get maxArgs() { return 2; }
|
|
188
|
+
targetModelRequired() { return false; }
|
|
189
|
+
showPrompt() {
|
|
190
|
+
IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByElement.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskElement"}`);
|
|
191
|
+
}
|
|
192
|
+
createToolInstance() { return new MaskBackgroundMapByElementTool(); }
|
|
193
|
+
applyMask(vp) {
|
|
194
|
+
vp.changeBackgroundMapProps({ planarClipMask: this.createElementMask("include").toJSON() });
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
MaskBackgroundMapByElementTool.toolId = "MaskBackgroundMapByElement";
|
|
198
|
+
export { MaskBackgroundMapByElementTool };
|
|
199
|
+
/** Tool to mask background map by excluded elements
|
|
200
|
+
* @beta
|
|
201
|
+
*/
|
|
202
|
+
class MaskBackgroundMapByExcludedElementTool extends PlanarMaskBaseTool {
|
|
203
|
+
static get minArgs() { return 0; }
|
|
204
|
+
static get maxArgs() { return 2; }
|
|
205
|
+
targetModelRequired() { return false; }
|
|
206
|
+
showPrompt() {
|
|
207
|
+
IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByExcludedElement.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskElement"}`);
|
|
208
|
+
}
|
|
209
|
+
createToolInstance() { return new MaskBackgroundMapByExcludedElementTool(); }
|
|
210
|
+
applyMask(vp) {
|
|
211
|
+
vp.changeBackgroundMapProps({ planarClipMask: this.createElementMask("exclude").toJSON() });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
MaskBackgroundMapByExcludedElementTool.toolId = "MaskBackgroundMapByExcludedElement";
|
|
215
|
+
export { MaskBackgroundMapByExcludedElementTool };
|
|
216
|
+
/** Tool to mask background map by SubCategories
|
|
217
|
+
* @beta
|
|
218
|
+
*/
|
|
219
|
+
class MaskBackgroundMapBySubCategoryTool extends PlanarMaskBaseTool {
|
|
220
|
+
static get minArgs() { return 0; }
|
|
221
|
+
static get maxArgs() { return 2; }
|
|
222
|
+
targetModelRequired() { return false; }
|
|
223
|
+
allowSelection() { return false; } // Need picking to get subcategory.
|
|
224
|
+
showPrompt() {
|
|
225
|
+
IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.MaskBackgroundMapBySubCategory.Prompts.IdentifyMaskSubCategory");
|
|
226
|
+
}
|
|
227
|
+
createToolInstance() { return new MaskBackgroundMapBySubCategoryTool(); }
|
|
228
|
+
applyMask(vp) {
|
|
229
|
+
vp.changeBackgroundMapProps({ planarClipMask: this.createSubCategoryMask().toJSON() });
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
MaskBackgroundMapBySubCategoryTool.toolId = "MaskBackgroundMapBySubCategory";
|
|
233
|
+
export { MaskBackgroundMapBySubCategoryTool };
|
|
234
|
+
/** Tool to mask background map by geometric models
|
|
235
|
+
* @beta
|
|
236
|
+
*/
|
|
237
|
+
class MaskBackgroundMapByModelTool extends PlanarMaskBaseTool {
|
|
238
|
+
static get minArgs() { return 0; }
|
|
239
|
+
static get maxArgs() { return 2; }
|
|
240
|
+
targetModelRequired() { return false; }
|
|
241
|
+
showPrompt() {
|
|
242
|
+
IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByModel.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskModel"}`);
|
|
243
|
+
}
|
|
244
|
+
createToolInstance() { return new MaskBackgroundMapByModelTool(); }
|
|
245
|
+
applyMask(vp) {
|
|
246
|
+
vp.changeBackgroundMapProps({ planarClipMask: this.createModelMask().toJSON() });
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
MaskBackgroundMapByModelTool.toolId = "MaskBackgroundMapByModel";
|
|
250
|
+
export { MaskBackgroundMapByModelTool };
|
|
251
|
+
/** Tool to mask reality model by elements
|
|
252
|
+
* @beta
|
|
253
|
+
*/
|
|
254
|
+
class MaskRealityModelByElementTool extends PlanarMaskBaseTool {
|
|
255
|
+
static get minArgs() { return 0; }
|
|
256
|
+
static get maxArgs() { return 2; }
|
|
257
|
+
targetModelRequired() { return true; }
|
|
258
|
+
showPrompt() {
|
|
259
|
+
const key = `FrontendDevTools:tools.MaskRealityModelByElement.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskElement")}`;
|
|
260
|
+
IModelApp.notifications.outputPromptByKey(key);
|
|
261
|
+
}
|
|
262
|
+
createToolInstance() { return new MaskRealityModelByElementTool(); }
|
|
263
|
+
applyMask(vp) {
|
|
264
|
+
this.setRealityModelMask(vp, this.createElementMask("include"));
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
MaskRealityModelByElementTool.toolId = "MaskRealityModelByElement";
|
|
268
|
+
export { MaskRealityModelByElementTool };
|
|
269
|
+
/** Tool to mask reality model by excluded elements
|
|
270
|
+
* @beta
|
|
271
|
+
*/
|
|
272
|
+
class MaskRealityModelByExcludedElementTool extends PlanarMaskBaseTool {
|
|
273
|
+
static get minArgs() { return 0; }
|
|
274
|
+
static get maxArgs() { return 2; }
|
|
275
|
+
targetModelRequired() { return true; }
|
|
276
|
+
showPrompt() {
|
|
277
|
+
const key = `FrontendDevTools:tools.MaskRealityModelByExcludedElement.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskElement")}`;
|
|
278
|
+
IModelApp.notifications.outputPromptByKey(key);
|
|
279
|
+
}
|
|
280
|
+
createToolInstance() { return new MaskRealityModelByExcludedElementTool(); }
|
|
281
|
+
applyMask(vp) {
|
|
282
|
+
this.setRealityModelMask(vp, this.createElementMask("exclude"));
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
MaskRealityModelByExcludedElementTool.toolId = "MaskRealityModelByExcludedElement";
|
|
286
|
+
export { MaskRealityModelByExcludedElementTool };
|
|
287
|
+
/** Tool to mask reality model by geometric models
|
|
288
|
+
* @beta
|
|
289
|
+
*/
|
|
290
|
+
class MaskRealityModelByModelTool extends PlanarMaskBaseTool {
|
|
291
|
+
static get minArgs() { return 0; }
|
|
292
|
+
static get maxArgs() { return 2; }
|
|
293
|
+
targetModelRequired() { return true; }
|
|
294
|
+
showPrompt() {
|
|
295
|
+
const key = `FrontendDevTools:tools.MaskRealityModelByModel.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskModel")}`;
|
|
296
|
+
IModelApp.notifications.outputPromptByKey(key);
|
|
297
|
+
}
|
|
298
|
+
createToolInstance() { return new MaskRealityModelByModelTool(); }
|
|
299
|
+
applyMask(vp) {
|
|
300
|
+
this.setRealityModelMask(vp, this.createModelMask());
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
MaskRealityModelByModelTool.toolId = "MaskRealityModelByModel";
|
|
304
|
+
export { MaskRealityModelByModelTool };
|
|
305
|
+
/** Tool to mask reality model by SubCategories
|
|
306
|
+
* @beta
|
|
307
|
+
*/
|
|
308
|
+
class MaskRealityModelBySubCategoryTool extends PlanarMaskBaseTool {
|
|
309
|
+
static get minArgs() { return 0; }
|
|
310
|
+
static get maxArgs() { return 2; }
|
|
311
|
+
targetModelRequired() { return true; }
|
|
312
|
+
allowSelection() { return false; } // Need picking to get subcategory.
|
|
313
|
+
showPrompt() {
|
|
314
|
+
const key = `FrontendDevTools:tools.MaskRealityModelByModel.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : "IdentifyMaskSubCategory"}`;
|
|
315
|
+
IModelApp.notifications.outputPromptByKey(key);
|
|
316
|
+
}
|
|
317
|
+
createToolInstance() { return new MaskRealityModelBySubCategoryTool(); }
|
|
318
|
+
applyMask(vp) {
|
|
319
|
+
this.setRealityModelMask(vp, this.createSubCategoryMask());
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
MaskRealityModelBySubCategoryTool.toolId = "MaskRealityModelBySubCategory";
|
|
323
|
+
export { MaskRealityModelBySubCategoryTool };
|
|
324
|
+
/** Tool to mask reality model by higher priority models.
|
|
325
|
+
* @beta
|
|
326
|
+
*/
|
|
327
|
+
class SetHigherPriorityRealityModelMasking extends PlanarMaskBaseTool {
|
|
328
|
+
constructor() {
|
|
329
|
+
super(...arguments);
|
|
330
|
+
this._priority = 0;
|
|
331
|
+
}
|
|
332
|
+
static get minArgs() { return 0; }
|
|
333
|
+
static get maxArgs() { return 3; }
|
|
334
|
+
targetModelRequired() { return true; }
|
|
335
|
+
elementRequired() { return false; }
|
|
336
|
+
showPrompt() {
|
|
337
|
+
IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.SetHigherPriorityRealityModelMasking.Prompts.IdentifyRealityModel");
|
|
338
|
+
}
|
|
339
|
+
createToolInstance() { return new SetHigherPriorityRealityModelMasking(); }
|
|
340
|
+
applyMask(vp) {
|
|
341
|
+
const basePriority = this._targetMaskModel === vp.displayStyle.getOSMBuildingRealityModel() ? PlanarClipMaskPriority.GlobalRealityModel : PlanarClipMaskPriority.RealityModel;
|
|
342
|
+
this.setRealityModelMask(vp, PlanarClipMaskSettings.create({ priority: basePriority + this._priority, transparency: this._transparency, invert: this._invert }));
|
|
343
|
+
}
|
|
344
|
+
async parseAndRun(...args) {
|
|
345
|
+
await super.parseAndRun(...args);
|
|
346
|
+
const priority = parseInt(args[0], 10);
|
|
347
|
+
this._priority = (priority === undefined || isNaN(priority)) ? 0 : priority;
|
|
348
|
+
if (args.length > 1) {
|
|
349
|
+
const value = parseInt(args[1], 10);
|
|
350
|
+
if (!isNaN(value) && value >= 0 && value <= 1)
|
|
351
|
+
this._transparency = value;
|
|
352
|
+
}
|
|
353
|
+
if (args.length > 2)
|
|
354
|
+
this._invert = parseBoolean(args[2]) === true;
|
|
355
|
+
return this.run();
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
SetHigherPriorityRealityModelMasking.toolId = "SetHigherPriorityRealityModelMasking";
|
|
359
|
+
export { SetHigherPriorityRealityModelMasking };
|
|
360
|
+
/** Remove masks from reality model.
|
|
361
|
+
* @beta
|
|
362
|
+
*/
|
|
363
|
+
class UnmaskRealityModelTool extends PlanarMaskBaseTool {
|
|
364
|
+
targetModelRequired() { return true; }
|
|
365
|
+
showPrompt() {
|
|
366
|
+
IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.UnmaskRealityModel.Prompts.IdentifyRealityModel");
|
|
367
|
+
}
|
|
368
|
+
createToolInstance() { return new UnmaskRealityModelTool(); }
|
|
369
|
+
applyMask(vp) {
|
|
370
|
+
const settings = PlanarClipMaskSettings.create({ subCategoryIds: this._acceptedSubCategoryIds, modelIds: this._acceptedModelIds });
|
|
371
|
+
this.setRealityModelMask(vp, settings);
|
|
372
|
+
}
|
|
373
|
+
async onDataButtonDown(ev) {
|
|
374
|
+
const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
|
|
375
|
+
if (hit?.modelId) {
|
|
376
|
+
const model = hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId);
|
|
377
|
+
if (model)
|
|
378
|
+
model.planarClipMaskSettings = undefined;
|
|
379
|
+
else
|
|
380
|
+
hit.viewport.displayStyle.settings.planarClipMasks.delete(hit.modelId);
|
|
381
|
+
await this.onRestartTool();
|
|
382
|
+
}
|
|
383
|
+
return EventHandled.No;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
UnmaskRealityModelTool.toolId = "UnmaskRealityModel";
|
|
387
|
+
export { UnmaskRealityModelTool };
|
|
378
388
|
//# sourceMappingURL=PlanarMaskTools.js.map
|