@itwin/core-frontend 3.0.0-dev.168 → 3.0.0-dev.173

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.
@@ -80,7 +80,7 @@ export interface IModelAppOptions {
80
80
  tentativePoint?: TentativePoint;
81
81
  /** @internal */
82
82
  quantityFormatter?: QuantityFormatter;
83
- /** @internal */
83
+ /** If present, supplies an implementation of the render system, or options for initializing the default render system. */
84
84
  renderSys?: RenderSystem | RenderSystem.Options;
85
85
  /** If present, supplies the [[UiAdmin]] for this session. */
86
86
  uiAdmin?: UiAdmin;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelApp.d.ts","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAA0C,UAAU,EAAU,MAAM,qBAAqB,CAAC;AACnI,OAAO,EACL,mBAAmB,EAAgB,YAAY,EAAE,iBAAiB,EAAoB,sBAAsB,EAC7G,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAA4B,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB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C;AACvB,6BAAmB,GAAG,KAAK,CAAC;AAC5B,4BAAkB,GAA2B,yBAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AAWtF,yEAAyE;AAClD,0BAAgB,GAAG,IAAI,sBAAO,EAAc,CAAC;AAIpE,6CAA6C;AACtB,eAAK,GAAG,IAAI,mBAAY,EAAE,CAAC;AAgElD;;GAEG;AACoB,mBAAS,GAAqB,IAAI,iCAAgB,EAAE,CAAC;AAE5E,gDAAgD;AACjC,wBAAc,GAAG,IAAI,GAAG,EAA8B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IModelApp\r\n */\r\n\r\nconst copyrightNotice = 'Copyright © 2017-2021 <a href=\"https://www.bentley.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bentley Systems, Inc.</a>';\r\n\r\nimport { TelemetryManager } from \"@itwin/core-telemetry\";\r\nimport { UiAdmin } from \"@itwin/appui-abstract\";\r\nimport { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, Guid, GuidString, Logger } from \"@itwin/core-bentley\";\r\nimport {\r\n AuthorizationClient, IModelStatus, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity,\r\n} from \"@itwin/core-common\";\r\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\r\nimport { queryRenderCompatibility, WebGLRenderCompatibilityInfo } from \"@itwin/webgl-compatibility\";\r\nimport { AccuDraw } from \"./AccuDraw\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport * as auxCoordState from \"./AuxCoordSys\";\r\nimport * as categorySelectorState from \"./CategorySelectorState\";\r\nimport * as displayStyleState from \"./DisplayStyleState\";\r\nimport * as drawingViewState from \"./DrawingViewState\";\r\nimport { ElementLocateManager } from \"./ElementLocateManager\";\r\nimport { EntityState } from \"./EntityState\";\r\nimport { FrontendHubAccess } from \"./FrontendHubAccess\";\r\nimport { FrontendLoggerCategory } from \"./FrontendLoggerCategory\";\r\nimport * as modelselector from \"./ModelSelectorState\";\r\nimport * as modelState from \"./ModelState\";\r\nimport { NotificationManager } from \"./NotificationManager\";\r\nimport { QuantityFormatter } from \"./quantity-formatting/QuantityFormatter\";\r\nimport { RenderSystem } from \"./render/RenderSystem\";\r\nimport { System } from \"./render/webgl/System\";\r\nimport * as sheetState from \"./SheetViewState\";\r\nimport * as spatialViewState from \"./SpatialViewState\";\r\nimport { TentativePoint } from \"./TentativePoint\";\r\nimport { MapLayerFormatRegistry, MapLayerOptions, TileAdmin } from \"./tile/internal\";\r\nimport * as accudrawTool from \"./tools/AccuDrawTool\";\r\nimport * as clipViewTool from \"./tools/ClipViewTool\";\r\nimport * as idleTool from \"./tools/IdleTool\";\r\nimport * as measureTool from \"./tools/MeasureTool\";\r\nimport * as selectTool from \"./tools/SelectTool\";\r\nimport { ToolRegistry } from \"./tools/Tool\";\r\nimport { ToolAdmin } from \"./tools/ToolAdmin\";\r\nimport * as viewTool from \"./tools/ViewTool\";\r\nimport { UserPreferencesAccess } from \"./UserPreferences\";\r\nimport { ViewManager } from \"./ViewManager\";\r\nimport * as viewState from \"./ViewState\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-var-requires\r\nrequire(\"./IModeljs-css\");\r\n\r\n// cSpell:ignore noopener noreferrer gprid forin nbsp csrf xsrf\r\n\r\n/** Options that can be supplied with [[IModelAppOptions]] to customize frontend security.\r\n * @public\r\n */\r\nexport interface FrontendSecurityOptions {\r\n /** Configures protection from Cross Site Request Forgery attacks. */\r\n readonly csrfProtection?: {\r\n /** If enabled, IModelApp will extract the CSRF token for the current session from the document's cookies and send it with each request as a header value. */\r\n readonly enabled: boolean;\r\n /** Defaults to XSRF-TOKEN. */\r\n readonly cookieName?: string;\r\n /** Defaults to X-XSRF-TOKEN. */\r\n readonly headerName?: string;\r\n };\r\n}\r\n\r\n/** Options that can be supplied to [[IModelApp.startup]] to customize frontend behavior.\r\n * @public\r\n */\r\nexport interface IModelAppOptions {\r\n /** If present, supplies the [[IModelClient]] for this session. */\r\n hubAccess?: FrontendHubAccess;\r\n /** If present, supplies the Id of this application. Applications must set this to the Bentley Global Product Registry Id (GPRID) for usage logging. */\r\n applicationId?: string;\r\n /** If present, supplies the version of this application. Must be set for usage logging. */\r\n applicationVersion?: string;\r\n /** If present, supplies the [[UserPreferencesAccess]] for this session.\r\n * @beta\r\n */\r\n userPreferences?: UserPreferencesAccess;\r\n /** If present, supplies the [[ViewManager]] for this session. */\r\n viewManager?: ViewManager;\r\n /** If present, supplies Map Layer Options for this session such as Azure Access Keys\r\n * @beta\r\n */\r\n mapLayerOptions?: MapLayerOptions;\r\n /** If present, supplies the properties with which to initialize the [[TileAdmin]] for this session. */\r\n tileAdmin?: TileAdmin.Props;\r\n /** If present, supplies the [[NotificationManager]] for this session. */\r\n notifications?: NotificationManager;\r\n /** If present, supplies the [[ToolAdmin]] for this session. */\r\n toolAdmin?: ToolAdmin;\r\n /** If present, supplies the [[AccuDraw]] for this session.\r\n * @internal\r\n */\r\n accuDraw?: AccuDraw;\r\n /** If present, supplies the [[AccuSnap]] for this session. */\r\n accuSnap?: AccuSnap;\r\n /** If present, supplies the [[Localization]] for this session. Defaults to [ITwinLocalization]($i18n). */\r\n localization?: Localization;\r\n /** If present, supplies the authorization information for various frontend APIs */\r\n authorizationClient?: AuthorizationClient;\r\n /** If present, supplies security options for the frontend. */\r\n security?: FrontendSecurityOptions;\r\n /** @internal */\r\n sessionId?: GuidString;\r\n /** @internal */\r\n locateManager?: ElementLocateManager;\r\n /** @internal */\r\n tentativePoint?: TentativePoint;\r\n /** @internal */\r\n quantityFormatter?: QuantityFormatter;\r\n /** @internal */\r\n renderSys?: RenderSystem | RenderSystem.Options;\r\n /** If present, supplies the [[UiAdmin]] for this session. */\r\n uiAdmin?: UiAdmin;\r\n rpcInterfaces?: RpcInterfaceDefinition[];\r\n /** @beta */\r\n realityDataAccess?: RealityDataAccess;\r\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\r\n * The path should always end with a trailing `/`.\r\n * @beta\r\n */\r\n publicPath?: string;\r\n}\r\n\r\n/** Options for [[IModelApp.makeModalDiv]]\r\n * @internal\r\n */\r\nexport interface ModalOptions {\r\n /** Width for the Modal dialog box. */\r\n width?: number;\r\n /** The dialog should be dismissed if the user clicks anywhere or hits Enter or Escape on the keyboard. */\r\n autoClose?: boolean;\r\n /** Show an 'x' in the upper right corner to close the dialog */\r\n closeBox?: boolean;\r\n /** The parent for the semi transparent *darkening* div. If not present, use `document.body` */\r\n rootDiv?: HTMLElement;\r\n}\r\n\r\n/** Return type for [[IModelApp.makeModalDiv]]\r\n * @internal\r\n */\r\nexport interface ModalReturn {\r\n /** The modal HTMLDivElement created. */\r\n modal: HTMLDivElement;\r\n /** A function that can be set as an event handler to stop the modal dialog. This can be used if `autoClose` or `closeBox` are not enabled. */\r\n stop: (_ev: Event) => void;\r\n}\r\n\r\n/** We hang the IModelApp object off the global `window` object in IModelApp.startup for debugging purposes.\r\n * It's removed in IModelApp.shutdown.\r\n */\r\ninterface IModelAppForDebugger {\r\n iModelAppForDebugger?: typeof IModelApp;\r\n}\r\n\r\n/**\r\n * Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All\r\n * members of IModelApp are static, and it serves as a singleton object for gaining access to session information.\r\n *\r\n * Before any interactive operations may be performed by the `@itwin/core-frontend package`, [[IModelApp.startup]] must be called and awaited.\r\n * Applications may customize the frontend behavior of iTwin.js by supplying options to [[IModelApp.startup]].\r\n *\r\n * @public\r\n */\r\nexport class IModelApp {\r\n private static _initialized = false;\r\n private static _accuDraw: AccuDraw;\r\n private static _accuSnap: AccuSnap;\r\n private static _applicationId: string;\r\n private static _applicationVersion: string;\r\n private static _localization: Localization;\r\n private static _locateManager: ElementLocateManager;\r\n private static _notifications: NotificationManager;\r\n private static _quantityFormatter: QuantityFormatter;\r\n private static _renderSystem?: RenderSystem;\r\n private static _userPreferences?: UserPreferencesAccess;\r\n private static _tentativePoint: TentativePoint;\r\n private static _tileAdmin: TileAdmin;\r\n private static _toolAdmin: ToolAdmin;\r\n private static _viewManager: ViewManager;\r\n private static _uiAdmin: UiAdmin;\r\n private static _wantEventLoop = false;\r\n private static _animationRequested = false;\r\n private static _animationInterval: BeDuration | undefined = BeDuration.fromSeconds(1);\r\n private static _animationIntervalId?: number;\r\n private static _securityOptions: FrontendSecurityOptions;\r\n private static _mapLayerFormatRegistry: MapLayerFormatRegistry;\r\n private static _hubAccess?: FrontendHubAccess;\r\n private static _realityDataAccess?: RealityDataAccess;\r\n private static _publicPath: string;\r\n\r\n // No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.\r\n protected constructor() { }\r\n\r\n /** Event raised just before the frontend IModelApp is to be shut down */\r\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\r\n\r\n /** Provides authorization information for various frontend APIs */\r\n public static authorizationClient?: AuthorizationClient;\r\n /** The [[ToolRegistry]] for this session. */\r\n public static readonly tools = new ToolRegistry();\r\n /** A uniqueId for this session */\r\n public static sessionId: GuidString;\r\n /** The [[MapLayerProviderRegistry]] for this session.\r\n * @internal\r\n */\r\n public static get mapLayerFormatRegistry(): MapLayerFormatRegistry { return this._mapLayerFormatRegistry; }\r\n /** The [[RenderSystem]] for this session. */\r\n public static get renderSystem(): RenderSystem { return this._renderSystem!; }\r\n /** The [[ViewManager]] for this session. */\r\n public static get viewManager(): ViewManager { return this._viewManager; }\r\n\r\n /** The [[NotificationManager]] for this session. */\r\n public static get notifications(): NotificationManager { return this._notifications; }\r\n /** The [[TileAdmin]] for this session. */\r\n public static get tileAdmin(): TileAdmin { return this._tileAdmin; }\r\n /** The [[QuantityFormatter]] for this session.\r\n * @alpha\r\n */\r\n public static get quantityFormatter(): QuantityFormatter { return this._quantityFormatter; }\r\n /** The [[ToolAdmin]] for this session. */\r\n public static get toolAdmin(): ToolAdmin { return this._toolAdmin; }\r\n /** The [[AccuDraw]] for this session.\r\n * @internal\r\n */\r\n public static get accuDraw(): AccuDraw { return this._accuDraw; }\r\n /** The [[AccuSnap]] for this session. */\r\n public static get accuSnap(): AccuSnap { return this._accuSnap; }\r\n /** @internal */\r\n public static get locateManager(): ElementLocateManager { return this._locateManager; }\r\n /** @internal */\r\n public static get tentativePoint(): TentativePoint { return this._tentativePoint; }\r\n /** The [[Localization]] for this session. */\r\n public static get localization(): Localization { return this._localization; }\r\n /** The [[UserPreferencesAccess]] for this session.\r\n * @beta\r\n */\r\n public static get userPreferences(): UserPreferencesAccess | undefined { return this._userPreferences; }\r\n /** The Id of this application. Applications must set this to the Global Product Registry ID (GPRID) for usage logging. */\r\n public static get applicationId(): string { return this._applicationId; }\r\n /** The version of this application. Must be set for usage logging. */\r\n public static get applicationVersion(): string { return this._applicationVersion; }\r\n /** @internal */\r\n public static get initialized() { return this._initialized; }\r\n\r\n /** Provides access to the IModelHub implementation for this IModelApp.\r\n * @internal\r\n */\r\n public static get hubAccess(): FrontendHubAccess | undefined { return this._hubAccess; }\r\n /** Provides access to the RealityData service implementation for this IModelApp\r\n * @beta\r\n */\r\n public static get realityDataAccess(): RealityDataAccess | undefined { return this._realityDataAccess; }\r\n\r\n /** @internal */\r\n public static get hasRenderSystem() { return this._renderSystem !== undefined && this._renderSystem.isValid; }\r\n /** The [[UiAdmin]] for this session. */\r\n public static get uiAdmin() { return this._uiAdmin; }\r\n /** The requested security options for the frontend. */\r\n public static get securityOptions() { return this._securityOptions; }\r\n /** The root URL for the assets 'public' folder.\r\n * @beta\r\n */\r\n public static get publicPath() { return this._publicPath; }\r\n /** The [[TelemetryManager]] for this session\r\n * @internal\r\n */\r\n public static readonly telemetry: TelemetryManager = new TelemetryManager();\r\n\r\n /** Map of classFullName to EntityState class */\r\n private static _entityClasses = new Map<string, typeof EntityState>();\r\n\r\n /** Register all of the subclasses of EntityState from a module.\r\n * @internal\r\n */\r\n public static registerModuleEntities(moduleObj: any) {\r\n for (const thisMember in moduleObj) { // eslint-disable-line guard-for-in\r\n const thisEntityState = moduleObj[thisMember];\r\n if (thisEntityState.prototype instanceof EntityState) {\r\n this.registerEntityState(thisEntityState.classFullName, thisEntityState);\r\n }\r\n }\r\n }\r\n\r\n /** Register an EntityState class by its classFullName\r\n * @internal\r\n */\r\n public static registerEntityState(classFullName: string, classType: typeof EntityState) {\r\n const lowerName = classFullName.toLowerCase();\r\n if (this._entityClasses.has(lowerName)) {\r\n const errMsg = `Class ${classFullName} is already registered. Make sure static schemaName and className members are correct on class ${classType.name}`;\r\n Logger.logError(FrontendLoggerCategory.IModelConnection, errMsg);\r\n throw new Error(errMsg);\r\n }\r\n\r\n this._entityClasses.set(lowerName, classType);\r\n }\r\n\r\n /** @internal */\r\n public static lookupEntityClass(classFullName: string) { return this._entityClasses.get(classFullName.toLowerCase()); }\r\n\r\n /**\r\n * Obtain WebGL rendering compatibility information for the client system. This information describes whether the client meets the\r\n * minimum rendering capabilities. It also describes whether the system lacks any optional capabilities that could improve quality\r\n * and/or performance.\r\n */\r\n public static queryRenderCompatibility(): WebGLRenderCompatibilityInfo {\r\n if (undefined === System.instance || undefined === System.instance.options.useWebGL2)\r\n return queryRenderCompatibility(true, System.createContext);\r\n else\r\n return queryRenderCompatibility(System.instance.options.useWebGL2, System.createContext);\r\n }\r\n\r\n /**\r\n * This method must be called before any other `@itwin/core-frontend` methods are used.\r\n * Somewhere in your startup code, call [[IModelApp.startup]]. E.g.:\r\n * ``` ts\r\n * await IModelApp.startup( {applicationId: myAppId} );\r\n * ```\r\n * @param opts The options for configuring IModelApp\r\n */\r\n public static async startup(opts?: IModelAppOptions): Promise<void> {\r\n if (this._initialized)\r\n return; // we're already initialized, do nothing.\r\n this._initialized = true;\r\n\r\n opts = opts ?? {};\r\n this._securityOptions = opts.security ?? {};\r\n\r\n // Make IModelApp globally accessible for debugging purposes. We'll remove it on shutdown.\r\n (window as IModelAppForDebugger).iModelAppForDebugger = this;\r\n\r\n this.sessionId = opts.sessionId ?? Guid.createValue();\r\n this._applicationId = opts.applicationId ?? \"2686\"; // Default to product id of iTwin.js\r\n this._applicationVersion = opts.applicationVersion ?? \"1.0.0\";\r\n this.authorizationClient = opts.authorizationClient;\r\n this._hubAccess = opts.hubAccess;\r\n\r\n this._setupRpcRequestContext();\r\n\r\n this._localization = opts.localization ?? new ITwinLocalization();\r\n const toolsNs = \"CoreTools\";\r\n await this.localization.initialize([\"iModelJs\", toolsNs]);\r\n [\r\n selectTool,\r\n idleTool,\r\n viewTool,\r\n clipViewTool,\r\n measureTool,\r\n accudrawTool,\r\n ].forEach((tool) => this.tools.registerModule(tool, toolsNs));\r\n\r\n this.registerEntityState(EntityState.classFullName, EntityState);\r\n [\r\n modelState,\r\n sheetState,\r\n viewState,\r\n drawingViewState,\r\n spatialViewState,\r\n displayStyleState,\r\n modelselector,\r\n categorySelectorState,\r\n auxCoordState,\r\n ].forEach((module) => this.registerModuleEntities(module));\r\n\r\n this._renderSystem = (opts.renderSys instanceof RenderSystem) ? opts.renderSys : this.createRenderSys(opts.renderSys);\r\n if (opts.userPreferences)\r\n this._userPreferences = opts.userPreferences;\r\n this._viewManager = opts.viewManager ?? new ViewManager();\r\n this._tileAdmin = await TileAdmin.create(opts.tileAdmin);\r\n this._notifications = opts.notifications ?? new NotificationManager();\r\n this._toolAdmin = opts.toolAdmin ?? new ToolAdmin();\r\n this._accuDraw = opts.accuDraw ?? new AccuDraw();\r\n this._accuSnap = opts.accuSnap ?? new AccuSnap();\r\n this._locateManager = opts.locateManager ?? new ElementLocateManager();\r\n this._tentativePoint = opts.tentativePoint ?? new TentativePoint();\r\n this._quantityFormatter = opts.quantityFormatter ?? new QuantityFormatter();\r\n this._uiAdmin = opts.uiAdmin ?? new UiAdmin();\r\n this._mapLayerFormatRegistry = new MapLayerFormatRegistry(opts.mapLayerOptions);\r\n this._realityDataAccess = opts.realityDataAccess;\r\n this._publicPath = opts.publicPath ?? \"\";\r\n\r\n [\r\n this.renderSystem,\r\n this.viewManager,\r\n this.toolAdmin,\r\n this.accuDraw,\r\n this.accuSnap,\r\n this.locateManager,\r\n this.tentativePoint,\r\n this.uiAdmin,\r\n ].forEach((sys) => sys.onInitialized());\r\n\r\n return this.quantityFormatter.onInitialized();\r\n }\r\n\r\n /** Must be called before the application exits to release any held resources. */\r\n public static async shutdown() {\r\n if (!this._initialized)\r\n return;\r\n\r\n // notify listeners that this IModelApp is about to be shut down.\r\n this.onBeforeShutdown.raiseEvent();\r\n this.onBeforeShutdown.clear();\r\n\r\n (window as IModelAppForDebugger).iModelAppForDebugger = undefined;\r\n\r\n this._wantEventLoop = false;\r\n window.removeEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n this.clearIntervalAnimation();\r\n [this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());\r\n this.tools.shutdown();\r\n this._renderSystem = dispose(this._renderSystem);\r\n this._entityClasses.clear();\r\n this.authorizationClient = undefined;\r\n this._initialized = false;\r\n }\r\n\r\n /** Controls how frequently the application polls for changes that may require a new animation frame to be requested.\r\n * Such changes include resizing a Viewport or changing the device pixel ratio by zooming in or out in the browser.\r\n * The default interval is 1 second. It may be desirable to override the default for specific apps and/or devices.\r\n * - Increasing the interval can conserve battery life on battery-powered devices at the expense of slower response to resize events.\r\n * - An application that only displays a single Viewport whose dimensions only change when the dimensions of the application window change, and which does not support changing application zoom level, could disable the interval altogether.\r\n * @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.\r\n * @beta\r\n */\r\n public static get animationInterval(): BeDuration | undefined { return IModelApp._animationInterval; }\r\n public static set animationInterval(interval: BeDuration | undefined) {\r\n if (undefined !== interval && interval.isTowardsPast)\r\n interval = undefined;\r\n\r\n if (interval !== IModelApp._animationInterval) {\r\n IModelApp._animationInterval = interval;\r\n if (IModelApp._wantEventLoop)\r\n IModelApp.requestIntervalAnimation();\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static requestNextAnimation() {\r\n if (!IModelApp._animationRequested) {\r\n IModelApp._animationRequested = true;\r\n requestAnimationFrame(IModelApp.eventLoop);\r\n }\r\n }\r\n\r\n /** @internal */\r\n private static clearIntervalAnimation(): void {\r\n if (undefined !== IModelApp._animationIntervalId) {\r\n window.clearInterval(IModelApp._animationIntervalId);\r\n IModelApp._animationIntervalId = undefined;\r\n }\r\n }\r\n\r\n /** @internal */\r\n private static requestIntervalAnimation(): void {\r\n IModelApp.clearIntervalAnimation();\r\n\r\n if (undefined !== IModelApp.animationInterval)\r\n IModelApp._animationIntervalId = window.setInterval(() => {\r\n IModelApp.requestNextAnimation();\r\n }, IModelApp.animationInterval.milliseconds);\r\n }\r\n\r\n /** @internal */\r\n public static startEventLoop() {\r\n if (!IModelApp._wantEventLoop) {\r\n IModelApp._wantEventLoop = true;\r\n window.addEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n IModelApp.requestIntervalAnimation();\r\n IModelApp.requestNextAnimation();\r\n }\r\n }\r\n\r\n /** Strictly for tests. @internal */\r\n public static stopEventLoop() {\r\n this._wantEventLoop = false;\r\n }\r\n\r\n /** The main event processing loop for Tools and rendering. */\r\n private static eventLoop() {\r\n IModelApp._animationRequested = false;\r\n if (!IModelApp._wantEventLoop) // flag turned on at startup\r\n return;\r\n\r\n try {\r\n IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n IModelApp.viewManager.renderLoop();\r\n IModelApp.tileAdmin.process();\r\n } catch (exception) {\r\n ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n IModelApp._wantEventLoop = false;\r\n IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.\r\n window.removeEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n }\r\n }\r\n\r\n /** Get the user's access token for this IModelApp, or a blank string if none is available.\r\n * @note accessTokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\r\n * returned by this method may change over time throughout the course of a session.\r\n */\r\n public static async getAccessToken(): Promise<AccessToken> {\r\n try {\r\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\r\n } catch (e) {\r\n return \"\";\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static createRenderSys(opts?: RenderSystem.Options): RenderSystem { return System.create(opts); }\r\n\r\n private static _setupRpcRequestContext() {\r\n RpcConfiguration.requestContext.getId = (_request: RpcRequest): string => {\r\n return Guid.createValue();\r\n };\r\n\r\n RpcConfiguration.requestContext.serialize = async (_request: RpcRequest): Promise<SerializedRpcActivity> => {\r\n const id = _request.id;\r\n const serialized: SerializedRpcActivity = {\r\n id,\r\n applicationId: this.applicationId,\r\n applicationVersion: this.applicationVersion,\r\n sessionId: this.sessionId,\r\n authorization: await this.getAccessToken(),\r\n };\r\n\r\n const csrf = IModelApp.securityOptions.csrfProtection;\r\n if (csrf && csrf.enabled) {\r\n const cookieName = csrf.cookieName || \"XSRF-TOKEN\";\r\n const cookieValue = document.cookie.split(\"; \").find((r) => r.startsWith(`${cookieName}=`));\r\n\r\n if (cookieValue) {\r\n const headerName = csrf.headerName || \"X-XSRF-TOKEN\";\r\n const headerValue = cookieValue.split(\"=\")[1];\r\n serialized.csrfToken = { headerName, headerValue };\r\n }\r\n }\r\n\r\n return serialized;\r\n };\r\n }\r\n\r\n /** Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText\r\n * @internal\r\n */\r\n public static makeHTMLElement<K extends keyof HTMLElementTagNameMap>(type: K, opt?: {\r\n /** The parent for the new HTMLElement */\r\n parent?: HTMLElement;\r\n /** The className for the new HTMLElement */\r\n className?: string;\r\n /** The Id for the new HTMLElement */\r\n id?: string;\r\n /** innerHTML for the new HTMLElement */\r\n innerHTML?: string;\r\n /** innerText for the new HTMLElement */\r\n innerText?: string;\r\n }) {\r\n const el = document.createElement(type);\r\n if (undefined !== opt) {\r\n if (undefined !== opt.className)\r\n el.className = opt.className;\r\n if (undefined !== opt.id)\r\n el.id = opt.id;\r\n if (undefined !== opt.innerHTML)\r\n el.innerHTML = opt.innerHTML;\r\n if (undefined !== opt.innerText)\r\n el.innerText = opt.innerText;\r\n if (undefined !== opt.parent)\r\n opt.parent.appendChild(el);\r\n }\r\n return el;\r\n }\r\n\r\n /** Make a modal dialog on top of the root of the application. The returned HTMLDivElement will be placed topmost, all other application\r\n * windows will be covered with a semi-transparent background that intercepts all key/mouse/touch events until the modal is dismissed.\r\n * @param options The options that describe how the modal should work.\r\n * @internal\r\n */\r\n public static makeModalDiv(options: ModalOptions): ModalReturn {\r\n const root = options.rootDiv ? options.rootDiv : document.body;\r\n // create the overlay div to \"black out\" the application to indicate everything is inactive until the modal has been dismissed.\r\n const overlay = IModelApp.makeHTMLElement(\"div\", { parent: root, className: \"imodeljs-modal-overlay\" });\r\n overlay.tabIndex = -1; // so we can catch keystroke events\r\n\r\n // function to remove modal dialog\r\n const stop = (ev: Event) => { root.removeChild(overlay); ev.stopPropagation(); };\r\n\r\n if (options.autoClose) {\r\n overlay.onclick = overlay.oncontextmenu = stop;\r\n overlay.onkeydown = overlay.onkeyup = (ev: KeyboardEvent) => { // ignore all keystrokes other than enter and escape\r\n switch (ev.key) {\r\n case \"Enter\":\r\n case \"Escape\":\r\n stop(ev);\r\n return;\r\n }\r\n ev.stopPropagation();\r\n };\r\n overlay.focus();\r\n }\r\n\r\n const modal = IModelApp.makeHTMLElement(\"div\", { parent: overlay, className: \"imodeljs-modal\" });\r\n if (undefined !== options.width) {\r\n modal.style.width = `${options.width}px`;\r\n // allow the dialog to be smaller than the width\r\n modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;\r\n }\r\n if (options.closeBox) {\r\n const close = IModelApp.makeHTMLElement(\"p\", { parent: modal, className: \"imodeljs-modal-close\" });\r\n close.innerText = \"\\u00d7\"; // unicode \"times\" symbol\r\n close.onclick = stop;\r\n }\r\n\r\n return { modal, stop };\r\n }\r\n\r\n /** Applications may implement this method to supply a Logo Card.\r\n * @beta\r\n */\r\n public static applicationLogoCard?: () => HTMLTableRowElement;\r\n\r\n /** Make a new Logo Card. Call this method from your implementation of [[IModelApp.applicationLogoCard]]\r\n * @param opts Options for Logo Card\r\n * @beta\r\n */\r\n public static makeLogoCard(\r\n opts: {\r\n /** The heading to be put at the top of this logo card inside an <h2>. May include HTML. */\r\n heading: string | HTMLElement;\r\n /** The URL or HTMLImageElement for the icon on this logo card. */\r\n iconSrc?: string | HTMLImageElement;\r\n /** The width of the icon, if `iconSrc` is a string. Default is 64. */\r\n iconWidth?: number;\r\n /** A *notice* string to be shown on the logo card. May include HTML. */\r\n notice?: string | HTMLElement;\r\n }): HTMLTableRowElement {\r\n const card = IModelApp.makeHTMLElement(\"tr\");\r\n const iconCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-logo\" });\r\n if (undefined !== opts.iconSrc) {\r\n if (typeof opts.iconSrc === \"string\") {\r\n const logo = IModelApp.makeHTMLElement(\"img\");\r\n logo.src = opts.iconSrc;\r\n logo.width = opts.iconWidth ? opts.iconWidth : 64;\r\n opts.iconSrc = logo;\r\n }\r\n iconCell.appendChild(opts.iconSrc);\r\n }\r\n const noticeCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-message\" });\r\n if (undefined !== opts.heading) {\r\n if (typeof opts.heading === \"string\")\r\n IModelApp.makeHTMLElement(\"h2\", { parent: noticeCell, innerHTML: opts.heading, className: \"logo-card-header\" });\r\n else\r\n noticeCell.appendChild(opts.heading);\r\n }\r\n if (undefined !== opts.notice) {\r\n if (typeof opts.notice === \"string\")\r\n IModelApp.makeHTMLElement(\"p\", { parent: noticeCell, innerHTML: opts.notice, className: \"logo-cards\" });\r\n else\r\n noticeCell.appendChild(opts.notice);\r\n }\r\n return card;\r\n }\r\n\r\n /** Make the logo card for the library itself. This card gets placed at the top of the stack.\r\n * @internal\r\n */\r\n public static makeIModelJsLogoCard() {\r\n return this.makeLogoCard({\r\n iconSrc: `${this.publicPath}images/about-imodeljs.svg`,\r\n heading: `<span style=\"font-weight:normal\">${this.localization.getLocalizedString(\"Notices.PoweredBy\")}</span>&nbsp;iTwin.js`,\r\n notice: `${require(\"../../package.json\").version}<br>${copyrightNotice}`, // eslint-disable-line @typescript-eslint/no-var-requires\r\n });\r\n }\r\n\r\n /** Format the tooltip strings returned by [[IModelConnection.getToolTipMessage]].\r\n * @alpha\r\n */\r\n public static formatElementToolTip(msg: string[]): HTMLElement {\r\n let out = \"\";\r\n msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);\r\n const div = document.createElement(\"div\");\r\n div.innerHTML = out;\r\n return div;\r\n }\r\n\r\n /** Localize an error status\r\n * @param status one of the status values from [BentleyStatus]($core-bentley), [IModelStatus]($core-bentley) or [DbResult]($core-bentley)\r\n * @returns a localized error message\r\n * @beta\r\n */\r\n public static translateStatus(status: number) {\r\n let key: { scope: string, val: string, status?: string };\r\n if (typeof status !== \"number\") {\r\n key = { scope: \"Errors\", val: \"IllegalValue\" };\r\n } else {\r\n key = { scope: \"BentleyStatus\", val: BentleyStatus[status] };\r\n if (!key.val)\r\n key = { scope: \"IModelStatus\", val: IModelStatus[status] };\r\n if (!key.val)\r\n key = { scope: \"DbResult\", val: DbResult[status] };\r\n if (!key.val)\r\n key = { scope: \"Errors\", val: \"Status\", status: status.toString() };\r\n }\r\n\r\n return this.localization.getLocalizedString(`${key.scope}.${key.val}`, key);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IModelApp.js","sourceRoot":"","sources":["../../src/IModelApp.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,MAAM,eAAe,GAAG,6HAA6H,CAAC;AAEtJ,0DAAyD;AACzD,0DAAgD;AAChD,sDAAmI;AACnI,oDAE4B;AAC5B,gDAAqD;AACrD,oEAAoG;AACpG,yCAAsC;AACtC,yCAAsC;AACtC,6DAA+C;AAC/C,+EAAiE;AACjE,uEAAyD;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,6CAA6C;AACtB,eAAK,GAAG,IAAI,mBAAY,EAAE,CAAC;AAgElD;;GAEG;AACoB,mBAAS,GAAqB,IAAI,iCAAgB,EAAE,CAAC;AAE5E,gDAAgD;AACjC,wBAAc,GAAG,IAAI,GAAG,EAA8B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IModelApp\r\n */\r\n\r\nconst copyrightNotice = 'Copyright © 2017-2021 <a href=\"https://www.bentley.com\" target=\"_blank\" rel=\"noopener noreferrer\">Bentley Systems, Inc.</a>';\r\n\r\nimport { TelemetryManager } from \"@itwin/core-telemetry\";\r\nimport { UiAdmin } from \"@itwin/appui-abstract\";\r\nimport { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, Guid, GuidString, Logger } from \"@itwin/core-bentley\";\r\nimport {\r\n AuthorizationClient, IModelStatus, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity,\r\n} from \"@itwin/core-common\";\r\nimport { ITwinLocalization } from \"@itwin/core-i18n\";\r\nimport { queryRenderCompatibility, WebGLRenderCompatibilityInfo } from \"@itwin/webgl-compatibility\";\r\nimport { AccuDraw } from \"./AccuDraw\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport * as auxCoordState from \"./AuxCoordSys\";\r\nimport * as categorySelectorState from \"./CategorySelectorState\";\r\nimport * as displayStyleState from \"./DisplayStyleState\";\r\nimport * as drawingViewState from \"./DrawingViewState\";\r\nimport { ElementLocateManager } from \"./ElementLocateManager\";\r\nimport { EntityState } from \"./EntityState\";\r\nimport { FrontendHubAccess } from \"./FrontendHubAccess\";\r\nimport { FrontendLoggerCategory } from \"./FrontendLoggerCategory\";\r\nimport * as modelselector from \"./ModelSelectorState\";\r\nimport * as modelState from \"./ModelState\";\r\nimport { NotificationManager } from \"./NotificationManager\";\r\nimport { QuantityFormatter } from \"./quantity-formatting/QuantityFormatter\";\r\nimport { RenderSystem } from \"./render/RenderSystem\";\r\nimport { System } from \"./render/webgl/System\";\r\nimport * as sheetState from \"./SheetViewState\";\r\nimport * as spatialViewState from \"./SpatialViewState\";\r\nimport { TentativePoint } from \"./TentativePoint\";\r\nimport { MapLayerFormatRegistry, MapLayerOptions, TileAdmin } from \"./tile/internal\";\r\nimport * as accudrawTool from \"./tools/AccuDrawTool\";\r\nimport * as clipViewTool from \"./tools/ClipViewTool\";\r\nimport * as idleTool from \"./tools/IdleTool\";\r\nimport * as measureTool from \"./tools/MeasureTool\";\r\nimport * as selectTool from \"./tools/SelectTool\";\r\nimport { ToolRegistry } from \"./tools/Tool\";\r\nimport { ToolAdmin } from \"./tools/ToolAdmin\";\r\nimport * as viewTool from \"./tools/ViewTool\";\r\nimport { UserPreferencesAccess } from \"./UserPreferences\";\r\nimport { ViewManager } from \"./ViewManager\";\r\nimport * as viewState from \"./ViewState\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-var-requires\r\nrequire(\"./IModeljs-css\");\r\n\r\n// cSpell:ignore noopener noreferrer gprid forin nbsp csrf xsrf\r\n\r\n/** Options that can be supplied with [[IModelAppOptions]] to customize frontend security.\r\n * @public\r\n */\r\nexport interface FrontendSecurityOptions {\r\n /** Configures protection from Cross Site Request Forgery attacks. */\r\n readonly csrfProtection?: {\r\n /** If enabled, IModelApp will extract the CSRF token for the current session from the document's cookies and send it with each request as a header value. */\r\n readonly enabled: boolean;\r\n /** Defaults to XSRF-TOKEN. */\r\n readonly cookieName?: string;\r\n /** Defaults to X-XSRF-TOKEN. */\r\n readonly headerName?: string;\r\n };\r\n}\r\n\r\n/** Options that can be supplied to [[IModelApp.startup]] to customize frontend behavior.\r\n * @public\r\n */\r\nexport interface IModelAppOptions {\r\n /** If present, supplies the [[IModelClient]] for this session. */\r\n hubAccess?: FrontendHubAccess;\r\n /** If present, supplies the Id of this application. Applications must set this to the Bentley Global Product Registry Id (GPRID) for usage logging. */\r\n applicationId?: string;\r\n /** If present, supplies the version of this application. Must be set for usage logging. */\r\n applicationVersion?: string;\r\n /** If present, supplies the [[UserPreferencesAccess]] for this session.\r\n * @beta\r\n */\r\n userPreferences?: UserPreferencesAccess;\r\n /** If present, supplies the [[ViewManager]] for this session. */\r\n viewManager?: ViewManager;\r\n /** If present, supplies Map Layer Options for this session such as Azure Access Keys\r\n * @beta\r\n */\r\n mapLayerOptions?: MapLayerOptions;\r\n /** If present, supplies the properties with which to initialize the [[TileAdmin]] for this session. */\r\n tileAdmin?: TileAdmin.Props;\r\n /** If present, supplies the [[NotificationManager]] for this session. */\r\n notifications?: NotificationManager;\r\n /** If present, supplies the [[ToolAdmin]] for this session. */\r\n toolAdmin?: ToolAdmin;\r\n /** If present, supplies the [[AccuDraw]] for this session.\r\n * @internal\r\n */\r\n accuDraw?: AccuDraw;\r\n /** If present, supplies the [[AccuSnap]] for this session. */\r\n accuSnap?: AccuSnap;\r\n /** If present, supplies the [[Localization]] for this session. Defaults to [ITwinLocalization]($i18n). */\r\n localization?: Localization;\r\n /** If present, supplies the authorization information for various frontend APIs */\r\n authorizationClient?: AuthorizationClient;\r\n /** If present, supplies security options for the frontend. */\r\n security?: FrontendSecurityOptions;\r\n /** @internal */\r\n sessionId?: GuidString;\r\n /** @internal */\r\n locateManager?: ElementLocateManager;\r\n /** @internal */\r\n tentativePoint?: TentativePoint;\r\n /** @internal */\r\n quantityFormatter?: QuantityFormatter;\r\n /** If present, supplies an implementation of the render system, or options for initializing the default render system. */\r\n renderSys?: RenderSystem | RenderSystem.Options;\r\n /** If present, supplies the [[UiAdmin]] for this session. */\r\n uiAdmin?: UiAdmin;\r\n rpcInterfaces?: RpcInterfaceDefinition[];\r\n /** @beta */\r\n realityDataAccess?: RealityDataAccess;\r\n /** If present, overrides where public assets are fetched. The default is to fetch assets relative to the current URL.\r\n * The path should always end with a trailing `/`.\r\n * @beta\r\n */\r\n publicPath?: string;\r\n}\r\n\r\n/** Options for [[IModelApp.makeModalDiv]]\r\n * @internal\r\n */\r\nexport interface ModalOptions {\r\n /** Width for the Modal dialog box. */\r\n width?: number;\r\n /** The dialog should be dismissed if the user clicks anywhere or hits Enter or Escape on the keyboard. */\r\n autoClose?: boolean;\r\n /** Show an 'x' in the upper right corner to close the dialog */\r\n closeBox?: boolean;\r\n /** The parent for the semi transparent *darkening* div. If not present, use `document.body` */\r\n rootDiv?: HTMLElement;\r\n}\r\n\r\n/** Return type for [[IModelApp.makeModalDiv]]\r\n * @internal\r\n */\r\nexport interface ModalReturn {\r\n /** The modal HTMLDivElement created. */\r\n modal: HTMLDivElement;\r\n /** A function that can be set as an event handler to stop the modal dialog. This can be used if `autoClose` or `closeBox` are not enabled. */\r\n stop: (_ev: Event) => void;\r\n}\r\n\r\n/** We hang the IModelApp object off the global `window` object in IModelApp.startup for debugging purposes.\r\n * It's removed in IModelApp.shutdown.\r\n */\r\ninterface IModelAppForDebugger {\r\n iModelAppForDebugger?: typeof IModelApp;\r\n}\r\n\r\n/**\r\n * Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All\r\n * members of IModelApp are static, and it serves as a singleton object for gaining access to session information.\r\n *\r\n * Before any interactive operations may be performed by the `@itwin/core-frontend package`, [[IModelApp.startup]] must be called and awaited.\r\n * Applications may customize the frontend behavior of iTwin.js by supplying options to [[IModelApp.startup]].\r\n *\r\n * @public\r\n */\r\nexport class IModelApp {\r\n private static _initialized = false;\r\n private static _accuDraw: AccuDraw;\r\n private static _accuSnap: AccuSnap;\r\n private static _applicationId: string;\r\n private static _applicationVersion: string;\r\n private static _localization: Localization;\r\n private static _locateManager: ElementLocateManager;\r\n private static _notifications: NotificationManager;\r\n private static _quantityFormatter: QuantityFormatter;\r\n private static _renderSystem?: RenderSystem;\r\n private static _userPreferences?: UserPreferencesAccess;\r\n private static _tentativePoint: TentativePoint;\r\n private static _tileAdmin: TileAdmin;\r\n private static _toolAdmin: ToolAdmin;\r\n private static _viewManager: ViewManager;\r\n private static _uiAdmin: UiAdmin;\r\n private static _wantEventLoop = false;\r\n private static _animationRequested = false;\r\n private static _animationInterval: BeDuration | undefined = BeDuration.fromSeconds(1);\r\n private static _animationIntervalId?: number;\r\n private static _securityOptions: FrontendSecurityOptions;\r\n private static _mapLayerFormatRegistry: MapLayerFormatRegistry;\r\n private static _hubAccess?: FrontendHubAccess;\r\n private static _realityDataAccess?: RealityDataAccess;\r\n private static _publicPath: string;\r\n\r\n // No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.\r\n protected constructor() { }\r\n\r\n /** Event raised just before the frontend IModelApp is to be shut down */\r\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\r\n\r\n /** Provides authorization information for various frontend APIs */\r\n public static authorizationClient?: AuthorizationClient;\r\n /** The [[ToolRegistry]] for this session. */\r\n public static readonly tools = new ToolRegistry();\r\n /** A uniqueId for this session */\r\n public static sessionId: GuidString;\r\n /** The [[MapLayerProviderRegistry]] for this session.\r\n * @internal\r\n */\r\n public static get mapLayerFormatRegistry(): MapLayerFormatRegistry { return this._mapLayerFormatRegistry; }\r\n /** The [[RenderSystem]] for this session. */\r\n public static get renderSystem(): RenderSystem { return this._renderSystem!; }\r\n /** The [[ViewManager]] for this session. */\r\n public static get viewManager(): ViewManager { return this._viewManager; }\r\n\r\n /** The [[NotificationManager]] for this session. */\r\n public static get notifications(): NotificationManager { return this._notifications; }\r\n /** The [[TileAdmin]] for this session. */\r\n public static get tileAdmin(): TileAdmin { return this._tileAdmin; }\r\n /** The [[QuantityFormatter]] for this session.\r\n * @alpha\r\n */\r\n public static get quantityFormatter(): QuantityFormatter { return this._quantityFormatter; }\r\n /** The [[ToolAdmin]] for this session. */\r\n public static get toolAdmin(): ToolAdmin { return this._toolAdmin; }\r\n /** The [[AccuDraw]] for this session.\r\n * @internal\r\n */\r\n public static get accuDraw(): AccuDraw { return this._accuDraw; }\r\n /** The [[AccuSnap]] for this session. */\r\n public static get accuSnap(): AccuSnap { return this._accuSnap; }\r\n /** @internal */\r\n public static get locateManager(): ElementLocateManager { return this._locateManager; }\r\n /** @internal */\r\n public static get tentativePoint(): TentativePoint { return this._tentativePoint; }\r\n /** The [[Localization]] for this session. */\r\n public static get localization(): Localization { return this._localization; }\r\n /** The [[UserPreferencesAccess]] for this session.\r\n * @beta\r\n */\r\n public static get userPreferences(): UserPreferencesAccess | undefined { return this._userPreferences; }\r\n /** The Id of this application. Applications must set this to the Global Product Registry ID (GPRID) for usage logging. */\r\n public static get applicationId(): string { return this._applicationId; }\r\n /** The version of this application. Must be set for usage logging. */\r\n public static get applicationVersion(): string { return this._applicationVersion; }\r\n /** @internal */\r\n public static get initialized() { return this._initialized; }\r\n\r\n /** Provides access to the IModelHub implementation for this IModelApp.\r\n * @internal\r\n */\r\n public static get hubAccess(): FrontendHubAccess | undefined { return this._hubAccess; }\r\n /** Provides access to the RealityData service implementation for this IModelApp\r\n * @beta\r\n */\r\n public static get realityDataAccess(): RealityDataAccess | undefined { return this._realityDataAccess; }\r\n\r\n /** @internal */\r\n public static get hasRenderSystem() { return this._renderSystem !== undefined && this._renderSystem.isValid; }\r\n /** The [[UiAdmin]] for this session. */\r\n public static get uiAdmin() { return this._uiAdmin; }\r\n /** The requested security options for the frontend. */\r\n public static get securityOptions() { return this._securityOptions; }\r\n /** The root URL for the assets 'public' folder.\r\n * @beta\r\n */\r\n public static get publicPath() { return this._publicPath; }\r\n /** The [[TelemetryManager]] for this session\r\n * @internal\r\n */\r\n public static readonly telemetry: TelemetryManager = new TelemetryManager();\r\n\r\n /** Map of classFullName to EntityState class */\r\n private static _entityClasses = new Map<string, typeof EntityState>();\r\n\r\n /** Register all of the subclasses of EntityState from a module.\r\n * @internal\r\n */\r\n public static registerModuleEntities(moduleObj: any) {\r\n for (const thisMember in moduleObj) { // eslint-disable-line guard-for-in\r\n const thisEntityState = moduleObj[thisMember];\r\n if (thisEntityState.prototype instanceof EntityState) {\r\n this.registerEntityState(thisEntityState.classFullName, thisEntityState);\r\n }\r\n }\r\n }\r\n\r\n /** Register an EntityState class by its classFullName\r\n * @internal\r\n */\r\n public static registerEntityState(classFullName: string, classType: typeof EntityState) {\r\n const lowerName = classFullName.toLowerCase();\r\n if (this._entityClasses.has(lowerName)) {\r\n const errMsg = `Class ${classFullName} is already registered. Make sure static schemaName and className members are correct on class ${classType.name}`;\r\n Logger.logError(FrontendLoggerCategory.IModelConnection, errMsg);\r\n throw new Error(errMsg);\r\n }\r\n\r\n this._entityClasses.set(lowerName, classType);\r\n }\r\n\r\n /** @internal */\r\n public static lookupEntityClass(classFullName: string) { return this._entityClasses.get(classFullName.toLowerCase()); }\r\n\r\n /**\r\n * Obtain WebGL rendering compatibility information for the client system. This information describes whether the client meets the\r\n * minimum rendering capabilities. It also describes whether the system lacks any optional capabilities that could improve quality\r\n * and/or performance.\r\n */\r\n public static queryRenderCompatibility(): WebGLRenderCompatibilityInfo {\r\n if (undefined === System.instance || undefined === System.instance.options.useWebGL2)\r\n return queryRenderCompatibility(true, System.createContext);\r\n else\r\n return queryRenderCompatibility(System.instance.options.useWebGL2, System.createContext);\r\n }\r\n\r\n /**\r\n * This method must be called before any other `@itwin/core-frontend` methods are used.\r\n * Somewhere in your startup code, call [[IModelApp.startup]]. E.g.:\r\n * ``` ts\r\n * await IModelApp.startup( {applicationId: myAppId} );\r\n * ```\r\n * @param opts The options for configuring IModelApp\r\n */\r\n public static async startup(opts?: IModelAppOptions): Promise<void> {\r\n if (this._initialized)\r\n return; // we're already initialized, do nothing.\r\n this._initialized = true;\r\n\r\n opts = opts ?? {};\r\n this._securityOptions = opts.security ?? {};\r\n\r\n // Make IModelApp globally accessible for debugging purposes. We'll remove it on shutdown.\r\n (window as IModelAppForDebugger).iModelAppForDebugger = this;\r\n\r\n this.sessionId = opts.sessionId ?? Guid.createValue();\r\n this._applicationId = opts.applicationId ?? \"2686\"; // Default to product id of iTwin.js\r\n this._applicationVersion = opts.applicationVersion ?? \"1.0.0\";\r\n this.authorizationClient = opts.authorizationClient;\r\n this._hubAccess = opts.hubAccess;\r\n\r\n this._setupRpcRequestContext();\r\n\r\n this._localization = opts.localization ?? new ITwinLocalization();\r\n const toolsNs = \"CoreTools\";\r\n await this.localization.initialize([\"iModelJs\", toolsNs]);\r\n [\r\n selectTool,\r\n idleTool,\r\n viewTool,\r\n clipViewTool,\r\n measureTool,\r\n accudrawTool,\r\n ].forEach((tool) => this.tools.registerModule(tool, toolsNs));\r\n\r\n this.registerEntityState(EntityState.classFullName, EntityState);\r\n [\r\n modelState,\r\n sheetState,\r\n viewState,\r\n drawingViewState,\r\n spatialViewState,\r\n displayStyleState,\r\n modelselector,\r\n categorySelectorState,\r\n auxCoordState,\r\n ].forEach((module) => this.registerModuleEntities(module));\r\n\r\n this._renderSystem = (opts.renderSys instanceof RenderSystem) ? opts.renderSys : this.createRenderSys(opts.renderSys);\r\n if (opts.userPreferences)\r\n this._userPreferences = opts.userPreferences;\r\n this._viewManager = opts.viewManager ?? new ViewManager();\r\n this._tileAdmin = await TileAdmin.create(opts.tileAdmin);\r\n this._notifications = opts.notifications ?? new NotificationManager();\r\n this._toolAdmin = opts.toolAdmin ?? new ToolAdmin();\r\n this._accuDraw = opts.accuDraw ?? new AccuDraw();\r\n this._accuSnap = opts.accuSnap ?? new AccuSnap();\r\n this._locateManager = opts.locateManager ?? new ElementLocateManager();\r\n this._tentativePoint = opts.tentativePoint ?? new TentativePoint();\r\n this._quantityFormatter = opts.quantityFormatter ?? new QuantityFormatter();\r\n this._uiAdmin = opts.uiAdmin ?? new UiAdmin();\r\n this._mapLayerFormatRegistry = new MapLayerFormatRegistry(opts.mapLayerOptions);\r\n this._realityDataAccess = opts.realityDataAccess;\r\n this._publicPath = opts.publicPath ?? \"\";\r\n\r\n [\r\n this.renderSystem,\r\n this.viewManager,\r\n this.toolAdmin,\r\n this.accuDraw,\r\n this.accuSnap,\r\n this.locateManager,\r\n this.tentativePoint,\r\n this.uiAdmin,\r\n ].forEach((sys) => sys.onInitialized());\r\n\r\n return this.quantityFormatter.onInitialized();\r\n }\r\n\r\n /** Must be called before the application exits to release any held resources. */\r\n public static async shutdown() {\r\n if (!this._initialized)\r\n return;\r\n\r\n // notify listeners that this IModelApp is about to be shut down.\r\n this.onBeforeShutdown.raiseEvent();\r\n this.onBeforeShutdown.clear();\r\n\r\n (window as IModelAppForDebugger).iModelAppForDebugger = undefined;\r\n\r\n this._wantEventLoop = false;\r\n window.removeEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n this.clearIntervalAnimation();\r\n [this.toolAdmin, this.viewManager, this.tileAdmin].forEach((sys) => sys.onShutDown());\r\n this.tools.shutdown();\r\n this._renderSystem = dispose(this._renderSystem);\r\n this._entityClasses.clear();\r\n this.authorizationClient = undefined;\r\n this._initialized = false;\r\n }\r\n\r\n /** Controls how frequently the application polls for changes that may require a new animation frame to be requested.\r\n * Such changes include resizing a Viewport or changing the device pixel ratio by zooming in or out in the browser.\r\n * The default interval is 1 second. It may be desirable to override the default for specific apps and/or devices.\r\n * - Increasing the interval can conserve battery life on battery-powered devices at the expense of slower response to resize events.\r\n * - An application that only displays a single Viewport whose dimensions only change when the dimensions of the application window change, and which does not support changing application zoom level, could disable the interval altogether.\r\n * @param interval The interval at which to poll for changes. If undefined (or negative), the application will never poll. If zero, the application will poll as frequently as possible.\r\n * @beta\r\n */\r\n public static get animationInterval(): BeDuration | undefined { return IModelApp._animationInterval; }\r\n public static set animationInterval(interval: BeDuration | undefined) {\r\n if (undefined !== interval && interval.isTowardsPast)\r\n interval = undefined;\r\n\r\n if (interval !== IModelApp._animationInterval) {\r\n IModelApp._animationInterval = interval;\r\n if (IModelApp._wantEventLoop)\r\n IModelApp.requestIntervalAnimation();\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static requestNextAnimation() {\r\n if (!IModelApp._animationRequested) {\r\n IModelApp._animationRequested = true;\r\n requestAnimationFrame(IModelApp.eventLoop);\r\n }\r\n }\r\n\r\n /** @internal */\r\n private static clearIntervalAnimation(): void {\r\n if (undefined !== IModelApp._animationIntervalId) {\r\n window.clearInterval(IModelApp._animationIntervalId);\r\n IModelApp._animationIntervalId = undefined;\r\n }\r\n }\r\n\r\n /** @internal */\r\n private static requestIntervalAnimation(): void {\r\n IModelApp.clearIntervalAnimation();\r\n\r\n if (undefined !== IModelApp.animationInterval)\r\n IModelApp._animationIntervalId = window.setInterval(() => {\r\n IModelApp.requestNextAnimation();\r\n }, IModelApp.animationInterval.milliseconds);\r\n }\r\n\r\n /** @internal */\r\n public static startEventLoop() {\r\n if (!IModelApp._wantEventLoop) {\r\n IModelApp._wantEventLoop = true;\r\n window.addEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n IModelApp.requestIntervalAnimation();\r\n IModelApp.requestNextAnimation();\r\n }\r\n }\r\n\r\n /** Strictly for tests. @internal */\r\n public static stopEventLoop() {\r\n this._wantEventLoop = false;\r\n }\r\n\r\n /** The main event processing loop for Tools and rendering. */\r\n private static eventLoop() {\r\n IModelApp._animationRequested = false;\r\n if (!IModelApp._wantEventLoop) // flag turned on at startup\r\n return;\r\n\r\n try {\r\n IModelApp.toolAdmin.processEvent(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n IModelApp.viewManager.renderLoop();\r\n IModelApp.tileAdmin.process();\r\n } catch (exception) {\r\n ToolAdmin.exceptionHandler(exception); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n IModelApp._wantEventLoop = false;\r\n IModelApp._animationRequested = true; // unrecoverable after exception, don't request any further frames.\r\n window.removeEventListener(\"resize\", IModelApp.requestNextAnimation);\r\n }\r\n }\r\n\r\n /** Get the user's access token for this IModelApp, or a blank string if none is available.\r\n * @note accessTokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\r\n * returned by this method may change over time throughout the course of a session.\r\n */\r\n public static async getAccessToken(): Promise<AccessToken> {\r\n try {\r\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\r\n } catch (e) {\r\n return \"\";\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static createRenderSys(opts?: RenderSystem.Options): RenderSystem { return System.create(opts); }\r\n\r\n private static _setupRpcRequestContext() {\r\n RpcConfiguration.requestContext.getId = (_request: RpcRequest): string => {\r\n return Guid.createValue();\r\n };\r\n\r\n RpcConfiguration.requestContext.serialize = async (_request: RpcRequest): Promise<SerializedRpcActivity> => {\r\n const id = _request.id;\r\n const serialized: SerializedRpcActivity = {\r\n id,\r\n applicationId: this.applicationId,\r\n applicationVersion: this.applicationVersion,\r\n sessionId: this.sessionId,\r\n authorization: await this.getAccessToken(),\r\n };\r\n\r\n const csrf = IModelApp.securityOptions.csrfProtection;\r\n if (csrf && csrf.enabled) {\r\n const cookieName = csrf.cookieName || \"XSRF-TOKEN\";\r\n const cookieValue = document.cookie.split(\"; \").find((r) => r.startsWith(`${cookieName}=`));\r\n\r\n if (cookieValue) {\r\n const headerName = csrf.headerName || \"X-XSRF-TOKEN\";\r\n const headerValue = cookieValue.split(\"=\")[1];\r\n serialized.csrfToken = { headerName, headerValue };\r\n }\r\n }\r\n\r\n return serialized;\r\n };\r\n }\r\n\r\n /** Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText\r\n * @internal\r\n */\r\n public static makeHTMLElement<K extends keyof HTMLElementTagNameMap>(type: K, opt?: {\r\n /** The parent for the new HTMLElement */\r\n parent?: HTMLElement;\r\n /** The className for the new HTMLElement */\r\n className?: string;\r\n /** The Id for the new HTMLElement */\r\n id?: string;\r\n /** innerHTML for the new HTMLElement */\r\n innerHTML?: string;\r\n /** innerText for the new HTMLElement */\r\n innerText?: string;\r\n }) {\r\n const el = document.createElement(type);\r\n if (undefined !== opt) {\r\n if (undefined !== opt.className)\r\n el.className = opt.className;\r\n if (undefined !== opt.id)\r\n el.id = opt.id;\r\n if (undefined !== opt.innerHTML)\r\n el.innerHTML = opt.innerHTML;\r\n if (undefined !== opt.innerText)\r\n el.innerText = opt.innerText;\r\n if (undefined !== opt.parent)\r\n opt.parent.appendChild(el);\r\n }\r\n return el;\r\n }\r\n\r\n /** Make a modal dialog on top of the root of the application. The returned HTMLDivElement will be placed topmost, all other application\r\n * windows will be covered with a semi-transparent background that intercepts all key/mouse/touch events until the modal is dismissed.\r\n * @param options The options that describe how the modal should work.\r\n * @internal\r\n */\r\n public static makeModalDiv(options: ModalOptions): ModalReturn {\r\n const root = options.rootDiv ? options.rootDiv : document.body;\r\n // create the overlay div to \"black out\" the application to indicate everything is inactive until the modal has been dismissed.\r\n const overlay = IModelApp.makeHTMLElement(\"div\", { parent: root, className: \"imodeljs-modal-overlay\" });\r\n overlay.tabIndex = -1; // so we can catch keystroke events\r\n\r\n // function to remove modal dialog\r\n const stop = (ev: Event) => { root.removeChild(overlay); ev.stopPropagation(); };\r\n\r\n if (options.autoClose) {\r\n overlay.onclick = overlay.oncontextmenu = stop;\r\n overlay.onkeydown = overlay.onkeyup = (ev: KeyboardEvent) => { // ignore all keystrokes other than enter and escape\r\n switch (ev.key) {\r\n case \"Enter\":\r\n case \"Escape\":\r\n stop(ev);\r\n return;\r\n }\r\n ev.stopPropagation();\r\n };\r\n overlay.focus();\r\n }\r\n\r\n const modal = IModelApp.makeHTMLElement(\"div\", { parent: overlay, className: \"imodeljs-modal\" });\r\n if (undefined !== options.width) {\r\n modal.style.width = `${options.width}px`;\r\n // allow the dialog to be smaller than the width\r\n modal.style.maxWidth = `min(100% - (2 * var(--width-border)), ${options.width}px)`;\r\n }\r\n if (options.closeBox) {\r\n const close = IModelApp.makeHTMLElement(\"p\", { parent: modal, className: \"imodeljs-modal-close\" });\r\n close.innerText = \"\\u00d7\"; // unicode \"times\" symbol\r\n close.onclick = stop;\r\n }\r\n\r\n return { modal, stop };\r\n }\r\n\r\n /** Applications may implement this method to supply a Logo Card.\r\n * @beta\r\n */\r\n public static applicationLogoCard?: () => HTMLTableRowElement;\r\n\r\n /** Make a new Logo Card. Call this method from your implementation of [[IModelApp.applicationLogoCard]]\r\n * @param opts Options for Logo Card\r\n * @beta\r\n */\r\n public static makeLogoCard(\r\n opts: {\r\n /** The heading to be put at the top of this logo card inside an <h2>. May include HTML. */\r\n heading: string | HTMLElement;\r\n /** The URL or HTMLImageElement for the icon on this logo card. */\r\n iconSrc?: string | HTMLImageElement;\r\n /** The width of the icon, if `iconSrc` is a string. Default is 64. */\r\n iconWidth?: number;\r\n /** A *notice* string to be shown on the logo card. May include HTML. */\r\n notice?: string | HTMLElement;\r\n }): HTMLTableRowElement {\r\n const card = IModelApp.makeHTMLElement(\"tr\");\r\n const iconCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-logo\" });\r\n if (undefined !== opts.iconSrc) {\r\n if (typeof opts.iconSrc === \"string\") {\r\n const logo = IModelApp.makeHTMLElement(\"img\");\r\n logo.src = opts.iconSrc;\r\n logo.width = opts.iconWidth ? opts.iconWidth : 64;\r\n opts.iconSrc = logo;\r\n }\r\n iconCell.appendChild(opts.iconSrc);\r\n }\r\n const noticeCell = IModelApp.makeHTMLElement(\"td\", { parent: card, className: \"logo-card-message\" });\r\n if (undefined !== opts.heading) {\r\n if (typeof opts.heading === \"string\")\r\n IModelApp.makeHTMLElement(\"h2\", { parent: noticeCell, innerHTML: opts.heading, className: \"logo-card-header\" });\r\n else\r\n noticeCell.appendChild(opts.heading);\r\n }\r\n if (undefined !== opts.notice) {\r\n if (typeof opts.notice === \"string\")\r\n IModelApp.makeHTMLElement(\"p\", { parent: noticeCell, innerHTML: opts.notice, className: \"logo-cards\" });\r\n else\r\n noticeCell.appendChild(opts.notice);\r\n }\r\n return card;\r\n }\r\n\r\n /** Make the logo card for the library itself. This card gets placed at the top of the stack.\r\n * @internal\r\n */\r\n public static makeIModelJsLogoCard() {\r\n return this.makeLogoCard({\r\n iconSrc: `${this.publicPath}images/about-imodeljs.svg`,\r\n heading: `<span style=\"font-weight:normal\">${this.localization.getLocalizedString(\"Notices.PoweredBy\")}</span>&nbsp;iTwin.js`,\r\n notice: `${require(\"../../package.json\").version}<br>${copyrightNotice}`, // eslint-disable-line @typescript-eslint/no-var-requires\r\n });\r\n }\r\n\r\n /** Format the tooltip strings returned by [[IModelConnection.getToolTipMessage]].\r\n * @alpha\r\n */\r\n public static formatElementToolTip(msg: string[]): HTMLElement {\r\n let out = \"\";\r\n msg.forEach((line) => out += `${IModelApp.localization?.getLocalizedKeys(line)}<br>`);\r\n const div = document.createElement(\"div\");\r\n div.innerHTML = out;\r\n return div;\r\n }\r\n\r\n /** Localize an error status\r\n * @param status one of the status values from [BentleyStatus]($core-bentley), [IModelStatus]($core-bentley) or [DbResult]($core-bentley)\r\n * @returns a localized error message\r\n * @beta\r\n */\r\n public static translateStatus(status: number) {\r\n let key: { scope: string, val: string, status?: string };\r\n if (typeof status !== \"number\") {\r\n key = { scope: \"Errors\", val: \"IllegalValue\" };\r\n } else {\r\n key = { scope: \"BentleyStatus\", val: BentleyStatus[status] };\r\n if (!key.val)\r\n key = { scope: \"IModelStatus\", val: IModelStatus[status] };\r\n if (!key.val)\r\n key = { scope: \"DbResult\", val: DbResult[status] };\r\n if (!key.val)\r\n key = { scope: \"Errors\", val: \"Status\", status: status.toString() };\r\n }\r\n\r\n return this.localization.getLocalizedString(`${key.scope}.${key.val}`, key);\r\n }\r\n}\r\n"]}
