@itwin/core-frontend 5.1.0-dev.4 → 5.1.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -1
- package/lib/cjs/ViewContext.d.ts +4 -1
- package/lib/cjs/ViewContext.d.ts.map +1 -1
- package/lib/cjs/ViewContext.js +10 -5
- package/lib/cjs/ViewContext.js.map +1 -1
- package/lib/cjs/ViewManager.js +2 -2
- package/lib/cjs/ViewManager.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +1 -1
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +2 -2
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/internal/render/MockRender.d.ts +1 -1
- package/lib/cjs/internal/render/MockRender.d.ts.map +1 -1
- package/lib/cjs/internal/render/MockRender.js +1 -1
- package/lib/cjs/internal/render/MockRender.js.map +1 -1
- package/lib/cjs/internal/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/RenderCommands.js +2 -3
- package/lib/cjs/internal/render/webgl/RenderCommands.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.js +2 -2
- package/lib/cjs/internal/render/webgl/Target.js.map +1 -1
- package/lib/cjs/internal/render/webgl/TargetGraphics.d.ts +3 -3
- package/lib/cjs/internal/render/webgl/TargetGraphics.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/TargetGraphics.js +10 -7
- package/lib/cjs/internal/render/webgl/TargetGraphics.js.map +1 -1
- package/lib/cjs/render/RenderTarget.d.ts +1 -1
- package/lib/cjs/render/RenderTarget.d.ts.map +1 -1
- package/lib/cjs/render/RenderTarget.js.map +1 -1
- package/lib/esm/ViewContext.d.ts +4 -1
- package/lib/esm/ViewContext.d.ts.map +1 -1
- package/lib/esm/ViewContext.js +10 -5
- package/lib/esm/ViewContext.js.map +1 -1
- package/lib/esm/ViewManager.js +2 -2
- package/lib/esm/ViewManager.js.map +1 -1
- package/lib/esm/Viewport.d.ts +1 -1
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +2 -2
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/internal/render/MockRender.d.ts +1 -1
- package/lib/esm/internal/render/MockRender.d.ts.map +1 -1
- package/lib/esm/internal/render/MockRender.js +1 -1
- package/lib/esm/internal/render/MockRender.js.map +1 -1
- package/lib/esm/internal/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/RenderCommands.js +2 -3
- package/lib/esm/internal/render/webgl/RenderCommands.js.map +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Target.js +2 -2
- package/lib/esm/internal/render/webgl/Target.js.map +1 -1
- package/lib/esm/internal/render/webgl/TargetGraphics.d.ts +3 -3
- package/lib/esm/internal/render/webgl/TargetGraphics.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/TargetGraphics.js +10 -7
- package/lib/esm/internal/render/webgl/TargetGraphics.js.map +1 -1
- package/lib/esm/render/RenderTarget.d.ts +1 -1
- package/lib/esm/render/RenderTarget.d.ts.map +1 -1
- package/lib/esm/render/RenderTarget.js.map +1 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TargetGraphics.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/TargetGraphics.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4D;AAM5D;;GAEG;AACH,MAAa,cAAc;IAClB,UAAU,GAAgB,EAAE,CAAC;IAC7B,UAAU,GAAgB,EAAE,CAAC;IAC7B,QAAQ,GAAgB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"TargetGraphics.js","sour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mC,EAAE,OAAgC;QACzF,IAAA,2BAAY,EAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACtC,IAAA,2BAAY,EAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEnC,IAAI,CAAC,kBAAkB,GAAG,UAAU,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,OAAO,IAAI,EAAE,CAAC;IACvC,CAAC;IAED,IAAW,WAAW,KAA8B,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/E,IAAW,WAAW,CAAC,WAAoC;QACzD,IAAA,sBAAO,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAED,IAAW,iBAAiB;QAC1B,OAAO,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC;IAC9C,CAAC;CACF;AA7CD,wCA6CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module WebGL\n */\n\nimport { dispose, disposeArray } from \"@itwin/core-bentley\";\nimport { GraphicList } from \"../../../render/RenderGraphic\";\nimport { Decorations } from \"../../../render/Decorations\";\nimport { CanvasDecorationList } from \"../../../render/CanvasDecoration\";\nimport { Scene } from \"../../../render/Scene\";\n\n/** The various graphics associated with a [[Target]].\n * @internal\n */\nexport class TargetGraphics {\n public foreground: GraphicList = [];\n public background: GraphicList = [];\n public overlays: GraphicList = [];\n public foregroundDynamics: GraphicList = [];\n public overlayDynamics: GraphicList = [];\n private _decorations?: Decorations;\n\n public [Symbol.dispose](): void {\n this.foreground.length = this.background.length = this.overlays.length = 0;\n\n disposeArray(this.foregroundDynamics);\n disposeArray(this.overlayDynamics);\n\n this._decorations = dispose(this._decorations);\n }\n\n public get isDisposed(): boolean {\n return 0 === this.foreground.length && 0 === this.background.length && 0 === this.overlays.length\n && 0 === this.foregroundDynamics.length && 0 === this.overlayDynamics.length && !this._decorations;\n }\n\n public changeScene(scene: Scene): void {\n this.foreground = scene.foreground;\n this.background = scene.background;\n this.overlays = scene.overlay;\n }\n\n public changeDynamics(foreground: GraphicList | undefined, overlay: GraphicList | undefined) {\n disposeArray(this.foregroundDynamics);\n disposeArray(this.overlayDynamics);\n\n this.foregroundDynamics = foreground ?? [];\n this.overlayDynamics = overlay ?? [];\n }\n\n public get decorations(): Decorations | undefined { return this._decorations; }\n public set decorations(decorations: Decorations | undefined) {\n dispose(this._decorations);\n this._decorations = decorations;\n }\n\n public get canvasDecorations(): CanvasDecorationList | undefined {\n return this._decorations?.canvasDecorations;\n }\n}\n"]}
|
|
@@ -82,7 +82,7 @@ export declare abstract class RenderTarget implements Disposable, RenderMemory.C
|
|
|
82
82
|
/** @internal */
|
|
83
83
|
abstract changeScene(scene: Scene): void;
|
|
84
84
|
/** @internal */
|
|
85
|
-
abstract changeDynamics(
|
|
85
|
+
abstract changeDynamics(foreground: GraphicList | undefined, overlay: GraphicList | undefined): void;
|
|
86
86
|
/** @internal */
|
|
87
87
|
abstract changeDecorations(decorations: Decorations): void;
|
|
88
88
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderTarget.d.ts","sourceRoot":"","sources":["../../../src/render/RenderTarget.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,Q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G,gBAAgB;IAChB,IAAW,YAAY,KAA2C,OAAO,SAAS,CAAC,CAAC,CAAC;IAWrF;;OAEG;IACH,gBAAgB;IACT,wBAAwB,CAAC,QAAkC,EAAE,OAAyB,EAAE,QAAsC;QACnI,QAAQ,CAAC,EAAE,CAAC,CAAC;IACf,CAAC;CACF;AA/HD,oCA+HC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { ImageBuffer } from \"@itwin/core-common\";\nimport { XAndY } from \"@itwin/core-geometry\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { HiliteSet } from \"../SelectionSet\";\nimport { SceneContext } from \"../ViewContext\";\nimport { ReadImageBufferArgs, Viewport } from \"../Viewport\";\nimport { ViewRect } from \"../common/ViewRect\";\nimport { CanvasDecoration } from \"./CanvasDecoration\";\nimport { Decorations } from \"./Decorations\";\nimport { FeatureSymbology } from \"./FeatureSymbology\";\nimport { FrameStatsCollector } from \"../internal/render/FrameStatsCollector\";\nimport { AnimationBranchStates } from \"../internal/render/AnimationBranchState\";\nimport { CustomGraphicBuilderOptions, ViewportGraphicBuilderOptions } from \"./GraphicBuilder\";\nimport { Pixel } from \"./Pixel\";\nimport { GraphicList } from \"./RenderGraphic\";\nimport { RenderMemory } from \"./RenderMemory\";\nimport { RenderPlan } from \"../internal/render/RenderPlan\";\nimport { RenderPlanarClassifier } from \"../internal/render/RenderPlanarClassifier\";\nimport { RenderSystem, } from \"./RenderSystem\";\nimport { Scene } from \"./Scene\";\nimport { QueryTileFeaturesOptions, QueryVisibleFeaturesCallback } from \"./VisibleFeature\";\nimport { ActiveSpatialClassifier } from \"../SpatialClassifiersState\";\nimport { _implementationProhibited } from \"../common/internal/Symbols\";\nimport { RenderTextureDrape } from \"../internal/render/RenderTextureDrape\";\nimport { RenderTargetDebugControl } from \"../internal/render/RenderTargetDebugControl\";\n\n/** Connects a [[Viewport]] to a graphics renderer such as a [WebGLRenderingContext](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext)\n * to enable the viewport's contents to be rendered to the screen or to an off-screen buffer.\n * Application code never interacts directly with a `RenderTarget` - it interacts with the `Viewport`'s API which forwards requests to the `RenderTarget`.\n * @public\n */\nexport abstract class RenderTarget implements Disposable, RenderMemory.Consumer {\n /** @internal */\n protected abstract readonly [_implementationProhibited]: unknown;\n\n /** @internal */\n public pickOverlayDecoration(_pt: XAndY): CanvasDecoration | undefined { return undefined; }\n\n /** @internal */\n public abstract get renderSystem(): RenderSystem;\n\n /** NB: *Device pixels*, not CSS pixels! */\n /** @internal */\n public abstract get viewRect(): ViewRect;\n\n /** @internal */\n public get devicePixelRatio(): number { return 1; }\n /** @internal */\n public cssPixelsToDevicePixels(cssPixels: number, floor = true): number {\n const pix = cssPixels * this.devicePixelRatio;\n return floor ? Math.floor(pix) : pix;\n }\n\n /** Given the size of a logical pixel in meters, convert it to the size of a physical pixel in meters, if [[RenderSystem.dpiAwareLOD]] is `true`.\n * Used when computing LOD for graphics.\n */\n /** @internal */\n public adjustPixelSizeForLOD(cssPixelSize: number): number {\n return this.renderSystem.dpiAwareLOD ? this.cssPixelsToDevicePixels(cssPixelSize, false) : cssPixelSize;\n }\n\n /** @internal */\n public abstract get wantInvertBlackBackground(): boolean;\n\n /** @internal */\n public abstract get analysisFraction(): number;\n public abstract set analysisFraction(fraction: number);\n\n /** @internal */\n public get animationBranches(): AnimationBranchStates | undefined { return undefined; }\n public set animationBranches(_transforms: AnimationBranchStates | undefined) { }\n\n /** @internal */\n public get antialiasSamples(): number { return 1; }\n public set antialiasSamples(_numSamples: number) { }\n\n /** @internal */\n public assignFrameStatsCollector(_collector: FrameStatsCollector) { }\n\n /** Update the solar shadow map. If a SceneContext is supplied, shadows are enabled; otherwise, shadows are disabled. */\n /** @internal */\n public updateSolarShadows(_context: SceneContext | undefined): void { }\n /** @internal */\n public getPlanarClassifier(_id: string): RenderPlanarClassifier | undefined { return undefined; }\n /** @internal */\n public createPlanarClassifier(_properties?: ActiveSpatialClassifier): RenderPlanarClassifier | undefined { return undefined; }\n /** @internal */\n public getTextureDrape(_id: Id64String): RenderTextureDrape | undefined { return undefined; }\n\n /** @internal */\n public createGraphicBuilder(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions) {\n return this.renderSystem.createGraphic(options);\n }\n\n /** @internal */\n public [Symbol.dispose](): void { }\n /** @internal */\n public reset(_realityMapLayerChanged?: boolean): void { }\n /** @internal */\n public abstract changeScene(scene: Scene): void;\n /** @internal */\n public abstract changeDynamics(dynamics?: GraphicList): void;\n /** @internal */\n public abstract changeDecorations(decorations: Decorations): void;\n /** @internal */\n public abstract changeRenderPlan(plan: RenderPlan): void;\n /** @internal */\n public abstract drawFrame(sceneMilSecElapsed?: number): void;\n /** @internal */\n public overrideFeatureSymbology(_ovr: FeatureSymbology.Overrides): void { }\n /** @internal */\n public setHiliteSet(_hilited: HiliteSet): void { }\n /** @internal */\n public setFlashed(_elementId: Id64String, _intensity: number): void { }\n /** @internal */\n public onBeforeRender(_viewport: Viewport, _setSceneNeedRedraw: (redraw: boolean) => void): void { }\n /** @internal */\n public abstract setViewRect(_rect: ViewRect, _temporary: boolean): void;\n /** @internal */\n public onResized(): void { }\n /** @internal */\n public abstract updateViewRect(): boolean; // force a RenderTarget viewRect to resize if necessary since last draw\n /** `rect` is specified in *CSS* pixels. */\n /** @internal */\n public abstract readPixels(rect: ViewRect, selector: Pixel.Selector, receiver: Pixel.Receiver, excludeNonLocatable: boolean, excludedElements?: Iterable<Id64String>): void;\n /** @internal */\n public readImageBuffer(_args?: ReadImageBufferArgs): ImageBuffer | undefined { return undefined; }\n /** @internal */\n public readImageToCanvas(_overlayCanvas?: HTMLCanvasElement): HTMLCanvasElement { return document.createElement(\"canvas\"); }\n /** @internal */\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\n\n /** Specify whether webgl content should be rendered directly to the screen.\n * If rendering to screen becomes enabled, returns the canvas to which to render the webgl content.\n * Returns undefined if rendering to screen becomes disabled, or is not supported by this RenderTarget.\n */\n /** @internal */\n public setRenderToScreen(_toScreen: boolean): HTMLCanvasElement | undefined { return undefined; }\n\n /** @internal */\n public get debugControl(): RenderTargetDebugControl | undefined { return undefined; }\n\n /** An ordered list of names of screen-space post-processing effects to be applied to the image produced by this target.\n * The effects are applied in the order in which they appear in the list. Any names not corresponding to a registered effect are ignored.\n * This may have no effect if this target does not support screen-space effects.\n * @see [[RenderSystem.createScreenSpaceEffectBuilder]] to create and register new effects.\n */\n /** @internal */\n public abstract get screenSpaceEffects(): Iterable<string>;\n public abstract set screenSpaceEffects(_effectNames: Iterable<string>);\n\n /** Implementation for [[Viewport.queryVisibleFeatures]]. Not intended for direct usage. The returned iterable remains valid only for the duration of the\n * Viewport.queryVisibleFeatures call.\n */\n /** @internal */\n public queryVisibleTileFeatures(_options: QueryTileFeaturesOptions, _iModel: IModelConnection, callback: QueryVisibleFeaturesCallback): void {\n callback([]);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RenderTarget.js","sourceRoot":"","sources":["../../../src/render/RenderTarget.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAyBH,wDAAuE;AAIvE;;;;GAIG;AACH,MAAsB,YAAY;IAIhC,gBAAgB;IACT,qBAAqB,CAAC,GAAU,IAAkC,OAAO,SAAS,CAAC,CAAC,CAAC;IAS5F,gBAAgB;IAChB,IAAW,gBAAgB,KAAa,OAAO,CAAC,CAAC,CAAC,CAAC;IACnD,gBAAgB;IACT,uBAAuB,CAAC,SAAiB,EAAE,KAAK,GAAG,IAAI;QAC5D,MAAM,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC9C,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,C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CAAC;IACvE,gBAAgB;IACT,cAAc,CAAC,SAAmB,EAAE,mBAA8C,IAAU,CAAC;IAGpG,gBAAgB;IACT,SAAS,KAAW,CAAC;IAM5B,gBAAgB;IACT,eAAe,CAAC,KAA2B,IAA6B,OAAO,SAAS,CAAC,CAAC,CAAC;IAClG,gBAAgB;IACT,iBAAiB,CAAC,cAAkC,IAAuB,OAAO,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5H,gBAAgB;IACT,iBAAiB,CAAC,MAA+B,IAAU,CAAC;IAEnE;;;OAGG;IACH,gBAAgB;IACT,iBAAiB,CAAC,SAAkB,IAAmC,OAAO,SAAS,CAAC,CAAC,CAAC;IAEjG,gBAAgB;IAChB,IAAW,YAAY,KAA2C,OAAO,SAAS,CAAC,CAAC,CAAC;IAWrF;;OAEG;IACH,gBAAgB;IACT,wBAAwB,CAAC,QAAkC,EAAE,OAAyB,EAAE,QAAsC;QACnI,QAAQ,CAAC,EAAE,CAAC,CAAC;IACf,CAAC;CACF;AA/HD,oCA+HC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { ImageBuffer } from \"@itwin/core-common\";\nimport { XAndY } from \"@itwin/core-geometry\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { HiliteSet } from \"../SelectionSet\";\nimport { SceneContext } from \"../ViewContext\";\nimport { ReadImageBufferArgs, Viewport } from \"../Viewport\";\nimport { ViewRect } from \"../common/ViewRect\";\nimport { CanvasDecoration } from \"./CanvasDecoration\";\nimport { Decorations } from \"./Decorations\";\nimport { FeatureSymbology } from \"./FeatureSymbology\";\nimport { FrameStatsCollector } from \"../internal/render/FrameStatsCollector\";\nimport { AnimationBranchStates } from \"../internal/render/AnimationBranchState\";\nimport { CustomGraphicBuilderOptions, ViewportGraphicBuilderOptions } from \"./GraphicBuilder\";\nimport { Pixel } from \"./Pixel\";\nimport { GraphicList } from \"./RenderGraphic\";\nimport { RenderMemory } from \"./RenderMemory\";\nimport { RenderPlan } from \"../internal/render/RenderPlan\";\nimport { RenderPlanarClassifier } from \"../internal/render/RenderPlanarClassifier\";\nimport { RenderSystem, } from \"./RenderSystem\";\nimport { Scene } from \"./Scene\";\nimport { QueryTileFeaturesOptions, QueryVisibleFeaturesCallback } from \"./VisibleFeature\";\nimport { ActiveSpatialClassifier } from \"../SpatialClassifiersState\";\nimport { _implementationProhibited } from \"../common/internal/Symbols\";\nimport { RenderTextureDrape } from \"../internal/render/RenderTextureDrape\";\nimport { RenderTargetDebugControl } from \"../internal/render/RenderTargetDebugControl\";\n\n/** Connects a [[Viewport]] to a graphics renderer such as a [WebGLRenderingContext](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext)\n * to enable the viewport's contents to be rendered to the screen or to an off-screen buffer.\n * Application code never interacts directly with a `RenderTarget` - it interacts with the `Viewport`'s API which forwards requests to the `RenderTarget`.\n * @public\n */\nexport abstract class RenderTarget implements Disposable, RenderMemory.Consumer {\n /** @internal */\n protected abstract readonly [_implementationProhibited]: unknown;\n\n /** @internal */\n public pickOverlayDecoration(_pt: XAndY): CanvasDecoration | undefined { return undefined; }\n\n /** @internal */\n public abstract get renderSystem(): RenderSystem;\n\n /** NB: *Device pixels*, not CSS pixels! */\n /** @internal */\n public abstract get viewRect(): ViewRect;\n\n /** @internal */\n public get devicePixelRatio(): number { return 1; }\n /** @internal */\n public cssPixelsToDevicePixels(cssPixels: number, floor = true): number {\n const pix = cssPixels * this.devicePixelRatio;\n return floor ? Math.floor(pix) : pix;\n }\n\n /** Given the size of a logical pixel in meters, convert it to the size of a physical pixel in meters, if [[RenderSystem.dpiAwareLOD]] is `true`.\n * Used when computing LOD for graphics.\n */\n /** @internal */\n public adjustPixelSizeForLOD(cssPixelSize: number): number {\n return this.renderSystem.dpiAwareLOD ? this.cssPixelsToDevicePixels(cssPixelSize, false) : cssPixelSize;\n }\n\n /** @internal */\n public abstract get wantInvertBlackBackground(): boolean;\n\n /** @internal */\n public abstract get analysisFraction(): number;\n public abstract set analysisFraction(fraction: number);\n\n /** @internal */\n public get animationBranches(): AnimationBranchStates | undefined { return undefined; }\n public set animationBranches(_transforms: AnimationBranchStates | undefined) { }\n\n /** @internal */\n public get antialiasSamples(): number { return 1; }\n public set antialiasSamples(_numSamples: number) { }\n\n /** @internal */\n public assignFrameStatsCollector(_collector: FrameStatsCollector) { }\n\n /** Update the solar shadow map. If a SceneContext is supplied, shadows are enabled; otherwise, shadows are disabled. */\n /** @internal */\n public updateSolarShadows(_context: SceneContext | undefined): void { }\n /** @internal */\n public getPlanarClassifier(_id: string): RenderPlanarClassifier | undefined { return undefined; }\n /** @internal */\n public createPlanarClassifier(_properties?: ActiveSpatialClassifier): RenderPlanarClassifier | undefined { return undefined; }\n /** @internal */\n public getTextureDrape(_id: Id64String): RenderTextureDrape | undefined { return undefined; }\n\n /** @internal */\n public createGraphicBuilder(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions) {\n return this.renderSystem.createGraphic(options);\n }\n\n /** @internal */\n public [Symbol.dispose](): void { }\n /** @internal */\n public reset(_realityMapLayerChanged?: boolean): void { }\n /** @internal */\n public abstract changeScene(scene: Scene): void;\n /** @internal */\n public abstract changeDynamics(foreground: GraphicList | undefined, overlay: GraphicList | undefined): void;\n /** @internal */\n public abstract changeDecorations(decorations: Decorations): void;\n /** @internal */\n public abstract changeRenderPlan(plan: RenderPlan): void;\n /** @internal */\n public abstract drawFrame(sceneMilSecElapsed?: number): void;\n /** @internal */\n public overrideFeatureSymbology(_ovr: FeatureSymbology.Overrides): void { }\n /** @internal */\n public setHiliteSet(_hilited: HiliteSet): void { }\n /** @internal */\n public setFlashed(_elementId: Id64String, _intensity: number): void { }\n /** @internal */\n public onBeforeRender(_viewport: Viewport, _setSceneNeedRedraw: (redraw: boolean) => void): void { }\n /** @internal */\n public abstract setViewRect(_rect: ViewRect, _temporary: boolean): void;\n /** @internal */\n public onResized(): void { }\n /** @internal */\n public abstract updateViewRect(): boolean; // force a RenderTarget viewRect to resize if necessary since last draw\n /** `rect` is specified in *CSS* pixels. */\n /** @internal */\n public abstract readPixels(rect: ViewRect, selector: Pixel.Selector, receiver: Pixel.Receiver, excludeNonLocatable: boolean, excludedElements?: Iterable<Id64String>): void;\n /** @internal */\n public readImageBuffer(_args?: ReadImageBufferArgs): ImageBuffer | undefined { return undefined; }\n /** @internal */\n public readImageToCanvas(_overlayCanvas?: HTMLCanvasElement): HTMLCanvasElement { return document.createElement(\"canvas\"); }\n /** @internal */\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\n\n /** Specify whether webgl content should be rendered directly to the screen.\n * If rendering to screen becomes enabled, returns the canvas to which to render the webgl content.\n * Returns undefined if rendering to screen becomes disabled, or is not supported by this RenderTarget.\n */\n /** @internal */\n public setRenderToScreen(_toScreen: boolean): HTMLCanvasElement | undefined { return undefined; }\n\n /** @internal */\n public get debugControl(): RenderTargetDebugControl | undefined { return undefined; }\n\n /** An ordered list of names of screen-space post-processing effects to be applied to the image produced by this target.\n * The effects are applied in the order in which they appear in the list. Any names not corresponding to a registered effect are ignored.\n * This may have no effect if this target does not support screen-space effects.\n * @see [[RenderSystem.createScreenSpaceEffectBuilder]] to create and register new effects.\n */\n /** @internal */\n public abstract get screenSpaceEffects(): Iterable<string>;\n public abstract set screenSpaceEffects(_effectNames: Iterable<string>);\n\n /** Implementation for [[Viewport.queryVisibleFeatures]]. Not intended for direct usage. The returned iterable remains valid only for the duration of the\n * Viewport.queryVisibleFeatures call.\n */\n /** @internal */\n public queryVisibleTileFeatures(_options: QueryTileFeaturesOptions, _iModel: IModelConnection, callback: QueryVisibleFeaturesCallback): void {\n callback([]);\n }\n}\n"]}
|
package/lib/esm/ViewContext.d.ts
CHANGED
|
@@ -69,10 +69,13 @@ export declare class RenderContext {
|
|
|
69
69
|
* @public
|
|
70
70
|
*/
|
|
71
71
|
export declare class DynamicsContext extends RenderContext {
|
|
72
|
-
private
|
|
72
|
+
private _foreground?;
|
|
73
|
+
private _overlay?;
|
|
73
74
|
/** Add a graphic to the list of dynamic graphics to be drawn in this context's [[Viewport]]. */
|
|
74
75
|
addGraphic(graphic: RenderGraphic): void;
|
|
75
76
|
/** @internal */
|
|
77
|
+
add(graphic: RenderGraphic, isOverlay: boolean): void;
|
|
78
|
+
/** @internal */
|
|
76
79
|
changeDynamics(): void;
|
|
77
80
|
/** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].
|
|
78
81
|
* @param options Options describing how to create the builder.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewContext.d.ts","sourceRoot":"","sources":["../../src/ViewContext.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAoB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAe,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0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AAC,EAAE,OAAO;IAIlD,8CAA8C;IAC9C,IAAW,YAAY,IAAI,YAAY,CAEtC;IAED,gBAAgB;IAChB,IAAW,WAAW,oBAAgC;IAEtD,8CAA8C;IACvC,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAclD,6IAA6I;IACtI,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAU1C,gBAAgB;IACT,mBAAmB,IAAI,IAAI;IAIlC,gBAAgB;IACT,mBAAmB,CAAC,iBAAiB,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,kCAAkC,EAAE,cAAc,CAAC,EAAE,mBAAmB,GAAG,sBAAsB,GAAG,SAAS;IAexL,gBAAgB;IACT,2BAA2B,CAAC,OAAO,EAAE,UAAU;IAItD,gBAAgB;IACT,wBAAwB,CAAC,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,GAAG,SAAS,GAAG,kBAAkB,GAAG,SAAS;IAoBpI,gBAAgB;IACT,uBAAuB,CAAC,OAAO,EAAE,UAAU;IAIlD,gBAAgB;IACT,eAAe,CAAC,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IASrE,+DAA+D;IAC/D,IAAW,QAAQ,oBAAoC;IACvD,2EAA2E;IAC3E,IAAW,kBAAkB,oBAAoC;IACjE,gFAAgF;IAChF,IAAW,eAAe,oBAAiC;IAC3D,gBAAgB;IAChB,IAAW,iBAAiB,wCAA2C;IACvE,gBAAgB;IAChB,IAAW,aAAa,oCAAuC;IAE/D,gBAAgB;IACT,mBAAmB,CAAC,UAAU,EAAE,uBAAuB,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;CAG3F"}
|
package/lib/esm/ViewContext.js
CHANGED
|
@@ -80,16 +80,21 @@ export class RenderContext {
|
|
|
80
80
|
* @public
|
|
81
81
|
*/
|
|
82
82
|
export class DynamicsContext extends RenderContext {
|
|
83
|
-
|
|
83
|
+
_foreground;
|
|
84
|
+
_overlay;
|
|
84
85
|
/** Add a graphic to the list of dynamic graphics to be drawn in this context's [[Viewport]]. */
|
|
85
86
|
addGraphic(graphic) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
this.add(graphic, false);
|
|
88
|
+
}
|
|
89
|
+
/** @internal */
|
|
90
|
+
add(graphic, isOverlay) {
|
|
91
|
+
const key = isOverlay ? "_overlay" : "_foreground";
|
|
92
|
+
const list = this[key] ?? (this[key] = []);
|
|
93
|
+
list.push(graphic);
|
|
89
94
|
}
|
|
90
95
|
/** @internal */
|
|
91
96
|
changeDynamics() {
|
|
92
|
-
this.viewport.changeDynamics(this.
|
|
97
|
+
this.viewport.changeDynamics(this._foreground, this._overlay);
|
|
93
98
|
}
|
|
94
99
|
/** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].
|
|
95
100
|
* @param options Options describing how to create the builder.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewContext.js","sourceRoot":"","sources":["../../src/ViewContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AAKzD,OAAO,EAAW,aAAa,EAAa,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAoB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAUxC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAA4C,eAAe,EAAE,cAAc,EAAqB,MAAM,iBAAiB,CAAC;AAE/H,OAAO,EAAE,0BAA0B,EAA+C,MAAM,YAAY,CAAC;AAErG,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D;;;GAGG;AACH,MAAM,OAAO,aAAa;IACxB,2DAA2D;IAC3C,SAAS,CAAY;IACpB,SAAS,CAAW;IACrC,yDAAyD;IACzC,OAAO,C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zB,IAAI,EAAE,CAAC;QAEP,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC;IAC/B,CAAC;IAED,+DAA+D;IAC/D,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IACvD,2EAA2E;IAC3E,IAAW,kBAAkB,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IACjE,gFAAgF;IAChF,IAAW,eAAe,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,gBAAgB;IAChB,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACvE,gBAAgB;IAChB,IAAW,aAAa,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;IAE/D,gBAAgB;IACT,mBAAmB,CAAC,UAAmC,EAAE,OAAmB;QACjF,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;IACxD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport {\n Matrix3d, Point2d,\n Point3d, Range1d, Transform, XAndY,\n} from \"@itwin/core-geometry\";\nimport { Frustum, FrustumPlanes, ViewFlags } from \"@itwin/core-common\";\nimport { CachedDecoration, DecorationsCache } from \"./DecorationsCache\";\nimport { IModelApp } from \"./IModelApp\";\nimport { PlanarClipMaskState } from \"./PlanarClipMaskState\";\nimport { CanvasDecoration } from \"./render/CanvasDecoration\";\nimport { Decorations } from \"./render/Decorations\";\nimport { GraphicBranch, GraphicBranchOptions } from \"./render/GraphicBranch\";\nimport { GraphicBuilder, ViewportGraphicBuilderOptions } from \"./render/GraphicBuilder\";\nimport { GraphicList, RenderGraphic } from \"./render/RenderGraphic\";\nimport { RenderPlanarClassifier } from \"./internal/render/RenderPlanarClassifier\";\nimport { RenderSystem, } from \"./render/RenderSystem\";\nimport { RenderTarget } from \"./render/RenderTarget\";\nimport { Scene } from \"./render/Scene\";\nimport { SpatialClassifierTileTreeReference, Tile, TileGraphicType, TileLoadStatus, TileTreeReference } from \"./tile/internal\";\nimport { ViewingSpace } from \"./ViewingSpace\";\nimport { ELEMENT_MARKED_FOR_REMOVAL, ScreenViewport, Viewport, ViewportDecorator } from \"./Viewport\";\nimport { ActiveSpatialClassifier } from \"./SpatialClassifiersState\";\nimport { GraphicType } from \"./common/render/GraphicType\";\nimport { RenderTextureDrape } from \"./internal/render/RenderTextureDrape\";\n\n/** Provides context for producing [[RenderGraphic]]s for drawing within a [[Viewport]].\n * @public\n * @extensions\n */\nexport class RenderContext {\n /** ViewFlags extracted from the context's [[Viewport]]. */\n public readonly viewFlags: ViewFlags;\n private readonly _viewport: Viewport;\n /** Frustum extracted from the context's [[Viewport]]. */\n public readonly frustum: Frustum;\n /** Frustum planes extracted from the context's [[Viewport]]. */\n public readonly frustumPlanes: FrustumPlanes;\n\n constructor(vp: Viewport, frustum?: Frustum) {\n this._viewport = vp;\n this.viewFlags = vp.viewFlags;\n this.frustum = frustum ? frustum : vp.getFrustum();\n this.frustumPlanes = FrustumPlanes.fromFrustum(this.frustum);\n }\n\n /** Given a point in world coordinates, determine approximately how many pixels it occupies on screen based on this context's frustum. */\n public getPixelSizeAtPoint(inPoint?: Point3d): number {\n return this.viewport.viewingSpace.getPixelSizeAtPoint(inPoint);\n }\n\n /** The [[Viewport]] associated with this context. */\n public get viewport(): Viewport {\n return this._viewport;\n }\n\n /** The [[RenderSystem]] being used to produce graphics for this context. */\n public get renderSystem(): RenderSystem {\n return this.target.renderSystem;\n }\n\n /** @internal */\n public get target(): RenderTarget { return this.viewport.target; }\n\n /** @internal */\n protected _createGraphicBuilder(options: Omit<ViewportGraphicBuilderOptions, \"viewport\">): GraphicBuilder {\n return this.target.createGraphicBuilder({ ...options, viewport: this.viewport });\n }\n\n /** Create a builder for creating a [[GraphicType.Scene]] [[RenderGraphic]] for rendering within this context's [[Viewport]].\n * @param transform the local-to-world transform in which the builder's geometry is to be defined.\n * @returns A builder for creating a [[GraphicType.Scene]] [[RenderGraphic]] for rendering within this context's [[Viewport]].\n */\n public createSceneGraphicBuilder(transform?: Transform): GraphicBuilder {\n return this._createGraphicBuilder({ type: GraphicType.Scene, placement: transform });\n }\n\n /** Create a graphic from a [[GraphicBranch]]. */\n public createGraphicBranch(branch: GraphicBranch, location: Transform, opts?: GraphicBranchOptions): RenderGraphic {\n return this.target.renderSystem.createGraphicBranch(branch, location, opts);\n }\n\n /** Create a [[RenderGraphic]] which groups a set of graphics into a node in a scene graph, applying to each a transform and optional clip volume and symbology overrides.\n * @param branch Contains the group of graphics and the symbology overrides.\n * @param location the local-to-world transform applied to the grouped graphics.\n * @returns A RenderGraphic suitable for drawing the scene graph node within this context's [[Viewport]].\n * @see [[RenderSystem.createBranch]]\n */\n public createBranch(branch: GraphicBranch, location: Transform): RenderGraphic { return this.createGraphicBranch(branch, location); }\n\n /** Given the size of a logical pixel in meters, convert it to the size of a physical pixel in meters, if [[RenderSystem.dpiAwareLOD]] is `true`.\n * Used when computing LOD for graphics.\n * @internal\n */\n public adjustPixelSizeForLOD(cssPixelSize: number): number {\n return this.viewport.target.adjustPixelSizeForLOD(cssPixelSize);\n }\n}\n\n/** Provides context for an [[InteractiveTool]] to display decorations representing its current state.\n * @see [[InteractiveTool.onDynamicFrame]]\n * @public\n */\nexport class DynamicsContext extends RenderContext {\n private _dynamics?: GraphicList;\n\n /** Add a graphic to the list of dynamic graphics to be drawn in this context's [[Viewport]]. */\n public addGraphic(graphic: RenderGraphic) {\n if (undefined === this._dynamics)\n this._dynamics = [];\n this._dynamics.push(graphic);\n }\n\n /** @internal */\n public changeDynamics(): void {\n this.viewport.changeDynamics(this._dynamics);\n }\n\n /** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].\n * @param options Options describing how to create the builder.\n * @returns A builder that produces a [[RenderGraphic]].\n */\n public createGraphic(options: Omit<ViewportGraphicBuilderOptions, \"viewport\">): GraphicBuilder {\n return this._createGraphicBuilder(options);\n }\n}\n\n/** Arguments supplied to [[DecorateContext.create]].\n * @public\n */\nexport interface DecorateContextCreateArgs {\n /** The viewport to be decorated. */\n viewport: ScreenViewport;\n /** The set of decoration graphics to be populated by the context. */\n output: Decorations;\n /** Optional cache. If omitted, one will be created.\n * @internal\n */\n cache?: DecorationsCache;\n}\n\n/** Provides context for a [[ViewportDecorator]] to add [[Decorations]] to be rendered within a [[Viewport]].\n * @public\n * @extensions\n */\nexport class DecorateContext extends RenderContext {\n private readonly _decorations: Decorations;\n private readonly _cache: DecorationsCache;\n private _curCacheableDecorator?: ViewportDecorator;\n\n /** The [[ScreenViewport]] in which this context's [[Decorations]] will be drawn. */\n public override get viewport(): ScreenViewport {\n return super.viewport as ScreenViewport;\n }\n\n /** @internal */\n constructor(vp: ScreenViewport, decorations: Decorations, cache: DecorationsCache) {\n super(vp);\n this._decorations = decorations;\n this._cache = cache;\n }\n\n /** Create a new DecorateContext.\n * @param args Describes the inputs to the context.\n * @note Typically the [[ScreenViewport]] takes care of creating the context for you.\n * @public\n */\n public static create(args: DecorateContextCreateArgs): DecorateContext {\n return new DecorateContext(args.viewport, args.output, args.cache ?? new DecorationsCache());\n }\n\n /** Create a builder for creating a [[RenderGraphic]] of the specified type appropriate for rendering within this context's [[Viewport]].\n * @param type The type of builder to create.\n * @param transform the local-to-world transform in which the builder's geometry is to be defined.\n * @param id If the decoration is to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\n * @returns A builder for creating a [[RenderGraphic]] of the specified type appropriate for rendering within this context's [[Viewport]].\n * @see [[IModelConnection.transientIds]] for obtaining an ID for a pickable decoration.\n * @see [[createGraphic]] for more options.\n */\n public createGraphicBuilder(type: GraphicType, transform?: Transform, id?: Id64String): GraphicBuilder {\n return this.createGraphic({ type, placement: transform, pickable: undefined !== id ? { id } : undefined });\n }\n\n /** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].\n * @param options Options describing how to create the builder.\n * @returns A builder that produces a [[RenderGraphic]].\n */\n public createGraphic(options: Omit<ViewportGraphicBuilderOptions, \"viewport\">): GraphicBuilder {\n return this._createGraphicBuilder(options);\n }\n\n /** @internal */\n public addFromDecorator(decorator: ViewportDecorator): void {\n assert(undefined === this._curCacheableDecorator);\n try {\n if (decorator.useCachedDecorations) {\n const cached = this._cache.get(decorator);\n if (cached) {\n this.restoreCache(cached);\n return;\n }\n\n this._curCacheableDecorator = decorator;\n }\n\n decorator.decorate(this);\n } finally {\n this._curCacheableDecorator = undefined;\n }\n }\n\n /** Restores decorations onto this context from the specified array of cached decorations. */\n private restoreCache(cachedDecorations: CachedDecoration[]) {\n cachedDecorations.forEach((cachedDecoration) => {\n switch (cachedDecoration.type) {\n case \"graphic\":\n this.addDecoration(cachedDecoration.graphicType, cachedDecoration.graphicOwner);\n break;\n case \"canvas\":\n this.addCanvasDecoration(cachedDecoration.canvasDecoration, cachedDecoration.atFront);\n break;\n case \"html\":\n this.addHtmlDecoration(cachedDecoration.htmlElement);\n break;\n }\n });\n }\n\n private _appendToCache(decoration: CachedDecoration) {\n assert(undefined !== this._curCacheableDecorator);\n this._cache.add(this._curCacheableDecorator, decoration);\n }\n\n /** Calls [[GraphicBuilder.finish]] on the supplied builder to obtain a [[RenderGraphic]], then adds the graphic to the appropriate list of\n * [[Decorations]].\n * @param builder The builder from which to extract the graphic.\n * @note The builder should not be used after calling this method.\n */\n public addDecorationFromBuilder(builder: GraphicBuilder) {\n this.addDecoration(builder.type, builder.finish());\n }\n\n /** Adds a graphic to the set of [[Decorations]] to be drawn in this context's [[ScreenViewport]].\n * @param The type of the graphic, which determines to which list of decorations it is added.\n * @param decoration The decoration graphic to add.\n * @note The type must match the type with which the [[RenderGraphic]]'s [[GraphicBuilder]] was constructed.\n * @see [[DecorateContext.addDecorationFromBuilder]] for a more convenient API.\n */\n public addDecoration(type: GraphicType, decoration: RenderGraphic) {\n if (this._curCacheableDecorator) {\n const graphicOwner = this.target.renderSystem.createGraphicOwner(decoration);\n this._appendToCache({ type: \"graphic\", graphicOwner, graphicType: type });\n decoration = graphicOwner;\n }\n\n switch (type) {\n case GraphicType.Scene:\n if (undefined === this._decorations.normal)\n this._decorations.normal = [];\n this._decorations.normal.push(decoration);\n break;\n\n case GraphicType.WorldDecoration:\n if (!this._decorations.world)\n this._decorations.world = [];\n this._decorations.world.push(decoration);\n break;\n\n case GraphicType.WorldOverlay:\n if (!this._decorations.worldOverlay)\n this._decorations.worldOverlay = [];\n this._decorations.worldOverlay.push(decoration);\n break;\n\n case GraphicType.ViewOverlay:\n if (!this._decorations.viewOverlay)\n this._decorations.viewOverlay = [];\n this._decorations.viewOverlay.push(decoration);\n break;\n\n case GraphicType.ViewBackground:\n this.setViewBackground(decoration);\n break;\n }\n }\n\n /** Add a [[CanvasDecoration]] to be drawn in this context's [[ScreenViewport]]. */\n public addCanvasDecoration(decoration: CanvasDecoration, atFront = false) {\n if (this._curCacheableDecorator)\n this._appendToCache({ type: \"canvas\", canvasDecoration: decoration, atFront });\n\n if (undefined === this._decorations.canvasDecorations)\n this._decorations.canvasDecorations = [];\n\n const list = this._decorations.canvasDecorations;\n if (0 === list.length || true === atFront)\n list.push(decoration);\n else\n list.unshift(decoration);\n }\n\n /** Add an HTMLElement to be drawn as a decoration in this context's [[ScreenViewport]]. */\n public addHtmlDecoration(decoration: HTMLElement) {\n if (this._curCacheableDecorator)\n this._appendToCache({ type: \"html\", htmlElement: decoration });\n\n // an element decoration being added might already be on the decorationDiv, just marked for removal\n if (decoration[ELEMENT_MARKED_FOR_REMOVAL]) {\n decoration[ELEMENT_MARKED_FOR_REMOVAL] = false;\n } else if (decoration.parentElement !== this.viewport.decorationDiv) {\n this.viewport.decorationDiv.appendChild(decoration);\n }\n }\n\n /** @internal */\n public drawStandardGrid(gridOrigin: Point3d, rMatrix: Matrix3d, spacing: XAndY, gridsPerRef: number, _isoGrid: boolean = false, _fixedRepetitions?: Point2d): void {\n const vp = this.viewport;\n\n if (vp.viewingGlobe)\n return;\n\n const color = vp.getContrastToBackgroundColor();\n const planarGrid = this.viewport.target.renderSystem.createPlanarGrid(vp.getFrustum(), { origin: gridOrigin, rMatrix, spacing, gridsPerRef, color });\n if (planarGrid) {\n this.addDecoration(GraphicType.WorldDecoration, planarGrid);\n }\n }\n\n /** Display skyBox graphic that encompasses entire scene and rotates with camera.\n * @see [[RenderSystem.createSkyBox]].\n */\n public setSkyBox(graphic: RenderGraphic) {\n this._decorations.skyBox = graphic;\n }\n\n /** Set the graphic to be displayed behind all other geometry as the background of this context's [[ScreenViewport]]. */\n public setViewBackground(graphic: RenderGraphic) {\n this._decorations.viewBackground = graphic;\n }\n}\n\n/** Context used to create the scene to be drawn in a [[Viewport]]. The scene consists of a set of [[RenderGraphic]]s produced by the\n * [[TileTree]]s visible within the viewport. Creating the scene may result in the enqueueing of requests for [[Tile]] content which\n * should be displayed in the viewport but are not yet loaded.\n * @public\n */\nexport class SceneContext extends RenderContext {\n private _missingChildTiles = false;\n /** The graphics comprising the scene. */\n public readonly scene = new Scene();\n\n /** @internal */\n public readonly missingTiles = new Set<Tile>();\n\n /** @internal */\n public markChildrenLoading(): void {\n this._missingChildTiles = true;\n }\n\n /** @internal */\n public get hasMissingTiles(): boolean {\n return this._missingChildTiles || this.missingTiles.size > 0;\n }\n\n private _viewingSpace?: ViewingSpace;\n private _graphicType: TileGraphicType = TileGraphicType.Scene;\n\n public constructor(vp: Viewport, frustum?: Frustum) {\n super(vp, frustum);\n }\n\n /** The viewed volume containing the scene. */\n public get viewingSpace(): ViewingSpace {\n return undefined !== this._viewingSpace ? this._viewingSpace : this.viewport.viewingSpace;\n }\n\n /** @internal */\n public get graphicType() { return this._graphicType; }\n\n /** Add the specified graphic to the scene. */\n public outputGraphic(graphic: RenderGraphic): void {\n switch (this._graphicType) {\n case TileGraphicType.BackgroundMap:\n this.backgroundGraphics.push(graphic);\n break;\n case TileGraphicType.Overlay:\n this.overlayGraphics.push(graphic);\n break;\n default:\n this.graphics.push(graphic);\n break;\n }\n }\n\n /** Indicate that the specified tile is desired for the scene but is not yet ready. A request to load its contents will later be enqueued. */\n public insertMissingTile(tile: Tile): void {\n switch (tile.loadStatus) {\n case TileLoadStatus.NotLoaded:\n case TileLoadStatus.Queued:\n case TileLoadStatus.Loading:\n this.missingTiles.add(tile);\n break;\n }\n }\n\n /** @internal */\n public requestMissingTiles(): void {\n IModelApp.tileAdmin.requestTiles(this.viewport, this.missingTiles);\n }\n\n /** @internal */\n public addPlanarClassifier(classifiedModelId: Id64String, classifierTree?: SpatialClassifierTileTreeReference, planarClipMask?: PlanarClipMaskState): RenderPlanarClassifier | undefined {\n // Target may have the classifier from a previous frame; if not we must create one.\n let classifier = this.viewport.target.getPlanarClassifier(classifiedModelId);\n if (undefined === classifier)\n classifier = this.viewport.target.createPlanarClassifier(classifierTree?.activeClassifier);\n\n // Either way, we need to collect the graphics to draw for this frame, and record that we did so.\n if (undefined !== classifier) {\n this.planarClassifiers.set(classifiedModelId, classifier);\n classifier.setSource(classifierTree, planarClipMask);\n }\n\n return classifier;\n }\n\n /** @internal */\n public getPlanarClassifierForModel(modelId: Id64String) {\n return this.planarClassifiers.get(modelId);\n }\n\n /** @internal */\n public addBackgroundDrapedModel(drapedTreeRef: TileTreeReference, _heightRange: Range1d | undefined): RenderTextureDrape | undefined {\n const drapedTree = drapedTreeRef.treeOwner.tileTree;\n if (undefined === drapedTree)\n return undefined;\n\n const id = drapedTree.modelId;\n let drape = this.getTextureDrapeForModel(id);\n if (undefined !== drape)\n return drape;\n\n drape = this.viewport.target.getTextureDrape(id);\n if (undefined === drape && this.viewport.backgroundDrapeMap)\n drape = this.viewport.target.renderSystem.createBackgroundMapDrape(drapedTreeRef, this.viewport.backgroundDrapeMap);\n\n if (undefined !== drape)\n this.textureDrapes.set(id, drape);\n\n return drape;\n }\n\n /** @internal */\n public getTextureDrapeForModel(modelId: Id64String) {\n return this.textureDrapes.get(modelId);\n }\n\n /** @internal */\n public withGraphicType(type: TileGraphicType, func: () => void): void {\n const prevType = this._graphicType;\n this._graphicType = type;\n\n func();\n\n this._graphicType = prevType;\n }\n\n /** The graphics in the scene that will be drawn with depth. */\n public get graphics() { return this.scene.foreground; }\n /** The graphics that will be drawn behind everything else in the scene. */\n public get backgroundGraphics() { return this.scene.background; }\n /** The graphics that will be drawn in front of everything else in the scene. */\n public get overlayGraphics() { return this.scene.overlay; }\n /** @internal */\n public get planarClassifiers() { return this.scene.planarClassifiers; }\n /** @internal */\n public get textureDrapes() { return this.scene.textureDrapes; }\n\n /** @internal */\n public setVolumeClassifier(classifier: ActiveSpatialClassifier, modelId: Id64String): void {\n this.scene.volumeClassifier = { classifier, modelId };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ViewContext.js","sourceRoot":"","sources":["../../src/ViewContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AAKzD,OAAO,EAAW,aAAa,EAAa,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAoB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAUxC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAA4C,eAAe,EAAE,cAAc,EAAqB,MAAM,iBAAiB,CAAC;AAE/H,OAAO,EAAE,0BAA0B,EAA+C,MAAM,YAAY,CAAC;AAErG,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D;;;GAGG;AACH,MAAM,OAAO,aAAa;IACxB,2DAA2D;IAC3C,SAAS,CA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CAAC,CAAC;QAEpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,gBAAgB;IACT,uBAAuB,CAAC,OAAmB;QAChD,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,gBAAgB;IACT,eAAe,CAAC,IAAqB,EAAE,IAAgB;QAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAEzB,IAAI,EAAE,CAAC;QAEP,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC;IAC/B,CAAC;IAED,+DAA+D;IAC/D,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IACvD,2EAA2E;IAC3E,IAAW,kBAAkB,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IACjE,gFAAgF;IAChF,IAAW,eAAe,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,gBAAgB;IAChB,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACvE,gBAAgB;IAChB,IAAW,aAAa,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;IAE/D,gBAAgB;IACT,mBAAmB,CAAC,UAAmC,EAAE,OAAmB;QACjF,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;IACxD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport {\n Matrix3d, Point2d,\n Point3d, Range1d, Transform, XAndY,\n} from \"@itwin/core-geometry\";\nimport { Frustum, FrustumPlanes, ViewFlags } from \"@itwin/core-common\";\nimport { CachedDecoration, DecorationsCache } from \"./DecorationsCache\";\nimport { IModelApp } from \"./IModelApp\";\nimport { PlanarClipMaskState } from \"./PlanarClipMaskState\";\nimport { CanvasDecoration } from \"./render/CanvasDecoration\";\nimport { Decorations } from \"./render/Decorations\";\nimport { GraphicBranch, GraphicBranchOptions } from \"./render/GraphicBranch\";\nimport { GraphicBuilder, ViewportGraphicBuilderOptions } from \"./render/GraphicBuilder\";\nimport { GraphicList, RenderGraphic } from \"./render/RenderGraphic\";\nimport { RenderPlanarClassifier } from \"./internal/render/RenderPlanarClassifier\";\nimport { RenderSystem, } from \"./render/RenderSystem\";\nimport { RenderTarget } from \"./render/RenderTarget\";\nimport { Scene } from \"./render/Scene\";\nimport { SpatialClassifierTileTreeReference, Tile, TileGraphicType, TileLoadStatus, TileTreeReference } from \"./tile/internal\";\nimport { ViewingSpace } from \"./ViewingSpace\";\nimport { ELEMENT_MARKED_FOR_REMOVAL, ScreenViewport, Viewport, ViewportDecorator } from \"./Viewport\";\nimport { ActiveSpatialClassifier } from \"./SpatialClassifiersState\";\nimport { GraphicType } from \"./common/render/GraphicType\";\nimport { RenderTextureDrape } from \"./internal/render/RenderTextureDrape\";\n\n/** Provides context for producing [[RenderGraphic]]s for drawing within a [[Viewport]].\n * @public\n * @extensions\n */\nexport class RenderContext {\n /** ViewFlags extracted from the context's [[Viewport]]. */\n public readonly viewFlags: ViewFlags;\n private readonly _viewport: Viewport;\n /** Frustum extracted from the context's [[Viewport]]. */\n public readonly frustum: Frustum;\n /** Frustum planes extracted from the context's [[Viewport]]. */\n public readonly frustumPlanes: FrustumPlanes;\n\n constructor(vp: Viewport, frustum?: Frustum) {\n this._viewport = vp;\n this.viewFlags = vp.viewFlags;\n this.frustum = frustum ? frustum : vp.getFrustum();\n this.frustumPlanes = FrustumPlanes.fromFrustum(this.frustum);\n }\n\n /** Given a point in world coordinates, determine approximately how many pixels it occupies on screen based on this context's frustum. */\n public getPixelSizeAtPoint(inPoint?: Point3d): number {\n return this.viewport.viewingSpace.getPixelSizeAtPoint(inPoint);\n }\n\n /** The [[Viewport]] associated with this context. */\n public get viewport(): Viewport {\n return this._viewport;\n }\n\n /** The [[RenderSystem]] being used to produce graphics for this context. */\n public get renderSystem(): RenderSystem {\n return this.target.renderSystem;\n }\n\n /** @internal */\n public get target(): RenderTarget { return this.viewport.target; }\n\n /** @internal */\n protected _createGraphicBuilder(options: Omit<ViewportGraphicBuilderOptions, \"viewport\">): GraphicBuilder {\n return this.target.createGraphicBuilder({ ...options, viewport: this.viewport });\n }\n\n /** Create a builder for creating a [[GraphicType.Scene]] [[RenderGraphic]] for rendering within this context's [[Viewport]].\n * @param transform the local-to-world transform in which the builder's geometry is to be defined.\n * @returns A builder for creating a [[GraphicType.Scene]] [[RenderGraphic]] for rendering within this context's [[Viewport]].\n */\n public createSceneGraphicBuilder(transform?: Transform): GraphicBuilder {\n return this._createGraphicBuilder({ type: GraphicType.Scene, placement: transform });\n }\n\n /** Create a graphic from a [[GraphicBranch]]. */\n public createGraphicBranch(branch: GraphicBranch, location: Transform, opts?: GraphicBranchOptions): RenderGraphic {\n return this.target.renderSystem.createGraphicBranch(branch, location, opts);\n }\n\n /** Create a [[RenderGraphic]] which groups a set of graphics into a node in a scene graph, applying to each a transform and optional clip volume and symbology overrides.\n * @param branch Contains the group of graphics and the symbology overrides.\n * @param location the local-to-world transform applied to the grouped graphics.\n * @returns A RenderGraphic suitable for drawing the scene graph node within this context's [[Viewport]].\n * @see [[RenderSystem.createBranch]]\n */\n public createBranch(branch: GraphicBranch, location: Transform): RenderGraphic { return this.createGraphicBranch(branch, location); }\n\n /** Given the size of a logical pixel in meters, convert it to the size of a physical pixel in meters, if [[RenderSystem.dpiAwareLOD]] is `true`.\n * Used when computing LOD for graphics.\n * @internal\n */\n public adjustPixelSizeForLOD(cssPixelSize: number): number {\n return this.viewport.target.adjustPixelSizeForLOD(cssPixelSize);\n }\n}\n\n/** Provides context for an [[InteractiveTool]] to display decorations representing its current state.\n * @see [[InteractiveTool.onDynamicFrame]]\n * @public\n */\nexport class DynamicsContext extends RenderContext {\n private _foreground?: GraphicList;\n private _overlay?: GraphicList;\n\n /** Add a graphic to the list of dynamic graphics to be drawn in this context's [[Viewport]]. */\n public addGraphic(graphic: RenderGraphic): void {\n this.add(graphic, false);\n }\n\n /** @internal */\n public add(graphic: RenderGraphic, isOverlay: boolean) {\n const key = isOverlay ? \"_overlay\" : \"_foreground\";\n const list = this[key] ?? (this[key] = []);\n list.push(graphic);\n }\n\n /** @internal */\n public changeDynamics(): void {\n this.viewport.changeDynamics(this._foreground, this._overlay);\n }\n\n /** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].\n * @param options Options describing how to create the builder.\n * @returns A builder that produces a [[RenderGraphic]].\n */\n public createGraphic(options: Omit<ViewportGraphicBuilderOptions, \"viewport\">): GraphicBuilder {\n return this._createGraphicBuilder(options);\n }\n}\n\n/** Arguments supplied to [[DecorateContext.create]].\n * @public\n */\nexport interface DecorateContextCreateArgs {\n /** The viewport to be decorated. */\n viewport: ScreenViewport;\n /** The set of decoration graphics to be populated by the context. */\n output: Decorations;\n /** Optional cache. If omitted, one will be created.\n * @internal\n */\n cache?: DecorationsCache;\n}\n\n/** Provides context for a [[ViewportDecorator]] to add [[Decorations]] to be rendered within a [[Viewport]].\n * @public\n * @extensions\n */\nexport class DecorateContext extends RenderContext {\n private readonly _decorations: Decorations;\n private readonly _cache: DecorationsCache;\n private _curCacheableDecorator?: ViewportDecorator;\n\n /** The [[ScreenViewport]] in which this context's [[Decorations]] will be drawn. */\n public override get viewport(): ScreenViewport {\n return super.viewport as ScreenViewport;\n }\n\n /** @internal */\n constructor(vp: ScreenViewport, decorations: Decorations, cache: DecorationsCache) {\n super(vp);\n this._decorations = decorations;\n this._cache = cache;\n }\n\n /** Create a new DecorateContext.\n * @param args Describes the inputs to the context.\n * @note Typically the [[ScreenViewport]] takes care of creating the context for you.\n * @public\n */\n public static create(args: DecorateContextCreateArgs): DecorateContext {\n return new DecorateContext(args.viewport, args.output, args.cache ?? new DecorationsCache());\n }\n\n /** Create a builder for creating a [[RenderGraphic]] of the specified type appropriate for rendering within this context's [[Viewport]].\n * @param type The type of builder to create.\n * @param transform the local-to-world transform in which the builder's geometry is to be defined.\n * @param id If the decoration is to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\n * @returns A builder for creating a [[RenderGraphic]] of the specified type appropriate for rendering within this context's [[Viewport]].\n * @see [[IModelConnection.transientIds]] for obtaining an ID for a pickable decoration.\n * @see [[createGraphic]] for more options.\n */\n public createGraphicBuilder(type: GraphicType, transform?: Transform, id?: Id64String): GraphicBuilder {\n return this.createGraphic({ type, placement: transform, pickable: undefined !== id ? { id } : undefined });\n }\n\n /** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].\n * @param options Options describing how to create the builder.\n * @returns A builder that produces a [[RenderGraphic]].\n */\n public createGraphic(options: Omit<ViewportGraphicBuilderOptions, \"viewport\">): GraphicBuilder {\n return this._createGraphicBuilder(options);\n }\n\n /** @internal */\n public addFromDecorator(decorator: ViewportDecorator): void {\n assert(undefined === this._curCacheableDecorator);\n try {\n if (decorator.useCachedDecorations) {\n const cached = this._cache.get(decorator);\n if (cached) {\n this.restoreCache(cached);\n return;\n }\n\n this._curCacheableDecorator = decorator;\n }\n\n decorator.decorate(this);\n } finally {\n this._curCacheableDecorator = undefined;\n }\n }\n\n /** Restores decorations onto this context from the specified array of cached decorations. */\n private restoreCache(cachedDecorations: CachedDecoration[]) {\n cachedDecorations.forEach((cachedDecoration) => {\n switch (cachedDecoration.type) {\n case \"graphic\":\n this.addDecoration(cachedDecoration.graphicType, cachedDecoration.graphicOwner);\n break;\n case \"canvas\":\n this.addCanvasDecoration(cachedDecoration.canvasDecoration, cachedDecoration.atFront);\n break;\n case \"html\":\n this.addHtmlDecoration(cachedDecoration.htmlElement);\n break;\n }\n });\n }\n\n private _appendToCache(decoration: CachedDecoration) {\n assert(undefined !== this._curCacheableDecorator);\n this._cache.add(this._curCacheableDecorator, decoration);\n }\n\n /** Calls [[GraphicBuilder.finish]] on the supplied builder to obtain a [[RenderGraphic]], then adds the graphic to the appropriate list of\n * [[Decorations]].\n * @param builder The builder from which to extract the graphic.\n * @note The builder should not be used after calling this method.\n */\n public addDecorationFromBuilder(builder: GraphicBuilder) {\n this.addDecoration(builder.type, builder.finish());\n }\n\n /** Adds a graphic to the set of [[Decorations]] to be drawn in this context's [[ScreenViewport]].\n * @param The type of the graphic, which determines to which list of decorations it is added.\n * @param decoration The decoration graphic to add.\n * @note The type must match the type with which the [[RenderGraphic]]'s [[GraphicBuilder]] was constructed.\n * @see [[DecorateContext.addDecorationFromBuilder]] for a more convenient API.\n */\n public addDecoration(type: GraphicType, decoration: RenderGraphic) {\n if (this._curCacheableDecorator) {\n const graphicOwner = this.target.renderSystem.createGraphicOwner(decoration);\n this._appendToCache({ type: \"graphic\", graphicOwner, graphicType: type });\n decoration = graphicOwner;\n }\n\n switch (type) {\n case GraphicType.Scene:\n if (undefined === this._decorations.normal)\n this._decorations.normal = [];\n this._decorations.normal.push(decoration);\n break;\n\n case GraphicType.WorldDecoration:\n if (!this._decorations.world)\n this._decorations.world = [];\n this._decorations.world.push(decoration);\n break;\n\n case GraphicType.WorldOverlay:\n if (!this._decorations.worldOverlay)\n this._decorations.worldOverlay = [];\n this._decorations.worldOverlay.push(decoration);\n break;\n\n case GraphicType.ViewOverlay:\n if (!this._decorations.viewOverlay)\n this._decorations.viewOverlay = [];\n this._decorations.viewOverlay.push(decoration);\n break;\n\n case GraphicType.ViewBackground:\n this.setViewBackground(decoration);\n break;\n }\n }\n\n /** Add a [[CanvasDecoration]] to be drawn in this context's [[ScreenViewport]]. */\n public addCanvasDecoration(decoration: CanvasDecoration, atFront = false) {\n if (this._curCacheableDecorator)\n this._appendToCache({ type: \"canvas\", canvasDecoration: decoration, atFront });\n\n if (undefined === this._decorations.canvasDecorations)\n this._decorations.canvasDecorations = [];\n\n const list = this._decorations.canvasDecorations;\n if (0 === list.length || true === atFront)\n list.push(decoration);\n else\n list.unshift(decoration);\n }\n\n /** Add an HTMLElement to be drawn as a decoration in this context's [[ScreenViewport]]. */\n public addHtmlDecoration(decoration: HTMLElement) {\n if (this._curCacheableDecorator)\n this._appendToCache({ type: \"html\", htmlElement: decoration });\n\n // an element decoration being added might already be on the decorationDiv, just marked for removal\n if (decoration[ELEMENT_MARKED_FOR_REMOVAL]) {\n decoration[ELEMENT_MARKED_FOR_REMOVAL] = false;\n } else if (decoration.parentElement !== this.viewport.decorationDiv) {\n this.viewport.decorationDiv.appendChild(decoration);\n }\n }\n\n /** @internal */\n public drawStandardGrid(gridOrigin: Point3d, rMatrix: Matrix3d, spacing: XAndY, gridsPerRef: number, _isoGrid: boolean = false, _fixedRepetitions?: Point2d): void {\n const vp = this.viewport;\n\n if (vp.viewingGlobe)\n return;\n\n const color = vp.getContrastToBackgroundColor();\n const planarGrid = this.viewport.target.renderSystem.createPlanarGrid(vp.getFrustum(), { origin: gridOrigin, rMatrix, spacing, gridsPerRef, color });\n if (planarGrid) {\n this.addDecoration(GraphicType.WorldDecoration, planarGrid);\n }\n }\n\n /** Display skyBox graphic that encompasses entire scene and rotates with camera.\n * @see [[RenderSystem.createSkyBox]].\n */\n public setSkyBox(graphic: RenderGraphic) {\n this._decorations.skyBox = graphic;\n }\n\n /** Set the graphic to be displayed behind all other geometry as the background of this context's [[ScreenViewport]]. */\n public setViewBackground(graphic: RenderGraphic) {\n this._decorations.viewBackground = graphic;\n }\n}\n\n/** Context used to create the scene to be drawn in a [[Viewport]]. The scene consists of a set of [[RenderGraphic]]s produced by the\n * [[TileTree]]s visible within the viewport. Creating the scene may result in the enqueueing of requests for [[Tile]] content which\n * should be displayed in the viewport but are not yet loaded.\n * @public\n */\nexport class SceneContext extends RenderContext {\n private _missingChildTiles = false;\n /** The graphics comprising the scene. */\n public readonly scene = new Scene();\n\n /** @internal */\n public readonly missingTiles = new Set<Tile>();\n\n /** @internal */\n public markChildrenLoading(): void {\n this._missingChildTiles = true;\n }\n\n /** @internal */\n public get hasMissingTiles(): boolean {\n return this._missingChildTiles || this.missingTiles.size > 0;\n }\n\n private _viewingSpace?: ViewingSpace;\n private _graphicType: TileGraphicType = TileGraphicType.Scene;\n\n public constructor(vp: Viewport, frustum?: Frustum) {\n super(vp, frustum);\n }\n\n /** The viewed volume containing the scene. */\n public get viewingSpace(): ViewingSpace {\n return undefined !== this._viewingSpace ? this._viewingSpace : this.viewport.viewingSpace;\n }\n\n /** @internal */\n public get graphicType() { return this._graphicType; }\n\n /** Add the specified graphic to the scene. */\n public outputGraphic(graphic: RenderGraphic): void {\n switch (this._graphicType) {\n case TileGraphicType.BackgroundMap:\n this.backgroundGraphics.push(graphic);\n break;\n case TileGraphicType.Overlay:\n this.overlayGraphics.push(graphic);\n break;\n default:\n this.graphics.push(graphic);\n break;\n }\n }\n\n /** Indicate that the specified tile is desired for the scene but is not yet ready. A request to load its contents will later be enqueued. */\n public insertMissingTile(tile: Tile): void {\n switch (tile.loadStatus) {\n case TileLoadStatus.NotLoaded:\n case TileLoadStatus.Queued:\n case TileLoadStatus.Loading:\n this.missingTiles.add(tile);\n break;\n }\n }\n\n /** @internal */\n public requestMissingTiles(): void {\n IModelApp.tileAdmin.requestTiles(this.viewport, this.missingTiles);\n }\n\n /** @internal */\n public addPlanarClassifier(classifiedModelId: Id64String, classifierTree?: SpatialClassifierTileTreeReference, planarClipMask?: PlanarClipMaskState): RenderPlanarClassifier | undefined {\n // Target may have the classifier from a previous frame; if not we must create one.\n let classifier = this.viewport.target.getPlanarClassifier(classifiedModelId);\n if (undefined === classifier)\n classifier = this.viewport.target.createPlanarClassifier(classifierTree?.activeClassifier);\n\n // Either way, we need to collect the graphics to draw for this frame, and record that we did so.\n if (undefined !== classifier) {\n this.planarClassifiers.set(classifiedModelId, classifier);\n classifier.setSource(classifierTree, planarClipMask);\n }\n\n return classifier;\n }\n\n /** @internal */\n public getPlanarClassifierForModel(modelId: Id64String) {\n return this.planarClassifiers.get(modelId);\n }\n\n /** @internal */\n public addBackgroundDrapedModel(drapedTreeRef: TileTreeReference, _heightRange: Range1d | undefined): RenderTextureDrape | undefined {\n const drapedTree = drapedTreeRef.treeOwner.tileTree;\n if (undefined === drapedTree)\n return undefined;\n\n const id = drapedTree.modelId;\n let drape = this.getTextureDrapeForModel(id);\n if (undefined !== drape)\n return drape;\n\n drape = this.viewport.target.getTextureDrape(id);\n if (undefined === drape && this.viewport.backgroundDrapeMap)\n drape = this.viewport.target.renderSystem.createBackgroundMapDrape(drapedTreeRef, this.viewport.backgroundDrapeMap);\n\n if (undefined !== drape)\n this.textureDrapes.set(id, drape);\n\n return drape;\n }\n\n /** @internal */\n public getTextureDrapeForModel(modelId: Id64String) {\n return this.textureDrapes.get(modelId);\n }\n\n /** @internal */\n public withGraphicType(type: TileGraphicType, func: () => void): void {\n const prevType = this._graphicType;\n this._graphicType = type;\n\n func();\n\n this._graphicType = prevType;\n }\n\n /** The graphics in the scene that will be drawn with depth. */\n public get graphics() { return this.scene.foreground; }\n /** The graphics that will be drawn behind everything else in the scene. */\n public get backgroundGraphics() { return this.scene.background; }\n /** The graphics that will be drawn in front of everything else in the scene. */\n public get overlayGraphics() { return this.scene.overlay; }\n /** @internal */\n public get planarClassifiers() { return this.scene.planarClassifiers; }\n /** @internal */\n public get textureDrapes() { return this.scene.textureDrapes; }\n\n /** @internal */\n public setVolumeClassifier(classifier: ActiveSpatialClassifier, modelId: Id64String): void {\n this.scene.volumeClassifier = { classifier, modelId };\n }\n}\n"]}
|
package/lib/esm/ViewManager.js
CHANGED
|
@@ -116,10 +116,10 @@ export class ViewManager {
|
|
|
116
116
|
this.inDynamicsMode = false;
|
|
117
117
|
const cursorVp = IModelApp.toolAdmin.cursorView;
|
|
118
118
|
if (cursorVp)
|
|
119
|
-
cursorVp.changeDynamics(undefined);
|
|
119
|
+
cursorVp.changeDynamics(undefined, undefined);
|
|
120
120
|
for (const vp of this._viewports) {
|
|
121
121
|
if (vp !== cursorVp)
|
|
122
|
-
vp.changeDynamics(undefined);
|
|
122
|
+
vp.changeDynamics(undefined, undefined);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewManager.js","sourceRoot":"","sources":["../../src/ViewManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAe,SAAS,EAAW,MAAM,qBAAqB,CAAC;AAG9F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAY,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAiB,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAmExD;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAW;IACf,cAAc,GAAG,KAAK,CAAC;IACvB,MAAM,GAAG,SAAS,CAAC;IACT,UAAU,GAAqB,EAAE,CAAC;IACnC,UAAU,GAAgB,EAAE,CAAC;IACrC,aAAa,CAAkB;IAC/B,iBAAiB,GAAG,KAAK,CAAC;IAC1B,kBAAkB,GAAG,KAAK,CAAC;IAC3B,WAAW,GAAG,KAAK,CAAC;IACpB,cAAc,CAAO;IAE7B,gBAAgB;IACA,gBAAgB,GAAsB,EAAE,CAAC;IAEjD,cAAc;QACpB,MAAM,QAAQ,GAAG,GAAG,EAAE;YACpB,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc;gBACnC,OAAO;YACT,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC/B,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;gBAChC,OAAO;YACT,CAAC;YACD,IAAI,SAA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,CAAC;IAC1G,IAAW,UAAU,KAAa,OAAO,OAAO,SAAS,CAAC,UAAU,yBAAyB,CAAC,CAAC,CAAC;IAChG,IAAW,YAAY,KAAa,OAAO,OAAO,SAAS,CAAC,UAAU,2BAA2B,CAAC,CAAC,CAAC;IACpG,IAAW,UAAU,KAAa,OAAO,OAAO,SAAS,CAAC,UAAU,yBAAyB,CAAC,CAAC,CAAC;IAChG,IAAW,UAAU,KAAa,OAAO,OAAO,SAAS,CAAC,UAAU,yBAAyB,CAAC,CAAC,CAAC;IAEhG;;OAEG;IACI,aAAa,CAAC,SAAiB,SAAS;QAC7C,IAAI,MAAM,KAAK,IAAI,CAAC,MAAM;YACxB,OAAO;QACT,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAK,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,MAAM,CAAC,QAAQ,CAAC,gBAAgB,GAAG,UAAU,CAAC;IAChD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\nimport { BeEvent, BentleyStatus, BeTimePoint, BeUiEvent, Id64Arg } from \"@itwin/core-bentley\";\nimport { GeometryStreamProps } from \"@itwin/core-common\";\nimport { HitDetail } from \"./HitDetail\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\nimport { DisclosedTileTreeSet, TileTree } from \"./tile/internal\";\nimport { BeButtonEvent, EventHandled } from \"./tools/Tool\";\nimport { ScreenViewport, ViewportDecorator } from \"./Viewport\";\nimport { System } from \"./internal/render/webgl/System\";\n\n/** Interface for drawing [decoration graphics]($docs/learning/frontend/ViewDecorations.md) into, or on top of, the active [[ScreenViewport]]s managed by [[ViewManager]].\n * Decorators generate [[Decorations]].\n * @public\n * @extensions\n */\nexport interface Decorator extends ViewportDecorator {\n /** If the [[decorate]] method created pickable graphics, return true if the supplied Id is from this Decorator.\n * @param id The Id of the currently selected pickable graphics.\n * @returns true if 'id' belongs to this Decorator\n */\n testDecorationHit?(id: string): boolean;\n\n /** If the [[decorate]] method created pickable graphics using a persistent element id instead of a transient id,\n * return true if the Decorator wants the opportunity to override the default persistent element behavior for\n * the supplied [[HitDetail]].\n * - Replace or augment the element's tooltip by implementing [[getDecorationToolTip]].\n * - Override the element's snap geometry by implementing [[getDecorationGeometry]].\n * - Handle button events as decorator events by implementing [[onDecorationButtonEvent]].\n * @param hit The HitDetail of the currently selected persistent element or pickable graphics using a persistent element id.\n * @returns true if this Decorator wants to override the default persistent element behavior.\n */\n overrideElementHit?(hit: HitDetail): boolean;\n\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to return the tooltip message for this Decorator.\n * @param hit The HitDetail about the decoration that was picked.\n * @returns A promise with the HTMLElement or string (that may contain HTML) with the tooltip message.\n */\n getDecorationToolTip?(hit: HitDetail): Promise<HTMLElement | string>;\n\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to handle a button event for this Decorator.\n * @param hit The HitDetail about the decoration that was picked.\n * @param ev The BeButtonEvent that identified this decoration.\n * @returns A Promise that resolves to Yes if event completely handled by decoration and event should not be processed by the calling tool.\n */\n onDecorationButtonEvent?(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled>;\n\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.\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\n * as snappable geometry and would just be displayed in dynamics.\n * @param hit The HitDetail about the decoration that was picked.\n * @returns GeometryStreamProps containing world coordinate snappable geometry for this decoration.\n */\n getDecorationGeometry?(hit: HitDetail): GeometryStreamProps | undefined;\n}\n\n/** Argument for [[ViewManager.onSelectedViewportChanged]]\n * @public\n * @extensions\n */\nexport interface SelectedViewportChangedArgs {\n current?: ScreenViewport;\n previous?: ScreenViewport;\n}\n\n/** An object that can contribute customizations to the tooltip displayed when mousing over an element or other entity in a [[Viewport]].\n * @see [[ViewManager.addToolTipProvider]] to register a tooltip provider.\n * @public\n */\nexport interface ToolTipProvider {\n /** Augment or replace the tooltip for the specified HitDetail.\n * @note To cooperate with other tooltip providers, prefer to *append* information to the input tooltip instead of replacing it entirely.\n */\n augmentToolTip(hit: HitDetail, tooltip: Promise<HTMLElement | string>): Promise<HTMLElement | string>;\n}\n\n/** The ViewManager holds the list of opened views, plus the *selected view*. It also provides notifications of view open/close and suspend/resume.\n * Applications must call [[addViewport]] when new Viewports that should be associated with user events are created.\n *\n * A single ViewManager is created when [[IModelApp.startup]] is called. It can be accessed via the static member [[IModelApp.viewManager]].\n *\n * The ViewManager controls the render loop, which causes the contents of each registered [[Viewport]] to update on the screen.\n * @public\n * @extensions\n */\nexport class ViewManager implements Iterable<ScreenViewport> {\n public inDynamicsMode = false;\n public cursor = \"default\";\n private readonly _viewports: ScreenViewport[] = [];\n public readonly decorators: Decorator[] = [];\n private _selectedView?: ScreenViewport;\n private _invalidateScenes = false;\n private _skipSceneCreation = false;\n private _doIdleWork = false;\n private _idleWorkTimer?: any;\n\n /** @internal */\n public readonly toolTipProviders: ToolTipProvider[] = [];\n\n private _beginIdleWork() {\n const idleWork = () => {\n if (undefined === this._idleWorkTimer)\n return;\n if (this._viewports.length > 0) {\n this._idleWorkTimer = undefined;\n return;\n }\n if (IModelApp.renderSystem.doIdleWork())\n this._idleWorkTimer = setTimeout(idleWork, 1);\n else\n this._idleWorkTimer = undefined;\n };\n\n if (undefined === this._idleWorkTimer)\n this._idleWorkTimer = setTimeout(idleWork, 1);\n }\n\n /** @internal */\n public onInitialized() {\n this.addDecorator(IModelApp.accuSnap);\n this.addDecorator(IModelApp.tentativePoint);\n this.addDecorator(IModelApp.accuDraw);\n this.addDecorator(IModelApp.toolAdmin);\n this.cursor = \"default\";\n\n const options = IModelApp.renderSystem.options;\n this._doIdleWork = true === options.doIdleWork;\n if (this._doIdleWork)\n this._beginIdleWork();\n }\n\n /** @internal */\n public onShutDown() {\n if (undefined !== this._idleWorkTimer) {\n clearTimeout(this._idleWorkTimer);\n this._idleWorkTimer = undefined;\n }\n this._viewports.map((viewport) => {\n if (!viewport.isDisposed)\n this.dropViewport(viewport, true);\n });\n this._viewports.length = 0;\n this.decorators.length = 0;\n this.toolTipProviders.length = 0;\n this._selectedView = undefined;\n }\n\n /** Returns true if the specified viewport is currently being managed by this ViewManager.\n * @see [[addViewport]] to enable management of a viewport and [[dropViewport]] to disable it.\n */\n public hasViewport(viewport: ScreenViewport) {\n return this._viewports.includes(viewport);\n }\n\n /** Called after the selected view changes.\n * @param old Previously selected viewport.\n * @param current Currently selected viewport.\n */\n public readonly onSelectedViewportChanged = new BeUiEvent<SelectedViewportChangedArgs>();\n\n /** Called after a view is opened. This can happen when the iModel is first opened or when a user opens a new view. */\n public readonly onViewOpen = new BeUiEvent<ScreenViewport>();\n\n /** Called after a view is closed. This can happen when the iModel is closed or when a user closes an open view. */\n public readonly onViewClose = new BeUiEvent<ScreenViewport>();\n\n /** Called after a view is suspended. This happens when the application is minimized or, on a tablet, when the application\n * is moved to the background.\n */\n public readonly onViewSuspend = new BeUiEvent<ScreenViewport>();\n\n /** Called after a suspended view is resumed. This can happen when a minimized application is restored\n * or, on a tablet, when the application is moved to the foreground.\n */\n public readonly onViewResume = new BeUiEvent<ScreenViewport>();\n\n /** Called at the beginning of each tick of the render loop, before any viewports have been updated.\n * The render loop is typically invoked by a requestAnimationFrame() callback. It will not be invoked if the ViewManager is tracking no viewports.\n * @note Due to the frequency of this event, avoid performing expensive work inside event listeners.\n * @see [[ViewManager.onFinishRender]]\n */\n public readonly onBeginRender = new BeEvent<() => void>();\n\n /** Called at the end of each tick of the render loop, after all viewports have been updated.\n * The render loop is typically invoked by a requestAnimationFrame() callback. It will not be invoked if the ViewManager is tracking no viewports.\n * @note Due to the frequency of this event, avoid performing expensive work inside event listeners.\n * @see [[ViewManager.onBeginRender]]\n */\n public readonly onFinishRender = new BeEvent<() => void>();\n\n /** @internal */\n public endDynamicsMode(): void {\n if (!this.inDynamicsMode)\n return;\n\n this.inDynamicsMode = false;\n\n const cursorVp = IModelApp.toolAdmin.cursorView;\n if (cursorVp)\n cursorVp.changeDynamics(undefined);\n\n for (const vp of this._viewports) {\n if (vp !== cursorVp)\n vp.changeDynamics(undefined);\n }\n }\n\n /** @internal */\n public beginDynamicsMode() { this.inDynamicsMode = true; }\n\n /** @internal */\n public get doesHostHaveFocus(): boolean { return document.hasFocus(); }\n\n /** Set the selected [[Viewport]] to undefined. */\n public clearSelectedView(): void {\n const previousVp = this.selectedView;\n this._selectedView = undefined;\n this.notifySelectedViewportChanged(previousVp, undefined);\n }\n\n /** Sets the selected [[Viewport]]. */\n public async setSelectedView(vp: ScreenViewport | undefined): Promise<BentleyStatus> {\n if (undefined === vp)\n vp = this.getFirstOpenView();\n\n if (vp === this.selectedView) // already the selected view\n return BentleyStatus.SUCCESS;\n\n if (undefined === vp) {\n this.clearSelectedView();\n return BentleyStatus.ERROR;\n }\n\n const previousVp = this.selectedView;\n this._selectedView = vp;\n\n this.notifySelectedViewportChanged(previousVp, vp);\n\n if (undefined === previousVp)\n await IModelApp.toolAdmin.startDefaultTool();\n\n return BentleyStatus.SUCCESS;\n }\n\n /** @internal */\n public notifySelectedViewportChanged(previous: ScreenViewport | undefined, current: ScreenViewport | undefined) {\n IModelApp.toolAdmin.onSelectedViewportChanged(previous, current);// eslint-disable-line @typescript-eslint/no-floating-promises\n this.onSelectedViewportChanged.emit({ previous, current });\n }\n\n /** The \"selected view\" is the default for certain operations. */\n public get selectedView(): ScreenViewport | undefined { return this._selectedView; }\n\n /** Get the first opened view. */\n public getFirstOpenView(): ScreenViewport | undefined { return this._viewports.length > 0 ? this._viewports[0] : undefined; }\n\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. */\n private updateRenderToScreen() {\n const renderToScreen = 1 === this._viewports.length;\n for (const vp of this)\n vp.rendersToScreen = renderToScreen;\n }\n\n /** Add a new Viewport to the list of opened views and create an EventController for it.\n * @param newVp the Viewport to add\n * @returns SUCCESS if vp was successfully added, ERROR if it was already present.\n * @note raises onViewOpen event with newVp.\n */\n public addViewport(newVp: ScreenViewport): BentleyStatus {\n if (this.hasViewport(newVp)) // make sure its not already added\n return BentleyStatus.ERROR;\n\n newVp.onViewManagerAdd();\n\n this._viewports.push(newVp);\n this.updateRenderToScreen();\n this.setSelectedView(newVp);// eslint-disable-line @typescript-eslint/no-floating-promises\n\n // Start up the render loop if necessary.\n if (1 === this._viewports.length)\n IModelApp.startEventLoop();\n\n this.onViewOpen.emit(newVp);\n\n return BentleyStatus.SUCCESS;\n }\n\n /** Remove a Viewport from the list of opened views, and optionally dispose of it.\n * Typically a Viewport is dropped when it is no longer of any use to the application, in which case it should also be\n * disposed of as it may hold significant GPU resources.\n * However in some cases a Viewport may be temporarily dropped to suspend rendering; and subsequently re-added to\n * resume rendering - for example, when the Viewport is temporarily hidden by other UI elements.\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.\n * Attempting to invoke any function on a Viewport after it has been disposed is an error.\n * @param vp the Viewport to remove.\n * @param disposeOfViewport Whether or not to dispose of the Viewport. Defaults to true.\n * @return SUCCESS if vp was successfully removed, ERROR if it was not present.\n * @note raises onViewClose event with vp.\n */\n public dropViewport(vp: ScreenViewport, disposeOfViewport: boolean = true): BentleyStatus {\n const index = this._viewports.indexOf(vp);\n if (index === -1)\n return BentleyStatus.ERROR;\n\n this.onViewClose.emit(vp);\n\n // make sure tools don't think the cursor is still in this viewport\n IModelApp.toolAdmin.forgetViewport(vp);\n\n vp.onViewManagerDrop();\n\n this._viewports.splice(index, 1);\n\n if (this.selectedView === vp) // if removed viewport was selectedView, set it to undefined.\n this.setSelectedView(undefined);// eslint-disable-line @typescript-eslint/no-floating-promises\n\n vp.rendersToScreen = false;\n this.updateRenderToScreen();\n\n if (disposeOfViewport)\n vp[Symbol.dispose]();\n\n if (this._doIdleWork && this._viewports.length === 0)\n this._beginIdleWork();\n\n return BentleyStatus.SUCCESS;\n }\n\n /** Iterate over the viewports registered with the view manager. */\n public [Symbol.iterator](): Iterator<ScreenViewport> {\n return this._viewports[Symbol.iterator]();\n }\n\n /** Instruct each registered [[Viewport]] that the cached [[Decorations]] for the specified `decorator` should be discarded and recreated on the next frame.\n * @see [[Viewport.invalidateCachedDecorations]] to invalidate the cached decorations for a single viewport.\n */\n public invalidateCachedDecorationsAllViews(decorator: ViewportDecorator): void {\n if (decorator.useCachedDecorations)\n for (const vp of this)\n vp.invalidateCachedDecorations(decorator);\n }\n\n /** Force each registered [[Viewport]] to regenerate its [[Decorations]] on the next frame. */\n public invalidateDecorationsAllViews(): void {\n for (const vp of this)\n vp.invalidateDecorations();\n }\n\n /** Force each registered [[Viewport]] to regenerate its [[FeatureSymbology.Overrides]] on the next frame.\n * This is rarely needed - viewports keep track of their own states to detect when the overrides need to be recreated.\n */\n public invalidateSymbologyOverridesAllViews(): void {\n for (const vp of this)\n vp.setFeatureOverrideProviderChanged();\n }\n\n /** @internal */\n public onSelectionSetChanged(_iModel: IModelConnection) {\n for (const vp of this)\n vp.markSelectionSetDirty();\n\n IModelApp.requestNextAnimation();\n }\n\n /** @internal */\n public invalidateViewportScenes(): void {\n for (const vp of this)\n vp.invalidateScene();\n }\n\n /** @internal */\n public validateViewportScenes(): void {\n for (const vp of this)\n vp.setValidScene();\n }\n\n /** Requests that [[Viewport.createScene]] be invoked for every viewport on the next frame.\n * This is rarely useful - viewports keep track of their own states to detect when the scene needs to be recreated.\n */\n public invalidateScenes(): void {\n this._invalidateScenes = true;\n IModelApp.requestNextAnimation();\n }\n\n /** @internal */\n public get sceneInvalidated(): boolean { return this._invalidateScenes; }\n\n /** Invoked by ToolAdmin event loop.\n * @internal\n */\n public renderLoop(): void {\n if (0 === this._viewports.length)\n return;\n if (this._skipSceneCreation)\n this.validateViewportScenes();\n else if (this._invalidateScenes)\n this.invalidateViewportScenes();\n\n this._invalidateScenes = false;\n\n this.onBeginRender.raiseEvent();\n\n for (const vp of this._viewports)\n vp.renderFrame();\n\n this.onFinishRender.raiseEvent();\n }\n\n /** Purge TileTrees that haven't been drawn since the specified time point and are not currently in use by any ScreenViewport.\n * Intended strictly for debugging purposes - TileAdmin takes care of properly purging.\n * @internal\n */\n public purgeTileTrees(olderThan: BeTimePoint): void {\n // A single viewport can display tiles from more than one IModelConnection.\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\n // NOTE: That won't catch external tile trees previously used by that viewport.\n const trees = new DisclosedTileTreeSet();\n const treesByIModel = new Map<IModelConnection, Set<TileTree>>();\n for (const vp of this._viewports) {\n vp.discloseTileTrees(trees);\n if (undefined === treesByIModel.get(vp.iModel))\n treesByIModel.set(vp.iModel, new Set<TileTree>());\n }\n\n for (const tree of trees) {\n let set = treesByIModel.get(tree.iModel);\n if (undefined === set) {\n set = new Set<TileTree>();\n treesByIModel.set(tree.iModel, set);\n }\n\n set.add(tree);\n }\n\n for (const entry of treesByIModel) {\n const iModel = entry[0];\n iModel.tiles.purge(olderThan, entry[1]);\n }\n }\n\n /** Compute the tooltip for a persistent element.\n * This method calls the backend method [Element.getToolTipMessage]($backend), and replaces all instances of `${localizeTag}` with localized string from IModelApp.i18n.\n */\n public async getElementToolTip(hit: HitDetail): Promise<HTMLElement | string> {\n const msg: string[] = await hit.iModel.getToolTipMessage(hit.sourceId); // wait for the locate message(s) from the backend\n return IModelApp.formatElementToolTip(msg);\n }\n\n /** Register a new [[ToolTipProvider]] to customize the locate tooltip.\n * @param provider The new tooltip provider to add.\n * @throws Error if `provider` is already registered.\n * @returns a function that may be called to remove this provider (in lieu of calling [[dropToolTipProvider]].)\n */\n public addToolTipProvider(provider: ToolTipProvider): () => void {\n if (this.toolTipProviders.includes(provider))\n throw new Error(\"tooltip provider already registered\");\n\n this.toolTipProviders.push(provider);\n return () => this.dropToolTipProvider(provider);\n }\n\n /** Drop (remove) a [[ToolTipProvider]] so it is no longer active.\n * @param provider The tooltip provider to drop.\n * @note Does nothing if provider is not currently active.\n */\n public dropToolTipProvider(provider: ToolTipProvider) {\n const index = this.toolTipProviders.indexOf(provider);\n if (index >= 0)\n this.toolTipProviders.splice(index, 1);\n }\n\n /** Add a new [[Decorator]] to display decorations into the active views.\n * @param decorator The new decorator to add.\n * @throws Error if decorator is already active.\n * @returns a function that may be called to remove this decorator (in lieu of calling [[dropDecorator]].)\n * @see [[dropDecorator]]\n */\n public addDecorator(decorator: Decorator): () => void {\n if (this.decorators.includes(decorator))\n throw new Error(\"decorator already registered\");\n\n this.decorators.push(decorator);\n this.invalidateDecorationsAllViews();\n return () => this.dropDecorator(decorator);\n }\n\n /** Drop (remove) a [[Decorator]] so it is no longer active.\n * @param decorator The Decorator to drop.\n * @returns true if the decorator was found and removed; false if the decorator was not found.\n */\n public dropDecorator(decorator: Decorator): boolean {\n const index = this.decorators.indexOf(decorator);\n if (index < 0)\n return false;\n\n this.invalidateCachedDecorationsAllViews(decorator);\n this.decorators.splice(index, 1);\n this.invalidateDecorationsAllViews();\n return true;\n }\n\n /** Get the tooltip for a pickable decoration.\n * @internal\n */\n public async getDecorationToolTip(hit: HitDetail): Promise<HTMLElement | string> {\n for (const decorator of this.decorators) {\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.getDecorationToolTip && decorator.testDecorationHit(hit.sourceId))\n return decorator.getDecorationToolTip(hit);\n }\n return hit.viewport ? hit.viewport.getToolTip(hit) : \"\";\n }\n\n /** Allow a pickable decoration to handle a button event that identified it for the SelectTool.\n * @internal\n */\n public async onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> {\n for (const decorator of IModelApp.viewManager.decorators) {\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.onDecorationButtonEvent && decorator.testDecorationHit(hit.sourceId))\n return decorator.onDecorationButtonEvent(hit, ev);\n }\n return EventHandled.No;\n }\n\n /** Allow a pickable decoration to be snapped to by AccuSnap or TentativePoint.\n * @internal\n */\n public getDecorationGeometry(hit: HitDetail): GeometryStreamProps | undefined {\n for (const decorator of IModelApp.viewManager.decorators) {\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.getDecorationGeometry && decorator.testDecorationHit(hit.sourceId))\n return decorator.getDecorationGeometry(hit);\n }\n return undefined;\n }\n\n /** Allow a pickable decoration created using a persistent element id to augment or replace the the persistent element's tooltip.\n * @internal\n */\n public async overrideElementToolTip(hit: HitDetail): Promise<HTMLElement | string> {\n for (const decorator of this.decorators) {\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.getDecorationToolTip && decorator.overrideElementHit(hit))\n return decorator.getDecorationToolTip(hit);\n }\n return this.getElementToolTip(hit);\n }\n\n /** Allow a pickable decoration created using a persistent element id to handle a button event that identified it for the SelectTool.\n * @internal\n */\n public async overrideElementButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> {\n for (const decorator of IModelApp.viewManager.decorators) {\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.onDecorationButtonEvent && decorator.overrideElementHit(hit))\n return decorator.onDecorationButtonEvent(hit, ev);\n }\n return EventHandled.No;\n }\n\n /** Allow a pickable decoration created using a persistent element id to control whether snapping uses the persistent element's geometry.\n * @internal\n */\n public overrideElementGeometry(hit: HitDetail): GeometryStreamProps | undefined {\n for (const decorator of IModelApp.viewManager.decorators) {\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.getDecorationGeometry && decorator.overrideElementHit(hit))\n return decorator.getDecorationGeometry(hit);\n }\n return undefined;\n }\n\n public get crossHairCursor(): string { return `url(${IModelApp.publicPath}cursors/crosshair.cur), crosshair`; }\n public get dynamicsCursor(): string { return `url(${IModelApp.publicPath}cursors/dynamics.cur), move`; }\n public get grabCursor(): string { return `url(${IModelApp.publicPath}cursors/openHand.cur), auto`; }\n public get grabbingCursor(): string { return `url(${IModelApp.publicPath}cursors/closedHand.cur), auto`; }\n public get walkCursor(): string { return `url(${IModelApp.publicPath}cursors/walk.cur), auto`; }\n public get rotateCursor(): string { return `url(${IModelApp.publicPath}cursors/rotate.cur), auto`; }\n public get lookCursor(): string { return `url(${IModelApp.publicPath}cursors/look.cur), auto`; }\n public get zoomCursor(): string { return `url(${IModelApp.publicPath}cursors/zoom.cur), auto`; }\n\n /** Change the cursor shown in all Viewports.\n * @param cursor The new cursor to display. If undefined, the default cursor is used.\n */\n public setViewCursor(cursor: string = \"default\") {\n if (cursor === this.cursor)\n return;\n this.cursor = cursor;\n for (const vp of this._viewports)\n vp.setCursor(cursor);\n }\n\n /** Intended strictly as a temporary solution for interactive editing applications, until official support for such apps is implemented.\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.\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).\n * @internal\n */\n public refreshForModifiedModels(modelIds: Id64Arg | undefined): void {\n for (const vp of this._viewports)\n vp.refreshForModifiedModels(modelIds);\n }\n\n /** Sets the number of [MSAA]($docs/learning/display/MSAA.md) samples for all currently- and subsequently-opened [[ScreenViewport]]s.\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\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\n * a higher-quality image but also may also reduce framerate.\n * @see [[Viewport.antialiasSamples]] to adjust the number of samples for a specific viewport.\n */\n public setAntialiasingAllViews(numSamples: number): void {\n for (const vp of this)\n vp.antialiasSamples = numSamples;\n\n System.instance.antialiasSamples = numSamples;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ViewManager.js","sourceRoot":"","sources":["../../src/ViewManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAe,SAAS,EAAW,MAAM,qBAAqB,CAAC;AAG9F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAY,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAiB,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAmExD;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAW;IACf,cAAc,GAAG,KAAK,CAAC;IACvB,MAAM,GAAG,SAAS,CAAC;IACT,UAAU,GAAqB,EAAE,CAAC;IACnC,UAAU,GAAgB,EAAE,CAAC;IACrC,aAAa,CAAkB;IAC/B,iBAAiB,GAAG,KAAK,CAAC;IAC1B,kBAAkB,GAAG,KAAK,CAAC;IAC3B,WAAW,GAAG,KAAK,CAAC;IACpB,cAAc,CAAO;IAE7B,gBAAgB;IACA,gBAAgB,GAAsB,EAAE,CAAC;IAEjD,cAAc;QACpB,MAAM,QAAQ,GAAG,GAAG,EAAE;YACpB,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc;gBACnC,OAAO;YACT,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC/B,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;gBAChC,OAAO;YACT,CAAC;YACD,IAAI,SAAS,CAAC,YAAY,CAAC,UAAU,EAAE;gBACrC,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,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C,CAAC,CAAC;IAChG,IAAW,YAAY,KAAa,OAAO,OAAO,SAAS,CAAC,UAAU,2BAA2B,CAAC,CAAC,CAAC;IACpG,IAAW,UAAU,KAAa,OAAO,OAAO,SAAS,CAAC,UAAU,yBAAyB,CAAC,CAAC,CAAC;IAChG,IAAW,UAAU,KAAa,OAAO,OAAO,SAAS,CAAC,UAAU,yBAAyB,CAAC,CAAC,CAAC;IAEhG;;OAEG;IACI,aAAa,CAAC,SAAiB,SAAS;QAC7C,IAAI,MAAM,KAAK,IAAI,CAAC,MAAM;YACxB,OAAO;QACT,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAK,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,MAAM,CAAC,QAAQ,CAAC,gBAAgB,GAAG,UAAU,CAAC;IAChD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\nimport { BeEvent, BentleyStatus, BeTimePoint, BeUiEvent, Id64Arg } from \"@itwin/core-bentley\";\nimport { GeometryStreamProps } from \"@itwin/core-common\";\nimport { HitDetail } from \"./HitDetail\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\nimport { DisclosedTileTreeSet, TileTree } from \"./tile/internal\";\nimport { BeButtonEvent, EventHandled } from \"./tools/Tool\";\nimport { ScreenViewport, ViewportDecorator } from \"./Viewport\";\nimport { System } from \"./internal/render/webgl/System\";\n\n/** Interface for drawing [decoration graphics]($docs/learning/frontend/ViewDecorations.md) into, or on top of, the active [[ScreenViewport]]s managed by [[ViewManager]].\n * Decorators generate [[Decorations]].\n * @public\n * @extensions\n */\nexport interface Decorator extends ViewportDecorator {\n /** If the [[decorate]] method created pickable graphics, return true if the supplied Id is from this Decorator.\n * @param id The Id of the currently selected pickable graphics.\n * @returns true if 'id' belongs to this Decorator\n */\n testDecorationHit?(id: string): boolean;\n\n /** If the [[decorate]] method created pickable graphics using a persistent element id instead of a transient id,\n * return true if the Decorator wants the opportunity to override the default persistent element behavior for\n * the supplied [[HitDetail]].\n * - Replace or augment the element's tooltip by implementing [[getDecorationToolTip]].\n * - Override the element's snap geometry by implementing [[getDecorationGeometry]].\n * - Handle button events as decorator events by implementing [[onDecorationButtonEvent]].\n * @param hit The HitDetail of the currently selected persistent element or pickable graphics using a persistent element id.\n * @returns true if this Decorator wants to override the default persistent element behavior.\n */\n overrideElementHit?(hit: HitDetail): boolean;\n\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to return the tooltip message for this Decorator.\n * @param hit The HitDetail about the decoration that was picked.\n * @returns A promise with the HTMLElement or string (that may contain HTML) with the tooltip message.\n */\n getDecorationToolTip?(hit: HitDetail): Promise<HTMLElement | string>;\n\n /** If [[testDecorationHit]] or [[overrideElementHit]] returned true, implement this method to handle a button event for this Decorator.\n * @param hit The HitDetail about the decoration that was picked.\n * @param ev The BeButtonEvent that identified this decoration.\n * @returns A Promise that resolves to Yes if event completely handled by decoration and event should not be processed by the calling tool.\n */\n onDecorationButtonEvent?(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled>;\n\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.\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\n * as snappable geometry and would just be displayed in dynamics.\n * @param hit The HitDetail about the decoration that was picked.\n * @returns GeometryStreamProps containing world coordinate snappable geometry for this decoration.\n */\n getDecorationGeometry?(hit: HitDetail): GeometryStreamProps | undefined;\n}\n\n/** Argument for [[ViewManager.onSelectedViewportChanged]]\n * @public\n * @extensions\n */\nexport interface SelectedViewportChangedArgs {\n current?: ScreenViewport;\n previous?: ScreenViewport;\n}\n\n/** An object that can contribute customizations to the tooltip displayed when mousing over an element or other entity in a [[Viewport]].\n * @see [[ViewManager.addToolTipProvider]] to register a tooltip provider.\n * @public\n */\nexport interface ToolTipProvider {\n /** Augment or replace the tooltip for the specified HitDetail.\n * @note To cooperate with other tooltip providers, prefer to *append* information to the input tooltip instead of replacing it entirely.\n */\n augmentToolTip(hit: HitDetail, tooltip: Promise<HTMLElement | string>): Promise<HTMLElement | string>;\n}\n\n/** The ViewManager holds the list of opened views, plus the *selected view*. It also provides notifications of view open/close and suspend/resume.\n * Applications must call [[addViewport]] when new Viewports that should be associated with user events are created.\n *\n * A single ViewManager is created when [[IModelApp.startup]] is called. It can be accessed via the static member [[IModelApp.viewManager]].\n *\n * The ViewManager controls the render loop, which causes the contents of each registered [[Viewport]] to update on the screen.\n * @public\n * @extensions\n */\nexport class ViewManager implements Iterable<ScreenViewport> {\n public inDynamicsMode = false;\n public cursor = \"default\";\n private readonly _viewports: ScreenViewport[] = [];\n public readonly decorators: Decorator[] = [];\n private _selectedView?: ScreenViewport;\n private _invalidateScenes = false;\n private _skipSceneCreation = false;\n private _doIdleWork = false;\n private _idleWorkTimer?: any;\n\n /** @internal */\n public readonly toolTipProviders: ToolTipProvider[] = [];\n\n private _beginIdleWork() {\n const idleWork = () => {\n if (undefined === this._idleWorkTimer)\n return;\n if (this._viewports.length > 0) {\n this._idleWorkTimer = undefined;\n return;\n }\n if (IModelApp.renderSystem.doIdleWork())\n this._idleWorkTimer = setTimeout(idleWork, 1);\n else\n this._idleWorkTimer = undefined;\n };\n\n if (undefined === this._idleWorkTimer)\n this._idleWorkTimer = setTimeout(idleWork, 1);\n }\n\n /** @internal */\n public onInitialized() {\n this.addDecorator(IModelApp.accuSnap);\n this.addDecorator(IModelApp.tentativePoint);\n this.addDecorator(IModelApp.accuDraw);\n this.addDecorator(IModelApp.toolAdmin);\n this.cursor = \"default\";\n\n const options = IModelApp.renderSystem.options;\n this._doIdleWork = true === options.doIdleWork;\n if (this._doIdleWork)\n this._beginIdleWork();\n }\n\n /** @internal */\n public onShutDown() {\n if (undefined !== this._idleWorkTimer) {\n clearTimeout(this._idleWorkTimer);\n this._idleWorkTimer = undefined;\n }\n this._viewports.map((viewport) => {\n if (!viewport.isDisposed)\n this.dropViewport(viewport, true);\n });\n this._viewports.length = 0;\n this.decorators.length = 0;\n this.toolTipProviders.length = 0;\n this._selectedView = undefined;\n }\n\n /** Returns true if the specified viewport is currently being managed by this ViewManager.\n * @see [[addViewport]] to enable management of a viewport and [[dropViewport]] to disable it.\n */\n public hasViewport(viewport: ScreenViewport) {\n return this._viewports.includes(viewport);\n }\n\n /** Called after the selected view changes.\n * @param old Previously selected viewport.\n * @param current Currently selected viewport.\n */\n public readonly onSelectedViewportChanged = new BeUiEvent<SelectedViewportChangedArgs>();\n\n /** Called after a view is opened. This can happen when the iModel is first opened or when a user opens a new view. */\n public readonly onViewOpen = new BeUiEvent<ScreenViewport>();\n\n /** Called after a view is closed. This can happen when the iModel is closed or when a user closes an open view. */\n public readonly onViewClose = new BeUiEvent<ScreenViewport>();\n\n /** Called after a view is suspended. This happens when the application is minimized or, on a tablet, when the application\n * is moved to the background.\n */\n public readonly onViewSuspend = new BeUiEvent<ScreenViewport>();\n\n /** Called after a suspended view is resumed. This can happen when a minimized application is restored\n * or, on a tablet, when the application is moved to the foreground.\n */\n public readonly onViewResume = new BeUiEvent<ScreenViewport>();\n\n /** Called at the beginning of each tick of the render loop, before any viewports have been updated.\n * The render loop is typically invoked by a requestAnimationFrame() callback. It will not be invoked if the ViewManager is tracking no viewports.\n * @note Due to the frequency of this event, avoid performing expensive work inside event listeners.\n * @see [[ViewManager.onFinishRender]]\n */\n public readonly onBeginRender = new BeEvent<() => void>();\n\n /** Called at the end of each tick of the render loop, after all viewports have been updated.\n * The render loop is typically invoked by a requestAnimationFrame() callback. It will not be invoked if the ViewManager is tracking no viewports.\n * @note Due to the frequency of this event, avoid performing expensive work inside event listeners.\n * @see [[ViewManager.onBeginRender]]\n */\n public readonly onFinishRender = new BeEvent<() => void>();\n\n /** @internal */\n public endDynamicsMode(): void {\n if (!this.inDynamicsMode)\n return;\n\n this.inDynamicsMode = false;\n\n const cursorVp = IModelApp.toolAdmin.cursorView;\n if (cursorVp)\n cursorVp.changeDynamics(undefined, undefined);\n\n for (const vp of this._viewports) {\n if (vp !== cursorVp)\n vp.changeDynamics(undefined, undefined);\n }\n }\n\n /** @internal */\n public beginDynamicsMode() { this.inDynamicsMode = true; }\n\n /** @internal */\n public get doesHostHaveFocus(): boolean { return document.hasFocus(); }\n\n /** Set the selected [[Viewport]] to undefined. */\n public clearSelectedView(): void {\n const previousVp = this.selectedView;\n this._selectedView = undefined;\n this.notifySelectedViewportChanged(previousVp, undefined);\n }\n\n /** Sets the selected [[Viewport]]. */\n public async setSelectedView(vp: ScreenViewport | undefined): Promise<BentleyStatus> {\n if (undefined === vp)\n vp = this.getFirstOpenView();\n\n if (vp === this.selectedView) // already the selected view\n return BentleyStatus.SUCCESS;\n\n if (undefined === vp) {\n this.clearSelectedView();\n return BentleyStatus.ERROR;\n }\n\n const previousVp = this.selectedView;\n this._selectedView = vp;\n\n this.notifySelectedViewportChanged(previousVp, vp);\n\n if (undefined === previousVp)\n await IModelApp.toolAdmin.startDefaultTool();\n\n return BentleyStatus.SUCCESS;\n }\n\n /** @internal */\n public notifySelectedViewportChanged(previous: ScreenViewport | undefined, current: ScreenViewport | undefined) {\n IModelApp.toolAdmin.onSelectedViewportChanged(previous, current);// eslint-disable-line @typescript-eslint/no-floating-promises\n this.onSelectedViewportChanged.emit({ previous, current });\n }\n\n /** The \"selected view\" is the default for certain operations. */\n public get selectedView(): ScreenViewport | undefined { return this._selectedView; }\n\n /** Get the first opened view. */\n public getFirstOpenView(): ScreenViewport | undefined { return this._viewports.length > 0 ? this._viewports[0] : undefined; }\n\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. */\n private updateRenderToScreen() {\n const renderToScreen = 1 === this._viewports.length;\n for (const vp of this)\n vp.rendersToScreen = renderToScreen;\n }\n\n /** Add a new Viewport to the list of opened views and create an EventController for it.\n * @param newVp the Viewport to add\n * @returns SUCCESS if vp was successfully added, ERROR if it was already present.\n * @note raises onViewOpen event with newVp.\n */\n public addViewport(newVp: ScreenViewport): BentleyStatus {\n if (this.hasViewport(newVp)) // make sure its not already added\n return BentleyStatus.ERROR;\n\n newVp.onViewManagerAdd();\n\n this._viewports.push(newVp);\n this.updateRenderToScreen();\n this.setSelectedView(newVp);// eslint-disable-line @typescript-eslint/no-floating-promises\n\n // Start up the render loop if necessary.\n if (1 === this._viewports.length)\n IModelApp.startEventLoop();\n\n this.onViewOpen.emit(newVp);\n\n return BentleyStatus.SUCCESS;\n }\n\n /** Remove a Viewport from the list of opened views, and optionally dispose of it.\n * Typically a Viewport is dropped when it is no longer of any use to the application, in which case it should also be\n * disposed of as it may hold significant GPU resources.\n * However in some cases a Viewport may be temporarily dropped to suspend rendering; and subsequently re-added to\n * resume rendering - for example, when the Viewport is temporarily hidden by other UI elements.\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.\n * Attempting to invoke any function on a Viewport after it has been disposed is an error.\n * @param vp the Viewport to remove.\n * @param disposeOfViewport Whether or not to dispose of the Viewport. Defaults to true.\n * @return SUCCESS if vp was successfully removed, ERROR if it was not present.\n * @note raises onViewClose event with vp.\n */\n public dropViewport(vp: ScreenViewport, disposeOfViewport: boolean = true): BentleyStatus {\n const index = this._viewports.indexOf(vp);\n if (index === -1)\n return BentleyStatus.ERROR;\n\n this.onViewClose.emit(vp);\n\n // make sure tools don't think the cursor is still in this viewport\n IModelApp.toolAdmin.forgetViewport(vp);\n\n vp.onViewManagerDrop();\n\n this._viewports.splice(index, 1);\n\n if (this.selectedView === vp) // if removed viewport was selectedView, set it to undefined.\n this.setSelectedView(undefined);// eslint-disable-line @typescript-eslint/no-floating-promises\n\n vp.rendersToScreen = false;\n this.updateRenderToScreen();\n\n if (disposeOfViewport)\n vp[Symbol.dispose]();\n\n if (this._doIdleWork && this._viewports.length === 0)\n this._beginIdleWork();\n\n return BentleyStatus.SUCCESS;\n }\n\n /** Iterate over the viewports registered with the view manager. */\n public [Symbol.iterator](): Iterator<ScreenViewport> {\n return this._viewports[Symbol.iterator]();\n }\n\n /** Instruct each registered [[Viewport]] that the cached [[Decorations]] for the specified `decorator` should be discarded and recreated on the next frame.\n * @see [[Viewport.invalidateCachedDecorations]] to invalidate the cached decorations for a single viewport.\n */\n public invalidateCachedDecorationsAllViews(decorator: ViewportDecorator): void {\n if (decorator.useCachedDecorations)\n for (const vp of this)\n vp.invalidateCachedDecorations(decorator);\n }\n\n /** Force each registered [[Viewport]] to regenerate its [[Decorations]] on the next frame. */\n public invalidateDecorationsAllViews(): void {\n for (const vp of this)\n vp.invalidateDecorations();\n }\n\n /** Force each registered [[Viewport]] to regenerate its [[FeatureSymbology.Overrides]] on the next frame.\n * This is rarely needed - viewports keep track of their own states to detect when the overrides need to be recreated.\n */\n public invalidateSymbologyOverridesAllViews(): void {\n for (const vp of this)\n vp.setFeatureOverrideProviderChanged();\n }\n\n /** @internal */\n public onSelectionSetChanged(_iModel: IModelConnection) {\n for (const vp of this)\n vp.markSelectionSetDirty();\n\n IModelApp.requestNextAnimation();\n }\n\n /** @internal */\n public invalidateViewportScenes(): void {\n for (const vp of this)\n vp.invalidateScene();\n }\n\n /** @internal */\n public validateViewportScenes(): void {\n for (const vp of this)\n vp.setValidScene();\n }\n\n /** Requests that [[Viewport.createScene]] be invoked for every viewport on the next frame.\n * This is rarely useful - viewports keep track of their own states to detect when the scene needs to be recreated.\n */\n public invalidateScenes(): void {\n this._invalidateScenes = true;\n IModelApp.requestNextAnimation();\n }\n\n /** @internal */\n public get sceneInvalidated(): boolean { return this._invalidateScenes; }\n\n /** Invoked by ToolAdmin event loop.\n * @internal\n */\n public renderLoop(): void {\n if (0 === this._viewports.length)\n return;\n if (this._skipSceneCreation)\n this.validateViewportScenes();\n else if (this._invalidateScenes)\n this.invalidateViewportScenes();\n\n this._invalidateScenes = false;\n\n this.onBeginRender.raiseEvent();\n\n for (const vp of this._viewports)\n vp.renderFrame();\n\n this.onFinishRender.raiseEvent();\n }\n\n /** Purge TileTrees that haven't been drawn since the specified time point and are not currently in use by any ScreenViewport.\n * Intended strictly for debugging purposes - TileAdmin takes care of properly purging.\n * @internal\n */\n public purgeTileTrees(olderThan: BeTimePoint): void {\n // A single viewport can display tiles from more than one IModelConnection.\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\n // NOTE: That won't catch external tile trees previously used by that viewport.\n const trees = new DisclosedTileTreeSet();\n const treesByIModel = new Map<IModelConnection, Set<TileTree>>();\n for (const vp of this._viewports) {\n vp.discloseTileTrees(trees);\n if (undefined === treesByIModel.get(vp.iModel))\n treesByIModel.set(vp.iModel, new Set<TileTree>());\n }\n\n for (const tree of trees) {\n let set = treesByIModel.get(tree.iModel);\n if (undefined === set) {\n set = new Set<TileTree>();\n treesByIModel.set(tree.iModel, set);\n }\n\n set.add(tree);\n }\n\n for (const entry of treesByIModel) {\n const iModel = entry[0];\n iModel.tiles.purge(olderThan, entry[1]);\n }\n }\n\n /** Compute the tooltip for a persistent element.\n * This method calls the backend method [Element.getToolTipMessage]($backend), and replaces all instances of `${localizeTag}` with localized string from IModelApp.i18n.\n */\n public async getElementToolTip(hit: HitDetail): Promise<HTMLElement | string> {\n const msg: string[] = await hit.iModel.getToolTipMessage(hit.sourceId); // wait for the locate message(s) from the backend\n return IModelApp.formatElementToolTip(msg);\n }\n\n /** Register a new [[ToolTipProvider]] to customize the locate tooltip.\n * @param provider The new tooltip provider to add.\n * @throws Error if `provider` is already registered.\n * @returns a function that may be called to remove this provider (in lieu of calling [[dropToolTipProvider]].)\n */\n public addToolTipProvider(provider: ToolTipProvider): () => void {\n if (this.toolTipProviders.includes(provider))\n throw new Error(\"tooltip provider already registered\");\n\n this.toolTipProviders.push(provider);\n return () => this.dropToolTipProvider(provider);\n }\n\n /** Drop (remove) a [[ToolTipProvider]] so it is no longer active.\n * @param provider The tooltip provider to drop.\n * @note Does nothing if provider is not currently active.\n */\n public dropToolTipProvider(provider: ToolTipProvider) {\n const index = this.toolTipProviders.indexOf(provider);\n if (index >= 0)\n this.toolTipProviders.splice(index, 1);\n }\n\n /** Add a new [[Decorator]] to display decorations into the active views.\n * @param decorator The new decorator to add.\n * @throws Error if decorator is already active.\n * @returns a function that may be called to remove this decorator (in lieu of calling [[dropDecorator]].)\n * @see [[dropDecorator]]\n */\n public addDecorator(decorator: Decorator): () => void {\n if (this.decorators.includes(decorator))\n throw new Error(\"decorator already registered\");\n\n this.decorators.push(decorator);\n this.invalidateDecorationsAllViews();\n return () => this.dropDecorator(decorator);\n }\n\n /** Drop (remove) a [[Decorator]] so it is no longer active.\n * @param decorator The Decorator to drop.\n * @returns true if the decorator was found and removed; false if the decorator was not found.\n */\n public dropDecorator(decorator: Decorator): boolean {\n const index = this.decorators.indexOf(decorator);\n if (index < 0)\n return false;\n\n this.invalidateCachedDecorationsAllViews(decorator);\n this.decorators.splice(index, 1);\n this.invalidateDecorationsAllViews();\n return true;\n }\n\n /** Get the tooltip for a pickable decoration.\n * @internal\n */\n public async getDecorationToolTip(hit: HitDetail): Promise<HTMLElement | string> {\n for (const decorator of this.decorators) {\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.getDecorationToolTip && decorator.testDecorationHit(hit.sourceId))\n return decorator.getDecorationToolTip(hit);\n }\n return hit.viewport ? hit.viewport.getToolTip(hit) : \"\";\n }\n\n /** Allow a pickable decoration to handle a button event that identified it for the SelectTool.\n * @internal\n */\n public async onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> {\n for (const decorator of IModelApp.viewManager.decorators) {\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.onDecorationButtonEvent && decorator.testDecorationHit(hit.sourceId))\n return decorator.onDecorationButtonEvent(hit, ev);\n }\n return EventHandled.No;\n }\n\n /** Allow a pickable decoration to be snapped to by AccuSnap or TentativePoint.\n * @internal\n */\n public getDecorationGeometry(hit: HitDetail): GeometryStreamProps | undefined {\n for (const decorator of IModelApp.viewManager.decorators) {\n if (undefined !== decorator.testDecorationHit && undefined !== decorator.getDecorationGeometry && decorator.testDecorationHit(hit.sourceId))\n return decorator.getDecorationGeometry(hit);\n }\n return undefined;\n }\n\n /** Allow a pickable decoration created using a persistent element id to augment or replace the the persistent element's tooltip.\n * @internal\n */\n public async overrideElementToolTip(hit: HitDetail): Promise<HTMLElement | string> {\n for (const decorator of this.decorators) {\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.getDecorationToolTip && decorator.overrideElementHit(hit))\n return decorator.getDecorationToolTip(hit);\n }\n return this.getElementToolTip(hit);\n }\n\n /** Allow a pickable decoration created using a persistent element id to handle a button event that identified it for the SelectTool.\n * @internal\n */\n public async overrideElementButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled> {\n for (const decorator of IModelApp.viewManager.decorators) {\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.onDecorationButtonEvent && decorator.overrideElementHit(hit))\n return decorator.onDecorationButtonEvent(hit, ev);\n }\n return EventHandled.No;\n }\n\n /** Allow a pickable decoration created using a persistent element id to control whether snapping uses the persistent element's geometry.\n * @internal\n */\n public overrideElementGeometry(hit: HitDetail): GeometryStreamProps | undefined {\n for (const decorator of IModelApp.viewManager.decorators) {\n if (undefined !== decorator.overrideElementHit && undefined !== decorator.getDecorationGeometry && decorator.overrideElementHit(hit))\n return decorator.getDecorationGeometry(hit);\n }\n return undefined;\n }\n\n public get crossHairCursor(): string { return `url(${IModelApp.publicPath}cursors/crosshair.cur), crosshair`; }\n public get dynamicsCursor(): string { return `url(${IModelApp.publicPath}cursors/dynamics.cur), move`; }\n public get grabCursor(): string { return `url(${IModelApp.publicPath}cursors/openHand.cur), auto`; }\n public get grabbingCursor(): string { return `url(${IModelApp.publicPath}cursors/closedHand.cur), auto`; }\n public get walkCursor(): string { return `url(${IModelApp.publicPath}cursors/walk.cur), auto`; }\n public get rotateCursor(): string { return `url(${IModelApp.publicPath}cursors/rotate.cur), auto`; }\n public get lookCursor(): string { return `url(${IModelApp.publicPath}cursors/look.cur), auto`; }\n public get zoomCursor(): string { return `url(${IModelApp.publicPath}cursors/zoom.cur), auto`; }\n\n /** Change the cursor shown in all Viewports.\n * @param cursor The new cursor to display. If undefined, the default cursor is used.\n */\n public setViewCursor(cursor: string = \"default\") {\n if (cursor === this.cursor)\n return;\n this.cursor = cursor;\n for (const vp of this._viewports)\n vp.setCursor(cursor);\n }\n\n /** Intended strictly as a temporary solution for interactive editing applications, until official support for such apps is implemented.\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.\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).\n * @internal\n */\n public refreshForModifiedModels(modelIds: Id64Arg | undefined): void {\n for (const vp of this._viewports)\n vp.refreshForModifiedModels(modelIds);\n }\n\n /** Sets the number of [MSAA]($docs/learning/display/MSAA.md) samples for all currently- and subsequently-opened [[ScreenViewport]]s.\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\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\n * a higher-quality image but also may also reduce framerate.\n * @see [[Viewport.antialiasSamples]] to adjust the number of samples for a specific viewport.\n */\n public setAntialiasingAllViews(numSamples: number): void {\n for (const vp of this)\n vp.antialiasSamples = numSamples;\n\n System.instance.antialiasSamples = numSamples;\n }\n}\n"]}
|
package/lib/esm/Viewport.d.ts
CHANGED
|
@@ -884,7 +884,7 @@ export declare abstract class Viewport implements Disposable, TileUser {
|
|
|
884
884
|
/** True if this is a 3d view with the camera turned on. */
|
|
885
885
|
get isCameraOn(): boolean;
|
|
886
886
|
/** @internal */
|
|
887
|
-
changeDynamics(dynamics: GraphicList | undefined): void;
|
|
887
|
+
changeDynamics(dynamics: GraphicList | undefined, overlay: GraphicList | undefined): void;
|
|
888
888
|
private _assigningFlashedId;
|
|
889
889
|
/** The Id of the currently-flashed object.
|
|
890
890
|
* The "flashed" visual effect is typically applied to the object in the viewport currently under the mouse cursor, to indicate
|