@itwin/frontend-devtools 5.0.0-dev.8 → 5.0.0-dev.82
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 +46 -1
- package/lib/cjs/FrontEndDevTools.js +1 -1
- package/lib/cjs/FrontEndDevTools.js.map +1 -1
- package/lib/cjs/effects/Convolution.js +6 -6
- package/lib/cjs/effects/Convolution.js.map +1 -1
- package/lib/cjs/effects/EffectTools.js +2 -2
- package/lib/cjs/effects/EffectTools.js.map +1 -1
- package/lib/cjs/effects/Explosion.js +37 -25
- package/lib/cjs/effects/Explosion.js.map +1 -1
- package/lib/cjs/effects/FlipImage.js +2 -2
- package/lib/cjs/effects/FlipImage.js.map +1 -1
- package/lib/cjs/effects/LensDistortion.js +4 -4
- package/lib/cjs/effects/LensDistortion.js.map +1 -1
- package/lib/cjs/effects/Saturation.js +4 -4
- package/lib/cjs/effects/Saturation.js.map +1 -1
- package/lib/cjs/effects/Snow.d.ts +1 -1
- package/lib/cjs/effects/Snow.d.ts.map +1 -1
- package/lib/cjs/effects/Snow.js +19 -8
- package/lib/cjs/effects/Snow.js.map +1 -1
- package/lib/cjs/effects/Vignette.js +12 -12
- package/lib/cjs/effects/Vignette.js.map +1 -1
- package/lib/cjs/tools/AnimationIntervalTool.js +1 -1
- package/lib/cjs/tools/AnimationIntervalTool.js.map +1 -1
- package/lib/cjs/tools/ChangeUnitsTool.js +1 -1
- package/lib/cjs/tools/ChangeUnitsTool.js.map +1 -1
- package/lib/cjs/tools/ClipTools.js +6 -8
- package/lib/cjs/tools/ClipTools.js.map +1 -1
- package/lib/cjs/tools/DisplayStyleTools.js +21 -25
- package/lib/cjs/tools/DisplayStyleTools.js.map +1 -1
- package/lib/cjs/tools/EmphasizeElementsTool.js +7 -13
- package/lib/cjs/tools/EmphasizeElementsTool.js.map +1 -1
- package/lib/cjs/tools/FrustumDecoration.js +28 -9
- package/lib/cjs/tools/FrustumDecoration.js.map +1 -1
- package/lib/cjs/tools/InspectElementTool.js +7 -6
- package/lib/cjs/tools/InspectElementTool.js.map +1 -1
- package/lib/cjs/tools/MapLayerTool.js +24 -20
- package/lib/cjs/tools/MapLayerTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTileLoadTime.js +4 -1
- package/lib/cjs/tools/MeasureTileLoadTime.js.map +1 -1
- package/lib/cjs/tools/ModelAppearanceTools.js +9 -9
- package/lib/cjs/tools/ModelAppearanceTools.js.map +1 -1
- package/lib/cjs/tools/PlanProjectionTools.js +8 -15
- package/lib/cjs/tools/PlanProjectionTools.js.map +1 -1
- package/lib/cjs/tools/PlanarMaskTools.js +21 -26
- package/lib/cjs/tools/PlanarMaskTools.js.map +1 -1
- package/lib/cjs/tools/ProjectExtents.js +6 -3
- package/lib/cjs/tools/ProjectExtents.js.map +1 -1
- package/lib/cjs/tools/RealityModelTools.js +10 -10
- package/lib/cjs/tools/RealityModelTools.js.map +1 -1
- package/lib/cjs/tools/RealityTransitionTool.js +1 -1
- package/lib/cjs/tools/RealityTransitionTool.js.map +1 -1
- package/lib/cjs/tools/RenderSystemTools.js +4 -3
- package/lib/cjs/tools/RenderSystemTools.js.map +1 -1
- package/lib/cjs/tools/RenderTargetTools.d.ts +1 -1
- package/lib/cjs/tools/RenderTargetTools.d.ts.map +1 -1
- package/lib/cjs/tools/RenderTargetTools.js +15 -20
- package/lib/cjs/tools/RenderTargetTools.js.map +1 -1
- package/lib/cjs/tools/ReportWebGLCompatibilityTool.js +1 -1
- package/lib/cjs/tools/ReportWebGLCompatibilityTool.js.map +1 -1
- package/lib/cjs/tools/SavedViews.js +4 -7
- package/lib/cjs/tools/SavedViews.js.map +1 -1
- package/lib/cjs/tools/ScheduleScriptTools.d.ts.map +1 -1
- package/lib/cjs/tools/ScheduleScriptTools.js +11 -12
- package/lib/cjs/tools/ScheduleScriptTools.js.map +1 -1
- package/lib/cjs/tools/SelectionTools.js +4 -6
- package/lib/cjs/tools/SelectionTools.js.map +1 -1
- package/lib/cjs/tools/SetGpuMemoryLimitTool.js +1 -1
- package/lib/cjs/tools/SetGpuMemoryLimitTool.js.map +1 -1
- package/lib/cjs/tools/SourceAspectIdTools.js +2 -2
- package/lib/cjs/tools/SourceAspectIdTools.js.map +1 -1
- package/lib/cjs/tools/TileRequestDecoration.js +6 -3
- package/lib/cjs/tools/TileRequestDecoration.js.map +1 -1
- package/lib/cjs/tools/TileTreeBoundsDecoration.d.ts.map +1 -1
- package/lib/cjs/tools/TileTreeBoundsDecoration.js +8 -4
- package/lib/cjs/tools/TileTreeBoundsDecoration.js.map +1 -1
- package/lib/cjs/tools/ToolTipProvider.js +2 -1
- package/lib/cjs/tools/ToolTipProvider.js.map +1 -1
- package/lib/cjs/tools/ViewportTools.js +22 -19
- package/lib/cjs/tools/ViewportTools.js.map +1 -1
- package/lib/cjs/widgets/DiagnosticsPanel.d.ts +1 -1
- package/lib/cjs/widgets/DiagnosticsPanel.d.ts.map +1 -1
- package/lib/cjs/widgets/DiagnosticsPanel.js +11 -1
- package/lib/cjs/widgets/DiagnosticsPanel.js.map +1 -1
- package/lib/cjs/widgets/FpsTracker.d.ts +1 -1
- package/lib/cjs/widgets/FpsTracker.d.ts.map +1 -1
- package/lib/cjs/widgets/FpsTracker.js +5 -1
- package/lib/cjs/widgets/FpsTracker.js.map +1 -1
- package/lib/cjs/widgets/GpuProfiler.d.ts +1 -1
- package/lib/cjs/widgets/GpuProfiler.d.ts.map +1 -1
- package/lib/cjs/widgets/GpuProfiler.js +89 -82
- package/lib/cjs/widgets/GpuProfiler.js.map +1 -1
- package/lib/cjs/widgets/KeyinField.js +8 -1
- package/lib/cjs/widgets/KeyinField.js.map +1 -1
- package/lib/cjs/widgets/MemoryTracker.d.ts +1 -1
- package/lib/cjs/widgets/MemoryTracker.d.ts.map +1 -1
- package/lib/cjs/widgets/MemoryTracker.js +16 -4
- package/lib/cjs/widgets/MemoryTracker.js.map +1 -1
- package/lib/cjs/widgets/RenderCommandBreakdown.d.ts +1 -1
- package/lib/cjs/widgets/RenderCommandBreakdown.d.ts.map +1 -1
- package/lib/cjs/widgets/RenderCommandBreakdown.js +6 -2
- package/lib/cjs/widgets/RenderCommandBreakdown.js.map +1 -1
- package/lib/cjs/widgets/TileMemoryBreakdown.d.ts +1 -1
- package/lib/cjs/widgets/TileMemoryBreakdown.d.ts.map +1 -1
- package/lib/cjs/widgets/TileMemoryBreakdown.js +10 -8
- package/lib/cjs/widgets/TileMemoryBreakdown.js.map +1 -1
- package/lib/cjs/widgets/TileStatisticsTracker.d.ts +1 -1
- package/lib/cjs/widgets/TileStatisticsTracker.d.ts.map +1 -1
- package/lib/cjs/widgets/TileStatisticsTracker.js +5 -2
- package/lib/cjs/widgets/TileStatisticsTracker.js.map +1 -1
- package/lib/cjs/widgets/ToolSettingsTracker.d.ts +1 -1
- package/lib/cjs/widgets/ToolSettingsTracker.d.ts.map +1 -1
- package/lib/cjs/widgets/ToolSettingsTracker.js +2 -2
- package/lib/cjs/widgets/ToolSettingsTracker.js.map +1 -1
- package/lib/esm/FrontEndDevTools.js +1 -1
- package/lib/esm/FrontEndDevTools.js.map +1 -1
- package/lib/esm/effects/Convolution.js +6 -6
- package/lib/esm/effects/Convolution.js.map +1 -1
- package/lib/esm/effects/EffectTools.js +2 -2
- package/lib/esm/effects/EffectTools.js.map +1 -1
- package/lib/esm/effects/Explosion.js +37 -25
- package/lib/esm/effects/Explosion.js.map +1 -1
- package/lib/esm/effects/FlipImage.js +2 -2
- package/lib/esm/effects/FlipImage.js.map +1 -1
- package/lib/esm/effects/LensDistortion.js +4 -4
- package/lib/esm/effects/LensDistortion.js.map +1 -1
- package/lib/esm/effects/Saturation.js +4 -4
- package/lib/esm/effects/Saturation.js.map +1 -1
- package/lib/esm/effects/Snow.d.ts +1 -1
- package/lib/esm/effects/Snow.d.ts.map +1 -1
- package/lib/esm/effects/Snow.js +19 -8
- package/lib/esm/effects/Snow.js.map +1 -1
- package/lib/esm/effects/Vignette.js +12 -12
- package/lib/esm/effects/Vignette.js.map +1 -1
- package/lib/esm/tools/AnimationIntervalTool.js +1 -1
- package/lib/esm/tools/AnimationIntervalTool.js.map +1 -1
- package/lib/esm/tools/ChangeUnitsTool.js +1 -1
- package/lib/esm/tools/ChangeUnitsTool.js.map +1 -1
- package/lib/esm/tools/ClipTools.js +6 -8
- package/lib/esm/tools/ClipTools.js.map +1 -1
- package/lib/esm/tools/DisplayStyleTools.js +21 -25
- package/lib/esm/tools/DisplayStyleTools.js.map +1 -1
- package/lib/esm/tools/EmphasizeElementsTool.js +7 -13
- package/lib/esm/tools/EmphasizeElementsTool.js.map +1 -1
- package/lib/esm/tools/FrustumDecoration.js +28 -9
- package/lib/esm/tools/FrustumDecoration.js.map +1 -1
- package/lib/esm/tools/InspectElementTool.js +7 -6
- package/lib/esm/tools/InspectElementTool.js.map +1 -1
- package/lib/esm/tools/MapLayerTool.js +24 -20
- package/lib/esm/tools/MapLayerTool.js.map +1 -1
- package/lib/esm/tools/MeasureTileLoadTime.js +4 -1
- package/lib/esm/tools/MeasureTileLoadTime.js.map +1 -1
- package/lib/esm/tools/ModelAppearanceTools.js +9 -9
- package/lib/esm/tools/ModelAppearanceTools.js.map +1 -1
- package/lib/esm/tools/PlanProjectionTools.js +8 -15
- package/lib/esm/tools/PlanProjectionTools.js.map +1 -1
- package/lib/esm/tools/PlanarMaskTools.js +21 -26
- package/lib/esm/tools/PlanarMaskTools.js.map +1 -1
- package/lib/esm/tools/ProjectExtents.js +6 -3
- package/lib/esm/tools/ProjectExtents.js.map +1 -1
- package/lib/esm/tools/RealityModelTools.js +10 -10
- package/lib/esm/tools/RealityModelTools.js.map +1 -1
- package/lib/esm/tools/RealityTransitionTool.js +1 -1
- package/lib/esm/tools/RealityTransitionTool.js.map +1 -1
- package/lib/esm/tools/RenderSystemTools.js +4 -3
- package/lib/esm/tools/RenderSystemTools.js.map +1 -1
- package/lib/esm/tools/RenderTargetTools.d.ts +1 -1
- package/lib/esm/tools/RenderTargetTools.d.ts.map +1 -1
- package/lib/esm/tools/RenderTargetTools.js +15 -20
- package/lib/esm/tools/RenderTargetTools.js.map +1 -1
- package/lib/esm/tools/ReportWebGLCompatibilityTool.js +1 -1
- package/lib/esm/tools/ReportWebGLCompatibilityTool.js.map +1 -1
- package/lib/esm/tools/SavedViews.js +4 -7
- package/lib/esm/tools/SavedViews.js.map +1 -1
- package/lib/esm/tools/ScheduleScriptTools.d.ts.map +1 -1
- package/lib/esm/tools/ScheduleScriptTools.js +11 -12
- package/lib/esm/tools/ScheduleScriptTools.js.map +1 -1
- package/lib/esm/tools/SelectionTools.js +4 -6
- package/lib/esm/tools/SelectionTools.js.map +1 -1
- package/lib/esm/tools/SetGpuMemoryLimitTool.js +1 -1
- package/lib/esm/tools/SetGpuMemoryLimitTool.js.map +1 -1
- package/lib/esm/tools/SourceAspectIdTools.js +2 -2
- package/lib/esm/tools/SourceAspectIdTools.js.map +1 -1
- package/lib/esm/tools/TileRequestDecoration.js +6 -3
- package/lib/esm/tools/TileRequestDecoration.js.map +1 -1
- package/lib/esm/tools/TileTreeBoundsDecoration.d.ts.map +1 -1
- package/lib/esm/tools/TileTreeBoundsDecoration.js +8 -4
- package/lib/esm/tools/TileTreeBoundsDecoration.js.map +1 -1
- package/lib/esm/tools/ToolTipProvider.js +2 -1
- package/lib/esm/tools/ToolTipProvider.js.map +1 -1
- package/lib/esm/tools/ViewportTools.js +22 -19
- package/lib/esm/tools/ViewportTools.js.map +1 -1
- package/lib/esm/widgets/DiagnosticsPanel.d.ts +1 -1
- package/lib/esm/widgets/DiagnosticsPanel.d.ts.map +1 -1
- package/lib/esm/widgets/DiagnosticsPanel.js +11 -1
- package/lib/esm/widgets/DiagnosticsPanel.js.map +1 -1
- package/lib/esm/widgets/FpsTracker.d.ts +1 -1
- package/lib/esm/widgets/FpsTracker.d.ts.map +1 -1
- package/lib/esm/widgets/FpsTracker.js +5 -1
- package/lib/esm/widgets/FpsTracker.js.map +1 -1
- package/lib/esm/widgets/GpuProfiler.d.ts +1 -1
- package/lib/esm/widgets/GpuProfiler.d.ts.map +1 -1
- package/lib/esm/widgets/GpuProfiler.js +89 -82
- package/lib/esm/widgets/GpuProfiler.js.map +1 -1
- package/lib/esm/widgets/KeyinField.js +8 -1
- package/lib/esm/widgets/KeyinField.js.map +1 -1
- package/lib/esm/widgets/MemoryTracker.d.ts +1 -1
- package/lib/esm/widgets/MemoryTracker.d.ts.map +1 -1
- package/lib/esm/widgets/MemoryTracker.js +16 -4
- package/lib/esm/widgets/MemoryTracker.js.map +1 -1
- package/lib/esm/widgets/RenderCommandBreakdown.d.ts +1 -1
- package/lib/esm/widgets/RenderCommandBreakdown.d.ts.map +1 -1
- package/lib/esm/widgets/RenderCommandBreakdown.js +6 -2
- package/lib/esm/widgets/RenderCommandBreakdown.js.map +1 -1
- package/lib/esm/widgets/TileMemoryBreakdown.d.ts +1 -1
- package/lib/esm/widgets/TileMemoryBreakdown.d.ts.map +1 -1
- package/lib/esm/widgets/TileMemoryBreakdown.js +10 -8
- package/lib/esm/widgets/TileMemoryBreakdown.js.map +1 -1
- package/lib/esm/widgets/TileStatisticsTracker.d.ts +1 -1
- package/lib/esm/widgets/TileStatisticsTracker.d.ts.map +1 -1
- package/lib/esm/widgets/TileStatisticsTracker.js +5 -2
- package/lib/esm/widgets/TileStatisticsTracker.js.map +1 -1
- package/lib/esm/widgets/ToolSettingsTracker.d.ts +1 -1
- package/lib/esm/widgets/ToolSettingsTracker.d.ts.map +1 -1
- package/lib/esm/widgets/ToolSettingsTracker.js +2 -2
- package/lib/esm/widgets/ToolSettingsTracker.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrustumDecoration.js","sourceRoot":"","sources":["../../../src/tools/FrustumDecoration.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,wDAAsD;AACtD,oDAAqF;AACrF,wDAE8B;AAC9B,+CAA4C;AAO5C;;;;;;GAMG;AACH,MAAM,iBAA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Q,CAAC;YAC9C,IAAI,OAAO,KAAK,cAAc;gBAC5B,OAAO;QACX,CAAC;QAED,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;YAC3B,uBAAuB,CAAC,SAAS,GAAG,IAAI,uBAAuB,CAAC,EAAE,CAAC,CAAC;QACtE,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,IAAI,EAAE,CAAC;YAChB,uBAAuB,CAAC,SAAS,GAAG,SAAS,CAAC;QAChD,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAa,uBAAwB,SAAQ,oBAAI;IAExC,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAElC,KAAK,CAAC,GAAG,CAAC,MAAgB;QACxC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,SAAS,KAAK,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;YAC7C,uBAAuB,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAE7C,OAAO,IAAI,CAAC;IACd,CAAC;IAEe,KAAK,CAAC,WAAW,CAAC,GAAG,IAAc;QACjD,MAAM,MAAM,GAAG,IAAA,yBAAW,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,OAAO,MAAM,KAAK,QAAQ;YAC5B,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAEzB,OAAO,IAAI,CAAC;IACd,CAAC;;AAnBH,0DAoBC;AAnBwB,8BAAM,GAAG,qBAAqB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { Map4d, Point3d } from \"@itwin/core-geometry\";\nimport { ColorByName, ColorDef, Frustum, LinePixels, Npc } from \"@itwin/core-common\";\nimport {\n CoordSystem, DecorateContext, Decorator, GraphicBuilder, GraphicType, IModelApp, Tool, Viewport, ViewState, ViewState3d,\n} from \"@itwin/core-frontend\";\nimport { parseToggle } from \"./parseToggle\";\n\ninterface FrustumDecorationOptions {\n showPreloadFrustum?: boolean;\n showBackgroundIntersections?: boolean;\n}\n\n/**\n * Decorates the viewport with a graphical depiction of a Frustum.\n * This is obviously only useful when drawn inside a viewport using a *different* Frustum.\n * Options for doing so include:\n * - Having more than one viewport, and drawing the frustum of one viewport inside the other viewports; and\n * - Allowing the user to take a snapshot of the current frustum, then navigate the view to inspect it within the same viewport.\n */\nclass FrustumDecoration {\n private readonly _worldFrustum: Frustum;\n private readonly _adjustedWorldFrustum: Frustum;\n private readonly _preloadFrustum: Frustum;\n private readonly _npcFrustum: Frustum;\n private readonly _worldToNpcMap: Map4d;\n private readonly _eyePoint: Point3d;\n private readonly _focalPlane: number;\n private readonly _isCameraOn: boolean;\n\n private constructor(vp: Viewport, view: ViewState3d, private readonly _options?: FrustumDecorationOptions) {\n this._worldFrustum = vp.getFrustum(CoordSystem.World, false);\n this._adjustedWorldFrustum = vp.getFrustum(CoordSystem.World, true);\n this._preloadFrustum = vp.viewingSpace.getPreloadFrustum();\n this._npcFrustum = vp.getFrustum(CoordSystem.Npc, true);\n this._worldToNpcMap = vp.viewingSpace.worldToNpcMap.clone();\n this._eyePoint = view.camera.getEyePoint().clone();\n this._focalPlane = vp.worldToNpc(view.getTargetPoint()).z;\n this._isCameraOn = vp.isCameraOn;\n }\n\n public static create(vp: Viewport, options?: FrustumDecorationOptions): FrustumDecoration | undefined {\n const view = vp.view.isSpatialView() ? vp.view : undefined;\n return undefined !== view ? new FrustumDecoration(vp, view, options) : undefined;\n }\n\n public decorate(context: DecorateContext): void {\n const builder = context.createGraphicBuilder(GraphicType.WorldDecoration);\n\n if (this._isCameraOn)\n FrustumDecoration.drawEyePositionAndFocalPlane(builder, this._npcFrustum, this._worldToNpcMap, this._eyePoint, this._focalPlane, context.viewport);\n\n FrustumDecoration.drawFrustumBox(builder, this._worldFrustum, false, context.viewport); // show original frustum...\n FrustumDecoration.drawFrustumBox(builder, this._adjustedWorldFrustum, true, context.viewport); // show adjusted frustum...\n const options = this._options;\n if (options !== undefined) {\n if (options.showPreloadFrustum)\n FrustumDecoration.drawPreloadFrustum(builder, this._preloadFrustum);\n\n if (options?.showBackgroundIntersections) {\n const backgroundMapGeometry = context.viewport.view.displayStyle.getBackgroundMapGeometry();\n if (backgroundMapGeometry)\n backgroundMapGeometry.addFrustumDecorations(builder, this._adjustedWorldFrustum);\n }\n }\n context.addDecorationFromBuilder(builder);\n }\n\n public static drawPreloadFrustum(builder: GraphicBuilder, frustum: Frustum) {\n const preloadColor = ColorDef.create(ColorByName.coral);\n builder.setSymbology(preloadColor, preloadColor, 1, LinePixels.Code2);\n builder.addFrustum(frustum);\n }\n\n public static drawFrustumBox(builder: GraphicBuilder, frustum: Frustum, adjustedBox: boolean, vp: Viewport): void {\n const backPts = this.getPlanePts(frustum.points, false); // back plane\n const frontPts = this.getPlanePts(frustum.points, true); // front plane\n\n const bgColor = vp.view.backgroundColor;\n const backAndBottomColor = ColorDef.red.adjustedForContrast(bgColor);\n const frontAndTopLeftColor = ColorDef.blue.adjustedForContrast(bgColor);\n const frontAndTopRightColor = ColorDef.green.adjustedForContrast(bgColor);\n const edgeWeight = adjustedBox ? 2 : 1;\n const edgeStyle = adjustedBox ? LinePixels.Solid : LinePixels.Code2;\n\n // Back plane\n builder.setSymbology(backAndBottomColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(backPts);\n\n // Front plane\n builder.setSymbology(frontAndTopLeftColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(frontPts);\n\n // Bottom edge\n builder.setSymbology(backAndBottomColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(this.getEdgePts(backPts, frontPts, 0));\n builder.addLineString(this.getEdgePts(backPts, frontPts, 1));\n\n // Top edge\n builder.setSymbology(frontAndTopRightColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(this.getEdgePts(backPts, frontPts, 2));\n builder.setSymbology(frontAndTopLeftColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(this.getEdgePts(backPts, frontPts, 3));\n }\n\n private static getEdgePts(startPts: Point3d[], endPts: Point3d[], index: number): Point3d[] {\n return [\n startPts[index],\n endPts[index],\n ];\n }\n\n private static getPlanePts(frustPts: Point3d[], front: boolean): Point3d[] {\n const baseIndex = front ? Npc._001 : Npc._000;\n const planePts = [\n frustPts[baseIndex + Npc._000],\n frustPts[baseIndex + Npc._100],\n frustPts[baseIndex + Npc._110],\n frustPts[baseIndex + Npc._010],\n ];\n\n planePts.push(planePts[0]);\n return planePts;\n }\n\n public static drawEyePositionAndFocalPlane(builder: GraphicBuilder, npcFrustum: Frustum, worldToNpcMap: Map4d, eyePoint: Point3d, focusPlaneNpc: number, vp: Viewport): void {\n // Eye position...\n const contrastColor = vp.getContrastToBackgroundColor();\n builder.setSymbology(contrastColor, ColorDef.black, 8);\n builder.addPointString([eyePoint]);\n\n // Focal plane...\n const focalPtsNpc = FrustumDecoration.getPlanePts(npcFrustum.points, false);\n const focalPtsWorld: Point3d[] = [];\n for (const npcPt of focalPtsNpc)\n focalPtsWorld.push(Point3d.create(npcPt.x, npcPt.y, focusPlaneNpc));\n worldToNpcMap.transform1.multiplyPoint3dArrayQuietNormalize(focalPtsWorld);\n\n const bgColor = vp.view.backgroundColor;\n const focalPlaneColor = ColorDef.green.adjustedForContrast(bgColor);\n const focalTransColor = focalPlaneColor.withTransparency(100);\n builder.setSymbology(focalPlaneColor, focalTransColor, 2);\n builder.addLineString(focalPtsWorld);\n builder.addShape(focalPtsWorld);\n }\n}\n\n/**\n * Decorates the viewport with a graphical depiction of a Frustum.\n * This is obviously only useful when drawn inside a viewport using a *different* Frustum.\n * Options for doing so include:\n * - Having more than one viewport, and drawing the frustum of one viewport inside the other viewports; and\n * - Allowing the user to take a snapshot of the current frustum, then navigate the view to inspect it within the same viewport.\n * @beta\n */\nexport class FrustumDecorator implements Decorator {\n private readonly _decoration?: FrustumDecoration;\n\n private constructor(vp: Viewport, options?: FrustumDecorationOptions) {\n this._decoration = FrustumDecoration.create(vp, options);\n }\n\n /** This will allow the render system to cache and reuse the decorations created by this decorator's decorate() method. */\n public readonly useCachedDecorations = true;\n\n public decorate(context: DecorateContext): void {\n if (undefined !== this._decoration)\n this._decoration.decorate(context);\n }\n\n private static _instance?: FrustumDecorator;\n\n /** Add the decoration to the specified viewport. */\n public static enable(vp: Viewport, options?: FrustumDecorationOptions): void {\n FrustumDecorator.disable();\n FrustumDecorator._instance = new FrustumDecorator(vp, options);\n IModelApp.viewManager.addDecorator(FrustumDecorator._instance);\n }\n\n /** Remove the decoration from the specified viewport. */\n public static disable(): void {\n const instance = FrustumDecorator._instance;\n if (undefined !== instance) {\n IModelApp.viewManager.dropDecorator(instance);\n FrustumDecorator._instance = undefined;\n }\n }\n\n public static get isEnabled() { return undefined !== FrustumDecorator._instance; }\n}\n\n/** Enable (\"ON\"), disable (\"OFF\"), or toggle (\"TOGGLE\" or omitted) the [[FrustumDecorator]].\n * @beta\n */\nexport class ToggleFrustumSnapshotTool extends Tool {\n public static override toolId = \"ToggleFrustumSnapshot\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 2; }\n\n public override async run(enable?: boolean, showPreloadFrustum?: boolean, showBackgroundIntersections?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp)\n return true;\n\n if (undefined === enable)\n enable = !FrustumDecorator.isEnabled;\n\n if (enable !== FrustumDecorator.isEnabled) {\n if (enable) {\n FrustumDecorator.enable(vp, { showPreloadFrustum, showBackgroundIntersections });\n vp.onChangeView.addOnce(() => FrustumDecorator.disable());\n } else {\n FrustumDecorator.disable();\n }\n }\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n let showPreload, showBackgroundIntersections, enable;\n for (const arg of args) {\n if (arg === \"preload\")\n showPreload = true;\n else if (arg === \"background\")\n showBackgroundIntersections = true;\n else\n enable = parseToggle(arg);\n }\n\n if (typeof enable !== \"string\")\n await this.run(enable, showPreload, showBackgroundIntersections);\n\n return true;\n }\n}\n\n/**\n * Decorates the viewport with a graphical depiction of a Frustum from the currently selected viewport.\n * Only useful when more than one spatial viewport is open.\n */\nclass SelectedViewFrustumDecoration {\n private static _decorator?: SelectedViewFrustumDecoration;\n protected _targetVp: Viewport;\n protected _removeDecorationListener?: () => void;\n protected _removeViewChangedListener?: () => void;\n\n /** This will allow the render system to cache and reuse the decorations created by this decorator's decorate() method. */\n public readonly useCachedDecorations = true;\n\n public constructor(vp: Viewport, private _options?: FrustumDecorationOptions) {\n this._targetVp = vp;\n this._removeDecorationListener = IModelApp.viewManager.addDecorator(this);\n this._removeViewChangedListener = vp.onViewChanged.addListener(this.onViewChanged, this); // eslint-disable-line @typescript-eslint/unbound-method\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n }\n\n protected stop(): void {\n if (this._removeDecorationListener) {\n this._removeDecorationListener();\n this._removeDecorationListener = undefined;\n }\n if (this._removeViewChangedListener) {\n this._removeViewChangedListener();\n this._removeViewChangedListener = undefined;\n }\n\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n }\n\n public onViewChanged(targetVp: Viewport): void {\n if (targetVp !== this._targetVp)\n return;\n const decorator = SelectedViewFrustumDecoration._decorator;\n if (undefined !== decorator) {\n for (const vp of IModelApp.viewManager) {\n if (vp !== this._targetVp)\n vp.invalidateCachedDecorations(decorator);\n }\n }\n }\n\n public decorate(context: DecorateContext): void {\n const vp = context.viewport;\n if (!this._targetVp.view.isSpatialView() || vp === this._targetVp || !vp.view.isSpatialView())\n return;\n\n const builder = context.createGraphicBuilder(GraphicType.WorldDecoration);\n\n if (this._targetVp.isCameraOn) {\n const npcFrustum = this._targetVp.getFrustum(CoordSystem.Npc, true);\n const focalPlane = this._targetVp.worldToNpc(this._targetVp.view.getTargetPoint()).z;\n FrustumDecoration.drawEyePositionAndFocalPlane(builder, npcFrustum, this._targetVp.viewingSpace.worldToNpcMap, this._targetVp.view.camera.getEyePoint(), focalPlane, context.viewport);\n }\n\n const worldFrustum = this._targetVp.getFrustum(CoordSystem.World, false);\n const adjustedWorldFrustum = this._targetVp.getFrustum(CoordSystem.World, true);\n\n FrustumDecoration.drawFrustumBox(builder, worldFrustum, false, context.viewport); // show original frustum...\n FrustumDecoration.drawFrustumBox(builder, adjustedWorldFrustum, true, context.viewport); // show adjusted frustum...\n if (this._options && this._options.showPreloadFrustum)\n FrustumDecoration.drawPreloadFrustum(builder, context.viewport.viewingSpace.getPreloadFrustum());\n\n context.addDecorationFromBuilder(builder);\n }\n\n // Returns true if decoration becomes enabled.\n public static toggle(vp: Viewport, enabled?: boolean): boolean {\n if (undefined !== enabled) {\n const alreadyEnabled = undefined !== SelectedViewFrustumDecoration._decorator;\n if (enabled === alreadyEnabled)\n return alreadyEnabled;\n }\n\n if (undefined === SelectedViewFrustumDecoration._decorator) {\n SelectedViewFrustumDecoration._decorator = new SelectedViewFrustumDecoration(vp);\n return true;\n } else {\n SelectedViewFrustumDecoration._decorator.stop();\n SelectedViewFrustumDecoration._decorator = undefined;\n return false;\n }\n }\n}\n\n/** Enable (\"ON\"), disable (\"OFF\"), or toggle (\"TOGGLE\" or omitted) the selected view frustum decoration.\n * @beta\n */\nexport class ToggleSelectedViewFrustumTool extends Tool {\n public static override toolId = \"ToggleSelectedViewFrustum\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n public override async run(enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n if (SelectedViewFrustumDecoration.toggle(vp, enable)) {\n const remove = vp.onChangeView.addListener((_vp: Viewport, prev: ViewState) => {\n if (!prev.hasSameCoordinates(vp.view)) {\n SelectedViewFrustumDecoration.toggle(vp, false);\n remove();\n }\n });\n }\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n if (typeof enable !== \"string\")\n await this.run(enable);\n\n return true;\n }\n}\n\nclass ShadowFrustumDecoration {\n private static _instance?: ShadowFrustumDecoration;\n private _targetVp: Viewport;\n private _cleanup?: () => void;\n\n /** This will allow the render system to cache and reuse the decorations created by this decorator's decorate() method. */\n public readonly useCachedDecorations = true;\n\n public constructor(vp: Viewport) {\n this._targetVp = vp;\n const removeDecorator = IModelApp.viewManager.addDecorator(this);\n const removeOnRender = vp.onRender.addListener((_) => this.onRender());\n this._cleanup = () => {\n removeDecorator();\n removeOnRender();\n };\n\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n }\n\n private stop(): void {\n if (undefined !== this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n }\n\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n }\n\n public onRender(): void {\n const decorator = ShadowFrustumDecoration._instance;\n if (undefined !== decorator) {\n for (const vp of IModelApp.viewManager) {\n if (vp !== this._targetVp)\n vp.invalidateCachedDecorations(decorator);\n }\n }\n }\n\n public decorate(context: DecorateContext): void {\n const frustum = this._targetVp.target.debugControl!.shadowFrustum;\n if (undefined === frustum)\n return;\n\n const thisVp = context.viewport;\n if (thisVp === this._targetVp || !thisVp.view.isSpatialView())\n return;\n\n const builder = context.createGraphicBuilder(GraphicType.WorldDecoration);\n FrustumDecoration.drawFrustumBox(builder, frustum, false, thisVp);\n context.addDecorationFromBuilder(builder);\n }\n\n public static toggle(vp: Viewport, enabled?: boolean): void {\n const instance = ShadowFrustumDecoration._instance;\n if (undefined !== enabled) {\n const alreadyEnabled = undefined !== instance;\n if (enabled === alreadyEnabled)\n return;\n }\n\n if (undefined === instance) {\n ShadowFrustumDecoration._instance = new ShadowFrustumDecoration(vp);\n } else {\n instance.stop();\n ShadowFrustumDecoration._instance = undefined;\n }\n }\n}\n\n/** Toggle visualization of the selected viewport's shadow frustum in all other viewports.\n * @beta\n */\nexport class ToggleShadowFrustumTool extends Tool {\n public static override toolId = \"ToggleShadowFrustum\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n public override async run(enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined !== vp && vp.view.isSpatialView())\n ShadowFrustumDecoration.toggle(vp, enable);\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n if (typeof enable !== \"string\")\n await this.run(enable);\n\n return true;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FrustumDecoration.js","sourceRoot":"","sources":["../../../src/tools/FrustumDecoration.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,wDAAsD;AACtD,oDAAqF;AACrF,wDAE8B;AAC9B,+CAA4C;AAO5C;;;;;;GAMG;AACH,MAAM,iBAAiB;IAUiD;IATrD,aAAa,CAAU;IACvB,qBAAqB,CAAU;IAC/B,eAAe,CAAU;IACzB,WAAW,CAAU;IACrB,cAAc,CAAQ;IACtB,SAAS,CAAU;IACnB,WAAW,CAAS;IACpB,WAAW,CAAU;IAEtC,YAAoB,EAAY,EAAE,IAAiB,EAAmB,QAAmC;QAAnC,aAAQ,GAAR,QAAQ,CAA2B;QACvG,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,UAAU,CAAC,2BAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC7D,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC,UAAU,CAAC,2BAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACpE,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;QAC3D,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,UAAU,CAAC,2BAAW,CAAC,GAAG,EAAE,IAAI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AAI,EAAE,CAAC;YAChB,uBAAuB,CAAC,SAAS,GAAG,SAAS,CAAC;QAChD,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAa,uBAAwB,SAAQ,oBAAI;IACxC,MAAM,CAAU,MAAM,GAAG,qBAAqB,CAAC;IAC/C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAElC,KAAK,CAAC,GAAG,CAAC,MAAgB;QACxC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,SAAS,KAAK,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;YAC7C,uBAAuB,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAE7C,OAAO,IAAI,CAAC;IACd,CAAC;IAEe,KAAK,CAAC,WAAW,CAAC,GAAG,IAAc;QACjD,MAAM,MAAM,GAAG,IAAA,yBAAW,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,OAAO,MAAM,KAAK,QAAQ;YAC5B,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAEzB,OAAO,IAAI,CAAC;IACd,CAAC;;AAnBH,0DAoBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { Map4d, Point3d } from \"@itwin/core-geometry\";\nimport { ColorByName, ColorDef, Frustum, LinePixels, Npc } from \"@itwin/core-common\";\nimport {\n CoordSystem, DecorateContext, Decorator, GraphicBuilder, GraphicType, IModelApp, Tool, Viewport, ViewState, ViewState3d,\n} from \"@itwin/core-frontend\";\nimport { parseToggle } from \"./parseToggle\";\n\ninterface FrustumDecorationOptions {\n showPreloadFrustum?: boolean;\n showBackgroundIntersections?: boolean;\n}\n\n/**\n * Decorates the viewport with a graphical depiction of a Frustum.\n * This is obviously only useful when drawn inside a viewport using a *different* Frustum.\n * Options for doing so include:\n * - Having more than one viewport, and drawing the frustum of one viewport inside the other viewports; and\n * - Allowing the user to take a snapshot of the current frustum, then navigate the view to inspect it within the same viewport.\n */\nclass FrustumDecoration {\n private readonly _worldFrustum: Frustum;\n private readonly _adjustedWorldFrustum: Frustum;\n private readonly _preloadFrustum: Frustum;\n private readonly _npcFrustum: Frustum;\n private readonly _worldToNpcMap: Map4d;\n private readonly _eyePoint: Point3d;\n private readonly _focalPlane: number;\n private readonly _isCameraOn: boolean;\n\n private constructor(vp: Viewport, view: ViewState3d, private readonly _options?: FrustumDecorationOptions) {\n this._worldFrustum = vp.getFrustum(CoordSystem.World, false);\n this._adjustedWorldFrustum = vp.getFrustum(CoordSystem.World, true);\n this._preloadFrustum = vp.viewingSpace.getPreloadFrustum();\n this._npcFrustum = vp.getFrustum(CoordSystem.Npc, true);\n this._worldToNpcMap = vp.viewingSpace.worldToNpcMap.clone();\n this._eyePoint = view.camera.getEyePoint().clone();\n this._focalPlane = vp.worldToNpc(view.getTargetPoint()).z;\n this._isCameraOn = vp.isCameraOn;\n }\n\n public static create(vp: Viewport, options?: FrustumDecorationOptions): FrustumDecoration | undefined {\n const view = vp.view.isSpatialView() ? vp.view : undefined;\n return undefined !== view ? new FrustumDecoration(vp, view, options) : undefined;\n }\n\n public decorate(context: DecorateContext): void {\n const builder = context.createGraphicBuilder(GraphicType.WorldDecoration);\n\n if (this._isCameraOn)\n FrustumDecoration.drawEyePositionAndFocalPlane(builder, this._npcFrustum, this._worldToNpcMap, this._eyePoint, this._focalPlane, context.viewport);\n\n FrustumDecoration.drawFrustumBox(builder, this._worldFrustum, false, context.viewport); // show original frustum...\n FrustumDecoration.drawFrustumBox(builder, this._adjustedWorldFrustum, true, context.viewport); // show adjusted frustum...\n const options = this._options;\n if (options !== undefined) {\n if (options.showPreloadFrustum)\n FrustumDecoration.drawPreloadFrustum(builder, this._preloadFrustum);\n\n if (options?.showBackgroundIntersections) {\n const backgroundMapGeometry = context.viewport.view.displayStyle.getBackgroundMapGeometry();\n if (backgroundMapGeometry)\n backgroundMapGeometry.addFrustumDecorations(builder, this._adjustedWorldFrustum);\n }\n }\n context.addDecorationFromBuilder(builder);\n }\n\n public static drawPreloadFrustum(builder: GraphicBuilder, frustum: Frustum) {\n const preloadColor = ColorDef.create(ColorByName.coral);\n builder.setSymbology(preloadColor, preloadColor, 1, LinePixels.Code2);\n builder.addFrustum(frustum);\n }\n\n public static drawFrustumBox(builder: GraphicBuilder, frustum: Frustum, adjustedBox: boolean, vp: Viewport): void {\n const backPts = this.getPlanePts(frustum.points, false); // back plane\n const frontPts = this.getPlanePts(frustum.points, true); // front plane\n\n const bgColor = vp.view.backgroundColor;\n const backAndBottomColor = ColorDef.red.adjustedForContrast(bgColor);\n const frontAndTopLeftColor = ColorDef.blue.adjustedForContrast(bgColor);\n const frontAndTopRightColor = ColorDef.green.adjustedForContrast(bgColor);\n const edgeWeight = adjustedBox ? 2 : 1;\n const edgeStyle = adjustedBox ? LinePixels.Solid : LinePixels.Code2;\n\n // Back plane\n builder.setSymbology(backAndBottomColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(backPts);\n\n // Front plane\n builder.setSymbology(frontAndTopLeftColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(frontPts);\n\n // Bottom edge\n builder.setSymbology(backAndBottomColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(this.getEdgePts(backPts, frontPts, 0));\n builder.addLineString(this.getEdgePts(backPts, frontPts, 1));\n\n // Top edge\n builder.setSymbology(frontAndTopRightColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(this.getEdgePts(backPts, frontPts, 2));\n builder.setSymbology(frontAndTopLeftColor, ColorDef.black, edgeWeight, edgeStyle);\n builder.addLineString(this.getEdgePts(backPts, frontPts, 3));\n }\n\n private static getEdgePts(startPts: Point3d[], endPts: Point3d[], index: number): Point3d[] {\n return [\n startPts[index],\n endPts[index],\n ];\n }\n\n private static getPlanePts(frustPts: Point3d[], front: boolean): Point3d[] {\n const baseIndex = front ? Npc._001 : Npc._000;\n const planePts = [\n frustPts[baseIndex + Npc._000],\n frustPts[baseIndex + Npc._100],\n frustPts[baseIndex + Npc._110],\n frustPts[baseIndex + Npc._010],\n ];\n\n planePts.push(planePts[0]);\n return planePts;\n }\n\n public static drawEyePositionAndFocalPlane(builder: GraphicBuilder, npcFrustum: Frustum, worldToNpcMap: Map4d, eyePoint: Point3d, focusPlaneNpc: number, vp: Viewport): void {\n // Eye position...\n const contrastColor = vp.getContrastToBackgroundColor();\n builder.setSymbology(contrastColor, ColorDef.black, 8);\n builder.addPointString([eyePoint]);\n\n // Focal plane...\n const focalPtsNpc = FrustumDecoration.getPlanePts(npcFrustum.points, false);\n const focalPtsWorld: Point3d[] = [];\n for (const npcPt of focalPtsNpc)\n focalPtsWorld.push(Point3d.create(npcPt.x, npcPt.y, focusPlaneNpc));\n worldToNpcMap.transform1.multiplyPoint3dArrayQuietNormalize(focalPtsWorld);\n\n const bgColor = vp.view.backgroundColor;\n const focalPlaneColor = ColorDef.green.adjustedForContrast(bgColor);\n const focalTransColor = focalPlaneColor.withTransparency(100);\n builder.setSymbology(focalPlaneColor, focalTransColor, 2);\n builder.addLineString(focalPtsWorld);\n builder.addShape(focalPtsWorld);\n }\n}\n\n/**\n * Decorates the viewport with a graphical depiction of a Frustum.\n * This is obviously only useful when drawn inside a viewport using a *different* Frustum.\n * Options for doing so include:\n * - Having more than one viewport, and drawing the frustum of one viewport inside the other viewports; and\n * - Allowing the user to take a snapshot of the current frustum, then navigate the view to inspect it within the same viewport.\n * @beta\n */\nexport class FrustumDecorator implements Decorator {\n private readonly _decoration?: FrustumDecoration;\n\n private constructor(vp: Viewport, options?: FrustumDecorationOptions) {\n this._decoration = FrustumDecoration.create(vp, options);\n }\n\n /** This will allow the render system to cache and reuse the decorations created by this decorator's decorate() method. */\n public readonly useCachedDecorations = true;\n\n public decorate(context: DecorateContext): void {\n if (undefined !== this._decoration)\n this._decoration.decorate(context);\n }\n\n private static _instance?: FrustumDecorator;\n\n /** Add the decoration to the specified viewport. */\n public static enable(vp: Viewport, options?: FrustumDecorationOptions): void {\n FrustumDecorator.disable();\n FrustumDecorator._instance = new FrustumDecorator(vp, options);\n IModelApp.viewManager.addDecorator(FrustumDecorator._instance);\n }\n\n /** Remove the decoration from the specified viewport. */\n public static disable(): void {\n const instance = FrustumDecorator._instance;\n if (undefined !== instance) {\n IModelApp.viewManager.dropDecorator(instance);\n FrustumDecorator._instance = undefined;\n }\n }\n\n public static get isEnabled() { return undefined !== FrustumDecorator._instance; }\n}\n\n/** Enable (\"ON\"), disable (\"OFF\"), or toggle (\"TOGGLE\" or omitted) the [[FrustumDecorator]].\n * @beta\n */\nexport class ToggleFrustumSnapshotTool extends Tool {\n public static override toolId = \"ToggleFrustumSnapshot\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 2; }\n\n public override async run(enable?: boolean, showPreloadFrustum?: boolean, showBackgroundIntersections?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp)\n return true;\n\n if (undefined === enable)\n enable = !FrustumDecorator.isEnabled;\n\n if (enable !== FrustumDecorator.isEnabled) {\n if (enable) {\n FrustumDecorator.enable(vp, { showPreloadFrustum, showBackgroundIntersections });\n vp.onChangeView.addOnce(() => FrustumDecorator.disable());\n } else {\n FrustumDecorator.disable();\n }\n }\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n let showPreload, showBackgroundIntersections, enable;\n for (const arg of args) {\n if (arg === \"preload\")\n showPreload = true;\n else if (arg === \"background\")\n showBackgroundIntersections = true;\n else\n enable = parseToggle(arg);\n }\n\n if (typeof enable !== \"string\")\n await this.run(enable, showPreload, showBackgroundIntersections);\n\n return true;\n }\n}\n\n/**\n * Decorates the viewport with a graphical depiction of a Frustum from the currently selected viewport.\n * Only useful when more than one spatial viewport is open.\n */\nclass SelectedViewFrustumDecoration {\n private static _decorator?: SelectedViewFrustumDecoration;\n protected _targetVp: Viewport;\n protected _removeDecorationListener?: () => void;\n protected _removeViewChangedListener?: () => void;\n\n /** This will allow the render system to cache and reuse the decorations created by this decorator's decorate() method. */\n public readonly useCachedDecorations = true;\n\n public constructor(vp: Viewport, private _options?: FrustumDecorationOptions) {\n this._targetVp = vp;\n this._removeDecorationListener = IModelApp.viewManager.addDecorator(this);\n this._removeViewChangedListener = vp.onViewChanged.addListener(this.onViewChanged, this); // eslint-disable-line @typescript-eslint/unbound-method\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n }\n\n protected stop(): void {\n if (this._removeDecorationListener) {\n this._removeDecorationListener();\n this._removeDecorationListener = undefined;\n }\n if (this._removeViewChangedListener) {\n this._removeViewChangedListener();\n this._removeViewChangedListener = undefined;\n }\n\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n }\n\n public onViewChanged(targetVp: Viewport): void {\n if (targetVp !== this._targetVp)\n return;\n const decorator = SelectedViewFrustumDecoration._decorator;\n if (undefined !== decorator) {\n for (const vp of IModelApp.viewManager) {\n if (vp !== this._targetVp)\n vp.invalidateCachedDecorations(decorator);\n }\n }\n }\n\n public decorate(context: DecorateContext): void {\n const vp = context.viewport;\n if (!this._targetVp.view.isSpatialView() || vp === this._targetVp || !vp.view.isSpatialView())\n return;\n\n const builder = context.createGraphicBuilder(GraphicType.WorldDecoration);\n\n if (this._targetVp.isCameraOn) {\n const npcFrustum = this._targetVp.getFrustum(CoordSystem.Npc, true);\n const focalPlane = this._targetVp.worldToNpc(this._targetVp.view.getTargetPoint()).z;\n FrustumDecoration.drawEyePositionAndFocalPlane(builder, npcFrustum, this._targetVp.viewingSpace.worldToNpcMap, this._targetVp.view.camera.getEyePoint(), focalPlane, context.viewport);\n }\n\n const worldFrustum = this._targetVp.getFrustum(CoordSystem.World, false);\n const adjustedWorldFrustum = this._targetVp.getFrustum(CoordSystem.World, true);\n\n FrustumDecoration.drawFrustumBox(builder, worldFrustum, false, context.viewport); // show original frustum...\n FrustumDecoration.drawFrustumBox(builder, adjustedWorldFrustum, true, context.viewport); // show adjusted frustum...\n if (this._options && this._options.showPreloadFrustum)\n FrustumDecoration.drawPreloadFrustum(builder, context.viewport.viewingSpace.getPreloadFrustum());\n\n context.addDecorationFromBuilder(builder);\n }\n\n // Returns true if decoration becomes enabled.\n public static toggle(vp: Viewport, enabled?: boolean): boolean {\n if (undefined !== enabled) {\n const alreadyEnabled = undefined !== SelectedViewFrustumDecoration._decorator;\n if (enabled === alreadyEnabled)\n return alreadyEnabled;\n }\n\n if (undefined === SelectedViewFrustumDecoration._decorator) {\n SelectedViewFrustumDecoration._decorator = new SelectedViewFrustumDecoration(vp);\n return true;\n } else {\n SelectedViewFrustumDecoration._decorator.stop();\n SelectedViewFrustumDecoration._decorator = undefined;\n return false;\n }\n }\n}\n\n/** Enable (\"ON\"), disable (\"OFF\"), or toggle (\"TOGGLE\" or omitted) the selected view frustum decoration.\n * @beta\n */\nexport class ToggleSelectedViewFrustumTool extends Tool {\n public static override toolId = \"ToggleSelectedViewFrustum\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n public override async run(enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n if (SelectedViewFrustumDecoration.toggle(vp, enable)) {\n const remove = vp.onChangeView.addListener((_vp: Viewport, prev: ViewState) => {\n if (!prev.hasSameCoordinates(vp.view)) {\n SelectedViewFrustumDecoration.toggle(vp, false);\n remove();\n }\n });\n }\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n if (typeof enable !== \"string\")\n await this.run(enable);\n\n return true;\n }\n}\n\nclass ShadowFrustumDecoration {\n private static _instance?: ShadowFrustumDecoration;\n private _targetVp: Viewport;\n private _cleanup?: () => void;\n\n /** This will allow the render system to cache and reuse the decorations created by this decorator's decorate() method. */\n public readonly useCachedDecorations = true;\n\n public constructor(vp: Viewport) {\n this._targetVp = vp;\n const removeDecorator = IModelApp.viewManager.addDecorator(this);\n const removeOnRender = vp.onRender.addListener((_) => this.onRender());\n this._cleanup = () => {\n removeDecorator();\n removeOnRender();\n };\n\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n }\n\n private stop(): void {\n if (undefined !== this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n }\n\n IModelApp.viewManager.invalidateCachedDecorationsAllViews(this);\n }\n\n public onRender(): void {\n const decorator = ShadowFrustumDecoration._instance;\n if (undefined !== decorator) {\n for (const vp of IModelApp.viewManager) {\n if (vp !== this._targetVp)\n vp.invalidateCachedDecorations(decorator);\n }\n }\n }\n\n public decorate(context: DecorateContext): void {\n const frustum = this._targetVp.target.debugControl!.shadowFrustum;\n if (undefined === frustum)\n return;\n\n const thisVp = context.viewport;\n if (thisVp === this._targetVp || !thisVp.view.isSpatialView())\n return;\n\n const builder = context.createGraphicBuilder(GraphicType.WorldDecoration);\n FrustumDecoration.drawFrustumBox(builder, frustum, false, thisVp);\n context.addDecorationFromBuilder(builder);\n }\n\n public static toggle(vp: Viewport, enabled?: boolean): void {\n const instance = ShadowFrustumDecoration._instance;\n if (undefined !== enabled) {\n const alreadyEnabled = undefined !== instance;\n if (enabled === alreadyEnabled)\n return;\n }\n\n if (undefined === instance) {\n ShadowFrustumDecoration._instance = new ShadowFrustumDecoration(vp);\n } else {\n instance.stop();\n ShadowFrustumDecoration._instance = undefined;\n }\n }\n}\n\n/** Toggle visualization of the selected viewport's shadow frustum in all other viewports.\n * @beta\n */\nexport class ToggleShadowFrustumTool extends Tool {\n public static override toolId = \"ToggleShadowFrustum\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n public override async run(enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined !== vp && vp.view.isSpatialView())\n ShadowFrustumDecoration.toggle(vp, enable);\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n if (typeof enable !== \"string\")\n await this.run(enable);\n\n return true;\n }\n}\n"]}
|
|
@@ -25,15 +25,17 @@ const parseArgs_1 = require("./parseArgs");
|
|
|
25
25
|
* @beta
|
|
26
26
|
*/
|
|
27
27
|
class InspectElementTool extends core_frontend_1.PrimitiveTool {
|
|
28
|
+
static toolId = "InspectElement";
|
|
28
29
|
static get minArgs() { return 0; }
|
|
29
30
|
static get maxArgs() { return 6; }
|
|
31
|
+
_options = {};
|
|
32
|
+
_elementIds;
|
|
33
|
+
_modal = false;
|
|
34
|
+
_useSelection = false;
|
|
35
|
+
_doCopy = false;
|
|
36
|
+
_explodeParts = false;
|
|
30
37
|
constructor(options, elementIds) {
|
|
31
38
|
super();
|
|
32
|
-
this._options = {};
|
|
33
|
-
this._modal = false;
|
|
34
|
-
this._useSelection = false;
|
|
35
|
-
this._doCopy = false;
|
|
36
|
-
this._explodeParts = false;
|
|
37
39
|
if (undefined !== options)
|
|
38
40
|
this._options = { ...options };
|
|
39
41
|
this._elementIds = elementIds;
|
|
@@ -195,5 +197,4 @@ class InspectElementTool extends core_frontend_1.PrimitiveTool {
|
|
|
195
197
|
}
|
|
196
198
|
}
|
|
197
199
|
exports.InspectElementTool = InspectElementTool;
|
|
198
|
-
InspectElementTool.toolId = "InspectElement";
|
|
199
200
|
//# sourceMappingURL=InspectElementTool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InspectElementTool.js","sourceRoot":"","sources":["../../../src/tools/InspectElementTool.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,sDAAgF;AAChF,oDAA8G;AAC9G,wDAG8B;AAC9B,8DAA8D;AAC9D,2CAAwC;AAExC;;;;;;;;;;GAUG;AACH,MAAa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,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAErG,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEtB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,SAAS,KAAK,MAAM;YACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAExB,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAEnD,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;IACpB,CAAC;;AA7MH,gDA8MC;AA7MwB,yBAAM,GAAG,gBAAgB,AAAnB,CAAoB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { BentleyError, Id64, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { GeometrySummaryOptions, GeometrySummaryVerbosity, IModelReadRpcInterface } from \"@itwin/core-common\";\nimport {\n BeButtonEvent, CoreTools, EventHandled, HitDetail, IModelApp, LocateFilterStatus, LocateResponse, MessageBoxIconType, MessageBoxType,\n NotifyMessageDetails, OutputMessagePriority, PrimitiveTool,\n} from \"@itwin/core-frontend\";\nimport { copyStringToClipboard } from \"../ClipboardUtilities\";\nimport { parseArgs } from \"./parseArgs\";\n\n/** Creates a readable text summary of a geometric element or geometry part. The keyin takes the following arguments, all of which are optional:\n * - `id=elementId,elementId,elementId` comma-separated list of element Ids where each `elementId` is a hexadecimal element Id such as \"0x12cb\";\n * - `symbology=0|1` where 1 indicates detailed symbology information should be included in the output;\n * - `placement=0|1` where 1 indicates detailed geometric element placement should be included; and\n * - `verbosity=0|1|2` controlling the verbosity of the output for each geometric primitive in the geometry stream. Higher values = more detailed information. Note verbosity=2 can produce megabytes of data for certain types of geometric primitives like large meshes.\n * - `modal=0|1` where 1 indicates the output should appear in a modal dialog.\n * - `copy=0|1` where 1 indicates the output should be copied to the clipboard. Defaults to true.\n * - `refs=0|1` where 1 indicates that for geometry parts a list of all elements referencing that part should be included in the output. This is extremely computationally expensive.\n * If no id is specified, the tool runs in interactive mode: first operating upon the selection set (if any), then allowing the user to select additional elements.\n * @beta\n */\nexport class InspectElementTool extends PrimitiveTool {\n public static override toolId = \"InspectElement\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 6; }\n\n private _options: GeometrySummaryOptions = {};\n private _elementIds?: Id64String[];\n private _modal = false;\n private _useSelection = false;\n private _doCopy = false;\n private _explodeParts = false;\n\n constructor(options?: GeometrySummaryOptions, elementIds?: Id64String[]) {\n super();\n if (undefined !== options)\n this._options = { ...options };\n\n this._elementIds = elementIds;\n }\n\n private setupAndPromptForNextAction(): void {\n this._useSelection = (undefined !== this.targetView && this.targetView.iModel.selectionSet.isActive);\n if (!this._useSelection)\n IModelApp.accuSnap.enableLocate(true);\n\n this.showPrompt();\n }\n\n private showPrompt(): void {\n CoreTools.outputPromptByKey(this._useSelection ? \"ElementSet.Prompts.ConfirmSelection\" : \"ElementSet.Prompts.IdentifyElement\");\n }\n\n public override autoLockTarget(): void { }\n\n public override requireWriteableTarget(): boolean { return false; }\n\n public override async onUnsuspend() {\n this.showPrompt();\n }\n\n public override async onPostInstall() {\n await super.onPostInstall();\n\n if (undefined !== this._elementIds)\n this.process(this._elementIds).then(async () => {\n await this.onReinitialize();\n }).catch((err) => {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, err.toString()));\n });\n else {\n this.setupAndPromptForNextAction();\n }\n }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (this._useSelection) {\n if (undefined !== ev.viewport) {\n const ids: Id64Array = [];\n ev.viewport.iModel.selectionSet.elements.forEach((id) => {\n if (!Id64.isInvalid(id) && !Id64.isTransient(id))\n ids.push(id);\n });\n\n if (0 === ids.length)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, CoreTools.translate(\"ElementSet.Error.NotSupportedElmType\")));\n else\n await this.process(ids);\n\n await this.onReinitialize();\n return EventHandled.Yes;\n }\n }\n\n const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);\n if (undefined === hit || !hit.isElementHit)\n return EventHandled.No;\n\n await this.process([hit.sourceId]);\n this.setupAndPromptForNextAction();\n return EventHandled.No;\n }\n\n public override async onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled> {\n await this.onReinitialize();\n return EventHandled.No;\n }\n\n public override async onReinitialize() {\n if (this._useSelection || undefined !== this._elementIds) {\n await this.exitTool();\n } else {\n await this.onRestartTool();\n }\n }\n\n public async onRestartTool() {\n const tool = new InspectElementTool();\n if (!await tool.run())\n return this.exitTool();\n }\n\n public override async filterHit(hit: HitDetail, _out: LocateResponse): Promise<LocateFilterStatus> {\n return hit.isElementHit ? LocateFilterStatus.Accept : LocateFilterStatus.Reject;\n }\n\n private async process(elementIds: Id64String[]) {\n const request = {\n elementIds,\n options: this._options,\n };\n let messageDetails: NotifyMessageDetails;\n try {\n let str = await IModelReadRpcInterface.getClientForRouting(this.iModel.routingContext.token).getGeometrySummary(this.iModel.getRpcProps(), request);\n if (this._explodeParts) {\n const regex = /^part id: (0x[a-f0-9]+)/gm;\n const partIds = new Set<string>();\n let match;\n while (null !== (match = regex.exec(str)))\n partIds.add(match[1]);\n\n if (partIds.size > 0) {\n request.elementIds = Array.from(partIds);\n str += `\\npart ids: ${JSON.stringify(request.elementIds)}\\n`;\n str += await IModelReadRpcInterface.getClientForRouting(this.iModel.routingContext.token).getGeometrySummary(this.iModel.getRpcProps(), request);\n }\n }\n\n if (this._doCopy)\n copyStringToClipboard(str);\n\n const brief = `Summary ${this._doCopy ? \"copied to clipboard.\" : \"complete.\"}`;\n messageDetails = new NotifyMessageDetails(OutputMessagePriority.Info, brief, str);\n\n if (this._modal) {\n const div = document.createElement(\"div\");\n const appendText = (toAppend: string) => {\n const txt = document.createElement(\"div\");\n txt.innerText = toAppend;\n div.append(txt);\n };\n\n const lines = str.split(\"\\n\");\n const maxLines = 30;\n let curLine = 0;\n for (const line of lines) {\n appendText(line);\n if (++curLine > maxLines) {\n appendText(\"...\");\n break;\n }\n }\n\n await IModelApp.notifications.openMessageBox(MessageBoxType.Ok, div, MessageBoxIconType.Information);\n }\n } catch (err) {\n messageDetails = new NotifyMessageDetails(OutputMessagePriority.Error, \"Error occurred while generating summary\", BentleyError.getErrorMessage(err));\n }\n\n IModelApp.notifications.outputMessage(messageDetails);\n }\n\n public override async parseAndRun(...inputArgs: string[]): Promise<boolean> {\n const args = parseArgs(inputArgs);\n const ids = args.get(\"i\");\n if (undefined !== ids)\n this._elementIds = ids.split(\",\");\n\n const verbosity = args.getInteger(\"v\");\n if (undefined !== verbosity) {\n switch (verbosity) {\n case 0:\n this._options.geometryVerbosity = GeometrySummaryVerbosity.Basic;\n break;\n case 1:\n this._options.geometryVerbosity = GeometrySummaryVerbosity.Detailed;\n break;\n case 2:\n this._options.geometryVerbosity = GeometrySummaryVerbosity.Full;\n break;\n }\n }\n\n const symbology = args.getBoolean(\"s\");\n if (undefined !== symbology)\n this._options.verboseSymbology = symbology;\n\n const placement = args.getBoolean(\"p\");\n if (undefined !== placement)\n this._options.includePlacement = placement;\n\n const parts = args.getBoolean(\"r\");\n if (true === parts && undefined !== IModelApp.viewManager.selectedView)\n this._options.includePartReferences = IModelApp.viewManager.selectedView.view.is3d() ? \"3d\" : \"2d\";\n\n const modal = args.getBoolean(\"m\");\n if (undefined !== modal)\n this._modal = modal;\n\n const doCopy = args.getBoolean(\"c\");\n if (undefined !== doCopy)\n this._doCopy = doCopy;\n\n this._explodeParts = true === args.getBoolean(\"e\");\n\n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AAS;YACzB,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,SAAS,CAAC;QAE7C,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,IAAI,KAAK,KAAK,IAAI,SAAS,KAAK,yBAAS,CAAC,WAAW,CAAC,YAAY;YACpE,IAAI,CAAC,QAAQ,CAAC,qBAAqB,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAErG,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEtB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,SAAS,KAAK,MAAM;YACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAExB,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAEnD,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;IACpB,CAAC;;AA7MH,gDA8MC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { BentleyError, Id64, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { GeometrySummaryOptions, GeometrySummaryVerbosity, IModelReadRpcInterface } from \"@itwin/core-common\";\nimport {\n BeButtonEvent, CoreTools, EventHandled, HitDetail, IModelApp, LocateFilterStatus, LocateResponse, MessageBoxIconType, MessageBoxType,\n NotifyMessageDetails, OutputMessagePriority, PrimitiveTool,\n} from \"@itwin/core-frontend\";\nimport { copyStringToClipboard } from \"../ClipboardUtilities\";\nimport { parseArgs } from \"./parseArgs\";\n\n/** Creates a readable text summary of a geometric element or geometry part. The keyin takes the following arguments, all of which are optional:\n * - `id=elementId,elementId,elementId` comma-separated list of element Ids where each `elementId` is a hexadecimal element Id such as \"0x12cb\";\n * - `symbology=0|1` where 1 indicates detailed symbology information should be included in the output;\n * - `placement=0|1` where 1 indicates detailed geometric element placement should be included; and\n * - `verbosity=0|1|2` controlling the verbosity of the output for each geometric primitive in the geometry stream. Higher values = more detailed information. Note verbosity=2 can produce megabytes of data for certain types of geometric primitives like large meshes.\n * - `modal=0|1` where 1 indicates the output should appear in a modal dialog.\n * - `copy=0|1` where 1 indicates the output should be copied to the clipboard. Defaults to true.\n * - `refs=0|1` where 1 indicates that for geometry parts a list of all elements referencing that part should be included in the output. This is extremely computationally expensive.\n * If no id is specified, the tool runs in interactive mode: first operating upon the selection set (if any), then allowing the user to select additional elements.\n * @beta\n */\nexport class InspectElementTool extends PrimitiveTool {\n public static override toolId = \"InspectElement\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 6; }\n\n private _options: GeometrySummaryOptions = {};\n private _elementIds?: Id64String[];\n private _modal = false;\n private _useSelection = false;\n private _doCopy = false;\n private _explodeParts = false;\n\n constructor(options?: GeometrySummaryOptions, elementIds?: Id64String[]) {\n super();\n if (undefined !== options)\n this._options = { ...options };\n\n this._elementIds = elementIds;\n }\n\n private setupAndPromptForNextAction(): void {\n this._useSelection = (undefined !== this.targetView && this.targetView.iModel.selectionSet.isActive);\n if (!this._useSelection)\n IModelApp.accuSnap.enableLocate(true);\n\n this.showPrompt();\n }\n\n private showPrompt(): void {\n CoreTools.outputPromptByKey(this._useSelection ? \"ElementSet.Prompts.ConfirmSelection\" : \"ElementSet.Prompts.IdentifyElement\");\n }\n\n public override autoLockTarget(): void { }\n\n public override requireWriteableTarget(): boolean { return false; }\n\n public override async onUnsuspend() {\n this.showPrompt();\n }\n\n public override async onPostInstall() {\n await super.onPostInstall();\n\n if (undefined !== this._elementIds)\n this.process(this._elementIds).then(async () => {\n await this.onReinitialize();\n }).catch((err) => {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, err.toString()));\n });\n else {\n this.setupAndPromptForNextAction();\n }\n }\n\n public override async onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> {\n if (this._useSelection) {\n if (undefined !== ev.viewport) {\n const ids: Id64Array = [];\n ev.viewport.iModel.selectionSet.elements.forEach((id) => {\n if (!Id64.isInvalid(id) && !Id64.isTransient(id))\n ids.push(id);\n });\n\n if (0 === ids.length)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, CoreTools.translate(\"ElementSet.Error.NotSupportedElmType\")));\n else\n await this.process(ids);\n\n await this.onReinitialize();\n return EventHandled.Yes;\n }\n }\n\n const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);\n if (undefined === hit || !hit.isElementHit)\n return EventHandled.No;\n\n await this.process([hit.sourceId]);\n this.setupAndPromptForNextAction();\n return EventHandled.No;\n }\n\n public override async onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled> {\n await this.onReinitialize();\n return EventHandled.No;\n }\n\n public override async onReinitialize() {\n if (this._useSelection || undefined !== this._elementIds) {\n await this.exitTool();\n } else {\n await this.onRestartTool();\n }\n }\n\n public async onRestartTool() {\n const tool = new InspectElementTool();\n if (!await tool.run())\n return this.exitTool();\n }\n\n public override async filterHit(hit: HitDetail, _out: LocateResponse): Promise<LocateFilterStatus> {\n return hit.isElementHit ? LocateFilterStatus.Accept : LocateFilterStatus.Reject;\n }\n\n private async process(elementIds: Id64String[]) {\n const request = {\n elementIds,\n options: this._options,\n };\n let messageDetails: NotifyMessageDetails;\n try {\n let str = await IModelReadRpcInterface.getClientForRouting(this.iModel.routingContext.token).getGeometrySummary(this.iModel.getRpcProps(), request);\n if (this._explodeParts) {\n const regex = /^part id: (0x[a-f0-9]+)/gm;\n const partIds = new Set<string>();\n let match;\n while (null !== (match = regex.exec(str)))\n partIds.add(match[1]);\n\n if (partIds.size > 0) {\n request.elementIds = Array.from(partIds);\n str += `\\npart ids: ${JSON.stringify(request.elementIds)}\\n`;\n str += await IModelReadRpcInterface.getClientForRouting(this.iModel.routingContext.token).getGeometrySummary(this.iModel.getRpcProps(), request);\n }\n }\n\n if (this._doCopy)\n copyStringToClipboard(str);\n\n const brief = `Summary ${this._doCopy ? \"copied to clipboard.\" : \"complete.\"}`;\n messageDetails = new NotifyMessageDetails(OutputMessagePriority.Info, brief, str);\n\n if (this._modal) {\n const div = document.createElement(\"div\");\n const appendText = (toAppend: string) => {\n const txt = document.createElement(\"div\");\n txt.innerText = toAppend;\n div.append(txt);\n };\n\n const lines = str.split(\"\\n\");\n const maxLines = 30;\n let curLine = 0;\n for (const line of lines) {\n appendText(line);\n if (++curLine > maxLines) {\n appendText(\"...\");\n break;\n }\n }\n\n await IModelApp.notifications.openMessageBox(MessageBoxType.Ok, div, MessageBoxIconType.Information);\n }\n } catch (err) {\n messageDetails = new NotifyMessageDetails(OutputMessagePriority.Error, \"Error occurred while generating summary\", BentleyError.getErrorMessage(err));\n }\n\n IModelApp.notifications.outputMessage(messageDetails);\n }\n\n public override async parseAndRun(...inputArgs: string[]): Promise<boolean> {\n const args = parseArgs(inputArgs);\n const ids = args.get(\"i\");\n if (undefined !== ids)\n this._elementIds = ids.split(\",\");\n\n const verbosity = args.getInteger(\"v\");\n if (undefined !== verbosity) {\n switch (verbosity) {\n case 0:\n this._options.geometryVerbosity = GeometrySummaryVerbosity.Basic;\n break;\n case 1:\n this._options.geometryVerbosity = GeometrySummaryVerbosity.Detailed;\n break;\n case 2:\n this._options.geometryVerbosity = GeometrySummaryVerbosity.Full;\n break;\n }\n }\n\n const symbology = args.getBoolean(\"s\");\n if (undefined !== symbology)\n this._options.verboseSymbology = symbology;\n\n const placement = args.getBoolean(\"p\");\n if (undefined !== placement)\n this._options.includePlacement = placement;\n\n const parts = args.getBoolean(\"r\");\n if (true === parts && undefined !== IModelApp.viewManager.selectedView)\n this._options.includePartReferences = IModelApp.viewManager.selectedView.view.is3d() ? \"3d\" : \"2d\";\n\n const modal = args.getBoolean(\"m\");\n if (undefined !== modal)\n this._modal = modal;\n\n const doCopy = args.getBoolean(\"c\");\n if (undefined !== doCopy)\n this._doCopy = doCopy;\n\n this._explodeParts = true === args.getBoolean(\"e\");\n\n return this.run();\n }\n}\n"]}
|
|
@@ -11,6 +11,8 @@ const parseBoolean_1 = require("./parseBoolean");
|
|
|
11
11
|
const parseToggle_1 = require("./parseToggle");
|
|
12
12
|
/** Base class for attaching map layer tool. */
|
|
13
13
|
class AttachMapLayerBaseTool extends core_frontend_1.Tool {
|
|
14
|
+
_isBackground;
|
|
15
|
+
_isBase;
|
|
14
16
|
constructor(_isBackground = true, _isBase = false) {
|
|
15
17
|
super();
|
|
16
18
|
this._isBackground = _isBackground;
|
|
@@ -62,8 +64,10 @@ class AttachMapLayerBaseTool extends core_frontend_1.Tool {
|
|
|
62
64
|
* @beta
|
|
63
65
|
*/
|
|
64
66
|
class AttachModelMapLayerTool extends core_frontend_1.Tool {
|
|
67
|
+
_formatId;
|
|
65
68
|
static get minArgs() { return 0; }
|
|
66
69
|
static get maxArgs() { return 1; }
|
|
70
|
+
static toolId = "AttachModelMapLayerTool";
|
|
67
71
|
constructor(_formatId) {
|
|
68
72
|
super();
|
|
69
73
|
this._formatId = _formatId;
|
|
@@ -93,9 +97,9 @@ class AttachModelMapLayerTool extends core_frontend_1.Tool {
|
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
exports.AttachModelMapLayerTool = AttachModelMapLayerTool;
|
|
96
|
-
AttachModelMapLayerTool.toolId = "AttachModelMapLayerTool";
|
|
97
100
|
/** Attach a map layer from URL base class. */
|
|
98
101
|
class AttachMapLayerByURLBaseTool extends AttachMapLayerBaseTool {
|
|
102
|
+
_formatId;
|
|
99
103
|
static get minArgs() { return 1; }
|
|
100
104
|
static get maxArgs() { return 4; }
|
|
101
105
|
constructor(_formatId) {
|
|
@@ -119,6 +123,7 @@ class AttachMapLayerByURLBaseTool extends AttachMapLayerBaseTool {
|
|
|
119
123
|
* @beta
|
|
120
124
|
*/
|
|
121
125
|
class AttachWmsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
126
|
+
static toolId = "AttachWmsMapLayerTool";
|
|
122
127
|
constructor() { super("WMS"); }
|
|
123
128
|
/** This method runs the tool, attaching a WMS map layer from a given URL.
|
|
124
129
|
* @param args contains url, name, userName, password in array order
|
|
@@ -128,11 +133,11 @@ class AttachWmsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
|
128
133
|
}
|
|
129
134
|
}
|
|
130
135
|
exports.AttachWmsMapLayerByUrlTool = AttachWmsMapLayerByUrlTool;
|
|
131
|
-
AttachWmsMapLayerByUrlTool.toolId = "AttachWmsMapLayerTool";
|
|
132
136
|
/** This tool attaches a WMTS map layer from a given URL.
|
|
133
137
|
* @beta
|
|
134
138
|
*/
|
|
135
139
|
class AttachWmtsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
140
|
+
static toolId = "AttachWmtsMapLayerTool";
|
|
136
141
|
constructor() { super("WMTS"); }
|
|
137
142
|
/** This method runs the tool, attaching a WMTS map layer from a given URL.
|
|
138
143
|
* @param args contains url, name, userName, password in array order
|
|
@@ -142,43 +147,43 @@ class AttachWmtsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
|
142
147
|
}
|
|
143
148
|
}
|
|
144
149
|
exports.AttachWmtsMapLayerByUrlTool = AttachWmtsMapLayerByUrlTool;
|
|
145
|
-
AttachWmtsMapLayerByUrlTool.toolId = "AttachWmtsMapLayerTool";
|
|
146
150
|
/** This tool attaches an ArcGIS map layer from a given URL.
|
|
147
151
|
* @beta
|
|
148
152
|
*/
|
|
149
153
|
class AttachArcGISMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
154
|
+
static toolId = "AttachArcGISMapLayerTool";
|
|
150
155
|
constructor() { super("ArcGIS"); }
|
|
151
156
|
}
|
|
152
157
|
exports.AttachArcGISMapLayerByUrlTool = AttachArcGISMapLayerByUrlTool;
|
|
153
|
-
AttachArcGISMapLayerByUrlTool.toolId = "AttachArcGISMapLayerTool";
|
|
154
158
|
/** This tool attaches an ArcGIS map layer from a given URL.
|
|
155
159
|
* @beta
|
|
156
160
|
*/
|
|
157
161
|
class AttachArcGISFeatureMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
162
|
+
static toolId = "AttachArcGISFeatureMapLayerTool";
|
|
158
163
|
constructor() { super("ArcGISFeature"); }
|
|
159
164
|
}
|
|
160
165
|
exports.AttachArcGISFeatureMapLayerByUrlTool = AttachArcGISFeatureMapLayerByUrlTool;
|
|
161
|
-
AttachArcGISFeatureMapLayerByUrlTool.toolId = "AttachArcGISFeatureMapLayerTool";
|
|
162
166
|
/** This tool attaches an ArcGIS map layer from a given URL.
|
|
163
167
|
* @beta
|
|
164
168
|
*/
|
|
165
169
|
class AttachOgcApiFeaturesMapLayerTool extends AttachMapLayerByURLBaseTool {
|
|
170
|
+
static toolId = "AttachOgcApiFeaturesMapLayerTool";
|
|
166
171
|
constructor() { super("OgcApiFeatures"); }
|
|
167
172
|
}
|
|
168
173
|
exports.AttachOgcApiFeaturesMapLayerTool = AttachOgcApiFeaturesMapLayerTool;
|
|
169
|
-
AttachOgcApiFeaturesMapLayerTool.toolId = "AttachOgcApiFeaturesMapLayerTool";
|
|
170
174
|
/** This tool attaches a map layer from a given tile URL.
|
|
171
175
|
* @beta
|
|
172
176
|
*/
|
|
173
177
|
class AttachTileURLMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
178
|
+
static toolId = "AttachTileURLMapLayerTool";
|
|
174
179
|
constructor() { super("TileURL"); }
|
|
175
180
|
}
|
|
176
181
|
exports.AttachTileURLMapLayerByUrlTool = AttachTileURLMapLayerByUrlTool;
|
|
177
|
-
AttachTileURLMapLayerByUrlTool.toolId = "AttachTileURLMapLayerTool";
|
|
178
182
|
/** This tool add a Map Layer from a specified name (look up in MapLayerSources.json).
|
|
179
183
|
* @beta
|
|
180
184
|
*/
|
|
181
185
|
class AttachMapLayerTool extends AttachMapLayerBaseTool {
|
|
186
|
+
static toolId = "AttachMapLayerTool";
|
|
182
187
|
static get minArgs() { return 1; }
|
|
183
188
|
static get maxArgs() { return 1; }
|
|
184
189
|
/** This method runs the tool, adding a map layer from a specified name in MayLayerSources.json.
|
|
@@ -205,33 +210,33 @@ class AttachMapLayerTool extends AttachMapLayerBaseTool {
|
|
|
205
210
|
}
|
|
206
211
|
}
|
|
207
212
|
exports.AttachMapLayerTool = AttachMapLayerTool;
|
|
208
|
-
AttachMapLayerTool.toolId = "AttachMapLayerTool";
|
|
209
213
|
/** This tool attaches a Overlay map layer.
|
|
210
214
|
* @beta
|
|
211
215
|
*/
|
|
212
216
|
class AttachMapOverlayTool extends AttachMapLayerTool {
|
|
217
|
+
static toolId = "AttachMapOverlayTool";
|
|
213
218
|
constructor() {
|
|
214
219
|
super();
|
|
215
220
|
this._isBackground = false;
|
|
216
221
|
}
|
|
217
222
|
}
|
|
218
223
|
exports.AttachMapOverlayTool = AttachMapOverlayTool;
|
|
219
|
-
AttachMapOverlayTool.toolId = "AttachMapOverlayTool";
|
|
220
224
|
/** Sets map layer base tool.
|
|
221
225
|
* @beta
|
|
222
226
|
*/
|
|
223
227
|
class SetMapBaseTool extends AttachMapLayerTool {
|
|
228
|
+
static toolId = "SetMapBaseTool";
|
|
224
229
|
constructor() {
|
|
225
230
|
super();
|
|
226
231
|
this._isBase = true;
|
|
227
232
|
}
|
|
228
233
|
}
|
|
229
234
|
exports.SetMapBaseTool = SetMapBaseTool;
|
|
230
|
-
SetMapBaseTool.toolId = "SetMapBaseTool";
|
|
231
235
|
/** Detach Map Layers Tool.
|
|
232
236
|
* @beta
|
|
233
237
|
*/
|
|
234
238
|
class DetachMapLayersTool extends core_frontend_1.Tool {
|
|
239
|
+
static toolId = "DetachMapLayersTool";
|
|
235
240
|
static get minArgs() { return 0; }
|
|
236
241
|
static get maxArgs() { return 0; }
|
|
237
242
|
async parseAndRun(..._args) {
|
|
@@ -248,7 +253,6 @@ class DetachMapLayersTool extends core_frontend_1.Tool {
|
|
|
248
253
|
}
|
|
249
254
|
}
|
|
250
255
|
exports.DetachMapLayersTool = DetachMapLayersTool;
|
|
251
|
-
DetachMapLayersTool.toolId = "DetachMapLayersTool";
|
|
252
256
|
function parseLayerIndex(args) {
|
|
253
257
|
const layerIndex = args.length > 1 ? parseInt(args[1], 10) : 0;
|
|
254
258
|
return isNaN(layerIndex) ? 0 : layerIndex;
|
|
@@ -257,6 +261,7 @@ function parseLayerIndex(args) {
|
|
|
257
261
|
* @beta
|
|
258
262
|
*/
|
|
259
263
|
class MapLayerVisibilityTool extends core_frontend_1.Tool {
|
|
264
|
+
static toolId = "SetMapLayerVisibility";
|
|
260
265
|
static get minArgs() { return 1; }
|
|
261
266
|
static get maxArgs() { return 2; }
|
|
262
267
|
/** This method runs the tool, setting the visibility of a map layer.
|
|
@@ -287,11 +292,11 @@ class MapLayerVisibilityTool extends core_frontend_1.Tool {
|
|
|
287
292
|
}
|
|
288
293
|
}
|
|
289
294
|
exports.MapLayerVisibilityTool = MapLayerVisibilityTool;
|
|
290
|
-
MapLayerVisibilityTool.toolId = "SetMapLayerVisibility";
|
|
291
295
|
/** This tool reorders map layers.
|
|
292
296
|
* @beta
|
|
293
297
|
*/
|
|
294
298
|
class ReorderMapLayers extends core_frontend_1.Tool {
|
|
299
|
+
static toolId = "ReorderMapLayers";
|
|
295
300
|
static get minArgs() { return 0; }
|
|
296
301
|
static get maxArgs() { return 2; }
|
|
297
302
|
/** This method runs the tool, reordering the map layers.
|
|
@@ -317,11 +322,11 @@ class ReorderMapLayers extends core_frontend_1.Tool {
|
|
|
317
322
|
}
|
|
318
323
|
}
|
|
319
324
|
exports.ReorderMapLayers = ReorderMapLayers;
|
|
320
|
-
ReorderMapLayers.toolId = "ReorderMapLayers";
|
|
321
325
|
/** This tool sets the transparency of a map layer.
|
|
322
326
|
* @beta
|
|
323
327
|
*/
|
|
324
328
|
class MapLayerTransparencyTool extends core_frontend_1.Tool {
|
|
329
|
+
static toolId = "SetMapLayerTransparency";
|
|
325
330
|
static get minArgs() { return 1; }
|
|
326
331
|
static get maxArgs() { return 2; }
|
|
327
332
|
/** This method runs the tool, setting the transparency of a map layer.
|
|
@@ -348,11 +353,11 @@ class MapLayerTransparencyTool extends core_frontend_1.Tool {
|
|
|
348
353
|
}
|
|
349
354
|
}
|
|
350
355
|
exports.MapLayerTransparencyTool = MapLayerTransparencyTool;
|
|
351
|
-
MapLayerTransparencyTool.toolId = "SetMapLayerTransparency";
|
|
352
356
|
/** This tool sets the visibility of the map sublayer.
|
|
353
357
|
* @beta
|
|
354
358
|
*/
|
|
355
359
|
class MapLayerSubLayerVisibilityTool extends core_frontend_1.Tool {
|
|
360
|
+
static toolId = "SetMapSubLayerVisibility";
|
|
356
361
|
static get minArgs() { return 1; }
|
|
357
362
|
static get maxArgs() { return 2; }
|
|
358
363
|
/** This method runs the tool, setting the visibility of a map sublayer.
|
|
@@ -378,11 +383,11 @@ class MapLayerSubLayerVisibilityTool extends core_frontend_1.Tool {
|
|
|
378
383
|
}
|
|
379
384
|
}
|
|
380
385
|
exports.MapLayerSubLayerVisibilityTool = MapLayerSubLayerVisibilityTool;
|
|
381
|
-
MapLayerSubLayerVisibilityTool.toolId = "SetMapSubLayerVisibility";
|
|
382
386
|
/** This tool changes the viewport so it is zoomed to the range of a map layer.
|
|
383
387
|
* @beta
|
|
384
388
|
*/
|
|
385
389
|
class MapLayerZoomTool extends core_frontend_1.Tool {
|
|
390
|
+
static toolId = "MapLayerZoom";
|
|
386
391
|
static get minArgs() { return 0; }
|
|
387
392
|
static get maxArgs() { return 1; }
|
|
388
393
|
/** This method runs the tool, changing the viewport so it is zoomed to the range of a map layer.
|
|
@@ -405,11 +410,11 @@ class MapLayerZoomTool extends core_frontend_1.Tool {
|
|
|
405
410
|
}
|
|
406
411
|
}
|
|
407
412
|
exports.MapLayerZoomTool = MapLayerZoomTool;
|
|
408
|
-
MapLayerZoomTool.toolId = "MapLayerZoom";
|
|
409
413
|
/** This tool toggles whether to apply terrain heights to the map.
|
|
410
414
|
* @beta
|
|
411
415
|
*/
|
|
412
416
|
class ToggleTerrainTool extends core_frontend_1.Tool {
|
|
417
|
+
static toolId = "ToggleTerrain";
|
|
413
418
|
static get minArgs() { return 0; }
|
|
414
419
|
static get maxArgs() { return 1; }
|
|
415
420
|
/** This method runs the tool, changing whether to apply terrain heights to the map.
|
|
@@ -435,11 +440,11 @@ class ToggleTerrainTool extends core_frontend_1.Tool {
|
|
|
435
440
|
}
|
|
436
441
|
}
|
|
437
442
|
exports.ToggleTerrainTool = ToggleTerrainTool;
|
|
438
|
-
ToggleTerrainTool.toolId = "ToggleTerrain";
|
|
439
443
|
/** This tool changes the color of the base map.
|
|
440
444
|
* @beta
|
|
441
445
|
*/
|
|
442
446
|
class MapBaseColorTool extends core_frontend_1.Tool {
|
|
447
|
+
static toolId = "SetMapBaseColorTool";
|
|
443
448
|
static get minArgs() { return 3; }
|
|
444
449
|
static get maxArgs() { return 3; }
|
|
445
450
|
/** This method runs the tool, changing the color of the base map.
|
|
@@ -464,11 +469,11 @@ class MapBaseColorTool extends core_frontend_1.Tool {
|
|
|
464
469
|
}
|
|
465
470
|
}
|
|
466
471
|
exports.MapBaseColorTool = MapBaseColorTool;
|
|
467
|
-
MapBaseColorTool.toolId = "SetMapBaseColorTool";
|
|
468
472
|
/** This tool changes the transparency of the base map.
|
|
469
473
|
* @beta
|
|
470
474
|
*/
|
|
471
475
|
class MapBaseTransparencyTool extends core_frontend_1.Tool {
|
|
476
|
+
static toolId = "SetMapBaseTransparencyTool";
|
|
472
477
|
static get minArgs() { return 1; }
|
|
473
478
|
static get maxArgs() { return 1; }
|
|
474
479
|
/** This method runs the tool, changing the transparency of the base map.
|
|
@@ -491,11 +496,11 @@ class MapBaseTransparencyTool extends core_frontend_1.Tool {
|
|
|
491
496
|
}
|
|
492
497
|
}
|
|
493
498
|
exports.MapBaseTransparencyTool = MapBaseTransparencyTool;
|
|
494
|
-
MapBaseTransparencyTool.toolId = "SetMapBaseTransparencyTool";
|
|
495
499
|
/** This tool changes the visibility of the base map.
|
|
496
500
|
* @beta
|
|
497
501
|
*/
|
|
498
502
|
class MapBaseVisibilityTool extends core_frontend_1.Tool {
|
|
503
|
+
static toolId = "SetMapBaseVisibilityTool";
|
|
499
504
|
static get minArgs() { return 1; }
|
|
500
505
|
static get maxArgs() { return 1; }
|
|
501
506
|
/** This method runs the tool, changing the visibility of the base map.
|
|
@@ -518,5 +523,4 @@ class MapBaseVisibilityTool extends core_frontend_1.Tool {
|
|
|
518
523
|
}
|
|
519
524
|
}
|
|
520
525
|
exports.MapBaseVisibilityTool = MapBaseVisibilityTool;
|
|
521
|
-
MapBaseVisibilityTool.toolId = "SetMapBaseVisibilityTool";
|
|
522
526
|
//# sourceMappingURL=MapLayerTool.js.map
|