@itwin/core-frontend 3.0.0-dev.169 → 3.0.0-dev.174

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 (46) hide show
  1. package/LICENSE.md +1 -1
  2. package/lib/cjs/IModelApp.d.ts +1 -1
  3. package/lib/cjs/IModelApp.d.ts.map +1 -1
  4. package/lib/cjs/IModelApp.js +1 -1
  5. package/lib/cjs/IModelApp.js.map +1 -1
  6. package/lib/cjs/ViewManager.d.ts +6 -6
  7. package/lib/cjs/ViewManager.js +5 -5
  8. package/lib/cjs/ViewManager.js.map +1 -1
  9. package/lib/cjs/Viewport.d.ts +5 -3
  10. package/lib/cjs/Viewport.d.ts.map +1 -1
  11. package/lib/cjs/Viewport.js +5 -3
  12. package/lib/cjs/Viewport.js.map +1 -1
  13. package/lib/cjs/render/RenderSystem.d.ts +1 -0
  14. package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
  15. package/lib/cjs/render/RenderSystem.js +1 -0
  16. package/lib/cjs/render/RenderSystem.js.map +1 -1
  17. package/lib/cjs/render/primitives/Primitives.d.ts +1 -1
  18. package/lib/cjs/render/primitives/Primitives.d.ts.map +1 -1
  19. package/lib/cjs/render/primitives/Primitives.js.map +1 -1
  20. package/lib/cjs/tile/GltfReader.d.ts +29 -17
  21. package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
  22. package/lib/cjs/tile/GltfReader.js +102 -78
  23. package/lib/cjs/tile/GltfReader.js.map +1 -1
  24. package/lib/esm/IModelApp.d.ts +1 -1
  25. package/lib/esm/IModelApp.d.ts.map +1 -1
  26. package/lib/esm/IModelApp.js +1 -1
  27. package/lib/esm/IModelApp.js.map +1 -1
  28. package/lib/esm/ViewManager.d.ts +6 -6
  29. package/lib/esm/ViewManager.js +5 -5
  30. package/lib/esm/ViewManager.js.map +1 -1
  31. package/lib/esm/Viewport.d.ts +5 -3
  32. package/lib/esm/Viewport.d.ts.map +1 -1
  33. package/lib/esm/Viewport.js +5 -3
  34. package/lib/esm/Viewport.js.map +1 -1
  35. package/lib/esm/render/RenderSystem.d.ts +1 -0
  36. package/lib/esm/render/RenderSystem.d.ts.map +1 -1
  37. package/lib/esm/render/RenderSystem.js +1 -0
  38. package/lib/esm/render/RenderSystem.js.map +1 -1
  39. package/lib/esm/render/primitives/Primitives.d.ts +1 -1
  40. package/lib/esm/render/primitives/Primitives.d.ts.map +1 -1
  41. package/lib/esm/render/primitives/Primitives.js.map +1 -1
  42. package/lib/esm/tile/GltfReader.d.ts +29 -17
  43. package/lib/esm/tile/GltfReader.d.ts.map +1 -1
  44. package/lib/esm/tile/GltfReader.js +103 -79
  45. package/lib/esm/tile/GltfReader.js.map +1 -1
  46. package/package.json +22 -22
@@ -186,6 +186,7 @@ export declare type RenderSkyBoxParams = RenderSkyGradientParams | RenderSkySphe
186
186
  /** A RenderSystem provides access to resources used by the internal WebGL-based rendering system.
187
187
  * An application rarely interacts directly with the RenderSystem; instead it interacts with types like [[Viewport]] which
188
188
  * coordinate with the RenderSystem on the application's behalf.
189
+ * @see [Display system overview]($docs/learning/display/index.md)
189
190
  * @see [[IModelApp.renderSystem]].
190
191
  * @public
191
192
  */
