@itwin/core-frontend 4.0.0-dev.46 → 4.0.0-dev.50

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.
Files changed (122) hide show
  1. package/lib/cjs/ElementLocateManager.js +1 -1
  2. package/lib/cjs/ElementLocateManager.js.map +1 -1
  3. package/lib/cjs/SpatialViewState.d.ts.map +1 -1
  4. package/lib/cjs/SpatialViewState.js +2 -0
  5. package/lib/cjs/SpatialViewState.js.map +1 -1
  6. package/lib/cjs/ViewState.d.ts +2 -0
  7. package/lib/cjs/ViewState.d.ts.map +1 -1
  8. package/lib/cjs/ViewState.js.map +1 -1
  9. package/lib/cjs/Viewport.d.ts +2 -0
  10. package/lib/cjs/Viewport.d.ts.map +1 -1
  11. package/lib/cjs/Viewport.js +8 -4
  12. package/lib/cjs/Viewport.js.map +1 -1
  13. package/lib/cjs/render/MockRender.d.ts +4 -4
  14. package/lib/cjs/render/MockRender.js.map +1 -1
  15. package/lib/cjs/render/Pixel.d.ts +13 -4
  16. package/lib/cjs/render/Pixel.d.ts.map +1 -1
  17. package/lib/cjs/render/Pixel.js +16 -13
  18. package/lib/cjs/render/Pixel.js.map +1 -1
  19. package/lib/cjs/render/RenderSystem.d.ts +2 -2
  20. package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
  21. package/lib/cjs/render/RenderSystem.js.map +1 -1
  22. package/lib/cjs/render/VisibleFeature.js +2 -2
  23. package/lib/cjs/render/VisibleFeature.js.map +1 -1
  24. package/lib/cjs/render/webgl/BatchState.d.ts +3 -2
  25. package/lib/cjs/render/webgl/BatchState.d.ts.map +1 -1
  26. package/lib/cjs/render/webgl/BatchState.js +4 -3
  27. package/lib/cjs/render/webgl/BatchState.js.map +1 -1
  28. package/lib/cjs/render/webgl/DrawCommand.d.ts.map +1 -1
  29. package/lib/cjs/render/webgl/DrawCommand.js +4 -2
  30. package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
  31. package/lib/cjs/render/webgl/FeatureOverrides.d.ts +3 -3
  32. package/lib/cjs/render/webgl/FeatureOverrides.d.ts.map +1 -1
  33. package/lib/cjs/render/webgl/FeatureOverrides.js +24 -28
  34. package/lib/cjs/render/webgl/FeatureOverrides.js.map +1 -1
  35. package/lib/cjs/render/webgl/Graphic.d.ts +3 -3
  36. package/lib/cjs/render/webgl/Graphic.js.map +1 -1
  37. package/lib/cjs/render/webgl/RenderCommands.js +1 -1
  38. package/lib/cjs/render/webgl/RenderCommands.js.map +1 -1
  39. package/lib/cjs/render/webgl/SceneCompositor.d.ts.map +1 -1
  40. package/lib/cjs/render/webgl/SceneCompositor.js +13 -4
  41. package/lib/cjs/render/webgl/SceneCompositor.js.map +1 -1
  42. package/lib/cjs/render/webgl/System.d.ts +2 -2
  43. package/lib/cjs/render/webgl/System.js.map +1 -1
  44. package/lib/cjs/render/webgl/VisibleTileFeatures.js +6 -7
  45. package/lib/cjs/render/webgl/VisibleTileFeatures.js.map +1 -1
  46. package/lib/cjs/tile/GltfReader.d.ts +24 -1
  47. package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
  48. package/lib/cjs/tile/GltfReader.js +27 -3
  49. package/lib/cjs/tile/GltfReader.js.map +1 -1
  50. package/lib/cjs/tile/ImdlReader.d.ts +3 -2
  51. package/lib/cjs/tile/ImdlReader.d.ts.map +1 -1
  52. package/lib/cjs/tile/ImdlReader.js +34 -25
  53. package/lib/cjs/tile/ImdlReader.js.map +1 -1
  54. package/lib/cjs/tile/PrimaryTileTree.d.ts +5 -1
  55. package/lib/cjs/tile/PrimaryTileTree.d.ts.map +1 -1
  56. package/lib/cjs/tile/PrimaryTileTree.js +2 -0
  57. package/lib/cjs/tile/PrimaryTileTree.js.map +1 -1
  58. package/lib/cjs/tools/ClipViewTool.d.ts.map +1 -1
  59. package/lib/cjs/tools/ClipViewTool.js +5 -1
  60. package/lib/cjs/tools/ClipViewTool.js.map +1 -1
  61. package/lib/esm/ElementLocateManager.js +1 -1
  62. package/lib/esm/ElementLocateManager.js.map +1 -1
  63. package/lib/esm/SpatialViewState.d.ts.map +1 -1
  64. package/lib/esm/SpatialViewState.js +2 -0
  65. package/lib/esm/SpatialViewState.js.map +1 -1
  66. package/lib/esm/ViewState.d.ts +2 -0
  67. package/lib/esm/ViewState.d.ts.map +1 -1
  68. package/lib/esm/ViewState.js.map +1 -1
  69. package/lib/esm/Viewport.d.ts +2 -0
  70. package/lib/esm/Viewport.d.ts.map +1 -1
  71. package/lib/esm/Viewport.js +8 -4
  72. package/lib/esm/Viewport.js.map +1 -1
  73. package/lib/esm/render/MockRender.d.ts +4 -4
  74. package/lib/esm/render/MockRender.js.map +1 -1
  75. package/lib/esm/render/Pixel.d.ts +13 -4
  76. package/lib/esm/render/Pixel.d.ts.map +1 -1
  77. package/lib/esm/render/Pixel.js +17 -14
  78. package/lib/esm/render/Pixel.js.map +1 -1
  79. package/lib/esm/render/RenderSystem.d.ts +2 -2
  80. package/lib/esm/render/RenderSystem.d.ts.map +1 -1
  81. package/lib/esm/render/RenderSystem.js.map +1 -1
  82. package/lib/esm/render/VisibleFeature.js +2 -2
  83. package/lib/esm/render/VisibleFeature.js.map +1 -1
  84. package/lib/esm/render/webgl/BatchState.d.ts +3 -2
  85. package/lib/esm/render/webgl/BatchState.d.ts.map +1 -1
  86. package/lib/esm/render/webgl/BatchState.js +4 -3
  87. package/lib/esm/render/webgl/BatchState.js.map +1 -1
  88. package/lib/esm/render/webgl/DrawCommand.d.ts.map +1 -1
  89. package/lib/esm/render/webgl/DrawCommand.js +4 -2
  90. package/lib/esm/render/webgl/DrawCommand.js.map +1 -1
  91. package/lib/esm/render/webgl/FeatureOverrides.d.ts +3 -3
  92. package/lib/esm/render/webgl/FeatureOverrides.d.ts.map +1 -1
  93. package/lib/esm/render/webgl/FeatureOverrides.js +24 -28
  94. package/lib/esm/render/webgl/FeatureOverrides.js.map +1 -1
  95. package/lib/esm/render/webgl/Graphic.d.ts +3 -3
  96. package/lib/esm/render/webgl/Graphic.js.map +1 -1
  97. package/lib/esm/render/webgl/RenderCommands.js +1 -1
  98. package/lib/esm/render/webgl/RenderCommands.js.map +1 -1
  99. package/lib/esm/render/webgl/SceneCompositor.d.ts.map +1 -1
  100. package/lib/esm/render/webgl/SceneCompositor.js +14 -5
  101. package/lib/esm/render/webgl/SceneCompositor.js.map +1 -1
  102. package/lib/esm/render/webgl/System.d.ts +2 -2
  103. package/lib/esm/render/webgl/System.js.map +1 -1
  104. package/lib/esm/render/webgl/VisibleTileFeatures.js +7 -8
  105. package/lib/esm/render/webgl/VisibleTileFeatures.js.map +1 -1
  106. package/lib/esm/tile/GltfReader.d.ts +24 -1
  107. package/lib/esm/tile/GltfReader.d.ts.map +1 -1
  108. package/lib/esm/tile/GltfReader.js +24 -1
  109. package/lib/esm/tile/GltfReader.js.map +1 -1
  110. package/lib/esm/tile/ImdlReader.d.ts +3 -2
  111. package/lib/esm/tile/ImdlReader.d.ts.map +1 -1
  112. package/lib/esm/tile/ImdlReader.js +35 -26
  113. package/lib/esm/tile/ImdlReader.js.map +1 -1
  114. package/lib/esm/tile/PrimaryTileTree.d.ts +5 -1
  115. package/lib/esm/tile/PrimaryTileTree.d.ts.map +1 -1
  116. package/lib/esm/tile/PrimaryTileTree.js +2 -0
  117. package/lib/esm/tile/PrimaryTileTree.js.map +1 -1
  118. package/lib/esm/tools/ClipViewTool.d.ts.map +1 -1
  119. package/lib/esm/tools/ClipViewTool.js +5 -1
  120. package/lib/esm/tools/ClipViewTool.js.map +1 -1
  121. package/lib/public/locales/en/CoreTools.json +4 -0
  122. package/package.json +19 -19
@@ -1,5 +1,5 @@
1
1
  import { Transform } from "@itwin/core-geometry";
2
- import { ElementAlignedBox3d, PackedFeatureTable } from "@itwin/core-common";
2
+ import { ElementAlignedBox3d, RenderFeatureTable } from "@itwin/core-common";
3
3
  import { IModelAppOptions } from "../IModelApp";
4
4
  import { IModelConnection } from "../IModelConnection";
5
5
  import { ViewRect } from "../ViewRect";
