@itwin/core-frontend 5.3.0-dev.7 → 5.3.0-dev.9

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 (76) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/lib/cjs/ElementLocateManager.d.ts.map +1 -1
  3. package/lib/cjs/ElementLocateManager.js +2 -5
  4. package/lib/cjs/ElementLocateManager.js.map +1 -1
  5. package/lib/cjs/HitDetail.d.ts +1 -24
  6. package/lib/cjs/HitDetail.d.ts.map +1 -1
  7. package/lib/cjs/HitDetail.js +0 -5
  8. package/lib/cjs/HitDetail.js.map +1 -1
  9. package/lib/cjs/IModeljs-css.js +1 -1
  10. package/lib/cjs/IModeljs-css.js.map +1 -1
  11. package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts +0 -2
  12. package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
  13. package/lib/cjs/internal/render/webgl/FrustumUniforms.js +0 -7
  14. package/lib/cjs/internal/render/webgl/FrustumUniforms.js.map +1 -1
  15. package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts +0 -9
  16. package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
  17. package/lib/cjs/internal/render/webgl/SceneCompositor.js +4 -67
  18. package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
  19. package/lib/cjs/internal/render/webgl/ShaderBuilder.d.ts +3 -4
  20. package/lib/cjs/internal/render/webgl/ShaderBuilder.d.ts.map +1 -1
  21. package/lib/cjs/internal/render/webgl/ShaderBuilder.js +3 -3
  22. package/lib/cjs/internal/render/webgl/ShaderBuilder.js.map +1 -1
  23. package/lib/cjs/internal/render/webgl/glsl/Atmosphere.js +1 -1
  24. package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.d.ts.map +1 -1
  25. package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.js +1 -2
  26. package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
  27. package/lib/cjs/internal/render/webgl/glsl/Contours.d.ts.map +1 -1
  28. package/lib/cjs/internal/render/webgl/glsl/Contours.js +1 -30
  29. package/lib/cjs/internal/render/webgl/glsl/Contours.js.map +1 -1
  30. package/lib/cjs/internal/render/webgl/glsl/Fragment.d.ts.map +1 -1
  31. package/lib/cjs/internal/render/webgl/glsl/Fragment.js +2 -7
  32. package/lib/cjs/internal/render/webgl/glsl/Fragment.js.map +1 -1
  33. package/lib/cjs/internal/render/webgl/glsl/RealityMesh.js +1 -1
  34. package/lib/cjs/internal/render/webgl/glsl/Surface.js +1 -1
  35. package/lib/cjs/render/Pixel.d.ts +2 -13
  36. package/lib/cjs/render/Pixel.d.ts.map +1 -1
  37. package/lib/cjs/render/Pixel.js +1 -9
  38. package/lib/cjs/render/Pixel.js.map +1 -1
  39. package/lib/esm/ElementLocateManager.d.ts.map +1 -1
  40. package/lib/esm/ElementLocateManager.js +2 -5
  41. package/lib/esm/ElementLocateManager.js.map +1 -1
  42. package/lib/esm/HitDetail.d.ts +1 -24
  43. package/lib/esm/HitDetail.d.ts.map +1 -1
  44. package/lib/esm/HitDetail.js +0 -5
  45. package/lib/esm/HitDetail.js.map +1 -1
  46. package/lib/esm/IModeljs-css.js +1 -1
  47. package/lib/esm/IModeljs-css.js.map +1 -1
  48. package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts +0 -2
  49. package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
  50. package/lib/esm/internal/render/webgl/FrustumUniforms.js +1 -8
  51. package/lib/esm/internal/render/webgl/FrustumUniforms.js.map +1 -1
  52. package/lib/esm/internal/render/webgl/SceneCompositor.d.ts +0 -9
  53. package/lib/esm/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
  54. package/lib/esm/internal/render/webgl/SceneCompositor.js +4 -67
  55. package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
  56. package/lib/esm/internal/render/webgl/ShaderBuilder.d.ts +3 -4
  57. package/lib/esm/internal/render/webgl/ShaderBuilder.d.ts.map +1 -1
  58. package/lib/esm/internal/render/webgl/ShaderBuilder.js +3 -3
  59. package/lib/esm/internal/render/webgl/ShaderBuilder.js.map +1 -1
  60. package/lib/esm/internal/render/webgl/glsl/Atmosphere.js +1 -1
  61. package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.d.ts.map +1 -1
  62. package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.js +1 -2
  63. package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
  64. package/lib/esm/internal/render/webgl/glsl/Contours.d.ts.map +1 -1
  65. package/lib/esm/internal/render/webgl/glsl/Contours.js +1 -30
  66. package/lib/esm/internal/render/webgl/glsl/Contours.js.map +1 -1
  67. package/lib/esm/internal/render/webgl/glsl/Fragment.d.ts.map +1 -1
  68. package/lib/esm/internal/render/webgl/glsl/Fragment.js +2 -7
  69. package/lib/esm/internal/render/webgl/glsl/Fragment.js.map +1 -1
  70. package/lib/esm/internal/render/webgl/glsl/RealityMesh.js +1 -1
  71. package/lib/esm/internal/render/webgl/glsl/Surface.js +1 -1
  72. package/lib/esm/render/Pixel.d.ts +2 -13
  73. package/lib/esm/render/Pixel.d.ts.map +1 -1
  74. package/lib/esm/render/Pixel.js +1 -9
  75. package/lib/esm/render/Pixel.js.map +1 -1
  76. package/package.json +21 -22