@@ -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,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAW,OAAO,EAAE,OAAO,EAAW,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC5H,OAAO,EACL,QAAQ,EAAE,mBAAmB,EAAoB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAqB,WAAW,EAAE,iBAAiB,EACxG,kBAAkB,EAA2B,cAAc,EAAE,aAAa,EAAE,WAAW,EAClH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAA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G;WACiB,kBAAkB,IAAI,OAAO,CAAC,GAAG,CAAC;CAIvD;AAED;;;;;GAKG;AACH,yBAAiB,YAAY,CAAC;IAC5B;;;OAGG;IACH,UAAiB,OAAO;QACtB;;;;;;WAMG;QACH,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAE1C;;;;;WAKG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;QAEnC;;;;;WAKG;QACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAE9B;;;;;WAKG;QACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;QAEjC,oDAAoD;QACpD,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,oDAAoD;QACpD,sBAAsB,CAAC,EAAE,OAAO,CAAC;QAEjC;;;;;;;;WAQG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAE5B;;;;;;;;;WASG;QACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAElC;;;;;;;;WAQG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QAEtB;;;;;WAKG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB;;;WAGG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;QAE1B;;;;;;;;;WASG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;;WAGG;QACH,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;QAE3C;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB;;;;WAIG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B;CACF"}
@@ -95,6 +95,7 @@ exports.PlanarGridTransparency = PlanarGridTransparency;
95
95
  /** A RenderSystem provides access to resources used by the internal WebGL-based rendering system.
96
96
  * An application rarely interacts directly with the RenderSystem; instead it interacts with types like [[Viewport]] which
97
97
  * coordinate with the RenderSystem on the application's behalf.
98
+ * @see [Display system overview]($docs/learning/display/index.md)
98
99
  * @see [[IModelApp.renderSystem]].
99
100
  * @public
100
101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S,CAAC,YAAY,CAAC,kBAAkB,CAAC,kCAAkC,CAAC,CAAC;QAC1F,OAAO,qBAAS,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;CACF;AAheD,oCAgeC","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 { ClipVector, Matrix3d, Point2d, Point3d, Range2d, Range3d, Transform, Vector2d, XAndY } from \"@itwin/core-geometry\";\r\nimport {\r\n ColorDef, ElementAlignedBox3d, FeatureIndexType, Frustum, Gradient, ImageBuffer, ImageBufferFormat, ImageSource, ImageSourceFormat,\r\n isValidImageSourceFormat, PackedFeatureTable, QParams3d, QPoint3dList, RenderMaterial, RenderTexture, SkyGradient, TextureProps,\r\n} from \"@itwin/core-common\";\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 { RealityMeshPrimitive } from \"./primitives/mesh/RealityMeshPrimitive\";\r\nimport { TerrainMeshPrimitive } from \"./primitives/mesh/TerrainMeshPrimitive\";\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 { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderTarget } from \"./RenderTarget\";\r\nimport { ScreenSpaceEffectBuilder, ScreenSpaceEffectBuilderParams } from \"./ScreenSpaceEffectBuilder\";\r\nimport { CreateTextureArgs, CreateTextureFromSourceArgs, TextureCacheKey, TextureTransparency } from \"./RenderTexture\";\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/** 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 RenderRealityMeshGeometry implements IDisposable, RenderMemory.Consumer {\r\n public abstract dispose(): void;\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\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 [[IModelApp.renderSystem]].\r\n * @public\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 supportsInstancing(): boolean { return true; }\r\n\r\n /** @internal */\r\n public get supportsIndexedEdges(): boolean { return true; }\r\n\r\n /** @internal */\r\n public get supportsNonuniformScaledInstancing(): boolean { return true; }\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 */\r\n public createMaterial(_params: RenderMaterial.Params, _imodel: IModelConnection): RenderMaterial | undefined { return undefined; }\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 createRealityMeshFromTerrain(_terrainMesh: TerrainMeshPrimitive, _transform?: Transform): RenderRealityMeshGeometry | undefined { return undefined; }\r\n /** @internal */\r\n public createRealityMeshGraphic(_terrainGeometry: RenderRealityMeshGeometry, _featureTable: PackedFeatureTable, _tileId: string | undefined, _baseColor: ColorDef | undefined, _baseTransparent: boolean, _textures?: TerrainTexture[]): RenderGraphic | undefined { return undefined; }\r\n /** @internal */\r\n public createRealityMesh(_realityMesh: RealityMeshPrimitive): 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 const rasterTile = new MeshArgs();\r\n\r\n // corners\r\n // [0] [1]\r\n // [2] [3]\r\n // Quantize the points according to their range\r\n rasterTile.points = new QPoint3dList(QParams3d.fromRange(Range3d.create(...corners)));\r\n for (let i = 0; i < 4; ++i)\r\n rasterTile.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 = rasterTile.points.params.origin;\r\n const transform = Transform.createTranslationXYZ(qorigin.x, qorigin.y, qorigin.z);\r\n qorigin.setZero();\r\n\r\n rasterTile.vertIndices = [0, 1, 2, 2, 1, 3];\r\n rasterTile.textureUv = [\r\n new Point2d(0.0, 0.0),\r\n new Point2d(1.0, 0.0),\r\n new Point2d(0.0, 1.0),\r\n new Point2d(1.0, 1.0),\r\n ];\r\n\r\n rasterTile.texture = tileTexture;\r\n rasterTile.isPlanar = true;\r\n\r\n if (undefined !== featureIndex) {\r\n rasterTile.features.featureID = featureIndex;\r\n rasterTile.features.type = FeatureIndexType.Uniform;\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\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.Translucent : 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 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.Translucent : 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 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.Translucent : TextureTransparency.Opaque,\r\n },\r\n });\r\n }\r\n\r\n /** Create a new texture from an ImageSource.\r\n * @deprecated 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.Translucent,\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.Translucent);\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 /** ###TODO this appears to do nothing. @internal */\r\n filterMapTextures?: boolean;\r\n /** ###TODO this appears to do nothing. @internal */\r\n filterMapDrapeTextures?: 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 /** If true will attempt to create a WebGL2 context, falling back to WebGL1 if WebGL2 is not supported.\r\n *\r\n * Default value: true\r\n *\r\n * @public\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, 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 > 1, and a WebGL2 context is being used, will turn on antialiasing using that many samples.\r\n * Default value: 1\r\n * @public\r\n */\r\n antialiasSamples?: number;\r\n }\r\n}\r\n"]}
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AC,kBAAkB,CAAC,kCAAkC,CAAC,CAAC;QAC1F,OAAO,qBAAS,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;CACF;AAheD,oCAgeC","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 { ClipVector, Matrix3d, Point2d, Point3d, Range2d, Range3d, Transform, Vector2d, XAndY } from \"@itwin/core-geometry\";\r\nimport {\r\n ColorDef, ElementAlignedBox3d, FeatureIndexType, Frustum, Gradient, ImageBuffer, ImageBufferFormat, ImageSource, ImageSourceFormat,\r\n isValidImageSourceFormat, PackedFeatureTable, QParams3d, QPoint3dList, RenderMaterial, RenderTexture, SkyGradient, TextureProps,\r\n} from \"@itwin/core-common\";\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 { RealityMeshPrimitive } from \"./primitives/mesh/RealityMeshPrimitive\";\r\nimport { TerrainMeshPrimitive } from \"./primitives/mesh/TerrainMeshPrimitive\";\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 { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderTarget } from \"./RenderTarget\";\r\nimport { ScreenSpaceEffectBuilder, ScreenSpaceEffectBuilderParams } from \"./ScreenSpaceEffectBuilder\";\r\nimport { CreateTextureArgs, CreateTextureFromSourceArgs, TextureCacheKey, TextureTransparency } from \"./RenderTexture\";\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/** 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 RenderRealityMeshGeometry implements IDisposable, RenderMemory.Consumer {\r\n public abstract dispose(): void;\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\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 */\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 supportsInstancing(): boolean { return true; }\r\n\r\n /** @internal */\r\n public get supportsIndexedEdges(): boolean { return true; }\r\n\r\n /** @internal */\r\n public get supportsNonuniformScaledInstancing(): boolean { return true; }\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 */\r\n public createMaterial(_params: RenderMaterial.Params, _imodel: IModelConnection): RenderMaterial | undefined { return undefined; }\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 createRealityMeshFromTerrain(_terrainMesh: TerrainMeshPrimitive, _transform?: Transform): RenderRealityMeshGeometry | undefined { return undefined; }\r\n /** @internal */\r\n public createRealityMeshGraphic(_terrainGeometry: RenderRealityMeshGeometry, _featureTable: PackedFeatureTable, _tileId: string | undefined, _baseColor: ColorDef | undefined, _baseTransparent: boolean, _textures?: TerrainTexture[]): RenderGraphic | undefined { return undefined; }\r\n /** @internal */\r\n public createRealityMesh(_realityMesh: RealityMeshPrimitive): 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 const rasterTile = new MeshArgs();\r\n\r\n // corners\r\n // [0] [1]\r\n // [2] [3]\r\n // Quantize the points according to their range\r\n rasterTile.points = new QPoint3dList(QParams3d.fromRange(Range3d.create(...corners)));\r\n for (let i = 0; i < 4; ++i)\r\n rasterTile.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 = rasterTile.points.params.origin;\r\n const transform = Transform.createTranslationXYZ(qorigin.x, qorigin.y, qorigin.z);\r\n qorigin.setZero();\r\n\r\n rasterTile.vertIndices = [0, 1, 2, 2, 1, 3];\r\n rasterTile.textureUv = [\r\n new Point2d(0.0, 0.0),\r\n new Point2d(1.0, 0.0),\r\n new Point2d(0.0, 1.0),\r\n new Point2d(1.0, 1.0),\r\n ];\r\n\r\n rasterTile.texture = tileTexture;\r\n rasterTile.isPlanar = true;\r\n\r\n if (undefined !== featureIndex) {\r\n rasterTile.features.featureID = featureIndex;\r\n rasterTile.features.type = FeatureIndexType.Uniform;\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\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.Translucent : 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 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.Translucent : 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 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.Translucent : TextureTransparency.Opaque,\r\n },\r\n });\r\n }\r\n\r\n /** Create a new texture from an ImageSource.\r\n * @deprecated 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.Translucent,\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.Translucent);\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 /** ###TODO this appears to do nothing. @internal */\r\n filterMapTextures?: boolean;\r\n /** ###TODO this appears to do nothing. @internal */\r\n filterMapDrapeTextures?: 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 /** If true will attempt to create a WebGL2 context, falling back to WebGL1 if WebGL2 is not supported.\r\n *\r\n * Default value: true\r\n *\r\n * @public\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, 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 > 1, and a WebGL2 context is being used, will turn on antialiasing using that many samples.\r\n * Default value: 1\r\n * @public\r\n */\r\n antialiasSamples?: number;\r\n }\r\n}\r\n"]}
@@ -61,7 +61,7 @@ export declare class TriangleList {
61
61
  get length(): number;
62
62
  get isEmpty(): boolean;
63
63
  addTriangle(triangle: Triangle): void;
64
- addFromTypedArray(indices: Uint16Array | Uint32Array, flags?: number): void;
64
+ addFromTypedArray(indices: Uint8Array | Uint16Array | Uint32Array, flags?: number): void;
65
65
  getTriangle(index: number, out?: Triangle): Triangle;
66
66
  }