@@ -7,7 +7,7 @@ import { HitDetail } from "./HitDetail";
7
7
  import { IModelConnection } from "./IModelConnection";
8
8
  import { BeButtonEvent, EventHandled } from "./tools/Tool";
9
9
  import { ScreenViewport, ViewportDecorator } from "./Viewport";
10
- /** Interface for drawing [[Decorations]] into, or on top of, the active [[ScreenViewport]]s managed by [[ViewManager]].
10
+ /** Interface for drawing [decoration graphics]($docs/learning/frontend/ViewDecorations.md) into, or on top of, the active [[ScreenViewport]]s managed by [[ViewManager]].
11
11
  * Decorators generate [[Decorations]].
12
12
  * @public
13
13
  */
@@ -259,11 +259,11 @@ export declare class ViewManager implements Iterable<ScreenViewport> {
259
259
  * @internal
260
260
  */
261
261
  refreshForModifiedModels(modelIds: Id64Arg | undefined): void;
262
- /** The number of [antialiasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing) samples to be used when rendering the contents of all viewports
263
- * registered with the ViewManager.
264
- * Must be an integer greater than zero. A value of 1 means antialiasing is disabled. A higher number of samples correlates generally to a higher quality image but
265
- * is also more demanding on the graphics hardware.
266
- * This setting will also be applied to subsequently-registered viewports.
262
+ /** Sets the number of [MSAA]($docs/learning/display/MSAA.md) samples for all currently- and subsequently-opened [[ScreenViewport]]s.
263
+ * @param numSamples The number of samples as a power of two. Values of 1 or less indicates anti-aliasing should be disabled. Non-power-of-two values are rounded
264
+ * down to the nearest power of two. The maximum number of samples supported depends upon the client's graphics hardware capabilities. Higher values produce
265
+ * a higher-quality image but also may also reduce framerate.
266
+ * @see [[Viewport.antialiasSamples]] to adjust the number of samples for a specific viewport.
267
267
  */
268
268
  setAntialiasingAllViews(numSamples: number): void;
269
269
  }
