IModelApp Class
Global singleton that connects the user interface with the iTwin.js services. There can be only one IModelApp active in a session. All members of IModelApp are static, and it serves as a singleton object for gaining access to session information.
Before any interactive operations may be performed by the @itwin/core-frontend package
, startup must be called and awaited.
Applications may customize the frontend behavior of iTwin.js by supplying options to startup.
Methods
Name | Description | |
---|---|---|
constructor(): IModelApp Protected | ||
getAccessToken(): Promise<string> Static | Get the user's access token for this IModelApp, or a blank string if none is available. | |
makeHTMLElement<K extends undefined>(type: K, opt?: { className?: string, id?: string, innerHTML?: string, innerText?: string, parent?: HTMLElement }): Static | Shortcut for creating an HTMLElement with optional parent, className, id, innerHTML, innerText. | |
makeLogoCard(opts: { heading: string | HTMLElement, iconSrc?: string | HTMLImageElement, iconWidth?: number, notice?: string | HTMLElement }): HTMLTableRowElement Static | Make a new Logo Card. | |
makeModalDiv(options: ModalOptions): ModalReturn Static | Shortcut for making a modal dialog on top of the root of the application. | |
queryRenderCompatibility(): WebGLRenderCompatibilityInfo Static | Obtain WebGL rendering compatibility information for the client system. | |
requestNextAnimation(): void Static | Request that the event loop execute on the next animation frame. | |
shutdown(): Promise<void> Static | Must be called before the application exits to release any held resources. | |
startup(opts?: IModelAppOptions): Promise<void> Static | This method must be called before any other @itwin/core-frontend methods are used. |
|
translateStatus(status: number): string Static | Localize an error status |
Properties
Name | Type | Description | |
---|---|---|---|
accuDraw Accessor Static ReadOnly | AccuDraw | The AccuDraw for this session. | |
accuSnap Accessor Static ReadOnly | AccuSnap | The AccuSnap for this session. | |
animationInterval Accessor Static | undefined | BeDuration | Controls how frequently the application polls for changes that may require a new animation frame to be requested. | |
applicationId Accessor Static ReadOnly | string | The Id of this application. | |
applicationLogoCard Static | () => HTMLTableRowElement | undefined | Applications may implement this method to supply a Logo Card. | |
applicationVersion Accessor Static ReadOnly | string | The version of this application. | |
authorizationClient Static | AuthorizationClient | undefined | The AuthorizationClient used to obtain AccessTokens. | |
hasRenderSystem Accessor Static ReadOnly | boolean | Whether the [renderSystem[]] has been successfully initialized. | |
hubAccess Accessor Static ReadOnly | undefined | FrontendHubAccess | Provides access to IModelHub services. | |
initialized Accessor Static ReadOnly | boolean | True after startup has been called, until shutdown is called. | |
localization Accessor Static ReadOnly | Localization | The Localization for this session. | |
locateManager Accessor Static ReadOnly | ElementLocateManager | ||
mapLayerFormatRegistry Accessor Static ReadOnly | MapLayerFormatRegistry | The MapLayerFormatRegistry for this session. | |
notifications Accessor Static ReadOnly | NotificationManager | The NotificationManager for this session. | |
onAfterStartup Static Readonly | BeEvent<() => void> | Event raised after IModelApp startup completes. | |
onBeforeShutdown Static Readonly | BeEvent<() => void> | Event raised just before the frontend IModelApp is to be shutdown. | |
publicPath Accessor Static ReadOnly | string | If present, overrides where public assets are fetched. | |
quantityFormatter Accessor Static ReadOnly | QuantityFormatter | The QuantityFormatter for this session. | |
realityDataAccess Accessor Static ReadOnly | undefined | RealityDataAccess | Provides access to the RealityData service implementation for this IModelApp | |
renderSystem Accessor Static ReadOnly | RenderSystem | The RenderSystem for this session. | |
securityOptions Accessor Static ReadOnly | FrontendSecurityOptions | The requested security options for the frontend. | |
sessionId Static | string | A uniqueId for this session | |
tentativePoint Accessor Static ReadOnly | TentativePoint | The TentativePoint for this session]]. | |
terrainProviderRegistry Accessor Static ReadOnly | TerrainProviderRegistry | The TerrainProviderRegistry for this session. | |
tileAdmin Accessor Static ReadOnly | TileAdmin | The TileAdmin for this session. | |
toolAdmin Accessor Static ReadOnly | ToolAdmin | The ToolAdmin for this session. | |
tools Static Readonly | ToolRegistry | The ToolRegistry for this session. | |
uiAdmin Accessor Static ReadOnly | UiAdmin | The UiAdmin for this session. | |
userPreferences Accessor Static ReadOnly | undefined | UserPreferencesAccess | The UserPreferencesAccess for this session. | |
viewManager Accessor Static ReadOnly | ViewManager | The ViewManager for this session. |
Defined in
Last Updated: 04 October, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.