@@ -1 +1 @@
1
- {"version":3,"file":"HitDetail.d.ts","sourceRoot":"","sources":["../../src/HitDetail.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAS,cAAc,EAAqC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACxI,OAAO,EAAE,YAAY,EAAE,aAAa,EAAc,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAA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Q,EAAE,MAAM,GAAG,OAAO;IAchD,OAAO,CAAC,oBAAoB;IAgB5B,gDAAgD;IACzC,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAkCpF,2FAA2F;IACpF,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM;IAiBhC,4DAA4D;IACrD,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI;CAM1C"}
@@ -157,10 +157,6 @@ export class HitDetail {
157
157
  * @beta
158
158
  */
159
159
  get path() { return this._props.path; }
160
- /** Information about the [contour line]($docs/learning/display/ContourDisplay.md), if any, from which this hit originated.
161
- * @beta
162
- */
163
- get contour() { return this._props.contour; }
164
160
  /** @internal */
165
161
  constructor(arg0, viewport, hitSource, hitPoint, sourceId, priority, distXY, distFraction, subCategoryId, geometryClass, modelId, sourceIModel, tileId, isClassifier) {
166
162
  if (arg0 instanceof Point3d) {
@@ -204,7 +200,6 @@ export class HitDetail {
204
200
  tileId: arg0.tileId,
205
201
  isClassifier: arg0.isClassifier,
206
202
  path,
207
- contour: arg0.contour,
208
203
  };
209
204
  }
210
205
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HitDetail.js","sourceRoot":"","sources":["../../src/HitDetail.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAkB,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAiC,MAAM,sBAAsB,CAAC;AACxI,OAAO,EAA+B,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,WAAW,EAAU,MAAM,WAAW,CAAC;AAGhD,OA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esContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module LocatingElements\n */\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Arc3d, CurvePrimitive, LineSegment3d, LineString3d, Path, Point3d, Transform, Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { ContourGroup, GeometryClass, LinePixels } from \"@itwin/core-common\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\nimport { IconSprites, Sprite } from \"./Sprites\";\nimport { DecorateContext } from \"./ViewContext\";\nimport { ScreenViewport, Viewport } from \"./Viewport\";\nimport { GraphicType } from \"./common/render/GraphicType\";\n\n/**\n * @public\n * @extensions\n */\nexport enum SnapMode {\n Nearest = 1,\n NearestKeypoint = 1 << 1,\n MidPoint = 1 << 2,\n Center = 1 << 3,\n Origin = 1 << 4,\n Bisector = 1 << 5,\n Intersection = 1 << 6,\n PerpendicularPoint = 1 << 7,\n TangentPoint = 1 << 8,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum SnapHeat {\n None = 0,\n NotInRange = 1, // \"of interest\", but out of range\n InRange = 2,\n}\n\n/** The procedure that generated this Hit.\n * @public\n * @extensions\n */\nexport enum HitSource {\n None = 0,\n FromUser = 1,\n MotionLocate = 2,\n AccuSnap = 3,\n TentativeSnap = 4,\n DataPoint = 5,\n Application = 6,\n EditAction = 7,\n EditActionSS = 8,\n}\n\n/** What was being tested to generate this hit. This is not the element or\n * GeometricPrimitive that generated the Hit, it is an indication of whether it is an edge or interior hit.\n * @public\n * @extensions\n */\nexport enum HitGeomType {\n None = 0,\n Point = 1,\n Segment = 2,\n Curve = 3,\n Arc = 4,\n Surface = 5,\n}\n\n/** Classification of GeometricPrimitive that generated the Hit.\n * @public\n * @extensions\n */\nexport enum HitParentGeomType {\n None = 0,\n Wire = 1,\n Sheet = 2,\n Solid = 3,\n Mesh = 4,\n Text = 5,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum HitPriority {\n WireEdge = 0,\n PlanarEdge = 1,\n NonPlanarEdge = 2,\n SilhouetteEdge = 3,\n PlanarSurface = 4,\n NonPlanarSurface = 5,\n Unknown = 6,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum HitDetailType {\n Hit = 1,\n Snap = 2,\n Intersection = 3,\n}\n\n/** As part of a [[HitPath]], describes the [ViewAttachment]($backend), if any, from which the hit represented by a [[HitDetail]] originated.\n * @beta\n */\nexport interface ViewAttachmentHitInfo {\n /** The element Id of the [ViewAttachment]($backend) from which the hit originated. */\n readonly id: Id64String;\n /** The viewport that renders the contents of the attached view into the [[ScreenViewport]].\n * @note Do not alter the state of this viewport.\n * @alpha\n */\n readonly viewport: Viewport;\n}\n\n/** As part of a [[HitPath]], describes the [SectionDrawing]($backend), if any, from which the hit represented by a [[HitDetail]] originated.\n * @beta\n */\nexport interface SectionDrawingAttachmentHitInfo {\n /** The viewport that renders the contents of the attached view into the [[ScreenViewport]].\n * @note Do not alter the state of this viewport.\n * @alpha\n */\n readonly viewport: Viewport;\n}\n\n/** As part of a [[HitDetail]], describes a series of \"attached\" views through which the hit was located.\n * Typically, the contents of a view are rendered directly to the screen via [[HitDetail.viewport]].\n * However, in some contexts one view might be \"attached\" to the viewport's view via a [ViewAttachment]($backend), [SectionDrawing]($backend), or both.\n * HitPath captures this information in one of the following possible ways:\n * 1. A [[SheetViewState]] renders another view through a [ViewAttachment]($backend), in which case [[viewAttachment]] will be defined.\n * 2. A [[DrawingViewState]] renders a [[SpatialViewState]] through a [SectionDrawing]($backend) attachment, in which case [[sectionDrawingAttachment]] will be defined; or\n * 3. A combination of 1 and 2 where a [ViewAttachment]($backend) on a sheet renders a [SectionDrawing]($backend) with an attached [[SpatialViewState]], in which both [viewAttachment]] and [[sectionDrawingAttachment]] will be defined.\n * @beta\n */\nexport interface HitPath {\n /** Details about the [ViewAttachment]($backend) through which the hit was obtained. */\n viewAttachment?: ViewAttachmentHitInfo;\n /** Details about the [SectionDrawing]($backend) attachment through which the hit was obtained. */\n sectionDrawingAttachment?: SectionDrawingAttachmentHitInfo;\n};\n\n/** Information about a [contour line]($docs/learning/display/ContourDisplay.md) that generated a [[HitDetail]] or [[Pixel]].\n * @see [[HitDetail.contour]]\n * @see [[Pixel.Data.contour]]\n * @beta\n */\nexport interface ContourHit {\n /** The contour group that generated the contour line, as specified by [[ContourDisplay.groups]]. */\n readonly group: ContourGroup;\n /** True if the contour is a major contour line as specified by the [[group]] from which it originated, false if it is a minor contour line. */\n readonly isMajor: boolean;\n /** The height in world coordinates of the contour line. This is always a multiple of the [Contour.minorInterval]($common) defined for the [[group]].\n * @note The multiple may be approximate due to the limitations of floating-point precision.\n */\n readonly elevation: number;\n}\n\n/** Arguments supplied to the [[HitDetail]] constructor.\n * @public\n */\nexport interface HitDetailProps {\n /** The point in world coordinates that was used as the initial locate point. */\n readonly testPoint: Point3d;\n /** The viewport in which the locate operation was performed. */\n readonly viewport: ScreenViewport;\n /** The procedure that requested the locate operation. */\n readonly hitSource: HitSource;\n /** The approximate location in world coordinates on the geometry identified by this HitDetail. */\n readonly hitPoint: Point3d;\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\n readonly sourceId: Id64String;\n /** The hit geometry priority/classification. */\n readonly priority: HitPriority;\n /** The xy distance to the hit in view coordinates. */\n readonly distXY: number;\n /** The distance in view coordinates between the hit and the near plane. */\n readonly distFraction: number;\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\n readonly subCategoryId?: Id64String;\n /** The class of the hit geometry. */\n readonly geometryClass?: GeometryClass;\n /** The Id of the [[ModelState]] from which the hit originated. */\n readonly modelId?: string;\n /** The IModelConnection from which the hit originated.\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\n * other than the one associated with the viewport.\n * @internal\n */\n readonly sourceIModel?: IModelConnection;\n /** @internal */\n readonly transformFromSourceIModel?: Transform;\n /** @internal chiefly for debugging */\n readonly tileId?: string;\n /** True if the hit originated from a reality model classifier.\n * @alpha\n */\n readonly isClassifier?: boolean;\n /** Describes the path by which the hit was located through a series of attached views.\n * @beta\n */\n readonly path?: HitPath;\n /** Information about the [contour line]($docs/learning/display/ContourDisplay.md), if any, from which this hit originated.\n * @beta\n */\n readonly contour?: ContourHit;\n}\n\n/** A HitDetail stores the result when locating geometry displayed in a view.\n * It holds an approximate location on an element (or decoration) from a *pick*.\n * @public\n * @extensions\n */\nexport class HitDetail {\n private readonly _props: HitDetailProps;\n\n /** The point in world coordinates that was used as the initial locate point. */\n public get testPoint(): Point3d { return this._props.testPoint; }\n /** The viewport in which the locate operation was performed. */\n public get viewport(): ScreenViewport { return this._props.viewport; }\n /** The procedure that requested the locate operation. */\n public get hitSource(): HitSource { return this._props.hitSource; }\n /** The approximate location in world coordinates on the geometry identified by this HitDetail. */\n public get hitPoint(): Point3d { return this._props.hitPoint; }\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\n public get sourceId(): Id64String { return this._props.sourceId; }\n /** The hit geometry priority/classification. */\n public get priority(): HitPriority { return this._props.priority; }\n /** The xy distance to the hit in view coordinates. */\n public get distXY(): number { return this._props.distXY; }\n /** The distance in view coordinates between the hit and the near plane. */\n public get distFraction(): number { return this._props.distFraction; }\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\n public get subCategoryId(): Id64String | undefined { return this._props.subCategoryId; }\n /** The class of the hit geometry. */\n public get geometryClass(): GeometryClass | undefined { return this._props.geometryClass; }\n /** The Id of the [[ModelState]] from which the hit originated. */\n public get modelId(): string | undefined { return this._props.modelId; }\n /** The IModelConnection from which the hit originated.\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\n * other than the one associated with the viewport.\n * @internal\n */\n public get sourceIModel(): IModelConnection | undefined { return this._props.sourceIModel; }\n /** @internal */\n public get transformFromSourceIModel(): Transform | undefined { return this._props.transformFromSourceIModel; }\n /** @internal chiefly for debugging */\n public get tileId(): string | undefined { return this._props.tileId; }\n /** True if the hit originated from a reality model classifier.\n * @alpha\n */\n public get isClassifier(): boolean | undefined { return this._props.isClassifier; }\n /** Information about the [ViewAttachment]($backend) within which the hit geometry resides, if any.\n * @note Only [[SheetViewState]]s can have view attachments.\n * @beta\n */\n public get viewAttachment(): ViewAttachmentHitInfo | undefined { return this._props.path?.viewAttachment; }\n /** Describes the path by which the hit was located through a series of attached views.\n * @beta\n */\n public get path(): HitPath | undefined { return this._props.path; }\n /** Information about the [contour line]($docs/learning/display/ContourDisplay.md), if any, from which this hit originated.\n * @beta\n */\n public get contour(): ContourHit | undefined { return this._props.contour; }\n\n /** Create a new HitDetail from the inputs to and results of a locate operation. */\n public constructor(props: HitDetailProps);\n\n /** @deprecated in 4.1 - will not be removed until after 2026-06-13. Use the overload that takes a [[HitDetailProps]]. */\n public constructor(testPoint: Point3d, viewport: ScreenViewport, hitSource: HitSource, hitPoint: Point3d, sourceId: string, priority: HitPriority, distXY: number, distFraction: number, subCategoryId?: string, geometryClass?: GeometryClass, modelId?: string, sourceIModel?: IModelConnection, tileId?: string, isClassifier?: boolean);\n\n /** @internal */\n public constructor(arg0: Point3d | HitDetailProps, viewport?: ScreenViewport, hitSource?: HitSource, hitPoint?: Point3d, sourceId?: string, priority?: HitPriority, distXY?: number, distFraction?: number, subCategoryId?: string, geometryClass?: GeometryClass, modelId?: string, sourceIModel?: IModelConnection, tileId?: string, isClassifier?: boolean) {\n if (arg0 instanceof Point3d) {\n assert(undefined !== viewport && undefined !== hitSource && undefined !== hitPoint && undefined !== sourceId);\n assert(undefined !== priority && undefined !== distXY && undefined !== distFraction);\n\n this._props = {\n testPoint: arg0,\n viewport,\n hitSource,\n hitPoint,\n sourceId,\n priority,\n distXY,\n distFraction,\n subCategoryId,\n geometryClass,\n modelId,\n sourceIModel,\n tileId,\n isClassifier,\n };\n } else {\n // Ignore an empty path.\n const path = arg0.path?.sectionDrawingAttachment || arg0.path?.viewAttachment ? arg0.path : undefined;\n\n // Tempting to use { ...arg0 } but spread operator omits getters so, e.g., if input is a HitDetail we would lose all the properties.\n this._props = {\n testPoint: arg0.testPoint,\n viewport: arg0.viewport,\n hitSource: arg0.hitSource,\n hitPoint: arg0.hitPoint,\n sourceId: arg0.sourceId,\n priority: arg0.priority,\n distXY: arg0.distXY,\n distFraction: arg0.distFraction,\n subCategoryId: arg0.subCategoryId,\n geometryClass: arg0.geometryClass,\n modelId: arg0.modelId,\n sourceIModel: arg0.sourceIModel,\n transformFromSourceIModel: arg0.transformFromSourceIModel,\n tileId: arg0.tileId,\n isClassifier: arg0.isClassifier,\n path,\n contour: arg0.contour,\n };\n }\n }\n\n /** Get the type of HitDetail.\n * @returns HitDetailType.Hit if this is a HitDetail, HitDetailType.Snap if it is a SnapDetail\n */\n public getHitType(): HitDetailType { return HitDetailType.Hit; }\n\n /** Get the *hit point* for this HitDetail. Returns the approximate point on the element that caused the hit when not a SnapDetail or IntersectDetail.\n * For a snap that is *hot*, the *exact* point on the Element for the snap mode is returned, otherwise the close point on the hit geometry is returned.\n */\n public getPoint(): Point3d { return this.hitPoint; }\n\n /** Determine if this HitPoint is from the same source as another HitDetail. */\n public isSameHit(otherHit?: HitDetail): boolean { return (undefined !== otherHit && this.sourceId === otherHit.sourceId && this.iModel === otherHit.iModel); }\n /** Return whether sourceId is for a persistent element and not a pickable decoration. */\n public get isElementHit(): boolean { return !Id64.isInvalid(this.sourceId) && !Id64.isTransient(this.sourceId); }\n // return whether the sourceId is for a model (reality models etc.)\n public get isModelHit(): boolean {\n return this.modelId === this.sourceId;\n }\n // return whether the hit point is from map.\n public get isMapHit(): boolean { return 0 !== this.viewport.mapLayerFromHit(this).length; }\n\n /** Create a deep copy of this HitDetail */\n public clone(): HitDetail {\n return new HitDetail(this);\n }\n\n /** Draw this HitDetail as a Decoration. Causes the picked element to *flash* */\n public draw(_context: DecorateContext) {\n this.viewport.flashedId = this.sourceId;\n }\n\n /** Get the tooltip content for this HitDetail. */\n public async getToolTip(): Promise<HTMLElement | string> {\n let toolTipPromise = this.isElementHit ? IModelApp.viewManager.overrideElementToolTip(this) : IModelApp.viewManager.getDecorationToolTip(this);\n for (const toolTipProvider of IModelApp.viewManager.toolTipProviders)\n toolTipPromise = toolTipProvider.augmentToolTip(this, toolTipPromise);\n return toolTipPromise;\n }\n\n /** The IModelConnection from which the hit originated. In some cases this may not be the same as the iModel associated with the Viewport -\n * for example, if a [[TiledGraphicsProvider]] is used to display graphics from a different iModel in the viewport.\n * This HitDetail's element, subcategory, and model Ids are defined in the context of this IModelConnection.\n */\n public get iModel(): IModelConnection {\n return this.sourceIModel ?? this.viewport.iModel;\n }\n\n /** Returns true if this hit originated from an [[IModelConnection]] other than the one associated with the [[Viewport]].\n * @see [[iModel]].\n */\n public get isExternalIModelHit(): boolean {\n return this.iModel !== this.viewport.iModel;\n }\n}\n\n/** A SnapDetail is generated from the result of a snap request. In addition to the HitDetail about the reason the element was *picked*,\n * it holds the *exact* point on the element from the snapping logic, plus additional information that varies with the type of element and snap mode.\n * @public\n * @extensions\n */\nexport class SnapDetail extends HitDetail {\n /** A sprite to show the user the type of snap performed */\n public sprite?: Sprite;\n /** HitPoint adjusted by snap */\n public readonly snapPoint: Point3d;\n /** AccuSnap/AccuDraw can adjust the point after the snap. */\n public readonly adjustedPoint: Point3d;\n /** Curve primitive for snap. */\n public primitive?: CurvePrimitive;\n /** Surface normal at snapPoint */\n public normal?: Vector3d;\n /** The HitGeomType of this SnapDetail */\n public geomType?: HitGeomType;\n /** The HitGeomType of this SnapDetail */\n public parentGeomType?: HitParentGeomType;\n\n /** Constructor for SnapDetail.\n * @param from The HitDetail that created this snap\n * @param snapMode The SnapMode used to create this SnapDetail\n * @param heat The SnapHeat of this SnapDetail\n * @param snapPoint The snapped point in the element\n */\n public constructor(from: HitDetail, public snapMode: SnapMode = SnapMode.Nearest, public heat: SnapHeat = SnapHeat.None, snapPoint?: XYZProps) {\n super(from);\n this.snapPoint = Point3d.fromJSON(snapPoint ? snapPoint : from.hitPoint);\n this.adjustedPoint = this.snapPoint.clone();\n this.sprite = IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));\n }\n\n /** Returns `HitDetailType.Snap` */\n public override getHitType(): HitDetailType { return HitDetailType.Snap; }\n /** Get the snap point if this SnapDetail is *hot*, the pick point otherwise. */\n public override getPoint(): Point3d { return this.isHot ? this.snapPoint : super.getPoint(); }\n /** Return true if the pick point was closer than the snap aperture from the generated snap point. */\n public get isHot(): boolean { return this.heat !== SnapHeat.None; }\n /** Determine whether the [[adjustedPoint]] is different than the [[snapPoint]]. This happens, for example, when points are adjusted for grids, acs plane snap, and AccuDraw. */\n public get isPointAdjusted(): boolean { return !this.adjustedPoint.isExactEqual(this.snapPoint); }\n\n /** Change the snap point. */\n public setSnapPoint(point: Point3d, heat: SnapHeat) {\n this.snapPoint.setFrom(point);\n this.adjustedPoint.setFrom(point);\n this.heat = heat;\n }\n\n /** Change the snap mode. */\n public setSnapMode(snapMode: SnapMode) {\n this.snapMode = snapMode;\n this.sprite = IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));\n }\n\n /** Set curve primitive and HitGeometryType for this SnapDetail. */\n public setCurvePrimitive(primitive?: CurvePrimitive, localToWorld?: Transform, geomType?: HitGeomType): void {\n this.primitive = primitive;\n this.geomType = undefined;\n\n // Only HitGeomType.Point and HitGeomType.Surface are valid without a curve primitive.\n if (undefined === this.primitive) {\n if (HitGeomType.Point === geomType || HitGeomType.Surface === geomType)\n this.geomType = geomType;\n return;\n }\n\n if (undefined !== localToWorld)\n this.primitive.tryTransformInPlace(localToWorld);\n\n if (this.primitive instanceof Arc3d)\n this.geomType = HitGeomType.Arc;\n else if (this.primitive instanceof LineSegment3d)\n this.geomType = HitGeomType.Segment;\n else if (this.primitive instanceof LineString3d)\n this.geomType = HitGeomType.Segment;\n else\n this.geomType = HitGeomType.Curve;\n\n // Set curve primitive geometry type override...\n // - HitGeomType.Point with arc/ellipse denotes center.\n // - HitGeomType.Surface with any curve primitive denotes an interior hit.\n if (undefined !== geomType && HitGeomType.None !== geomType)\n this.geomType = geomType;\n }\n\n /** Make a copy of this SnapDetail. */\n public override clone(): SnapDetail {\n const val = new SnapDetail(this, this.snapMode, this.heat, this.snapPoint);\n val.sprite = this.sprite;\n val.geomType = this.geomType;\n val.parentGeomType = this.parentGeomType;\n val.adjustedPoint.setFrom(this.adjustedPoint);\n if (undefined !== this.primitive)\n val.primitive = this.primitive.clone();\n if (undefined !== this.normal)\n val.normal = this.normal.clone();\n return val;\n }\n\n public getCurvePrimitive(singleSegment: boolean = true): CurvePrimitive | undefined {\n if (!singleSegment || undefined === this.primitive)\n return this.primitive;\n\n if (this.primitive instanceof LineString3d) {\n const ls = this.primitive;\n if (ls.points.length > 2) {\n const loc = ls.closestPoint(this.snapPoint, false);\n const nSegments = ls.points.length - 1;\n const uSegRange = (1.0 / nSegments);\n let segmentNo = Math.floor(loc.fraction / uSegRange);\n if (segmentNo >= nSegments)\n segmentNo = nSegments - 1;\n return LineSegment3d.create(ls.points[segmentNo], ls.points[segmentNo + 1]);\n }\n }\n\n return this.primitive;\n }\n\n public override draw(context: DecorateContext) {\n if (undefined !== this.primitive) {\n let singleSegment = false;\n switch (this.snapMode) {\n case SnapMode.Center:\n case SnapMode.Origin:\n case SnapMode.Bisector:\n break; // Snap point for these is computed using entire linestring, not just the hit segment...\n\n default: {\n singleSegment = true;\n break;\n }\n }\n\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n const outline = context.viewport.hilite.color.adjustedForContrast(context.viewport.view.backgroundColor, 50);\n const centerLine = context.viewport.hilite.color.adjustedForContrast(outline, 175);\n const curvePrimitive = this.getCurvePrimitive(singleSegment);\n if (curvePrimitive !== undefined) {\n const path = Path.create(curvePrimitive);\n\n builder.setSymbology(outline, outline, 6);\n builder.addPath(path);\n\n builder.setSymbology(centerLine, centerLine, 2);\n builder.addPath(path);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n }\n super.draw(context);\n }\n\n private static getSnapSpriteUrl(snapType: SnapMode): string {\n switch (snapType) {\n case SnapMode.Nearest: return `${IModelApp.publicPath}sprites/SnapPointOn.png`;\n case SnapMode.NearestKeypoint: return `${IModelApp.publicPath}sprites/SnapKeypoint.png`;\n case SnapMode.MidPoint: return `${IModelApp.publicPath}sprites/SnapMidpoint.png`;\n case SnapMode.Center: return `${IModelApp.publicPath}sprites/SnapCenter.png`;\n case SnapMode.Origin: return `${IModelApp.publicPath}sprites/SnapOrigin.png`;\n case SnapMode.Bisector: return `${IModelApp.publicPath}sprites/SnapBisector.png`;\n case SnapMode.Intersection: return `${IModelApp.publicPath}sprites/SnapIntersection.png`;\n case SnapMode.PerpendicularPoint: return `${IModelApp.publicPath}sprites/SnapPerpendicularPoint.png`;\n case SnapMode.TangentPoint: return `${IModelApp.publicPath}sprites/SnapTangentPoint.png`;\n }\n return \"\";\n }\n}\n\n/**\n * @public\n * @extensions\n */\nexport class IntersectDetail extends SnapDetail {\n public constructor(from: SnapDetail, heat: SnapHeat = SnapHeat.None, snapPoint: XYZProps, public readonly otherPrimitive: CurvePrimitive, public readonly otherId: string) {\n super(from, SnapMode.Intersection, heat, snapPoint);\n this.primitive = from.primitive;\n this.normal = from.normal; // Preserve normal from primary snap location for AccuDraw smart rotation...\n }\n\n public override draw(context: DecorateContext) {\n if (undefined !== this.primitive && undefined !== this.otherPrimitive) {\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n const outline = context.viewport.hilite.color.adjustedForContrast(context.viewport.view.backgroundColor, 50);\n const centerLine = context.viewport.hilite.color.adjustedForContrast(outline, 175);\n const path1 = Path.create(this.primitive);\n const path2 = Path.create(this.otherPrimitive);\n\n builder.setSymbology(outline, outline, 6);\n builder.addPath(path1);\n builder.addPath(path2);\n\n builder.setSymbology(centerLine, centerLine, 2);\n builder.addPath(path1);\n builder.setSymbology(centerLine, centerLine, 2, LinePixels.Code2);\n builder.addPath(path2);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n super.draw(context);\n }\n}\n\n/** The result of a \"locate\" is a sorted list of objects that satisfied the search criteria (a HitList). Earlier hits in the list\n * are somehow *better* than those later on.\n * @public\n * @extensions\n */\nexport class HitList<T extends HitDetail> {\n public hits: T[] = [];\n public currHit = -1;\n public get length(): number { return this.hits.length; }\n public empty(): void {\n this.hits.length = 0;\n this.currHit = -1;\n }\n\n public resetCurrentHit(): void { this.currHit = -1; }\n\n /** Get a hit from a particular index into a HitList\n * return the requested hit from the HitList or undefined\n */\n public getHit(hitNum: number): T | undefined {\n if (hitNum < 0)\n hitNum = this.length - 1;\n\n return (hitNum >= this.length) ? undefined : this.hits[hitNum];\n }\n\n /** When setting one or more indices to undefined you must call dropNulls afterwards */\n public setHit(i: number, p: T | undefined): void {\n if (i < 0 || i >= this.length)\n return;\n // While messy, the following is obviously intentional based on the function comment.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.hits[i] = p!;\n }\n\n public dropNulls(): void {\n const hits = this.hits;\n this.hits = [];\n for (const hit of hits)\n this.hits.push(hit);\n }\n\n public getNextHit(): T | undefined {\n this.currHit++;\n return this.getCurrentHit();\n }\n\n public getCurrentHit(): T | undefined { return -1 === this.currHit ? undefined : this.getHit(this.currHit); }\n\n public setCurrentHit(hit: T): void {\n this.resetCurrentHit();\n for (let thisHit; undefined !== (thisHit = this.getNextHit());) {\n if (thisHit === hit)\n return;\n }\n }\n\n /** remove the current hit from the list. */\n public removeCurrentHit() { this.removeHit(this.currHit); }\n\n /** remove a hit in the list. */\n public removeHit(hitNum: number) {\n if (hitNum < 0) // Support -1 == END\n hitNum = this.length - 1;\n\n if (hitNum <= this.currHit)\n this.currHit = -1;\n\n if (hitNum >= this.length) // Locate calls GetNextHit, which increments currHit, until it goes beyond the end of size of the array.\n return; // Then Reset call RemoteCurrentHit, which passes in currHit. When it is out of range, we do nothing.\n\n this.hits.splice(hitNum, 1);\n }\n\n /** search through list and remove any hits that contain a specified element id. */\n public removeHitsFrom(sourceId: string): boolean {\n let removedOne = false;\n\n // walk backwards through list so we don't have to worry about what happens on remove\n for (let i = this.length - 1; i >= 0; i--) {\n const thisHit = this.hits[i];\n if (thisHit && sourceId === thisHit.sourceId) {\n removedOne = true;\n this.removeHit(i);\n }\n }\n return removedOne;\n }\n\n private getPriorityZOverride(priority: HitPriority): number {\n switch (priority) {\n case HitPriority.WireEdge:\n case HitPriority.PlanarEdge:\n case HitPriority.NonPlanarEdge:\n return 0;\n case HitPriority.SilhouetteEdge:\n return 1;\n case HitPriority.PlanarSurface:\n case HitPriority.NonPlanarSurface:\n return 2;\n default:\n return 3;\n }\n }\n\n /** compare two hits for insertion into list. */\n public compare(hit1: HitDetail | undefined, hit2: HitDetail | undefined): -1 | 1 | 0 {\n if (!hit1 || !hit2)\n return 0;\n\n const zOverride1 = this.getPriorityZOverride(hit1.priority);\n const zOverride2 = this.getPriorityZOverride(hit2.priority);\n\n // Prefer edges over surfaces, this is more important than z because we know the edge isn't obscured...\n if (zOverride1 < zOverride2)\n return -1;\n if (zOverride1 > zOverride2)\n return 1;\n\n // Compare xy distance from pick point, prefer hits closer to center...\n if (hit1.distXY < hit2.distXY)\n return -1;\n if (hit1.distXY > hit2.distXY)\n return 1;\n\n // Compare distance fraction, prefer hits closer to eye...\n if (hit1.distFraction > hit2.distFraction)\n return -1;\n if (hit1.distFraction < hit2.distFraction)\n return 1;\n\n // Compare geometry class, prefer path/region hits over surface hits when all else is equal...\n if (hit1.priority < hit2.priority)\n return -1;\n if (hit1.priority > hit2.priority)\n return 1;\n\n return 0;\n }\n\n /** Add a new hit to the list. Hits are sorted according to their priority and distance. */\n public addHit(newHit: T): number {\n if (0 === this.hits.length) {\n this.hits.push(newHit);\n return 0;\n }\n let index = 0;\n for (; index < this.hits.length; ++index) {\n const oldHit = this.hits[index];\n const comparison = this.compare(newHit, oldHit);\n if (comparison < 0)\n break;\n }\n\n this.hits.splice(index, 0, newHit);\n return index;\n }\n\n /** Insert a new hit into the list at the supplied index. */\n public insertHit(i: number, hit: T): void {\n if (i < 0 || i >= this.length)\n this.hits.push(hit);\n else\n this.hits.splice(i, 0, hit);\n }\n}\n"]}
1
+ {"version":3,"file":"HitDetail.js","sourceRoot":"","sources":["../../src/HitDetail.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAkB,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAiC,MAAM,sBAAsB,CAAC;AACxI,OAAO,EAAiB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,WAAW,EAAU,MAAM,WAAW,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAN,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB,6CAAW,CAAA;IACX,6DAAwB,CAAA;IACxB,+CAAiB,CAAA;IACjB,2CAAe,CAAA;IACf,4CAAe,CAAA;IACf,gDAAiB,CAAA;IACjB,wDAAqB,CAAA;IACrB,qEAA2B,CAAA;IAC3B,yDAAqB,CAAA;AACvB,CAAC,EAVW,QAAQ,KAAR,QAAQ,QAUnB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,uCAAQ,CAAA;IACR,mDAAc,CAAA;IACd,6CAAW,CAAA;AACb,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,yCAAQ,CAAA;IACR,iDAAY,CAAA;IACZ,yDAAgB,CAAA;IAChB,iDAAY,CAAA;IACZ,2DAAiB,CAAA;IACjB,mDAAa,CAAA;IACb,uDAAe,CAAA;IACf,qDAAc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;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,4DAA4D;IACrD,SAAS,CAAC,CAAS,EAAE,GAAM;QAChC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM;YAC3B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;YAEpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module LocatingElements\n */\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Arc3d, CurvePrimitive, LineSegment3d, LineString3d, Path, Point3d, Transform, Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { GeometryClass, LinePixels } from \"@itwin/core-common\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\nimport { IconSprites, Sprite } from \"./Sprites\";\nimport { DecorateContext } from \"./ViewContext\";\nimport { ScreenViewport, Viewport } from \"./Viewport\";\nimport { GraphicType } from \"./common/render/GraphicType\";\n\n/**\n * @public\n * @extensions\n */\nexport enum SnapMode {\n Nearest = 1,\n NearestKeypoint = 1 << 1,\n MidPoint = 1 << 2,\n Center = 1 << 3,\n Origin = 1 << 4,\n Bisector = 1 << 5,\n Intersection = 1 << 6,\n PerpendicularPoint = 1 << 7,\n TangentPoint = 1 << 8,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum SnapHeat {\n None = 0,\n NotInRange = 1, // \"of interest\", but out of range\n InRange = 2,\n}\n\n/** The procedure that generated this Hit.\n * @public\n * @extensions\n */\nexport enum HitSource {\n None = 0,\n FromUser = 1,\n MotionLocate = 2,\n AccuSnap = 3,\n TentativeSnap = 4,\n DataPoint = 5,\n Application = 6,\n EditAction = 7,\n EditActionSS = 8,\n}\n\n/** What was being tested to generate this hit. This is not the element or\n * GeometricPrimitive that generated the Hit, it is an indication of whether it is an edge or interior hit.\n * @public\n * @extensions\n */\nexport enum HitGeomType {\n None = 0,\n Point = 1,\n Segment = 2,\n Curve = 3,\n Arc = 4,\n Surface = 5,\n}\n\n/** Classification of GeometricPrimitive that generated the Hit.\n * @public\n * @extensions\n */\nexport enum HitParentGeomType {\n None = 0,\n Wire = 1,\n Sheet = 2,\n Solid = 3,\n Mesh = 4,\n Text = 5,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum HitPriority {\n WireEdge = 0,\n PlanarEdge = 1,\n NonPlanarEdge = 2,\n SilhouetteEdge = 3,\n PlanarSurface = 4,\n NonPlanarSurface = 5,\n Unknown = 6,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum HitDetailType {\n Hit = 1,\n Snap = 2,\n Intersection = 3,\n}\n\n/** As part of a [[HitPath]], describes the [ViewAttachment]($backend), if any, from which the hit represented by a [[HitDetail]] originated.\n * @beta\n */\nexport interface ViewAttachmentHitInfo {\n /** The element Id of the [ViewAttachment]($backend) from which the hit originated. */\n readonly id: Id64String;\n /** The viewport that renders the contents of the attached view into the [[ScreenViewport]].\n * @note Do not alter the state of this viewport.\n * @alpha\n */\n readonly viewport: Viewport;\n}\n\n/** As part of a [[HitPath]], describes the [SectionDrawing]($backend), if any, from which the hit represented by a [[HitDetail]] originated.\n * @beta\n */\nexport interface SectionDrawingAttachmentHitInfo {\n /** The viewport that renders the contents of the attached view into the [[ScreenViewport]].\n * @note Do not alter the state of this viewport.\n * @alpha\n */\n readonly viewport: Viewport;\n}\n\n/** As part of a [[HitDetail]], describes a series of \"attached\" views through which the hit was located.\n * Typically, the contents of a view are rendered directly to the screen via [[HitDetail.viewport]].\n * However, in some contexts one view might be \"attached\" to the viewport's view via a [ViewAttachment]($backend), [SectionDrawing]($backend), or both.\n * HitPath captures this information in one of the following possible ways:\n * 1. A [[SheetViewState]] renders another view through a [ViewAttachment]($backend), in which case [[viewAttachment]] will be defined.\n * 2. A [[DrawingViewState]] renders a [[SpatialViewState]] through a [SectionDrawing]($backend) attachment, in which case [[sectionDrawingAttachment]] will be defined; or\n * 3. A combination of 1 and 2 where a [ViewAttachment]($backend) on a sheet renders a [SectionDrawing]($backend) with an attached [[SpatialViewState]], in which both [viewAttachment]] and [[sectionDrawingAttachment]] will be defined.\n * @beta\n */\nexport interface HitPath {\n /** Details about the [ViewAttachment]($backend) through which the hit was obtained. */\n viewAttachment?: ViewAttachmentHitInfo;\n /** Details about the [SectionDrawing]($backend) attachment through which the hit was obtained. */\n sectionDrawingAttachment?: SectionDrawingAttachmentHitInfo;\n};\n\n/** Arguments supplied to the [[HitDetail]] constructor.\n * @public\n */\nexport interface HitDetailProps {\n /** The point in world coordinates that was used as the initial locate point. */\n readonly testPoint: Point3d;\n /** The viewport in which the locate operation was performed. */\n readonly viewport: ScreenViewport;\n /** The procedure that requested the locate operation. */\n readonly hitSource: HitSource;\n /** The approximate location in world coordinates on the geometry identified by this HitDetail. */\n readonly hitPoint: Point3d;\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\n readonly sourceId: Id64String;\n /** The hit geometry priority/classification. */\n readonly priority: HitPriority;\n /** The xy distance to the hit in view coordinates. */\n readonly distXY: number;\n /** The distance in view coordinates between the hit and the near plane. */\n readonly distFraction: number;\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\n readonly subCategoryId?: Id64String;\n /** The class of the hit geometry. */\n readonly geometryClass?: GeometryClass;\n /** The Id of the [[ModelState]] from which the hit originated. */\n readonly modelId?: string;\n /** The IModelConnection from which the hit originated.\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\n * other than the one associated with the viewport.\n * @internal\n */\n readonly sourceIModel?: IModelConnection;\n /** @internal */\n readonly transformFromSourceIModel?: Transform;\n /** @internal chiefly for debugging */\n readonly tileId?: string;\n /** True if the hit originated from a reality model classifier.\n * @alpha\n */\n readonly isClassifier?: boolean;\n /** Describes the path by which the hit was located through a series of attached views.\n * @beta\n */\n readonly path?: HitPath;\n}\n\n/** A HitDetail stores the result when locating geometry displayed in a view.\n * It holds an approximate location on an element (or decoration) from a *pick*.\n * @public\n * @extensions\n */\nexport class HitDetail {\n private readonly _props: HitDetailProps;\n\n /** The point in world coordinates that was used as the initial locate point. */\n public get testPoint(): Point3d { return this._props.testPoint; }\n /** The viewport in which the locate operation was performed. */\n public get viewport(): ScreenViewport { return this._props.viewport; }\n /** The procedure that requested the locate operation. */\n public get hitSource(): HitSource { return this._props.hitSource; }\n /** The approximate location in world coordinates on the geometry identified by this HitDetail. */\n public get hitPoint(): Point3d { return this._props.hitPoint; }\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\n public get sourceId(): Id64String { return this._props.sourceId; }\n /** The hit geometry priority/classification. */\n public get priority(): HitPriority { return this._props.priority; }\n /** The xy distance to the hit in view coordinates. */\n public get distXY(): number { return this._props.distXY; }\n /** The distance in view coordinates between the hit and the near plane. */\n public get distFraction(): number { return this._props.distFraction; }\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\n public get subCategoryId(): Id64String | undefined { return this._props.subCategoryId; }\n /** The class of the hit geometry. */\n public get geometryClass(): GeometryClass | undefined { return this._props.geometryClass; }\n /** The Id of the [[ModelState]] from which the hit originated. */\n public get modelId(): string | undefined { return this._props.modelId; }\n /** The IModelConnection from which the hit originated.\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\n * other than the one associated with the viewport.\n * @internal\n */\n public get sourceIModel(): IModelConnection | undefined { return this._props.sourceIModel; }\n /** @internal */\n public get transformFromSourceIModel(): Transform | undefined { return this._props.transformFromSourceIModel; }\n /** @internal chiefly for debugging */\n public get tileId(): string | undefined { return this._props.tileId; }\n /** True if the hit originated from a reality model classifier.\n * @alpha\n */\n public get isClassifier(): boolean | undefined { return this._props.isClassifier; }\n /** Information about the [ViewAttachment]($backend) within which the hit geometry resides, if any.\n * @note Only [[SheetViewState]]s can have view attachments.\n * @beta\n */\n public get viewAttachment(): ViewAttachmentHitInfo | undefined { return this._props.path?.viewAttachment; }\n /** Describes the path by which the hit was located through a series of attached views.\n * @beta\n */\n public get path(): HitPath | undefined { return this._props.path; }\n\n /** Create a new HitDetail from the inputs to and results of a locate operation. */\n public constructor(props: HitDetailProps);\n\n /** @deprecated in 4.1 - will not be removed until after 2026-06-13. Use the overload that takes a [[HitDetailProps]]. */\n public constructor(testPoint: Point3d, viewport: ScreenViewport, hitSource: HitSource, hitPoint: Point3d, sourceId: string, priority: HitPriority, distXY: number, distFraction: number, subCategoryId?: string, geometryClass?: GeometryClass, modelId?: string, sourceIModel?: IModelConnection, tileId?: string, isClassifier?: boolean);\n\n /** @internal */\n public constructor(arg0: Point3d | HitDetailProps, viewport?: ScreenViewport, hitSource?: HitSource, hitPoint?: Point3d, sourceId?: string, priority?: HitPriority, distXY?: number, distFraction?: number, subCategoryId?: string, geometryClass?: GeometryClass, modelId?: string, sourceIModel?: IModelConnection, tileId?: string, isClassifier?: boolean) {\n if (arg0 instanceof Point3d) {\n assert(undefined !== viewport && undefined !== hitSource && undefined !== hitPoint && undefined !== sourceId);\n assert(undefined !== priority && undefined !== distXY && undefined !== distFraction);\n\n this._props = {\n testPoint: arg0,\n viewport,\n hitSource,\n hitPoint,\n sourceId,\n priority,\n distXY,\n distFraction,\n subCategoryId,\n geometryClass,\n modelId,\n sourceIModel,\n tileId,\n isClassifier,\n };\n } else {\n // Ignore an empty path.\n const path = arg0.path?.sectionDrawingAttachment || arg0.path?.viewAttachment ? arg0.path : undefined;\n\n // Tempting to use { ...arg0 } but spread operator omits getters so, e.g., if input is a HitDetail we would lose all the properties.\n this._props = {\n testPoint: arg0.testPoint,\n viewport: arg0.viewport,\n hitSource: arg0.hitSource,\n hitPoint: arg0.hitPoint,\n sourceId: arg0.sourceId,\n priority: arg0.priority,\n distXY: arg0.distXY,\n distFraction: arg0.distFraction,\n subCategoryId: arg0.subCategoryId,\n geometryClass: arg0.geometryClass,\n modelId: arg0.modelId,\n sourceIModel: arg0.sourceIModel,\n transformFromSourceIModel: arg0.transformFromSourceIModel,\n tileId: arg0.tileId,\n isClassifier: arg0.isClassifier,\n path,\n };\n }\n }\n\n /** Get the type of HitDetail.\n * @returns HitDetailType.Hit if this is a HitDetail, HitDetailType.Snap if it is a SnapDetail\n */\n public getHitType(): HitDetailType { return HitDetailType.Hit; }\n\n /** Get the *hit point* for this HitDetail. Returns the approximate point on the element that caused the hit when not a SnapDetail or IntersectDetail.\n * For a snap that is *hot*, the *exact* point on the Element for the snap mode is returned, otherwise the close point on the hit geometry is returned.\n */\n public getPoint(): Point3d { return this.hitPoint; }\n\n /** Determine if this HitPoint is from the same source as another HitDetail. */\n public isSameHit(otherHit?: HitDetail): boolean { return (undefined !== otherHit && this.sourceId === otherHit.sourceId && this.iModel === otherHit.iModel); }\n /** Return whether sourceId is for a persistent element and not a pickable decoration. */\n public get isElementHit(): boolean { return !Id64.isInvalid(this.sourceId) && !Id64.isTransient(this.sourceId); }\n // return whether the sourceId is for a model (reality models etc.)\n public get isModelHit(): boolean {\n return this.modelId === this.sourceId;\n }\n // return whether the hit point is from map.\n public get isMapHit(): boolean { return 0 !== this.viewport.mapLayerFromHit(this).length; }\n\n /** Create a deep copy of this HitDetail */\n public clone(): HitDetail {\n return new HitDetail(this);\n }\n\n /** Draw this HitDetail as a Decoration. Causes the picked element to *flash* */\n public draw(_context: DecorateContext) {\n this.viewport.flashedId = this.sourceId;\n }\n\n /** Get the tooltip content for this HitDetail. */\n public async getToolTip(): Promise<HTMLElement | string> {\n let toolTipPromise = this.isElementHit ? IModelApp.viewManager.overrideElementToolTip(this) : IModelApp.viewManager.getDecorationToolTip(this);\n for (const toolTipProvider of IModelApp.viewManager.toolTipProviders)\n toolTipPromise = toolTipProvider.augmentToolTip(this, toolTipPromise);\n return toolTipPromise;\n }\n\n /** The IModelConnection from which the hit originated. In some cases this may not be the same as the iModel associated with the Viewport -\n * for example, if a [[TiledGraphicsProvider]] is used to display graphics from a different iModel in the viewport.\n * This HitDetail's element, subcategory, and model Ids are defined in the context of this IModelConnection.\n */\n public get iModel(): IModelConnection {\n return this.sourceIModel ?? this.viewport.iModel;\n }\n\n /** Returns true if this hit originated from an [[IModelConnection]] other than the one associated with the [[Viewport]].\n * @see [[iModel]].\n */\n public get isExternalIModelHit(): boolean {\n return this.iModel !== this.viewport.iModel;\n }\n}\n\n/** A SnapDetail is generated from the result of a snap request. In addition to the HitDetail about the reason the element was *picked*,\n * it holds the *exact* point on the element from the snapping logic, plus additional information that varies with the type of element and snap mode.\n * @public\n * @extensions\n */\nexport class SnapDetail extends HitDetail {\n /** A sprite to show the user the type of snap performed */\n public sprite?: Sprite;\n /** HitPoint adjusted by snap */\n public readonly snapPoint: Point3d;\n /** AccuSnap/AccuDraw can adjust the point after the snap. */\n public readonly adjustedPoint: Point3d;\n /** Curve primitive for snap. */\n public primitive?: CurvePrimitive;\n /** Surface normal at snapPoint */\n public normal?: Vector3d;\n /** The HitGeomType of this SnapDetail */\n public geomType?: HitGeomType;\n /** The HitGeomType of this SnapDetail */\n public parentGeomType?: HitParentGeomType;\n\n /** Constructor for SnapDetail.\n * @param from The HitDetail that created this snap\n * @param snapMode The SnapMode used to create this SnapDetail\n * @param heat The SnapHeat of this SnapDetail\n * @param snapPoint The snapped point in the element\n */\n public constructor(from: HitDetail, public snapMode: SnapMode = SnapMode.Nearest, public heat: SnapHeat = SnapHeat.None, snapPoint?: XYZProps) {\n super(from);\n this.snapPoint = Point3d.fromJSON(snapPoint ? snapPoint : from.hitPoint);\n this.adjustedPoint = this.snapPoint.clone();\n this.sprite = IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));\n }\n\n /** Returns `HitDetailType.Snap` */\n public override getHitType(): HitDetailType { return HitDetailType.Snap; }\n /** Get the snap point if this SnapDetail is *hot*, the pick point otherwise. */\n public override getPoint(): Point3d { return this.isHot ? this.snapPoint : super.getPoint(); }\n /** Return true if the pick point was closer than the snap aperture from the generated snap point. */\n public get isHot(): boolean { return this.heat !== SnapHeat.None; }\n /** Determine whether the [[adjustedPoint]] is different than the [[snapPoint]]. This happens, for example, when points are adjusted for grids, acs plane snap, and AccuDraw. */\n public get isPointAdjusted(): boolean { return !this.adjustedPoint.isExactEqual(this.snapPoint); }\n\n /** Change the snap point. */\n public setSnapPoint(point: Point3d, heat: SnapHeat) {\n this.snapPoint.setFrom(point);\n this.adjustedPoint.setFrom(point);\n this.heat = heat;\n }\n\n /** Change the snap mode. */\n public setSnapMode(snapMode: SnapMode) {\n this.snapMode = snapMode;\n this.sprite = IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));\n }\n\n /** Set curve primitive and HitGeometryType for this SnapDetail. */\n public setCurvePrimitive(primitive?: CurvePrimitive, localToWorld?: Transform, geomType?: HitGeomType): void {\n this.primitive = primitive;\n this.geomType = undefined;\n\n // Only HitGeomType.Point and HitGeomType.Surface are valid without a curve primitive.\n if (undefined === this.primitive) {\n if (HitGeomType.Point === geomType || HitGeomType.Surface === geomType)\n this.geomType = geomType;\n return;\n }\n\n if (undefined !== localToWorld)\n this.primitive.tryTransformInPlace(localToWorld);\n\n if (this.primitive instanceof Arc3d)\n this.geomType = HitGeomType.Arc;\n else if (this.primitive instanceof LineSegment3d)\n this.geomType = HitGeomType.Segment;\n else if (this.primitive instanceof LineString3d)\n this.geomType = HitGeomType.Segment;\n else\n this.geomType = HitGeomType.Curve;\n\n // Set curve primitive geometry type override...\n // - HitGeomType.Point with arc/ellipse denotes center.\n // - HitGeomType.Surface with any curve primitive denotes an interior hit.\n if (undefined !== geomType && HitGeomType.None !== geomType)\n this.geomType = geomType;\n }\n\n /** Make a copy of this SnapDetail. */\n public override clone(): SnapDetail {\n const val = new SnapDetail(this, this.snapMode, this.heat, this.snapPoint);\n val.sprite = this.sprite;\n val.geomType = this.geomType;\n val.parentGeomType = this.parentGeomType;\n val.adjustedPoint.setFrom(this.adjustedPoint);\n if (undefined !== this.primitive)\n val.primitive = this.primitive.clone();\n if (undefined !== this.normal)\n val.normal = this.normal.clone();\n return val;\n }\n\n public getCurvePrimitive(singleSegment: boolean = true): CurvePrimitive | undefined {\n if (!singleSegment || undefined === this.primitive)\n return this.primitive;\n\n if (this.primitive instanceof LineString3d) {\n const ls = this.primitive;\n if (ls.points.length > 2) {\n const loc = ls.closestPoint(this.snapPoint, false);\n const nSegments = ls.points.length - 1;\n const uSegRange = (1.0 / nSegments);\n let segmentNo = Math.floor(loc.fraction / uSegRange);\n if (segmentNo >= nSegments)\n segmentNo = nSegments - 1;\n return LineSegment3d.create(ls.points[segmentNo], ls.points[segmentNo + 1]);\n }\n }\n\n return this.primitive;\n }\n\n public override draw(context: DecorateContext) {\n if (undefined !== this.primitive) {\n let singleSegment = false;\n switch (this.snapMode) {\n case SnapMode.Center:\n case SnapMode.Origin:\n case SnapMode.Bisector:\n break; // Snap point for these is computed using entire linestring, not just the hit segment...\n\n default: {\n singleSegment = true;\n break;\n }\n }\n\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n const outline = context.viewport.hilite.color.adjustedForContrast(context.viewport.view.backgroundColor, 50);\n const centerLine = context.viewport.hilite.color.adjustedForContrast(outline, 175);\n const curvePrimitive = this.getCurvePrimitive(singleSegment);\n if (curvePrimitive !== undefined) {\n const path = Path.create(curvePrimitive);\n\n builder.setSymbology(outline, outline, 6);\n builder.addPath(path);\n\n builder.setSymbology(centerLine, centerLine, 2);\n builder.addPath(path);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n }\n super.draw(context);\n }\n\n private static getSnapSpriteUrl(snapType: SnapMode): string {\n switch (snapType) {\n case SnapMode.Nearest: return `${IModelApp.publicPath}sprites/SnapPointOn.png`;\n case SnapMode.NearestKeypoint: return `${IModelApp.publicPath}sprites/SnapKeypoint.png`;\n case SnapMode.MidPoint: return `${IModelApp.publicPath}sprites/SnapMidpoint.png`;\n case SnapMode.Center: return `${IModelApp.publicPath}sprites/SnapCenter.png`;\n case SnapMode.Origin: return `${IModelApp.publicPath}sprites/SnapOrigin.png`;\n case SnapMode.Bisector: return `${IModelApp.publicPath}sprites/SnapBisector.png`;\n case SnapMode.Intersection: return `${IModelApp.publicPath}sprites/SnapIntersection.png`;\n case SnapMode.PerpendicularPoint: return `${IModelApp.publicPath}sprites/SnapPerpendicularPoint.png`;\n case SnapMode.TangentPoint: return `${IModelApp.publicPath}sprites/SnapTangentPoint.png`;\n }\n return \"\";\n }\n}\n\n/**\n * @public\n * @extensions\n */\nexport class IntersectDetail extends SnapDetail {\n public constructor(from: SnapDetail, heat: SnapHeat = SnapHeat.None, snapPoint: XYZProps, public readonly otherPrimitive: CurvePrimitive, public readonly otherId: string) {\n super(from, SnapMode.Intersection, heat, snapPoint);\n this.primitive = from.primitive;\n this.normal = from.normal; // Preserve normal from primary snap location for AccuDraw smart rotation...\n }\n\n public override draw(context: DecorateContext) {\n if (undefined !== this.primitive && undefined !== this.otherPrimitive) {\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n const outline = context.viewport.hilite.color.adjustedForContrast(context.viewport.view.backgroundColor, 50);\n const centerLine = context.viewport.hilite.color.adjustedForContrast(outline, 175);\n const path1 = Path.create(this.primitive);\n const path2 = Path.create(this.otherPrimitive);\n\n builder.setSymbology(outline, outline, 6);\n builder.addPath(path1);\n builder.addPath(path2);\n\n builder.setSymbology(centerLine, centerLine, 2);\n builder.addPath(path1);\n builder.setSymbology(centerLine, centerLine, 2, LinePixels.Code2);\n builder.addPath(path2);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n super.draw(context);\n }\n}\n\n/** The result of a \"locate\" is a sorted list of objects that satisfied the search criteria (a HitList). Earlier hits in the list\n * are somehow *better* than those later on.\n * @public\n * @extensions\n */\nexport class HitList<T extends HitDetail> {\n public hits: T[] = [];\n public currHit = -1;\n public get length(): number { return this.hits.length; }\n public empty(): void {\n this.hits.length = 0;\n this.currHit = -1;\n }\n\n public resetCurrentHit(): void { this.currHit = -1; }\n\n /** Get a hit from a particular index into a HitList\n * return the requested hit from the HitList or undefined\n */\n public getHit(hitNum: number): T | undefined {\n if (hitNum < 0)\n hitNum = this.length - 1;\n\n return (hitNum >= this.length) ? undefined : this.hits[hitNum];\n }\n\n /** When setting one or more indices to undefined you must call dropNulls afterwards */\n public setHit(i: number, p: T | undefined): void {\n if (i < 0 || i >= this.length)\n return;\n // While messy, the following is obviously intentional based on the function comment.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.hits[i] = p!;\n }\n\n public dropNulls(): void {\n const hits = this.hits;\n this.hits = [];\n for (const hit of hits)\n this.hits.push(hit);\n }\n\n public getNextHit(): T | undefined {\n this.currHit++;\n return this.getCurrentHit();\n }\n\n public getCurrentHit(): T | undefined { return -1 === this.currHit ? undefined : this.getHit(this.currHit); }\n\n public setCurrentHit(hit: T): void {\n this.resetCurrentHit();\n for (let thisHit; undefined !== (thisHit = this.getNextHit());) {\n if (thisHit === hit)\n return;\n }\n }\n\n /** remove the current hit from the list. */\n public removeCurrentHit() { this.removeHit(this.currHit); }\n\n /** remove a hit in the list. */\n public removeHit(hitNum: number) {\n if (hitNum < 0) // Support -1 == END\n hitNum = this.length - 1;\n\n if (hitNum <= this.currHit)\n this.currHit = -1;\n\n if (hitNum >= this.length) // Locate calls GetNextHit, which increments currHit, until it goes beyond the end of size of the array.\n return; // Then Reset call RemoteCurrentHit, which passes in currHit. When it is out of range, we do nothing.\n\n this.hits.splice(hitNum, 1);\n }\n\n /** search through list and remove any hits that contain a specified element id. */\n public removeHitsFrom(sourceId: string): boolean {\n let removedOne = false;\n\n // walk backwards through list so we don't have to worry about what happens on remove\n for (let i = this.length - 1; i >= 0; i--) {\n const thisHit = this.hits[i];\n if (thisHit && sourceId === thisHit.sourceId) {\n removedOne = true;\n this.removeHit(i);\n }\n }\n return removedOne;\n }\n\n private getPriorityZOverride(priority: HitPriority): number {\n switch (priority) {\n case HitPriority.WireEdge:\n case HitPriority.PlanarEdge:\n case HitPriority.NonPlanarEdge:\n return 0;\n case HitPriority.SilhouetteEdge:\n return 1;\n case HitPriority.PlanarSurface:\n case HitPriority.NonPlanarSurface:\n return 2;\n default:\n return 3;\n }\n }\n\n /** compare two hits for insertion into list. */\n public compare(hit1: HitDetail | undefined, hit2: HitDetail | undefined): -1 | 1 | 0 {\n if (!hit1 || !hit2)\n return 0;\n\n const zOverride1 = this.getPriorityZOverride(hit1.priority);\n const zOverride2 = this.getPriorityZOverride(hit2.priority);\n\n // Prefer edges over surfaces, this is more important than z because we know the edge isn't obscured...\n if (zOverride1 < zOverride2)\n return -1;\n if (zOverride1 > zOverride2)\n return 1;\n\n // Compare xy distance from pick point, prefer hits closer to center...\n if (hit1.distXY < hit2.distXY)\n return -1;\n if (hit1.distXY > hit2.distXY)\n return 1;\n\n // Compare distance fraction, prefer hits closer to eye...\n if (hit1.distFraction > hit2.distFraction)\n return -1;\n if (hit1.distFraction < hit2.distFraction)\n return 1;\n\n // Compare geometry class, prefer path/region hits over surface hits when all else is equal...\n if (hit1.priority < hit2.priority)\n return -1;\n if (hit1.priority > hit2.priority)\n return 1;\n\n return 0;\n }\n\n /** Add a new hit to the list. Hits are sorted according to their priority and distance. */\n public addHit(newHit: T): number {\n if (0 === this.hits.length) {\n this.hits.push(newHit);\n return 0;\n }\n let index = 0;\n for (; index < this.hits.length; ++index) {\n const oldHit = this.hits[index];\n const comparison = this.compare(newHit, oldHit);\n if (comparison < 0)\n break;\n }\n\n this.hits.splice(index, 0, newHit);\n return index;\n }\n\n /** Insert a new hit into the list at the supplied index. */\n public insertHit(i: number, hit: T): void {\n if (i < 0 || i >= this.length)\n this.hits.push(hit);\n else\n this.hits.splice(i, 0, hit);\n }\n}\n"]}
@@ -32,7 +32,7 @@ let iModelJsCss = `
32
32
  }
33
33
 
34
34
  .logo-card-logo {
35
- width:124px;
35
+ width:144px;
36
36
  overflow:hidden;
37
37
  vertical-align:text-top;
38
38
  text-align:center
@@ -1 +1 @@
1
- {"version":3,"file":"IModeljs-css.js","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,sBAAsB;AAEtB;;GAEG;AACH,IAAI,WAAW,GAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqIrC,CAAC;AAEF,mEAAmE;AACnE,CAAC,GAAG,EAAE;IACJ,8DAA8D;IAC9D,IAAI,WAAW,KAAK,OAAO,QAAQ;QACjC,OAAO;IACT,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC;IACrH,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,GAAG,GAAG,YAAY,CAAC;IAC5B,QAAQ,CAAC,IAAI,GAAG,gEAAgE,CAAC;IACjF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,wFAAwF;IACtH,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,WAAW,GAAG,SAAS,CAAC,CAAC,0BAA0B;AACrD,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n// cSpell:ignore segoe\n\n/**\n * @internal\n */\nlet iModelJsCss: string | undefined = `\n:root {\n --background-1:#ffffff;\n --background-2:#f8f9fb;\n --background-3:#eef0f3;\n --background-4:#dce0e3;\n --background-5:#c7ccd1;\n --foreground-body:#000000;\n --foreground-primary:#008be1;\n --foreground-success:#56a91c;\n --foreground-alert:#d30a0a;\n --foreground-warning:#f18b12;\n --safe-area-top: constant(safe-area-inset-top);\n --safe-area-top: env(safe-area-inset-top);\n --safe-area-left: constant(safe-area-inset-left);\n --safe-area-left: env(safe-area-inset-left);\n --safe-area-bottom: constant(safe-area-inset-bottom);\n --safe-area-bottom: env(safe-area-inset-bottom);\n --safe-area-right: constant(safe-area-inset-right);\n --safe-area-right: env(safe-area-inset-right);\n --logo-foreground-body:#000000;\n --logo-background-1:#ffffff;\n}\n\n.logo-card-logo {\n width:124px;\n overflow:hidden;\n vertical-align:text-top;\n text-align:center\n}\n\n.logo-card-logo img {\n margin-top:4px;\n border: solid 3px var(--logo-background-1)\n}\n\n.logo-card-message {\n font-size:13px;\n line-height:1.25;\n margin-block-start:.5em;\n margin-block-end:3em;\n width:90%;\n opacity:.7\n}\n\n.logo-card-header {\n margin:auto;\n font-size:18px;\n font-weight:bold;\n opacity:.85\n}\n\n.logo-cards {\n position:relative;\n width:100%\n}\n\n.imodeljs-modal-overlay {\n top:0;\n left:0;\n width:100%;\n height:100%;\n position:absolute;\n display:flex;\n justify-content:center;\n align-items:center;\n background-color:rgba(0,0,0,.5);\n z-index:10000;\n}\n\n.imodeljs-modal {\n border-radius:3px;\n box-shadow: 0px 1px 3px 0 rgba(0,0,0,0.1);\n color:var(--logo-foreground-body);\n background-color:var(--logo-background-1);\n font-family:\"Segoe UI\",\"Open Sans\",sans-serif;\n font-weight:normal;\n font-stretch:normal;\n font-style:normal;\n letter-spacing:normal;\n text-align:left;\n --width-border: max(var(--safe-area-left), var(--safe-area-right), 16px);\n --height-border: max(var(--safe-area-top), var(--safe-area-bottom), 16px);\n max-height: calc(100% - (2 * var(--height-border)));\n overflow: auto;\n}\n\n@media (max-width:450px) {\n .imodeljs-about .logo-card-logo {\n width: 90px;\n }\n}\n\n@media (max-height:450px) {\n .imodeljs-about {\n max-width: calc(100% - (2 * var(--width-border))) !important;\n width: unset !important;\n }\n .imodeljs-about .logo-card-message p {\n margin-block-end: 1em;\n }\n .imodeljs-about .logo-cards {\n margin-bottom: 2em;\n }\n}\n\n.imodeljs-modal-close {\n font-size:32px;\n text-align:right;\n position:relative;\n cursor:pointer;\n right:10px;\n top:-4px;\n margin:0;\n margin-bottom:-10px\n}\n\n.imodeljs-icon {\n z-index:11;\n left:8px;\n bottom:8px;\n position:absolute;\n width:32px;\n cursor:pointer;\n opacity:.4;\n filter:drop-shadow(1px 1px 1px black)\n}\n\n@media (hover: hover) {\n .imodeljs-icon:hover {\n opacity:1.0;\n }\n}\n`;\n\n// add the iTwin.js frontend .css styles into DOM head when we load\n(() => {\n // Skip adding the css to document if document does not exist.\n if (\"undefined\" === typeof document)\n return;\n const style = document.createElement(\"style\");\n style.appendChild(document.createTextNode(iModelJsCss.replace(/\\s+/gm, \" \"))); // strips multiple spaces and space+\\r\n const openSans = document.createElement(\"link\");\n openSans.rel = \"stylesheet\";\n openSans.href = \"https://fonts.googleapis.com/css?family=Open+Sans&display=swap\";\n document.head.prepend(style); // put our styles at the beginning so any application-supplied styles will override them\n document.head.prepend(openSans);\n iModelJsCss = undefined; // can only be called once\n})();\n"]}
1
+ {"version":3,"file":"IModeljs-css.js","sourceRoot":"","sources":["../../src/IModeljs-css.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,sBAAsB;AAEtB;;GAEG;AACH,IAAI,WAAW,GAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqIrC,CAAC;AAEF,mEAAmE;AACnE,CAAC,GAAG,EAAE;IACJ,8DAA8D;IAC9D,IAAI,WAAW,KAAK,OAAO,QAAQ;QACjC,OAAO;IACT,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC;IACrH,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,GAAG,GAAG,YAAY,CAAC;IAC5B,QAAQ,CAAC,IAAI,GAAG,gEAAgE,CAAC;IACjF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,wFAAwF;IACtH,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,WAAW,GAAG,SAAS,CAAC,CAAC,0BAA0B;AACrD,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n// cSpell:ignore segoe\n\n/**\n * @internal\n */\nlet iModelJsCss: string | undefined = `\n:root {\n --background-1:#ffffff;\n --background-2:#f8f9fb;\n --background-3:#eef0f3;\n --background-4:#dce0e3;\n --background-5:#c7ccd1;\n --foreground-body:#000000;\n --foreground-primary:#008be1;\n --foreground-success:#56a91c;\n --foreground-alert:#d30a0a;\n --foreground-warning:#f18b12;\n --safe-area-top: constant(safe-area-inset-top);\n --safe-area-top: env(safe-area-inset-top);\n --safe-area-left: constant(safe-area-inset-left);\n --safe-area-left: env(safe-area-inset-left);\n --safe-area-bottom: constant(safe-area-inset-bottom);\n --safe-area-bottom: env(safe-area-inset-bottom);\n --safe-area-right: constant(safe-area-inset-right);\n --safe-area-right: env(safe-area-inset-right);\n --logo-foreground-body:#000000;\n --logo-background-1:#ffffff;\n}\n\n.logo-card-logo {\n width:144px;\n overflow:hidden;\n vertical-align:text-top;\n text-align:center\n}\n\n.logo-card-logo img {\n margin-top:4px;\n border: solid 3px var(--logo-background-1)\n}\n\n.logo-card-message {\n font-size:13px;\n line-height:1.25;\n margin-block-start:.5em;\n margin-block-end:3em;\n width:90%;\n opacity:.7\n}\n\n.logo-card-header {\n margin:auto;\n font-size:18px;\n font-weight:bold;\n opacity:.85\n}\n\n.logo-cards {\n position:relative;\n width:100%\n}\n\n.imodeljs-modal-overlay {\n top:0;\n left:0;\n width:100%;\n height:100%;\n position:absolute;\n display:flex;\n justify-content:center;\n align-items:center;\n background-color:rgba(0,0,0,.5);\n z-index:10000;\n}\n\n.imodeljs-modal {\n border-radius:3px;\n box-shadow: 0px 1px 3px 0 rgba(0,0,0,0.1);\n color:var(--logo-foreground-body);\n background-color:var(--logo-background-1);\n font-family:\"Segoe UI\",\"Open Sans\",sans-serif;\n font-weight:normal;\n font-stretch:normal;\n font-style:normal;\n letter-spacing:normal;\n text-align:left;\n --width-border: max(var(--safe-area-left), var(--safe-area-right), 16px);\n --height-border: max(var(--safe-area-top), var(--safe-area-bottom), 16px);\n max-height: calc(100% - (2 * var(--height-border)));\n overflow: auto;\n}\n\n@media (max-width:450px) {\n .imodeljs-about .logo-card-logo {\n width: 90px;\n }\n}\n\n@media (max-height:450px) {\n .imodeljs-about {\n max-width: calc(100% - (2 * var(--width-border))) !important;\n width: unset !important;\n }\n .imodeljs-about .logo-card-message p {\n margin-block-end: 1em;\n }\n .imodeljs-about .logo-cards {\n margin-bottom: 2em;\n }\n}\n\n.imodeljs-modal-close {\n font-size:32px;\n text-align:right;\n position:relative;\n cursor:pointer;\n right:10px;\n top:-4px;\n margin:0;\n margin-bottom:-10px\n}\n\n.imodeljs-icon {\n z-index:11;\n left:8px;\n bottom:8px;\n position:absolute;\n width:32px;\n cursor:pointer;\n opacity:.4;\n filter:drop-shadow(1px 1px 1px black)\n}\n\n@media (hover: hover) {\n .imodeljs-icon:hover {\n opacity:1.0;\n }\n}\n`;\n\n// add the iTwin.js frontend .css styles into DOM head when we load\n(() => {\n // Skip adding the css to document if document does not exist.\n if (\"undefined\" === typeof document)\n return;\n const style = document.createElement(\"style\");\n style.appendChild(document.createTextNode(iModelJsCss.replace(/\\s+/gm, \" \"))); // strips multiple spaces and space+\\r\n const openSans = document.createElement(\"link\");\n openSans.rel = \"stylesheet\";\n openSans.href = \"https://fonts.googleapis.com/css?family=Open+Sans&display=swap\";\n document.head.prepend(style); // put our styles at the beginning so any application-supplied styles will override them\n document.head.prepend(openSans);\n iModelJsCss = undefined; // can only be called once\n})();\n"]}
@@ -32,7 +32,6 @@ export declare class FrustumUniforms {
32
32
  private readonly _viewUpVector;
33
33
  private readonly _planeData;
34
34
  private readonly _frustumData;
35
- private readonly _worldFrustumZRange;
36
35
  readonly projectionMatrix32: Matrix4;
37
36
  private readonly _logZData;
38
37
  private readonly _viewUpVector32;
@@ -43,7 +42,6 @@ export declare class FrustumUniforms {
43
42
  bindUpVector(uniform: UniformHandle): void;
44
43
  get planes(): Float32Array;
45
44
  get frustum(): Float32Array;
46
- get worldFrustumZRange(): Float32Array;
47
45
  get nearPlane(): number;
48
46
  get farPlane(): number;
49
47
  get type(): FrustumUniformType;
@@ -1 +1 @@
1
- {"version":3,"file":"FrustumUniforms.d.ts","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/FrustumUniforms.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAsB,QAAQ,EAAE,OAAO,EAAW,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAO,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,gBAAgB;AAChB,0BAAkB,kBAAkB;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G,IAAI;CAS1F;AAWD,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,WAM9E"}
@@ -6,7 +6,7 @@
6
6
  * @module WebGL
7
7
  */
8
8
  import { expectDefined } from "@itwin/core-bentley";
9
- import { InverseMatrixState, Matrix4d, Point3d, Range3d, Transform, Vector3d } from "@itwin/core-geometry";
9
+ import { InverseMatrixState, Matrix4d, Point3d, Transform, Vector3d } from "@itwin/core-geometry";
10
10
  import { Frustum, Npc } from "@itwin/core-common";
11
11
  import { IModelFrameLifecycle } from "./IModelFrameLifecycle";
12
12
  import { Matrix4 } from "./Matrix";
@@ -27,7 +27,6 @@ export class FrustumUniforms {
27
27
  // GPU state
28
28
  _planeData = new Float32Array(4);
29
29
  _frustumData = new Float32Array(3);
30
- _worldFrustumZRange = new Float32Array(2);
31
30
  projectionMatrix32 = new Matrix4();
32
31
  _logZData = new Float32Array(2);
33
32
  _viewUpVector32 = new Float32Array(3);
@@ -40,7 +39,6 @@ export class FrustumUniforms {
40
39
  viewX: new Vector3d(),
41
40
  viewY: new Vector3d(),
42
41
  viewZ: new Vector3d(),
43
- range: new Range3d(),
44
42
  };
45
43
  constructor() {
46
44
  }
@@ -56,8 +54,6 @@ export class FrustumUniforms {
56
54
  get planes() { return this._planeData; }
57
55
  // uniform vec3 u_frustum; // { near, far, type }
58
56
  get frustum() { return this._frustumData; }
59
- // uniform vec2 u_worldFrustumZRange // { min, max }
60
- get worldFrustumZRange() { return this._worldFrustumZRange; }
61
57
  get nearPlane() { return this._frustumData[0 /* FrustumData.kNear */]; }
62
58
  get farPlane() { return this._frustumData[1 /* FrustumData.kFar */]; }
63
59
  get type() { return this.frustum[2 /* FrustumData.kType */]; }
@@ -70,9 +66,6 @@ export class FrustumUniforms {
70
66
  return;
71
67
  desync(this);
72
68
  newFrustum.clone(this.planFrustum);
73
- const range = newFrustum.toRange(this._scratch.range);
74
- this._worldFrustumZRange[0] = range.low.z;
75
- this._worldFrustumZRange[1] = range.high.z;
76
69
  const farLowerLeft = newFrustum.getCorner(Npc.LeftBottomRear);
77
70
  const farLowerRight = newFrustum.getCorner(Npc.RightBottomRear);
78
71
  const farUpperLeft = newFrustum.getCorner(Npc.LeftTopRear);
@@ -1 +1 @@
1
- {"version":3,"file":"FrustumUniforms.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/FrustumUniforms.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAuBtC;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC1B,uCAAuC;IACvB,WAAW,GAAG,IAAI,OAAO,EAAE,CAAC;IACpC,aAAa,GAAG,CAAC,CAAC;IACT,gBAAgB,GAAG,IAAI,OAAO,EAAE,CAAC;IAClC,UAAU,GAAG,SAAS,CAAC,cAAc,EAAE,CAAC;IACxC,gBAAgB,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAC5C,cAAc,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IAClC,aAAa,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IAElD,YAAY;IACK,UAAU,GAAiB,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;IAC/C,YAAY,GAAiB,IAAI,YAAY,CAAC,CAA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,CAAC,GAAG,GAAG,MAAM,CAAC,EAAE,GAAG,EACxE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAC1E,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EACnB,MAAM,CAAC,CAAC;AACZ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module WebGL\n */\n\nimport { expectDefined } from \"@itwin/core-bentley\";\nimport { InverseMatrixState, Matrix4d, Point3d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\nimport { Frustum, Npc } from \"@itwin/core-common\";\nimport { UniformHandle } from \"./UniformHandle\";\nimport { IModelFrameLifecycle } from \"./IModelFrameLifecycle\";\nimport { Matrix4 } from \"./Matrix\";\nimport { desync, sync } from \"./Sync\";\n\n/** @internal */\nexport const enum FrustumUniformType { // eslint-disable-line no-restricted-syntax\n TwoDee,\n Orthographic,\n Perspective,\n}\n\n/** @internal */\nexport const enum Plane { // eslint-disable-line no-restricted-syntax\n kTop,\n kBottom,\n kLeft,\n kRight,\n}\n\nconst enum FrustumData { // eslint-disable-line no-restricted-syntax\n kNear,\n kFar,\n kType,\n}\n\n/** Represents a Target's frustum for use in glsl as a pair of uniforms.\n * Do not modify fields of exposed objects directly. e.g., do not directly manipulate the projection or view matrices - use the appropriate APIs.\n * @internal\n */\nexport class FrustumUniforms {\n // CPU state. Do not modify - use APIs.\n public readonly planFrustum = new Frustum();\n private _planFraction = 0;\n private readonly _nearPlaneCenter = new Point3d();\n public readonly viewMatrix = Transform.createIdentity();\n public readonly projectionMatrix = Matrix4d.createIdentity();\n private readonly _worldUpVector = Vector3d.unitZ();\n private readonly _viewUpVector = Vector3d.unitZ();\n\n // GPU state\n private readonly _planeData: Float32Array = new Float32Array(4);\n private readonly _frustumData: Float32Array = new Float32Array(3);\n private readonly _worldFrustumZRange: Float32Array = new Float32Array(2);\n public readonly projectionMatrix32 = new Matrix4();\n private readonly _logZData = new Float32Array(2);\n private readonly _viewUpVector32 = new Float32Array(3);\n\n // SyncTarget\n public syncKey = 0;\n\n // Scratch variables\n private readonly _scratch = {\n point3d: new Point3d(),\n vec3d: new Vector3d(),\n viewX: new Vector3d(),\n viewY: new Vector3d(),\n viewZ: new Vector3d(),\n range: new Range3d(),\n };\n\n public constructor() {\n }\n\n public bindProjectionMatrix(uniform: UniformHandle): void {\n if (!sync(this, uniform))\n uniform.setMatrix4(this.projectionMatrix32);\n }\n\n public bindUpVector(uniform: UniformHandle): void {\n if (!sync(this, uniform))\n uniform.setUniform3fv(this._viewUpVector32);\n }\n\n // uniform vec4 u_frustumPlanes; // { top, bottom, left, right }\n public get planes(): Float32Array { return this._planeData; }\n\n // uniform vec3 u_frustum; // { near, far, type }\n public get frustum(): Float32Array { return this._frustumData; }\n\n // uniform vec2 u_worldFrustumZRange // { min, max }\n public get worldFrustumZRange(): Float32Array { return this._worldFrustumZRange; }\n\n public get nearPlane(): number { return this._frustumData[FrustumData.kNear]; }\n public get farPlane(): number { return this._frustumData[FrustumData.kFar]; }\n public get type(): FrustumUniformType { return this.frustum[FrustumData.kType] as FrustumUniformType; }\n public get is2d(): boolean { return FrustumUniformType.TwoDee === this.type; }\n public get planFraction(): number { return this._planFraction; }\n\n // uniform vec2 u_logZ where x = 1/near and y = log(far/near)\n public get logZ(): Float32Array { return this._logZData; }\n\n public changeFrustum(newFrustum: Frustum, newFraction: number, is3d: boolean): void {\n if (newFraction === this._planFraction && is3d !== this.is2d && newFrustum.equals(this.planFrustum))\n return;\n\n desync(this);\n\n newFrustum.clone(this.planFrustum);\n\n const range = newFrustum.toRange(this._scratch.range);\n this._worldFrustumZRange[0] = range.low.z;\n this._worldFrustumZRange[1] = range.high.z;\n\n const farLowerLeft = newFrustum.getCorner(Npc.LeftBottomRear);\n const farLowerRight = newFrustum.getCorner(Npc.RightBottomRear);\n const farUpperLeft = newFrustum.getCorner(Npc.LeftTopRear);\n const farUpperRight = newFrustum.getCorner(Npc.RightTopRear);\n const nearLowerLeft = newFrustum.getCorner(Npc.LeftBottomFront);\n const nearLowerRight = newFrustum.getCorner(Npc.RightBottomFront);\n const nearUpperLeft = newFrustum.getCorner(Npc.LeftTopFront);\n const nearUpperRight = newFrustum.getCorner(Npc.RightTopFront);\n\n const nearCenter = nearLowerLeft.interpolate(0.5, nearUpperRight, this._scratch.point3d);\n\n const viewX = normalizedDifference(nearLowerRight, nearLowerLeft, this._scratch.viewX);\n const viewY = normalizedDifference(nearUpperLeft, nearLowerLeft, this._scratch.viewY);\n const viewZ = expectDefined(viewX.crossProduct(viewY, this._scratch.viewZ).normalize());\n\n this._planFraction = newFraction;\n\n if (!is3d || newFraction > 0.999) { // ortho or 2d\n const halfWidth = Vector3d.createStartEnd(farLowerRight, farLowerLeft, this._scratch.vec3d).magnitude() * 0.5;\n const halfHeight = Vector3d.createStartEnd(farLowerRight, farUpperRight).magnitude() * 0.5;\n const depth = Vector3d.createStartEnd(farLowerLeft, nearLowerLeft, this._scratch.vec3d).magnitude();\n\n lookIn(nearCenter, viewX, viewY, viewZ, this.viewMatrix);\n ortho(-halfWidth, halfWidth, -halfHeight, halfHeight, 0, depth, this.projectionMatrix);\n\n this._nearPlaneCenter.setFrom(nearLowerLeft);\n this._nearPlaneCenter.interpolate(0.5, nearUpperRight, this._nearPlaneCenter);\n\n this.setPlanes(halfHeight, -halfHeight, -halfWidth, halfWidth);\n this.setFrustum(0, depth, is3d ? FrustumUniformType.Orthographic : FrustumUniformType.TwoDee);\n } else { // perspective\n const scale = 1.0 / (1.0 - newFraction);\n const zVec = Vector3d.createStartEnd(farLowerLeft, nearLowerLeft, this._scratch.vec3d);\n const cameraPosition = fromSumOf(farLowerLeft, zVec, scale, this._scratch.point3d);\n\n const frustumLeft = dotDifference(farLowerLeft, cameraPosition, viewX) * newFraction;\n const frustumRight = dotDifference(farLowerRight, cameraPosition, viewX) * newFraction;\n const frustumBottom = dotDifference(farLowerLeft, cameraPosition, viewY) * newFraction;\n const frustumTop = dotDifference(farUpperLeft, cameraPosition, viewY) * newFraction;\n const frustumFront = -dotDifference(nearLowerLeft, cameraPosition, viewZ);\n const frustumBack = -dotDifference(farLowerLeft, cameraPosition, viewZ);\n\n lookIn(cameraPosition, viewX, viewY, viewZ, this.viewMatrix);\n frustum(frustumLeft, frustumRight, frustumBottom, frustumTop, frustumFront, frustumBack, this.projectionMatrix);\n\n IModelFrameLifecycle.onChangeCameraView.raiseEvent({\n cameraPosition,\n viewX,\n viewY,\n viewZ,\n });\n IModelFrameLifecycle.onChangeCameraFrustum.raiseEvent({\n type: FrustumUniformType.Perspective,\n left: frustumLeft,\n right: frustumRight,\n bottom: frustumBottom,\n top: frustumTop,\n front: frustumFront,\n back: frustumBack,\n });\n\n this._nearPlaneCenter.setFrom(nearLowerLeft);\n this._nearPlaneCenter.interpolate(0.5, nearUpperRight, this._nearPlaneCenter);\n\n this.setPlanes(frustumTop, frustumBottom, frustumLeft, frustumRight);\n this.setFrustum(frustumFront, frustumBack, FrustumUniformType.Perspective);\n }\n\n this.viewMatrix.matrix.inverseState = InverseMatrixState.unknown;\n\n this.viewMatrix.matrix.multiplyVector(this._worldUpVector, this._viewUpVector);\n this._viewUpVector.normalizeInPlace();\n this._viewUpVector32[0] = this._viewUpVector.x;\n this._viewUpVector32[1] = this._viewUpVector.y;\n this._viewUpVector32[2] = this._viewUpVector.z;\n\n this.projectionMatrix32.initFromMatrix4d(this.projectionMatrix);\n }\n\n public changeProjectionMatrix(newMatrix: Matrix4d): void {\n desync(this);\n this.projectionMatrix.setFrom(newMatrix);\n this.projectionMatrix32.initFromMatrix4d(this.projectionMatrix);\n }\n\n protected setPlanes(top: number, bottom: number, left: number, right: number): void {\n this._planeData[Plane.kTop] = top;\n this._planeData[Plane.kBottom] = bottom;\n this._planeData[Plane.kLeft] = left;\n this._planeData[Plane.kRight] = right;\n }\n\n protected setFrustum(nearPlane: number, farPlane: number, type: FrustumUniformType): void {\n this._frustumData[FrustumData.kNear] = nearPlane;\n this._frustumData[FrustumData.kFar] = farPlane;\n this._frustumData[FrustumData.kType] = type as number;\n\n // If nearPlane is zero, we don't have a camera (or got very unlucky); in that case shader will compute linear depth.\n this._logZData[0] = 0 !== nearPlane ? 1 / nearPlane : 0;\n this._logZData[1] = 0 !== nearPlane ? Math.log(farPlane / nearPlane) : farPlane;\n }\n}\n\nfunction normalizedDifference(p0: Point3d, p1: Point3d, out?: Vector3d): Vector3d {\n const result = undefined !== out ? out : new Vector3d();\n result.x = p0.x - p1.x;\n result.y = p0.y - p1.y;\n result.z = p0.z - p1.z;\n result.normalizeInPlace();\n return result;\n}\n\n/** @internal */\nexport function fromSumOf(p: Point3d, v: Vector3d, scale: number, out?: Point3d) {\n const result = undefined !== out ? out : new Point3d();\n result.x = p.x + v.x * scale;\n result.y = p.y + v.y * scale;\n result.z = p.z + v.z * scale;\n return result;\n}\n\nfunction dotDifference(pt: Point3d, origin: Point3d, vec: Vector3d): number {\n return (pt.x - origin.x) * vec.x + (pt.y - origin.y) * vec.y + (pt.z - origin.z) * vec.z;\n}\n\nfunction lookIn(eye: Point3d, viewX: Vector3d, viewY: Vector3d, viewZ: Vector3d, result: Transform) {\n const rot = result.matrix.coffs;\n rot[0] = viewX.x;\n rot[1] = viewX.y;\n rot[2] = viewX.z;\n rot[3] = viewY.x;\n rot[4] = viewY.y;\n rot[5] = viewY.z;\n rot[6] = viewZ.x;\n rot[7] = viewZ.y;\n rot[8] = viewZ.z;\n\n result.origin.x = -viewX.dotProduct(eye);\n result.origin.y = -viewY.dotProduct(eye);\n result.origin.z = -viewZ.dotProduct(eye);\n}\n\nfunction ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4d) {\n Matrix4d.createRowValues(\n 2.0 / (right - left), 0.0, 0.0, -(right + left) / (right - left),\n 0.0, 2.0 / (top - bottom), 0.0, -(top + bottom) / (top - bottom),\n 0.0, 0.0, -2.0 / (far - near), -(far + near) / (far - near),\n 0.0, 0.0, 0.0, 1.0,\n result);\n}\n\nfunction frustum(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4d) {\n Matrix4d.createRowValues(\n (2.0 * near) / (right - left), 0.0, (right + left) / (right - left), 0.0,\n 0.0, (2.0 * near) / (top - bottom), (top + bottom) / (top - bottom), 0.0,\n 0.0, 0.0, -(far + near) / (far - near), -(2.0 * far * near) / (far - near),\n 0.0, 0.0, -1.0, 0.0,\n result);\n}\n"]}
1
+ {"version":3,"file":"FrustumUniforms.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/FrustumUniforms.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAuBtC;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC1B,uCAAuC;IACvB,WAAW,GAAG,IAAI,OAAO,EAAE,CAAC;IACpC,aAAa,GAAG,CAAC,CAAC;IACT,gBAAgB,GAAG,IAAI,OAAO,EAAE,CAAC;IAClC,UAAU,GAAG,SAAS,CAAC,cAAc,EAAE,CAAC;IACxC,gBAAgB,GAAG,QAAQ,CAAC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AG,IAAI,CAAC,EAC1E,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EACnB,MAAM,CAAC,CAAC;AACZ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module WebGL\n */\n\nimport { expectDefined } from \"@itwin/core-bentley\";\nimport { InverseMatrixState, Matrix4d, Point3d, Transform, Vector3d } from \"@itwin/core-geometry\";\nimport { Frustum, Npc } from \"@itwin/core-common\";\nimport { UniformHandle } from \"./UniformHandle\";\nimport { IModelFrameLifecycle } from \"./IModelFrameLifecycle\";\nimport { Matrix4 } from \"./Matrix\";\nimport { desync, sync } from \"./Sync\";\n\n/** @internal */\nexport const enum FrustumUniformType { // eslint-disable-line no-restricted-syntax\n TwoDee,\n Orthographic,\n Perspective,\n}\n\n/** @internal */\nexport const enum Plane { // eslint-disable-line no-restricted-syntax\n kTop,\n kBottom,\n kLeft,\n kRight,\n}\n\nconst enum FrustumData { // eslint-disable-line no-restricted-syntax\n kNear,\n kFar,\n kType,\n}\n\n/** Represents a Target's frustum for use in glsl as a pair of uniforms.\n * Do not modify fields of exposed objects directly. e.g., do not directly manipulate the projection or view matrices - use the appropriate APIs.\n * @internal\n */\nexport class FrustumUniforms {\n // CPU state. Do not modify - use APIs.\n public readonly planFrustum = new Frustum();\n private _planFraction = 0;\n private readonly _nearPlaneCenter = new Point3d();\n public readonly viewMatrix = Transform.createIdentity();\n public readonly projectionMatrix = Matrix4d.createIdentity();\n private readonly _worldUpVector = Vector3d.unitZ();\n private readonly _viewUpVector = Vector3d.unitZ();\n\n // GPU state\n private readonly _planeData: Float32Array = new Float32Array(4);\n private readonly _frustumData: Float32Array = new Float32Array(3);\n public readonly projectionMatrix32 = new Matrix4();\n private readonly _logZData = new Float32Array(2);\n private readonly _viewUpVector32 = new Float32Array(3);\n\n // SyncTarget\n public syncKey = 0;\n\n // Scratch variables\n private readonly _scratch = {\n point3d: new Point3d(),\n vec3d: new Vector3d(),\n viewX: new Vector3d(),\n viewY: new Vector3d(),\n viewZ: new Vector3d(),\n };\n\n public constructor() {\n }\n\n public bindProjectionMatrix(uniform: UniformHandle): void {\n if (!sync(this, uniform))\n uniform.setMatrix4(this.projectionMatrix32);\n }\n\n public bindUpVector(uniform: UniformHandle): void {\n if (!sync(this, uniform))\n uniform.setUniform3fv(this._viewUpVector32);\n }\n\n // uniform vec4 u_frustumPlanes; // { top, bottom, left, right }\n public get planes(): Float32Array { return this._planeData; }\n\n // uniform vec3 u_frustum; // { near, far, type }\n public get frustum(): Float32Array { return this._frustumData; }\n\n public get nearPlane(): number { return this._frustumData[FrustumData.kNear]; }\n public get farPlane(): number { return this._frustumData[FrustumData.kFar]; }\n public get type(): FrustumUniformType { return this.frustum[FrustumData.kType] as FrustumUniformType; }\n public get is2d(): boolean { return FrustumUniformType.TwoDee === this.type; }\n public get planFraction(): number { return this._planFraction; }\n\n // uniform vec2 u_logZ where x = 1/near and y = log(far/near)\n public get logZ(): Float32Array { return this._logZData; }\n\n public changeFrustum(newFrustum: Frustum, newFraction: number, is3d: boolean): void {\n if (newFraction === this._planFraction && is3d !== this.is2d && newFrustum.equals(this.planFrustum))\n return;\n\n desync(this);\n\n newFrustum.clone(this.planFrustum);\n\n const farLowerLeft = newFrustum.getCorner(Npc.LeftBottomRear);\n const farLowerRight = newFrustum.getCorner(Npc.RightBottomRear);\n const farUpperLeft = newFrustum.getCorner(Npc.LeftTopRear);\n const farUpperRight = newFrustum.getCorner(Npc.RightTopRear);\n const nearLowerLeft = newFrustum.getCorner(Npc.LeftBottomFront);\n const nearLowerRight = newFrustum.getCorner(Npc.RightBottomFront);\n const nearUpperLeft = newFrustum.getCorner(Npc.LeftTopFront);\n const nearUpperRight = newFrustum.getCorner(Npc.RightTopFront);\n\n const nearCenter = nearLowerLeft.interpolate(0.5, nearUpperRight, this._scratch.point3d);\n\n const viewX = normalizedDifference(nearLowerRight, nearLowerLeft, this._scratch.viewX);\n const viewY = normalizedDifference(nearUpperLeft, nearLowerLeft, this._scratch.viewY);\n const viewZ = expectDefined(viewX.crossProduct(viewY, this._scratch.viewZ).normalize());\n\n this._planFraction = newFraction;\n\n if (!is3d || newFraction > 0.999) { // ortho or 2d\n const halfWidth = Vector3d.createStartEnd(farLowerRight, farLowerLeft, this._scratch.vec3d).magnitude() * 0.5;\n const halfHeight = Vector3d.createStartEnd(farLowerRight, farUpperRight).magnitude() * 0.5;\n const depth = Vector3d.createStartEnd(farLowerLeft, nearLowerLeft, this._scratch.vec3d).magnitude();\n\n lookIn(nearCenter, viewX, viewY, viewZ, this.viewMatrix);\n ortho(-halfWidth, halfWidth, -halfHeight, halfHeight, 0, depth, this.projectionMatrix);\n\n this._nearPlaneCenter.setFrom(nearLowerLeft);\n this._nearPlaneCenter.interpolate(0.5, nearUpperRight, this._nearPlaneCenter);\n\n this.setPlanes(halfHeight, -halfHeight, -halfWidth, halfWidth);\n this.setFrustum(0, depth, is3d ? FrustumUniformType.Orthographic : FrustumUniformType.TwoDee);\n } else { // perspective\n const scale = 1.0 / (1.0 - newFraction);\n const zVec = Vector3d.createStartEnd(farLowerLeft, nearLowerLeft, this._scratch.vec3d);\n const cameraPosition = fromSumOf(farLowerLeft, zVec, scale, this._scratch.point3d);\n\n const frustumLeft = dotDifference(farLowerLeft, cameraPosition, viewX) * newFraction;\n const frustumRight = dotDifference(farLowerRight, cameraPosition, viewX) * newFraction;\n const frustumBottom = dotDifference(farLowerLeft, cameraPosition, viewY) * newFraction;\n const frustumTop = dotDifference(farUpperLeft, cameraPosition, viewY) * newFraction;\n const frustumFront = -dotDifference(nearLowerLeft, cameraPosition, viewZ);\n const frustumBack = -dotDifference(farLowerLeft, cameraPosition, viewZ);\n\n lookIn(cameraPosition, viewX, viewY, viewZ, this.viewMatrix);\n frustum(frustumLeft, frustumRight, frustumBottom, frustumTop, frustumFront, frustumBack, this.projectionMatrix);\n\n IModelFrameLifecycle.onChangeCameraView.raiseEvent({\n cameraPosition,\n viewX,\n viewY,\n viewZ,\n });\n IModelFrameLifecycle.onChangeCameraFrustum.raiseEvent({\n type: FrustumUniformType.Perspective,\n left: frustumLeft,\n right: frustumRight,\n bottom: frustumBottom,\n top: frustumTop,\n front: frustumFront,\n back: frustumBack,\n });\n\n this._nearPlaneCenter.setFrom(nearLowerLeft);\n this._nearPlaneCenter.interpolate(0.5, nearUpperRight, this._nearPlaneCenter);\n\n this.setPlanes(frustumTop, frustumBottom, frustumLeft, frustumRight);\n this.setFrustum(frustumFront, frustumBack, FrustumUniformType.Perspective);\n }\n\n this.viewMatrix.matrix.inverseState = InverseMatrixState.unknown;\n\n this.viewMatrix.matrix.multiplyVector(this._worldUpVector, this._viewUpVector);\n this._viewUpVector.normalizeInPlace();\n this._viewUpVector32[0] = this._viewUpVector.x;\n this._viewUpVector32[1] = this._viewUpVector.y;\n this._viewUpVector32[2] = this._viewUpVector.z;\n\n this.projectionMatrix32.initFromMatrix4d(this.projectionMatrix);\n }\n\n public changeProjectionMatrix(newMatrix: Matrix4d): void {\n desync(this);\n this.projectionMatrix.setFrom(newMatrix);\n this.projectionMatrix32.initFromMatrix4d(this.projectionMatrix);\n }\n\n protected setPlanes(top: number, bottom: number, left: number, right: number): void {\n this._planeData[Plane.kTop] = top;\n this._planeData[Plane.kBottom] = bottom;\n this._planeData[Plane.kLeft] = left;\n this._planeData[Plane.kRight] = right;\n }\n\n protected setFrustum(nearPlane: number, farPlane: number, type: FrustumUniformType): void {\n this._frustumData[FrustumData.kNear] = nearPlane;\n this._frustumData[FrustumData.kFar] = farPlane;\n this._frustumData[FrustumData.kType] = type as number;\n\n // If nearPlane is zero, we don't have a camera (or got very unlucky); in that case shader will compute linear depth.\n this._logZData[0] = 0 !== nearPlane ? 1 / nearPlane : 0;\n this._logZData[1] = 0 !== nearPlane ? Math.log(farPlane / nearPlane) : farPlane;\n }\n}\n\nfunction normalizedDifference(p0: Point3d, p1: Point3d, out?: Vector3d): Vector3d {\n const result = undefined !== out ? out : new Vector3d();\n result.x = p0.x - p1.x;\n result.y = p0.y - p1.y;\n result.z = p0.z - p1.z;\n result.normalizeInPlace();\n return result;\n}\n\n/** @internal */\nexport function fromSumOf(p: Point3d, v: Vector3d, scale: number, out?: Point3d) {\n const result = undefined !== out ? out : new Point3d();\n result.x = p.x + v.x * scale;\n result.y = p.y + v.y * scale;\n result.z = p.z + v.z * scale;\n return result;\n}\n\nfunction dotDifference(pt: Point3d, origin: Point3d, vec: Vector3d): number {\n return (pt.x - origin.x) * vec.x + (pt.y - origin.y) * vec.y + (pt.z - origin.z) * vec.z;\n}\n\nfunction lookIn(eye: Point3d, viewX: Vector3d, viewY: Vector3d, viewZ: Vector3d, result: Transform) {\n const rot = result.matrix.coffs;\n rot[0] = viewX.x;\n rot[1] = viewX.y;\n rot[2] = viewX.z;\n rot[3] = viewY.x;\n rot[4] = viewY.y;\n rot[5] = viewY.z;\n rot[6] = viewZ.x;\n rot[7] = viewZ.y;\n rot[8] = viewZ.z;\n\n result.origin.x = -viewX.dotProduct(eye);\n result.origin.y = -viewY.dotProduct(eye);\n result.origin.z = -viewZ.dotProduct(eye);\n}\n\nfunction ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4d) {\n Matrix4d.createRowValues(\n 2.0 / (right - left), 0.0, 0.0, -(right + left) / (right - left),\n 0.0, 2.0 / (top - bottom), 0.0, -(top + bottom) / (top - bottom),\n 0.0, 0.0, -2.0 / (far - near), -(far + near) / (far - near),\n 0.0, 0.0, 0.0, 1.0,\n result);\n}\n\nfunction frustum(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4d) {\n Matrix4d.createRowValues(\n (2.0 * near) / (right - left), 0.0, (right + left) / (right - left), 0.0,\n 0.0, (2.0 * near) / (top - bottom), (top + bottom) / (top - bottom), 0.0,\n 0.0, 0.0, -(far + near) / (far - near), -(2.0 * far * near) / (far - near),\n 0.0, 0.0, -1.0, 0.0,\n result);\n}\n"]}
@@ -1,7 +1,6 @@
1
1
  /** @packageDocumentation
2
2
  * @module WebGL
3
3
  */
4
- import { ContourDisplay } from "@itwin/core-common";
5
4
  import { SceneContext } from "../../../ViewContext";
6
5
  import { ViewRect } from "../../../common/ViewRect";
7
6
  import { Pixel } from "../../../render/Pixel";
@@ -19,12 +18,6 @@ import { ShaderProgramExecutor } from "./ShaderProgram";
19
18
  import { EyeDomeLighting } from "./EDL";
20
19
  export declare function collectTextureStatistics(texture: TextureHandle | undefined, stats: RenderMemory.Statistics): void;
21
20
  export declare function collectGeometryStatistics(geom: CachedGeometry | undefined, stats: RenderMemory.Statistics): void;
22
- interface ContourPixels {
23
- display: ContourDisplay;
24
- data: Uint32Array;
25
- zLow: number;
26
- zHigh: number;
27
- }
28
21
  /** Orchestrates rendering of the scene on behalf of a Target.
29
22
  * This base class exists only so we don't have to export all the types of the shared Compositor members like Textures, FrameBuffers, etc.
30
23
  * @internal
@@ -41,7 +34,6 @@ export declare abstract class SceneCompositor implements WebGLDisposable, Render
41
34
  abstract drawForReadPixels(_commands: RenderCommands, sceneOverlays: GraphicList, worldOverlayDecorations: GraphicList | undefined, viewOverlayDecorations: GraphicList | undefined): void;
42
35
  abstract readPixels(rect: ViewRect, selector: Pixel.Selector): Pixel.Buffer | undefined;
43
36
  abstract readDepthAndOrder(rect: ViewRect): Uint8Array | undefined;
44
- abstract readContours(rect: ViewRect): ContourPixels | undefined;
45
37
  abstract readFeatureIds(rect: ViewRect): Uint8Array | undefined;
46
38
  abstract updateSolarShadows(context: SceneContext | undefined): void;
47
39
  abstract drawPrimitive(primitive: Primitive, exec: ShaderProgramExecutor, outputsToPick: boolean): void;
@@ -56,5 +48,4 @@ export declare abstract class SceneCompositor implements WebGLDisposable, Render
56
48
  static create(target: Target): SceneCompositor;
57
49
  abstract collectStatistics(stats: RenderMemory.Statistics): void;
58
50
  }
59
- export {};
60
51
  //# sourceMappingURL=SceneCompositor.d.ts.map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