@@ -442,11 +442,11 @@ class ViewManager {
442
442
  for (const vp of this._viewports)
443
443
  vp.refreshForModifiedModels(modelIds);
444
444
  }
445
- /** The number of [antialiasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing) samples to be used when rendering the contents of all viewports
446
- * registered with the ViewManager.
447
- * Must be an integer greater than zero. A value of 1 means antialiasing is disabled. A higher number of samples correlates generally to a higher quality image but
448
- * is also more demanding on the graphics hardware.
449
- * This setting will also be applied to subsequently-registered viewports.
445
+ /** Sets the number of [MSAA]($docs/learning/display/MSAA.md) samples for all currently- and subsequently-opened [[ScreenViewport]]s.
446
+ * @param numSamples The number of samples as a power of two. Values of 1 or less indicates anti-aliasing should be disabled. Non-power-of-two values are rounded
447
+ * down to the nearest power of two. The maximum number of samples supported depends upon the client's graphics hardware capabilities. Higher values produce
448
+ * a higher-quality image but also may also reduce framerate.
449
+ * @see [[Viewport.antialiasSamples]] to adjust the number of samples for a specific viewport.
450
450
  */
451
451
  setAntialiasingAllViews(numSamples) {
452
452
  for (const vp of this)
@@ -1 +1 @@
1
- {"version":3,"file":"ViewManager.js","sourceRoot":"","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,CAAC;QAEnC,eAAM,CAAC,QAAQ,CAAC,gBAAgB,GAAG,UAAU,CAAC;IAChD,CAAC;CACF;AA/fD,kCA+fC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\nimport { BeEvent, BentleyStatus, BeTimePoint, BeUiEvent, Id64Arg } from \"@itwin/core-bentley\";\r\nimport { GeometryStreamProps } from \"@itwin/core-common\";\r\nimport { HitDetail } from \"./HitDetail\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { IModelConnection } from \"./IModelConnection\";\r\nimport { DisclosedTileTreeSet, TileTree } from \"./tile/internal\";\r\nimport { EventController } from \"./tools/EventController\";\r\nimport { BeButtonEvent, EventHandled } from \"./tools/Tool\";\r\nimport { ScreenViewport, ViewportDecorator } from \"./Viewport\";\r\nimport { System } from \"./render/webgl/System\";\r\n\r\n/** Interface for drawing [[Decorations]] into, or on top of, the active [[ScreenViewport]]s managed by [[ViewManager]].\r\n * Decorators generate [[Decorations]].\r\n * @public\r\n */\r\nexport interface Decorator extends ViewportDecorator {\r\n /** If the [[decorate]] method created pickable graphics, return true if the supplied Id is from this Decorator.\r\n * @param id The Id of the currently selected pickable graphics.\r\n * @returns true if 'id' belongs to this Decorator\r\n */\r\n testDecorationHit?(id: string): boolean;\r\n\r\n /** If the [[decorate]] method created pickable graphics using a persistent element id instead of a transient id,\r\n * return true if the Decorator wants the opportunity to override the default persistent element behavior for\r\n * the supplied [[HitDetail]].\r\n * - Replace or augment the element's tooltip by implementing [[getDecorationToolTip]].\r\n * - Override the element's snap geometry by implementing [[getDecorationGeometry]].\r\n * - Handle button events as decorator events by implementing [[onDecorationButtonEvent]].\r\n * @param hit The HitDetail of the currently selected persistent element or pickable graphics using a persistent element id.\r\n * @returns true if this Decorator wants to override the default persistent element behavior.\r\n */\r\n overrideElementHit?(hit: HitDetail): boolean;\r\n\r\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to return the tooltip message for this Decorator.\r\n * @param hit The HitDetail about the decoration that was picked.\r\n * @returns A promise with the HTMLElement or string (that may contain HTML) with the tooltip message.\r\n */\r\n getDecorationToolTip?(hit: HitDetail): Promise<HTMLElement | string>;\r\n\r\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to handle a button event for this Decorator.\r\n * @param hit The HitDetail about the decoration that was picked.\r\n * @param ev The BeButtonEvent that identified this decoration.\r\n * @returns A Promise that resolves to Yes if event completely handled by decoration and event should not be processed by the calling tool.\r\n */\r\n onDecorationButtonEvent?(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled>;\r\n\r\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to return the snappable geometry for this Decorator. Geometry that changes with every cursor motion isn't valid for snapping.\r\n * An example would be an InteractiveTool for placing a linestring. It might wish to allow snapping to accepted segments, the segment from the last accepted point to the current cursor position would not be included\r\n * as snappable geometry and would just be displayed in dynamics.\r\n * @param hit The HitDetail about the decoration that was picked.\r\n * @returns GeometryStreamProps containing world coordinate snappable geometry for this decoration.\r\n */\r\n getDecorationGeometry?(hit: HitDetail): GeometryStreamProps | undefined;\r\n}\r\n\r\n/** Argument for [[ViewManager.onSelectedViewportChanged]]\r\n * @public\r\n */\r\nexport interface SelectedViewportChangedArgs {\r\n current?: ScreenViewport;\r\n previous?: ScreenViewport;\r\n}\r\n\r\n/** An object which customizes the locate tooltip.\r\n * @internal\r\n */\r\nexport interface ToolTipProvider {\r\n /** Augment or replace tooltip for the specified HitDetail.\r\n * To cooperate with other tooltip providers, replacing the input tooltip instead of appending information is discouraged.\r\n */\r\n augmentToolTip(hit: HitDetail, tooltip: Promise<HTMLElement | string>): Promise<HTMLElement | string>;\r\n}\r\n\r\n/** The ViewManager holds the list of opened views, plus the *selected view*. It also provides notifications of view open/close and suspend/resume.\r\n * Applications must call [[addViewport]] when new Viewports that should be associated with user events are created.\r\n *\r\n * A single ViewManager is created when [[IModelApp.startup]] is called. It can be accessed via the static member [[IModelApp.viewManager]].\r\n *\r\n * The ViewManager controls the render loop, which causes the contents of each registered [[Viewport]] to update on the screen.\r\n * @public\r\n */\r\nexport class ViewManager implements Iterable<ScreenViewport> {\r\n public inDynamicsMode = false;\r\n public cursor = \"default\";\r\n private readonly _viewports: ScreenViewport[] = [];\r\n public readonly decorators: Decorator[] = [];\r\n private _selectedView?: ScreenViewport;\r\n private _invalidateScenes = false;\r\n private _skipSceneCreation = false;\r\n private _doIdleWork = false;\r\n private _idleWorkTimer?: any;\r\n\r\n /** @internal */\r\n public readonly toolTipProviders: ToolTipProvider[] = [];\r\n\r\n private _beginIdleWork() {\r\n const idleWork = () => {\r\n if (undefined === this._idleWorkTimer)\r\n return;\r\n if (this._viewports.length > 0) {\r\n this._idleWorkTimer = undefined;\r\n return;\r\n }\r\n if (IModelApp.renderSystem.doIdleWork())\r\n this._idleWorkTimer = setTimeout(idleWork, 1);\r\n else\r\n this._idleWorkTimer = undefined;\r\n };\r\n\r\n if (undefined === this._idleWorkTimer)\r\n this._idleWorkTimer = setTimeout(idleWork, 1);\r\n }\r\n\r\n /** @internal */\r\n public onInitialized() {\r\n this.addDecorator(IModelApp.accuSnap);\r\n this.addDecorator(IModelApp.tentativePoint);\r\n this.addDecorator(IModelApp.accuDraw);\r\n this.addDecorator(IModelApp.toolAdmin);\r\n this.cursor = \"default\";\r\n\r\n const options = IModelApp.renderSystem.options;\r\n this._doIdleWork = true === options.doIdleWork;\r\n if (this._doIdleWork)\r\n this._beginIdleWork();\r\n }\r\n\r\n /** @internal */\r\n public onShutDown() {\r\n if (undefined !== this._idleWorkTimer) {\r\n clearTimeout(this._idleWorkTimer);\r\n this._idleWorkTimer = undefined;\r\n }\r\n this._viewports.length = 0;\r\n this.decorators.length = 0;\r\n this.toolTipProviders.length = 0;\r\n this._selectedView = undefined;\r\n }\r\n\r\n /** Called after the selected view changes.\r\n * @param old Previously selected viewport.\r\n * @param current Currently selected viewport.\r\n */\r\n public readonly onSelectedViewportChanged = new BeUiEvent<SelectedViewportChangedArgs>();\r\n\r\n /** Called after a view is opened. This can happen when the iModel is first opened or when a user opens a new view. */\r\n public readonly onViewOpen = new BeUiEvent<ScreenViewport>();\r\n\r\n /** Called after a view is closed. This can happen when the iModel is closed or when a user closes an open view. */\r\n public readonly onViewClose = new BeUiEvent<ScreenViewport>();\r\n\r\n /** Called after a view is suspended. This happens when the application is minimized or, on a tablet, when the application\r\n * is moved to the background.\r\n */\r\n public readonly onViewSuspend = new BeUiEvent<ScreenViewport>();\r\n\r\n /** Called after a suspended view is resumed. This can happen when a minimized application is restored\r\n * or, on a tablet, when the application is moved to the foreground.\r\n */\r\n public readonly onViewResume = new BeUiEvent<ScreenViewport>();\r\n\r\n /** Called at the beginning of each tick of the render loop, before any viewports have been updated.\r\n * The render loop is typically invoked by a requestAnimationFrame() callback. It will not be invoked if the ViewManager is tracking no viewports.\r\n * @note Due to the frequency of this event, avoid performing expensive work inside event listeners.\r\n * @see [[ViewManager.onFinishRender]]\r\n */\r\n public readonly onBeginRender = new BeEvent<() => void>();\r\n\r\n /** Called at the end of each tick of the render loop, after all viewports have been updated.\r\n * The render loop is typically invoked by a requestAnimationFrame() callback. It will not be invoked if the ViewManager is tracking no viewports.\r\n * @note Due to the frequency of this event, avoid performing expensive work inside event listeners.\r\n * @see [[ViewManager.onBeginRender]]\r\n */\r\n public readonly onFinishRender = new BeEvent<() => void>();\r\n\r\n /** @internal */\r\n public endDynamicsMode(): void {\r\n if (!this.inDynamicsMode)\r\n return;\r\n\r\n this.inDynamicsMode = false;\r\n\r\n const cursorVp = IModelApp.toolAdmin.cursorView;\r\n if (cursorVp)\r\n cursorVp.changeDynamics(undefined);\r\n\r\n for (const vp of this._viewports) {\r\n if (vp !== cursorVp)\r\n vp.changeDynamics(undefined);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public beginDynamicsMode() { this.inDynamicsMode = true; }\r\n\r\n /** @internal */\r\n public get doesHostHaveFocus(): boolean { return document.hasFocus(); }\r\n\r\n /** Set the selected [[Viewport]] to undefined. */\r\n public clearSelectedView(): void {\r\n const previousVp = this.selectedView;\r\n this._selectedView = undefined;\r\n this.notifySelectedViewportChanged(previousVp, undefined);\r\n }\r\n\r\n /** Sets the selected [[Viewport]]. */\r\n public async setSelectedView(vp: ScreenViewport | undefined): Promise<BentleyStatus> {\r\n if (undefined === vp)\r\n vp = this.getFirstOpenView();\r\n\r\n if (vp === this.selectedView) // already the selected view\r\n return BentleyStatus.SUCCESS;\r\n\r\n if (undefined === vp) {\r\n this.clearSelectedView();\r\n return BentleyStatus.ERROR;\r\n }\r\n\r\n const previousVp = this.selectedView;\r\n this._selectedView = vp;\r\n\r\n this.notifySelectedViewportChanged(previousVp, vp);\r\n\r\n if (undefined === previousVp)\r\n await IModelApp.toolAdmin.startDefaultTool();\r\n\r\n return BentleyStatus.SUCCESS;\r\n }\r\n\r\n /** @internal */\r\n public notifySelectedViewportChanged(previous: ScreenViewport | undefined, current: ScreenViewport | undefined) {\r\n IModelApp.toolAdmin.onSelectedViewportChanged(previous, current);// eslint-disable-line @typescript-eslint/no-floating-promises\r\n this.onSelectedViewportChanged.emit({ previous, current });\r\n }\r\n\r\n /** The \"selected view\" is the default for certain operations. */\r\n public get selectedView(): ScreenViewport | undefined { return this._selectedView; }\r\n\r\n /** Get the first opened view. */\r\n public getFirstOpenView(): ScreenViewport | undefined { return this._viewports.length > 0 ? this._viewports[0] : undefined; }\r\n\r\n /** Check if only a single viewport is being used. If so, render directly on-screen using its WebGL canvas. Otherwise, render each view offscreen. */\r\n private updateRenderToScreen() {\r\n const renderToScreen = 1 === this._viewports.length;\r\n for (const vp of this)\r\n vp.rendersToScreen = renderToScreen;\r\n }\r\n\r\n /** Add a new Viewport to the list of opened views and create an EventController for it.\r\n * @param newVp the Viewport to add\r\n * @returns SUCCESS if vp was successfully added, ERROR if it was already present.\r\n * @note raises onViewOpen event with newVp.\r\n */\r\n public addViewport(newVp: ScreenViewport): BentleyStatus {\r\n if (this._viewports.includes(newVp)) // make sure its not already added\r\n return BentleyStatus.ERROR;\r\n\r\n newVp.setEventController(new EventController(newVp)); // this will direct events to the viewport\r\n this._viewports.push(newVp);\r\n this.updateRenderToScreen();\r\n this.setSelectedView(newVp);// eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n // Start up the render loop if necessary.\r\n if (1 === this._viewports.length)\r\n IModelApp.startEventLoop();\r\n\r\n this.onViewOpen.emit(newVp);\r\n\r\n return BentleyStatus.SUCCESS;\r\n }\r\n\r\n /** Remove a Viewport from the list of opened views, and optionally dispose of it.\r\n * Typically a Viewport is dropped when it is no longer of any use to the application, in which case it should also be\r\n * disposed of as it may hold significant GPU resources.\r\n * However in some cases a Viewport may be temporarily dropped to suspend rendering; and subsequently re-added to\r\n * resume rendering - for example, when the Viewport is temporarily hidden by other UI elements.\r\n * In the latter case it is up to the caller to ensure the Viewport is properly disposed of when it is no longer needed.\r\n * Attempting to invoke any function on a Viewport after it has been disposed is an error.\r\n * @param vp the Viewport to remove.\r\n * @param disposeOfViewport Whether or not to dispose of the Viewport. Defaults to true.\r\n * @return SUCCESS if vp was successfully removed, ERROR if it was not present.\r\n * @note raises onViewClose event with vp.\r\n */\r\n public dropViewport(vp: ScreenViewport, disposeOfViewport: boolean = true): BentleyStatus {\r\n const index = this._viewports.indexOf(vp);\r\n if (index === -1)\r\n return BentleyStatus.ERROR;\r\n\r\n this.onViewClose.emit(vp);\r\n\r\n // make sure tools don't think the cursor is still in this viewport\r\n IModelApp.toolAdmin.forgetViewport(vp);\r\n\r\n vp.setEventController(undefined);\r\n this._viewports.splice(index, 1);\r\n\r\n if (this.selectedView === vp) // if removed viewport was selectedView, set it to undefined.\r\n this.setSelectedView(undefined);// eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n vp.rendersToScreen = false;\r\n this.updateRenderToScreen();\r\n\r\n if (disposeOfViewport)\r\n vp.dispose();\r\n\r\n if (this._doIdleWork && this._viewports.length === 0)\r\n this._beginIdleWork();\r\n\r\n return BentleyStatus.SUCCESS;\r\n }\r\n\r\n /** Iterate over the viewports registered with the view manager. */\r\n public [Symbol.iterator](): Iterator<ScreenViewport> {\r\n return this._viewports[Symbol.iterator]();\r\n }\r\n\r\n /** Force each registered [[Viewport]] to regenerate all of its cached [[Decorations]] on the next frame. If the decorator parameter is specified, only\r\n * the specified decorator will have its cached decorations invalidated for all viewports.\r\n * @see [[Viewport.invalidateCachedDecorations]] to manually remove a decorator's cached decorations from a viewport, forcing them to be regenerated.\r\n * @beta\r\n */\r\n public invalidateCachedDecorationsAllViews(decorator: ViewportDecorator): void {\r\n if (decorator.useCachedDecorations)\r\n for (const vp of this)\r\n vp.invalidateCachedDecorations(decorator);\r\n }\r\n\r\n /** Force each registered [[Viewport]] to regenerate its [[Decorations]] on the next frame. */\r\n public invalidateDecorationsAllViews(): void {\r\n for (const vp of this)\r\n vp.invalidateDecorations();\r\n }\r\n\r\n /** Force each registered [[Viewport]] to regenerate its [[FeatureSymbology.Overrides]] on the next frame.\r\n * @alpha\r\n */\r\n public invalidateSymbologyOverridesAllViews(): void {\r\n for (const vp of this)\r\n vp.setFeatureOverrideProviderChanged();\r\n }\r\n\r\n /** @internal */\r\n public onSelectionSetChanged(_iModel: IModelConnection) {\r\n for (const vp of this)\r\n vp.markSelectionSetDirty();\r\n }\r\n\r\n /** @internal */\r\n public invalidateViewportScenes(): void {\r\n for (const vp of this)\r\n vp.invalidateScene();\r\n }\r\n\r\n /** @internal */\r\n public validateViewportScenes(): void {\r\n for (const vp of this)\r\n vp.setValidScene();\r\n }\r\n\r\n /** @internal */\r\n public invalidateScenes(): void {\r\n this._invalidateScenes = true;\r\n IModelApp.requestNextAnimation();\r\n }\r\n /** @internal */\r\n public get sceneInvalidated(): boolean { return this._invalidateScenes; }\r\n\r\n /** Invoked by ToolAdmin event loop.\r\n * @internal\r\n */\r\n public renderLoop(): void {\r\n if (0 === this._viewports.length)\r\n return;\r\n if (this._skipSceneCreation)\r\n this.validateViewportScenes();\r\n else if (this._invalidateScenes)\r\n this.invalidateViewportScenes();\r\n\r\n this._invalidateScenes = false;\r\n\r\n this.onBeginRender.raiseEvent();\r\n\r\n for (const vp of this._viewports)\r\n vp.renderFrame();\r\n\r\n this.onFinishRender.raiseEvent();\r\n }\r\n\r\n /** Purge TileTrees that haven't been drawn since the specified time point and are not currently in use by any ScreenViewport.\r\n * Intended strictly for debugging purposes - TileAdmin takes care of properly purging.\r\n * @internal\r\n */\r\n public purgeTileTrees(olderThan: BeTimePoint): void {\r\n // A single viewport can display tiles from more than one IModelConnection.\r\n // NOTE: A viewport may be displaying no trees - but we need to record its IModel so we can purge those which are NOT being displayed\r\n // NOTE: That won't catch external tile trees previously used by that viewport.\r\n const trees = new DisclosedTileTreeSet();\r\n const treesByIModel = new Map<IModelConnection, Set<TileTree>>();\r\n for (const vp of this._viewports) {\r\n vp.discloseTileTrees(trees);\r\n if (undefined === treesByIModel.get(vp.iModel))\r\n treesByIModel.set(vp.iModel, new Set<TileTree>());\r\n }\r\n\r\n for (const tree of trees) {\r\n let set = treesByIModel.get(tree.iModel);\r\n if (undefined === set) {\r\n set = new Set<TileTree>();\r\n treesByIModel.set(tree.iModel, set);\r\n }\r\n\r\n set.add(tree);\r\n }\r\n\r\n for (const entry of treesByIModel) {\r\n const iModel = entry[0];\r\n iModel.tiles.purge(olderThan, entry[1]);\r\n }\r\n }\r\n\r\n /** Get the tooltip for a persistent element.\r\n * Calls the backend method [Element.getToolTipMessage]($backend), and replaces all instances of `${localizeTag}` with localized string from IModelApp.i18n.\r\n * @beta\r\n */\r\n public async getElementToolTip(hit: HitDetail): Promise<HTMLElement | string> {\r\n const msg: string[] = await hit.iModel.getToolTipMessage(hit.sourceId); // wait for the locate message(s) from the backend\r\n return IModelApp.formatElementToolTip(msg);\r\n }\r\n\r\n /** Add a new [[ToolTipProvider]] to customize the locate tooltip.\r\n * @internal\r\n * @param provider The new tooltip provider to add.\r\n * @throws Error if provider is already active.\r\n * @returns a function that may be called to remove this provider (in lieu of calling [[dropToolTipProvider]].)\r\n * @see [[dropToolTipProvider]]\r\n */\r\n public addToolTipProvider(provider: ToolTipProvider): () => void {\r\n if (this.toolTipProviders.includes(provider))\r\n throw new Error(\"tooltip provider already registered\");\r\n this.toolTipProviders.push(provider);\r\n return () => { this.dropToolTipProvider(provider); };\r\n }\r\n\r\n /** Drop (remove) a [[ToolTipProvider]] so it is no longer active.\r\n * @internal\r\n * @param provider The tooltip to drop.\r\n * @note Does nothing if provider is not currently active.\r\n */\r\n public dropToolTipProvider(provider: ToolTipProvider) {\r\n const index = this.toolTipProviders.indexOf(provider);\r\n if (index >= 0)\r\n this.toolTipProviders.splice(index, 1);\r\n }\r\n\r\n /** Add a new [[Decorator]] to display decorations into the active views.\r\n * @param decorator The new decorator to add.\r\n * @throws Error if decorator is already active.\r\n * @returns a function that may be called to remove this decorator (in lieu of calling [[dropDecorator]].)\r\n * @see [[dropDecorator]]\r\n */\r\n public addDecorator(decorator: Decorator): () => void {\r\n if (this.decorators.includes(decorator))\r\n throw new Error(\"decorator already registered\");\r\n\r\n this.decorators.push(decorator);\r\n this.invalidateDecorationsAllViews();\r\n return () => { this.dropDecorator(decorator); };\r\n }\r\n\r\n /** Drop (remove) a [[Decorator]] so it is no longer active.\r\n * @param decorator The Decorator to drop.\r\n * @returns true if the decorator was found and removed; false if the decorator was not found.\r\n */\r\n public dropDecorator(decorator: Decorator): boolean {\r\n const index = this.decorators.indexOf(decorator);\r\n if (index < 0)\r\n return false;\r\n\r\n this.invalidateCachedDecorationsAllViews(decorator);\r\n this.decorators.splice(index, 1);\r\n this.invalidateDecorationsAllViews();\r\n return true;\r\n }\r\n\r\n /** Get the tooltip for a pickable decoration.\r\n * @internal\r\n */\r\n public async getDecorationToolTip(hit: HitDetail): Promise<HTMLElement | string> {\r\n for (const decorator of this.decorators) {\r\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.getDecorationToolTip && decorator.testDecorationHit(hit.sourceId))\r\n return decorator.getDecorationToolTip(hit);\r\n }\r\n return hit.viewport ? hit.viewport.getToolTip(hit) : \"\";\r\n }\r\n\r\n /** Allow a pickable decoration to handle a button event that identified it for the SelectTool.\r\n * @internal\r\n */\r\n public async onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> {\r\n for (const decorator of IModelApp.viewManager.decorators) {\r\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.onDecorationButtonEvent && decorator.testDecorationHit(hit.sourceId))\r\n return decorator.onDecorationButtonEvent(hit, ev);\r\n }\r\n return EventHandled.No;\r\n }\r\n\r\n /** Allow a pickable decoration to be snapped to by AccuSnap or TentativePoint.\r\n * @internal\r\n */\r\n public getDecorationGeometry(hit: HitDetail): GeometryStreamProps | undefined {\r\n for (const decorator of IModelApp.viewManager.decorators) {\r\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.getDecorationGeometry && decorator.testDecorationHit(hit.sourceId))\r\n return decorator.getDecorationGeometry(hit);\r\n }\r\n return undefined;\r\n }\r\n\r\n /** Allow a pickable decoration created using a persistent element id to augment or replace the the persistent element's tooltip.\r\n * @internal\r\n */\r\n public async overrideElementToolTip(hit: HitDetail): Promise<HTMLElement | string> {\r\n for (const decorator of this.decorators) {\r\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.getDecorationToolTip && decorator.overrideElementHit(hit))\r\n return decorator.getDecorationToolTip(hit);\r\n }\r\n return this.getElementToolTip(hit);\r\n }\r\n\r\n /** Allow a pickable decoration created using a persistent element id to handle a button event that identified it for the SelectTool.\r\n * @internal\r\n */\r\n public async overrideElementButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> {\r\n for (const decorator of IModelApp.viewManager.decorators) {\r\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.onDecorationButtonEvent && decorator.overrideElementHit(hit))\r\n return decorator.onDecorationButtonEvent(hit, ev);\r\n }\r\n return EventHandled.No;\r\n }\r\n\r\n /** Allow a pickable decoration created using a persistent element id to control whether snapping uses the persistent element's geometry.\r\n * @internal\r\n */\r\n public overrideElementGeometry(hit: HitDetail): GeometryStreamProps | undefined {\r\n for (const decorator of IModelApp.viewManager.decorators) {\r\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.getDecorationGeometry && decorator.overrideElementHit(hit))\r\n return decorator.getDecorationGeometry(hit);\r\n }\r\n return undefined;\r\n }\r\n\r\n public get crossHairCursor(): string { return `url(${IModelApp.publicPath}cursors/crosshair.cur), crosshair`; }\r\n public get dynamicsCursor(): string { return `url(${IModelApp.publicPath}cursors/dynamics.cur), move`; }\r\n public get grabCursor(): string { return `url(${IModelApp.publicPath}cursors/openHand.cur), auto`; }\r\n public get grabbingCursor(): string { return `url(${IModelApp.publicPath}cursors/closedHand.cur), auto`; }\r\n public get walkCursor(): string { return `url(${IModelApp.publicPath}cursors/walk.cur), auto`; }\r\n public get rotateCursor(): string { return `url(${IModelApp.publicPath}cursors/rotate.cur), auto`; }\r\n public get lookCursor(): string { return `url(${IModelApp.publicPath}cursors/look.cur), auto`; }\r\n public get zoomCursor(): string { return `url(${IModelApp.publicPath}cursors/zoom.cur), auto`; }\r\n\r\n /** Change the cursor shown in all Viewports.\r\n * @param cursor The new cursor to display. If undefined, the default cursor is used.\r\n */\r\n public setViewCursor(cursor: string = \"default\") {\r\n if (cursor === this.cursor)\r\n return;\r\n this.cursor = cursor;\r\n for (const vp of this._viewports)\r\n vp.setCursor(cursor);\r\n }\r\n\r\n /** Intended strictly as a temporary solution for interactive editing applications, until official support for such apps is implemented.\r\n * Call this after editing one or more models, passing in the Ids of those models, to cause new tiles to be generated reflecting the changes.\r\n * Pass undefined if you are unsure which models changed (this is less efficient as it discards all tiles for all viewed models in all viewports).\r\n * @internal\r\n */\r\n public refreshForModifiedModels(modelIds: Id64Arg | undefined): void {\r\n for (const vp of this._viewports)\r\n vp.refreshForModifiedModels(modelIds);\r\n }\r\n\r\n /** The number of [antialiasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing) samples to be used when rendering the contents of all viewports\r\n * registered with the ViewManager.\r\n * Must be an integer greater than zero. A value of 1 means antialiasing is disabled. A higher number of samples correlates generally to a higher quality image but\r\n * is also more demanding on the graphics hardware.\r\n * This setting will also be applied to subsequently-registered viewports.\r\n */\r\n public setAntialiasingAllViews(numSamples: number): void {\r\n for (const vp of this)\r\n vp.antialiasSamples = numSamples;\r\n\r\n System.instance.antialiasSamples = numSamples;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ViewManager.js","sourceRoot":"","sources":["../../src/ViewManager.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAA8F;AAG9F,2CAAwC;AAExC,8CAAiE;AACjE,6DAA0D;AAC1D,uCAA2D;AAE3D,kDAA+C;AAgE/C;;;;;;;GAOG;AACH,MAAa,WAAW;IAAxB;QACS,mBAAc,GAAG,KAAK,CAAC;QACvB,WAAM,GAAG,SAAS,CAAC;QACT,eAAU,GAAqB,EAAE,CAAC;QACnC,eAAU,GAAgB,EAAE,CAAC;QAErC,sBAAiB,GAAG,KAAK,CAAC;QAC1B,uBAAkB,GAAG,KAAK,CAAC;QAC3B,gBAAW,GAAG,KAAK,CAAC;QAG5B,gBAAgB;QACA,qBAAgB,GAAsB,EAAE,CAAC;QA8CzD;;;WAGG;QACa,8BAAyB,GAAG,IAAI,wBAAS,EAA+B,CAAC;QAEzF,sHAAsH;QACtG,eAAU,GAAG,IAAI,wBAAS,EAAkB,CAAC;QAE7D,mHAAmH;QACnG,gBAAW,GAAG,IAAI,wBAAS,EAAkB,CAAC;QAE9D;;WAEG;QACa,kBAAa,GAAG,IAAI,wBAAS,EAAkB,CAAC;QAEhE;;WAEG;QACa,iBAAY,GAAG,IAAI,wBAAS,EAAkB,CAAC;QAE/D;;;;WAIG;QACa,kBAAa,GAAG,IAAI,sBAAO,EAAc,CAAC;QAE1D;;;;WAIG;QACa,mBAA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,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU;YAC9B,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACI,wBAAwB,CAAC,QAA6B;QAC3D,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU;YAC9B,EAAE,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;OAKG;IACI,uBAAuB,CAAC,UAAkB;QAC/C,KAAK,MAAM,EAAE,IAAI,IAAI;YACnB,EAAE,CAAC,gBAAgB,GAAG,UAAU,CAAC;QAEnC,eAAM,CAAC,QAAQ,CAAC,gBAAgB,GAAG,UAAU,CAAC;IAChD,CAAC;CACF;AA/fD,kCA+fC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\nimport { BeEvent, BentleyStatus, BeTimePoint, BeUiEvent, Id64Arg } from \"@itwin/core-bentley\";\r\nimport { GeometryStreamProps } from \"@itwin/core-common\";\r\nimport { HitDetail } from \"./HitDetail\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { IModelConnection } from \"./IModelConnection\";\r\nimport { DisclosedTileTreeSet, TileTree } from \"./tile/internal\";\r\nimport { EventController } from \"./tools/EventController\";\r\nimport { BeButtonEvent, EventHandled } from \"./tools/Tool\";\r\nimport { ScreenViewport, ViewportDecorator } from \"./Viewport\";\r\nimport { System } from \"./render/webgl/System\";\r\n\r\n/** Interface for drawing [decoration graphics]($docs/learning/frontend/ViewDecorations.md) into, or on top of, the active [[ScreenViewport]]s managed by [[ViewManager]].\r\n * Decorators generate [[Decorations]].\r\n * @public\r\n */\r\nexport interface Decorator extends ViewportDecorator {\r\n /** If the [[decorate]] method created pickable graphics, return true if the supplied Id is from this Decorator.\r\n * @param id The Id of the currently selected pickable graphics.\r\n * @returns true if 'id' belongs to this Decorator\r\n */\r\n testDecorationHit?(id: string): boolean;\r\n\r\n /** If the [[decorate]] method created pickable graphics using a persistent element id instead of a transient id,\r\n * return true if the Decorator wants the opportunity to override the default persistent element behavior for\r\n * the supplied [[HitDetail]].\r\n * - Replace or augment the element's tooltip by implementing [[getDecorationToolTip]].\r\n * - Override the element's snap geometry by implementing [[getDecorationGeometry]].\r\n * - Handle button events as decorator events by implementing [[onDecorationButtonEvent]].\r\n * @param hit The HitDetail of the currently selected persistent element or pickable graphics using a persistent element id.\r\n * @returns true if this Decorator wants to override the default persistent element behavior.\r\n */\r\n overrideElementHit?(hit: HitDetail): boolean;\r\n\r\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to return the tooltip message for this Decorator.\r\n * @param hit The HitDetail about the decoration that was picked.\r\n * @returns A promise with the HTMLElement or string (that may contain HTML) with the tooltip message.\r\n */\r\n getDecorationToolTip?(hit: HitDetail): Promise<HTMLElement | string>;\r\n\r\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to handle a button event for this Decorator.\r\n * @param hit The HitDetail about the decoration that was picked.\r\n * @param ev The BeButtonEvent that identified this decoration.\r\n * @returns A Promise that resolves to Yes if event completely handled by decoration and event should not be processed by the calling tool.\r\n */\r\n onDecorationButtonEvent?(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled>;\r\n\r\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to return the snappable geometry for this Decorator. Geometry that changes with every cursor motion isn't valid for snapping.\r\n * An example would be an InteractiveTool for placing a linestring. It might wish to allow snapping to accepted segments, the segment from the last accepted point to the current cursor position would not be included\r\n * as snappable geometry and would just be displayed in dynamics.\r\n * @param hit The HitDetail about the decoration that was picked.\r\n * @returns GeometryStreamProps containing world coordinate snappable geometry for this decoration.\r\n */\r\n getDecorationGeometry?(hit: HitDetail): GeometryStreamProps | undefined;\r\n}\r\n\r\n/** Argument for [[ViewManager.onSelectedViewportChanged]]\r\n * @public\r\n */\r\nexport interface SelectedViewportChangedArgs {\r\n current?: ScreenViewport;\r\n previous?: ScreenViewport;\r\n}\r\n\r\n/** An object which customizes the locate tooltip.\r\n * @internal\r\n */\r\nexport interface ToolTipProvider {\r\n /** Augment or replace tooltip for the specified HitDetail.\r\n * To cooperate with other tooltip providers, replacing the input tooltip instead of appending information is discouraged.\r\n */\r\n augmentToolTip(hit: HitDetail, tooltip: Promise<HTMLElement | string>): Promise<HTMLElement | string>;\r\n}\r\n\r\n/** The ViewManager holds the list of opened views, plus the *selected view*. It also provides notifications of view open/close and suspend/resume.\r\n * Applications must call [[addViewport]] when new Viewports that should be associated with user events are created.\r\n *\r\n * A single ViewManager is created when [[IModelApp.startup]] is called. It can be accessed via the static member [[IModelApp.viewManager]].\r\n *\r\n * The ViewManager controls the render loop, which causes the contents of each registered [[Viewport]] to update on the screen.\r\n * @public\r\n */\r\nexport class ViewManager implements Iterable<ScreenViewport> {\r\n public inDynamicsMode = false;\r\n public cursor = \"default\";\r\n private readonly _viewports: ScreenViewport[] = [];\r\n public readonly decorators: Decorator[] = [];\r\n private _selectedView?: ScreenViewport;\r\n private _invalidateScenes = false;\r\n private _skipSceneCreation = false;\r\n private _doIdleWork = false;\r\n private _idleWorkTimer?: any;\r\n\r\n /** @internal */\r\n public readonly toolTipProviders: ToolTipProvider[] = [];\r\n\r\n private _beginIdleWork() {\r\n const idleWork = () => {\r\n if (undefined === this._idleWorkTimer)\r\n return;\r\n if (this._viewports.length > 0) {\r\n this._idleWorkTimer = undefined;\r\n return;\r\n }\r\n if (IModelApp.renderSystem.doIdleWork())\r\n this._idleWorkTimer = setTimeout(idleWork, 1);\r\n else\r\n this._idleWorkTimer = undefined;\r\n };\r\n\r\n if (undefined === this._idleWorkTimer)\r\n this._idleWorkTimer = setTimeout(idleWork, 1);\r\n }\r\n\r\n /** @internal */\r\n public onInitialized() {\r\n this.addDecorator(IModelApp.accuSnap);\r\n this.addDecorator(IModelApp.tentativePoint);\r\n this.addDecorator(IModelApp.accuDraw);\r\n this.addDecorator(IModelApp.toolAdmin);\r\n this.cursor = \"default\";\r\n\r\n const options = IModelApp.renderSystem.options;\r\n this._doIdleWork = true === options.doIdleWork;\r\n if (this._doIdleWork)\r\n this._beginIdleWork();\r\n }\r\n\r\n /** @internal */\r\n public onShutDown() {\r\n if (undefined !== this._idleWorkTimer) {\r\n clearTimeout(this._idleWorkTimer);\r\n this._idleWorkTimer = undefined;\r\n }\r\n this._viewports.length = 0;\r\n this.decorators.length = 0;\r\n this.toolTipProviders.length = 0;\r\n this._selectedView = undefined;\r\n }\r\n\r\n /** Called after the selected view changes.\r\n * @param old Previously selected viewport.\r\n * @param current Currently selected viewport.\r\n */\r\n public readonly onSelectedViewportChanged = new BeUiEvent<SelectedViewportChangedArgs>();\r\n\r\n /** Called after a view is opened. This can happen when the iModel is first opened or when a user opens a new view. */\r\n public readonly onViewOpen = new BeUiEvent<ScreenViewport>();\r\n\r\n /** Called after a view is closed. This can happen when the iModel is closed or when a user closes an open view. */\r\n public readonly onViewClose = new BeUiEvent<ScreenViewport>();\r\n\r\n /** Called after a view is suspended. This happens when the application is minimized or, on a tablet, when the application\r\n * is moved to the background.\r\n */\r\n public readonly onViewSuspend = new BeUiEvent<ScreenViewport>();\r\n\r\n /** Called after a suspended view is resumed. This can happen when a minimized application is restored\r\n * or, on a tablet, when the application is moved to the foreground.\r\n */\r\n public readonly onViewResume = new BeUiEvent<ScreenViewport>();\r\n\r\n /** Called at the beginning of each tick of the render loop, before any viewports have been updated.\r\n * The render loop is typically invoked by a requestAnimationFrame() callback. It will not be invoked if the ViewManager is tracking no viewports.\r\n * @note Due to the frequency of this event, avoid performing expensive work inside event listeners.\r\n * @see [[ViewManager.onFinishRender]]\r\n */\r\n public readonly onBeginRender = new BeEvent<() => void>();\r\n\r\n /** Called at the end of each tick of the render loop, after all viewports have been updated.\r\n * The render loop is typically invoked by a requestAnimationFrame() callback. It will not be invoked if the ViewManager is tracking no viewports.\r\n * @note Due to the frequency of this event, avoid performing expensive work inside event listeners.\r\n * @see [[ViewManager.onBeginRender]]\r\n */\r\n public readonly onFinishRender = new BeEvent<() => void>();\r\n\r\n /** @internal */\r\n public endDynamicsMode(): void {\r\n if (!this.inDynamicsMode)\r\n return;\r\n\r\n this.inDynamicsMode = false;\r\n\r\n const cursorVp = IModelApp.toolAdmin.cursorView;\r\n if (cursorVp)\r\n cursorVp.changeDynamics(undefined);\r\n\r\n for (const vp of this._viewports) {\r\n if (vp !== cursorVp)\r\n vp.changeDynamics(undefined);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public beginDynamicsMode() { this.inDynamicsMode = true; }\r\n\r\n /** @internal */\r\n public get doesHostHaveFocus(): boolean { return document.hasFocus(); }\r\n\r\n /** Set the selected [[Viewport]] to undefined. */\r\n public clearSelectedView(): void {\r\n const previousVp = this.selectedView;\r\n this._selectedView = undefined;\r\n this.notifySelectedViewportChanged(previousVp, undefined);\r\n }\r\n\r\n /** Sets the selected [[Viewport]]. */\r\n public async setSelectedView(vp: ScreenViewport | undefined): Promise<BentleyStatus> {\r\n if (undefined === vp)\r\n vp = this.getFirstOpenView();\r\n\r\n if (vp === this.selectedView) // already the selected view\r\n return BentleyStatus.SUCCESS;\r\n\r\n if (undefined === vp) {\r\n this.clearSelectedView();\r\n return BentleyStatus.ERROR;\r\n }\r\n\r\n const previousVp = this.selectedView;\r\n this._selectedView = vp;\r\n\r\n this.notifySelectedViewportChanged(previousVp, vp);\r\n\r\n if (undefined === previousVp)\r\n await IModelApp.toolAdmin.startDefaultTool();\r\n\r\n return BentleyStatus.SUCCESS;\r\n }\r\n\r\n /** @internal */\r\n public notifySelectedViewportChanged(previous: ScreenViewport | undefined, current: ScreenViewport | undefined) {\r\n IModelApp.toolAdmin.onSelectedViewportChanged(previous, current);// eslint-disable-line @typescript-eslint/no-floating-promises\r\n this.onSelectedViewportChanged.emit({ previous, current });\r\n }\r\n\r\n /** The \"selected view\" is the default for certain operations. */\r\n public get selectedView(): ScreenViewport | undefined { return this._selectedView; }\r\n\r\n /** Get the first opened view. */\r\n public getFirstOpenView(): ScreenViewport | undefined { return this._viewports.length > 0 ? this._viewports[0] : undefined; }\r\n\r\n /** Check if only a single viewport is being used. If so, render directly on-screen using its WebGL canvas. Otherwise, render each view offscreen. */\r\n private updateRenderToScreen() {\r\n const renderToScreen = 1 === this._viewports.length;\r\n for (const vp of this)\r\n vp.rendersToScreen = renderToScreen;\r\n }\r\n\r\n /** Add a new Viewport to the list of opened views and create an EventController for it.\r\n * @param newVp the Viewport to add\r\n * @returns SUCCESS if vp was successfully added, ERROR if it was already present.\r\n * @note raises onViewOpen event with newVp.\r\n */\r\n public addViewport(newVp: ScreenViewport): BentleyStatus {\r\n if (this._viewports.includes(newVp)) // make sure its not already added\r\n return BentleyStatus.ERROR;\r\n\r\n newVp.setEventController(new EventController(newVp)); // this will direct events to the viewport\r\n this._viewports.push(newVp);\r\n this.updateRenderToScreen();\r\n this.setSelectedView(newVp);// eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n // Start up the render loop if necessary.\r\n if (1 === this._viewports.length)\r\n IModelApp.startEventLoop();\r\n\r\n this.onViewOpen.emit(newVp);\r\n\r\n return BentleyStatus.SUCCESS;\r\n }\r\n\r\n /** Remove a Viewport from the list of opened views, and optionally dispose of it.\r\n * Typically a Viewport is dropped when it is no longer of any use to the application, in which case it should also be\r\n * disposed of as it may hold significant GPU resources.\r\n * However in some cases a Viewport may be temporarily dropped to suspend rendering; and subsequently re-added to\r\n * resume rendering - for example, when the Viewport is temporarily hidden by other UI elements.\r\n * In the latter case it is up to the caller to ensure the Viewport is properly disposed of when it is no longer needed.\r\n * Attempting to invoke any function on a Viewport after it has been disposed is an error.\r\n * @param vp the Viewport to remove.\r\n * @param disposeOfViewport Whether or not to dispose of the Viewport. Defaults to true.\r\n * @return SUCCESS if vp was successfully removed, ERROR if it was not present.\r\n * @note raises onViewClose event with vp.\r\n */\r\n public dropViewport(vp: ScreenViewport, disposeOfViewport: boolean = true): BentleyStatus {\r\n const index = this._viewports.indexOf(vp);\r\n if (index === -1)\r\n return BentleyStatus.ERROR;\r\n\r\n this.onViewClose.emit(vp);\r\n\r\n // make sure tools don't think the cursor is still in this viewport\r\n IModelApp.toolAdmin.forgetViewport(vp);\r\n\r\n vp.setEventController(undefined);\r\n this._viewports.splice(index, 1);\r\n\r\n if (this.selectedView === vp) // if removed viewport was selectedView, set it to undefined.\r\n this.setSelectedView(undefined);// eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n vp.rendersToScreen = false;\r\n this.updateRenderToScreen();\r\n\r\n if (disposeOfViewport)\r\n vp.dispose();\r\n\r\n if (this._doIdleWork && this._viewports.length === 0)\r\n this._beginIdleWork();\r\n\r\n return BentleyStatus.SUCCESS;\r\n }\r\n\r\n /** Iterate over the viewports registered with the view manager. */\r\n public [Symbol.iterator](): Iterator<ScreenViewport> {\r\n return this._viewports[Symbol.iterator]();\r\n }\r\n\r\n /** Force each registered [[Viewport]] to regenerate all of its cached [[Decorations]] on the next frame. If the decorator parameter is specified, only\r\n * the specified decorator will have its cached decorations invalidated for all viewports.\r\n * @see [[Viewport.invalidateCachedDecorations]] to manually remove a decorator's cached decorations from a viewport, forcing them to be regenerated.\r\n * @beta\r\n */\r\n public invalidateCachedDecorationsAllViews(decorator: ViewportDecorator): void {\r\n if (decorator.useCachedDecorations)\r\n for (const vp of this)\r\n vp.invalidateCachedDecorations(decorator);\r\n }\r\n\r\n /** Force each registered [[Viewport]] to regenerate its [[Decorations]] on the next frame. */\r\n public invalidateDecorationsAllViews(): void {\r\n for (const vp of this)\r\n vp.invalidateDecorations();\r\n }\r\n\r\n /** Force each registered [[Viewport]] to regenerate its [[FeatureSymbology.Overrides]] on the next frame.\r\n * @alpha\r\n */\r\n public invalidateSymbologyOverridesAllViews(): void {\r\n for (const vp of this)\r\n vp.setFeatureOverrideProviderChanged();\r\n }\r\n\r\n /** @internal */\r\n public onSelectionSetChanged(_iModel: IModelConnection) {\r\n for (const vp of this)\r\n vp.markSelectionSetDirty();\r\n }\r\n\r\n /** @internal */\r\n public invalidateViewportScenes(): void {\r\n for (const vp of this)\r\n vp.invalidateScene();\r\n }\r\n\r\n /** @internal */\r\n public validateViewportScenes(): void {\r\n for (const vp of this)\r\n vp.setValidScene();\r\n }\r\n\r\n /** @internal */\r\n public invalidateScenes(): void {\r\n this._invalidateScenes = true;\r\n IModelApp.requestNextAnimation();\r\n }\r\n /** @internal */\r\n public get sceneInvalidated(): boolean { return this._invalidateScenes; }\r\n\r\n /** Invoked by ToolAdmin event loop.\r\n * @internal\r\n */\r\n public renderLoop(): void {\r\n if (0 === this._viewports.length)\r\n return;\r\n if (this._skipSceneCreation)\r\n this.validateViewportScenes();\r\n else if (this._invalidateScenes)\r\n this.invalidateViewportScenes();\r\n\r\n this._invalidateScenes = false;\r\n\r\n this.onBeginRender.raiseEvent();\r\n\r\n for (const vp of this._viewports)\r\n vp.renderFrame();\r\n\r\n this.onFinishRender.raiseEvent();\r\n }\r\n\r\n /** Purge TileTrees that haven't been drawn since the specified time point and are not currently in use by any ScreenViewport.\r\n * Intended strictly for debugging purposes - TileAdmin takes care of properly purging.\r\n * @internal\r\n */\r\n public purgeTileTrees(olderThan: BeTimePoint): void {\r\n // A single viewport can display tiles from more than one IModelConnection.\r\n // NOTE: A viewport may be displaying no trees - but we need to record its IModel so we can purge those which are NOT being displayed\r\n // NOTE: That won't catch external tile trees previously used by that viewport.\r\n const trees = new DisclosedTileTreeSet();\r\n const treesByIModel = new Map<IModelConnection, Set<TileTree>>();\r\n for (const vp of this._viewports) {\r\n vp.discloseTileTrees(trees);\r\n if (undefined === treesByIModel.get(vp.iModel))\r\n treesByIModel.set(vp.iModel, new Set<TileTree>());\r\n }\r\n\r\n for (const tree of trees) {\r\n let set = treesByIModel.get(tree.iModel);\r\n if (undefined === set) {\r\n set = new Set<TileTree>();\r\n treesByIModel.set(tree.iModel, set);\r\n }\r\n\r\n set.add(tree);\r\n }\r\n\r\n for (const entry of treesByIModel) {\r\n const iModel = entry[0];\r\n iModel.tiles.purge(olderThan, entry[1]);\r\n }\r\n }\r\n\r\n /** Get the tooltip for a persistent element.\r\n * Calls the backend method [Element.getToolTipMessage]($backend), and replaces all instances of `${localizeTag}` with localized string from IModelApp.i18n.\r\n * @beta\r\n */\r\n public async getElementToolTip(hit: HitDetail): Promise<HTMLElement | string> {\r\n const msg: string[] = await hit.iModel.getToolTipMessage(hit.sourceId); // wait for the locate message(s) from the backend\r\n return IModelApp.formatElementToolTip(msg);\r\n }\r\n\r\n /** Add a new [[ToolTipProvider]] to customize the locate tooltip.\r\n * @internal\r\n * @param provider The new tooltip provider to add.\r\n * @throws Error if provider is already active.\r\n * @returns a function that may be called to remove this provider (in lieu of calling [[dropToolTipProvider]].)\r\n * @see [[dropToolTipProvider]]\r\n */\r\n public addToolTipProvider(provider: ToolTipProvider): () => void {\r\n if (this.toolTipProviders.includes(provider))\r\n throw new Error(\"tooltip provider already registered\");\r\n this.toolTipProviders.push(provider);\r\n return () => { this.dropToolTipProvider(provider); };\r\n }\r\n\r\n /** Drop (remove) a [[ToolTipProvider]] so it is no longer active.\r\n * @internal\r\n * @param provider The tooltip to drop.\r\n * @note Does nothing if provider is not currently active.\r\n */\r\n public dropToolTipProvider(provider: ToolTipProvider) {\r\n const index = this.toolTipProviders.indexOf(provider);\r\n if (index >= 0)\r\n this.toolTipProviders.splice(index, 1);\r\n }\r\n\r\n /** Add a new [[Decorator]] to display decorations into the active views.\r\n * @param decorator The new decorator to add.\r\n * @throws Error if decorator is already active.\r\n * @returns a function that may be called to remove this decorator (in lieu of calling [[dropDecorator]].)\r\n * @see [[dropDecorator]]\r\n */\r\n public addDecorator(decorator: Decorator): () => void {\r\n if (this.decorators.includes(decorator))\r\n throw new Error(\"decorator already registered\");\r\n\r\n this.decorators.push(decorator);\r\n this.invalidateDecorationsAllViews();\r\n return () => { this.dropDecorator(decorator); };\r\n }\r\n\r\n /** Drop (remove) a [[Decorator]] so it is no longer active.\r\n * @param decorator The Decorator to drop.\r\n * @returns true if the decorator was found and removed; false if the decorator was not found.\r\n */\r\n public dropDecorator(decorator: Decorator): boolean {\r\n const index = this.decorators.indexOf(decorator);\r\n if (index < 0)\r\n return false;\r\n\r\n this.invalidateCachedDecorationsAllViews(decorator);\r\n this.decorators.splice(index, 1);\r\n this.invalidateDecorationsAllViews();\r\n return true;\r\n }\r\n\r\n /** Get the tooltip for a pickable decoration.\r\n * @internal\r\n */\r\n public async getDecorationToolTip(hit: HitDetail): Promise<HTMLElement | string> {\r\n for (const decorator of this.decorators) {\r\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.getDecorationToolTip && decorator.testDecorationHit(hit.sourceId))\r\n return decorator.getDecorationToolTip(hit);\r\n }\r\n return hit.viewport ? hit.viewport.getToolTip(hit) : \"\";\r\n }\r\n\r\n /** Allow a pickable decoration to handle a button event that identified it for the SelectTool.\r\n * @internal\r\n */\r\n public async onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> {\r\n for (const decorator of IModelApp.viewManager.decorators) {\r\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.onDecorationButtonEvent && decorator.testDecorationHit(hit.sourceId))\r\n return decorator.onDecorationButtonEvent(hit, ev);\r\n }\r\n return EventHandled.No;\r\n }\r\n\r\n /** Allow a pickable decoration to be snapped to by AccuSnap or TentativePoint.\r\n * @internal\r\n */\r\n public getDecorationGeometry(hit: HitDetail): GeometryStreamProps | undefined {\r\n for (const decorator of IModelApp.viewManager.decorators) {\r\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.getDecorationGeometry && decorator.testDecorationHit(hit.sourceId))\r\n return decorator.getDecorationGeometry(hit);\r\n }\r\n return undefined;\r\n }\r\n\r\n /** Allow a pickable decoration created using a persistent element id to augment or replace the the persistent element's tooltip.\r\n * @internal\r\n */\r\n public async overrideElementToolTip(hit: HitDetail): Promise<HTMLElement | string> {\r\n for (const decorator of this.decorators) {\r\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.getDecorationToolTip && decorator.overrideElementHit(hit))\r\n return decorator.getDecorationToolTip(hit);\r\n }\r\n return this.getElementToolTip(hit);\r\n }\r\n\r\n /** Allow a pickable decoration created using a persistent element id to handle a button event that identified it for the SelectTool.\r\n * @internal\r\n */\r\n public async overrideElementButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> {\r\n for (const decorator of IModelApp.viewManager.decorators) {\r\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.onDecorationButtonEvent && decorator.overrideElementHit(hit))\r\n return decorator.onDecorationButtonEvent(hit, ev);\r\n }\r\n return EventHandled.No;\r\n }\r\n\r\n /** Allow a pickable decoration created using a persistent element id to control whether snapping uses the persistent element's geometry.\r\n * @internal\r\n */\r\n public overrideElementGeometry(hit: HitDetail): GeometryStreamProps | undefined {\r\n for (const decorator of IModelApp.viewManager.decorators) {\r\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.getDecorationGeometry && decorator.overrideElementHit(hit))\r\n return decorator.getDecorationGeometry(hit);\r\n }\r\n return undefined;\r\n }\r\n\r\n public get crossHairCursor(): string { return `url(${IModelApp.publicPath}cursors/crosshair.cur), crosshair`; }\r\n public get dynamicsCursor(): string { return `url(${IModelApp.publicPath}cursors/dynamics.cur), move`; }\r\n public get grabCursor(): string { return `url(${IModelApp.publicPath}cursors/openHand.cur), auto`; }\r\n public get grabbingCursor(): string { return `url(${IModelApp.publicPath}cursors/closedHand.cur), auto`; }\r\n public get walkCursor(): string { return `url(${IModelApp.publicPath}cursors/walk.cur), auto`; }\r\n public get rotateCursor(): string { return `url(${IModelApp.publicPath}cursors/rotate.cur), auto`; }\r\n public get lookCursor(): string { return `url(${IModelApp.publicPath}cursors/look.cur), auto`; }\r\n public get zoomCursor(): string { return `url(${IModelApp.publicPath}cursors/zoom.cur), auto`; }\r\n\r\n /** Change the cursor shown in all Viewports.\r\n * @param cursor The new cursor to display. If undefined, the default cursor is used.\r\n */\r\n public setViewCursor(cursor: string = \"default\") {\r\n if (cursor === this.cursor)\r\n return;\r\n this.cursor = cursor;\r\n for (const vp of this._viewports)\r\n vp.setCursor(cursor);\r\n }\r\n\r\n /** Intended strictly as a temporary solution for interactive editing applications, until official support for such apps is implemented.\r\n * Call this after editing one or more models, passing in the Ids of those models, to cause new tiles to be generated reflecting the changes.\r\n * Pass undefined if you are unsure which models changed (this is less efficient as it discards all tiles for all viewed models in all viewports).\r\n * @internal\r\n */\r\n public refreshForModifiedModels(modelIds: Id64Arg | undefined): void {\r\n for (const vp of this._viewports)\r\n vp.refreshForModifiedModels(modelIds);\r\n }\r\n\r\n /** Sets the number of [MSAA]($docs/learning/display/MSAA.md) samples for all currently- and subsequently-opened [[ScreenViewport]]s.\r\n * @param numSamples The number of samples as a power of two. Values of 1 or less indicates anti-aliasing should be disabled. Non-power-of-two values are rounded\r\n * down to the nearest power of two. The maximum number of samples supported depends upon the client's graphics hardware capabilities. Higher values produce\r\n * a higher-quality image but also may also reduce framerate.\r\n * @see [[Viewport.antialiasSamples]] to adjust the number of samples for a specific viewport.\r\n */\r\n public setAntialiasingAllViews(numSamples: number): void {\r\n for (const vp of this)\r\n vp.antialiasSamples = numSamples;\r\n\r\n System.instance.antialiasSamples = numSamples;\r\n }\r\n}\r\n"]}
@@ -412,9 +412,11 @@ export declare abstract class Viewport implements IDisposable {
412
412
  /** @see [DisplayStyleSettings.clipStyle]($common) */
413
413
  get clipStyle(): ClipStyle;
414
414
  set clipStyle(style: ClipStyle);
415
- /** The number of [antialiasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing) samples to be used when rendering the contents of the viewport.
416
- * Must be an integer greater than zero. A value of 1 means antialiasing is disabled. A higher number of samples correlates generally to a higher quality image but
417
- * is also more demanding on the graphics hardware.
415
+ /** Sets the number of [MSAA]($docs/learning/display/MSAA.md) samples for this viewport.
416
+ * The number of samples is a power of two. Values of 1 or less indicates anti-aliasing should be disabled. Non-power-of-two values are rounded
417
+ * down to the nearest power of two. The maximum number of samples supported depends upon the client's graphics hardware capabilities. Higher values produce
418
+ * a higher-quality image but also may also reduce framerate.
419
+ * @see [[ViewManager.setAntialiasingAllViews]] to adjust the number of samples for all viewports.
418
420
  */
419
421
  get antialiasSamples(): number;
420
422
  set antialiasSamples(numSamples: number);