@@ -89,9 +89,9 @@ export declare namespace MockRender {
89
89
  /** @internal */
90
90
  class Batch extends Graphic {
91
91
  readonly graphic: RenderGraphic;
92
- readonly featureTable: PackedFeatureTable;
92
+ readonly featureTable: RenderFeatureTable;
93
93
  readonly range: ElementAlignedBox3d;
94
- constructor(graphic: RenderGraphic, featureTable: PackedFeatureTable, range: ElementAlignedBox3d);
94
+ constructor(graphic: RenderGraphic, featureTable: RenderFeatureTable, range: ElementAlignedBox3d);
95
95
  dispose(): void;
96
96
  }
97
97
  /** @internal */
@@ -116,7 +116,7 @@ export declare namespace MockRender {
116
116
  createGraphic(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions): Builder;
117
117
  createGraphicList(primitives: RenderGraphic[]): List;
118
118
  createGraphicBranch(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions): Branch;
119
- createBatch(graphic: RenderGraphic, features: PackedFeatureTable, range: ElementAlignedBox3d): Batch;
119
+ createBatch(graphic: RenderGraphic, features: RenderFeatureTable, range: ElementAlignedBox3d): Batch;
120
120
  createMesh(_params: MeshParams): Graphic;
121
121
  createPolyline(_params: PolylineParams): Graphic;
122
122
  createPointString(_params: PointStringParams): Graphic;
@@ -1 +1 @@
1
- {"version":3,"file":"MockRender.js","sourceRoot":"","sources":["../../../src/render/MockRender.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAA8C;AAE9C,oDAAgG;AAChG,4CAA2D;AAE3D,0CAAuC;AAKvC,mFAA6E;AAK7E,mDAA6D;AAG7D,iDAAiF;AACjF,iDAA8C;AAG9C;;;;;;;;;;GAUG;AACH,IAAiB,UAAU,CAkJ1B;AAlJD,WAAiB,UAAU;IACzB,gBAAgB;IAChB,MAAsB,MAAO,SAAQ,2BAAY;QAC/C,YAAuC,OAAqB;YAAI,KAAK,EAAE,CAAC;YAAjC,YAAO,GAAP,OAAO,CAAc;QAAa,CAAC;QAE1E,IAAW,YAAY,KAAmB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAChE,IAAW,y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ACjE,MAAM,qBAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QACM,MAAM,CAAC,KAAK,CAAC,QAAQ;YAC1B,IAAI,CAAC,aAAa,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,yBAAyB,EAAE,CAAC;YAC3D,MAAM,qBAAS,CAAC,QAAQ,EAAE,CAAC;QAC7B,CAAC;QAES,MAAM,CAAC,yBAAyB,KAAK,OAAO,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC;;IAbvD,iBAAa,GAAkB,GAAG,EAAE,CAAC,GAAG,CAAC,yBAAyB,EAAE,CAAC;IADxE,cAAG,MAef,CAAA;AACH,CAAC,EAlJgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAkJ1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { dispose } from \"@itwin/core-bentley\";\r\nimport { Transform } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d, EmptyLocalization, PackedFeatureTable } from \"@itwin/core-common\";\r\nimport { IModelApp, IModelAppOptions } from \"../IModelApp\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { ViewRect } from \"../ViewRect\";\r\nimport { Decorations } from \"./Decorations\";\r\nimport { GraphicBranch, GraphicBranchOptions } from \"./GraphicBranch\";\r\nimport { CustomGraphicBuilderOptions, ViewportGraphicBuilderOptions } from \"./GraphicBuilder\";\r\nimport { Pixel } from \"./Pixel\";\r\nimport { PrimitiveBuilder } from \"./primitives/geometry/GeometryListBuilder\";\r\nimport { PointCloudArgs } from \"./primitives/PointCloudPrimitive\";\r\nimport { PointStringParams } from \"./primitives/PointStringParams\";\r\nimport { PolylineParams } from \"./primitives/PolylineParams\";\r\nimport { MeshParams } from \"./primitives/VertexTable\";\r\nimport { GraphicList, RenderGraphic } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlan } from \"./RenderPlan\";\r\nimport { RenderAreaPattern, RenderGeometry, RenderSystem } from \"./RenderSystem\";\r\nimport { RenderTarget } from \"./RenderTarget\";\r\nimport { Scene } from \"./Scene\";\r\n\r\n/** Contains extensible mock implementations of the various components of a RenderSystem, intended for use in tests.\r\n * Use these for tests instead of the default RenderSystem wherever possible because:\r\n * (1) Electron has a bug on Windows in which it fails to obtain a WebGLRenderingContext when running inside a VM (e.g., during CI job); and\r\n * (2) To decouple the logic which uses aspects of the RenderSystem from the full implementation.\r\n * Any and all of these types can be extended for the purposes of specific tests.\r\n * To use this:\r\n * (1) If overriding anything in the implementation supplied herein, pass a SystemFactory function to MockRender.App.systemFactory.\r\n * (2) Call MockRender.App.startup() instead of IModelApp.startup() before tests begin.\r\n * (3) Likewise call MockRender.App.shutdown() when finished. This resets the SystemFactory to its default.\r\n * @internal\r\n */\r\nexport namespace MockRender {\r\n /** @internal */\r\n export abstract class Target extends RenderTarget {\r\n protected constructor(private readonly _system: RenderSystem) { super(); }\r\n\r\n public get renderSystem(): RenderSystem { return this._system; }\r\n public get wantInvertBlackBackground() { return false; }\r\n public get analysisFraction() { return 0; }\r\n public set analysisFraction(_fraction: number) { }\r\n public changeScene(_scene: Scene) { }\r\n public changeDynamics(_dynamics?: GraphicList) { }\r\n public changeDecorations(_decs: Decorations) { }\r\n public changeRenderPlan(_plan: RenderPlan) { }\r\n public drawFrame(_sceneTime?: number) { }\r\n public updateViewRect() { return false; }\r\n public readPixels(_rect: ViewRect, _selector: Pixel.Selector, receiver: Pixel.Receiver, _excludeNonLocatable: boolean) { receiver(undefined); }\r\n public get screenSpaceEffects(): Iterable<string> { return []; }\r\n public set screenSpaceEffects(_effects: Iterable<string>) { }\r\n }\r\n\r\n /** @internal */\r\n export class OnScreenTarget extends Target {\r\n public constructor(system: RenderSystem, private readonly _canvas: HTMLCanvasElement) { super(system); }\r\n\r\n public get viewRect() { return new ViewRect(0, 0, this._canvas.clientWidth, this._canvas.clientHeight); }\r\n public setViewRect(_rect: ViewRect, _temp: boolean) { }\r\n }\r\n\r\n /** @internal */\r\n export class OffScreenTarget extends Target {\r\n public constructor(system: RenderSystem, private readonly _viewRect: ViewRect) { super(system); }\r\n\r\n public get viewRect() { return this._viewRect; }\r\n public setViewRect(rect: ViewRect, _temp: boolean) { this._viewRect.setFrom(rect); }\r\n }\r\n\r\n /** @internal */\r\n export class Builder extends PrimitiveBuilder {\r\n public constructor(system: System, options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions) {\r\n super(system, options);\r\n }\r\n }\r\n\r\n /** @internal */\r\n export class Graphic extends RenderGraphic {\r\n public constructor() { super(); }\r\n\r\n public dispose() { }\r\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\r\n }\r\n\r\n /** @internal */\r\n export class List extends Graphic {\r\n public constructor(public readonly graphics: RenderGraphic[]) { super(); }\r\n\r\n public override dispose() {\r\n for (const graphic of this.graphics)\r\n dispose(graphic);\r\n\r\n this.graphics.length = 0;\r\n }\r\n }\r\n\r\n /** @internal */\r\n export class Branch extends Graphic {\r\n public constructor(public readonly branch: GraphicBranch, public readonly transform: Transform, public readonly options?: GraphicBranchOptions) { super(); }\r\n\r\n public override dispose() { this.branch.dispose(); }\r\n }\r\n\r\n /** @internal */\r\n export class Batch extends Graphic {\r\n public constructor(public readonly graphic: RenderGraphic, public readonly featureTable: PackedFeatureTable, public readonly range: ElementAlignedBox3d) { super(); }\r\n\r\n public override dispose() {\r\n dispose(this.graphic);\r\n }\r\n }\r\n\r\n /** @internal */\r\n export class Geometry implements RenderGeometry {\r\n public dispose(): void { }\r\n public collectStatistics(): void { }\r\n }\r\n\r\n /** @internal */\r\n export class AreaPattern implements RenderAreaPattern {\r\n public dispose(): void { }\r\n public collectStatistics(): void { }\r\n }\r\n\r\n /** @internal */\r\n export class System extends RenderSystem {\r\n public get isValid() { return true; }\r\n public dispose(): void { }\r\n public override get maxTextureSize() { return 4096; }\r\n\r\n public constructor() { super(); }\r\n\r\n public doIdleWork(): boolean { return false; }\r\n\r\n public createTarget(canvas: HTMLCanvasElement): OnScreenTarget { return new OnScreenTarget(this, canvas); }\r\n public createOffscreenTarget(rect: ViewRect): RenderTarget { return new OffScreenTarget(this, rect); }\r\n\r\n public createGraphic(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions) {\r\n return new Builder(this, options);\r\n }\r\n\r\n public createGraphicList(primitives: RenderGraphic[]) { return new List(primitives); }\r\n public createGraphicBranch(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions) { return new Branch(branch, transform, options); }\r\n public createBatch(graphic: RenderGraphic, features: PackedFeatureTable, range: ElementAlignedBox3d) { return new Batch(graphic, features, range); }\r\n\r\n public override createMesh(_params: MeshParams) { return new Graphic(); }\r\n public override createPolyline(_params: PolylineParams) { return new Graphic(); }\r\n public override createPointString(_params: PointStringParams) { return new Graphic(); }\r\n public override createPointCloud(_args: PointCloudArgs, _imodel: IModelConnection) { return new Graphic(); }\r\n public override createRenderGraphic() { return new Graphic(); }\r\n\r\n public override createMeshGeometry() { return new Geometry(); }\r\n public override createPolylineGeometry() { return new Geometry(); }\r\n public override createPointStringGeometry() { return new Geometry(); }\r\n public override createAreaPattern() { return new AreaPattern(); }\r\n }\r\n\r\n /** @internal */\r\n export type SystemFactory = () => RenderSystem;\r\n\r\n /** An implementation of IModelApp which uses a MockRender.System by default.\r\n * @internal\r\n */\r\n export class App {\r\n public static systemFactory: SystemFactory = () => App.createDefaultRenderSystem();\r\n\r\n public static async startup(opts?: IModelAppOptions): Promise<void> {\r\n opts = opts ? opts : {};\r\n opts.renderSys = this.systemFactory();\r\n opts.localization = opts.localization ?? new EmptyLocalization();\r\n await IModelApp.startup(opts);\r\n }\r\n public static async shutdown(): Promise<void> {\r\n this.systemFactory = () => App.createDefaultRenderSystem();\r\n await IModelApp.shutdown();\r\n }\r\n\r\n protected static createDefaultRenderSystem() { return new System(); }\r\n }\r\n}\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AsB,KAAK,OAAO,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC;QACnD,yBAAyB,KAAK,OAAO,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC;QACtD,iBAAiB,KAAK,OAAO,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC;KAClE;IA9BY,iBAAM,SA8BlB,CAAA;IAKD;;OAEG;IACH,MAAa,GAAG;QAGP,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAuB;YACjD,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,+BAAiB,EAAE,CAAC;YACjE,MAAM,qBAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QACM,MAAM,CAAC,KAAK,CAAC,QAAQ;YAC1B,IAAI,CAAC,aAAa,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,yBAAyB,EAAE,CAAC;YAC3D,MAAM,qBAAS,CAAC,QAAQ,EAAE,CAAC;QAC7B,CAAC;QAES,MAAM,CAAC,yBAAyB,KAAK,OAAO,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC;;IAbvD,iBAAa,GAAkB,GAAG,EAAE,CAAC,GAAG,CAAC,yBAAyB,EAAE,CAAC;IADxE,cAAG,MAef,CAAA;AACH,CAAC,EAlJgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAkJ1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { dispose } from \"@itwin/core-bentley\";\r\nimport { Transform } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d, EmptyLocalization, RenderFeatureTable } from \"@itwin/core-common\";\r\nimport { IModelApp, IModelAppOptions } from \"../IModelApp\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { ViewRect } from \"../ViewRect\";\r\nimport { Decorations } from \"./Decorations\";\r\nimport { GraphicBranch, GraphicBranchOptions } from \"./GraphicBranch\";\r\nimport { CustomGraphicBuilderOptions, ViewportGraphicBuilderOptions } from \"./GraphicBuilder\";\r\nimport { Pixel } from \"./Pixel\";\r\nimport { PrimitiveBuilder } from \"./primitives/geometry/GeometryListBuilder\";\r\nimport { PointCloudArgs } from \"./primitives/PointCloudPrimitive\";\r\nimport { PointStringParams } from \"./primitives/PointStringParams\";\r\nimport { PolylineParams } from \"./primitives/PolylineParams\";\r\nimport { MeshParams } from \"./primitives/VertexTable\";\r\nimport { GraphicList, RenderGraphic } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlan } from \"./RenderPlan\";\r\nimport { RenderAreaPattern, RenderGeometry, RenderSystem } from \"./RenderSystem\";\r\nimport { RenderTarget } from \"./RenderTarget\";\r\nimport { Scene } from \"./Scene\";\r\n\r\n/** Contains extensible mock implementations of the various components of a RenderSystem, intended for use in tests.\r\n * Use these for tests instead of the default RenderSystem wherever possible because:\r\n * (1) Electron has a bug on Windows in which it fails to obtain a WebGLRenderingContext when running inside a VM (e.g., during CI job); and\r\n * (2) To decouple the logic which uses aspects of the RenderSystem from the full implementation.\r\n * Any and all of these types can be extended for the purposes of specific tests.\r\n * To use this:\r\n * (1) If overriding anything in the implementation supplied herein, pass a SystemFactory function to MockRender.App.systemFactory.\r\n * (2) Call MockRender.App.startup() instead of IModelApp.startup() before tests begin.\r\n * (3) Likewise call MockRender.App.shutdown() when finished. This resets the SystemFactory to its default.\r\n * @internal\r\n */\r\nexport namespace MockRender {\r\n /** @internal */\r\n export abstract class Target extends RenderTarget {\r\n protected constructor(private readonly _system: RenderSystem) { super(); }\r\n\r\n public get renderSystem(): RenderSystem { return this._system; }\r\n public get wantInvertBlackBackground() { return false; }\r\n public get analysisFraction() { return 0; }\r\n public set analysisFraction(_fraction: number) { }\r\n public changeScene(_scene: Scene) { }\r\n public changeDynamics(_dynamics?: GraphicList) { }\r\n public changeDecorations(_decs: Decorations) { }\r\n public changeRenderPlan(_plan: RenderPlan) { }\r\n public drawFrame(_sceneTime?: number) { }\r\n public updateViewRect() { return false; }\r\n public readPixels(_rect: ViewRect, _selector: Pixel.Selector, receiver: Pixel.Receiver, _excludeNonLocatable: boolean) { receiver(undefined); }\r\n public get screenSpaceEffects(): Iterable<string> { return []; }\r\n public set screenSpaceEffects(_effects: Iterable<string>) { }\r\n }\r\n\r\n /** @internal */\r\n export class OnScreenTarget extends Target {\r\n public constructor(system: RenderSystem, private readonly _canvas: HTMLCanvasElement) { super(system); }\r\n\r\n public get viewRect() { return new ViewRect(0, 0, this._canvas.clientWidth, this._canvas.clientHeight); }\r\n public setViewRect(_rect: ViewRect, _temp: boolean) { }\r\n }\r\n\r\n /** @internal */\r\n export class OffScreenTarget extends Target {\r\n public constructor(system: RenderSystem, private readonly _viewRect: ViewRect) { super(system); }\r\n\r\n public get viewRect() { return this._viewRect; }\r\n public setViewRect(rect: ViewRect, _temp: boolean) { this._viewRect.setFrom(rect); }\r\n }\r\n\r\n /** @internal */\r\n export class Builder extends PrimitiveBuilder {\r\n public constructor(system: System, options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions) {\r\n super(system, options);\r\n }\r\n }\r\n\r\n /** @internal */\r\n export class Graphic extends RenderGraphic {\r\n public constructor() { super(); }\r\n\r\n public dispose() { }\r\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\r\n }\r\n\r\n /** @internal */\r\n export class List extends Graphic {\r\n public constructor(public readonly graphics: RenderGraphic[]) { super(); }\r\n\r\n public override dispose() {\r\n for (const graphic of this.graphics)\r\n dispose(graphic);\r\n\r\n this.graphics.length = 0;\r\n }\r\n }\r\n\r\n /** @internal */\r\n export class Branch extends Graphic {\r\n public constructor(public readonly branch: GraphicBranch, public readonly transform: Transform, public readonly options?: GraphicBranchOptions) { super(); }\r\n\r\n public override dispose() { this.branch.dispose(); }\r\n }\r\n\r\n /** @internal */\r\n export class Batch extends Graphic {\r\n public constructor(public readonly graphic: RenderGraphic, public readonly featureTable: RenderFeatureTable, public readonly range: ElementAlignedBox3d) { super(); }\r\n\r\n public override dispose() {\r\n dispose(this.graphic);\r\n }\r\n }\r\n\r\n /** @internal */\r\n export class Geometry implements RenderGeometry {\r\n public dispose(): void { }\r\n public collectStatistics(): void { }\r\n }\r\n\r\n /** @internal */\r\n export class AreaPattern implements RenderAreaPattern {\r\n public dispose(): void { }\r\n public collectStatistics(): void { }\r\n }\r\n\r\n /** @internal */\r\n export class System extends RenderSystem {\r\n public get isValid() { return true; }\r\n public dispose(): void { }\r\n public override get maxTextureSize() { return 4096; }\r\n\r\n public constructor() { super(); }\r\n\r\n public doIdleWork(): boolean { return false; }\r\n\r\n public createTarget(canvas: HTMLCanvasElement): OnScreenTarget { return new OnScreenTarget(this, canvas); }\r\n public createOffscreenTarget(rect: ViewRect): RenderTarget { return new OffScreenTarget(this, rect); }\r\n\r\n public createGraphic(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions) {\r\n return new Builder(this, options);\r\n }\r\n\r\n public createGraphicList(primitives: RenderGraphic[]) { return new List(primitives); }\r\n public createGraphicBranch(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions) { return new Branch(branch, transform, options); }\r\n public createBatch(graphic: RenderGraphic, features: RenderFeatureTable, range: ElementAlignedBox3d) { return new Batch(graphic, features, range); }\r\n\r\n public override createMesh(_params: MeshParams) { return new Graphic(); }\r\n public override createPolyline(_params: PolylineParams) { return new Graphic(); }\r\n public override createPointString(_params: PointStringParams) { return new Graphic(); }\r\n public override createPointCloud(_args: PointCloudArgs, _imodel: IModelConnection) { return new Graphic(); }\r\n public override createRenderGraphic() { return new Graphic(); }\r\n\r\n public override createMeshGeometry() { return new Geometry(); }\r\n public override createPolylineGeometry() { return new Geometry(); }\r\n public override createPointStringGeometry() { return new Geometry(); }\r\n public override createAreaPattern() { return new AreaPattern(); }\r\n }\r\n\r\n /** @internal */\r\n export type SystemFactory = () => RenderSystem;\r\n\r\n /** An implementation of IModelApp which uses a MockRender.System by default.\r\n * @internal\r\n */\r\n export class App {\r\n public static systemFactory: SystemFactory = () => App.createDefaultRenderSystem();\r\n\r\n public static async startup(opts?: IModelAppOptions): Promise<void> {\r\n opts = opts ? opts : {};\r\n opts.renderSys = this.systemFactory();\r\n opts.localization = opts.localization ?? new EmptyLocalization();\r\n await IModelApp.startup(opts);\r\n }\r\n public static async shutdown(): Promise<void> {\r\n this.systemFactory = () => App.createDefaultRenderSystem();\r\n await IModelApp.shutdown();\r\n }\r\n\r\n protected static createDefaultRenderSystem() { return new System(); }\r\n }\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Rendering
3
3
  */
4
4
  import { Id64String } from "@itwin/core-bentley";
5
- import { Feature, GeometryClass, PackedFeatureTable } from "@itwin/core-common";
5
+ import { BatchType, Feature, GeometryClass, ModelFeature } from "@itwin/core-common";
6
6
  import { IModelConnection } from "../IModelConnection";
7
7
  /** Describes aspects of a pixel as read from a [[Viewport]].
8
8
  * @see [[Viewport.readPixels]].
@@ -14,6 +14,7 @@ export declare namespace Pixel {
14
14
  class Data {
15
15
  /** The feature that produced the pixel. */
16
16
  readonly feature?: Feature;
17
+ readonly modelId?: Id64String;
17
18
  /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */
18
19
  readonly distanceFraction: number;
19
20
  /** The type of geometry that produced the pixel. */
@@ -21,7 +22,7 @@ export declare namespace Pixel {
21
22
  /** The planarity of the geometry that produced the pixel. */
22
23
  readonly planarity: Planarity;
23
24
  /** @internal */
24
- readonly featureTable?: PackedFeatureTable;
25
+ readonly batchType?: BatchType;
25
26
  /** The iModel from which the geometry producing the pixel originated. */
26
27
  readonly iModel?: IModelConnection;
27
28
  /** @internal */
@@ -29,7 +30,15 @@ export declare namespace Pixel {
29
30
  /** @internal */
30
31
  get isClassifier(): boolean;
31
32
  /** @internal */
32
- constructor(feature?: Feature, distanceFraction?: number, type?: GeometryType, planarity?: Planarity, featureTable?: PackedFeatureTable, iModel?: IModelConnection, tileId?: string);
33
+ constructor(args?: {
34
+ feature?: ModelFeature;
35
+ distanceFraction?: number;
36
+ type?: GeometryType;
37
+ planarity?: Planarity;
38
+ batchType?: BatchType;
39
+ iModel?: IModelConnection;
40
+ tileId?: string;
41
+ });
33
42
  /** The Id of the element that produced the pixel. */
34
43
  get elementId(): Id64String | undefined;
35
44
  /** The Id of the [SubCategory]($backend) that produced the pixel. */
@@ -69,7 +78,7 @@ export declare namespace Pixel {
69
78
  */
70
79
  enum Selector {
71
80
  None = 0,
72
- /** Select the [[Feature]] which produced each pixel, as well as the [[PackedFeatureTable]] from which the feature originated. */
81
+ /** Select the [[Feature]] which produced each pixel. */
73
82
  Feature = 1,
74
83
  /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */
75
84
  GeometryAndDistance = 4,
@@ -1 +1 @@
1
- {"version":3,"file":"Pixel.d.ts","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAa,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;GAIG;AACH,yBAAiB,KAAK,CAAC;IACrB,0DAA0D;IAC1D,MAAa,IAAI;QACf,2CAA2C;QAC3C,SAAgB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClC,sHAAsH;QACtH,SAAgB,gBAAgB,EAAE,MAAM,CAAC;QACzC,oDAAoD;QACpD,SAAgB,IAAI,EAAE,YAAY,CAAC;QACnC,6DAA6D;QAC7D,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AS,CAAC;YACtB,SAAS,CAAC,EAAE,SAAS,CAAC;YACtB,MAAM,CAAC,EAAE,gBAAgB,CAAC;YAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB;QAYD,qDAAqD;QACrD,IAAW,SAAS,IAAI,UAAU,GAAG,SAAS,CAE7C;QAED,qEAAqE;QACrE,IAAW,aAAa,IAAI,UAAU,GAAG,SAAS,CAEjD;QAED,qDAAqD;QACrD,IAAW,aAAa,IAAI,aAAa,GAAG,SAAS,CAEpD;KACF;IAED,uEAAuE;IACvE,KAAY,YAAY;QACtB,qGAAqG;QACrG,OAAO,IAAA;QACP,8CAA8C;QAC9C,IAAI,IAAA;QACJ,qCAAqC;QACrC,OAAO,IAAA;QACP,yDAAyD;QACzD,MAAM,IAAA;QACN,uDAAuD;QACvD,IAAI,IAAA;QACJ,wEAAwE;QACxE,UAAU,IAAA;KACX;IAED,iFAAiF;IACjF,KAAY,SAAS;QACnB,0GAA0G;QAC1G,OAAO,IAAA;QACP,8CAA8C;QAC9C,IAAI,IAAA;QACJ,2CAA2C;QAC3C,MAAM,IAAA;QACN,+CAA+C;QAC/C,SAAS,IAAA;KACV;IAED;;;OAGG;IACH,KAAY,QAAQ;QAClB,IAAI,IAAI;QACR,wDAAwD;QACxD,OAAO,IAAS;QAChB,mJAAmJ;QACnJ,mBAAmB,IAAS;QAC5B,wCAAwC;QACxC,GAAG,IAAgC;KACpC;IAED;;;OAGG;IACH,UAAiB,MAAM;QACrB,gFAAgF;QAChF,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACtC;IAED;;OAEG;IACH,KAAY,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAC7D"}
@@ -19,28 +19,31 @@ var Pixel;
19
19
  /** Describes a single pixel within a [[Pixel.Buffer]]. */
20
20
  class Data {
21
21
  /** @internal */
22
- constructor(feature, distanceFraction = -1.0, type = GeometryType.Unknown, planarity = Planarity.Unknown, featureTable, iModel, tileId) {
23
- this.feature = feature;
24
- this.distanceFraction = distanceFraction;
25
- this.type = type;
26
- this.planarity = planarity;
27
- this.featureTable = featureTable;
28
- this.iModel = iModel;
29
- this.tileId = tileId;
22
+ constructor(args) {
23
+ if (args?.feature)
24
+ this.feature = new core_common_1.Feature(args.feature.elementId, args.feature.subCategoryId, args.feature.geometryClass);
25
+ this.modelId = args?.feature?.modelId;
26
+ this.distanceFraction = args?.distanceFraction ?? -1;
27
+ this.type = args?.type ?? GeometryType.Unknown;
28
+ this.planarity = args?.planarity ?? Planarity.Unknown;
29
+ this.iModel = args?.iModel;
30
+ this.tileId = args?.tileId;
30
31
  }
31
32
  /** @internal */
32
- get isClassifier() { return undefined !== this.featureTable && core_common_1.BatchType.Primary !== this.featureTable.type; }
33
+ get isClassifier() {
34
+ return undefined !== this.batchType && core_common_1.BatchType.Primary !== this.batchType;
35
+ }
33
36
  /** The Id of the element that produced the pixel. */
34
37
  get elementId() {
35
- return undefined !== this.feature ? this.feature.elementId : undefined;
38
+ return this.feature?.elementId;
36
39
  }
37
40
  /** The Id of the [SubCategory]($backend) that produced the pixel. */
38
41
  get subCategoryId() {
39
- return undefined !== this.feature ? this.feature.subCategoryId : undefined;
42
+ return this.feature?.subCategoryId;
40
43
  }
41
44
  /** The class of geometry that produced the pixel. */
42
45
  get geometryClass() {
43
- return undefined !== this.feature ? this.feature.geometryClass : undefined;
46
+ return this.feature?.geometryClass;
44
47
  }
45
48
  }
46
49
  Pixel.Data = Data;
@@ -79,7 +82,7 @@ var Pixel;
79
82
  let Selector;
80
83
  (function (Selector) {
81
84
  Selector[Selector["None"] = 0] = "None";
82
- /** Select the [[Feature]] which produced each pixel, as well as the [[PackedFeatureTable]] from which the feature originated. */
85
+ /** Select the [[Feature]] which produced each pixel. */
83
86
  Selector[Selector["Feature"] = 1] = "Feature";
84
87
  /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */
85
88
  Selector[Selector["GeometryAndDistance"] = 4] = "GeometryAndDistance";
@@ -1 +1 @@
1
- {"version":3,"file":"Pixel.js","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAA2F;AAG3F;;;;GAIG;AACH,IAAiB,KAAK,CAsGrB;AAtGD,WAAiB,KAAK;IACpB,0DAA0D;IAC1D,MAAa,IAAI;QAkBf,gBAAgB;QAChB,YAAmB,OAAiB,EAAE,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,YAAY,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,OAAO,EAAE,YAAiC,EAAE,MAAyB,EAAE,MAAe;YACtM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;YACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAZD,gBAAgB;QAChB,IAAW,YAAY,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,YAAY,IAAI,uBAAS,CAAC,OAAO,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAa9H,qDAAqD;QACrD,IAAW,SAAS;YAClB,OAAO,SAAS,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;QACzE,CAAC;QAED,qEAAqE;QACrE,IAAW,aAAa;YACtB,OAAO,SAAS,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,CAAC;QAED,qDAAqD;QACrD,IAAW,aAAa;YACtB,OAAO,SAAS,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,CAAC;KACF;IA3CY,UAAI,OA2ChB,CAAA;IAED,uEAAuE;IACvE,IAAY,YAaX;IAbD,WAAY,YAAY;QACtB,qGAAqG;QACrG,qDAAO,CAAA;QACP,8CAA8C;QAC9C,+CAAI,CAAA;QACJ,qCAAqC;QACrC,qDAAO,CAAA;QACP,yDAAyD;QACzD,mDAAM,CAAA;QACN,uDAAuD;QACvD,+CAAI,CAAA;QACJ,wEAAwE;QACxE,2DAAU,CAAA;IACZ,CAAC,EAbW,YAAY,GAAZ,kBAAY,KAAZ,kBAAY,QAavB;IAED,iFAAiF;IACjF,IAAY,SASX;IATD,WAAY,SAAS;QACnB,0GAA0G;QAC1G,+CAAO,CAAA;QACP,8CAA8C;QAC9C,yCAAI,CAAA;QACJ,2CAA2C;QAC3C,6CAAM,CAAA;QACN,+CAA+C;QAC/C,mDAAS,CAAA;IACX,CAAC,EATW,SAAS,GAAT,eAAS,KAAT,eAAS,QASpB;IAED;;;OAGG;IACH,IAAY,QAQX;IARD,WAAY,QAAQ;QAClB,uCAAQ,CAAA;QACR,iIAAiI;QACjI,6CAAgB,CAAA;QAChB,mJAAmJ;QACnJ,qEAA4B,CAAA;QAC5B,wCAAwC;QACxC,qCAAmC,CAAA;IACrC,CAAC,EARW,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAQnB;AAeH,CAAC,EAtGgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAsGrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature, GeometryClass, PackedFeatureTable } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Describes aspects of a pixel as read from a [[Viewport]].\r\n * @see [[Viewport.readPixels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Pixel {\r\n /** Describes a single pixel within a [[Pixel.Buffer]]. */\r\n export class Data {\r\n /** The feature that produced the pixel. */\r\n public readonly feature?: Feature;\r\n /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */\r\n public readonly distanceFraction: number;\r\n /** The type of geometry that produced the pixel. */\r\n public readonly type: GeometryType;\r\n /** The planarity of the geometry that produced the pixel. */\r\n public readonly planarity: Planarity;\r\n /** @internal */\r\n public readonly featureTable?: PackedFeatureTable;\r\n /** The iModel from which the geometry producing the pixel originated. */\r\n public readonly iModel?: IModelConnection;\r\n /** @internal */\r\n public readonly tileId?: string;\r\n /** @internal */\r\n public get isClassifier(): boolean { return undefined !== this.featureTable && BatchType.Primary !== this.featureTable.type; }\r\n\r\n /** @internal */\r\n public constructor(feature?: Feature, distanceFraction = -1.0, type = GeometryType.Unknown, planarity = Planarity.Unknown, featureTable?: PackedFeatureTable, iModel?: IModelConnection, tileId?: string) {\r\n this.feature = feature;\r\n this.distanceFraction = distanceFraction;\r\n this.type = type;\r\n this.planarity = planarity;\r\n this.featureTable = featureTable;\r\n this.iModel = iModel;\r\n this.tileId = tileId;\r\n }\r\n\r\n /** The Id of the element that produced the pixel. */\r\n public get elementId(): Id64String | undefined {\r\n return undefined !== this.feature ? this.feature.elementId : undefined;\r\n }\r\n\r\n /** The Id of the [SubCategory]($backend) that produced the pixel. */\r\n public get subCategoryId(): Id64String | undefined {\r\n return undefined !== this.feature ? this.feature.subCategoryId : undefined;\r\n }\r\n\r\n /** The class of geometry that produced the pixel. */\r\n public get geometryClass(): GeometryClass | undefined {\r\n return undefined !== this.feature ? this.feature.geometryClass : undefined;\r\n }\r\n }\r\n\r\n /** Describes the type of geometry that produced the [[Pixel.Data]]. */\r\n export enum GeometryType {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the type could not be determined. */\r\n Unknown, // Geometry was not selected, or type could not be determined\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** A surface produced this pixel. */\r\n Surface,\r\n /** A point primitive or polyline produced this pixel. */\r\n Linear,\r\n /** This pixel was produced by an edge of a surface. */\r\n Edge,\r\n /** This pixel was produced by a silhouette edge of a curved surface. */\r\n Silhouette,\r\n }\r\n\r\n /** Describes the planarity of the foremost geometry which produced the pixel. */\r\n export enum Planarity {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the planarity could not be determined. */\r\n Unknown,\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** Planar geometry produced this pixel. */\r\n Planar,\r\n /** Non-planar geometry produced this pixel. */\r\n NonPlanar,\r\n }\r\n\r\n /**\r\n * Bit-mask by which callers of [[Viewport.readPixels]] specify which aspects are of interest.\r\n * Aspects not specified will be omitted from the returned data.\r\n */\r\n export enum Selector {\r\n None = 0,\r\n /** Select the [[Feature]] which produced each pixel, as well as the [[PackedFeatureTable]] from which the feature originated. */\r\n Feature = 1 << 0, // eslint-disable-line @typescript-eslint/no-shadow\r\n /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */\r\n GeometryAndDistance = 1 << 2,\r\n /** Select all aspects of each pixel. */\r\n All = GeometryAndDistance | Feature,\r\n }\r\n\r\n /** A rectangular array of pixels as read from a [[Viewport]]'s frame buffer. Each pixel is represented as a [[Pixel.Data]] object.\r\n * The contents of the pixel buffer will be specified using device pixels, not CSS pixels. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[Viewport.readPixels]].\r\n */\r\n export interface Buffer {\r\n /** Retrieve the data associated with the pixel at (x,y) in view coordinates. */\r\n getPixel(x: number, y: number): Data;\r\n }\r\n\r\n /** A function which receives the results of a call to [[Viewport.readPixels]].\r\n * @note The contents of the buffer become invalid once the Receiver function returns. Do not store a reference to it.\r\n */\r\n export type Receiver = (pixels: Buffer | undefined) => void;\r\n}\r\n"]}
1
+ {"version":3,"file":"Pixel.js","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAAqF;AAGrF;;;;GAIG;AACH,IAAiB,KAAK,CAmHrB;AAnHD,WAAiB,KAAK;IACpB,0DAA0D;IAC1D,MAAa,IAAI;QAqBf,gBAAgB;QAChB,YAAmB,IAQlB;YACC,IAAI,IAAI,EAAE,OAAO;gBACf,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAE7G,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC;YACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,EAAE,gBAAgB,IAAI,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,IAAI,YAAY,CAAC,OAAO,CAAC;YAC/C,IAAI,CAAC,SAAS,GAAG,IAAI,EAAE,SAAS,IAAI,SAAS,CAAC,OAAO,CAAC;YACtD,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC;YAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC;QAC7B,CAAC;QAxBD,gBAAgB;QAChB,IAAW,YAAY;YACrB,OAAO,SAAS,KAAK,IAAI,CAAC,SAAS,IAAI,uBAAS,CAAC,OAAO,KAAK,IAAI,CAAC,SAAS,CAAC;QAC9E,CAAC;QAuBD,qDAAqD;QACrD,IAAW,SAAS;YAClB,OAAO,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC;QACjC,CAAC;QAED,qEAAqE;QACrE,IAAW,aAAa;YACtB,OAAO,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC;QACrC,CAAC;QAED,qDAAqD;QACrD,IAAW,aAAa;YACtB,OAAO,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC;QACrC,CAAC;KACF;IAxDY,UAAI,OAwDhB,CAAA;IAED,uEAAuE;IACvE,IAAY,YAaX;IAbD,WAAY,YAAY;QACtB,qGAAqG;QACrG,qDAAO,CAAA;QACP,8CAA8C;QAC9C,+CAAI,CAAA;QACJ,qCAAqC;QACrC,qDAAO,CAAA;QACP,yDAAyD;QACzD,mDAAM,CAAA;QACN,uDAAuD;QACvD,+CAAI,CAAA;QACJ,wEAAwE;QACxE,2DAAU,CAAA;IACZ,CAAC,EAbW,YAAY,GAAZ,kBAAY,KAAZ,kBAAY,QAavB;IAED,iFAAiF;IACjF,IAAY,SASX;IATD,WAAY,SAAS;QACnB,0GAA0G;QAC1G,+CAAO,CAAA;QACP,8CAA8C;QAC9C,yCAAI,CAAA;QACJ,2CAA2C;QAC3C,6CAAM,CAAA;QACN,+CAA+C;QAC/C,mDAAS,CAAA;IACX,CAAC,EATW,SAAS,GAAT,eAAS,KAAT,eAAS,QASpB;IAED;;;OAGG;IACH,IAAY,QAQX;IARD,WAAY,QAAQ;QAClB,uCAAQ,CAAA;QACR,wDAAwD;QACxD,6CAAgB,CAAA;QAChB,mJAAmJ;QACnJ,qEAA4B,CAAA;QAC5B,wCAAwC;QACxC,qCAAmC,CAAA;IACrC,CAAC,EARW,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAQnB;AAeH,CAAC,EAnHgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAmHrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature, GeometryClass, ModelFeature } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\n\r\n/** Describes aspects of a pixel as read from a [[Viewport]].\r\n * @see [[Viewport.readPixels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Pixel {\r\n /** Describes a single pixel within a [[Pixel.Buffer]]. */\r\n export class Data {\r\n /** The feature that produced the pixel. */\r\n public readonly feature?: Feature;\r\n public readonly modelId?: Id64String;\r\n /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */\r\n public readonly distanceFraction: number;\r\n /** The type of geometry that produced the pixel. */\r\n public readonly type: GeometryType;\r\n /** The planarity of the geometry that produced the pixel. */\r\n public readonly planarity: Planarity;\r\n /** @internal */\r\n public readonly batchType?: BatchType;\r\n /** The iModel from which the geometry producing the pixel originated. */\r\n public readonly iModel?: IModelConnection;\r\n /** @internal */\r\n public readonly tileId?: string;\r\n /** @internal */\r\n public get isClassifier(): boolean {\r\n return undefined !== this.batchType && BatchType.Primary !== this.batchType;\r\n }\r\n\r\n /** @internal */\r\n public constructor(args?: {\r\n feature?: ModelFeature;\r\n distanceFraction?: number;\r\n type?: GeometryType;\r\n planarity?: Planarity;\r\n batchType?: BatchType;\r\n iModel?: IModelConnection;\r\n tileId?: string;\r\n }) {\r\n if (args?.feature)\r\n this.feature = new Feature(args.feature.elementId, args.feature.subCategoryId, args.feature.geometryClass);\r\n\r\n this.modelId = args?.feature?.modelId;\r\n this.distanceFraction = args?.distanceFraction ?? -1;\r\n this.type = args?.type ?? GeometryType.Unknown;\r\n this.planarity = args?.planarity ?? Planarity.Unknown;\r\n this.iModel = args?.iModel;\r\n this.tileId = args?.tileId;\r\n }\r\n\r\n /** The Id of the element that produced the pixel. */\r\n public get elementId(): Id64String | undefined {\r\n return this.feature?.elementId;\r\n }\r\n\r\n /** The Id of the [SubCategory]($backend) that produced the pixel. */\r\n public get subCategoryId(): Id64String | undefined {\r\n return this.feature?.subCategoryId;\r\n }\r\n\r\n /** The class of geometry that produced the pixel. */\r\n public get geometryClass(): GeometryClass | undefined {\r\n return this.feature?.geometryClass;\r\n }\r\n }\r\n\r\n /** Describes the type of geometry that produced the [[Pixel.Data]]. */\r\n export enum GeometryType {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the type could not be determined. */\r\n Unknown, // Geometry was not selected, or type could not be determined\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** A surface produced this pixel. */\r\n Surface,\r\n /** A point primitive or polyline produced this pixel. */\r\n Linear,\r\n /** This pixel was produced by an edge of a surface. */\r\n Edge,\r\n /** This pixel was produced by a silhouette edge of a curved surface. */\r\n Silhouette,\r\n }\r\n\r\n /** Describes the planarity of the foremost geometry which produced the pixel. */\r\n export enum Planarity {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the planarity could not be determined. */\r\n Unknown,\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** Planar geometry produced this pixel. */\r\n Planar,\r\n /** Non-planar geometry produced this pixel. */\r\n NonPlanar,\r\n }\r\n\r\n /**\r\n * Bit-mask by which callers of [[Viewport.readPixels]] specify which aspects are of interest.\r\n * Aspects not specified will be omitted from the returned data.\r\n */\r\n export enum Selector {\r\n None = 0,\r\n /** Select the [[Feature]] which produced each pixel. */\r\n Feature = 1 << 0, // eslint-disable-line @typescript-eslint/no-shadow\r\n /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */\r\n GeometryAndDistance = 1 << 2,\r\n /** Select all aspects of each pixel. */\r\n All = GeometryAndDistance | Feature,\r\n }\r\n\r\n /** A rectangular array of pixels as read from a [[Viewport]]'s frame buffer. Each pixel is represented as a [[Pixel.Data]] object.\r\n * The contents of the pixel buffer will be specified using device pixels, not CSS pixels. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[Viewport.readPixels]].\r\n */\r\n export interface Buffer {\r\n /** Retrieve the data associated with the pixel at (x,y) in view coordinates. */\r\n getPixel(x: number, y: number): Data;\r\n }\r\n\r\n /** A function which receives the results of a call to [[Viewport.readPixels]].\r\n * @note The contents of the buffer become invalid once the Receiver function returns. Do not store a reference to it.\r\n */\r\n export type Receiver = (pixels: Buffer | undefined) => void;\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Rendering
3
3
  */
4
4
  import { Id64String, IDisposable } from "@itwin/core-bentley";
5
- import { ColorDef, ElementAlignedBox3d, Frustum, Gradient, ImageBuffer, ImageSource, ImageSourceFormat, PackedFeatureTable, RenderMaterial, RenderTexture, SkyGradient } from "@itwin/core-common";
5
+ import { ColorDef, ElementAlignedBox3d, Frustum, Gradient, ImageBuffer, ImageSource, ImageSourceFormat, RenderFeatureTable, RenderMaterial, RenderTexture, SkyGradient } from "@itwin/core-common";
6
6
  import { ClipVector, Matrix3d, Point3d, Range2d, Transform, Vector2d, XAndY } from "@itwin/core-geometry";
7
7
  import { WebGLExtensionName } from "@itwin/webgl-compatibility";
8
8
  import { IModelConnection } from "../IModelConnection";
@@ -337,7 +337,7 @@ export declare abstract class RenderSystem implements IDisposable {
337
337
  /** Create a RenderGraphic consisting of batched [[Feature]]s.
338
338
  * @internal
339
339
  */
340
- abstract createBatch(graphic: RenderGraphic, features: PackedFeatureTable, range: ElementAlignedBox3d, options?: BatchOptions): RenderGraphic;
340
+ abstract createBatch(graphic: RenderGraphic, features: RenderFeatureTable, range: ElementAlignedBox3d, options?: BatchOptions): RenderGraphic;
341
341
  /** Return a Promise which when resolved indicates that all pending external textures have finished loading from the backend. */
342
342
  waitForAllExternalTextures(): Promise<void>;
343
343
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"RenderSystem.d.ts","sourceRoot":"","sources":["../../../src/render/RenderSystem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAA4B,UAAU,EAAE,WAAW,EA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CAAC;IAEM,aAAa,CAAC,KAAwB;QAC3C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,mDAAmD;IAC5C,2BAA2B,CAAC,KAAuB,EAAE,KAAuB,EAAE,KAAuB,EAAE,KAAuB,EAAE,KAAuB,EAAE,KAAuB,EAAE,OAAyB,EAAE,OAA6B;QAC/O,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,gBAAgB;IACT,aAAa,KAAW,CAAC;IAEhC,gBAAgB;IACT,iBAAiB,CAAC,OAA0B,IAAU,CAAC;IAE9D,gBAAgB;IAChB,IAAW,kBAAkB,KAAc,OAAO,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC;IAElG;;OAEG;IACH,IAAW,YAAY,KAA2C,OAAO,SAAS,CAAC,CAAC,CAAC;IAErF,gBAAgB;IACT,iBAAiB,CAAC,MAA+B,IAAU,CAAC;IAEnE;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,KAAK,CAAC,kBAAkB;QACpC,MAAM,GAAG,GAAG,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,kCAAkC,CAAC,CAAC;QAC1F,OAAO,qBAAS,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;CACF;AAzeD,oCAyeC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { base64StringToUint8Array, Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport {\r\n ColorDef, ColorIndex, ElementAlignedBox3d, FeatureIndex, FeatureIndexType, FillFlags, Frustum, Gradient, ImageBuffer, ImageBufferFormat, ImageSource, ImageSourceFormat,\r\n isValidImageSourceFormat, PackedFeatureTable, QParams3d, QPoint3dList, RenderMaterial, RenderTexture, SkyGradient, TextureProps, TextureTransparency,\r\n} from \"@itwin/core-common\";\r\nimport { ClipVector, Matrix3d, Point2d, Point3d, Range2d, Range3d, Transform, Vector2d, XAndY } from \"@itwin/core-geometry\";\r\nimport { WebGLExtensionName } from \"@itwin/webgl-compatibility\";\r\nimport { imageElementFromImageSource } from \"../ImageUtil\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { MapTileTreeReference, TileTreeReference } from \"../tile/internal\";\r\nimport { ToolAdmin } from \"../tools/ToolAdmin\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { ViewRect } from \"../ViewRect\";\r\nimport { GraphicBranch, GraphicBranchOptions } from \"./GraphicBranch\";\r\nimport { BatchOptions, CustomGraphicBuilderOptions, GraphicBuilder, GraphicType, ViewportGraphicBuilderOptions } from \"./GraphicBuilder\";\r\nimport { InstancedGraphicParams, PatternGraphicParams } from \"./InstancedGraphicParams\";\r\nimport { MeshArgs, PolylineArgs } from \"./primitives/mesh/MeshPrimitives\";\r\nimport { RealityMeshGraphicParams } from \"./RealityMeshGraphicParams\";\r\nimport { RealityMeshParams } from \"./RealityMeshParams\";\r\nimport { PointCloudArgs } from \"./primitives/PointCloudPrimitive\";\r\nimport { PointStringParams } from \"./primitives/PointStringParams\";\r\nimport { PolylineParams } from \"./primitives/PolylineParams\";\r\nimport { MeshParams } from \"./primitives/VertexTable\";\r\nimport { RenderClipVolume } from \"./RenderClipVolume\";\r\nimport { RenderGraphic, RenderGraphicOwner } from \"./RenderGraphic\";\r\nimport { CreateRenderMaterialArgs } from \"./RenderMaterial\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderTarget } from \"./RenderTarget\";\r\nimport { CreateTextureArgs, CreateTextureFromSourceArgs, TextureCacheKey } from \"./RenderTexture\";\r\nimport { ScreenSpaceEffectBuilder, ScreenSpaceEffectBuilderParams } from \"./ScreenSpaceEffectBuilder\";\r\n\r\n/* eslint-disable no-restricted-syntax */\r\n// cSpell:ignore deserializing subcat uninstanced wiremesh qorigin trimesh\r\n\r\n/** An opaque representation of a texture draped on geometry within a [[Viewport]].\r\n * @internal\r\n */\r\nexport abstract class RenderTextureDrape implements IDisposable {\r\n public abstract dispose(): void;\r\n\r\n /** @internal */\r\n public abstract collectStatistics(stats: RenderMemory.Statistics): void;\r\n public abstract collectGraphics(context: SceneContext): void;\r\n}\r\n\r\n/** @internal */\r\nexport type TextureDrapeMap = Map<Id64String, RenderTextureDrape>;\r\n\r\n/** @internal */\r\nexport type MapLayerClassifiers = Map<number, RenderPlanarClassifier>;\r\n\r\n/** Describes a texture loaded from an HTMLImageElement\r\n * ###TODO Replace with TextureImage from RenderTexture.ts after we start returning transparency info from the backend.\r\n * @internal\r\n */\r\nexport interface OldTextureImage {\r\n /** The HTMLImageElement containing the texture's image data */\r\n image: HTMLImageElement;\r\n /** The format of the texture's image data */\r\n format: ImageSourceFormat;\r\n}\r\n\r\n/** @internal */\r\nexport enum RenderDiagnostics {\r\n /** No diagnostics enabled. */\r\n None = 0,\r\n /** Debugging output to browser console enabled. */\r\n DebugOutput = 1 << 1,\r\n /** Potentially expensive checks of WebGL state enabled. */\r\n WebGL = 1 << 2,\r\n /** All diagnostics enabled. */\r\n All = DebugOutput | WebGL,\r\n}\r\n\r\n/** @internal */\r\nexport interface GLTimerResult {\r\n /** Label from GLTimer.beginOperation */\r\n label: string;\r\n /** Time elapsed in nanoseconds, inclusive of child result times.\r\n * @note no-op queries seem to have 32ns of noise.\r\n */\r\n nanoseconds: number;\r\n /** Child results if GLTimer.beginOperation calls were nested */\r\n children?: GLTimerResult[];\r\n}\r\n\r\n/** @internal */\r\nexport type GLTimerResultCallback = (result: GLTimerResult) => void;\r\n\r\n/** Default implementation of RenderGraphicOwner. */\r\nclass GraphicOwner extends RenderGraphicOwner {\r\n public constructor(private readonly _graphic: RenderGraphic) { super(); }\r\n public get graphic(): RenderGraphic { return this._graphic; }\r\n}\r\n\r\n/** An interface optionally exposed by a RenderSystem that allows control of various debugging features.\r\n * @beta\r\n */\r\nexport interface RenderSystemDebugControl {\r\n /** Destroy this system's webgl context. Returns false if this behavior is not supported. */\r\n loseContext(): boolean;\r\n\r\n /** Overrides [[RenderSystem.dpiAwareLOD]].\r\n * @internal\r\n */\r\n dpiAwareLOD: boolean;\r\n\r\n /** Record GPU profiling information for each frame drawn. Check isGLTimerSupported before using.\r\n * @internal\r\n */\r\n resultsCallback?: GLTimerResultCallback;\r\n\r\n /** Returns true if the browser supports GPU profiling queries.\r\n * @internal\r\n */\r\n readonly isGLTimerSupported: boolean;\r\n\r\n /** Attempts to compile all shader programs and returns true if all were successful. May throw exceptions on errors.\r\n * This is useful for debugging shader compilation on specific platforms - especially those which use neither ANGLE nor SwiftShader (e.g., linux, mac, iOS)\r\n * because our unit tests which also compile all shaders run in software mode and therefore may not catch some \"errors\" (especially uniforms that have no effect on\r\n * program output).\r\n * @internal\r\n */\r\n compileAllShaders(): boolean;\r\n\r\n /** Obtain accumulated debug info collected during shader compilation. See `RenderSystem.Options.debugShaders`.\r\n * @internal\r\n */\r\n debugShaderFiles?: DebugShaderFile[];\r\n}\r\n\r\n/** @internal */\r\nexport abstract class RenderTerrainGeometry implements IDisposable, RenderMemory.Consumer {\r\n public abstract dispose(): void;\r\n public abstract get transform(): Transform | undefined;\r\n public abstract collectStatistics(stats: RenderMemory.Statistics): void;\r\n}\r\n\r\n/** @internal */\r\nexport class TerrainTexture {\r\n public constructor(\r\n public readonly texture: RenderTexture,\r\n public featureId: number,\r\n public readonly scale: Vector2d,\r\n public readonly translate: Vector2d,\r\n public readonly targetRectangle: Range2d,\r\n public readonly layerIndex: number,\r\n public transparency: number,\r\n public readonly clipRectangle?: Range2d\r\n ) { }\r\n\r\n public cloneWithClip(clipRectangle: Range2d) {\r\n return new TerrainTexture (this.texture, this.featureId, this.scale, this.translate, this.targetRectangle, this.layerIndex, this.transparency, clipRectangle);\r\n }\r\n}\r\n/** @internal */\r\nexport class DebugShaderFile {\r\n public constructor(\r\n public readonly filename: string,\r\n public readonly src: string,\r\n public isVS: boolean,\r\n public isGL: boolean,\r\n public isUsed: boolean\r\n ) { }\r\n}\r\n/** Transparency settings for planar grid display.\r\n * @alpha\r\n */\r\nexport class PlanarGridTransparency {\r\n /** Transparency for the grid plane. This should generally be fairly high to avoid obscuring other geometry */\r\n public readonly planeTransparency = .9;\r\n /** Transparency of the grid lines. This should be higher than the plane, but less than reference line transparency */\r\n public readonly lineTransparency = .75;\r\n /** Transparency of the reference lines. This should be less than plane or line transparency so that reference lines are more prominent */\r\n public readonly refTransparency = .5;\r\n}\r\n\r\n/** Settings for planar grid display.\r\n * @alpha\r\n */\r\nexport interface PlanarGridProps {\r\n /** The grid origin */\r\n origin: Point3d;\r\n /** The grid orientation. The grid X and Y direction are the first and second matrix rows */\r\n rMatrix: Matrix3d;\r\n /** The spacing between grid liens in the X and Y direction */\r\n spacing: XAndY;\r\n /** Grid lines per reference. If zero no reference lines are displayed. */\r\n gridsPerRef: number;\r\n /** Grid color. [[Use Viewport.getContrastToBackgroundColor]] to get best constrast color based on current background. */\r\n color: ColorDef;\r\n /** Transparency settings. If omitted then the [[PlanarGridTransparency]] defaults are used. */\r\n transparency?: PlanarGridTransparency;\r\n}\r\n\r\n/** An opaque representation of geometry allocated by a [[RenderSystem]] to be supplied to [[RenderSystem.createRenderGraphic]].\r\n * @internal\r\n */\r\nexport type RenderGeometry = IDisposable & RenderMemory.Consumer;\r\n\r\n/** An opaque representation of instructions for repeatedly drawing a [[RenderGeometry]] to pattern a planar region, to be supplied to [[RenderSystem.createRenderGraphic]].\r\n * @internal\r\n */\r\nexport type RenderAreaPattern = IDisposable & RenderMemory.Consumer;\r\n\r\n/** @internal */\r\nexport interface RenderSkyGradientParams {\r\n type: \"gradient\";\r\n gradient: SkyGradient;\r\n zOffset: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface RenderSkySphereParams {\r\n type: \"sphere\";\r\n texture: RenderTexture;\r\n rotation: number;\r\n zOffset: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface RenderSkyCubeParams {\r\n type: \"cube\";\r\n texture: RenderTexture;\r\n}\r\n\r\n/** @internal */\r\nexport type RenderSkyBoxParams = RenderSkyGradientParams | RenderSkySphereParams | RenderSkyCubeParams;\r\n\r\n/** A RenderSystem provides access to resources used by the internal WebGL-based rendering system.\r\n * An application rarely interacts directly with the RenderSystem; instead it interacts with types like [[Viewport]] which\r\n * coordinate with the RenderSystem on the application's behalf.\r\n * @see [Display system overview]($docs/learning/display/index.md)\r\n * @see [[IModelApp.renderSystem]].\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class RenderSystem implements IDisposable {\r\n /** Options used to initialize the RenderSystem. These are primarily used for feature-gating.\r\n * This object is frozen and cannot be modified after the RenderSystem is created.\r\n * @internal\r\n */\r\n public readonly options: RenderSystem.Options;\r\n\r\n /** Antialias samples to use on all subsequently created render targets.\r\n * Default value: undefined (no antialiasing)\r\n * @beta\r\n */\r\n public antialiasSamples?: number;\r\n\r\n /** Initialize the RenderSystem with the specified options.\r\n * @note The RenderSystem takes ownership of the supplied Options and freezes it.\r\n * @internal\r\n */\r\n protected constructor(options?: RenderSystem.Options) {\r\n this.options = undefined !== options ? options : {};\r\n Object.freeze(this.options);\r\n if (undefined !== this.options.disabledExtensions)\r\n Object.freeze(this.options.disabledExtensions);\r\n }\r\n\r\n /** @internal */\r\n public abstract get isValid(): boolean;\r\n\r\n /** @internal */\r\n public abstract dispose(): void;\r\n\r\n /** @internal */\r\n public get maxTextureSize(): number { return 0; }\r\n\r\n /** @internal */\r\n public get supportsCreateImageBitmap(): boolean { return false; }\r\n\r\n /** @internal */\r\n public get dpiAwareLOD(): boolean { return true === this.options.dpiAwareLOD; }\r\n\r\n /** @internal */\r\n public get isMobile(): boolean { return false; }\r\n\r\n /** @internal */\r\n public abstract createTarget(canvas: HTMLCanvasElement): RenderTarget;\r\n /** @internal */\r\n public abstract createOffscreenTarget(rect: ViewRect): RenderTarget;\r\n\r\n /** Perform a small unit of idle work and return true if more idle work remains to be done. This function is invoked on each tick of the javascript event loop as long as no viewports are registered with the ViewManager, until it returns false to indicate all idle work has been completed.\r\n * @internal\r\n */\r\n public abstract doIdleWork(): boolean;\r\n\r\n /** Find a previously-created [RenderMaterial]($common) by its ID.\r\n * @param _key The unique ID of the material within the context of the IModelConnection. Typically an element ID.\r\n * @param _imodel The IModelConnection with which the material is associated.\r\n * @returns A previously-created material matching the specified ID, or undefined if no such material exists.\r\n */\r\n public findMaterial(_key: string, _imodel: IModelConnection): RenderMaterial | undefined { return undefined; }\r\n\r\n /** Create a [RenderMaterial]($common) from parameters\r\n * If the parameters include a non-empty key, and no previously-created material already exists with that key, the newly-created material will be cached on the IModelConnection such\r\n * that it can later be retrieved by the same key using [[RenderSystem.findMaterial]].\r\n * @param _params A description of the material's properties.\r\n * @param _imodel The IModelConnection associated with the material.\r\n * @returns the newly-created material, or undefined if the material could not be created or if a material with the same key as that specified in the params already exists.\r\n * @deprecated in 3.x. Use [[createRenderMaterial]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createMaterial(_params: RenderMaterial.Params, _imodel: IModelConnection): RenderMaterial | undefined { return undefined; }\r\n\r\n /** Create a [RenderMaterial]($common).\r\n * @see [[CreateRenderMaterialArgs]] for a description of the material parameters.\r\n */\r\n public createRenderMaterial(_args: CreateRenderMaterialArgs): RenderMaterial | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Creates a [[GraphicBuilder]] for creating a [[RenderGraphic]].\r\n * @param placement The local-to-world transform in which the builder's geometry is to be defined.\r\n * @param type The type of builder to create.\r\n * @param viewport The viewport in which the resultant [[RenderGraphic]] will be rendered.\r\n * @param pickableId If the decoration is to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\r\n * @returns A builder for creating a [[RenderGraphic]] of the specified type appropriate for rendering within the specified viewport.\r\n * @see [[IModelConnection.transientIds]] for obtaining an ID for a pickable decoration.\r\n * @see [[RenderContext.createGraphicBuilder]].\r\n * @see [[Decorator]]\r\n */\r\n public createGraphicBuilder(placement: Transform, type: GraphicType, viewport: Viewport, pickableId?: Id64String): GraphicBuilder {\r\n const pickable = undefined !== pickableId ? { id: pickableId } : undefined;\r\n return this.createGraphic({ type, viewport, placement, pickable });\r\n }\r\n\r\n /** Obtain a [[GraphicBuilder]] from which to produce a [[RenderGraphic]].\r\n * @param options Options describing how to create the builder.\r\n * @returns A builder that produces a [[RenderGraphic]].\r\n */\r\n public abstract createGraphic(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions): GraphicBuilder;\r\n\r\n /** Obtain an object capable of producing a custom screen-space effect to be applied to the image rendered by a [[Viewport]].\r\n * @returns undefined if screen-space effects are not supported by this RenderSystem.\r\n */\r\n public createScreenSpaceEffectBuilder(_params: ScreenSpaceEffectBuilderParams): ScreenSpaceEffectBuilder | undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public createTriMesh(args: MeshArgs, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n const params = MeshParams.create(args);\r\n return this.createMesh(params, instances);\r\n }\r\n\r\n /** @internal */\r\n public createIndexedPolylines(args: PolylineArgs, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n if (args.flags.isDisjoint) {\r\n const pointStringParams = PointStringParams.create(args);\r\n return undefined !== pointStringParams ? this.createPointString(pointStringParams, instances) : undefined;\r\n } else {\r\n const polylineParams = PolylineParams.create(args);\r\n return undefined !== polylineParams ? this.createPolyline(polylineParams, instances) : undefined;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public createMeshGeometry(_params: MeshParams, _viewIndependentOrigin?: Point3d): RenderGeometry | undefined { return undefined; }\r\n /** @internal */\r\n public createPolylineGeometry(_params: PolylineParams, _viewIndependentOrigin?: Point3d): RenderGeometry | undefined { return undefined; }\r\n /** @internal */\r\n public createPointStringGeometry(_params: PointStringParams, _viewIndependentOrigin?: Point3d): RenderGeometry | undefined { return undefined; }\r\n\r\n /** @internal */\r\n public createAreaPattern(_params: PatternGraphicParams): RenderAreaPattern | undefined { return undefined; }\r\n\r\n /** Create a RenderGraphic from a RenderGeometry produced by this RenderSystem.\r\n * @internal\r\n */\r\n public abstract createRenderGraphic(_geometry: RenderGeometry, instances?: InstancedGraphicParams | RenderAreaPattern): RenderGraphic | undefined;\r\n\r\n private createGraphicFromGeometry(\r\n createGeometry: (viewIndependentOrigin?: Point3d) => RenderGeometry | undefined,\r\n instancesOrOrigin?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n let viOrigin;\r\n let instances;\r\n if (instancesOrOrigin instanceof Point3d)\r\n viOrigin = instancesOrOrigin;\r\n else\r\n instances = instancesOrOrigin;\r\n\r\n const geom = createGeometry(viOrigin);\r\n return geom ? this.createRenderGraphic(geom, instances) : undefined;\r\n }\r\n\r\n /** @internal */\r\n public createMesh(params: MeshParams, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n return this.createGraphicFromGeometry((viOrigin) => this.createMeshGeometry(params, viOrigin), instances);\r\n }\r\n\r\n /** @internal */\r\n public createPolyline(params: PolylineParams, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n return this.createGraphicFromGeometry((origin) => this.createPolylineGeometry(params, origin), instances);\r\n }\r\n\r\n /** @internal */\r\n public createPointString(params: PointStringParams, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n return this.createGraphicFromGeometry((origin) => this.createPointStringGeometry(params, origin), instances);\r\n }\r\n\r\n /** @internal */\r\n public createTerrainMesh(_params: RealityMeshParams, _transform?: Transform, _disableTextureDisposal = false): RenderTerrainGeometry | undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public createRealityMeshGraphic(_params: RealityMeshGraphicParams, _disableTextureDisposal = false): RenderGraphic | undefined { return undefined; }\r\n /** @internal */\r\n public createRealityMesh(_realityMesh: RealityMeshParams, _disableTextureDisposal = false): RenderGraphic | undefined { return undefined; }\r\n /** @internal */\r\n public get maxRealityImageryLayers() { return 0; }\r\n /** @internal */\r\n public createPointCloud(_args: PointCloudArgs, _imodel: IModelConnection): RenderGraphic | undefined { return undefined; }\r\n\r\n /** Create a clip volume to clip geometry.\r\n * @note The clip volume takes ownership of the ClipVector, which must not be subsequently mutated.\r\n * @param _clipVector Defines how the volume clips geometry.\r\n * @returns A clip volume, or undefined if, e.g., the clip vector does not clip anything.\r\n */\r\n public createClipVolume(_clipVector: ClipVector): RenderClipVolume | undefined { return undefined; }\r\n\r\n /** @internal */\r\n public createPlanarGrid(_frustum: Frustum, _grid: PlanarGridProps): RenderGraphic | undefined { return undefined; }\r\n /** @internal */\r\n public createBackgroundMapDrape(_drapedTree: TileTreeReference, _mapTree: MapTileTreeReference): RenderTextureDrape | undefined { return undefined; }\r\n /** @internal */\r\n public createTile(tileTexture: RenderTexture, corners: Point3d[], featureIndex?: number): RenderGraphic | undefined {\r\n // corners\r\n // [0] [1]\r\n // [2] [3]\r\n // Quantize the points according to their range\r\n const points = new QPoint3dList(QParams3d.fromRange(Range3d.create(...corners)));\r\n for (let i = 0; i < 4; i++)\r\n points.add(corners[i]);\r\n\r\n // Now remove the translation from the quantized points and put it into a transform instead.\r\n // This prevents graphical artifacts when quantization origin is large relative to quantization scale.\r\n // ###TODO: Would be better not to create a branch for every tile.\r\n const qorigin = points.params.origin;\r\n const transform = Transform.createTranslationXYZ(qorigin.x, qorigin.y, qorigin.z);\r\n qorigin.setZero();\r\n\r\n const features = new FeatureIndex();\r\n if (undefined !== featureIndex) {\r\n features.featureID = featureIndex;\r\n features.type = FeatureIndexType.Uniform;\r\n }\r\n\r\n const rasterTile: MeshArgs = {\r\n points,\r\n vertIndices: [0, 1, 2, 2, 1, 3],\r\n isPlanar: true,\r\n features,\r\n colors: new ColorIndex(),\r\n fillFlags: FillFlags.None,\r\n textureMapping: {\r\n uvParams: [new Point2d(0, 0), new Point2d(1, 0), new Point2d(0, 1), new Point2d(1, 1)],\r\n texture: tileTexture,\r\n },\r\n };\r\n\r\n const trimesh = this.createTriMesh(rasterTile);\r\n if (undefined === trimesh)\r\n return undefined;\r\n\r\n const branch = new GraphicBranch(true);\r\n branch.add(trimesh);\r\n return this.createBranch(branch, transform);\r\n }\r\n\r\n /** Create a Graphic for a [[SkyBox]] which encompasses the entire scene, rotating with the camera.\r\n * @internal\r\n */\r\n public createSkyBox(_params: RenderSkyBoxParams): RenderGraphic | undefined { return undefined; }\r\n\r\n /** Create a RenderGraphic consisting of a list of Graphics to be drawn together. */\r\n public abstract createGraphicList(primitives: RenderGraphic[]): RenderGraphic;\r\n\r\n /** Create a RenderGraphic consisting of a list of Graphics, with optional transform and symbology overrides applied to the list */\r\n public createBranch(branch: GraphicBranch, transform: Transform): RenderGraphic {\r\n return this.createGraphicBranch(branch, transform);\r\n }\r\n\r\n /** Create a graphic from a [[GraphicBranch]]. */\r\n public abstract createGraphicBranch(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions): RenderGraphic;\r\n\r\n /** Create a node in the scene graph corresponding to a transform node in the scene's schedule script.\r\n * Nodes under this branch will only be drawn if they belong to the specified transform node.\r\n * This allows the graphics in a single Tile to be efficiently drawn with different transforms applied by different nodes.\r\n * The node Id is either the Id of a single transform node in the script, of 0xffffffff to indicate all nodes that have no transform applied to them.\r\n * @internal\r\n */\r\n public createAnimationTransformNode(graphic: RenderGraphic, _nodeId: number): RenderGraphic {\r\n return graphic;\r\n }\r\n\r\n /** Create a RenderGraphic consisting of batched [[Feature]]s.\r\n * @internal\r\n */\r\n public abstract createBatch(graphic: RenderGraphic, features: PackedFeatureTable, range: ElementAlignedBox3d, options?: BatchOptions): RenderGraphic;\r\n\r\n /** Return a Promise which when resolved indicates that all pending external textures have finished loading from the backend. */\r\n public async waitForAllExternalTextures(): Promise<void> { return Promise.resolve(); }\r\n /** @internal */\r\n public get hasExternalTextureRequests(): boolean { return false; }\r\n\r\n /** Create a graphic that assumes ownership of another graphic.\r\n * @param ownedGraphic The RenderGraphic to be owned.\r\n * @returns The owning graphic that exposes a `disposeGraphic` method for explicitly disposing of the owned graphic.\r\n * @see [[RenderGraphicOwner]] for details regarding ownership semantics.\r\n * @public\r\n */\r\n public createGraphicOwner(ownedGraphic: RenderGraphic): RenderGraphicOwner { return new GraphicOwner(ownedGraphic); }\r\n\r\n /** Create a \"layer\" containing the graphics belonging to it. A layer has a unique identifier and all of its geometry lies in an XY plane.\r\n * Different layers can be drawn coincident with one another; their draw order can be controlled by a per-layer priority value so that one layer draws\r\n * on top of another. Layers cannot nest inside other layers. Multiple GraphicLayers can exist with the same ID; they are treated as belonging to the same layer.\r\n * A GraphicLayer must be contained (perhaps indirectly) inside a GraphicLayerContainer.\r\n * @see [[createGraphicLayerContainer]]\r\n * @internal\r\n */\r\n public createGraphicLayer(graphic: RenderGraphic, _layerId: string): RenderGraphic { return graphic; }\r\n\r\n /** Create a graphic that can contain [[GraphicLayer]]s.\r\n * @internal\r\n */\r\n public createGraphicLayerContainer(graphic: RenderGraphic, _drawAsOverlay: boolean, _transparency: number, _elevation: number): RenderGraphic { return graphic; }\r\n\r\n /** Find a previously-created [[RenderTexture]] by its key.\r\n * @param _key The unique key of the texture within the context of the IModelConnection. Typically an element Id.\r\n * @param _imodel The IModelConnection with which the texture is associated.\r\n * @returns A previously-created texture matching the specified key, or undefined if no such texture exists.\r\n */\r\n public findTexture(_key: TextureCacheKey, _imodel: IModelConnection): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Find or create a [[RenderTexture]] from a persistent texture element.\r\n * @param id The ID of the texture element.\r\n * @param iModel The IModel containing the texture element.\r\n * @returns A Promise resolving to the created RenderTexture or to undefined if the texture could not be created.\r\n * @note If the texture is successfully created, it will be cached on the IModelConnection such that it can later be retrieved by its ID using [[RenderSystem.findTexture]].\r\n * @see [[RenderSystem.loadTextureImage]].\r\n * @internal\r\n */\r\n public async loadTexture(id: Id64String, iModel: IModelConnection): Promise<RenderTexture | undefined> {\r\n let texture = this.findTexture(id.toString(), iModel);\r\n if (undefined === texture) {\r\n const image = await this.loadTextureImage(id, iModel);\r\n if (undefined !== image) {\r\n // This will return a pre-existing RenderTexture if somebody else loaded it while we were awaiting the image.\r\n texture = this.createTexture({\r\n type: RenderTexture.Type.Normal,\r\n ownership: { key: id, iModel },\r\n image: {\r\n source: image.image,\r\n transparency: ImageSourceFormat.Png === image.format ? TextureTransparency.Mixed : TextureTransparency.Opaque,\r\n },\r\n });\r\n }\r\n }\r\n\r\n return texture;\r\n }\r\n\r\n /**\r\n * Load a texture image given the ID of a texture element.\r\n * @param id The ID of the texture element.\r\n * @param iModel The IModel containing the texture element.\r\n * @returns A Promise resolving to a TextureImage created from the texture element's data, or to undefined if the TextureImage could not be created.\r\n * @see [[RenderSystem.loadTexture]]\r\n * @internal\r\n */\r\n public async loadTextureImage(id: Id64String, iModel: IModelConnection): Promise<OldTextureImage | undefined> {\r\n const elemProps = await iModel.elements.getProps(id);\r\n if (1 !== elemProps.length)\r\n return undefined;\r\n\r\n const textureProps = elemProps[0] as TextureProps;\r\n if (undefined === textureProps.data || \"string\" !== typeof (textureProps.data) || undefined === textureProps.format || \"number\" !== typeof (textureProps.format))\r\n return undefined;\r\n\r\n const format = textureProps.format;\r\n if (!isValidImageSourceFormat(format))\r\n return undefined;\r\n\r\n const imageSource = new ImageSource(base64StringToUint8Array(textureProps.data), format);\r\n const image = await imageElementFromImageSource(imageSource);\r\n return { image, format };\r\n }\r\n\r\n /** Obtain a texture created from a gradient.\r\n * @param _symb The description of the gradient.\r\n * @param _imodel The IModelConnection with which the texture is associated.\r\n * @returns A texture created from the gradient image, or undefined if the texture could not be created.\r\n * @note If a texture matching the specified gradient is already cached on the iModel, it will be returned.\r\n * Otherwise, if an iModel is supplied, the newly-created texture will be cached on the iModel such that subsequent calls with an equivalent gradient and the\r\n * same iModel will return the cached texture instead of creating a new one.\r\n */\r\n public getGradientTexture(_symb: Gradient.Symb, _imodel?: IModelConnection): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Create a new texture from an [[ImageBuffer]].\r\n * @deprecated in 3.x. Use [[createTexture]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createTextureFromImageBuffer(image: ImageBuffer, iModel: IModelConnection, params: RenderTexture.Params): RenderTexture | undefined {\r\n const ownership = params.key ? { key: params.key, iModel } : (params.isOwned ? \"external\" : undefined);\r\n return this.createTexture({\r\n type: params.type,\r\n ownership,\r\n image: {\r\n source: image,\r\n transparency: ImageBufferFormat.Rgba === image.format ? TextureTransparency.Mixed : TextureTransparency.Opaque,\r\n },\r\n });\r\n }\r\n\r\n /** Create a new texture from an HTML image. Typically the image was extracted from a binary representation of a jpeg or png via [[imageElementFromImageSource]].\r\n * @deprecated in 3.x. Use [[createTexture]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createTextureFromImage(image: HTMLImageElement, hasAlpha: boolean, iModel: IModelConnection | undefined, params: RenderTexture.Params): RenderTexture | undefined {\r\n const ownership = params.key && iModel ? { key: params.key, iModel } : (params.isOwned ? \"external\" : undefined);\r\n return this.createTexture({\r\n type: params.type,\r\n ownership,\r\n image: {\r\n source: image,\r\n transparency: hasAlpha ? TextureTransparency.Mixed : TextureTransparency.Opaque,\r\n },\r\n });\r\n }\r\n\r\n /** Create a new texture from an ImageSource.\r\n * @deprecated in 3.x. Use RenderSystem.createTextureFromSource.\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public async createTextureFromImageSource(source: ImageSource, iModel: IModelConnection | undefined, params: RenderTexture.Params): Promise<RenderTexture | undefined> {\r\n const ownership = iModel && params.key ? { iModel, key: params.key } : (params.isOwned ? \"external\" : undefined);\r\n return this.createTextureFromSource({\r\n type: params.type,\r\n source,\r\n ownership,\r\n transparency: source.format === ImageSourceFormat.Jpeg ? TextureTransparency.Opaque : TextureTransparency.Mixed,\r\n });\r\n }\r\n\r\n /** Create a texture from an ImageSource. */\r\n public async createTextureFromSource(args: CreateTextureFromSourceArgs): Promise<RenderTexture | undefined> {\r\n try {\r\n // JPEGs don't support transparency.\r\n const transparency = ImageSourceFormat.Jpeg === args.source.format ? TextureTransparency.Opaque : (args.transparency ?? TextureTransparency.Mixed);\r\n const image = await imageElementFromImageSource(args.source);\r\n if (!IModelApp.hasRenderSystem)\r\n return undefined;\r\n\r\n return this.createTexture({\r\n type: args.type,\r\n ownership: args.ownership,\r\n image: {\r\n source: image,\r\n transparency,\r\n },\r\n });\r\n } catch {\r\n return undefined;\r\n }\r\n }\r\n\r\n /** Create a new texture by its element ID. This texture will be retrieved asynchronously from the backend. A placeholder image will be associated with the texture until the requested image data loads. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createTextureFromElement(_id: Id64String, _imodel: IModelConnection, _params: RenderTexture.Params, _format: ImageSourceFormat): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n public createTexture(_args: CreateTextureArgs): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Create a new texture from a cube of HTML images.\r\n * @internal\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createTextureFromCubeImages(_posX: HTMLImageElement, _negX: HTMLImageElement, _posY: HTMLImageElement, _negY: HTMLImageElement, _posZ: HTMLImageElement, _negZ: HTMLImageElement, _imodel: IModelConnection, _params: RenderTexture.Params): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public onInitialized(): void { }\r\n\r\n /** @internal */\r\n public enableDiagnostics(_enable: RenderDiagnostics): void { }\r\n\r\n /** @internal */\r\n public get supportsLogZBuffer(): boolean { return false !== this.options.logarithmicDepthBuffer; }\r\n\r\n /** Obtain an object that can be used to control various debugging features. Returns `undefined` if debugging features are unavailable for this `RenderSystem`.\r\n * @beta\r\n */\r\n public get debugControl(): RenderSystemDebugControl | undefined { return undefined; }\r\n\r\n /** @internal */\r\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\r\n\r\n /** A function that is invoked after the WebGL context is lost. Context loss is almost always caused by excessive consumption of GPU memory.\r\n * After context loss occurs, the RenderSystem will be unable to interact with WebGL by rendering viewports, creating graphics and textures, etc.\r\n * By default, this function invokes [[ToolAdmin.exceptionHandler]] with a brief message describing what occurred.\r\n * An application can override this behavior as follows:\r\n * ```ts\r\n * RenderSystem.contextLossHandler = (): Promise<any> => {\r\n * // your implementation here.\r\n * }\r\n * ```\r\n * @note Context loss is reported by the browser some short time *after* it has occurred. It is not possible to determine the specific cause.\r\n * @see [[TileAdmin.gpuMemoryLimit]] to limit the amount of GPU memory consumed thereby reducing the likelihood of context loss.\r\n * @see [[TileAdmin.totalTileContentBytes]] for the amount of GPU memory allocated for tile graphics.\r\n */\r\n public static async contextLossHandler(): Promise<any> {\r\n const msg = IModelApp.localization.getLocalizedString(\"iModelJs:Errors.WebGLContextLost\");\r\n return ToolAdmin.exceptionHandler(msg);\r\n }\r\n}\r\n\r\n/** A RenderSystem provides access to resources used by the internal WebGL-based rendering system.\r\n * An application rarely interacts directly with the RenderSystem; instead it interacts with types like [[Viewport]] which\r\n * coordinate with the RenderSystem on the application's behalf.\r\n * @see [[IModelApp.renderSystem]].\r\n * @public\r\n */\r\nexport namespace RenderSystem { // eslint-disable-line no-redeclare\r\n /** Options passed to [[IModelApp.supplyRenderSystem]] to configure the [[RenderSystem]] on startup. Many of these options serve as \"feature flags\" used to enable newer, experimental features. As such they typically begin life tagged as \"alpha\" or \"beta\" and are subsequently deprecated when the feature is declared stable.\r\n *\r\n * @public\r\n */\r\n export interface Options {\r\n /** WebGL extensions to be explicitly disabled, regardless of whether or not the WebGL implementation supports them.\r\n * This is chiefly useful for testing code that only executes in the absence of particular extensions, while running on a system that supports those extensions.\r\n *\r\n * Default value: undefined\r\n *\r\n * @public\r\n */\r\n disabledExtensions?: WebGLExtensionName[];\r\n\r\n /** If true, preserve the shader source code as internal strings, useful for debugging purposes.\r\n *\r\n * Default value: false\r\n *\r\n * @public\r\n */\r\n preserveShaderSourceCode?: boolean;\r\n\r\n /** If true, display solar shadows when enabled by [ViewFlags.shadows]($common).\r\n *\r\n * Default value: true\r\n *\r\n * @beta\r\n */\r\n displaySolarShadows?: boolean;\r\n\r\n /** If the view frustum is sufficiently large, and the EXT_frag_depth WebGL extension is available, use a logarithmic depth buffer to improve depth buffer resolution. Framerate may degrade to an extent while the logarithmic depth buffer is in use. If this option is disabled, or the extension is not supported, the near and far planes of very large view frustums will instead be moved to reduce the draw distance.\r\n *\r\n * Default value: true\r\n *\r\n * @public\r\n */\r\n logarithmicDepthBuffer?: boolean;\r\n\r\n /** If true, [[ScreenViewport]]s will respect the DPI of the display. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[dpiAwareLOD]] to control whether device pixel ratio affects the level of detail for tile graphics and decorations.\r\n * @see [[Viewport.cssPixelsToDevicePixels]] to convert CSS pixels to device pixels.\r\n * @see [[Viewport.devicePixelRatio]].\r\n *\r\n * Default value: true\r\n *\r\n * @public\r\n */\r\n dpiAwareViewports?: boolean;\r\n\r\n /** If defined, this will be used as the device pixel ratio instead of the system's actual device pixel ratio.\r\n * This can be helpful for situations like running in the iOS Simulator where forcing a lower resolution by setting a sub-1 device pixel ratio would increase performance.\r\n * @note If this setting is used to decrease the effective device pixel ratio, the view will appear pixelated.\r\n * @note This setting should only be used to increase performance in situations like the iOS Simulator for testing purposes only. It should not be used in a production situation.\r\n * @note This setting has no effect if [[dpiAwareViewports]] is `false`.\r\n *\r\n * Default value: undefined\r\n *\r\n * @public\r\n */\r\n devicePixelRatioOverride?: number;\r\n\r\n /** If true, [[ScreenViewport]]s will take into account the DPI of the display when computing the level of detail for tile graphics and decorations.\r\n * This can result in sharper-looking images on high-DPI devices like mobile phones, but may reduce performance on such devices.\r\n * @note This setting has no effect if [[dpiAwareViewports]] is `false`.\r\n * @see [[Viewport.devicePixelRatio]].\r\n *\r\n * Default value: false\r\n *\r\n * @public\r\n */\r\n dpiAwareLOD?: boolean;\r\n\r\n /** Previously, this property dictated whether to attempt to use a WebGL 2 rendering context before falling back to WebGL 1.\r\n * WebGL 1 is no longer supported, so this property is now ignored.\r\n * @public\r\n * @deprecated in 4.x. WebGL 1 is no longer supported.\r\n */\r\n useWebGL2?: boolean;\r\n\r\n /** If true, plan projection models will be rendered using [PlanProjectionSettings]($common) defined by the [[DisplayStyle3dState]].\r\n * Default value: true\r\n * @public\r\n */\r\n planProjections?: boolean;\r\n\r\n /** To help prevent delays when a user interacts with a [[Viewport]], the WebGL render system can precompile shader programs before any Viewport is opened.\r\n * This particularly helps applications when they do not open a Viewport immediately upon startup - for example, if the user is first expected to select an iModel and a view through the user interface.\r\n * Shader precompilation will cease once all shader programs have been compiled, or when a Viewport is opened (registered with the [[ViewManager]]).\r\n * @note Enabling this feature can slow UI interactions before a [[Viewport]] is opened.\r\n * To enable this feature, set this to `true`.\r\n *\r\n * Default value: false\r\n *\r\n * @beta\r\n */\r\n doIdleWork?: boolean;\r\n\r\n /** WebGL context attributes to explicitly set when initializing [[IModelApp.renderSystem]].\r\n * Exposed chiefly for OpenCities Planner.\r\n * @internal\r\n */\r\n contextAttributes?: WebGLContextAttributes;\r\n\r\n /** If true, will cause exception when a shader uniform is missing (usually optimized out), otherwise will only log these.\r\n * Default value: false\r\n * @public\r\n */\r\n errorOnMissingUniform?: boolean;\r\n\r\n /** If true, and the `WEBGL_debug_shaders` extension is available, accumulate debug information during shader compilation.\r\n * This information can be accessed via `RenderSystemDebugControl.debugShaderFiles`.\r\n * Default value: false\r\n * @internal\r\n */\r\n debugShaders?: boolean;\r\n\r\n /** Initial antialias setting.\r\n * If antialiasing is supported, a value greater than 1 enables it using that many samples, and a value less than or equal to 1 disables antialiasing.\r\n * Default value: 1\r\n * @public\r\n */\r\n antialiasSamples?: number;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"RenderSystem.js","sourceRoot":"","sources":["../../../src/render/RenderSystem.ts"],"names":[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YAAY,KAA2C,OAAO,SAAS,CAAC,CAAC,CAAC;IAErF,gBAAgB;IACT,iBAAiB,CAAC,MAA+B,IAAU,CAAC;IAEnE;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,KAAK,CAAC,kBAAkB;QACpC,MAAM,GAAG,GAAG,qBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,kCAAkC,CAAC,CAAC;QAC1F,OAAO,qBAAS,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;CACF;AAzeD,oCAyeC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { base64StringToUint8Array, Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport {\r\n ColorDef, ColorIndex, ElementAlignedBox3d, FeatureIndex, FeatureIndexType, FillFlags, Frustum, Gradient, ImageBuffer, ImageBufferFormat, ImageSource, ImageSourceFormat,\r\n isValidImageSourceFormat, QParams3d, QPoint3dList, RenderFeatureTable, RenderMaterial, RenderTexture, SkyGradient, TextureProps, TextureTransparency,\r\n} from \"@itwin/core-common\";\r\nimport { ClipVector, Matrix3d, Point2d, Point3d, Range2d, Range3d, Transform, Vector2d, XAndY } from \"@itwin/core-geometry\";\r\nimport { WebGLExtensionName } from \"@itwin/webgl-compatibility\";\r\nimport { imageElementFromImageSource } from \"../ImageUtil\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { MapTileTreeReference, TileTreeReference } from \"../tile/internal\";\r\nimport { ToolAdmin } from \"../tools/ToolAdmin\";\r\nimport { SceneContext } from \"../ViewContext\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { ViewRect } from \"../ViewRect\";\r\nimport { GraphicBranch, GraphicBranchOptions } from \"./GraphicBranch\";\r\nimport { BatchOptions, CustomGraphicBuilderOptions, GraphicBuilder, GraphicType, ViewportGraphicBuilderOptions } from \"./GraphicBuilder\";\r\nimport { InstancedGraphicParams, PatternGraphicParams } from \"./InstancedGraphicParams\";\r\nimport { MeshArgs, PolylineArgs } from \"./primitives/mesh/MeshPrimitives\";\r\nimport { RealityMeshGraphicParams } from \"./RealityMeshGraphicParams\";\r\nimport { RealityMeshParams } from \"./RealityMeshParams\";\r\nimport { PointCloudArgs } from \"./primitives/PointCloudPrimitive\";\r\nimport { PointStringParams } from \"./primitives/PointStringParams\";\r\nimport { PolylineParams } from \"./primitives/PolylineParams\";\r\nimport { MeshParams } from \"./primitives/VertexTable\";\r\nimport { RenderClipVolume } from \"./RenderClipVolume\";\r\nimport { RenderGraphic, RenderGraphicOwner } from \"./RenderGraphic\";\r\nimport { CreateRenderMaterialArgs } from \"./RenderMaterial\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderTarget } from \"./RenderTarget\";\r\nimport { CreateTextureArgs, CreateTextureFromSourceArgs, TextureCacheKey } from \"./RenderTexture\";\r\nimport { ScreenSpaceEffectBuilder, ScreenSpaceEffectBuilderParams } from \"./ScreenSpaceEffectBuilder\";\r\n\r\n/* eslint-disable no-restricted-syntax */\r\n// cSpell:ignore deserializing subcat uninstanced wiremesh qorigin trimesh\r\n\r\n/** An opaque representation of a texture draped on geometry within a [[Viewport]].\r\n * @internal\r\n */\r\nexport abstract class RenderTextureDrape implements IDisposable {\r\n public abstract dispose(): void;\r\n\r\n /** @internal */\r\n public abstract collectStatistics(stats: RenderMemory.Statistics): void;\r\n public abstract collectGraphics(context: SceneContext): void;\r\n}\r\n\r\n/** @internal */\r\nexport type TextureDrapeMap = Map<Id64String, RenderTextureDrape>;\r\n\r\n/** @internal */\r\nexport type MapLayerClassifiers = Map<number, RenderPlanarClassifier>;\r\n\r\n/** Describes a texture loaded from an HTMLImageElement\r\n * ###TODO Replace with TextureImage from RenderTexture.ts after we start returning transparency info from the backend.\r\n * @internal\r\n */\r\nexport interface OldTextureImage {\r\n /** The HTMLImageElement containing the texture's image data */\r\n image: HTMLImageElement;\r\n /** The format of the texture's image data */\r\n format: ImageSourceFormat;\r\n}\r\n\r\n/** @internal */\r\nexport enum RenderDiagnostics {\r\n /** No diagnostics enabled. */\r\n None = 0,\r\n /** Debugging output to browser console enabled. */\r\n DebugOutput = 1 << 1,\r\n /** Potentially expensive checks of WebGL state enabled. */\r\n WebGL = 1 << 2,\r\n /** All diagnostics enabled. */\r\n All = DebugOutput | WebGL,\r\n}\r\n\r\n/** @internal */\r\nexport interface GLTimerResult {\r\n /** Label from GLTimer.beginOperation */\r\n label: string;\r\n /** Time elapsed in nanoseconds, inclusive of child result times.\r\n * @note no-op queries seem to have 32ns of noise.\r\n */\r\n nanoseconds: number;\r\n /** Child results if GLTimer.beginOperation calls were nested */\r\n children?: GLTimerResult[];\r\n}\r\n\r\n/** @internal */\r\nexport type GLTimerResultCallback = (result: GLTimerResult) => void;\r\n\r\n/** Default implementation of RenderGraphicOwner. */\r\nclass GraphicOwner extends RenderGraphicOwner {\r\n public constructor(private readonly _graphic: RenderGraphic) { super(); }\r\n public get graphic(): RenderGraphic { return this._graphic; }\r\n}\r\n\r\n/** An interface optionally exposed by a RenderSystem that allows control of various debugging features.\r\n * @beta\r\n */\r\nexport interface RenderSystemDebugControl {\r\n /** Destroy this system's webgl context. Returns false if this behavior is not supported. */\r\n loseContext(): boolean;\r\n\r\n /** Overrides [[RenderSystem.dpiAwareLOD]].\r\n * @internal\r\n */\r\n dpiAwareLOD: boolean;\r\n\r\n /** Record GPU profiling information for each frame drawn. Check isGLTimerSupported before using.\r\n * @internal\r\n */\r\n resultsCallback?: GLTimerResultCallback;\r\n\r\n /** Returns true if the browser supports GPU profiling queries.\r\n * @internal\r\n */\r\n readonly isGLTimerSupported: boolean;\r\n\r\n /** Attempts to compile all shader programs and returns true if all were successful. May throw exceptions on errors.\r\n * This is useful for debugging shader compilation on specific platforms - especially those which use neither ANGLE nor SwiftShader (e.g., linux, mac, iOS)\r\n * because our unit tests which also compile all shaders run in software mode and therefore may not catch some \"errors\" (especially uniforms that have no effect on\r\n * program output).\r\n * @internal\r\n */\r\n compileAllShaders(): boolean;\r\n\r\n /** Obtain accumulated debug info collected during shader compilation. See `RenderSystem.Options.debugShaders`.\r\n * @internal\r\n */\r\n debugShaderFiles?: DebugShaderFile[];\r\n}\r\n\r\n/** @internal */\r\nexport abstract class RenderTerrainGeometry implements IDisposable, RenderMemory.Consumer {\r\n public abstract dispose(): void;\r\n public abstract get transform(): Transform | undefined;\r\n public abstract collectStatistics(stats: RenderMemory.Statistics): void;\r\n}\r\n\r\n/** @internal */\r\nexport class TerrainTexture {\r\n public constructor(\r\n public readonly texture: RenderTexture,\r\n public featureId: number,\r\n public readonly scale: Vector2d,\r\n public readonly translate: Vector2d,\r\n public readonly targetRectangle: Range2d,\r\n public readonly layerIndex: number,\r\n public transparency: number,\r\n public readonly clipRectangle?: Range2d\r\n ) { }\r\n\r\n public cloneWithClip(clipRectangle: Range2d) {\r\n return new TerrainTexture (this.texture, this.featureId, this.scale, this.translate, this.targetRectangle, this.layerIndex, this.transparency, clipRectangle);\r\n }\r\n}\r\n/** @internal */\r\nexport class DebugShaderFile {\r\n public constructor(\r\n public readonly filename: string,\r\n public readonly src: string,\r\n public isVS: boolean,\r\n public isGL: boolean,\r\n public isUsed: boolean\r\n ) { }\r\n}\r\n/** Transparency settings for planar grid display.\r\n * @alpha\r\n */\r\nexport class PlanarGridTransparency {\r\n /** Transparency for the grid plane. This should generally be fairly high to avoid obscuring other geometry */\r\n public readonly planeTransparency = .9;\r\n /** Transparency of the grid lines. This should be higher than the plane, but less than reference line transparency */\r\n public readonly lineTransparency = .75;\r\n /** Transparency of the reference lines. This should be less than plane or line transparency so that reference lines are more prominent */\r\n public readonly refTransparency = .5;\r\n}\r\n\r\n/** Settings for planar grid display.\r\n * @alpha\r\n */\r\nexport interface PlanarGridProps {\r\n /** The grid origin */\r\n origin: Point3d;\r\n /** The grid orientation. The grid X and Y direction are the first and second matrix rows */\r\n rMatrix: Matrix3d;\r\n /** The spacing between grid liens in the X and Y direction */\r\n spacing: XAndY;\r\n /** Grid lines per reference. If zero no reference lines are displayed. */\r\n gridsPerRef: number;\r\n /** Grid color. [[Use Viewport.getContrastToBackgroundColor]] to get best constrast color based on current background. */\r\n color: ColorDef;\r\n /** Transparency settings. If omitted then the [[PlanarGridTransparency]] defaults are used. */\r\n transparency?: PlanarGridTransparency;\r\n}\r\n\r\n/** An opaque representation of geometry allocated by a [[RenderSystem]] to be supplied to [[RenderSystem.createRenderGraphic]].\r\n * @internal\r\n */\r\nexport type RenderGeometry = IDisposable & RenderMemory.Consumer;\r\n\r\n/** An opaque representation of instructions for repeatedly drawing a [[RenderGeometry]] to pattern a planar region, to be supplied to [[RenderSystem.createRenderGraphic]].\r\n * @internal\r\n */\r\nexport type RenderAreaPattern = IDisposable & RenderMemory.Consumer;\r\n\r\n/** @internal */\r\nexport interface RenderSkyGradientParams {\r\n type: \"gradient\";\r\n gradient: SkyGradient;\r\n zOffset: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface RenderSkySphereParams {\r\n type: \"sphere\";\r\n texture: RenderTexture;\r\n rotation: number;\r\n zOffset: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface RenderSkyCubeParams {\r\n type: \"cube\";\r\n texture: RenderTexture;\r\n}\r\n\r\n/** @internal */\r\nexport type RenderSkyBoxParams = RenderSkyGradientParams | RenderSkySphereParams | RenderSkyCubeParams;\r\n\r\n/** A RenderSystem provides access to resources used by the internal WebGL-based rendering system.\r\n * An application rarely interacts directly with the RenderSystem; instead it interacts with types like [[Viewport]] which\r\n * coordinate with the RenderSystem on the application's behalf.\r\n * @see [Display system overview]($docs/learning/display/index.md)\r\n * @see [[IModelApp.renderSystem]].\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class RenderSystem implements IDisposable {\r\n /** Options used to initialize the RenderSystem. These are primarily used for feature-gating.\r\n * This object is frozen and cannot be modified after the RenderSystem is created.\r\n * @internal\r\n */\r\n public readonly options: RenderSystem.Options;\r\n\r\n /** Antialias samples to use on all subsequently created render targets.\r\n * Default value: undefined (no antialiasing)\r\n * @beta\r\n */\r\n public antialiasSamples?: number;\r\n\r\n /** Initialize the RenderSystem with the specified options.\r\n * @note The RenderSystem takes ownership of the supplied Options and freezes it.\r\n * @internal\r\n */\r\n protected constructor(options?: RenderSystem.Options) {\r\n this.options = undefined !== options ? options : {};\r\n Object.freeze(this.options);\r\n if (undefined !== this.options.disabledExtensions)\r\n Object.freeze(this.options.disabledExtensions);\r\n }\r\n\r\n /** @internal */\r\n public abstract get isValid(): boolean;\r\n\r\n /** @internal */\r\n public abstract dispose(): void;\r\n\r\n /** @internal */\r\n public get maxTextureSize(): number { return 0; }\r\n\r\n /** @internal */\r\n public get supportsCreateImageBitmap(): boolean { return false; }\r\n\r\n /** @internal */\r\n public get dpiAwareLOD(): boolean { return true === this.options.dpiAwareLOD; }\r\n\r\n /** @internal */\r\n public get isMobile(): boolean { return false; }\r\n\r\n /** @internal */\r\n public abstract createTarget(canvas: HTMLCanvasElement): RenderTarget;\r\n /** @internal */\r\n public abstract createOffscreenTarget(rect: ViewRect): RenderTarget;\r\n\r\n /** Perform a small unit of idle work and return true if more idle work remains to be done. This function is invoked on each tick of the javascript event loop as long as no viewports are registered with the ViewManager, until it returns false to indicate all idle work has been completed.\r\n * @internal\r\n */\r\n public abstract doIdleWork(): boolean;\r\n\r\n /** Find a previously-created [RenderMaterial]($common) by its ID.\r\n * @param _key The unique ID of the material within the context of the IModelConnection. Typically an element ID.\r\n * @param _imodel The IModelConnection with which the material is associated.\r\n * @returns A previously-created material matching the specified ID, or undefined if no such material exists.\r\n */\r\n public findMaterial(_key: string, _imodel: IModelConnection): RenderMaterial | undefined { return undefined; }\r\n\r\n /** Create a [RenderMaterial]($common) from parameters\r\n * If the parameters include a non-empty key, and no previously-created material already exists with that key, the newly-created material will be cached on the IModelConnection such\r\n * that it can later be retrieved by the same key using [[RenderSystem.findMaterial]].\r\n * @param _params A description of the material's properties.\r\n * @param _imodel The IModelConnection associated with the material.\r\n * @returns the newly-created material, or undefined if the material could not be created or if a material with the same key as that specified in the params already exists.\r\n * @deprecated in 3.x. Use [[createRenderMaterial]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createMaterial(_params: RenderMaterial.Params, _imodel: IModelConnection): RenderMaterial | undefined { return undefined; }\r\n\r\n /** Create a [RenderMaterial]($common).\r\n * @see [[CreateRenderMaterialArgs]] for a description of the material parameters.\r\n */\r\n public createRenderMaterial(_args: CreateRenderMaterialArgs): RenderMaterial | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Creates a [[GraphicBuilder]] for creating a [[RenderGraphic]].\r\n * @param placement The local-to-world transform in which the builder's geometry is to be defined.\r\n * @param type The type of builder to create.\r\n * @param viewport The viewport in which the resultant [[RenderGraphic]] will be rendered.\r\n * @param pickableId If the decoration is to be pickable, a unique identifier to associate with the resultant [[RenderGraphic]].\r\n * @returns A builder for creating a [[RenderGraphic]] of the specified type appropriate for rendering within the specified viewport.\r\n * @see [[IModelConnection.transientIds]] for obtaining an ID for a pickable decoration.\r\n * @see [[RenderContext.createGraphicBuilder]].\r\n * @see [[Decorator]]\r\n */\r\n public createGraphicBuilder(placement: Transform, type: GraphicType, viewport: Viewport, pickableId?: Id64String): GraphicBuilder {\r\n const pickable = undefined !== pickableId ? { id: pickableId } : undefined;\r\n return this.createGraphic({ type, viewport, placement, pickable });\r\n }\r\n\r\n /** Obtain a [[GraphicBuilder]] from which to produce a [[RenderGraphic]].\r\n * @param options Options describing how to create the builder.\r\n * @returns A builder that produces a [[RenderGraphic]].\r\n */\r\n public abstract createGraphic(options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions): GraphicBuilder;\r\n\r\n /** Obtain an object capable of producing a custom screen-space effect to be applied to the image rendered by a [[Viewport]].\r\n * @returns undefined if screen-space effects are not supported by this RenderSystem.\r\n */\r\n public createScreenSpaceEffectBuilder(_params: ScreenSpaceEffectBuilderParams): ScreenSpaceEffectBuilder | undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public createTriMesh(args: MeshArgs, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n const params = MeshParams.create(args);\r\n return this.createMesh(params, instances);\r\n }\r\n\r\n /** @internal */\r\n public createIndexedPolylines(args: PolylineArgs, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n if (args.flags.isDisjoint) {\r\n const pointStringParams = PointStringParams.create(args);\r\n return undefined !== pointStringParams ? this.createPointString(pointStringParams, instances) : undefined;\r\n } else {\r\n const polylineParams = PolylineParams.create(args);\r\n return undefined !== polylineParams ? this.createPolyline(polylineParams, instances) : undefined;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public createMeshGeometry(_params: MeshParams, _viewIndependentOrigin?: Point3d): RenderGeometry | undefined { return undefined; }\r\n /** @internal */\r\n public createPolylineGeometry(_params: PolylineParams, _viewIndependentOrigin?: Point3d): RenderGeometry | undefined { return undefined; }\r\n /** @internal */\r\n public createPointStringGeometry(_params: PointStringParams, _viewIndependentOrigin?: Point3d): RenderGeometry | undefined { return undefined; }\r\n\r\n /** @internal */\r\n public createAreaPattern(_params: PatternGraphicParams): RenderAreaPattern | undefined { return undefined; }\r\n\r\n /** Create a RenderGraphic from a RenderGeometry produced by this RenderSystem.\r\n * @internal\r\n */\r\n public abstract createRenderGraphic(_geometry: RenderGeometry, instances?: InstancedGraphicParams | RenderAreaPattern): RenderGraphic | undefined;\r\n\r\n private createGraphicFromGeometry(\r\n createGeometry: (viewIndependentOrigin?: Point3d) => RenderGeometry | undefined,\r\n instancesOrOrigin?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n let viOrigin;\r\n let instances;\r\n if (instancesOrOrigin instanceof Point3d)\r\n viOrigin = instancesOrOrigin;\r\n else\r\n instances = instancesOrOrigin;\r\n\r\n const geom = createGeometry(viOrigin);\r\n return geom ? this.createRenderGraphic(geom, instances) : undefined;\r\n }\r\n\r\n /** @internal */\r\n public createMesh(params: MeshParams, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n return this.createGraphicFromGeometry((viOrigin) => this.createMeshGeometry(params, viOrigin), instances);\r\n }\r\n\r\n /** @internal */\r\n public createPolyline(params: PolylineParams, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n return this.createGraphicFromGeometry((origin) => this.createPolylineGeometry(params, origin), instances);\r\n }\r\n\r\n /** @internal */\r\n public createPointString(params: PointStringParams, instances?: InstancedGraphicParams | RenderAreaPattern | Point3d): RenderGraphic | undefined {\r\n return this.createGraphicFromGeometry((origin) => this.createPointStringGeometry(params, origin), instances);\r\n }\r\n\r\n /** @internal */\r\n public createTerrainMesh(_params: RealityMeshParams, _transform?: Transform, _disableTextureDisposal = false): RenderTerrainGeometry | undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public createRealityMeshGraphic(_params: RealityMeshGraphicParams, _disableTextureDisposal = false): RenderGraphic | undefined { return undefined; }\r\n /** @internal */\r\n public createRealityMesh(_realityMesh: RealityMeshParams, _disableTextureDisposal = false): RenderGraphic | undefined { return undefined; }\r\n /** @internal */\r\n public get maxRealityImageryLayers() { return 0; }\r\n /** @internal */\r\n public createPointCloud(_args: PointCloudArgs, _imodel: IModelConnection): RenderGraphic | undefined { return undefined; }\r\n\r\n /** Create a clip volume to clip geometry.\r\n * @note The clip volume takes ownership of the ClipVector, which must not be subsequently mutated.\r\n * @param _clipVector Defines how the volume clips geometry.\r\n * @returns A clip volume, or undefined if, e.g., the clip vector does not clip anything.\r\n */\r\n public createClipVolume(_clipVector: ClipVector): RenderClipVolume | undefined { return undefined; }\r\n\r\n /** @internal */\r\n public createPlanarGrid(_frustum: Frustum, _grid: PlanarGridProps): RenderGraphic | undefined { return undefined; }\r\n /** @internal */\r\n public createBackgroundMapDrape(_drapedTree: TileTreeReference, _mapTree: MapTileTreeReference): RenderTextureDrape | undefined { return undefined; }\r\n /** @internal */\r\n public createTile(tileTexture: RenderTexture, corners: Point3d[], featureIndex?: number): RenderGraphic | undefined {\r\n // corners\r\n // [0] [1]\r\n // [2] [3]\r\n // Quantize the points according to their range\r\n const points = new QPoint3dList(QParams3d.fromRange(Range3d.create(...corners)));\r\n for (let i = 0; i < 4; i++)\r\n points.add(corners[i]);\r\n\r\n // Now remove the translation from the quantized points and put it into a transform instead.\r\n // This prevents graphical artifacts when quantization origin is large relative to quantization scale.\r\n // ###TODO: Would be better not to create a branch for every tile.\r\n const qorigin = points.params.origin;\r\n const transform = Transform.createTranslationXYZ(qorigin.x, qorigin.y, qorigin.z);\r\n qorigin.setZero();\r\n\r\n const features = new FeatureIndex();\r\n if (undefined !== featureIndex) {\r\n features.featureID = featureIndex;\r\n features.type = FeatureIndexType.Uniform;\r\n }\r\n\r\n const rasterTile: MeshArgs = {\r\n points,\r\n vertIndices: [0, 1, 2, 2, 1, 3],\r\n isPlanar: true,\r\n features,\r\n colors: new ColorIndex(),\r\n fillFlags: FillFlags.None,\r\n textureMapping: {\r\n uvParams: [new Point2d(0, 0), new Point2d(1, 0), new Point2d(0, 1), new Point2d(1, 1)],\r\n texture: tileTexture,\r\n },\r\n };\r\n\r\n const trimesh = this.createTriMesh(rasterTile);\r\n if (undefined === trimesh)\r\n return undefined;\r\n\r\n const branch = new GraphicBranch(true);\r\n branch.add(trimesh);\r\n return this.createBranch(branch, transform);\r\n }\r\n\r\n /** Create a Graphic for a [[SkyBox]] which encompasses the entire scene, rotating with the camera.\r\n * @internal\r\n */\r\n public createSkyBox(_params: RenderSkyBoxParams): RenderGraphic | undefined { return undefined; }\r\n\r\n /** Create a RenderGraphic consisting of a list of Graphics to be drawn together. */\r\n public abstract createGraphicList(primitives: RenderGraphic[]): RenderGraphic;\r\n\r\n /** Create a RenderGraphic consisting of a list of Graphics, with optional transform and symbology overrides applied to the list */\r\n public createBranch(branch: GraphicBranch, transform: Transform): RenderGraphic {\r\n return this.createGraphicBranch(branch, transform);\r\n }\r\n\r\n /** Create a graphic from a [[GraphicBranch]]. */\r\n public abstract createGraphicBranch(branch: GraphicBranch, transform: Transform, options?: GraphicBranchOptions): RenderGraphic;\r\n\r\n /** Create a node in the scene graph corresponding to a transform node in the scene's schedule script.\r\n * Nodes under this branch will only be drawn if they belong to the specified transform node.\r\n * This allows the graphics in a single Tile to be efficiently drawn with different transforms applied by different nodes.\r\n * The node Id is either the Id of a single transform node in the script, of 0xffffffff to indicate all nodes that have no transform applied to them.\r\n * @internal\r\n */\r\n public createAnimationTransformNode(graphic: RenderGraphic, _nodeId: number): RenderGraphic {\r\n return graphic;\r\n }\r\n\r\n /** Create a RenderGraphic consisting of batched [[Feature]]s.\r\n * @internal\r\n */\r\n public abstract createBatch(graphic: RenderGraphic, features: RenderFeatureTable, range: ElementAlignedBox3d, options?: BatchOptions): RenderGraphic;\r\n\r\n /** Return a Promise which when resolved indicates that all pending external textures have finished loading from the backend. */\r\n public async waitForAllExternalTextures(): Promise<void> { return Promise.resolve(); }\r\n /** @internal */\r\n public get hasExternalTextureRequests(): boolean { return false; }\r\n\r\n /** Create a graphic that assumes ownership of another graphic.\r\n * @param ownedGraphic The RenderGraphic to be owned.\r\n * @returns The owning graphic that exposes a `disposeGraphic` method for explicitly disposing of the owned graphic.\r\n * @see [[RenderGraphicOwner]] for details regarding ownership semantics.\r\n * @public\r\n */\r\n public createGraphicOwner(ownedGraphic: RenderGraphic): RenderGraphicOwner { return new GraphicOwner(ownedGraphic); }\r\n\r\n /** Create a \"layer\" containing the graphics belonging to it. A layer has a unique identifier and all of its geometry lies in an XY plane.\r\n * Different layers can be drawn coincident with one another; their draw order can be controlled by a per-layer priority value so that one layer draws\r\n * on top of another. Layers cannot nest inside other layers. Multiple GraphicLayers can exist with the same ID; they are treated as belonging to the same layer.\r\n * A GraphicLayer must be contained (perhaps indirectly) inside a GraphicLayerContainer.\r\n * @see [[createGraphicLayerContainer]]\r\n * @internal\r\n */\r\n public createGraphicLayer(graphic: RenderGraphic, _layerId: string): RenderGraphic { return graphic; }\r\n\r\n /** Create a graphic that can contain [[GraphicLayer]]s.\r\n * @internal\r\n */\r\n public createGraphicLayerContainer(graphic: RenderGraphic, _drawAsOverlay: boolean, _transparency: number, _elevation: number): RenderGraphic { return graphic; }\r\n\r\n /** Find a previously-created [[RenderTexture]] by its key.\r\n * @param _key The unique key of the texture within the context of the IModelConnection. Typically an element Id.\r\n * @param _imodel The IModelConnection with which the texture is associated.\r\n * @returns A previously-created texture matching the specified key, or undefined if no such texture exists.\r\n */\r\n public findTexture(_key: TextureCacheKey, _imodel: IModelConnection): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Find or create a [[RenderTexture]] from a persistent texture element.\r\n * @param id The ID of the texture element.\r\n * @param iModel The IModel containing the texture element.\r\n * @returns A Promise resolving to the created RenderTexture or to undefined if the texture could not be created.\r\n * @note If the texture is successfully created, it will be cached on the IModelConnection such that it can later be retrieved by its ID using [[RenderSystem.findTexture]].\r\n * @see [[RenderSystem.loadTextureImage]].\r\n * @internal\r\n */\r\n public async loadTexture(id: Id64String, iModel: IModelConnection): Promise<RenderTexture | undefined> {\r\n let texture = this.findTexture(id.toString(), iModel);\r\n if (undefined === texture) {\r\n const image = await this.loadTextureImage(id, iModel);\r\n if (undefined !== image) {\r\n // This will return a pre-existing RenderTexture if somebody else loaded it while we were awaiting the image.\r\n texture = this.createTexture({\r\n type: RenderTexture.Type.Normal,\r\n ownership: { key: id, iModel },\r\n image: {\r\n source: image.image,\r\n transparency: ImageSourceFormat.Png === image.format ? TextureTransparency.Mixed : TextureTransparency.Opaque,\r\n },\r\n });\r\n }\r\n }\r\n\r\n return texture;\r\n }\r\n\r\n /**\r\n * Load a texture image given the ID of a texture element.\r\n * @param id The ID of the texture element.\r\n * @param iModel The IModel containing the texture element.\r\n * @returns A Promise resolving to a TextureImage created from the texture element's data, or to undefined if the TextureImage could not be created.\r\n * @see [[RenderSystem.loadTexture]]\r\n * @internal\r\n */\r\n public async loadTextureImage(id: Id64String, iModel: IModelConnection): Promise<OldTextureImage | undefined> {\r\n const elemProps = await iModel.elements.getProps(id);\r\n if (1 !== elemProps.length)\r\n return undefined;\r\n\r\n const textureProps = elemProps[0] as TextureProps;\r\n if (undefined === textureProps.data || \"string\" !== typeof (textureProps.data) || undefined === textureProps.format || \"number\" !== typeof (textureProps.format))\r\n return undefined;\r\n\r\n const format = textureProps.format;\r\n if (!isValidImageSourceFormat(format))\r\n return undefined;\r\n\r\n const imageSource = new ImageSource(base64StringToUint8Array(textureProps.data), format);\r\n const image = await imageElementFromImageSource(imageSource);\r\n return { image, format };\r\n }\r\n\r\n /** Obtain a texture created from a gradient.\r\n * @param _symb The description of the gradient.\r\n * @param _imodel The IModelConnection with which the texture is associated.\r\n * @returns A texture created from the gradient image, or undefined if the texture could not be created.\r\n * @note If a texture matching the specified gradient is already cached on the iModel, it will be returned.\r\n * Otherwise, if an iModel is supplied, the newly-created texture will be cached on the iModel such that subsequent calls with an equivalent gradient and the\r\n * same iModel will return the cached texture instead of creating a new one.\r\n */\r\n public getGradientTexture(_symb: Gradient.Symb, _imodel?: IModelConnection): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Create a new texture from an [[ImageBuffer]].\r\n * @deprecated in 3.x. Use [[createTexture]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createTextureFromImageBuffer(image: ImageBuffer, iModel: IModelConnection, params: RenderTexture.Params): RenderTexture | undefined {\r\n const ownership = params.key ? { key: params.key, iModel } : (params.isOwned ? \"external\" : undefined);\r\n return this.createTexture({\r\n type: params.type,\r\n ownership,\r\n image: {\r\n source: image,\r\n transparency: ImageBufferFormat.Rgba === image.format ? TextureTransparency.Mixed : TextureTransparency.Opaque,\r\n },\r\n });\r\n }\r\n\r\n /** Create a new texture from an HTML image. Typically the image was extracted from a binary representation of a jpeg or png via [[imageElementFromImageSource]].\r\n * @deprecated in 3.x. Use [[createTexture]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createTextureFromImage(image: HTMLImageElement, hasAlpha: boolean, iModel: IModelConnection | undefined, params: RenderTexture.Params): RenderTexture | undefined {\r\n const ownership = params.key && iModel ? { key: params.key, iModel } : (params.isOwned ? \"external\" : undefined);\r\n return this.createTexture({\r\n type: params.type,\r\n ownership,\r\n image: {\r\n source: image,\r\n transparency: hasAlpha ? TextureTransparency.Mixed : TextureTransparency.Opaque,\r\n },\r\n });\r\n }\r\n\r\n /** Create a new texture from an ImageSource.\r\n * @deprecated in 3.x. Use RenderSystem.createTextureFromSource.\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public async createTextureFromImageSource(source: ImageSource, iModel: IModelConnection | undefined, params: RenderTexture.Params): Promise<RenderTexture | undefined> {\r\n const ownership = iModel && params.key ? { iModel, key: params.key } : (params.isOwned ? \"external\" : undefined);\r\n return this.createTextureFromSource({\r\n type: params.type,\r\n source,\r\n ownership,\r\n transparency: source.format === ImageSourceFormat.Jpeg ? TextureTransparency.Opaque : TextureTransparency.Mixed,\r\n });\r\n }\r\n\r\n /** Create a texture from an ImageSource. */\r\n public async createTextureFromSource(args: CreateTextureFromSourceArgs): Promise<RenderTexture | undefined> {\r\n try {\r\n // JPEGs don't support transparency.\r\n const transparency = ImageSourceFormat.Jpeg === args.source.format ? TextureTransparency.Opaque : (args.transparency ?? TextureTransparency.Mixed);\r\n const image = await imageElementFromImageSource(args.source);\r\n if (!IModelApp.hasRenderSystem)\r\n return undefined;\r\n\r\n return this.createTexture({\r\n type: args.type,\r\n ownership: args.ownership,\r\n image: {\r\n source: image,\r\n transparency,\r\n },\r\n });\r\n } catch {\r\n return undefined;\r\n }\r\n }\r\n\r\n /** Create a new texture by its element ID. This texture will be retrieved asynchronously from the backend. A placeholder image will be associated with the texture until the requested image data loads. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createTextureFromElement(_id: Id64String, _imodel: IModelConnection, _params: RenderTexture.Params, _format: ImageSourceFormat): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n public createTexture(_args: CreateTextureArgs): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n /** Create a new texture from a cube of HTML images.\r\n * @internal\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n public createTextureFromCubeImages(_posX: HTMLImageElement, _negX: HTMLImageElement, _posY: HTMLImageElement, _negY: HTMLImageElement, _posZ: HTMLImageElement, _negZ: HTMLImageElement, _imodel: IModelConnection, _params: RenderTexture.Params): RenderTexture | undefined {\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public onInitialized(): void { }\r\n\r\n /** @internal */\r\n public enableDiagnostics(_enable: RenderDiagnostics): void { }\r\n\r\n /** @internal */\r\n public get supportsLogZBuffer(): boolean { return false !== this.options.logarithmicDepthBuffer; }\r\n\r\n /** Obtain an object that can be used to control various debugging features. Returns `undefined` if debugging features are unavailable for this `RenderSystem`.\r\n * @beta\r\n */\r\n public get debugControl(): RenderSystemDebugControl | undefined { return undefined; }\r\n\r\n /** @internal */\r\n public collectStatistics(_stats: RenderMemory.Statistics): void { }\r\n\r\n /** A function that is invoked after the WebGL context is lost. Context loss is almost always caused by excessive consumption of GPU memory.\r\n * After context loss occurs, the RenderSystem will be unable to interact with WebGL by rendering viewports, creating graphics and textures, etc.\r\n * By default, this function invokes [[ToolAdmin.exceptionHandler]] with a brief message describing what occurred.\r\n * An application can override this behavior as follows:\r\n * ```ts\r\n * RenderSystem.contextLossHandler = (): Promise<any> => {\r\n * // your implementation here.\r\n * }\r\n * ```\r\n * @note Context loss is reported by the browser some short time *after* it has occurred. It is not possible to determine the specific cause.\r\n * @see [[TileAdmin.gpuMemoryLimit]] to limit the amount of GPU memory consumed thereby reducing the likelihood of context loss.\r\n * @see [[TileAdmin.totalTileContentBytes]] for the amount of GPU memory allocated for tile graphics.\r\n */\r\n public static async contextLossHandler(): Promise<any> {\r\n const msg = IModelApp.localization.getLocalizedString(\"iModelJs:Errors.WebGLContextLost\");\r\n return ToolAdmin.exceptionHandler(msg);\r\n }\r\n}\r\n\r\n/** A RenderSystem provides access to resources used by the internal WebGL-based rendering system.\r\n * An application rarely interacts directly with the RenderSystem; instead it interacts with types like [[Viewport]] which\r\n * coordinate with the RenderSystem on the application's behalf.\r\n * @see [[IModelApp.renderSystem]].\r\n * @public\r\n */\r\nexport namespace RenderSystem { // eslint-disable-line no-redeclare\r\n /** Options passed to [[IModelApp.supplyRenderSystem]] to configure the [[RenderSystem]] on startup. Many of these options serve as \"feature flags\" used to enable newer, experimental features. As such they typically begin life tagged as \"alpha\" or \"beta\" and are subsequently deprecated when the feature is declared stable.\r\n *\r\n * @public\r\n */\r\n export interface Options {\r\n /** WebGL extensions to be explicitly disabled, regardless of whether or not the WebGL implementation supports them.\r\n * This is chiefly useful for testing code that only executes in the absence of particular extensions, while running on a system that supports those extensions.\r\n *\r\n * Default value: undefined\r\n *\r\n * @public\r\n */\r\n disabledExtensions?: WebGLExtensionName[];\r\n\r\n /** If true, preserve the shader source code as internal strings, useful for debugging purposes.\r\n *\r\n * Default value: false\r\n *\r\n * @public\r\n */\r\n preserveShaderSourceCode?: boolean;\r\n\r\n /** If true, display solar shadows when enabled by [ViewFlags.shadows]($common).\r\n *\r\n * Default value: true\r\n *\r\n * @beta\r\n */\r\n displaySolarShadows?: boolean;\r\n\r\n /** If the view frustum is sufficiently large, and the EXT_frag_depth WebGL extension is available, use a logarithmic depth buffer to improve depth buffer resolution. Framerate may degrade to an extent while the logarithmic depth buffer is in use. If this option is disabled, or the extension is not supported, the near and far planes of very large view frustums will instead be moved to reduce the draw distance.\r\n *\r\n * Default value: true\r\n *\r\n * @public\r\n */\r\n logarithmicDepthBuffer?: boolean;\r\n\r\n /** If true, [[ScreenViewport]]s will respect the DPI of the display. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[dpiAwareLOD]] to control whether device pixel ratio affects the level of detail for tile graphics and decorations.\r\n * @see [[Viewport.cssPixelsToDevicePixels]] to convert CSS pixels to device pixels.\r\n * @see [[Viewport.devicePixelRatio]].\r\n *\r\n * Default value: true\r\n *\r\n * @public\r\n */\r\n dpiAwareViewports?: boolean;\r\n\r\n /** If defined, this will be used as the device pixel ratio instead of the system's actual device pixel ratio.\r\n * This can be helpful for situations like running in the iOS Simulator where forcing a lower resolution by setting a sub-1 device pixel ratio would increase performance.\r\n * @note If this setting is used to decrease the effective device pixel ratio, the view will appear pixelated.\r\n * @note This setting should only be used to increase performance in situations like the iOS Simulator for testing purposes only. It should not be used in a production situation.\r\n * @note This setting has no effect if [[dpiAwareViewports]] is `false`.\r\n *\r\n * Default value: undefined\r\n *\r\n * @public\r\n */\r\n devicePixelRatioOverride?: number;\r\n\r\n /** If true, [[ScreenViewport]]s will take into account the DPI of the display when computing the level of detail for tile graphics and decorations.\r\n * This can result in sharper-looking images on high-DPI devices like mobile phones, but may reduce performance on such devices.\r\n * @note This setting has no effect if [[dpiAwareViewports]] is `false`.\r\n * @see [[Viewport.devicePixelRatio]].\r\n *\r\n * Default value: false\r\n *\r\n * @public\r\n */\r\n dpiAwareLOD?: boolean;\r\n\r\n /** Previously, this property dictated whether to attempt to use a WebGL 2 rendering context before falling back to WebGL 1.\r\n * WebGL 1 is no longer supported, so this property is now ignored.\r\n * @public\r\n * @deprecated in 4.x. WebGL 1 is no longer supported.\r\n */\r\n useWebGL2?: boolean;\r\n\r\n /** If true, plan projection models will be rendered using [PlanProjectionSettings]($common) defined by the [[DisplayStyle3dState]].\r\n * Default value: true\r\n * @public\r\n */\r\n planProjections?: boolean;\r\n\r\n /** To help prevent delays when a user interacts with a [[Viewport]], the WebGL render system can precompile shader programs before any Viewport is opened.\r\n * This particularly helps applications when they do not open a Viewport immediately upon startup - for example, if the user is first expected to select an iModel and a view through the user interface.\r\n * Shader precompilation will cease once all shader programs have been compiled, or when a Viewport is opened (registered with the [[ViewManager]]).\r\n * @note Enabling this feature can slow UI interactions before a [[Viewport]] is opened.\r\n * To enable this feature, set this to `true`.\r\n *\r\n * Default value: false\r\n *\r\n * @beta\r\n */\r\n doIdleWork?: boolean;\r\n\r\n /** WebGL context attributes to explicitly set when initializing [[IModelApp.renderSystem]].\r\n * Exposed chiefly for OpenCities Planner.\r\n * @internal\r\n */\r\n contextAttributes?: WebGLContextAttributes;\r\n\r\n /** If true, will cause exception when a shader uniform is missing (usually optimized out), otherwise will only log these.\r\n * Default value: false\r\n * @public\r\n */\r\n errorOnMissingUniform?: boolean;\r\n\r\n /** If true, and the `WEBGL_debug_shaders` extension is available, accumulate debug information during shader compilation.\r\n * This information can be accessed via `RenderSystemDebugControl.debugShaderFiles`.\r\n * Default value: false\r\n * @internal\r\n */\r\n debugShaders?: boolean;\r\n\r\n /** Initial antialias setting.\r\n * If antialiasing is supported, a value greater than 1 enables it using that many samples, and a value less than or equal to 1 disables antialiasing.\r\n * Default value: 1\r\n * @public\r\n */\r\n antialiasSamples?: number;\r\n }\r\n}\r\n"]}