67
67
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"Primitives.d.ts","sourceRoot":"","sources":["../../../../src/render/primitives/Primitives.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,gBAAgB;AAChB,yBAAiB,cAAc,CAAC;IACvB,MAAM,MAAM,MAAM,CAAC;IACnB,MAAM,SAAS,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,oBAAY,UAAU;IACpB,KAAK,IAAA;IACL,MAAM,IAAA;IACN,kBAAkB,IAAA;CACnB;AAED,gBAAgB;AAChB,oBAAY,YAAY;IAAG,GAAG,IAAI;IAAE,EAAE,IAAI;CAAE;AAE5C,gBAAgB;AAChB,oBAAY,aAAa;IAAG,GAAG,IAAI;IAAE,EAAE,IAAI;CAAE;AAE7C,gBAAgB;AAChB,oBAAY,aAAa;IAAG,GAAG,IAAI;IAAE,EAAE,IAAI;CAAE;AAE7C,gBAAgB;AAChB,qBAAa,eAAe;IAC1B,SAAgB,OAAO,EAAE,UAAU,CAAC;IACpC,SAAgB,QAAQ,EAAE,YAAY,CAAC;IACvC,SAAgB,aAAa,EAAE,aAAa,CAAC;IAC7C,SAAgB,KAAK,EAAE,aAAa,CAAC;gBACzB,KAAK,EAAE,aAAa,EAAE,OAAO,GAAE,UAA8B,EAAE,QAAQ,GAAE,YAA8B,EAAE,aAAa,GAAE,aAAgC;IAIpK,IAAW,gBAAgB,IAAI,OAA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CAAC,KAAK,IAAI;gBACZ,MAAM;SACT;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AArDD,kCAqDC;AAED,gBAAgB;AAChB,MAAa,WAAY,SAAQ,0BAAwB;IACvD;QACE,KAAK,CAAC,CAAC,GAAgB,EAAE,GAAgB,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAClE,CAAC;IACM,SAAS,CAAC,QAAkB,EAAE,QAA2C;QAC9E,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC;CACF;AAPD,kCAOC","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 { assert, SortedArray } from \"@itwin/core-bentley\";\r\nimport { GraphicBuilder } from \"../GraphicBuilder\";\r\n\r\n/** @internal */\r\nexport namespace ToleranceRatio {\r\n export const vertex = 0.1;\r\n export const facetArea = 0.1;\r\n}\r\n\r\n/** Specifies under what circumstances a GeometryAccumulator should generate normals.\r\n * @internal\r\n */\r\nexport enum NormalMode {\r\n Never, // Never generate normals\r\n Always, // Always generate normals\r\n CurvedSurfacesOnly, // Generate normals only for curved surfaces\r\n}\r\n\r\n/** @internal */\r\nexport enum SurfacesOnly { Yes = 1, No = 0 } // Yes indicates polylines will not be generated, only meshes.\r\n\r\n/** @internal */\r\nexport enum PreserveOrder { Yes = 1, No = 0 } // Yes indicates primitives will not be merged, and the order in which they were added to the GraphicBuilder will be preserved.\r\n\r\n/** @internal */\r\nexport enum GenerateEdges { Yes = 1, No = 0 } // Yes indicates edges will be generated for surfaces\r\n\r\n/** @internal */\r\nexport class GeometryOptions {\r\n public readonly normals: NormalMode;\r\n public readonly surfaces: SurfacesOnly;\r\n public readonly preserveOrder: PreserveOrder;\r\n public readonly edges: GenerateEdges;\r\n constructor(edges: GenerateEdges, normals: NormalMode = NormalMode.Always, surfaces: SurfacesOnly = SurfacesOnly.No, preserveOrder: PreserveOrder = PreserveOrder.No) {\r\n this.normals = normals; this.surfaces = surfaces; this.preserveOrder = preserveOrder; this.edges = edges;\r\n }\r\n\r\n public get wantSurfacesOnly(): boolean { return this.surfaces === SurfacesOnly.Yes; }\r\n public get wantPreserveOrder(): boolean { return this.preserveOrder === PreserveOrder.Yes; }\r\n public get wantEdges(): boolean { return this.edges === GenerateEdges.Yes; }\r\n\r\n public static createForGraphicBuilder(params: GraphicBuilder, normals: NormalMode = NormalMode.Always, surfaces: SurfacesOnly = SurfacesOnly.No): GeometryOptions {\r\n return new GeometryOptions(params.wantEdges ? GenerateEdges.Yes : GenerateEdges.No, normals, surfaces, params.preserveOrder ? PreserveOrder.Yes : PreserveOrder.No);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class Triangle {\r\n public readonly indices = new Uint32Array(3);\r\n public readonly visible = [true, true, true];\r\n public singleSided: boolean;\r\n\r\n public constructor(singleSided: boolean = true) { this.singleSided = singleSided; }\r\n\r\n public setIndices(a: number, b: number, c: number) {\r\n this.indices[0] = a;\r\n this.indices[1] = b;\r\n this.indices[2] = c;\r\n }\r\n\r\n public setEdgeVisibility(a: boolean, b: boolean, c: boolean) {\r\n this.visible[0] = a;\r\n this.visible[1] = b;\r\n this.visible[2] = c;\r\n }\r\n\r\n public isEdgeVisible(index: number) {\r\n assert(index < 3 && index >= 0);\r\n return this.visible[index];\r\n }\r\n\r\n public get isDegenerate() { return this.indices[0] === this.indices[1] || this.indices[0] === this.indices[2] || this.indices[1] === this.indices[2]; }\r\n}\r\n\r\n/** @internal */\r\nexport class TriangleList {\r\n private readonly _flags: number[] = [];\r\n public readonly indices: number[] = [];\r\n\r\n public get length(): number { return this._flags.length; }\r\n public get isEmpty(): boolean { return 0 === this.length; }\r\n\r\n public addTriangle(triangle: Triangle): void {\r\n let flags = triangle.singleSided ? 1 : 0;\r\n for (let i = 0; i < 3; i++) {\r\n if (triangle.isEdgeVisible(i))\r\n flags |= (0x0002 << i);\r\n\r\n this.indices.push(triangle.indices[i]);\r\n }\r\n\r\n this._flags.push(flags);\r\n }\r\n public addFromTypedArray(indices: Uint16Array | Uint32Array, flags: number = 0) {\r\n for (let i = 0; i < indices.length;) {\r\n this.indices.push(indices[i++]);\r\n this.indices.push(indices[i++]);\r\n this.indices.push(indices[i++]);\r\n this._flags.push(flags);\r\n }\r\n }\r\n\r\n public getTriangle(index: number, out?: Triangle): Triangle {\r\n const triangle = undefined !== out ? out : new Triangle();\r\n\r\n if (index > this.length) {\r\n assert(false);\r\n return new Triangle();\r\n }\r\n\r\n const flags = this._flags[index];\r\n triangle.singleSided = 0 !== (flags & 0x0001);\r\n\r\n const baseIndex = index * 3;\r\n for (let i = 0; i < 3; i++) {\r\n triangle.indices[i] = this.indices[baseIndex + i];\r\n triangle.visible[i] = 0 !== (flags & 0x0002 << i);\r\n }\r\n\r\n return triangle;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class TriangleKey {\r\n private readonly _sortedIndices = new Uint32Array(3);\r\n\r\n public constructor(triangle: Triangle) {\r\n const index = triangle.indices;\r\n const sorted = this._sortedIndices;\r\n\r\n if (index[0] < index[1]) {\r\n if (index[0] < index[2]) {\r\n sorted[0] = index[0];\r\n if (index[1] < index[2]) {\r\n sorted[1] = index[1];\r\n sorted[2] = index[2];\r\n } else {\r\n sorted[1] = index[2];\r\n sorted[2] = index[1];\r\n }\r\n } else {\r\n sorted[0] = index[2];\r\n sorted[1] = index[0];\r\n sorted[2] = index[1];\r\n }\r\n } else {\r\n if (index[1] < index[2]) {\r\n sorted[0] = index[1];\r\n if (index[0] < index[2]) {\r\n sorted[1] = index[0];\r\n sorted[2] = index[2];\r\n } else {\r\n sorted[1] = index[2];\r\n sorted[2] = index[0];\r\n }\r\n } else {\r\n sorted[0] = index[2];\r\n sorted[1] = index[1];\r\n sorted[2] = index[0];\r\n }\r\n }\r\n\r\n assert(sorted[0] < sorted[1]);\r\n assert(sorted[1] < sorted[2]);\r\n }\r\n\r\n public compare(rhs: TriangleKey): number {\r\n let diff = 0;\r\n for (let i = 0; i < 3; i++) {\r\n diff = this._sortedIndices[i] - rhs._sortedIndices[i];\r\n if (0 !== diff)\r\n break;\r\n }\r\n\r\n return diff;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class TriangleSet extends SortedArray<TriangleKey> {\r\n public constructor() {\r\n super((lhs: TriangleKey, rhs: TriangleKey) => lhs.compare(rhs));\r\n }\r\n public insertKey(triangle: Triangle, onInsert: (triangleKey: TriangleKey) => any): number {\r\n return this.insert(new TriangleKey(triangle), onInsert);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Primitives.js","sourceRoot":"","sources":["../../../../src/render/primitives/Primitives.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA0D;AAG1D,gBAAgB;AAChB,IAAiB,cAAc,CAG9B;AAHD,WAAiB,cAAc;IAChB,qBAAM,GAAG,GAAG,CAAC;IACb,wBAAS,GAAG,GAAG,CAAC;AAC/B,CAAC,EAHgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAG9B;AAED;;GAEG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,6CAAK,CAAA;IACL,+CAAM,CAAA;IACN,uEAAkB,CAAA;AACpB,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAED,gBAAgB;AAChB,IAAY,YAAgC;AAA5C,WAAY,YAAY;IAAG,6CAAO,CAAA;IAAE,2CAAM,CAAA;AAAC,CAAC,EAAhC,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAAoB,CAAE,8DAA8D;AAE5G,gBAAgB;AAChB,IAAY,aAAiC;AAA7C,WAAY,aAAa;IAAG,+CAAO,CAAA;IAAE,6CAAM,CAAA;A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AC;gBACrB,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;aACtB;SACF;QAED,IAAA,qBAAM,EAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAA,qBAAM,EAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IAEM,OAAO,CAAC,GAAgB;QAC7B,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1B,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;YACtD,IAAI,CAAC,KAAK,IAAI;gBACZ,MAAM;SACT;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AArDD,kCAqDC;AAED,gBAAgB;AAChB,MAAa,WAAY,SAAQ,0BAAwB;IACvD;QACE,KAAK,CAAC,CAAC,GAAgB,EAAE,GAAgB,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAClE,CAAC;IACM,SAAS,CAAC,QAAkB,EAAE,QAA2C;QAC9E,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC;CACF;AAPD,kCAOC","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 { assert, SortedArray } from \"@itwin/core-bentley\";\r\nimport { GraphicBuilder } from \"../GraphicBuilder\";\r\n\r\n/** @internal */\r\nexport namespace ToleranceRatio {\r\n export const vertex = 0.1;\r\n export const facetArea = 0.1;\r\n}\r\n\r\n/** Specifies under what circumstances a GeometryAccumulator should generate normals.\r\n * @internal\r\n */\r\nexport enum NormalMode {\r\n Never, // Never generate normals\r\n Always, // Always generate normals\r\n CurvedSurfacesOnly, // Generate normals only for curved surfaces\r\n}\r\n\r\n/** @internal */\r\nexport enum SurfacesOnly { Yes = 1, No = 0 } // Yes indicates polylines will not be generated, only meshes.\r\n\r\n/** @internal */\r\nexport enum PreserveOrder { Yes = 1, No = 0 } // Yes indicates primitives will not be merged, and the order in which they were added to the GraphicBuilder will be preserved.\r\n\r\n/** @internal */\r\nexport enum GenerateEdges { Yes = 1, No = 0 } // Yes indicates edges will be generated for surfaces\r\n\r\n/** @internal */\r\nexport class GeometryOptions {\r\n public readonly normals: NormalMode;\r\n public readonly surfaces: SurfacesOnly;\r\n public readonly preserveOrder: PreserveOrder;\r\n public readonly edges: GenerateEdges;\r\n constructor(edges: GenerateEdges, normals: NormalMode = NormalMode.Always, surfaces: SurfacesOnly = SurfacesOnly.No, preserveOrder: PreserveOrder = PreserveOrder.No) {\r\n this.normals = normals; this.surfaces = surfaces; this.preserveOrder = preserveOrder; this.edges = edges;\r\n }\r\n\r\n public get wantSurfacesOnly(): boolean { return this.surfaces === SurfacesOnly.Yes; }\r\n public get wantPreserveOrder(): boolean { return this.preserveOrder === PreserveOrder.Yes; }\r\n public get wantEdges(): boolean { return this.edges === GenerateEdges.Yes; }\r\n\r\n public static createForGraphicBuilder(params: GraphicBuilder, normals: NormalMode = NormalMode.Always, surfaces: SurfacesOnly = SurfacesOnly.No): GeometryOptions {\r\n return new GeometryOptions(params.wantEdges ? GenerateEdges.Yes : GenerateEdges.No, normals, surfaces, params.preserveOrder ? PreserveOrder.Yes : PreserveOrder.No);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class Triangle {\r\n public readonly indices = new Uint32Array(3);\r\n public readonly visible = [true, true, true];\r\n public singleSided: boolean;\r\n\r\n public constructor(singleSided: boolean = true) { this.singleSided = singleSided; }\r\n\r\n public setIndices(a: number, b: number, c: number) {\r\n this.indices[0] = a;\r\n this.indices[1] = b;\r\n this.indices[2] = c;\r\n }\r\n\r\n public setEdgeVisibility(a: boolean, b: boolean, c: boolean) {\r\n this.visible[0] = a;\r\n this.visible[1] = b;\r\n this.visible[2] = c;\r\n }\r\n\r\n public isEdgeVisible(index: number) {\r\n assert(index < 3 && index >= 0);\r\n return this.visible[index];\r\n }\r\n\r\n public get isDegenerate() { return this.indices[0] === this.indices[1] || this.indices[0] === this.indices[2] || this.indices[1] === this.indices[2]; }\r\n}\r\n\r\n/** @internal */\r\nexport class TriangleList {\r\n private readonly _flags: number[] = [];\r\n public readonly indices: number[] = [];\r\n\r\n public get length(): number { return this._flags.length; }\r\n public get isEmpty(): boolean { return 0 === this.length; }\r\n\r\n public addTriangle(triangle: Triangle): void {\r\n let flags = triangle.singleSided ? 1 : 0;\r\n for (let i = 0; i < 3; i++) {\r\n if (triangle.isEdgeVisible(i))\r\n flags |= (0x0002 << i);\r\n\r\n this.indices.push(triangle.indices[i]);\r\n }\r\n\r\n this._flags.push(flags);\r\n }\r\n\r\n public addFromTypedArray(indices: Uint8Array | Uint16Array | Uint32Array, flags: number = 0) {\r\n for (let i = 0; i < indices.length;) {\r\n this.indices.push(indices[i++]);\r\n this.indices.push(indices[i++]);\r\n this.indices.push(indices[i++]);\r\n this._flags.push(flags);\r\n }\r\n }\r\n\r\n public getTriangle(index: number, out?: Triangle): Triangle {\r\n const triangle = undefined !== out ? out : new Triangle();\r\n\r\n if (index > this.length) {\r\n assert(false);\r\n return new Triangle();\r\n }\r\n\r\n const flags = this._flags[index];\r\n triangle.singleSided = 0 !== (flags & 0x0001);\r\n\r\n const baseIndex = index * 3;\r\n for (let i = 0; i < 3; i++) {\r\n triangle.indices[i] = this.indices[baseIndex + i];\r\n triangle.visible[i] = 0 !== (flags & 0x0002 << i);\r\n }\r\n\r\n return triangle;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class TriangleKey {\r\n private readonly _sortedIndices = new Uint32Array(3);\r\n\r\n public constructor(triangle: Triangle) {\r\n const index = triangle.indices;\r\n const sorted = this._sortedIndices;\r\n\r\n if (index[0] < index[1]) {\r\n if (index[0] < index[2]) {\r\n sorted[0] = index[0];\r\n if (index[1] < index[2]) {\r\n sorted[1] = index[1];\r\n sorted[2] = index[2];\r\n } else {\r\n sorted[1] = index[2];\r\n sorted[2] = index[1];\r\n }\r\n } else {\r\n sorted[0] = index[2];\r\n sorted[1] = index[0];\r\n sorted[2] = index[1];\r\n }\r\n } else {\r\n if (index[1] < index[2]) {\r\n sorted[0] = index[1];\r\n if (index[0] < index[2]) {\r\n sorted[1] = index[0];\r\n sorted[2] = index[2];\r\n } else {\r\n sorted[1] = index[2];\r\n sorted[2] = index[0];\r\n }\r\n } else {\r\n sorted[0] = index[2];\r\n sorted[1] = index[1];\r\n sorted[2] = index[0];\r\n }\r\n }\r\n\r\n assert(sorted[0] < sorted[1]);\r\n assert(sorted[1] < sorted[2]);\r\n }\r\n\r\n public compare(rhs: TriangleKey): number {\r\n let diff = 0;\r\n for (let i = 0; i < 3; i++) {\r\n diff = this._sortedIndices[i] - rhs._sortedIndices[i];\r\n if (0 !== diff)\r\n break;\r\n }\r\n\r\n return diff;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class TriangleSet extends SortedArray<TriangleKey> {\r\n public constructor() {\r\n super((lhs: TriangleKey, rhs: TriangleKey) => lhs.compare(rhs));\r\n }\r\n public insertKey(triangle: Triangle, onInsert: (triangleKey: TriangleKey) => any): number {\r\n return this.insert(new TriangleKey(triangle), onInsert);\r\n }\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Id64String } from "@itwin/core-bentley";
5
5
  import { Point3d, Range2d, Range3d, Transform, Vector3d } from "@itwin/core-geometry";
6
- import { BatchType, ElementAlignedBox3d, FeatureTable, MeshPolylineList, QParams2d, QParams3d, RenderTexture, TextureMapping, TileReadStatus } from "@itwin/core-common";
6
+ import { BatchType, ElementAlignedBox3d, FeatureTable, MeshPolylineList, QParams2d, QParams3d, TextureMapping, TileReadStatus } from "@itwin/core-common";
7
7
  import { IModelConnection } from "../IModelConnection";
8
8
  import { PickableGraphicOptions } from "../render/GraphicBuilder";
9
9
  import { InstancedGraphicParams } from "../render/InstancedGraphicParams";
@@ -226,7 +226,10 @@ interface GltfImage extends GltfChildOfRootProperty {
226
226
  interface GltfTextureInfo extends GltfProperty {
227
227
  /** The Id of the [[GltfTexture]]. */
228
228
  index: GltfId;
229
- /** The set index of the texture's TEXCOORD attribute used for texture coordinate mapping. */
229
+ /** The set index of the texture's TEXCOORD attribute used for texture coordinate mapping.
230
+ * For example, if `texCoord` is `2`, an attribute named `TEXCOORD_2` must exist containing the texture coordinates.
231
+ * Default: 0.
232
+ */
230
233
  texCoord?: number;
231
234
  }
232
235
  /** Describes a texture and its sampler. */
@@ -240,17 +243,25 @@ interface GltfTexture extends GltfChildOfRootProperty {
240
243
  */
241
244
  source?: GltfId;
242
245
  }
243
- /** Describes the filtering and wrapping behavior to be applied to a [[GltfTexture]]. */
246
+ /** Describes the filtering and wrapping behavior to be applied to a [[GltfTexture]].
247
+ * @note The implementation currently does not support MirroredRepeat and does not support different wrapping for U and V;
248
+ * effectively, unless `wrapS` or `wrapT` is set to ClampToEdge, the sampler will use GltfWrapMode.Repeat.
249
+ */
244
250
  interface GltfSampler extends GltfChildOfRootProperty {
245
251
  /** Magnification filter. */
246
252
  magFilter?: GltfMagFilter;
247
253
  /** Minification filter. */
248
254
  minFilter?: GltfMinFilter;
249
- /** S (U) wrapping mode. */
255
+ /** S (U) wrapping mode. Default: Repeat. */
250
256
  wrapS?: GltfWrapMode;
251
- /** T (V) wrapping mode. */
257
+ /** T (V) wrapping mode. Default: Repeat. */
252
258
  wrapT?: GltfWrapMode;
253
259
  }
260
+ /** GL states that can be enabled by a [[GltfTechnique]]. Only those queried by this implementation are enumerated. */
261
+ declare enum GltfTechniqueState {
262
+ /** Enables alpha blending. */
263
+ Blend = 3042
264
+ }
254
265
  /** For glTF 1.0 only, describes shader programs and shader state associated with a [[Gltf1Material]], used to render meshes associated with the material.
255
266
  * This implementation uses it strictly to identify techniques that require alpha blending.
256
267
  */
@@ -258,9 +269,9 @@ interface GltfTechnique extends GltfChildOfRootProperty {
258
269
  /** GL render states to be applied by the technique. */
259
270
  states?: {
260
271
  /** An array of integers corresponding to boolean GL states that should be enabled using GL's `enable` function.
261
- * For example, the value `3042` indicates that blending should be enabled.
272
+ * For example, the value [[GltfTechniqueState.Blend]] (3042) indicates that blending should be enabled.
262
273
  */
263
- enable?: number[];
274
+ enable?: GltfTechniqueState[];
264
275
  };
265
276
  }
266
277
  interface Gltf1Material extends GltfChildOfRootProperty {
@@ -291,6 +302,10 @@ interface Gltf2Material extends GltfChildOfRootProperty {
291
302
  alphaCutoff?: number;
292
303
  doubleSided?: boolean;
293
304
  extensions?: GltfExtensions & {
305
+ /** The [KHR_materials_unlit](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_unlit) extension
306
+ * indicates that the material should be displayed without lighting. The extension adds no additional properties; it is effectively a boolean flag.
307
+ */
308
+ KHR_materials_unlit?: {};
294
309
  /** The [KHR_techniques_webgl extension](https://github.com/KhronosGroup/glTF/blob/c1c12bd100e88ff468ccef1cb88cfbec56a69af2/extensions/2.0/Khronos/KHR_techniques_webgl/README.md)
295
310
  * allows "techniques" to be associated with [[GltfMaterial]]s. Techniques can supply custom shader programs to render geometry; this was a core feature of glTF 1.0 (see [[GltfTechnique]]).
296
311
  * Here, it is only used to extract uniform values.
@@ -467,7 +482,7 @@ export declare class GltfMeshData {
467
482
  uvQParams?: QParams2d;
468
483
  uvs?: Uint16Array;
469
484
  uvRange?: Range2d;
470
- indices?: Uint16Array | Uint32Array;
485
+ indices?: Uint8Array | Uint16Array | Uint32Array;
471
486
  constructor(props: Mesh);
472
487
  }
473
488
  /** A function that returns true if deserialization of the data supplied by the reader should abort.
@@ -519,15 +534,14 @@ export declare abstract class GltfReader {
519
534
  private readonly _canceled?;
520
535
  protected readonly _sceneNodes: GltfId[];
521
536
  protected _computedContentRange?: ElementAlignedBox3d;
537
+ private readonly _resolvedTextures;
522
538
  protected get _nodes(): GltfDictionary<GltfNode>;
523
539
  protected get _meshes(): GltfDictionary<GltfMesh>;
524
540
  protected get _accessors(): GltfDictionary<GltfAccessor>;
525
541
  protected get _bufferViews(): GltfDictionary<GltfBufferViewProps>;
526
542
  protected get _materials(): GltfDictionary<GltfMaterial>;
527
543
  protected get _samplers(): GltfDictionary<GltfSampler>;
528
- protected get _textures(): GltfDictionary<GltfTexture & {
529
- resolvedTexture?: RenderTexture;
530
- }>;
544
+ protected get _textures(): GltfDictionary<GltfTexture>;
531
545
  protected get _images(): GltfDictionary<GltfImage & {
532
546
  resolvedImage?: HTMLImageElement;
533
547
  }>;
@@ -571,7 +585,8 @@ export declare abstract class GltfReader {
571
585
  }, accessorName: string, type: GltfDataType): GltfBufferData | undefined;
572
586
  protected readFeatureIndices(_json: any): number[] | undefined;
573
587
  private extractTextureId;
574
- protected createDisplayParams(materialJson: GltfMaterial, hasBakedLighting: boolean): DisplayParams | undefined;
588
+ private isMaterialTransparent;
589
+ protected createDisplayParams(material: GltfMaterial, hasBakedLighting: boolean): DisplayParams | undefined;
575
590
  protected readMeshPrimitive(primitive: GltfMeshPrimitive, featureTable?: FeatureTable, pseudoRtcBias?: Vector3d): GltfMeshData | undefined;
576
591
  private deduplicateVertices;
577
592
  /**
@@ -601,9 +616,8 @@ export declare abstract class GltfReader {
601
616
  private resolveUrl;
602
617
  private resolveBuffer;
603
618
  private resolveImage;
604
- private resolveTextures;
605
619
  private resolveTexture;
606
- protected findTextureMapping(textureId: string): TextureMapping | undefined;
620
+ protected findTextureMapping(id: string, isTransparent: boolean): TextureMapping | undefined;
607
621
  }
608
622
  /** Arguments supplied to [[readGltfGraphics]] to produce a [[RenderGraphic]] from a [glTF](https://www.khronos.org/gltf/) asset.
609
623
  * @public
@@ -649,9 +663,7 @@ export declare class GltfGraphicsReader extends GltfReader {
649
663
  get nodes(): GltfDictionary<GltfNode>;
650
664
  get scenes(): GltfDictionary<GltfScene>;
651
665
  get sceneNodes(): GltfId[];
652
- get textures(): GltfDictionary<GltfTexture & {
653
- resolvedTexture?: RenderTexture;
654
- }>;
666
+ get textures(): GltfDictionary<GltfTexture>;
655
667
  }
656
668
  export {};
657
669
  //# sourceMappingURL=GltfReader.d.ts.map