UNPKG

@itwin/frontend-devtools

Version:

Debug menu and supporting UI widgets

227 lines • 12.1 kB
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ /** @packageDocumentation * @module Utilities */ Object.defineProperty(exports, "__esModule", { value: true }); exports.FrontendDevTools = void 0; const core_frontend_1 = require("@itwin/core-frontend"); const Convolution_1 = require("./effects/Convolution"); const EffectTools_1 = require("./effects/EffectTools"); const Explosion_1 = require("./effects/Explosion"); const FlipImage_1 = require("./effects/FlipImage"); const LensDistortion_1 = require("./effects/LensDistortion"); const Saturation_1 = require("./effects/Saturation"); const Snow_1 = require("./effects/Snow"); const Vignette_1 = require("./effects/Vignette"); const PlanarMaskTools_1 = require("./tools/PlanarMaskTools"); const ViewportTools_1 = require("./tools/ViewportTools"); const AnimationIntervalTool_1 = require("./tools/AnimationIntervalTool"); const ChangeUnitsTool_1 = require("./tools/ChangeUnitsTool"); const ClipTools_1 = require("./tools/ClipTools"); const DisplayStyleTools_1 = require("./tools/DisplayStyleTools"); const ScheduleScriptTools_1 = require("./tools/ScheduleScriptTools"); const EmphasizeElementsTool_1 = require("./tools/EmphasizeElementsTool"); const FrustumDecoration_1 = require("./tools/FrustumDecoration"); const InspectElementTool_1 = require("./tools/InspectElementTool"); const MapLayerTool_1 = require("./tools/MapLayerTool"); const MeasureTileLoadTime_1 = require("./tools/MeasureTileLoadTime"); const ModelAppearanceTools_1 = require("./tools/ModelAppearanceTools"); const PlanProjectionTools_1 = require("./tools/PlanProjectionTools"); const ProjectExtents_1 = require("./tools/ProjectExtents"); const RealityModelTools_1 = require("./tools/RealityModelTools"); const RealityTransitionTool_1 = require("./tools/RealityTransitionTool"); const RenderSystemTools_1 = require("./tools/RenderSystemTools"); const RenderTargetTools_1 = require("./tools/RenderTargetTools"); const ReportWebGLCompatibilityTool_1 = require("./tools/ReportWebGLCompatibilityTool"); const SavedViews_1 = require("./tools/SavedViews"); const SelectionTools_1 = require("./tools/SelectionTools"); const SetGpuMemoryLimitTool_1 = require("./tools/SetGpuMemoryLimitTool"); const SourceAspectIdTools_1 = require("./tools/SourceAspectIdTools"); const TileRequestDecoration_1 = require("./tools/TileRequestDecoration"); const TileTreeBoundsDecoration_1 = require("./tools/TileTreeBoundsDecoration"); const ToolTipProvider_1 = require("./tools/ToolTipProvider"); const ViewDefinitionDecorator_1 = require("./tools/ViewDefinitionDecorator"); /** Entry-point for the package. Before using the package you *must* call [[FrontendDevTools.initialize]]. * @beta */ class FrontendDevTools { static _initialized = false; /** Call this before using the package (e.g., before instantiating any of its widgets or attempting to use any of its tools. * To initialize when starting up your app: * ```ts * IModelApp.startup(); * await FrontendDevTools.initialize(); * ``` * @beta */ static async initialize() { if (this._initialized) return; this._initialized = true; // clean up if we're being shut down core_frontend_1.IModelApp.onBeforeShutdown.addListener(() => this.shutdown()); const namespace = "FrontendDevTools"; const namespacePromise = core_frontend_1.IModelApp.localization.registerNamespace(namespace); const tools = [ MapLayerTool_1.AttachMapLayerTool, MapLayerTool_1.AttachMapOverlayTool, MapLayerTool_1.AttachModelMapLayerTool, MapLayerTool_1.AttachArcGISMapLayerByUrlTool, MapLayerTool_1.AttachArcGISFeatureMapLayerByUrlTool, MapLayerTool_1.AttachOgcApiFeaturesMapLayerTool, MapLayerTool_1.AttachWmsMapLayerByUrlTool, MapLayerTool_1.AttachWmtsMapLayerByUrlTool, MapLayerTool_1.AttachTileURLMapLayerByUrlTool, AnimationIntervalTool_1.AnimationIntervalTool, DisplayStyleTools_1.ApplyRenderingStyleTool, SavedViews_1.ApplyViewByIdTool, SavedViews_1.ApplyViewTool, DisplayStyleTools_1.ChangeBackgroundColorTool, ViewportTools_1.ChangeCameraTool, ViewportTools_1.ChangeEmphasisSettingsTool, ViewportTools_1.ChangeFlashSettingsTool, ViewportTools_1.ChangeHiliteModeTool, ViewportTools_1.ChangeHiliteSettingsTool, PlanProjectionTools_1.ChangePlanProjectionSettingsTool, ChangeUnitsTool_1.ChangeUnitsTool, DisplayStyleTools_1.ChangeViewFlagsTool, EffectTools_1.ClearEffectsTool, EmphasizeElementsTool_1.ClearEmphasizedElementsTool, EmphasizeElementsTool_1.ClearIsolatedElementsTool, ClipTools_1.ClipColorTool, ClipTools_1.ClipIntersectionTool, RenderSystemTools_1.CompileShadersTool, ViewportTools_1.DefaultTileSizeModifierTool, MapLayerTool_1.DetachMapLayersTool, PlanProjectionTools_1.DumpPlanProjectionSettingsTool, SelectionTools_1.DumpSelectionSetTool, Convolution_1.EdgeDetectionEffect, Convolution_1.EmbossEffect, SourceAspectIdTools_1.ElementIdFromSourceAspectIdTool, EmphasizeElementsTool_1.EmphasizeSelectedElementsTool, EmphasizeElementsTool_1.EmphasizeVisibleElementsTool, Explosion_1.ExplosionEffect, ViewportTools_1.FadeOutTool, FlipImage_1.FlipImageConfig, FlipImage_1.FlipImageEffect, ViewportTools_1.FreezeSceneTool, Convolution_1.GaussianBlurEffect, InspectElementTool_1.InspectElementTool, EmphasizeElementsTool_1.IsolateSelectedElementsTool, LensDistortion_1.LensDistortionConfig, LensDistortion_1.LensDistortionEffect, RenderSystemTools_1.LoseWebGLContextTool, MapLayerTool_1.MapLayerTransparencyTool, MapLayerTool_1.MapLayerVisibilityTool, MapLayerTool_1.MapLayerSubLayerVisibilityTool, MapLayerTool_1.MapLayerZoomTool, MapLayerTool_1.MapBaseColorTool, MapLayerTool_1.MapBaseTransparencyTool, MapLayerTool_1.MapBaseVisibilityTool, MeasureTileLoadTime_1.MeasureTileLoadTimeTool, DisplayStyleTools_1.OverrideSubCategoryTool, PlanProjectionTools_1.OverrideSubCategoryPriorityTool, ScheduleScriptTools_1.QueryScheduleScriptTool, RealityTransitionTool_1.RealityTransitionTool, MapLayerTool_1.ReorderMapLayers, ReportWebGLCompatibilityTool_1.ReportWebGLCompatibilityTool, ScheduleScriptTools_1.ReverseScheduleScriptTool, Saturation_1.SaturationConfig, Saturation_1.SaturationEffect, DisplayStyleTools_1.SaveRenderingStyleTool, SavedViews_1.SaveViewTool, SelectionTools_1.SelectElementsByIdTool, RenderTargetTools_1.SetAASamplesTool, ViewportTools_1.SetAspectRatioSkewTool, ScheduleScriptTools_1.SetScheduleScriptTool, RenderTargetTools_1.ToggleVolClassIntersect, MapLayerTool_1.SetMapBaseTool, Convolution_1.SharpenEffect, Convolution_1.SharpnessEffect, ViewportTools_1.ShowTileVolumesTool, DisplayStyleTools_1.SkyCubeTool, DisplayStyleTools_1.SkySphereTool, Snow_1.SnowEffect, SourceAspectIdTools_1.SourceAspectIdFromElementIdTool, ClipTools_1.TestClipStyleTool, ViewportTools_1.Toggle3dManipulationsTool, ViewportTools_1.ToggleDrawingGraphicsTool, RenderSystemTools_1.ToggleDPIForLODTool, RenderTargetTools_1.ToggleDrapeFrustumTool, FrustumDecoration_1.ToggleFrustumSnapshotTool, RenderTargetTools_1.ToggleMaskFrustumTool, RenderTargetTools_1.ToggleNormalMaps, RenderTargetTools_1.TogglePrimitiveVisibilityTool, ProjectExtents_1.ToggleProjectExtentsTool, RenderTargetTools_1.ToggleReadPixelsTool, ViewportTools_1.ToggleSectionDrawingSpatialViewTool, FrustumDecoration_1.ToggleSelectedViewFrustumTool, FrustumDecoration_1.ToggleShadowFrustumTool, DisplayStyleTools_1.ToggleSkyboxTool, TileRequestDecoration_1.ToggleTileRequestDecorationTool, TileTreeBoundsDecoration_1.ToggleTileTreeBoundsDecorationTool, ViewportTools_1.ToggleTileTreeReferencesTool, ToolTipProvider_1.ToggleToolTipsTool, ViewportTools_1.ToggleViewAttachmentBoundariesTool, ViewportTools_1.ToggleViewAttachmentClipShapesTool, ViewportTools_1.ToggleViewAttachmentsTool, ViewDefinitionDecorator_1.ViewDefinitionDecorationTool, DisplayStyleTools_1.ToggleWiremeshTool, RenderTargetTools_1.ToggleRealityTileBounds, RenderTargetTools_1.ToggleRealityTilePreload, RenderTargetTools_1.ToggleRealityTileLogging, RenderTargetTools_1.ToggleRealityTileFreeze, ClipTools_1.ToggleSectionCutTool, MapLayerTool_1.ToggleTerrainTool, Convolution_1.UnsharpenEffect, ViewportTools_1.ViewportAddRealityModel, ViewportTools_1.ViewportTileSizeModifierTool, Vignette_1.VignetteConfig, Vignette_1.VignetteEffect, RealityModelTools_1.AttachRealityModelTool, RealityModelTools_1.DetachRealityModelTool, RealityModelTools_1.SaveRealityModelTool, SetGpuMemoryLimitTool_1.SetGpuMemoryLimitTool, RealityModelTools_1.SetRealityModelLocateTool, RealityModelTools_1.SetRealityModelEmphasizedTool, RealityModelTools_1.SetRealityModelTransparencyTool, RealityModelTools_1.SetRealityModelColorTool, ModelAppearanceTools_1.SetModelLocateTool, ModelAppearanceTools_1.SetModelEmphasizedTool, ModelAppearanceTools_1.SetModelTransparencyTool, ModelAppearanceTools_1.SetModelColorTool, ModelAppearanceTools_1.SetModelLineWeightTool, ModelAppearanceTools_1.SetModelLineCodeTool, ModelAppearanceTools_1.SetModelIgnoresMaterialsTool, RealityModelTools_1.ClearRealityModelAppearanceOverrides, ModelAppearanceTools_1.ClearModelAppearanceOverrides, RealityModelTools_1.AttachCesiumAssetTool, RealityModelTools_1.ToggleOSMBuildingDisplay, PlanarMaskTools_1.SetHigherPriorityRealityModelMasking, PlanarMaskTools_1.SetMapHigherPriorityMasking, PlanarMaskTools_1.MaskRealityModelByModelTool, PlanarMaskTools_1.MaskRealityModelBySubCategoryTool, PlanarMaskTools_1.MaskRealityModelByElementTool, PlanarMaskTools_1.MaskRealityModelByExcludedElementTool, PlanarMaskTools_1.UnmaskRealityModelTool, PlanarMaskTools_1.MaskBackgroundMapByModelTool, PlanarMaskTools_1.MaskBackgroundMapBySubCategoryTool, PlanarMaskTools_1.MaskBackgroundMapByElementTool, PlanarMaskTools_1.MaskBackgroundMapByExcludedElementTool, PlanarMaskTools_1.UnmaskMapTool, DisplayStyleTools_1.WoWIgnoreBackgroundTool, ]; for (const tool of tools) tool.register(namespace); return namespacePromise; } static shutdown() { this._initialized = false; } } exports.FrontendDevTools = FrontendDevTools; //# sourceMappingURL=FrontEndDevTools.js.map