@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,282 +1,282 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ToggleOSMBuildingDisplay = exports.AttachCesiumAssetTool = exports.ClearRealityModelAppearanceOverrides = exports.SetRealityModelColorTool = exports.DetachRealityModelTool = exports.SetRealityModelEmphasizedTool = exports.SetRealityModelLocateTool = exports.SetRealityModelTransparencyTool = exports.SaveRealityModelTool = exports.AttachRealityModelTool = void 0;
|
|
8
|
-
/** @packageDocumentation
|
|
9
|
-
* @module Tools
|
|
10
|
-
*/
|
|
11
|
-
const core_common_1 = require("@itwin/core-common");
|
|
12
|
-
const core_frontend_1 = require("@itwin/core-frontend");
|
|
13
|
-
const ClipboardUtilities_1 = require("../ClipboardUtilities");
|
|
14
|
-
const parseBoolean_1 = require("./parseBoolean");
|
|
15
|
-
const parseToggle_1 = require("./parseToggle");
|
|
16
|
-
/** This tool attaches a specified reality model.
|
|
17
|
-
* @beta
|
|
18
|
-
*/
|
|
19
|
-
class AttachRealityModelTool extends core_frontend_1.Tool {
|
|
20
|
-
static get minArgs() { return 1; }
|
|
21
|
-
static get maxArgs() { return 1; }
|
|
22
|
-
/** This method runs the tool, attaching a specified reality model.
|
|
23
|
-
* @param data a [[ContextRealityModelProps]] JSON representation
|
|
24
|
-
*/
|
|
25
|
-
async run(data) {
|
|
26
|
-
const props = JSON.parse(data);
|
|
27
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
28
|
-
if (vp === undefined)
|
|
29
|
-
return false;
|
|
30
|
-
if (props === undefined || props.tilesetUrl === undefined) {
|
|
31
|
-
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Error, `Properties ${props} are not valid`));
|
|
32
|
-
}
|
|
33
|
-
vp.displayStyle.attachRealityModel(props);
|
|
34
|
-
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `Reality Model ${props.tilesetUrl} attached`));
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
/** Executes this tool's run method with args[0] containing `data`.
|
|
38
|
-
* @see [[run]]
|
|
39
|
-
*/
|
|
40
|
-
async parseAndRun(...args) {
|
|
41
|
-
return this.run(args[0]);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
AttachRealityModelTool
|
|
46
|
-
/** This tool saves a reality model's JSON representation to the system clipboard.
|
|
47
|
-
* @beta */
|
|
48
|
-
class SaveRealityModelTool extends core_frontend_1.Tool {
|
|
49
|
-
static get minArgs() { return 0; }
|
|
50
|
-
static get maxArgs() { return 1; }
|
|
51
|
-
/** This method runs the tool, saving a reality model's JSON representation to the system clipboard.
|
|
52
|
-
* @param name the name of the reality model to copy; if undefined, copy the last found reality model
|
|
53
|
-
*/
|
|
54
|
-
async run(name) {
|
|
55
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
56
|
-
if (vp === undefined)
|
|
57
|
-
return false;
|
|
58
|
-
vp.displayStyle.forEachRealityModel((realityModel) => {
|
|
59
|
-
if (name === undefined || realityModel.name === name) {
|
|
60
|
-
(0, ClipboardUtilities_1.copyStringToClipboard)(JSON.stringify(realityModel.toJSON()));
|
|
61
|
-
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `Reality Model ${realityModel.name} copied to clipboard`));
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
/** Executes this tool's run method with args[0] containing `name`.
|
|
67
|
-
* @see [[run]]
|
|
68
|
-
*/
|
|
69
|
-
async parseAndRun(...args) {
|
|
70
|
-
return this.run(args.length > 0 ? args[0] : undefined);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
SaveRealityModelTool
|
|
75
|
-
function changeRealityModelAppearanceOverrides(vp, overrides, index) {
|
|
76
|
-
if (index < 0) {
|
|
77
|
-
for (const model of vp.displayStyle.settings.contextRealityModels.models)
|
|
78
|
-
model.appearanceOverrides = model.appearanceOverrides ? model.appearanceOverrides.clone(overrides) : core_common_1.FeatureAppearance.fromJSON(overrides);
|
|
79
|
-
return vp.displayStyle.settings.contextRealityModels.models.length > 0;
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
const model = vp.displayStyle.settings.contextRealityModels.models[index];
|
|
83
|
-
if (!model)
|
|
84
|
-
return false;
|
|
85
|
-
model.appearanceOverrides = model.appearanceOverrides ? model.appearanceOverrides.clone(overrides) : core_common_1.FeatureAppearance.fromJSON(overrides);
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function appearanceChangedString(index) {
|
|
90
|
-
return index < 0 ? `All Reality Models` : `Reality Model at Index: ${index}`;
|
|
91
|
-
}
|
|
92
|
-
/** Set reality model appearance override for transparency in display style.
|
|
93
|
-
* @beta
|
|
94
|
-
*/
|
|
95
|
-
class SetRealityModelTransparencyTool extends core_frontend_1.Tool {
|
|
96
|
-
static get minArgs() { return 1; }
|
|
97
|
-
static get maxArgs() { return 2; }
|
|
98
|
-
async run(transparency, index) {
|
|
99
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
100
|
-
if (vp === undefined)
|
|
101
|
-
return false;
|
|
102
|
-
const changed = changeRealityModelAppearanceOverrides(vp, { transparency }, index);
|
|
103
|
-
if (changed)
|
|
104
|
-
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `${appearanceChangedString(index)} set to transparency: ${transparency}`));
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
async parseAndRun(...args) {
|
|
108
|
-
return this.run(parseFloat(args[0]), args.length > 1 ? parseInt(args[1], 10) : -1);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
SetRealityModelTransparencyTool
|
|
113
|
-
/** Set reality model appearance override for locatable in display style.
|
|
114
|
-
* @beta
|
|
115
|
-
*/
|
|
116
|
-
class SetRealityModelLocateTool extends core_frontend_1.Tool {
|
|
117
|
-
static get minArgs() { return 1; }
|
|
118
|
-
static get maxArgs() { return 2; }
|
|
119
|
-
async run(locate, index) {
|
|
120
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
121
|
-
if (vp === undefined)
|
|
122
|
-
return false;
|
|
123
|
-
const nonLocatable = locate ? undefined : true;
|
|
124
|
-
const changed = changeRealityModelAppearanceOverrides(vp, { nonLocatable }, index);
|
|
125
|
-
if (changed)
|
|
126
|
-
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `${appearanceChangedString(index)} set to locate: ${locate}`));
|
|
127
|
-
return true;
|
|
128
|
-
}
|
|
129
|
-
async parseAndRun(...args) {
|
|
130
|
-
const locate = (0, parseBoolean_1.parseBoolean)(args[0]);
|
|
131
|
-
return locate === undefined ? false : this.run(locate, args.length > 1 ? parseInt(args[1], 10) : -1);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
SetRealityModelLocateTool
|
|
136
|
-
/** Set reality model appearance override for emphasized in display style.
|
|
137
|
-
* @beta
|
|
138
|
-
*/
|
|
139
|
-
class SetRealityModelEmphasizedTool extends core_frontend_1.Tool {
|
|
140
|
-
static get minArgs() { return 1; }
|
|
141
|
-
static get maxArgs() { return 2; }
|
|
142
|
-
async run(emphasized, index) {
|
|
143
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
144
|
-
if (vp === undefined)
|
|
145
|
-
return false;
|
|
146
|
-
const changed = changeRealityModelAppearanceOverrides(vp, { emphasized }, index);
|
|
147
|
-
if (changed)
|
|
148
|
-
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `${appearanceChangedString(index)} set to emphasized: ${emphasized}`));
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
|
-
async parseAndRun(...args) {
|
|
152
|
-
const emphasized = (0, parseBoolean_1.parseBoolean)(args[0]);
|
|
153
|
-
return emphasized === undefined ? false : this.run(emphasized ? true : undefined, args.length > 1 ? parseInt(args[1], 10) : -1);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
SetRealityModelEmphasizedTool
|
|
158
|
-
/** Detach reality model from display style.
|
|
159
|
-
* @beta
|
|
160
|
-
*/
|
|
161
|
-
class DetachRealityModelTool extends core_frontend_1.Tool {
|
|
162
|
-
static get minArgs() { return 0; }
|
|
163
|
-
static get maxArgs() { return 1; }
|
|
164
|
-
async run(index) {
|
|
165
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
166
|
-
if (vp === undefined)
|
|
167
|
-
return false;
|
|
168
|
-
if (index < 0) {
|
|
169
|
-
vp.displayStyle.settings.contextRealityModels.models.forEach((model) => vp.displayStyle.settings.contextRealityModels.delete(model));
|
|
170
|
-
return true;
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
const model = vp.displayStyle.settings.contextRealityModels.models[index];
|
|
174
|
-
if (!model)
|
|
175
|
-
return false;
|
|
176
|
-
vp.displayStyle.settings.contextRealityModels.delete(model);
|
|
177
|
-
return true;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
async parseAndRun(...args) {
|
|
181
|
-
return this.run(args.length > 0 ? parseInt(args[0], 10) : -1);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
DetachRealityModelTool
|
|
186
|
-
/** Set reality model appearance override for color in display style.
|
|
187
|
-
* @beta
|
|
188
|
-
*/
|
|
189
|
-
class SetRealityModelColorTool extends core_frontend_1.Tool {
|
|
190
|
-
static get minArgs() { return 3; }
|
|
191
|
-
static get maxArgs() { return 4; }
|
|
192
|
-
async run(rgb, index) {
|
|
193
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
194
|
-
if (vp === undefined)
|
|
195
|
-
return false;
|
|
196
|
-
const changed = changeRealityModelAppearanceOverrides(vp, { rgb }, index);
|
|
197
|
-
if (changed)
|
|
198
|
-
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `${appearanceChangedString(index)} set to RGB color: (${rgb.r}, ${rgb.g}, ${rgb.b})`));
|
|
199
|
-
return true;
|
|
200
|
-
}
|
|
201
|
-
async parseAndRun(...args) {
|
|
202
|
-
return this.run({ r: parseFloat(args[0]), g: parseFloat(args[1]), b: parseFloat(args[2]) }, args.length > 3 ? parseInt(args[3], 10) : -1);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
SetRealityModelColorTool
|
|
207
|
-
/** Clear reality model appearance override in display style.
|
|
208
|
-
* @beta
|
|
209
|
-
*/
|
|
210
|
-
class ClearRealityModelAppearanceOverrides extends core_frontend_1.Tool {
|
|
211
|
-
static get minArgs() { return 0; }
|
|
212
|
-
static get maxArgs() { return 1; }
|
|
213
|
-
async run(index) {
|
|
214
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
215
|
-
if (!vp)
|
|
216
|
-
return false;
|
|
217
|
-
const model = vp.displayStyle.settings.contextRealityModels.models[index];
|
|
218
|
-
if (!model)
|
|
219
|
-
return false;
|
|
220
|
-
model.appearanceOverrides = undefined;
|
|
221
|
-
return true;
|
|
222
|
-
}
|
|
223
|
-
async parseAndRun(...args) {
|
|
224
|
-
return this.run(args[0] === undefined ? -1 : parseInt(args[0], 10));
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
ClearRealityModelAppearanceOverrides
|
|
229
|
-
/** Attach a cesium asset from the Ion ID and key.
|
|
230
|
-
* @beta
|
|
231
|
-
*/
|
|
232
|
-
class AttachCesiumAssetTool extends core_frontend_1.Tool {
|
|
233
|
-
static get minArgs() { return 1; }
|
|
234
|
-
static get maxArgs() { return 2; }
|
|
235
|
-
async run(assetId, requestKey) {
|
|
236
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
237
|
-
if (vp === undefined)
|
|
238
|
-
return false;
|
|
239
|
-
// attach using getCesiumAssetUrl
|
|
240
|
-
const accessKey = requestKey ? requestKey : core_frontend_1.IModelApp.tileAdmin.cesiumIonKey ? core_frontend_1.IModelApp.tileAdmin.cesiumIonKey : "";
|
|
241
|
-
const props = {
|
|
242
|
-
tilesetUrl: (0, core_frontend_1.getCesiumAssetUrl)(assetId, accessKey),
|
|
243
|
-
};
|
|
244
|
-
// Alternative new way to attach using rdSourceKey
|
|
245
|
-
// const rdSourceKey = RealityDataSource.createCesiumIonAssetKey(assetId, accessKey);
|
|
246
|
-
// const props: ContextRealityModelProps = { rdSourceKey, tilesetUrl: getCesiumAssetUrl(assetId, accessKey) };
|
|
247
|
-
vp.displayStyle.attachRealityModel(props);
|
|
248
|
-
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `Cesium Asset #${assetId} attached`));
|
|
249
|
-
return true;
|
|
250
|
-
}
|
|
251
|
-
async parseAndRun(...args) {
|
|
252
|
-
const assetId = parseInt(args[0], 10);
|
|
253
|
-
return Number.isNaN(assetId) ? false : this.run(assetId, args[1]);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
AttachCesiumAssetTool
|
|
258
|
-
/** Turn on/off display of OpenStreetMap buildings
|
|
259
|
-
* @beta
|
|
260
|
-
*/
|
|
261
|
-
class ToggleOSMBuildingDisplay extends core_frontend_1.Tool {
|
|
262
|
-
static get minArgs() { return 0; }
|
|
263
|
-
static get maxArgs() { return 2; }
|
|
264
|
-
async run(onOff, transparency) {
|
|
265
|
-
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
266
|
-
if (vp === undefined)
|
|
267
|
-
return false;
|
|
268
|
-
if (onOff === undefined)
|
|
269
|
-
onOff = undefined === vp.displayStyle.getOSMBuildingRealityModel(); // Toggle current state.
|
|
270
|
-
const appearanceOverrides = (transparency !== undefined && transparency > 0 && transparency < 1) ? core_common_1.FeatureAppearance.fromJSON({ transparency }) : undefined;
|
|
271
|
-
vp.displayStyle.setOSMBuildingDisplay({ onOff, appearanceOverrides });
|
|
272
|
-
return true;
|
|
273
|
-
}
|
|
274
|
-
async parseAndRun(...args) {
|
|
275
|
-
const toggle = (0, parseToggle_1.parseToggle)(args[0]);
|
|
276
|
-
const transparency = args.length > 0 ? parseFloat(args[1]) : undefined;
|
|
277
|
-
return typeof toggle === "string" ? false : this.run(toggle, transparency);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
ToggleOSMBuildingDisplay
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ToggleOSMBuildingDisplay = exports.AttachCesiumAssetTool = exports.ClearRealityModelAppearanceOverrides = exports.SetRealityModelColorTool = exports.DetachRealityModelTool = exports.SetRealityModelEmphasizedTool = exports.SetRealityModelLocateTool = exports.SetRealityModelTransparencyTool = exports.SaveRealityModelTool = exports.AttachRealityModelTool = void 0;
|
|
8
|
+
/** @packageDocumentation
|
|
9
|
+
* @module Tools
|
|
10
|
+
*/
|
|
11
|
+
const core_common_1 = require("@itwin/core-common");
|
|
12
|
+
const core_frontend_1 = require("@itwin/core-frontend");
|
|
13
|
+
const ClipboardUtilities_1 = require("../ClipboardUtilities");
|
|
14
|
+
const parseBoolean_1 = require("./parseBoolean");
|
|
15
|
+
const parseToggle_1 = require("./parseToggle");
|
|
16
|
+
/** This tool attaches a specified reality model.
|
|
17
|
+
* @beta
|
|
18
|
+
*/
|
|
19
|
+
class AttachRealityModelTool extends core_frontend_1.Tool {
|
|
20
|
+
static get minArgs() { return 1; }
|
|
21
|
+
static get maxArgs() { return 1; }
|
|
22
|
+
/** This method runs the tool, attaching a specified reality model.
|
|
23
|
+
* @param data a [[ContextRealityModelProps]] JSON representation
|
|
24
|
+
*/
|
|
25
|
+
async run(data) {
|
|
26
|
+
const props = JSON.parse(data);
|
|
27
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
28
|
+
if (vp === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (props === undefined || props.tilesetUrl === undefined) {
|
|
31
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Error, `Properties ${props} are not valid`));
|
|
32
|
+
}
|
|
33
|
+
vp.displayStyle.attachRealityModel(props);
|
|
34
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `Reality Model ${props.tilesetUrl} attached`));
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
/** Executes this tool's run method with args[0] containing `data`.
|
|
38
|
+
* @see [[run]]
|
|
39
|
+
*/
|
|
40
|
+
async parseAndRun(...args) {
|
|
41
|
+
return this.run(args[0]);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
AttachRealityModelTool.toolId = "AttachRealityModelTool";
|
|
45
|
+
exports.AttachRealityModelTool = AttachRealityModelTool;
|
|
46
|
+
/** This tool saves a reality model's JSON representation to the system clipboard.
|
|
47
|
+
* @beta */
|
|
48
|
+
class SaveRealityModelTool extends core_frontend_1.Tool {
|
|
49
|
+
static get minArgs() { return 0; }
|
|
50
|
+
static get maxArgs() { return 1; }
|
|
51
|
+
/** This method runs the tool, saving a reality model's JSON representation to the system clipboard.
|
|
52
|
+
* @param name the name of the reality model to copy; if undefined, copy the last found reality model
|
|
53
|
+
*/
|
|
54
|
+
async run(name) {
|
|
55
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
56
|
+
if (vp === undefined)
|
|
57
|
+
return false;
|
|
58
|
+
vp.displayStyle.forEachRealityModel((realityModel) => {
|
|
59
|
+
if (name === undefined || realityModel.name === name) {
|
|
60
|
+
(0, ClipboardUtilities_1.copyStringToClipboard)(JSON.stringify(realityModel.toJSON()));
|
|
61
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `Reality Model ${realityModel.name} copied to clipboard`));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
/** Executes this tool's run method with args[0] containing `name`.
|
|
67
|
+
* @see [[run]]
|
|
68
|
+
*/
|
|
69
|
+
async parseAndRun(...args) {
|
|
70
|
+
return this.run(args.length > 0 ? args[0] : undefined);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
SaveRealityModelTool.toolId = "SaveRealityModelTool";
|
|
74
|
+
exports.SaveRealityModelTool = SaveRealityModelTool;
|
|
75
|
+
function changeRealityModelAppearanceOverrides(vp, overrides, index) {
|
|
76
|
+
if (index < 0) {
|
|
77
|
+
for (const model of vp.displayStyle.settings.contextRealityModels.models)
|
|
78
|
+
model.appearanceOverrides = model.appearanceOverrides ? model.appearanceOverrides.clone(overrides) : core_common_1.FeatureAppearance.fromJSON(overrides);
|
|
79
|
+
return vp.displayStyle.settings.contextRealityModels.models.length > 0;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
const model = vp.displayStyle.settings.contextRealityModels.models[index];
|
|
83
|
+
if (!model)
|
|
84
|
+
return false;
|
|
85
|
+
model.appearanceOverrides = model.appearanceOverrides ? model.appearanceOverrides.clone(overrides) : core_common_1.FeatureAppearance.fromJSON(overrides);
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function appearanceChangedString(index) {
|
|
90
|
+
return index < 0 ? `All Reality Models` : `Reality Model at Index: ${index}`;
|
|
91
|
+
}
|
|
92
|
+
/** Set reality model appearance override for transparency in display style.
|
|
93
|
+
* @beta
|
|
94
|
+
*/
|
|
95
|
+
class SetRealityModelTransparencyTool extends core_frontend_1.Tool {
|
|
96
|
+
static get minArgs() { return 1; }
|
|
97
|
+
static get maxArgs() { return 2; }
|
|
98
|
+
async run(transparency, index) {
|
|
99
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
100
|
+
if (vp === undefined)
|
|
101
|
+
return false;
|
|
102
|
+
const changed = changeRealityModelAppearanceOverrides(vp, { transparency }, index);
|
|
103
|
+
if (changed)
|
|
104
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `${appearanceChangedString(index)} set to transparency: ${transparency}`));
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
async parseAndRun(...args) {
|
|
108
|
+
return this.run(parseFloat(args[0]), args.length > 1 ? parseInt(args[1], 10) : -1);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
SetRealityModelTransparencyTool.toolId = "SetRealityModelTransparencyTool";
|
|
112
|
+
exports.SetRealityModelTransparencyTool = SetRealityModelTransparencyTool;
|
|
113
|
+
/** Set reality model appearance override for locatable in display style.
|
|
114
|
+
* @beta
|
|
115
|
+
*/
|
|
116
|
+
class SetRealityModelLocateTool extends core_frontend_1.Tool {
|
|
117
|
+
static get minArgs() { return 1; }
|
|
118
|
+
static get maxArgs() { return 2; }
|
|
119
|
+
async run(locate, index) {
|
|
120
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
121
|
+
if (vp === undefined)
|
|
122
|
+
return false;
|
|
123
|
+
const nonLocatable = locate ? undefined : true;
|
|
124
|
+
const changed = changeRealityModelAppearanceOverrides(vp, { nonLocatable }, index);
|
|
125
|
+
if (changed)
|
|
126
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `${appearanceChangedString(index)} set to locate: ${locate}`));
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
async parseAndRun(...args) {
|
|
130
|
+
const locate = (0, parseBoolean_1.parseBoolean)(args[0]);
|
|
131
|
+
return locate === undefined ? false : this.run(locate, args.length > 1 ? parseInt(args[1], 10) : -1);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
SetRealityModelLocateTool.toolId = "SetRealityModelLocateTool";
|
|
135
|
+
exports.SetRealityModelLocateTool = SetRealityModelLocateTool;
|
|
136
|
+
/** Set reality model appearance override for emphasized in display style.
|
|
137
|
+
* @beta
|
|
138
|
+
*/
|
|
139
|
+
class SetRealityModelEmphasizedTool extends core_frontend_1.Tool {
|
|
140
|
+
static get minArgs() { return 1; }
|
|
141
|
+
static get maxArgs() { return 2; }
|
|
142
|
+
async run(emphasized, index) {
|
|
143
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
144
|
+
if (vp === undefined)
|
|
145
|
+
return false;
|
|
146
|
+
const changed = changeRealityModelAppearanceOverrides(vp, { emphasized }, index);
|
|
147
|
+
if (changed)
|
|
148
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `${appearanceChangedString(index)} set to emphasized: ${emphasized}`));
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
async parseAndRun(...args) {
|
|
152
|
+
const emphasized = (0, parseBoolean_1.parseBoolean)(args[0]);
|
|
153
|
+
return emphasized === undefined ? false : this.run(emphasized ? true : undefined, args.length > 1 ? parseInt(args[1], 10) : -1);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
SetRealityModelEmphasizedTool.toolId = "SetRealityModelEmphasizedTool";
|
|
157
|
+
exports.SetRealityModelEmphasizedTool = SetRealityModelEmphasizedTool;
|
|
158
|
+
/** Detach reality model from display style.
|
|
159
|
+
* @beta
|
|
160
|
+
*/
|
|
161
|
+
class DetachRealityModelTool extends core_frontend_1.Tool {
|
|
162
|
+
static get minArgs() { return 0; }
|
|
163
|
+
static get maxArgs() { return 1; }
|
|
164
|
+
async run(index) {
|
|
165
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
166
|
+
if (vp === undefined)
|
|
167
|
+
return false;
|
|
168
|
+
if (index < 0) {
|
|
169
|
+
vp.displayStyle.settings.contextRealityModels.models.forEach((model) => vp.displayStyle.settings.contextRealityModels.delete(model));
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
const model = vp.displayStyle.settings.contextRealityModels.models[index];
|
|
174
|
+
if (!model)
|
|
175
|
+
return false;
|
|
176
|
+
vp.displayStyle.settings.contextRealityModels.delete(model);
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async parseAndRun(...args) {
|
|
181
|
+
return this.run(args.length > 0 ? parseInt(args[0], 10) : -1);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
DetachRealityModelTool.toolId = "ViewportDetachRealityModel";
|
|
185
|
+
exports.DetachRealityModelTool = DetachRealityModelTool;
|
|
186
|
+
/** Set reality model appearance override for color in display style.
|
|
187
|
+
* @beta
|
|
188
|
+
*/
|
|
189
|
+
class SetRealityModelColorTool extends core_frontend_1.Tool {
|
|
190
|
+
static get minArgs() { return 3; }
|
|
191
|
+
static get maxArgs() { return 4; }
|
|
192
|
+
async run(rgb, index) {
|
|
193
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
194
|
+
if (vp === undefined)
|
|
195
|
+
return false;
|
|
196
|
+
const changed = changeRealityModelAppearanceOverrides(vp, { rgb }, index);
|
|
197
|
+
if (changed)
|
|
198
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `${appearanceChangedString(index)} set to RGB color: (${rgb.r}, ${rgb.g}, ${rgb.b})`));
|
|
199
|
+
return true;
|
|
200
|
+
}
|
|
201
|
+
async parseAndRun(...args) {
|
|
202
|
+
return this.run({ r: parseFloat(args[0]), g: parseFloat(args[1]), b: parseFloat(args[2]) }, args.length > 3 ? parseInt(args[3], 10) : -1);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
SetRealityModelColorTool.toolId = "SetRealityModelColorTool";
|
|
206
|
+
exports.SetRealityModelColorTool = SetRealityModelColorTool;
|
|
207
|
+
/** Clear reality model appearance override in display style.
|
|
208
|
+
* @beta
|
|
209
|
+
*/
|
|
210
|
+
class ClearRealityModelAppearanceOverrides extends core_frontend_1.Tool {
|
|
211
|
+
static get minArgs() { return 0; }
|
|
212
|
+
static get maxArgs() { return 1; }
|
|
213
|
+
async run(index) {
|
|
214
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
215
|
+
if (!vp)
|
|
216
|
+
return false;
|
|
217
|
+
const model = vp.displayStyle.settings.contextRealityModels.models[index];
|
|
218
|
+
if (!model)
|
|
219
|
+
return false;
|
|
220
|
+
model.appearanceOverrides = undefined;
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
async parseAndRun(...args) {
|
|
224
|
+
return this.run(args[0] === undefined ? -1 : parseInt(args[0], 10));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
ClearRealityModelAppearanceOverrides.toolId = "ClearRealityModelAppearanceOverrides";
|
|
228
|
+
exports.ClearRealityModelAppearanceOverrides = ClearRealityModelAppearanceOverrides;
|
|
229
|
+
/** Attach a cesium asset from the Ion ID and key.
|
|
230
|
+
* @beta
|
|
231
|
+
*/
|
|
232
|
+
class AttachCesiumAssetTool extends core_frontend_1.Tool {
|
|
233
|
+
static get minArgs() { return 1; }
|
|
234
|
+
static get maxArgs() { return 2; }
|
|
235
|
+
async run(assetId, requestKey) {
|
|
236
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
237
|
+
if (vp === undefined)
|
|
238
|
+
return false;
|
|
239
|
+
// attach using getCesiumAssetUrl
|
|
240
|
+
const accessKey = requestKey ? requestKey : core_frontend_1.IModelApp.tileAdmin.cesiumIonKey ? core_frontend_1.IModelApp.tileAdmin.cesiumIonKey : "";
|
|
241
|
+
const props = {
|
|
242
|
+
tilesetUrl: (0, core_frontend_1.getCesiumAssetUrl)(assetId, accessKey),
|
|
243
|
+
};
|
|
244
|
+
// Alternative new way to attach using rdSourceKey
|
|
245
|
+
// const rdSourceKey = RealityDataSource.createCesiumIonAssetKey(assetId, accessKey);
|
|
246
|
+
// const props: ContextRealityModelProps = { rdSourceKey, tilesetUrl: getCesiumAssetUrl(assetId, accessKey) };
|
|
247
|
+
vp.displayStyle.attachRealityModel(props);
|
|
248
|
+
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, `Cesium Asset #${assetId} attached`));
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
async parseAndRun(...args) {
|
|
252
|
+
const assetId = parseInt(args[0], 10);
|
|
253
|
+
return Number.isNaN(assetId) ? false : this.run(assetId, args[1]);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
AttachCesiumAssetTool.toolId = "AttachCesiumAssetTool";
|
|
257
|
+
exports.AttachCesiumAssetTool = AttachCesiumAssetTool;
|
|
258
|
+
/** Turn on/off display of OpenStreetMap buildings
|
|
259
|
+
* @beta
|
|
260
|
+
*/
|
|
261
|
+
class ToggleOSMBuildingDisplay extends core_frontend_1.Tool {
|
|
262
|
+
static get minArgs() { return 0; }
|
|
263
|
+
static get maxArgs() { return 2; }
|
|
264
|
+
async run(onOff, transparency) {
|
|
265
|
+
const vp = core_frontend_1.IModelApp.viewManager.selectedView;
|
|
266
|
+
if (vp === undefined)
|
|
267
|
+
return false;
|
|
268
|
+
if (onOff === undefined)
|
|
269
|
+
onOff = undefined === vp.displayStyle.getOSMBuildingRealityModel(); // Toggle current state.
|
|
270
|
+
const appearanceOverrides = (transparency !== undefined && transparency > 0 && transparency < 1) ? core_common_1.FeatureAppearance.fromJSON({ transparency }) : undefined;
|
|
271
|
+
vp.displayStyle.setOSMBuildingDisplay({ onOff, appearanceOverrides });
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
async parseAndRun(...args) {
|
|
275
|
+
const toggle = (0, parseToggle_1.parseToggle)(args[0]);
|
|
276
|
+
const transparency = args.length > 0 ? parseFloat(args[1]) : undefined;
|
|
277
|
+
return typeof toggle === "string" ? false : this.run(toggle, transparency);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
ToggleOSMBuildingDisplay.toolId = "SetBuildingDisplay";
|
|
281
|
+
exports.ToggleOSMBuildingDisplay = ToggleOSMBuildingDisplay;
|
|
282
282
|
//# sourceMappingURL=RealityModelTools.js.map
|