@itwin/core-common 5.1.0-dev.40 → 5.1.0-dev.41

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 (74) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/lib/cjs/ClipStyle.d.ts +1 -1
  3. package/lib/cjs/ClipStyle.d.ts.map +1 -1
  4. package/lib/cjs/ClipStyle.js.map +1 -1
  5. package/lib/cjs/ConcurrentQuery.d.ts +3 -3
  6. package/lib/cjs/ConcurrentQuery.js +1 -1
  7. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  8. package/lib/cjs/EntityProps.d.ts +6 -6
  9. package/lib/cjs/EntityProps.js +2 -2
  10. package/lib/cjs/EntityProps.js.map +1 -1
  11. package/lib/cjs/Fonts.d.ts +2 -2
  12. package/lib/cjs/Fonts.js +1 -1
  13. package/lib/cjs/Fonts.js.map +1 -1
  14. package/lib/cjs/GeoCoordinateServices.d.ts +1 -1
  15. package/lib/cjs/GeoCoordinateServices.js +1 -1
  16. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  17. package/lib/cjs/IModel.d.ts +3 -3
  18. package/lib/cjs/IModel.js.map +1 -1
  19. package/lib/cjs/MassProperties.d.ts +2 -2
  20. package/lib/cjs/MassProperties.js.map +1 -1
  21. package/lib/cjs/MaterialProps.d.ts +1 -1
  22. package/lib/cjs/MaterialProps.js.map +1 -1
  23. package/lib/cjs/RenderTexture.d.ts +1 -1
  24. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  25. package/lib/cjs/RenderTexture.js.map +1 -1
  26. package/lib/cjs/TerrainSettings.d.ts +1 -1
  27. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  28. package/lib/cjs/TerrainSettings.js.map +1 -1
  29. package/lib/cjs/internal/BackendTypes.d.ts +1 -1
  30. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -1
  31. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  32. package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts +4 -4
  33. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  34. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  35. package/lib/cjs/tile/TileMetadata.d.ts +1 -1
  36. package/lib/cjs/tile/TileMetadata.js +1 -1
  37. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  38. package/lib/esm/ClipStyle.d.ts +1 -1
  39. package/lib/esm/ClipStyle.d.ts.map +1 -1
  40. package/lib/esm/ClipStyle.js.map +1 -1
  41. package/lib/esm/ConcurrentQuery.d.ts +3 -3
  42. package/lib/esm/ConcurrentQuery.js +1 -1
  43. package/lib/esm/ConcurrentQuery.js.map +1 -1
  44. package/lib/esm/EntityProps.d.ts +6 -6
  45. package/lib/esm/EntityProps.js +2 -2
  46. package/lib/esm/EntityProps.js.map +1 -1
  47. package/lib/esm/Fonts.d.ts +2 -2
  48. package/lib/esm/Fonts.js +1 -1
  49. package/lib/esm/Fonts.js.map +1 -1
  50. package/lib/esm/GeoCoordinateServices.d.ts +1 -1
  51. package/lib/esm/GeoCoordinateServices.js +1 -1
  52. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  53. package/lib/esm/IModel.d.ts +3 -3
  54. package/lib/esm/IModel.js.map +1 -1
  55. package/lib/esm/MassProperties.d.ts +2 -2
  56. package/lib/esm/MassProperties.js.map +1 -1
  57. package/lib/esm/MaterialProps.d.ts +1 -1
  58. package/lib/esm/MaterialProps.js.map +1 -1
  59. package/lib/esm/RenderTexture.d.ts +1 -1
  60. package/lib/esm/RenderTexture.d.ts.map +1 -1
  61. package/lib/esm/RenderTexture.js.map +1 -1
  62. package/lib/esm/TerrainSettings.d.ts +1 -1
  63. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  64. package/lib/esm/TerrainSettings.js.map +1 -1
  65. package/lib/esm/internal/BackendTypes.d.ts +1 -1
  66. package/lib/esm/internal/BackendTypes.d.ts.map +1 -1
  67. package/lib/esm/internal/BackendTypes.js.map +1 -1
  68. package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts +4 -4
  69. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  70. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  71. package/lib/esm/tile/TileMetadata.d.ts +1 -1
  72. package/lib/esm/tile/TileMetadata.js +1 -1
  73. package/lib/esm/tile/TileMetadata.js.map +1 -1
  74. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,QAkBX;AAlBD,WAAY,QAAQ;IAClB;;;;OAIG;IACH,+CAAY,CAAA;IACZ;;;;OAIG;IACH,qCAAO,CAAA;IACP;;;OAGG;IACH,qCAAO,CAAA;AACT,CAAC,EAlBW,QAAQ,wBAAR,QAAQ,QAkBnB;AAyED;;;;;;;GAOG;AACH,MAAa,OAAO;IACF,KAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;IACrD,YAAY,KAAoB;QAC9B,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,iFAAiF;IAC1E,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE;gBAC/C,OAAO,IAAI,CAAC;QAEhB,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAzBD,0BAyBC","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 Symbology\n */\n\n/** The [FontFile]($backend) encodings understood by iTwin.js.\n * @see [this article]($docs/learning/backend/Fonts.md) to learn more about fonts in iModels.\n * @public\n * @extensions\n */\nexport enum FontType {\n /** [OpenType](https://en.wikipedia.org/wiki/OpenType) format, derived from and compatible with the earlier [TrueType](https://en.wikipedia.org/wiki/TrueType) format.\n * The vast majority of modern, scalable, aesthetically-pleasing fonts are delivered in this format.\n * OpenType files typically use one of the following suffixes: .ttf, .ttc, .otf, and .otc.\n * @see [FontFile.createFromTrueTypeFileName]($backend) to work with font files in this format.\n */\n TrueType = 1,\n /** [RSC](https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-FC78484C-E42F-30BF-BF68-2B2C025AE040.html) is a simple font format\n * originating in [MicroStation](https://en.wikipedia.org/wiki/MicroStation). In MicroStation, they are defined in \"resource files\" with a \".rsc\" suffix.\n * In iModels, they are encoded in a binary format. Currently, no APIs exist to convert to this binary format, but some [connectors]($docs/learning/imodel-connectors.md) can\n * perform the conversion.\n */\n Rsc = 2,\n /** [SHX](https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-DE941DB5-7044-433C-AA68-2A9AE98A5713) is a simple font format originating in\n * [AutoCAD](https://en.wikipedia.org/wiki/AutoCAD). SHX fonts are generally distributed as files with a \".shx\" suffix.\n * @see [FontFile.createFromShxFontBlob]($backend) to work with font files in this format.\n */\n Shx = 3,\n}\n\n/** An unsigned integer uniquely identifying a [font family]($docs/learning/backend/Fonts.md) in the context of an [[IModel]].\n * The iModel stores a mapping between `FontId`s and [[FontFamilyDescriptor]]s.\n * [[TextString]]s refer to fonts by the their `FontId`s.\n * A font Id of zero represents an invalid/non-existent font.\n * @see [IModelDbFonts]($backend) to work with font Ids.\n * @public\n * @extensions\n */\nexport type FontId = number;\n\n/** Uniquely describes one or more [[FontFace]]s sharing the same name and type comprising a single [font family]($docs/learning/backend/Fonts.md).\n * @public\n */\nexport interface FontFamilyDescriptor {\n /** The encoding in which the font family's faces are stored. */\n type: FontType;\n /** The name of the family. */\n name: string;\n}\n\n/** A [[FontFamilyDescriptor]] in which the [[FontType]] is optional, used when querying [[FontId]]s via [IModelDbFonts.findId]($backend).\n * If a font type is provided, this selector exactly identifies a unique font family, just like [[FontFamilyDescriptor]] does.\n * If the type is omitted, then the selector refers to the first font family that matches the specified [[name]]. If multiple families\n * with the same name exist, then a TrueType font will be preferred over a RSC font, and a RSC font preferred over an SHX font.\n * @beta\n */\nexport interface FontFamilySelector {\n /** The encoding in which the font family's faces are stored. */\n type?: FontType;\n /** The name of the family. */\n name: string;\n}\n\n/** Represents a [[FontFamilyDescriptor]] stored in an iModel with a unique numeric Id.\n * @public\n */\nexport interface FontProps extends FontFamilyDescriptor {\n /** An integer that uniquely identifies this font family in the context of the iModel in which it is stored. */\n id: FontId;\n}\n\n/** A specific variation of the glyphs defined by a [font family]($docs/learning/backend/Fonts.md).\n * Each face can be italicized, bolded, both, or neither.\n * Font faces are stored in [FontFile]($backend)s.\n * @beta\n */\nexport interface FontFace {\n /** The name of the font family to which this face belongs. */\n familyName: string;\n isBold: boolean;\n isItalic: boolean;\n}\n\n/** Information about the encoding of a [[FontType.Rsc]] [FontFile]($backend), used when embedding such a font into an iModel.\n * Currently, no public APIs exist to create such fonts.\n * @alpha\n */\nexport interface RscFontEncodingProps {\n codePage?: number;\n degree?: number;\n plusMinus?: number;\n diameter?: number;\n}\n\n/** The properties of a FontMap\n * @public\n * @extensions\n * @deprecated in 5.0.0. Use [IModelDb.fonts]($backend)\n */\nexport interface FontMapProps { fonts: FontProps[] }\n\n/**\n * A FontMap holds the set of font names available in an iModel.\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\n * This class maps FontIds to FontProps.\n * @note This API has never worked properly. Don't use it. Use [IModelDb.fonts]($backend) instead.\n * @public\n * @deprecated in 5.0.0. Use [IModelDb.fonts]($backend) instead.\n */\nexport class FontMap {\n public readonly fonts = new Map<FontId, FontProps>();\n constructor(props?: FontMapProps) { // eslint-disable-line @typescript-eslint/no-deprecated\n if (undefined !== props)\n this.addFonts(props.fonts);\n }\n public addFonts(fonts: FontProps[]) {\n fonts.forEach((font) => this.fonts.set(font.id, font));\n }\n public toJSON(): FontMapProps { // eslint-disable-line @typescript-eslint/no-deprecated\n const fonts: FontProps[] = [];\n this.fonts.forEach((font) => fonts.push(font));\n return { fonts };\n }\n /** look up a font by case insensitive name or number and return its FontProps */\n public getFont(arg: string | FontId): FontProps | undefined {\n if (typeof arg === \"number\")\n return this.fonts.get(arg);\n\n for (const font of this.fonts.values())\n if (font.name.toLowerCase() === arg.toLowerCase())\n return font;\n\n return undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,QAkBX;AAlBD,WAAY,QAAQ;IAClB;;;;OAIG;IACH,+CAAY,CAAA;IACZ;;;;OAIG;IACH,qCAAO,CAAA;IACP;;;OAGG;IACH,qCAAO,CAAA;AACT,CAAC,EAlBW,QAAQ,wBAAR,QAAQ,QAkBnB;AAyED;;;;;;;GAOG;AACH,MAAa,OAAO;IACF,KAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;IACrD,YAAY,KAAoB;QAC9B,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,iFAAiF;IAC1E,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE;gBAC/C,OAAO,IAAI,CAAC;QAEhB,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAzBD,0BAyBC","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 Symbology\n */\n\n/** The [FontFile]($backend) encodings understood by iTwin.js.\n * @see [this article]($docs/learning/backend/Fonts.md) to learn more about fonts in iModels.\n * @public\n * @extensions\n */\nexport enum FontType {\n /** [OpenType](https://en.wikipedia.org/wiki/OpenType) format, derived from and compatible with the earlier [TrueType](https://en.wikipedia.org/wiki/TrueType) format.\n * The vast majority of modern, scalable, aesthetically-pleasing fonts are delivered in this format.\n * OpenType files typically use one of the following suffixes: .ttf, .ttc, .otf, and .otc.\n * @see [FontFile.createFromTrueTypeFileName]($backend) to work with font files in this format.\n */\n TrueType = 1,\n /** [RSC](https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-FC78484C-E42F-30BF-BF68-2B2C025AE040.html) is a simple font format\n * originating in [MicroStation](https://en.wikipedia.org/wiki/MicroStation). In MicroStation, they are defined in \"resource files\" with a \".rsc\" suffix.\n * In iModels, they are encoded in a binary format. Currently, no APIs exist to convert to this binary format, but some [connectors]($docs/learning/imodel-connectors.md) can\n * perform the conversion.\n */\n Rsc = 2,\n /** [SHX](https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-DE941DB5-7044-433C-AA68-2A9AE98A5713) is a simple font format originating in\n * [AutoCAD](https://en.wikipedia.org/wiki/AutoCAD). SHX fonts are generally distributed as files with a \".shx\" suffix.\n * @see [FontFile.createFromShxFontBlob]($backend) to work with font files in this format.\n */\n Shx = 3,\n}\n\n/** An unsigned integer uniquely identifying a [font family]($docs/learning/backend/Fonts.md) in the context of an [[IModel]].\n * The iModel stores a mapping between `FontId`s and [[FontFamilyDescriptor]]s.\n * [[TextString]]s refer to fonts by the their `FontId`s.\n * A font Id of zero represents an invalid/non-existent font.\n * @see [IModelDbFonts]($backend) to work with font Ids.\n * @public\n * @extensions\n */\nexport type FontId = number;\n\n/** Uniquely describes one or more [[FontFace]]s sharing the same name and type comprising a single [font family]($docs/learning/backend/Fonts.md).\n * @public\n */\nexport interface FontFamilyDescriptor {\n /** The encoding in which the font family's faces are stored. */\n type: FontType;\n /** The name of the family. */\n name: string;\n}\n\n/** A [[FontFamilyDescriptor]] in which the [[FontType]] is optional, used when querying [[FontId]]s via [IModelDbFonts.findId]($backend).\n * If a font type is provided, this selector exactly identifies a unique font family, just like [[FontFamilyDescriptor]] does.\n * If the type is omitted, then the selector refers to the first font family that matches the specified [[name]]. If multiple families\n * with the same name exist, then a TrueType font will be preferred over a RSC font, and a RSC font preferred over an SHX font.\n * @beta\n */\nexport interface FontFamilySelector {\n /** The encoding in which the font family's faces are stored. */\n type?: FontType;\n /** The name of the family. */\n name: string;\n}\n\n/** Represents a [[FontFamilyDescriptor]] stored in an iModel with a unique numeric Id.\n * @public\n */\nexport interface FontProps extends FontFamilyDescriptor {\n /** An integer that uniquely identifies this font family in the context of the iModel in which it is stored. */\n id: FontId;\n}\n\n/** A specific variation of the glyphs defined by a [font family]($docs/learning/backend/Fonts.md).\n * Each face can be italicized, bolded, both, or neither.\n * Font faces are stored in [FontFile]($backend)s.\n * @beta\n */\nexport interface FontFace {\n /** The name of the font family to which this face belongs. */\n familyName: string;\n isBold: boolean;\n isItalic: boolean;\n}\n\n/** Information about the encoding of a [[FontType.Rsc]] [FontFile]($backend), used when embedding such a font into an iModel.\n * Currently, no public APIs exist to create such fonts.\n * @alpha\n */\nexport interface RscFontEncodingProps {\n codePage?: number;\n degree?: number;\n plusMinus?: number;\n diameter?: number;\n}\n\n/** The properties of a FontMap\n * @public\n * @extensions\n * @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [IModelDb.fonts]($backend)\n */\nexport interface FontMapProps { fonts: FontProps[] }\n\n/**\n * A FontMap holds the set of font names available in an iModel.\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\n * This class maps FontIds to FontProps.\n * @note This API has never worked properly. Don't use it. Use [IModelDb.fonts]($backend) instead.\n * @public\n * @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [IModelDb.fonts]($backend) instead.\n */\nexport class FontMap {\n public readonly fonts = new Map<FontId, FontProps>();\n constructor(props?: FontMapProps) { // eslint-disable-line @typescript-eslint/no-deprecated\n if (undefined !== props)\n this.addFonts(props.fonts);\n }\n public addFonts(fonts: FontProps[]) {\n fonts.forEach((font) => this.fonts.set(font.id, font));\n }\n public toJSON(): FontMapProps { // eslint-disable-line @typescript-eslint/no-deprecated\n const fonts: FontProps[] = [];\n this.fonts.forEach((font) => fonts.push(font));\n return { fonts };\n }\n /** look up a font by case insensitive name or number and return its FontProps */\n public getFont(arg: string | FontId): FontProps | undefined {\n if (typeof arg === \"number\")\n return this.fonts.get(arg);\n\n for (const font of this.fonts.values())\n if (font.name.toLowerCase() === arg.toLowerCase())\n return font;\n\n return undefined;\n }\n}\n"]}
@@ -51,7 +51,7 @@ export declare enum GeoCoordStatus {
51
51
  /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend
52
52
  * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).
53
53
  * At the completion of the conversion promise no coordinates should have this status.
54
- * @deprecated in 5.0. Pending is no longer returned as a status for coordinate conversions.
54
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Pending is no longer returned as a status for coordinate conversions.
55
55
  */
56
56
  Pending = -41556
57
57
  }
@@ -59,7 +59,7 @@ var GeoCoordStatus;
59
59
  /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend
60
60
  * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).
61
61
  * At the completion of the conversion promise no coordinates should have this status.
62
- * @deprecated in 5.0. Pending is no longer returned as a status for coordinate conversions.
62
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Pending is no longer returned as a status for coordinate conversions.
63
63
  */
64
64
  GeoCoordStatus[GeoCoordStatus["Pending"] = -41556] = "Pending";
65
65
  })(GeoCoordStatus || (exports.GeoCoordStatus = GeoCoordStatus = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"GeoCoordinateServices.js","sourceRoot":"","sources":["../../src/GeoCoordinateServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA+DH,sDAaC;AA1ED,qDAAqD;AAErD,sDAAuD;AAIvD;;;;;;GAMG;AACH,IAAY,cA2CX;AA3CD,WAAY,cAAc;IACxB,kDAAkD;IAClD,yDAAW,CAAA;IACX,sIAAsI;IACtI,qEAAkB,CAAA;IAClB;;;;;;;;;;OAUG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAqB,CAAA;IACrB;;;;OAIG;IACH,8FAA8B,CAAA;IAC9B,sGAAsG;IACtG,kEAAiB,CAAA;IACjB;;;;OAIG;IACH,8DAAgB,CAAA;AAClB,CAAC,EA3CW,cAAc,8BAAd,cAAc,QA2CzB;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAiB;IACrD,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D,KAAK,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,+BAAgB,CAAC,aAAa,CAAC;QACxE,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,uBAAuB,CAAC,CAAC,OAAO,+BAAgB,CAAC,uBAAuB,CAAC;QAC7F,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,yBAAyB,CAAC,CAAC,OAAO,+BAAgB,CAAC,yBAAyB,CAAC;QACjG,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,OAAO,+BAAgB,CAAC,UAAU,CAAC;QACnE,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC,CAAC,uDAAuD;QACrH;YACE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACpF,CAAC;AACH,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 iModels\n */\n\n// cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS\n\nimport { GeoServiceStatus } from \"@itwin/core-bentley\";\nimport { XYZProps } from \"@itwin/core-geometry\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\n\n/** This enumeration lists all possible status as returned from a coordinate conversion to or from a\n * [[GeographicCRS]] and either another [[GeographicCRS]] or a [[GeodeticDatum]].\n * @see [[GeoConverter]] to perform coordinate conversions.\n * @see [[PointWithStatus]] for the result of a coordinate conversion, including its status code.\n * @public\n * @extensions\n */\nexport enum GeoCoordStatus {\n /** Indicates successful coordinate conversion. */\n Success = 0,\n /** Indicates that the source or target of the conversion is not defined, usually the iModel Geographic Coordinate Reference System.*/\n NoGCSDefined = 100,\n /** This value indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.\n * This return value can often be treated as a warning in specific cases. For example, global imagery extent spans the whole globe and\n * may extend far beyond the normal area of the iModel project extents and the extent of normal use of its Geographic Coordinate Reference System.\n * In such cases this value can be considered a warning as accuracy and precision is not expected in this specific case and approximate localization\n * of global imagery or other low accuracy context data is not essential far from the project.\n * If this status is returned for high accuracy data then it indicates that either Geographic Coordinate Reference Systems were inappropriately selected\n * for the iModel or other geolocated data. If this is the case the status should be somehow reported so action\n * can be performed to verify used geolocation parameters.\n * In either case the returned coordinates are to be considered valid though they may be inaccurate or result in some unexpected distortion of graphical\n * elements.\n */\n OutOfUsefulRange = 1,\n /** Indicates a hard error where conversions were requested outside of the area of the mathematical capacity of the conversion process for either\n * Geographic Coordinate Reference Systems involved. An example could be to attempt a conversion involving a Transverse Mercator more than 60 degrees\n * East or West of the projection central meridian.\n * The values returned may or may not be valid and should be discarded.\n */\n OutOfMathematicalDomain = 2,\n /** Indicates that datum transformation between the two Geographic Coordinate Reference Systems could not be performed.\n * This error is usually the result of a datum transformation path requiring use of latitude/longitude grid shift files that could not be obtained\n * or installed. In this case the latitude/longitude transformation is bypassed but the remainder of the conversion process is completed.\n * This error can be ignored for low accuracy data but should be somehow reported so actions can be performed to provide the missing files.\n */\n NoDatumConverter = 25,\n /** Indicates that a problem occurred during vertical datum conversion. This may the result of the inability to access the\n * Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).\n * The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.\n * This status should be somehow reported so actions can be performed to provide the missing information.\n */\n VerticalDatumConvertError = 26,\n /** General inner conversion engine error. Coordinates returned are invalid and should be discarded */\n CSMapError = 4096,\n /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend\n * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).\n * At the completion of the conversion promise no coordinates should have this status.\n * @deprecated in 5.0. Pending is no longer returned as a status for coordinate conversions.\n */\n Pending = -41556,\n}\n\n/** Maps a GeoCoordStatus to the equivalent GeoServiceStatus.\n * @public\n */\nexport function mapToGeoServiceStatus(s: GeoCoordStatus): GeoServiceStatus {\n switch (s) {\n case GeoCoordStatus.Success: return GeoServiceStatus.Success;\n case GeoCoordStatus.NoGCSDefined: return GeoServiceStatus.NoGeoLocation;\n case GeoCoordStatus.OutOfUsefulRange: return GeoServiceStatus.OutOfUsefulRange;\n case GeoCoordStatus.OutOfMathematicalDomain: return GeoServiceStatus.OutOfMathematicalDomain;\n case GeoCoordStatus.NoDatumConverter: return GeoServiceStatus.NoDatumConverter;\n case GeoCoordStatus.VerticalDatumConvertError: return GeoServiceStatus.VerticalDatumConvertError;\n case GeoCoordStatus.CSMapError: return GeoServiceStatus.CSMapError;\n case GeoCoordStatus.Pending: return GeoServiceStatus.Pending; // eslint-disable-line @typescript-eslint/no-deprecated\n default:\n throw new Error(\"GeoCoordStatus -> GeoServiceStatus - Missing enum conversion\");\n }\n}\n\n/** Information required to request conversion of an array of Geographic coordinates (Longitude/Latitude) to iModel coordinates\n * @beta\n */\nexport interface IModelCoordinatesRequestProps {\n source: string;\n geoCoords: XYZProps[];\n}\n\n/** A point converted to iModel coordinates to geographic coordinates or vice-versa by a [[GeoConverter]].\n * The status [[s]] indicates the converted point [[p]]'s degree of accuracy.\n * @public\n */\nexport interface PointWithStatus {\n /** A JSON representation of the converted point. */\n p: XYZProps;\n /** A status code indicating the degree of accuracy with the point [[p]] was converted. */\n s: GeoCoordStatus;\n}\n\n/** @beta */\nexport interface IModelCoordinatesResponseProps {\n iModelCoords: PointWithStatus[];\n fromCache: number; // the number that were read from the cache rather than calculated.\n}\n\n/** Information required to request conversion of an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\n * @beta\n */\nexport interface GeoCoordinatesRequestProps {\n target: string;\n iModelCoords: XYZProps[];\n}\n\n/** Information returned from a request to convert an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\n * @beta\n */\nexport interface GeoCoordinatesResponseProps {\n geoCoords: PointWithStatus[];\n fromCache: number; // the number that were read from the cache rather than calculated.\n}\n\n/** Information required to interpret or complete a Geographic CRS in the specified format.\n * The only currently supported formats are JSON (for completion) and WKT (OGC Well Known Text)\n * @beta\n */\nexport interface GeographicCRSInterpretRequestProps {\n /** The format of the geographic CRS definition provided in the geographicCRSDef property. */\n format: \"WKT\" | \"JSON\";\n /** The geographic CRS definition in the format specified in the format property.\n * Note that when the WKT is used the WKT fragment provided can start with a COMPD_CS clause\n * which should then contain both the horizontal CRS definition as well as the vertical CRS specification.\n * WKT fragments starting with PROJCS or GEOGCS are also supported but the vertical CRS will be assigned a\n * default value.\n */\n geographicCRSDef: string;\n}\n\n/** Information returned from a request to interpret or complete a Geographic CRS\n * @beta\n */\nexport interface GeographicCRSInterpretResponseProps {\n /** The result status of the interpret operation. A value of zero indicates successful interpretation.\n * Any value other than zero is to be considered a hard error and no valid result will\n * be returned in the geographicCRS property.\n */\n status: number;\n /** The property that receives the interpreted geographic CRS if the process was successful. */\n geographicCRS?: GeographicCRSProps;\n}\n"]}
1
+ {"version":3,"file":"GeoCoordinateServices.js","sourceRoot":"","sources":["../../src/GeoCoordinateServices.ts"],"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D,CAAC,CAAC;IACpF,CAAC;AACH,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 iModels\n */\n\n// cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS\n\nimport { GeoServiceStatus } from \"@itwin/core-bentley\";\nimport { XYZProps } from \"@itwin/core-geometry\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\n\n/** This enumeration lists all possible status as returned from a coordinate conversion to or from a\n * [[GeographicCRS]] and either another [[GeographicCRS]] or a [[GeodeticDatum]].\n * @see [[GeoConverter]] to perform coordinate conversions.\n * @see [[PointWithStatus]] for the result of a coordinate conversion, including its status code.\n * @public\n * @extensions\n */\nexport enum GeoCoordStatus {\n /** Indicates successful coordinate conversion. */\n Success = 0,\n /** Indicates that the source or target of the conversion is not defined, usually the iModel Geographic Coordinate Reference System.*/\n NoGCSDefined = 100,\n /** This value indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.\n * This return value can often be treated as a warning in specific cases. For example, global imagery extent spans the whole globe and\n * may extend far beyond the normal area of the iModel project extents and the extent of normal use of its Geographic Coordinate Reference System.\n * In such cases this value can be considered a warning as accuracy and precision is not expected in this specific case and approximate localization\n * of global imagery or other low accuracy context data is not essential far from the project.\n * If this status is returned for high accuracy data then it indicates that either Geographic Coordinate Reference Systems were inappropriately selected\n * for the iModel or other geolocated data. If this is the case the status should be somehow reported so action\n * can be performed to verify used geolocation parameters.\n * In either case the returned coordinates are to be considered valid though they may be inaccurate or result in some unexpected distortion of graphical\n * elements.\n */\n OutOfUsefulRange = 1,\n /** Indicates a hard error where conversions were requested outside of the area of the mathematical capacity of the conversion process for either\n * Geographic Coordinate Reference Systems involved. An example could be to attempt a conversion involving a Transverse Mercator more than 60 degrees\n * East or West of the projection central meridian.\n * The values returned may or may not be valid and should be discarded.\n */\n OutOfMathematicalDomain = 2,\n /** Indicates that datum transformation between the two Geographic Coordinate Reference Systems could not be performed.\n * This error is usually the result of a datum transformation path requiring use of latitude/longitude grid shift files that could not be obtained\n * or installed. In this case the latitude/longitude transformation is bypassed but the remainder of the conversion process is completed.\n * This error can be ignored for low accuracy data but should be somehow reported so actions can be performed to provide the missing files.\n */\n NoDatumConverter = 25,\n /** Indicates that a problem occurred during vertical datum conversion. This may the result of the inability to access the\n * Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).\n * The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.\n * This status should be somehow reported so actions can be performed to provide the missing information.\n */\n VerticalDatumConvertError = 26,\n /** General inner conversion engine error. Coordinates returned are invalid and should be discarded */\n CSMapError = 4096,\n /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend\n * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).\n * At the completion of the conversion promise no coordinates should have this status.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Pending is no longer returned as a status for coordinate conversions.\n */\n Pending = -41556,\n}\n\n/** Maps a GeoCoordStatus to the equivalent GeoServiceStatus.\n * @public\n */\nexport function mapToGeoServiceStatus(s: GeoCoordStatus): GeoServiceStatus {\n switch (s) {\n case GeoCoordStatus.Success: return GeoServiceStatus.Success;\n case GeoCoordStatus.NoGCSDefined: return GeoServiceStatus.NoGeoLocation;\n case GeoCoordStatus.OutOfUsefulRange: return GeoServiceStatus.OutOfUsefulRange;\n case GeoCoordStatus.OutOfMathematicalDomain: return GeoServiceStatus.OutOfMathematicalDomain;\n case GeoCoordStatus.NoDatumConverter: return GeoServiceStatus.NoDatumConverter;\n case GeoCoordStatus.VerticalDatumConvertError: return GeoServiceStatus.VerticalDatumConvertError;\n case GeoCoordStatus.CSMapError: return GeoServiceStatus.CSMapError;\n case GeoCoordStatus.Pending: return GeoServiceStatus.Pending; // eslint-disable-line @typescript-eslint/no-deprecated\n default:\n throw new Error(\"GeoCoordStatus -> GeoServiceStatus - Missing enum conversion\");\n }\n}\n\n/** Information required to request conversion of an array of Geographic coordinates (Longitude/Latitude) to iModel coordinates\n * @beta\n */\nexport interface IModelCoordinatesRequestProps {\n source: string;\n geoCoords: XYZProps[];\n}\n\n/** A point converted to iModel coordinates to geographic coordinates or vice-versa by a [[GeoConverter]].\n * The status [[s]] indicates the converted point [[p]]'s degree of accuracy.\n * @public\n */\nexport interface PointWithStatus {\n /** A JSON representation of the converted point. */\n p: XYZProps;\n /** A status code indicating the degree of accuracy with the point [[p]] was converted. */\n s: GeoCoordStatus;\n}\n\n/** @beta */\nexport interface IModelCoordinatesResponseProps {\n iModelCoords: PointWithStatus[];\n fromCache: number; // the number that were read from the cache rather than calculated.\n}\n\n/** Information required to request conversion of an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\n * @beta\n */\nexport interface GeoCoordinatesRequestProps {\n target: string;\n iModelCoords: XYZProps[];\n}\n\n/** Information returned from a request to convert an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\n * @beta\n */\nexport interface GeoCoordinatesResponseProps {\n geoCoords: PointWithStatus[];\n fromCache: number; // the number that were read from the cache rather than calculated.\n}\n\n/** Information required to interpret or complete a Geographic CRS in the specified format.\n * The only currently supported formats are JSON (for completion) and WKT (OGC Well Known Text)\n * @beta\n */\nexport interface GeographicCRSInterpretRequestProps {\n /** The format of the geographic CRS definition provided in the geographicCRSDef property. */\n format: \"WKT\" | \"JSON\";\n /** The geographic CRS definition in the format specified in the format property.\n * Note that when the WKT is used the WKT fragment provided can start with a COMPD_CS clause\n * which should then contain both the horizontal CRS definition as well as the vertical CRS specification.\n * WKT fragments starting with PROJCS or GEOGCS are also supported but the vertical CRS will be assigned a\n * default value.\n */\n geographicCRSDef: string;\n}\n\n/** Information returned from a request to interpret or complete a Geographic CRS\n * @beta\n */\nexport interface GeographicCRSInterpretResponseProps {\n /** The result status of the interpret operation. A value of zero indicates successful interpretation.\n * Any value other than zero is to be considered a hard error and no valid result will\n * be returned in the geographicCRS property.\n */\n status: number;\n /** The property that receives the interpreted geographic CRS if the process was successful. */\n geographicCRS?: GeographicCRSProps;\n}\n"]}
@@ -167,15 +167,15 @@ export interface CreateSnapshotIModelProps {
167
167
  */
168
168
  export type CreateEmptySnapshotIModelProps = CreateIModelProps & CreateSnapshotIModelProps;
169
169
  /** Options that can be supplied when creating standalone iModels.
170
- * @internal
170
+ * @public
171
171
  */
172
172
  export interface CreateStandaloneIModelProps {
173
173
  /** If present, file will allow local editing, but cannot be used to create changesets */
174
174
  readonly allowEdit?: string;
175
175
  }
176
176
  /** The options that can be specified when creating an *empty* standalone iModel.
177
- * @see [standalone.createEmpty]($backend)
178
- * @internal
177
+ * @see [StandaloneDb.createEmpty]($backend)
178
+ * @public
179
179
  */
180
180
  export type CreateEmptyStandaloneIModelProps = CreateIModelProps & CreateStandaloneIModelProps;
181
181
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"IModel.js","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuI;AACvI,wDAG8B;AAE9B,0DAA0E;AAC1E,oFAAyF;AAEzF,+CAA4C;AAyM5C;;;;GAIG;AACH,MAAa,YAAY;IACvB,wCAAwC;IACxB,MAAM,CAAU;IAChC,4CAA4C;IAC5B,WAAW,CAAqB;IAChD,wFAAwF;IACxE,kBAAkB,CAAgB;IAClD,8HAA8H;IAC9G,OAAO,CAAY;IACnC,8HAA8H;IAC9G,OAAO,CAAY;IACnC,mFAAmF;IAClE,UAAU,GAAc,yBAAS,CAAC,cAAc,EAAE,CAAC;IAEpE,uFAAuF;IAChF,YAAY,KAAgB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAE5D,2FAA2F;IAC3F,YAAY,KAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,uBAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,E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AC,CAAC,CAAC,CAAC;IAErI;;;;;;OAMG;IACI,aAAa,CAAC,IAAY,EAAE,MAAgB,IAAa,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAE,CAAC,CAAC,CAAC;IAEvI;;;;;OAKG;IACI,6BAA6B,CAAC,OAAe,EAAE,MAAqB,IAAkB,OAAO,2BAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,CAAE,CAAC,CAAC,CAAC;IAElK;;;;;;OAMG;IACI,6BAA6B,CAAC,YAA0B,EAAE,MAAgB,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;;AA1SxJ,wBA2SC","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 iModels\n */\n\nimport { assert, BeEvent, GeoServiceStatus, GuidString, Id64, Id64String, IModelStatus, Mutable, OpenMode } from \"@itwin/core-bentley\";\nimport {\n Angle, AxisIndex, AxisOrder, Constant, Geometry, Matrix3d, Point3d, Range3d, Range3dProps, Transform, TransformProps, Vector3d, XYAndZ, XYZProps,\n YawPitchRollAngles, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { ChangesetIdWithIndex } from \"./ChangesetProps\";\nimport { Cartographic, CartographicProps } from \"./geometry/Cartographic\";\nimport { GeographicCRS, GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { AxisAlignedBox3d } from \"./geometry/Placement\";\nimport { IModelError } from \"./IModelError\";\nimport { ThumbnailProps } from \"./Thumbnail\";\n\n/** The properties to open a connection to an iModel for RPC operations.\n * @public\n */\nexport interface IModelRpcOpenProps {\n /** The iTwin in which the iModel exists - must be defined for briefcases that are synchronized with iModelHub. */\n readonly iTwinId?: GuidString;\n /** Guid of the iModel. */\n readonly iModelId?: GuidString;\n\n /** Id of the last Changeset that was applied to the iModel - must be defined for briefcases that are synchronized with iModelHub.\n * @note Changeset Ids are string hash values based on the content and parent.\n */\n readonly changeset?: ChangesetIdWithIndex;\n}\n\n/** The properties that identify an opened iModel for RPC operations.\n * @public\n */\nexport interface IModelRpcProps extends IModelRpcOpenProps {\n /** Unique key used for identifying the iModel between the frontend and the backend */\n readonly key: string;\n}\n\n/** Properties that position an iModel on the earth via [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\n * The origin is specified as an ECEF coordinate. The cartographicOrigin property contains the latitude, longitude and elevation above the WGS84 ellipsoid\n * of the origin property. This cartographicOrigin is offered as a convenient pre-calculated value representing the location of the ECEF origin.\n * The 3D coordinate system this class represents is positioned at specified origin and the axis positioned according to\n * the other properties.\n * If transform property is defined then it will not be computed from other properties.\n * If the xVector and yVector properties are defined (and transform is not defined) then they take precedence over the YawPitchRoll orientation property. The xVector and yVector\n * represent the direction and scale of the X and Y axes. The Z axis is always perpendicular (according to the right hand rule) to these X-Y axes.\n * The scaling in the Z direction is always unity. The scale of the X and Y axes is represented by the size of the vector length.\n * If the xVector and yVector are not present then the YawPitchRoll properties indicates the angles for all tree axes. Scaling in that case\n * is unity in all three directions.\n * Note that the present class is intended to represent geolocated 3D coordinate systems that are normally tangent to the WGS84 ellipsoid\n * possibly offset in altitude by the terrain elevation above the ellipsoid but other general 3D coordinate systems\n * can be defined.\n * @public\n * @extensions\n */\nexport interface EcefLocationProps {\n /** The Origin of an iModel on the earth in ECEF coordinates */\n readonly origin: XYZProps;\n /** The [orientation](https://en.wikipedia.org/wiki/Geographic_coordinate_conversion) of an iModel on the earth. */\n readonly orientation: YawPitchRollProps;\n /** Optional position on the earth used to establish the ECEF coordinates. */\n readonly cartographicOrigin?: CartographicProps;\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\n readonly xVector?: XYZProps;\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\n readonly yVector?: XYZProps;\n /** Optional potentially non-rigid transform defining the ECEF location.\n * @note If this property is supplied, the other properties are ignored.\n */\n readonly transform?: TransformProps;\n}\n\n/** Properties of the [Root Subject]($docs/bis/guide/references/glossary#subject-root).\n * @public\n * @extensions\n */\nexport interface RootSubjectProps {\n /** The name of the root subject. */\n readonly name: string;\n /** Description of the root subject (optional). */\n readonly description?: string;\n}\n\n/** Properties of an iModel that are always held in memory whenever one is opened, both on the frontend and on the backend .\n * @public\n */\nexport interface IModelProps {\n /** The name and description of the root subject of this iModel */\n readonly rootSubject: RootSubjectProps;\n /** The volume of the entire project, in spatial coordinates */\n readonly projectExtents?: Range3dProps;\n /** An offset to be applied to all spatial coordinates. This is normally used to transform spatial coordinates into the Cartesian coordinate system of a Geographic Coordinate System. */\n readonly globalOrigin?: XYZProps;\n /** The location of the iModel in Earth Centered Earth Fixed coordinates. iModel units are always meters */\n readonly ecefLocation?: EcefLocationProps;\n /** The Geographic Coordinate Reference System indicating the projection and datum used. */\n readonly geographicCoordinateSystem?: GeographicCRSProps;\n /** The name of the iModel. */\n readonly name?: string;\n}\n\n/** The properties returned by the backend when creating a new [[IModelConnection]] from the frontend, either with Rpc or with Ipc.\n * These properties describe the iModel held on the backend for thew newly formed connection and are used to construct a new\n * [[IModelConnection]] instance on the frontend to access it.\n * @public\n */\nexport type IModelConnectionProps = IModelProps & IModelRpcProps;\n\n/** The properties that can be supplied when creating a *new* iModel.\n * @public\n */\nexport interface CreateIModelProps extends IModelProps {\n /** The GUID of new iModel. If not present, a GUID will be generated. */\n readonly guid?: GuidString;\n /** Client name for new iModel */\n readonly client?: string;\n /** Thumbnail for new iModel\n * @alpha\n */\n readonly thumbnail?: ThumbnailProps;\n}\n\n/**\n * Sqlite options.\n * @public\n */\nexport interface OpenSqliteArgs {\n /**\n * Specify timeout after which SQLite stop retrying to acquire lock to database file and throw SQLITE_BUSY error.\n * Timeout is specified in milliseconds.\n * For more information https://www.sqlite.org/c3ref/busy_timeout.html.\n * */\n readonly busyTimeout?: number;\n}\n\n/**\n * A key used to identify an opened [IModelDb]($backend) between the frontend and backend for Rpc and Ipc communications.\n * Keys must be unique - that is there can never be two IModelDbs opened with the same key at any given time.\n * If no key is supplied in a call to open an IModelDb, one is generated and returned.\n * It is only necessary to supply a key if you have some reason to assign a specific value to identify an IModelDb.\n * If you don't supply the key, you must use the returned value for Rpc and Ipc communications.\n * @public\n */\nexport interface OpenDbKey {\n readonly key?: string;\n}\n\n/** @beta TODO documentation */\nexport interface CloudContainerUri {\n readonly uriParams: string;\n}\n\n/** Options to open a [SnapshotDb]($backend).\n * @public\n */\nexport interface SnapshotOpenOptions extends OpenDbKey {\n /**\n * The \"base\" name that can be used for creating temporary files related to this Db.\n * The string should be a name related to the current Db filename using some known pattern so that all files named \"baseName*\" can be deleted externally during cleanup.\n * It must be the name of a file (that may or may not exist) in a writable directory.\n * If not present, the baseName will default to the database's file name (including the path).\n * @internal\n */\n readonly tempFileBase?: string;\n}\n\n/** Options to open a [StandaloneDb]($backend) via [StandaloneDb.openFile]($backend) from the backend,\n * or [BriefcaseConnection.openStandalone]($frontend) from the frontend.\n * @public\n */\nexport type StandaloneOpenOptions = OpenDbKey;\n\n/** Options that can be supplied when creating snapshot iModels.\n * @public\n */\nexport interface CreateSnapshotIModelProps {\n /** If true, then create SQLite views for Model, Element, ElementAspect, and Relationship classes.\n * These database views can often be useful for interoperability workflows.\n */\n readonly createClassViews?: boolean;\n}\n\n/** The options that can be specified when creating an *empty* snapshot iModel.\n * @see [SnapshotDb.createEmpty]($backend)\n * @public\n */\nexport type CreateEmptySnapshotIModelProps = CreateIModelProps & CreateSnapshotIModelProps;\n\n/** Options that can be supplied when creating standalone iModels.\n * @internal\n */\nexport interface CreateStandaloneIModelProps {\n /** If present, file will allow local editing, but cannot be used to create changesets */\n readonly allowEdit?: string;\n}\n\n/** The options that can be specified when creating an *empty* standalone iModel.\n * @see [standalone.createEmpty]($backend)\n * @internal\n */\nexport type CreateEmptyStandaloneIModelProps = CreateIModelProps & CreateStandaloneIModelProps;\n\n/**\n * @public\n * @extensions\n */\nexport interface FilePropertyProps {\n readonly namespace: string;\n readonly name: string;\n id?: number | string;\n subId?: number | string;\n}\n\n/** The position and orientation of an iModel on the earth in [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\n * @note This is an immutable type - all of its properties are frozen.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n * @public\n */\nexport class EcefLocation implements EcefLocationProps {\n /** The origin of the ECEF transform. */\n public readonly origin: Point3d;\n /** The orientation of the ECEF transform */\n public readonly orientation: YawPitchRollAngles;\n /** Optional position on the earth used to establish the ECEF origin and orientation. */\n public readonly cartographicOrigin?: Cartographic;\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\n public readonly xVector?: Vector3d;\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\n public readonly yVector?: Vector3d;\n /** The transform from iModel Spatial coordinates to ECEF from this EcefLocation */\n private readonly _transform: Transform = Transform.createIdentity();\n\n /** Get the transform from iModel Spatial coordinates to ECEF from this EcefLocation */\n public getTransform(): Transform { return this._transform; }\n\n /** Construct a new EcefLocation. Once constructed, it is frozen and cannot be modified. */\n constructor(props: EcefLocationProps) {\n this.origin = Point3d.fromJSON(props.origin).freeze();\n this.orientation = YawPitchRollAngles.fromJSON(props.orientation).freeze();\n if (props.cartographicOrigin)\n this.cartographicOrigin = Cartographic.fromRadians({ longitude: props.cartographicOrigin.longitude, latitude: props.cartographicOrigin.latitude, height: props.cartographicOrigin.height }).freeze();\n if (props.xVector && props.yVector) {\n this.xVector = Vector3d.fromJSON(props.xVector).freeze();\n this.yVector = Vector3d.fromJSON(props.yVector).freeze();\n }\n if (props.transform) {\n this._transform.setFromJSON(props.transform);\n this._transform.freeze();\n } else {\n let matrix;\n if (this.xVector && this.yVector) {\n const zVector = this.xVector.crossProduct(this.yVector);\n if (zVector.normalizeInPlace())\n matrix = Matrix3d.createColumns(this.xVector, this.yVector, zVector);\n }\n if (!matrix)\n matrix = this.orientation.toMatrix3d();\n\n this._transform = Transform.createOriginAndMatrix(this.origin, matrix);\n this._transform.freeze();\n }\n }\n\n /** Returns true if this EcefLocation is not located at the center of the Earth.\n * @alpha are locations very close to the center considered valid? What are the specific criteria?\n */\n public get isValid(): boolean {\n return !this.origin.isZero;\n }\n\n /** Construct ECEF Location from cartographic origin with optional known point and angle. */\n public static createFromCartographicOrigin(origin: Cartographic, point?: Point3d, angle?: Angle) {\n const ecefOrigin = origin.toEcef();\n const deltaRadians = 10 / Constant.earthRadiusWGS84.polar;\n const northCarto = Cartographic.fromRadians({ longitude: origin.longitude, latitude: origin.latitude + deltaRadians, height: origin.height });\n const eastCarto = Cartographic.fromRadians({ longitude: origin.longitude + deltaRadians, latitude: origin.latitude, height: origin.height });\n const ecefNorth = northCarto.toEcef();\n const ecefEast = eastCarto.toEcef();\n const xVector = Vector3d.createStartEnd(ecefOrigin, ecefEast).normalize();\n const yVector = Vector3d.createStartEnd(ecefOrigin, ecefNorth).normalize();\n const matrix = Matrix3d.createRigidFromColumns(xVector!, yVector!, AxisOrder.XYZ)!;\n if (angle !== undefined) {\n const north = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, angle);\n matrix.multiplyMatrixMatrix(north, matrix);\n }\n if (point !== undefined) {\n const delta = matrix.multiplyVector(Vector3d.create(-point.x, -point.y, -point.z));\n ecefOrigin.addInPlace(delta);\n }\n\n return new EcefLocation({ origin: ecefOrigin, orientation: YawPitchRollAngles.createFromMatrix3d(matrix)!, cartographicOrigin: origin });\n }\n\n /** Construct ECEF Location from transform with optional position on the earth used to establish the ECEF origin and orientation. */\n public static createFromTransform(transform: Transform): EcefLocation {\n const ecefOrigin = transform.getOrigin();\n const angleFromInput = YawPitchRollAngles.createDegrees(0, 0, 0);\n const locationOrientationFromInputT = YawPitchRollAngles.createFromMatrix3d(transform.getMatrix(), angleFromInput);\n const transformProps = transform.toJSON();\n\n return new EcefLocation({ origin: ecefOrigin, orientation: locationOrientationFromInputT ?? angleFromInput, transform: transformProps });\n }\n\n /** Get the location center of the earth in the iModel coordinate system. */\n public get earthCenter(): Point3d {\n const matrix = this.orientation.toMatrix3d();\n return Point3d.createFrom(matrix.multiplyTransposeXYZ(-this.origin.x, -this.origin.y, -this.origin.z));\n }\n\n /** Return true if this location is equivalent to another location within a small tolerance. */\n public isAlmostEqual(other: EcefLocation): boolean {\n if (!this.origin.isAlmostEqual(other.origin) || !this.orientation.isAlmostEqual(other.orientation))\n return false;\n\n if ((this.xVector === undefined) !== (other.xVector === undefined) || (this.yVector === undefined) !== (other.yVector === undefined))\n return false;\n\n if (this.xVector !== undefined && other.xVector !== undefined && !this.xVector.isAlmostEqual(other.xVector))\n return false;\n\n if (this.yVector !== undefined && other.yVector !== undefined && !this.yVector.isAlmostEqual(other.yVector))\n return false;\n\n if (!this.getTransform().isAlmostEqual(other.getTransform()))\n return false;\n\n const thisCarto = this.cartographicOrigin;\n const otherCarto = other.cartographicOrigin;\n if (undefined === thisCarto || undefined === otherCarto)\n return undefined === thisCarto && undefined === otherCarto;\n\n return thisCarto.equalsEpsilon(otherCarto, Geometry.smallMetricDistance);\n }\n\n public toJSON(): EcefLocationProps {\n const props: Mutable<EcefLocationProps> = {\n origin: this.origin.toJSON(),\n orientation: this.orientation.toJSON(),\n transform: this.getTransform().toJSON(),\n };\n\n if (this.cartographicOrigin)\n props.cartographicOrigin = this.cartographicOrigin.toJSON();\n\n if (this.xVector)\n props.xVector = this.xVector.toJSON();\n\n if (this.yVector)\n props.yVector = this.yVector.toJSON();\n\n return props;\n }\n}\n\n/** Represents an iModel in JavaScript.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n * @public\n */\nexport abstract class IModel implements IModelProps {\n private _projectExtents?: AxisAlignedBox3d;\n private _name?: string;\n private _rootSubject?: RootSubjectProps;\n private _globalOrigin?: Point3d;\n private _ecefLocation?: EcefLocation;\n private _geographicCoordinateSystem?: GeographicCRS;\n private _iModelId?: GuidString;\n private _changeset: ChangesetIdWithIndex;\n\n /** The Id of the repository model. */\n public static readonly repositoryModelId: Id64String = \"0x1\";\n /** The Id of the root subject element. */\n public static readonly rootSubjectId: Id64String = \"0x1\";\n /** The Id of the dictionary model. */\n public static readonly dictionaryId: Id64String = \"0x10\";\n\n /** Event raised after [[name]] changes. */\n public readonly onNameChanged = new BeEvent<(previousName: string) => void>();\n /** Event raised after [[rootSubject]] changes. */\n public readonly onRootSubjectChanged = new BeEvent<(previousSubject: RootSubjectProps) => void>();\n /** Event raised after [[projectExtents]] changes. */\n public readonly onProjectExtentsChanged = new BeEvent<(previousExtents: AxisAlignedBox3d) => void>();\n /** Event raised after [[globalOrigin]] changes. */\n public readonly onGlobalOriginChanged = new BeEvent<(previousOrigin: Point3d) => void>();\n /** Event raised after [[ecefLocation]] changes. */\n public readonly onEcefLocationChanged = new BeEvent<(previousLocation: EcefLocation | undefined) => void>();\n /** Event raised after [[geographicCoordinateSystem]] changes. */\n public readonly onGeographicCoordinateSystemChanged = new BeEvent<(previousGCS: GeographicCRS | undefined) => void>();\n /** Event raised after [[changeset]] changes. */\n public readonly onChangesetChanged = new BeEvent<(previousChangeset: ChangesetIdWithIndex) => void>();\n\n /** Name of the iModel */\n public get name(): string {\n assert(this._name !== undefined);\n return this._name;\n }\n public set name(name: string) {\n if (name !== this._name) {\n const old = this._name;\n this._name = name;\n if (undefined !== old)\n this.onNameChanged.raiseEvent(old);\n }\n }\n\n /** The name and description of the root subject of this iModel */\n public get rootSubject(): RootSubjectProps {\n assert(this._rootSubject !== undefined);\n return this._rootSubject;\n }\n public set rootSubject(subject: RootSubjectProps) {\n if (undefined === this._rootSubject || this._rootSubject.name !== subject.name || this._rootSubject.description !== subject.description) {\n const old = this._rootSubject;\n this._rootSubject = subject;\n if (old)\n this.onRootSubjectChanged.raiseEvent(old);\n }\n }\n\n /** Returns `true` if this is a snapshot iModel. */\n public abstract get isSnapshot(): boolean;\n /** Returns `true` if this is a briefcase copy of an iModel that is synchronized with iModelHub. */\n public abstract get isBriefcase(): boolean;\n\n public abstract get isOpen(): boolean;\n\n /**\n * The volume, in spatial coordinates, inside which the entire project is contained.\n * @note The object returned from this method is frozen. You *must* make a copy before you do anything that might attempt to modify it.\n */\n public get projectExtents() {\n assert(undefined !== this._projectExtents);\n return this._projectExtents;\n }\n public set projectExtents(extents: AxisAlignedBox3d) {\n // Don't allow any axis of the project extents to be less than 1 meter.\n const projectExtents = extents.clone();\n projectExtents.ensureMinLengths(1.0);\n if (!this._projectExtents || !this._projectExtents.isAlmostEqual(projectExtents)) {\n const old = this._projectExtents;\n projectExtents.freeze();\n this._projectExtents = projectExtents;\n if (old)\n this.onProjectExtentsChanged.raiseEvent(old);\n }\n }\n\n /** An offset to be applied to all spatial coordinates. */\n public get globalOrigin(): Point3d {\n assert(this._globalOrigin !== undefined);\n return this._globalOrigin;\n }\n public set globalOrigin(org: Point3d) {\n if (!this._globalOrigin || !this._globalOrigin.isAlmostEqual(org)) {\n const old = this._globalOrigin;\n org.freeze();\n this._globalOrigin = org;\n if (old)\n this.onGlobalOriginChanged.raiseEvent(old);\n }\n }\n\n /** The [EcefLocation]($docs/learning/glossary#ecefLocation) of the iModel in Earth Centered Earth Fixed coordinates.\n * If the iModel property geographicCoordinateSystem is not defined then the ecefLocation provides a geolocation by defining a\n * 3D coordinate system relative to the Earth model WGS84. Refer to additional documentation for details. If the geographicCoordinateSystem\n * property is defined then the ecefLocation must be used with care. When the geographicCoordinateSystem is defined it indicates the\n * iModel cartesian space is the result of a cartographic projection. This implies a flattening of the Earth surface process that\n * results in scale, angular or area distortion. The ecefLocation is then an approximation calculated at the center of the project extent.\n * If the project is more than 2 kilometer in size, the ecefLocation may represent a poor approximation of the effective\n * cartographic projection used and a linear transformation should then be calculated at the exact origin of the data\n * it must position.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n */\n public get ecefLocation(): EcefLocation | undefined {\n return this._ecefLocation;\n }\n public set ecefLocation(ecefLocation: EcefLocation | undefined) {\n const old = this._ecefLocation;\n if (!old && !ecefLocation)\n return;\n else if (old && ecefLocation && old.isAlmostEqual(ecefLocation))\n return;\n\n this._ecefLocation = ecefLocation;\n this.onEcefLocationChanged.raiseEvent(old);\n }\n\n /** Set the [EcefLocation]($docs/learning/glossary#ecefLocation) for this iModel. */\n public setEcefLocation(ecef: EcefLocationProps): void {\n this.ecefLocation = new EcefLocation(ecef);\n }\n\n /** The geographic coordinate reference system of the iModel. */\n public get geographicCoordinateSystem(): GeographicCRS | undefined {\n return this._geographicCoordinateSystem;\n }\n public set geographicCoordinateSystem(geoCRS: GeographicCRS | undefined) {\n const old = this._geographicCoordinateSystem;\n if (!old && !geoCRS)\n return;\n else if (old && geoCRS && old.equals(geoCRS))\n return;\n\n this._geographicCoordinateSystem = geoCRS;\n this.onGeographicCoordinateSystemChanged.raiseEvent(old);\n }\n\n /** Sets the geographic coordinate reference system from GeographicCRSProps. */\n public setGeographicCoordinateSystem(geoCRS: GeographicCRSProps) {\n this.geographicCoordinateSystem = new GeographicCRS(geoCRS);\n }\n\n /** @internal */\n public getConnectionProps(): IModelConnectionProps {\n return {\n name: this.name,\n rootSubject: this.rootSubject,\n projectExtents: this.projectExtents.toJSON(),\n globalOrigin: this.globalOrigin.toJSON(),\n ecefLocation: this.ecefLocation,\n geographicCoordinateSystem: this.geographicCoordinateSystem,\n ... this._getRpcProps(),\n };\n }\n\n /** Convert this iModel to a JSON representation. */\n public toJSON(): IModelConnectionProps {\n return this.getConnectionProps();\n }\n\n /** A key used to identify this iModel in RPC calls from frontend to backend.\n * @internal\n */\n protected _fileKey: string;\n /** Get the key that was used to open this iModel. This is the value used for Rpc and Ipc communications. */\n public get key(): string { return this._fileKey; }\n\n /** @internal */\n protected _iTwinId?: GuidString;\n /** The Guid that identifies the iTwin that owns this iModel. */\n public get iTwinId(): GuidString | undefined { return this._iTwinId; }\n\n /** The Guid that identifies this iModel. */\n public get iModelId(): GuidString | undefined { return this._iModelId; }\n\n /** @public */\n public get changeset(): ChangesetIdWithIndex {\n return { ...this._changeset };\n }\n public set changeset(changeset: ChangesetIdWithIndex) {\n const prev = this._changeset;\n if (prev.id !== changeset.id || prev.index !== changeset.index) {\n this._changeset = { id: changeset.id, index: changeset.index };\n this.onChangesetChanged.raiseEvent(prev);\n }\n }\n\n protected _openMode = OpenMode.Readonly;\n /** The [[OpenMode]] used for this IModel. */\n public get openMode(): OpenMode { return this._openMode; }\n\n /** Return a token for RPC operations.\n * @throws IModelError if the iModel is not open.\n */\n public getRpcProps(): IModelRpcProps {\n if (!this.isOpen)\n throw new IModelError(IModelStatus.BadRequest, \"IModel is not open for rpc\");\n\n return this._getRpcProps();\n }\n\n /** Returns the iModel's RPC properties.\n * @note It is an error to attempt to use these properties as a token for RPC operations if the iModel is not open.\n * @internal\n */\n protected _getRpcProps(): IModelRpcProps {\n return {\n key: this._fileKey,\n iTwinId: this.iTwinId,\n iModelId: this.iModelId,\n changeset: this.changeset,\n };\n }\n\n /** @internal */\n protected constructor(tokenProps?: IModelRpcProps) {\n this._changeset = tokenProps?.changeset ?? { id: \"\", index: 0 };\n this._fileKey = \"\";\n if (tokenProps) {\n this._fileKey = tokenProps.key;\n this._iTwinId = tokenProps.iTwinId;\n this._iModelId = tokenProps.iModelId;\n }\n }\n\n /** @internal */\n protected initialize(name: string, props: IModelProps) {\n this.name = name;\n this.rootSubject = props.rootSubject;\n this.projectExtents = Range3d.fromJSON(props.projectExtents);\n this.globalOrigin = Point3d.fromJSON(props.globalOrigin);\n\n const ecefLocation = props.ecefLocation ? new EcefLocation(props.ecefLocation) : undefined;\n this.ecefLocation = ecefLocation?.isValid ? ecefLocation : undefined;\n\n this.geographicCoordinateSystem = props.geographicCoordinateSystem ? new GeographicCRS(props.geographicCoordinateSystem) : undefined;\n }\n\n /** Get the default subCategoryId for the supplied categoryId */\n public static getDefaultSubCategoryId(categoryId: Id64String): Id64String {\n return Id64.isValid(categoryId) ? Id64.fromLocalAndBriefcaseIds(Id64.getLocalId(categoryId) + 1, Id64.getBriefcaseId(categoryId)) : Id64.invalid;\n }\n\n /** True if this iModel has an [EcefLocation]($docs/learning/glossary#ecefLocation). */\n public get isGeoLocated() { return undefined !== this._ecefLocation; }\n\n /** Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its [[IModel.ecefLocation]].\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public getEcefTransform(): Transform {\n if (undefined === this._ecefLocation)\n throw new IModelError(GeoServiceStatus.NoGeoLocation, \"iModel is not GeoLocated\");\n return this._ecefLocation.getTransform();\n }\n\n /** Convert a point in this iModel's Spatial coordinates to an ECEF point using its [[IModel.ecefLocation]].\n * @param spatial A point in the iModel's spatial coordinates\n * @param result If defined, use this for output\n * @returns A Point3d in ECEF coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public spatialToEcef(spatial: XYAndZ, result?: Point3d): Point3d { return this.getEcefTransform().multiplyPoint3d(spatial, result); }\n\n /** Convert a point in ECEF coordinates to a point in this iModel's Spatial coordinates using its [[ecefLocation]].\n * @param ecef A point in ECEF coordinates\n * @param result If defined, use this for output\n * @returns A Point3d in this iModel's spatial coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\n */\n public ecefToSpatial(ecef: XYAndZ, result?: Point3d): Point3d { return this.getEcefTransform().multiplyInversePoint3d(ecef, result)!; }\n\n /** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using its [[IModel.ecefLocation]].\n * @param spatial A point in the iModel's spatial coordinates\n * @param result If defined, use this for output\n * @returns A Cartographic location\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public spatialToCartographicFromEcef(spatial: XYAndZ, result?: Cartographic): Cartographic { return Cartographic.fromEcef(this.spatialToEcef(spatial), result)!; }\n\n /** Convert a [[Cartographic]] to a point in this iModel's Spatial coordinates using its [[IModel.ecefLocation]].\n * @param cartographic A cartographic location\n * @param result If defined, use this for output\n * @returns A point in this iModel's spatial coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\n */\n public cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d) { return this.ecefToSpatial(cartographic.toEcef(result), result); }\n}\n"]}
1
+ {"version":3,"file":"IModel.js","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuI;AACvI,wDAG8B;AAE9B,0DAA0E;AAC1E,oFAAyF;AAEzF,+CAA4C;AAyM5C;;;;GAIG;AACH,MAAa,YAAY;IACvB,wCAAwC;IACxB,MAAM,CAAU;IAChC,4CAA4C;IAC5B,WAAW,CAAqB;IAChD,wFAAwF;IACxE,kBAAkB,CAAgB;IAClD,8HAA8H;IAC9G,OAAO,CAAY;IACnC,8HAA8H;IAC9G,OAAO,CAAY;IACnC,mFAAmF;IAClE,UAAU,GAAc,yBAAS,CAAC,cAAc,EAAE,CAAC;IAEpE,uFAAuF;IAChF,YAAY,KAAgB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAE5D,2FAA2F;IAC3F,YAAY,KAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,uBAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;QACtD,IAAI,CAAC,WAAW,GAAG,kCAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,CAAC;QAC3E,IAAI,KAAK,CAAC,kBAAkB;YAC1B,IAAI,CAAC,kBAAkB,GAAG,2BAAY,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,kBAAkB,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,C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AAa,CAAC,OAAO,CAAC,EAAE,MAAM,CAAE,CAAC,CAAC,CAAC;IAElK;;;;;;OAMG;IACI,6BAA6B,CAAC,YAA0B,EAAE,MAAgB,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;;AA1SxJ,wBA2SC","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 iModels\n */\n\nimport { assert, BeEvent, GeoServiceStatus, GuidString, Id64, Id64String, IModelStatus, Mutable, OpenMode } from \"@itwin/core-bentley\";\nimport {\n Angle, AxisIndex, AxisOrder, Constant, Geometry, Matrix3d, Point3d, Range3d, Range3dProps, Transform, TransformProps, Vector3d, XYAndZ, XYZProps,\n YawPitchRollAngles, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { ChangesetIdWithIndex } from \"./ChangesetProps\";\nimport { Cartographic, CartographicProps } from \"./geometry/Cartographic\";\nimport { GeographicCRS, GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { AxisAlignedBox3d } from \"./geometry/Placement\";\nimport { IModelError } from \"./IModelError\";\nimport { ThumbnailProps } from \"./Thumbnail\";\n\n/** The properties to open a connection to an iModel for RPC operations.\n * @public\n */\nexport interface IModelRpcOpenProps {\n /** The iTwin in which the iModel exists - must be defined for briefcases that are synchronized with iModelHub. */\n readonly iTwinId?: GuidString;\n /** Guid of the iModel. */\n readonly iModelId?: GuidString;\n\n /** Id of the last Changeset that was applied to the iModel - must be defined for briefcases that are synchronized with iModelHub.\n * @note Changeset Ids are string hash values based on the content and parent.\n */\n readonly changeset?: ChangesetIdWithIndex;\n}\n\n/** The properties that identify an opened iModel for RPC operations.\n * @public\n */\nexport interface IModelRpcProps extends IModelRpcOpenProps {\n /** Unique key used for identifying the iModel between the frontend and the backend */\n readonly key: string;\n}\n\n/** Properties that position an iModel on the earth via [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\n * The origin is specified as an ECEF coordinate. The cartographicOrigin property contains the latitude, longitude and elevation above the WGS84 ellipsoid\n * of the origin property. This cartographicOrigin is offered as a convenient pre-calculated value representing the location of the ECEF origin.\n * The 3D coordinate system this class represents is positioned at specified origin and the axis positioned according to\n * the other properties.\n * If transform property is defined then it will not be computed from other properties.\n * If the xVector and yVector properties are defined (and transform is not defined) then they take precedence over the YawPitchRoll orientation property. The xVector and yVector\n * represent the direction and scale of the X and Y axes. The Z axis is always perpendicular (according to the right hand rule) to these X-Y axes.\n * The scaling in the Z direction is always unity. The scale of the X and Y axes is represented by the size of the vector length.\n * If the xVector and yVector are not present then the YawPitchRoll properties indicates the angles for all tree axes. Scaling in that case\n * is unity in all three directions.\n * Note that the present class is intended to represent geolocated 3D coordinate systems that are normally tangent to the WGS84 ellipsoid\n * possibly offset in altitude by the terrain elevation above the ellipsoid but other general 3D coordinate systems\n * can be defined.\n * @public\n * @extensions\n */\nexport interface EcefLocationProps {\n /** The Origin of an iModel on the earth in ECEF coordinates */\n readonly origin: XYZProps;\n /** The [orientation](https://en.wikipedia.org/wiki/Geographic_coordinate_conversion) of an iModel on the earth. */\n readonly orientation: YawPitchRollProps;\n /** Optional position on the earth used to establish the ECEF coordinates. */\n readonly cartographicOrigin?: CartographicProps;\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\n readonly xVector?: XYZProps;\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\n readonly yVector?: XYZProps;\n /** Optional potentially non-rigid transform defining the ECEF location.\n * @note If this property is supplied, the other properties are ignored.\n */\n readonly transform?: TransformProps;\n}\n\n/** Properties of the [Root Subject]($docs/bis/guide/references/glossary#subject-root).\n * @public\n * @extensions\n */\nexport interface RootSubjectProps {\n /** The name of the root subject. */\n readonly name: string;\n /** Description of the root subject (optional). */\n readonly description?: string;\n}\n\n/** Properties of an iModel that are always held in memory whenever one is opened, both on the frontend and on the backend .\n * @public\n */\nexport interface IModelProps {\n /** The name and description of the root subject of this iModel */\n readonly rootSubject: RootSubjectProps;\n /** The volume of the entire project, in spatial coordinates */\n readonly projectExtents?: Range3dProps;\n /** An offset to be applied to all spatial coordinates. This is normally used to transform spatial coordinates into the Cartesian coordinate system of a Geographic Coordinate System. */\n readonly globalOrigin?: XYZProps;\n /** The location of the iModel in Earth Centered Earth Fixed coordinates. iModel units are always meters */\n readonly ecefLocation?: EcefLocationProps;\n /** The Geographic Coordinate Reference System indicating the projection and datum used. */\n readonly geographicCoordinateSystem?: GeographicCRSProps;\n /** The name of the iModel. */\n readonly name?: string;\n}\n\n/** The properties returned by the backend when creating a new [[IModelConnection]] from the frontend, either with Rpc or with Ipc.\n * These properties describe the iModel held on the backend for thew newly formed connection and are used to construct a new\n * [[IModelConnection]] instance on the frontend to access it.\n * @public\n */\nexport type IModelConnectionProps = IModelProps & IModelRpcProps;\n\n/** The properties that can be supplied when creating a *new* iModel.\n * @public\n */\nexport interface CreateIModelProps extends IModelProps {\n /** The GUID of new iModel. If not present, a GUID will be generated. */\n readonly guid?: GuidString;\n /** Client name for new iModel */\n readonly client?: string;\n /** Thumbnail for new iModel\n * @alpha\n */\n readonly thumbnail?: ThumbnailProps;\n}\n\n/**\n * Sqlite options.\n * @public\n */\nexport interface OpenSqliteArgs {\n /**\n * Specify timeout after which SQLite stop retrying to acquire lock to database file and throw SQLITE_BUSY error.\n * Timeout is specified in milliseconds.\n * For more information https://www.sqlite.org/c3ref/busy_timeout.html.\n * */\n readonly busyTimeout?: number;\n}\n\n/**\n * A key used to identify an opened [IModelDb]($backend) between the frontend and backend for Rpc and Ipc communications.\n * Keys must be unique - that is there can never be two IModelDbs opened with the same key at any given time.\n * If no key is supplied in a call to open an IModelDb, one is generated and returned.\n * It is only necessary to supply a key if you have some reason to assign a specific value to identify an IModelDb.\n * If you don't supply the key, you must use the returned value for Rpc and Ipc communications.\n * @public\n */\nexport interface OpenDbKey {\n readonly key?: string;\n}\n\n/** @beta TODO documentation */\nexport interface CloudContainerUri {\n readonly uriParams: string;\n}\n\n/** Options to open a [SnapshotDb]($backend).\n * @public\n */\nexport interface SnapshotOpenOptions extends OpenDbKey {\n /**\n * The \"base\" name that can be used for creating temporary files related to this Db.\n * The string should be a name related to the current Db filename using some known pattern so that all files named \"baseName*\" can be deleted externally during cleanup.\n * It must be the name of a file (that may or may not exist) in a writable directory.\n * If not present, the baseName will default to the database's file name (including the path).\n * @internal\n */\n readonly tempFileBase?: string;\n}\n\n/** Options to open a [StandaloneDb]($backend) via [StandaloneDb.openFile]($backend) from the backend,\n * or [BriefcaseConnection.openStandalone]($frontend) from the frontend.\n * @public\n */\nexport type StandaloneOpenOptions = OpenDbKey;\n\n/** Options that can be supplied when creating snapshot iModels.\n * @public\n */\nexport interface CreateSnapshotIModelProps {\n /** If true, then create SQLite views for Model, Element, ElementAspect, and Relationship classes.\n * These database views can often be useful for interoperability workflows.\n */\n readonly createClassViews?: boolean;\n}\n\n/** The options that can be specified when creating an *empty* snapshot iModel.\n * @see [SnapshotDb.createEmpty]($backend)\n * @public\n */\nexport type CreateEmptySnapshotIModelProps = CreateIModelProps & CreateSnapshotIModelProps;\n\n/** Options that can be supplied when creating standalone iModels.\n * @public\n */\nexport interface CreateStandaloneIModelProps {\n /** If present, file will allow local editing, but cannot be used to create changesets */\n readonly allowEdit?: string;\n}\n\n/** The options that can be specified when creating an *empty* standalone iModel.\n * @see [StandaloneDb.createEmpty]($backend)\n * @public\n */\nexport type CreateEmptyStandaloneIModelProps = CreateIModelProps & CreateStandaloneIModelProps;\n\n/**\n * @public\n * @extensions\n */\nexport interface FilePropertyProps {\n readonly namespace: string;\n readonly name: string;\n id?: number | string;\n subId?: number | string;\n}\n\n/** The position and orientation of an iModel on the earth in [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\n * @note This is an immutable type - all of its properties are frozen.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n * @public\n */\nexport class EcefLocation implements EcefLocationProps {\n /** The origin of the ECEF transform. */\n public readonly origin: Point3d;\n /** The orientation of the ECEF transform */\n public readonly orientation: YawPitchRollAngles;\n /** Optional position on the earth used to establish the ECEF origin and orientation. */\n public readonly cartographicOrigin?: Cartographic;\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\n public readonly xVector?: Vector3d;\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\n public readonly yVector?: Vector3d;\n /** The transform from iModel Spatial coordinates to ECEF from this EcefLocation */\n private readonly _transform: Transform = Transform.createIdentity();\n\n /** Get the transform from iModel Spatial coordinates to ECEF from this EcefLocation */\n public getTransform(): Transform { return this._transform; }\n\n /** Construct a new EcefLocation. Once constructed, it is frozen and cannot be modified. */\n constructor(props: EcefLocationProps) {\n this.origin = Point3d.fromJSON(props.origin).freeze();\n this.orientation = YawPitchRollAngles.fromJSON(props.orientation).freeze();\n if (props.cartographicOrigin)\n this.cartographicOrigin = Cartographic.fromRadians({ longitude: props.cartographicOrigin.longitude, latitude: props.cartographicOrigin.latitude, height: props.cartographicOrigin.height }).freeze();\n if (props.xVector && props.yVector) {\n this.xVector = Vector3d.fromJSON(props.xVector).freeze();\n this.yVector = Vector3d.fromJSON(props.yVector).freeze();\n }\n if (props.transform) {\n this._transform.setFromJSON(props.transform);\n this._transform.freeze();\n } else {\n let matrix;\n if (this.xVector && this.yVector) {\n const zVector = this.xVector.crossProduct(this.yVector);\n if (zVector.normalizeInPlace())\n matrix = Matrix3d.createColumns(this.xVector, this.yVector, zVector);\n }\n if (!matrix)\n matrix = this.orientation.toMatrix3d();\n\n this._transform = Transform.createOriginAndMatrix(this.origin, matrix);\n this._transform.freeze();\n }\n }\n\n /** Returns true if this EcefLocation is not located at the center of the Earth.\n * @alpha are locations very close to the center considered valid? What are the specific criteria?\n */\n public get isValid(): boolean {\n return !this.origin.isZero;\n }\n\n /** Construct ECEF Location from cartographic origin with optional known point and angle. */\n public static createFromCartographicOrigin(origin: Cartographic, point?: Point3d, angle?: Angle) {\n const ecefOrigin = origin.toEcef();\n const deltaRadians = 10 / Constant.earthRadiusWGS84.polar;\n const northCarto = Cartographic.fromRadians({ longitude: origin.longitude, latitude: origin.latitude + deltaRadians, height: origin.height });\n const eastCarto = Cartographic.fromRadians({ longitude: origin.longitude + deltaRadians, latitude: origin.latitude, height: origin.height });\n const ecefNorth = northCarto.toEcef();\n const ecefEast = eastCarto.toEcef();\n const xVector = Vector3d.createStartEnd(ecefOrigin, ecefEast).normalize();\n const yVector = Vector3d.createStartEnd(ecefOrigin, ecefNorth).normalize();\n const matrix = Matrix3d.createRigidFromColumns(xVector!, yVector!, AxisOrder.XYZ)!;\n if (angle !== undefined) {\n const north = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, angle);\n matrix.multiplyMatrixMatrix(north, matrix);\n }\n if (point !== undefined) {\n const delta = matrix.multiplyVector(Vector3d.create(-point.x, -point.y, -point.z));\n ecefOrigin.addInPlace(delta);\n }\n\n return new EcefLocation({ origin: ecefOrigin, orientation: YawPitchRollAngles.createFromMatrix3d(matrix)!, cartographicOrigin: origin });\n }\n\n /** Construct ECEF Location from transform with optional position on the earth used to establish the ECEF origin and orientation. */\n public static createFromTransform(transform: Transform): EcefLocation {\n const ecefOrigin = transform.getOrigin();\n const angleFromInput = YawPitchRollAngles.createDegrees(0, 0, 0);\n const locationOrientationFromInputT = YawPitchRollAngles.createFromMatrix3d(transform.getMatrix(), angleFromInput);\n const transformProps = transform.toJSON();\n\n return new EcefLocation({ origin: ecefOrigin, orientation: locationOrientationFromInputT ?? angleFromInput, transform: transformProps });\n }\n\n /** Get the location center of the earth in the iModel coordinate system. */\n public get earthCenter(): Point3d {\n const matrix = this.orientation.toMatrix3d();\n return Point3d.createFrom(matrix.multiplyTransposeXYZ(-this.origin.x, -this.origin.y, -this.origin.z));\n }\n\n /** Return true if this location is equivalent to another location within a small tolerance. */\n public isAlmostEqual(other: EcefLocation): boolean {\n if (!this.origin.isAlmostEqual(other.origin) || !this.orientation.isAlmostEqual(other.orientation))\n return false;\n\n if ((this.xVector === undefined) !== (other.xVector === undefined) || (this.yVector === undefined) !== (other.yVector === undefined))\n return false;\n\n if (this.xVector !== undefined && other.xVector !== undefined && !this.xVector.isAlmostEqual(other.xVector))\n return false;\n\n if (this.yVector !== undefined && other.yVector !== undefined && !this.yVector.isAlmostEqual(other.yVector))\n return false;\n\n if (!this.getTransform().isAlmostEqual(other.getTransform()))\n return false;\n\n const thisCarto = this.cartographicOrigin;\n const otherCarto = other.cartographicOrigin;\n if (undefined === thisCarto || undefined === otherCarto)\n return undefined === thisCarto && undefined === otherCarto;\n\n return thisCarto.equalsEpsilon(otherCarto, Geometry.smallMetricDistance);\n }\n\n public toJSON(): EcefLocationProps {\n const props: Mutable<EcefLocationProps> = {\n origin: this.origin.toJSON(),\n orientation: this.orientation.toJSON(),\n transform: this.getTransform().toJSON(),\n };\n\n if (this.cartographicOrigin)\n props.cartographicOrigin = this.cartographicOrigin.toJSON();\n\n if (this.xVector)\n props.xVector = this.xVector.toJSON();\n\n if (this.yVector)\n props.yVector = this.yVector.toJSON();\n\n return props;\n }\n}\n\n/** Represents an iModel in JavaScript.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n * @public\n */\nexport abstract class IModel implements IModelProps {\n private _projectExtents?: AxisAlignedBox3d;\n private _name?: string;\n private _rootSubject?: RootSubjectProps;\n private _globalOrigin?: Point3d;\n private _ecefLocation?: EcefLocation;\n private _geographicCoordinateSystem?: GeographicCRS;\n private _iModelId?: GuidString;\n private _changeset: ChangesetIdWithIndex;\n\n /** The Id of the repository model. */\n public static readonly repositoryModelId: Id64String = \"0x1\";\n /** The Id of the root subject element. */\n public static readonly rootSubjectId: Id64String = \"0x1\";\n /** The Id of the dictionary model. */\n public static readonly dictionaryId: Id64String = \"0x10\";\n\n /** Event raised after [[name]] changes. */\n public readonly onNameChanged = new BeEvent<(previousName: string) => void>();\n /** Event raised after [[rootSubject]] changes. */\n public readonly onRootSubjectChanged = new BeEvent<(previousSubject: RootSubjectProps) => void>();\n /** Event raised after [[projectExtents]] changes. */\n public readonly onProjectExtentsChanged = new BeEvent<(previousExtents: AxisAlignedBox3d) => void>();\n /** Event raised after [[globalOrigin]] changes. */\n public readonly onGlobalOriginChanged = new BeEvent<(previousOrigin: Point3d) => void>();\n /** Event raised after [[ecefLocation]] changes. */\n public readonly onEcefLocationChanged = new BeEvent<(previousLocation: EcefLocation | undefined) => void>();\n /** Event raised after [[geographicCoordinateSystem]] changes. */\n public readonly onGeographicCoordinateSystemChanged = new BeEvent<(previousGCS: GeographicCRS | undefined) => void>();\n /** Event raised after [[changeset]] changes. */\n public readonly onChangesetChanged = new BeEvent<(previousChangeset: ChangesetIdWithIndex) => void>();\n\n /** Name of the iModel */\n public get name(): string {\n assert(this._name !== undefined);\n return this._name;\n }\n public set name(name: string) {\n if (name !== this._name) {\n const old = this._name;\n this._name = name;\n if (undefined !== old)\n this.onNameChanged.raiseEvent(old);\n }\n }\n\n /** The name and description of the root subject of this iModel */\n public get rootSubject(): RootSubjectProps {\n assert(this._rootSubject !== undefined);\n return this._rootSubject;\n }\n public set rootSubject(subject: RootSubjectProps) {\n if (undefined === this._rootSubject || this._rootSubject.name !== subject.name || this._rootSubject.description !== subject.description) {\n const old = this._rootSubject;\n this._rootSubject = subject;\n if (old)\n this.onRootSubjectChanged.raiseEvent(old);\n }\n }\n\n /** Returns `true` if this is a snapshot iModel. */\n public abstract get isSnapshot(): boolean;\n /** Returns `true` if this is a briefcase copy of an iModel that is synchronized with iModelHub. */\n public abstract get isBriefcase(): boolean;\n\n public abstract get isOpen(): boolean;\n\n /**\n * The volume, in spatial coordinates, inside which the entire project is contained.\n * @note The object returned from this method is frozen. You *must* make a copy before you do anything that might attempt to modify it.\n */\n public get projectExtents() {\n assert(undefined !== this._projectExtents);\n return this._projectExtents;\n }\n public set projectExtents(extents: AxisAlignedBox3d) {\n // Don't allow any axis of the project extents to be less than 1 meter.\n const projectExtents = extents.clone();\n projectExtents.ensureMinLengths(1.0);\n if (!this._projectExtents || !this._projectExtents.isAlmostEqual(projectExtents)) {\n const old = this._projectExtents;\n projectExtents.freeze();\n this._projectExtents = projectExtents;\n if (old)\n this.onProjectExtentsChanged.raiseEvent(old);\n }\n }\n\n /** An offset to be applied to all spatial coordinates. */\n public get globalOrigin(): Point3d {\n assert(this._globalOrigin !== undefined);\n return this._globalOrigin;\n }\n public set globalOrigin(org: Point3d) {\n if (!this._globalOrigin || !this._globalOrigin.isAlmostEqual(org)) {\n const old = this._globalOrigin;\n org.freeze();\n this._globalOrigin = org;\n if (old)\n this.onGlobalOriginChanged.raiseEvent(old);\n }\n }\n\n /** The [EcefLocation]($docs/learning/glossary#ecefLocation) of the iModel in Earth Centered Earth Fixed coordinates.\n * If the iModel property geographicCoordinateSystem is not defined then the ecefLocation provides a geolocation by defining a\n * 3D coordinate system relative to the Earth model WGS84. Refer to additional documentation for details. If the geographicCoordinateSystem\n * property is defined then the ecefLocation must be used with care. When the geographicCoordinateSystem is defined it indicates the\n * iModel cartesian space is the result of a cartographic projection. This implies a flattening of the Earth surface process that\n * results in scale, angular or area distortion. The ecefLocation is then an approximation calculated at the center of the project extent.\n * If the project is more than 2 kilometer in size, the ecefLocation may represent a poor approximation of the effective\n * cartographic projection used and a linear transformation should then be calculated at the exact origin of the data\n * it must position.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n */\n public get ecefLocation(): EcefLocation | undefined {\n return this._ecefLocation;\n }\n public set ecefLocation(ecefLocation: EcefLocation | undefined) {\n const old = this._ecefLocation;\n if (!old && !ecefLocation)\n return;\n else if (old && ecefLocation && old.isAlmostEqual(ecefLocation))\n return;\n\n this._ecefLocation = ecefLocation;\n this.onEcefLocationChanged.raiseEvent(old);\n }\n\n /** Set the [EcefLocation]($docs/learning/glossary#ecefLocation) for this iModel. */\n public setEcefLocation(ecef: EcefLocationProps): void {\n this.ecefLocation = new EcefLocation(ecef);\n }\n\n /** The geographic coordinate reference system of the iModel. */\n public get geographicCoordinateSystem(): GeographicCRS | undefined {\n return this._geographicCoordinateSystem;\n }\n public set geographicCoordinateSystem(geoCRS: GeographicCRS | undefined) {\n const old = this._geographicCoordinateSystem;\n if (!old && !geoCRS)\n return;\n else if (old && geoCRS && old.equals(geoCRS))\n return;\n\n this._geographicCoordinateSystem = geoCRS;\n this.onGeographicCoordinateSystemChanged.raiseEvent(old);\n }\n\n /** Sets the geographic coordinate reference system from GeographicCRSProps. */\n public setGeographicCoordinateSystem(geoCRS: GeographicCRSProps) {\n this.geographicCoordinateSystem = new GeographicCRS(geoCRS);\n }\n\n /** @internal */\n public getConnectionProps(): IModelConnectionProps {\n return {\n name: this.name,\n rootSubject: this.rootSubject,\n projectExtents: this.projectExtents.toJSON(),\n globalOrigin: this.globalOrigin.toJSON(),\n ecefLocation: this.ecefLocation,\n geographicCoordinateSystem: this.geographicCoordinateSystem,\n ... this._getRpcProps(),\n };\n }\n\n /** Convert this iModel to a JSON representation. */\n public toJSON(): IModelConnectionProps {\n return this.getConnectionProps();\n }\n\n /** A key used to identify this iModel in RPC calls from frontend to backend.\n * @internal\n */\n protected _fileKey: string;\n /** Get the key that was used to open this iModel. This is the value used for Rpc and Ipc communications. */\n public get key(): string { return this._fileKey; }\n\n /** @internal */\n protected _iTwinId?: GuidString;\n /** The Guid that identifies the iTwin that owns this iModel. */\n public get iTwinId(): GuidString | undefined { return this._iTwinId; }\n\n /** The Guid that identifies this iModel. */\n public get iModelId(): GuidString | undefined { return this._iModelId; }\n\n /** @public */\n public get changeset(): ChangesetIdWithIndex {\n return { ...this._changeset };\n }\n public set changeset(changeset: ChangesetIdWithIndex) {\n const prev = this._changeset;\n if (prev.id !== changeset.id || prev.index !== changeset.index) {\n this._changeset = { id: changeset.id, index: changeset.index };\n this.onChangesetChanged.raiseEvent(prev);\n }\n }\n\n protected _openMode = OpenMode.Readonly;\n /** The [[OpenMode]] used for this IModel. */\n public get openMode(): OpenMode { return this._openMode; }\n\n /** Return a token for RPC operations.\n * @throws IModelError if the iModel is not open.\n */\n public getRpcProps(): IModelRpcProps {\n if (!this.isOpen)\n throw new IModelError(IModelStatus.BadRequest, \"IModel is not open for rpc\");\n\n return this._getRpcProps();\n }\n\n /** Returns the iModel's RPC properties.\n * @note It is an error to attempt to use these properties as a token for RPC operations if the iModel is not open.\n * @internal\n */\n protected _getRpcProps(): IModelRpcProps {\n return {\n key: this._fileKey,\n iTwinId: this.iTwinId,\n iModelId: this.iModelId,\n changeset: this.changeset,\n };\n }\n\n /** @internal */\n protected constructor(tokenProps?: IModelRpcProps) {\n this._changeset = tokenProps?.changeset ?? { id: \"\", index: 0 };\n this._fileKey = \"\";\n if (tokenProps) {\n this._fileKey = tokenProps.key;\n this._iTwinId = tokenProps.iTwinId;\n this._iModelId = tokenProps.iModelId;\n }\n }\n\n /** @internal */\n protected initialize(name: string, props: IModelProps) {\n this.name = name;\n this.rootSubject = props.rootSubject;\n this.projectExtents = Range3d.fromJSON(props.projectExtents);\n this.globalOrigin = Point3d.fromJSON(props.globalOrigin);\n\n const ecefLocation = props.ecefLocation ? new EcefLocation(props.ecefLocation) : undefined;\n this.ecefLocation = ecefLocation?.isValid ? ecefLocation : undefined;\n\n this.geographicCoordinateSystem = props.geographicCoordinateSystem ? new GeographicCRS(props.geographicCoordinateSystem) : undefined;\n }\n\n /** Get the default subCategoryId for the supplied categoryId */\n public static getDefaultSubCategoryId(categoryId: Id64String): Id64String {\n return Id64.isValid(categoryId) ? Id64.fromLocalAndBriefcaseIds(Id64.getLocalId(categoryId) + 1, Id64.getBriefcaseId(categoryId)) : Id64.invalid;\n }\n\n /** True if this iModel has an [EcefLocation]($docs/learning/glossary#ecefLocation). */\n public get isGeoLocated() { return undefined !== this._ecefLocation; }\n\n /** Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its [[IModel.ecefLocation]].\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public getEcefTransform(): Transform {\n if (undefined === this._ecefLocation)\n throw new IModelError(GeoServiceStatus.NoGeoLocation, \"iModel is not GeoLocated\");\n return this._ecefLocation.getTransform();\n }\n\n /** Convert a point in this iModel's Spatial coordinates to an ECEF point using its [[IModel.ecefLocation]].\n * @param spatial A point in the iModel's spatial coordinates\n * @param result If defined, use this for output\n * @returns A Point3d in ECEF coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public spatialToEcef(spatial: XYAndZ, result?: Point3d): Point3d { return this.getEcefTransform().multiplyPoint3d(spatial, result); }\n\n /** Convert a point in ECEF coordinates to a point in this iModel's Spatial coordinates using its [[ecefLocation]].\n * @param ecef A point in ECEF coordinates\n * @param result If defined, use this for output\n * @returns A Point3d in this iModel's spatial coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\n */\n public ecefToSpatial(ecef: XYAndZ, result?: Point3d): Point3d { return this.getEcefTransform().multiplyInversePoint3d(ecef, result)!; }\n\n /** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using its [[IModel.ecefLocation]].\n * @param spatial A point in the iModel's spatial coordinates\n * @param result If defined, use this for output\n * @returns A Cartographic location\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public spatialToCartographicFromEcef(spatial: XYAndZ, result?: Cartographic): Cartographic { return Cartographic.fromEcef(this.spatialToEcef(spatial), result)!; }\n\n /** Convert a [[Cartographic]] to a point in this iModel's Spatial coordinates using its [[IModel.ecefLocation]].\n * @param cartographic A cartographic location\n * @param result If defined, use this for output\n * @returns A point in this iModel's spatial coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\n */\n public cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d) { return this.ecefToSpatial(cartographic.toEcef(result), result); }\n}\n"]}
@@ -25,7 +25,7 @@ export interface MassPropertiesRequestProps {
25
25
  }
26
26
  /** Information required to request mass properties for each element separately from the front end to the back end.
27
27
  * @public
28
- * @deprecated in 4.11 - might be removed in next major version. Use [[MassPropertiesRequestProps]].
28
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [[MassPropertiesRequestProps]].
29
29
  */
30
30
  export interface MassPropertiesPerCandidateRequestProps {
31
31
  operations: MassPropertiesOperation[];
@@ -59,7 +59,7 @@ export interface MassPropertiesResponseProps {
59
59
  }
60
60
  /** Information returned from the back end to the front end holding the result of the mass properties calculation for a single candidate.
61
61
  * @public
62
- * @deprecated in 4.11 - might be removed in next major version. Use [[MassPropertiesResponseProps]].
62
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [[MassPropertiesResponseProps]].
63
63
  */
64
64
  export interface MassPropertiesPerCandidateResponseProps extends MassPropertiesResponseProps {
65
65
  candidate: Id64String;
@@ -1 +1 @@
1
- {"version":3,"file":"MassProperties.js","sourceRoot":"","sources":["../../src/MassProperties.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;;GAGG;AACH,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,wDAAwD;IACxD,+FAAqB,CAAA;IACrB,kEAAkE;IAClE,2FAAmB,CAAA;IACnB,mDAAmD;IACnD,+FAAqB,CAAA;AACvB,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC","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 Geometry\n */\n\nimport { BentleyStatus, CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { XYZProps } from \"@itwin/core-geometry\";\n\n/** Specify whether to accumulate volumes, areas, or lengths for the supplied elements.\n * @public\n * @extensions\n */\nexport enum MassPropertiesOperation {\n /** Return lengths for open paths and planar regions. */\n AccumulateLengths = 0,\n /** Return areas and perimeters for solid and surface geometry. */\n AccumulateAreas = 1,\n /** Return volumes and areas for solid geometry. */\n AccumulateVolumes = 2,\n}\n\n/** Information required to request mass properties for elements from the front end to the back end.\n * @public\n * @extensions\n */\nexport interface MassPropertiesRequestProps {\n operation: MassPropertiesOperation;\n candidates?: Id64Array;\n}\n\n/** Information required to request mass properties for each element separately from the front end to the back end.\n * @public\n * @deprecated in 4.11 - might be removed in next major version. Use [[MassPropertiesRequestProps]].\n */\nexport interface MassPropertiesPerCandidateRequestProps {\n operations: MassPropertiesOperation[];\n candidates: CompressedId64Set;\n}\n\n/** Information returned from the back end to the front end holding the result of the mass properties calculation.\n * @public\n * @extensions\n */\nexport interface MassPropertiesResponseProps {\n /** Success if requested [[MassPropertiesOperation]] could be evaluated for the specified elements */\n status: BentleyStatus;\n /** Volume of solids when [[MassPropertiesOperation.AccumulateVolumes]] requested */\n volume?: number;\n /** Surface area of solids and surfaces when [[MassPropertiesOperation.AccumulateVolumes]] or [[MassPropertiesOperation.AccumulateAreas]] requested */\n area?: number;\n /** Perimeter of surfaces and planar regions when [[MassPropertiesOperation.AccumulateAreas]] requested */\n perimeter?: number;\n /** Length of curves or perimeter of planar regions when [[MassPropertiesOperation.AccumulateAreas]] or [[MassPropertiesOperation.AccumulateLength]] requested */\n length?: number;\n /** Centroid of geometry */\n centroid?: XYZProps;\n /** Product of inertia with respect to xy plane */\n ixy?: number;\n /** Product of inertia with respect to xz plane */\n ixz?: number;\n /** Product of inertia with respect to yz plane */\n iyz?: number;\n /** Moments of inertia */\n moments?: XYZProps;\n}\n\n/** Information returned from the back end to the front end holding the result of the mass properties calculation for a single candidate.\n * @public\n * @deprecated in 4.11 - might be removed in next major version. Use [[MassPropertiesResponseProps]].\n */\nexport interface MassPropertiesPerCandidateResponseProps extends MassPropertiesResponseProps {\n candidate: Id64String;\n}\n"]}
1
+ {"version":3,"file":"MassProperties.js","sourceRoot":"","sources":["../../src/MassProperties.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;;GAGG;AACH,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,wDAAwD;IACxD,+FAAqB,CAAA;IACrB,kEAAkE;IAClE,2FAAmB,CAAA;IACnB,mDAAmD;IACnD,+FAAqB,CAAA;AACvB,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC","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 Geometry\n */\n\nimport { BentleyStatus, CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { XYZProps } from \"@itwin/core-geometry\";\n\n/** Specify whether to accumulate volumes, areas, or lengths for the supplied elements.\n * @public\n * @extensions\n */\nexport enum MassPropertiesOperation {\n /** Return lengths for open paths and planar regions. */\n AccumulateLengths = 0,\n /** Return areas and perimeters for solid and surface geometry. */\n AccumulateAreas = 1,\n /** Return volumes and areas for solid geometry. */\n AccumulateVolumes = 2,\n}\n\n/** Information required to request mass properties for elements from the front end to the back end.\n * @public\n * @extensions\n */\nexport interface MassPropertiesRequestProps {\n operation: MassPropertiesOperation;\n candidates?: Id64Array;\n}\n\n/** Information required to request mass properties for each element separately from the front end to the back end.\n * @public\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [[MassPropertiesRequestProps]].\n */\nexport interface MassPropertiesPerCandidateRequestProps {\n operations: MassPropertiesOperation[];\n candidates: CompressedId64Set;\n}\n\n/** Information returned from the back end to the front end holding the result of the mass properties calculation.\n * @public\n * @extensions\n */\nexport interface MassPropertiesResponseProps {\n /** Success if requested [[MassPropertiesOperation]] could be evaluated for the specified elements */\n status: BentleyStatus;\n /** Volume of solids when [[MassPropertiesOperation.AccumulateVolumes]] requested */\n volume?: number;\n /** Surface area of solids and surfaces when [[MassPropertiesOperation.AccumulateVolumes]] or [[MassPropertiesOperation.AccumulateAreas]] requested */\n area?: number;\n /** Perimeter of surfaces and planar regions when [[MassPropertiesOperation.AccumulateAreas]] requested */\n perimeter?: number;\n /** Length of curves or perimeter of planar regions when [[MassPropertiesOperation.AccumulateAreas]] or [[MassPropertiesOperation.AccumulateLength]] requested */\n length?: number;\n /** Centroid of geometry */\n centroid?: XYZProps;\n /** Product of inertia with respect to xy plane */\n ixy?: number;\n /** Product of inertia with respect to xz plane */\n ixz?: number;\n /** Product of inertia with respect to yz plane */\n iyz?: number;\n /** Moments of inertia */\n moments?: XYZProps;\n}\n\n/** Information returned from the back end to the front end holding the result of the mass properties calculation for a single candidate.\n * @public\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [[MassPropertiesResponseProps]].\n */\nexport interface MassPropertiesPerCandidateResponseProps extends MassPropertiesResponseProps {\n candidate: Id64String;\n}\n"]}
@@ -52,7 +52,7 @@ export interface TextureMapProps {
52
52
  /** Weight at which to combine diffuse image and color; if undefined, defaults to 1.0 */
53
53
  pattern_weight?: number;
54
54
  /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false.
55
- * @deprecated in 4.4 - might be removed in next major version. It never functioned properly - use [[pattern_useconstantlod]] instead.
55
+ * @deprecated in 4.4 - will not be removed until after 2026-06-13. It never functioned properly - use [[pattern_useconstantlod]] instead.
56
56
  */
57
57
  pattern_useConstantLod?: boolean;
58
58
  /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false. */
@@ -1 +1 @@
1
- {"version":3,"file":"MaterialProps.js","sourceRoot":"","sources":["../../src/MaterialProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqBH;;;GAGG;AACH,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wCAAwC;IACxC,6DAAY,CAAA;IACZ,yDAAU,CAAA;IACV,mEAAe,CAAA;IACf,qDAAQ,CAAA;IACR,yDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AA4CD;;GAEG;AACH,IAAY,cASX;AATD,WAAY,cAAc;IACxB,wBAAwB;IACxB,mDAAQ,CAAA;IACR;;OAEG;IACH,yDAAgB,CAAA;IAChB,uFAAuF;IACvF,uEAAuB,CAAA;AACzB,CAAC,EATW,cAAc,8BAAd,cAAc,QASzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { DefinitionElementProps } from \"./ElementProps\";\nimport { TextureMapping } from \"./TextureMapping\";\n\n/** Describes a color as an array of three numbers ranging from 0 to 1 where the first entry corresponds to the color's red component,\n * the second to green, and the third to blue.\n * @see usage in [[RenderMaterialAssetProps]].\n * @public\n * @extensions\n */\nexport type RgbFactorProps = number[];\n\n/** A 2d point specified as an array of 2 numbers [x, y].\n * @see usage in [[TextureMapProps]].\n * @public\n * @extensions\n */\nexport type Point2dProps = number[];\n\n/** Describes the units in which a [[TextureMapProps]]' scale is expressed.\n * @public\n * @extensions\n */\nexport enum TextureMapUnits {\n /** Indicates the scale has no units. */\n Relative = 0,\n Meters = 3,\n Millimeters = 4,\n Feet = 5,\n Inches = 6,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/** As part of a [[RenderMaterialAssetProps]], describes how to map a [[RenderTexture]]'s image to the triangles of a mesh to which the material is applied.\n * @see [[RenderMaterialAssetMapsProps]] for the supported types of texture mappings.\n * @public\n * @extensions\n */\nexport interface TextureMapProps {\n /** Angle in degrees to rotate texture when applying; defaults to 0.0 if undefined */\n pattern_angle?: number;\n /** If true, flip the pattern map in U; if undefined, defaults to false */\n pattern_u_flip?: boolean;\n /** If true, flip the pattern map in V; if undefined, defaults to false */\n pattern_flip?: boolean;\n /** X, Y scale to apply to the pattern map; if undefined, defaults to {0,0}, which is almost never useful. */\n pattern_scale?: Point2dProps;\n /** X, Y offset to apply to the pattern map; if undefined, defaults to {0,0} */\n pattern_offset?: Point2dProps;\n /** Units to use when applying the scaling; if undefined, defaults to [[TextureMapUnits.Relative]] */\n pattern_scalemode?: TextureMapUnits;\n /** Mapping mode to use for the texture application; if undefined, defaults to [[TextureMapping.Mode.Parametric]] */\n pattern_mapping?: TextureMapping.Mode;\n /** Weight at which to combine diffuse image and color; if undefined, defaults to 1.0 */\n pattern_weight?: number;\n /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false.\n * @deprecated in 4.4 - might be removed in next major version. It never functioned properly - use [[pattern_useconstantlod]] instead.\n */\n pattern_useConstantLod?: boolean;\n /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false. */\n pattern_useconstantlod?: boolean;\n /** The number of times the texture is repeated if pattern_useconstantlod is true. Increasing this will make the texture pattern appear smaller, decreasing it will make it larger. Defaults to 1.*/\n pattern_constantlod_repetitions?: number;\n /** An offset in world units used to shift the texture when pattern_useconstantlod is true. Defaults to (0, 0). */\n pattern_constantlod_offset?: Point2dProps;\n /** The minimum distance (from the eye to the surface) at which to clamp the texture size when pattern_useconstantlod is true. Defaults to 1. */\n pattern_constantlod_mindistanceclamp?: number;\n /** The maximum distance (from the eye to the surface) at which to clamp the texture size when pattern_useconstantlod is true. Defaults to 2^32. */\n pattern_constantlod_maxdistanceclamp?: number;\n /** The Id of the persistent [Texture]($backend) element defining the texture image. */\n TextureId: Id64String;\n}\n\n/** Flags applied to a [[NormalMapProps]]. The enum values can be combined using bitwise operators.\n * @public\n */\nexport enum NormalMapFlags {\n /** No special flags. */\n None = 0,\n /** Indicates that the Y component of each vector - stored in the texture's green channel - points upward along the positive Y axis and should\n * be negated. By default it points downward.\n */\n GreenUp = 1 << 0,\n /** If true, override the mapping mode with constant LOD mapping for the normal map. */\n UseConstantLod = 1 << 1,\n}\n\n/** Describes how to apply [normal mapping](https://en.wikipedia.org/wiki/Normal_mapping) to a surface material.\n * @see [[RenderMaterialAssetMapsProps.Normal]] to define a normal map for a [[RenderMaterialAssetProps]].\n * @public\n */\nexport interface NormalMapProps extends TextureMapProps {\n /** Flags controlling how the normal map is applied. Default: [[NormalMapFlags.None]]. */\n NormalFlags?: NormalMapFlags;\n}\n\n/** Describes different types of textures to be applied to a surface material to alter its appearance.\n * @note While technically both [[Pattern]] and [[Normal]] can define their own mapping parameters (`pattern_angle`, `pattern_mapping`, etc), in practice\n * if both maps are present they are expected to have identical mapping parameters, with the exception of `TextureId`.\n * @see [[RenderMaterialAssetProps.Map]] to define the texture maps for a material asset.\n * @public\n */\nexport interface RenderMaterialAssetMapsProps {\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\n Pattern?: TextureMapProps;\n /** Maps a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to the surface, simulating more complex surface details than are\n * present in the surface's geometry.\n */\n Normal?: NormalMapProps;\n /** Maps an image describing detailed minor height variation of the surface geometry. */\n Bump?: TextureMapProps;\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\n Diffuse?: TextureMapProps;\n /** Maps an image describing the glossiness of the surface's finish */\n Finish?: TextureMapProps;\n /** Maps an image describing glowing parts of the surface */\n GlowColor?: TextureMapProps;\n /** Maps an image describing the reflectiveness of the surface */\n Reflect?: TextureMapProps;\n /** Maps an image describing the specular component of the surface */\n Specular?: TextureMapProps;\n /** Maps an image describing the translucency of the surface, how much light comes out the back of the surface */\n TranslucencyColor?: TextureMapProps;\n /** Maps an image describing the transparency of the surface, how visible objects behind this object are */\n TransparentColor?: TextureMapProps;\n /** Maps an image describing the displacement of the surface geometry */\n Displacement?: TextureMapProps;\n}\n\n/** Describes the graphical properties of a [RenderMaterialElement]($backend) as part of a [[RenderMaterialProps]].\n * This representation is used to persist the material properties into the [IModelDb]($backend), but is unwieldy and verbose.\n * @see [RenderMaterialElementParams]($backend) for a somewhat more ergonomic representation.\n * @public\n * @extensions\n */\nexport interface RenderMaterialAssetProps {\n /** If true, this material has a fill/diffuse color; if undefined, defaults to false */\n HasBaseColor?: boolean;\n /** Surface color used for fill or diffuse illumination; if undefined, defaults to black */\n color?: RgbFactorProps;\n /** If true, this material has a specular color; if undefined, defaults to false */\n HasSpecularColor?: boolean;\n /** Surface color used for specular illumination; if undefined, defaults to black */\n specular_color?: RgbFactorProps;\n /** If true, this material has a specular exponent; if undefined, defaults to false */\n HasFinish?: boolean;\n /** Specular exponent (surface shininess); range is 0 to 128; if undefined, defaults to 13.5 */\n finish?: number;\n /** If true, this material has surface transparency; if undefined, defaults to false */\n HasTransmit?: boolean;\n /** Surface transparency; if undefined, defaults to 0.0 */\n transmit?: number;\n /** If true, this material has a value for diffuse reflectivity; if undefined, defaults to false */\n HasDiffuse?: boolean;\n /** Surface diffuse reflectivity; if undefined, defaults to 0.6 */\n diffuse?: number;\n /** If true, this material has a value for specular reflectivity; if undefined, defaults to false. If false, specular value is actually set to 0.0 */\n HasSpecular?: boolean;\n /** Surface specular reflectivity; if undefined, defaults to 0.4 */\n specular?: number;\n /** If true, this material has a value for environmental reflectivity; if undefined, defaults to false */\n HasReflect?: boolean;\n /** Surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined defaults to 0.0 */\n reflect?: number;\n /** If true, this material has a surface reflectance color; if undefined, defaults to false. If false, reflectance color is actually set to specular color */\n HasReflectColor?: boolean;\n /** Surface reflectance color; if undefined, defaults to black */\n reflect_color?: RgbFactorProps;\n /** A scale by which to multiply the components of the normals read from [[Map.Normal]], if a normal map is defined.\n * Default: 1.0\n */\n pbr_normal?: number;\n /** An optional set of texture maps associated with this material. */\n Map?: RenderMaterialAssetMapsProps;\n}\n\n/** Properties that define a [RenderMaterialElement]($backend).\n * @see [[RenderMaterial]] for the representation used by the display system.\n * @public\n * @extensions\n */\nexport interface RenderMaterialProps extends DefinitionElementProps {\n /** The name of a palette that can be used to categorize multiple materials. */\n paletteName: string;\n /** An optional description of the material. */\n description?: string;\n jsonProperties?: {\n /** A container for various \"assets\" describing aspects of the material. */\n materialAssets?: {\n /** Properties of the material describing how it is displayed. */\n renderMaterial?: RenderMaterialAssetProps;\n };\n };\n}\n"]}
1
+ {"version":3,"file":"MaterialProps.js","sourceRoot":"","sources":["../../src/MaterialProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqBH;;;GAGG;AACH,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wCAAwC;IACxC,6DAAY,CAAA;IACZ,yDAAU,CAAA;IACV,mEAAe,CAAA;IACf,qDAAQ,CAAA;IACR,yDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AA4CD;;GAEG;AACH,IAAY,cASX;AATD,WAAY,cAAc;IACxB,wBAAwB;IACxB,mDAAQ,CAAA;IACR;;OAEG;IACH,yDAAgB,CAAA;IAChB,uFAAuF;IACvF,uEAAuB,CAAA;AACzB,CAAC,EATW,cAAc,8BAAd,cAAc,QASzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { DefinitionElementProps } from \"./ElementProps\";\nimport { TextureMapping } from \"./TextureMapping\";\n\n/** Describes a color as an array of three numbers ranging from 0 to 1 where the first entry corresponds to the color's red component,\n * the second to green, and the third to blue.\n * @see usage in [[RenderMaterialAssetProps]].\n * @public\n * @extensions\n */\nexport type RgbFactorProps = number[];\n\n/** A 2d point specified as an array of 2 numbers [x, y].\n * @see usage in [[TextureMapProps]].\n * @public\n * @extensions\n */\nexport type Point2dProps = number[];\n\n/** Describes the units in which a [[TextureMapProps]]' scale is expressed.\n * @public\n * @extensions\n */\nexport enum TextureMapUnits {\n /** Indicates the scale has no units. */\n Relative = 0,\n Meters = 3,\n Millimeters = 4,\n Feet = 5,\n Inches = 6,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/** As part of a [[RenderMaterialAssetProps]], describes how to map a [[RenderTexture]]'s image to the triangles of a mesh to which the material is applied.\n * @see [[RenderMaterialAssetMapsProps]] for the supported types of texture mappings.\n * @public\n * @extensions\n */\nexport interface TextureMapProps {\n /** Angle in degrees to rotate texture when applying; defaults to 0.0 if undefined */\n pattern_angle?: number;\n /** If true, flip the pattern map in U; if undefined, defaults to false */\n pattern_u_flip?: boolean;\n /** If true, flip the pattern map in V; if undefined, defaults to false */\n pattern_flip?: boolean;\n /** X, Y scale to apply to the pattern map; if undefined, defaults to {0,0}, which is almost never useful. */\n pattern_scale?: Point2dProps;\n /** X, Y offset to apply to the pattern map; if undefined, defaults to {0,0} */\n pattern_offset?: Point2dProps;\n /** Units to use when applying the scaling; if undefined, defaults to [[TextureMapUnits.Relative]] */\n pattern_scalemode?: TextureMapUnits;\n /** Mapping mode to use for the texture application; if undefined, defaults to [[TextureMapping.Mode.Parametric]] */\n pattern_mapping?: TextureMapping.Mode;\n /** Weight at which to combine diffuse image and color; if undefined, defaults to 1.0 */\n pattern_weight?: number;\n /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false.\n * @deprecated in 4.4 - will not be removed until after 2026-06-13. It never functioned properly - use [[pattern_useconstantlod]] instead.\n */\n pattern_useConstantLod?: boolean;\n /** If true, override the mapping mode with constant LOD mapping for the normal map, defaults to false. */\n pattern_useconstantlod?: boolean;\n /** The number of times the texture is repeated if pattern_useconstantlod is true. Increasing this will make the texture pattern appear smaller, decreasing it will make it larger. Defaults to 1.*/\n pattern_constantlod_repetitions?: number;\n /** An offset in world units used to shift the texture when pattern_useconstantlod is true. Defaults to (0, 0). */\n pattern_constantlod_offset?: Point2dProps;\n /** The minimum distance (from the eye to the surface) at which to clamp the texture size when pattern_useconstantlod is true. Defaults to 1. */\n pattern_constantlod_mindistanceclamp?: number;\n /** The maximum distance (from the eye to the surface) at which to clamp the texture size when pattern_useconstantlod is true. Defaults to 2^32. */\n pattern_constantlod_maxdistanceclamp?: number;\n /** The Id of the persistent [Texture]($backend) element defining the texture image. */\n TextureId: Id64String;\n}\n\n/** Flags applied to a [[NormalMapProps]]. The enum values can be combined using bitwise operators.\n * @public\n */\nexport enum NormalMapFlags {\n /** No special flags. */\n None = 0,\n /** Indicates that the Y component of each vector - stored in the texture's green channel - points upward along the positive Y axis and should\n * be negated. By default it points downward.\n */\n GreenUp = 1 << 0,\n /** If true, override the mapping mode with constant LOD mapping for the normal map. */\n UseConstantLod = 1 << 1,\n}\n\n/** Describes how to apply [normal mapping](https://en.wikipedia.org/wiki/Normal_mapping) to a surface material.\n * @see [[RenderMaterialAssetMapsProps.Normal]] to define a normal map for a [[RenderMaterialAssetProps]].\n * @public\n */\nexport interface NormalMapProps extends TextureMapProps {\n /** Flags controlling how the normal map is applied. Default: [[NormalMapFlags.None]]. */\n NormalFlags?: NormalMapFlags;\n}\n\n/** Describes different types of textures to be applied to a surface material to alter its appearance.\n * @note While technically both [[Pattern]] and [[Normal]] can define their own mapping parameters (`pattern_angle`, `pattern_mapping`, etc), in practice\n * if both maps are present they are expected to have identical mapping parameters, with the exception of `TextureId`.\n * @see [[RenderMaterialAssetProps.Map]] to define the texture maps for a material asset.\n * @public\n */\nexport interface RenderMaterialAssetMapsProps {\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\n Pattern?: TextureMapProps;\n /** Maps a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to the surface, simulating more complex surface details than are\n * present in the surface's geometry.\n */\n Normal?: NormalMapProps;\n /** Maps an image describing detailed minor height variation of the surface geometry. */\n Bump?: TextureMapProps;\n /** Maps an image describing the diffuse color of the surface, replacing or mixing with the surface's own color. */\n Diffuse?: TextureMapProps;\n /** Maps an image describing the glossiness of the surface's finish */\n Finish?: TextureMapProps;\n /** Maps an image describing glowing parts of the surface */\n GlowColor?: TextureMapProps;\n /** Maps an image describing the reflectiveness of the surface */\n Reflect?: TextureMapProps;\n /** Maps an image describing the specular component of the surface */\n Specular?: TextureMapProps;\n /** Maps an image describing the translucency of the surface, how much light comes out the back of the surface */\n TranslucencyColor?: TextureMapProps;\n /** Maps an image describing the transparency of the surface, how visible objects behind this object are */\n TransparentColor?: TextureMapProps;\n /** Maps an image describing the displacement of the surface geometry */\n Displacement?: TextureMapProps;\n}\n\n/** Describes the graphical properties of a [RenderMaterialElement]($backend) as part of a [[RenderMaterialProps]].\n * This representation is used to persist the material properties into the [IModelDb]($backend), but is unwieldy and verbose.\n * @see [RenderMaterialElementParams]($backend) for a somewhat more ergonomic representation.\n * @public\n * @extensions\n */\nexport interface RenderMaterialAssetProps {\n /** If true, this material has a fill/diffuse color; if undefined, defaults to false */\n HasBaseColor?: boolean;\n /** Surface color used for fill or diffuse illumination; if undefined, defaults to black */\n color?: RgbFactorProps;\n /** If true, this material has a specular color; if undefined, defaults to false */\n HasSpecularColor?: boolean;\n /** Surface color used for specular illumination; if undefined, defaults to black */\n specular_color?: RgbFactorProps;\n /** If true, this material has a specular exponent; if undefined, defaults to false */\n HasFinish?: boolean;\n /** Specular exponent (surface shininess); range is 0 to 128; if undefined, defaults to 13.5 */\n finish?: number;\n /** If true, this material has surface transparency; if undefined, defaults to false */\n HasTransmit?: boolean;\n /** Surface transparency; if undefined, defaults to 0.0 */\n transmit?: number;\n /** If true, this material has a value for diffuse reflectivity; if undefined, defaults to false */\n HasDiffuse?: boolean;\n /** Surface diffuse reflectivity; if undefined, defaults to 0.6 */\n diffuse?: number;\n /** If true, this material has a value for specular reflectivity; if undefined, defaults to false. If false, specular value is actually set to 0.0 */\n HasSpecular?: boolean;\n /** Surface specular reflectivity; if undefined, defaults to 0.4 */\n specular?: number;\n /** If true, this material has a value for environmental reflectivity; if undefined, defaults to false */\n HasReflect?: boolean;\n /** Surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined defaults to 0.0 */\n reflect?: number;\n /** If true, this material has a surface reflectance color; if undefined, defaults to false. If false, reflectance color is actually set to specular color */\n HasReflectColor?: boolean;\n /** Surface reflectance color; if undefined, defaults to black */\n reflect_color?: RgbFactorProps;\n /** A scale by which to multiply the components of the normals read from [[Map.Normal]], if a normal map is defined.\n * Default: 1.0\n */\n pbr_normal?: number;\n /** An optional set of texture maps associated with this material. */\n Map?: RenderMaterialAssetMapsProps;\n}\n\n/** Properties that define a [RenderMaterialElement]($backend).\n * @see [[RenderMaterial]] for the representation used by the display system.\n * @public\n * @extensions\n */\nexport interface RenderMaterialProps extends DefinitionElementProps {\n /** The name of a palette that can be used to categorize multiple materials. */\n paletteName: string;\n /** An optional description of the material. */\n description?: string;\n jsonProperties?: {\n /** A container for various \"assets\" describing aspects of the material. */\n materialAssets?: {\n /** Properties of the material describing how it is displayed. */\n renderMaterial?: RenderMaterialAssetProps;\n };\n };\n}\n"]}
@@ -31,7 +31,7 @@ export declare abstract class RenderTexture implements Disposable {
31
31
  * its disposal.
32
32
  */
33
33
  [Symbol.dispose](): void;
34
- /** @deprecated in 5.0 Will be made protected in a future release. Use [Symbol.dispose] instead. */
34
+ /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Will be made protected in a future release. Use [Symbol.dispose] instead. */
35
35
  abstract dispose(): void;
36
36
  /** An [OrderedComparator]($bentley) that compares this texture against `other`. */
37
37
  compare(other: RenderTexture): number;
@@ -1 +1 @@
1
- {"version":3,"file":"RenderTexture.d.ts","sourceRoot":"","sources":["../../src/RenderTexture.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAoC,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,MAAM,CAAC;AAEnD;;;;;GAKG;AACH,8BAAsB,aAAc,YAAW,UAAU;IACvD,qCAAqC;IACrC,SAAgB,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;IACzC,0EAA0E;IAC1E,OAAO,CAAC,QAAQ,CAAC,KAA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uDAAuD;IACzE,CAAC;IAKD,mFAAmF;IAC5E,OAAO,CAAC,KAAoB;QACjC,OAAO,IAAA,6BAAc,EAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF;AAhCD,sCAgCC;AAED,cAAc;AACd,WAAiB,aAAa;IAC5B,0FAA0F;IAC1F,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,kFAAkF;QAClF,mCAAM,CAAA;QACN,yGAAyG;QACzG,iCAAK,CAAA;QACL,mFAAmF;QACnF,6CAAW,CAAA;QACX,+DAA+D;QAC/D,mCAAM,CAAA;QACN,oHAAoH;QACpH,6DAAmB,CAAA;QACnB,kDAAkD;QAClD,uDAAgB,CAAA;IAClB,CAAC,EAbW,IAAI,GAAJ,kBAAI,KAAJ,kBAAI,QAaf;AACH,CAAC,EAhBgB,aAAa,6BAAb,aAAa,QAgB7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { compareStrings, Guid, GuidString, Id64String } from \"@itwin/core-bentley\";\n\n/** Identifies an image to be used to produce a [[RenderTexture]] for a given purpose - for example,\n * as part of a [[SkyBox]]. If the string is a valid `Id64String`, it refers to a persistent [Texture]($backend) element stored in an iModel.\n * Otherwise, it is interpreted as a Url resolving to an HTMLImageElement.\n * @see [[SkySphereImageProps.texture]] and [[SkyCubeImageProps]].\n * @public\n */\nexport type TextureImageSpec = Id64String | string;\n\n/** Represents a texture image applied to a surface during rendering.\n * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].\n * @see [RenderSystem.createTexture]($frontend) to obtain a texture.\n * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element.\n * @public\n */\nexport abstract class RenderTexture implements Disposable {\n /** Indicates the type of texture. */\n public readonly type: RenderTexture.Type;\n /** Used for ordered comparisons, e.g. in DisplayParams.compareForMerge */\n private readonly _guid: GuidString;\n\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\n public abstract get bytesUsed(): number;\n\n protected constructor(type: RenderTexture.Type) {\n this.type = type;\n this._guid = Guid.createValue();\n }\n\n /** Releases any WebGL resources owned by this texture.\n * For a texture created by a [RenderSystem]($frontend) for which [CreateTextureArgs.ownership]($frontend) was specified as \"external\",\n * the caller is responsible for invoking this method when it is finished using the texture; otherwise, the [RenderSystem]($frontend) will handle\n * its disposal.\n */\n public [Symbol.dispose]() {\n this.dispose(); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** @deprecated in 5.0 Will be made protected in a future release. Use [Symbol.dispose] instead. */\n public abstract dispose(): void; // eslint-disable-line @typescript-eslint/no-deprecated\n\n /** An [OrderedComparator]($bentley) that compares this texture against `other`. */\n public compare(other: RenderTexture): number {\n return compareStrings(this._guid, other._guid);\n }\n}\n\n/** @public */\nexport namespace RenderTexture {\n /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */\n export enum Type {\n /** An image applied to a surface, with support for mip-mapping and repetition. */\n Normal,\n /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */\n Glyph,\n /** A non-repeating image with no mip-maps, used for example for reality models. */\n TileSection,\n /** A three-dimensional texture used for rendering a skybox. */\n SkyBox,\n /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */\n FilteredTileSection,\n /** A gradient image used for thematic display. */\n ThematicGradient,\n }\n}\n"]}
1
+ {"version":3,"file":"RenderTexture.js","sourceRoot":"","sources":["../../src/RenderTexture.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAmF;AAUnF;;;;;GAKG;AACH,MAAsB,aAAa;IACjC,qCAAqC;IACrB,IAAI,CAAqB;IACzC,0EAA0E;IACzD,KAAK,CAAa;IAEnC,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAGlF,YAAsB,IAAwB;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,mBAAI,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,uDAAuD;IACzE,CAAC;IAKD,mFAAmF;IAC5E,OAAO,CAAC,KAAoB;QACjC,OAAO,IAAA,6BAAc,EAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF;AAhCD,sCAgCC;AAED,cAAc;AACd,WAAiB,aAAa;IAC5B,0FAA0F;IAC1F,IAAY,IAaX;IAbD,WAAY,IAAI;QACd,kFAAkF;QAClF,mCAAM,CAAA;QACN,yGAAyG;QACzG,iCAAK,CAAA;QACL,mFAAmF;QACnF,6CAAW,CAAA;QACX,+DAA+D;QAC/D,mCAAM,CAAA;QACN,oHAAoH;QACpH,6DAAmB,CAAA;QACnB,kDAAkD;QAClD,uDAAgB,CAAA;IAClB,CAAC,EAbW,IAAI,GAAJ,kBAAI,KAAJ,kBAAI,QAaf;AACH,CAAC,EAhBgB,aAAa,6BAAb,aAAa,QAgB7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { compareStrings, Guid, GuidString, Id64String } from \"@itwin/core-bentley\";\n\n/** Identifies an image to be used to produce a [[RenderTexture]] for a given purpose - for example,\n * as part of a [[SkyBox]]. If the string is a valid `Id64String`, it refers to a persistent [Texture]($backend) element stored in an iModel.\n * Otherwise, it is interpreted as a Url resolving to an HTMLImageElement.\n * @see [[SkySphereImageProps.texture]] and [[SkyCubeImageProps]].\n * @public\n */\nexport type TextureImageSpec = Id64String | string;\n\n/** Represents a texture image applied to a surface during rendering.\n * A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].\n * @see [RenderSystem.createTexture]($frontend) to obtain a texture.\n * @see [RenderSystem.createTextureFromElement]($frontend) to obtain a texture from a [Texture]($backend) element.\n * @public\n */\nexport abstract class RenderTexture implements Disposable {\n /** Indicates the type of texture. */\n public readonly type: RenderTexture.Type;\n /** Used for ordered comparisons, e.g. in DisplayParams.compareForMerge */\n private readonly _guid: GuidString;\n\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\n public abstract get bytesUsed(): number;\n\n protected constructor(type: RenderTexture.Type) {\n this.type = type;\n this._guid = Guid.createValue();\n }\n\n /** Releases any WebGL resources owned by this texture.\n * For a texture created by a [RenderSystem]($frontend) for which [CreateTextureArgs.ownership]($frontend) was specified as \"external\",\n * the caller is responsible for invoking this method when it is finished using the texture; otherwise, the [RenderSystem]($frontend) will handle\n * its disposal.\n */\n public [Symbol.dispose]() {\n this.dispose(); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Will be made protected in a future release. Use [Symbol.dispose] instead. */\n public abstract dispose(): void; // eslint-disable-line @typescript-eslint/no-deprecated\n\n /** An [OrderedComparator]($bentley) that compares this texture against `other`. */\n public compare(other: RenderTexture): number {\n return compareStrings(this._guid, other._guid);\n }\n}\n\n/** @public */\nexport namespace RenderTexture {\n /** The types of [[RenderTexture]]s that can be created by a [RenderSystem]($frontend). */\n export enum Type {\n /** An image applied to a surface, with support for mip-mapping and repetition. */\n Normal,\n /** An image containing any number of text glyphs, used for efficiently rendering readable small text. */\n Glyph,\n /** A non-repeating image with no mip-maps, used for example for reality models. */\n TileSection,\n /** A three-dimensional texture used for rendering a skybox. */\n SkyBox,\n /** A non-repeating image with mip-maps and and anisotropic filtering, used for map tiles when draped on terrain. */\n FilteredTileSection,\n /** A gradient image used for thematic display. */\n ThematicGradient,\n }\n}\n"]}
@@ -73,7 +73,7 @@ export declare class TerrainSettings {
73
73
  * @internal
74
74
  */
75
75
  get nonLocatable(): true | undefined;
76
- /** @deprecated in 4.5.x - might be removed in next major version. Use the overload that takes [[TerrainProps]]. */
76
+ /** @deprecated in 4.5.x - will not be removed until after 2026-06-13. Use the overload that takes [[TerrainProps]]. */
77
77
  constructor(providerName?: string, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode);
78
78
  constructor(props?: TerrainProps);
79
79
  static fromJSON(json?: TerrainProps): TerrainSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"TerrainSettings.d.ts","sourceRoot":"","sources":["../../src/TerrainSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8IAA8I;IAC9I,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0HAA0H;IAC1H,YAAY,CAAC,EAAE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KAAK,KAAK,CAAC,YAAY,CAAC;IAChJ,CAAC;IAED,mFAAmF;IAC5E,UAAU,CAAC,IAAyB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAA2B;QACtC,IAAI,SAAS,KAAK,YAAY;YAC5B,OAAO,IAAI,CAAC;QAEd,MAAM,KAAK,GAAG;YACZ,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,UAAU,EAAE,YAAY,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU;YACtD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,aAAa,EAAE,YAAY,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;YAC/D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;SACzE,CAAC;QAEF,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AA/HD,0CA+HC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { BackgroundMapProps } from \"./BackgroundMapSettings\";\nimport { CesiumTerrainAssetId } from \"./CesiumIonAssets\";\n\n\n/** JSON representation of the settings of the terrain applied to background map display by a [[DisplayStyle]].\n * @see [[DisplayStyleSettingsProps]]\n * @see [[BackgroundMapProps]]\n * @public\n * @extensions\n */\nexport interface TerrainProps {\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * If omitted, it defaults to \"CesiumWorldTerrain\".\n */\n providerName?: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n dataSource?: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled.false (or 1.0) indicate no exaggeration. Default value: 1.0 */\n exaggeration?: number;\n /** Applying lighting can help to visualize subtle terrain variation. Default value: true */\n applyLighting?: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value: 0.0 */\n heightOrigin?: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n heightOriginMode?: TerrainHeightOriginMode;\n /** If true, the terrain will not be locatable. Otherwise, [[BackgroundMapProps.nonLocatable]] will determine whether terrain is locatable.\n * @internal use [[BackgroundMapProps.nonLocatable]]. Retained for backwards compatibility only.\n */\n nonLocatable?: boolean;\n}\n\n/** Correction modes for terrain height\n * @see [[TerrainProps]]\n * @public\n * @extensions\n */\nexport enum TerrainHeightOriginMode {\n /** Height value indicates the geodetic height of the IModel origin (also referred to as ellipsoidal or GPS height) */\n Geodetic = 0,\n /** Height value indicates the geoidal height of the IModel origin (commonly referred to as sea level). */\n Geoid = 1,\n /** Height value indicates the height of the IModel origin relative to ground level at project center. */\n Ground = 2,\n}\n\n/** Normalized version of [[TerrainProps]] for which provider has been validated and default values of all members are used.\n * @public\n */\nexport class TerrainSettings {\n private _nonLocatable: true | undefined;\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * Defaults to \"CesiumWorldTerrain\".\n */\n public readonly providerName: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n public readonly dataSource: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled. 1.0 indicates no exaggeration. Default value: 1.0 */\n public readonly exaggeration: number;\n /** Applying lighting can help to visualize subtle terrain variations. Default value: false */\n public readonly applyLighting: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value 0.0 */\n public readonly heightOrigin: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n public readonly heightOriginMode: TerrainHeightOriginMode;\n /** Optionally overrides [[BackgroundMapSettings.locatable]]. For backwards compatibility only.\n * @see [[TerrainProps.nonLocatable]].\n * @internal\n */\n public get nonLocatable(): true | undefined {\n return this._nonLocatable;\n }\n\n /** @deprecated in 4.5.x - might be removed in next major version. Use the overload that takes [[TerrainProps]]. */\n constructor(providerName?: string, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode);\n\n constructor(props?: TerrainProps);\n\n /** @internal */\n constructor(providerNameOrProps: string | TerrainProps | undefined, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode) {\n let providerName;\n let dataSource;\n let nonLocatable;\n if (typeof providerNameOrProps === \"string\") {\n providerName = providerNameOrProps;\n } else if (providerNameOrProps) {\n ({ providerName, dataSource, exaggeration, applyLighting, heightOrigin, heightOriginMode, nonLocatable } = providerNameOrProps);\n }\n\n this.providerName = providerName ?? \"CesiumWorldTerrain\";\n this.dataSource = dataSource ?? \"\";\n this.exaggeration = Math.min(100, Math.max(0.1, exaggeration ?? 1.0));\n this.applyLighting = applyLighting ?? false;\n this.heightOrigin = heightOrigin ?? 0.0;\n\n if (true === nonLocatable)\n this._nonLocatable = true;\n\n switch (heightOriginMode) {\n case TerrainHeightOriginMode.Ground:\n case TerrainHeightOriginMode.Geoid:\n this.heightOriginMode = heightOriginMode;\n break;\n default:\n this.heightOriginMode = TerrainHeightOriginMode.Geodetic;\n break;\n }\n }\n\n public static fromJSON(json?: TerrainProps) {\n return new TerrainSettings(json);\n }\n\n /** Create settings that obtain terrain from a [Cesium ION asset](https://cesium.com/platform/cesium-ion/content/) such as\n * one of those defined by [[CesiumTerrainAssetId]].\n * @note You must ensure your Cesium ION account has access to the specified asset.\n */\n public static fromCesiumIonAsset(assetId: string = CesiumTerrainAssetId.Default, options?: Omit<TerrainProps, \"providerName\" | \"dataSource\">): TerrainSettings {\n return TerrainSettings.fromJSON({\n ...options,\n dataSource: assetId,\n });\n }\n\n public toJSON(): TerrainProps {\n const props: TerrainProps = { heightOriginMode: this.heightOriginMode };\n if (\"CesiumWorldTerrain\" !== this.providerName)\n props.providerName = this.providerName;\n if (this.dataSource)\n props.dataSource = this.dataSource;\n if (1 !== this.exaggeration)\n props.exaggeration = this.exaggeration;\n if (this.nonLocatable)\n props.nonLocatable = true;\n if (this.applyLighting)\n props.applyLighting = true;\n if (0 !== this.heightOrigin)\n props.heightOrigin = this.heightOrigin;\n\n return props;\n }\n\n public equals(other: TerrainSettings): boolean {\n return this.providerName === other.providerName && this.dataSource === other.dataSource && this.exaggeration === other.exaggeration && this.applyLighting === other.applyLighting\n && this.heightOrigin === other.heightOrigin && this.heightOriginMode === other.heightOriginMode && this.nonLocatable === other.nonLocatable;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(TerrainSettings.fromJSON(json));\n }\n\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A TerrainSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: TerrainProps): TerrainSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n providerName: changedProps.providerName ?? this.providerName,\n dataSource: changedProps.dataSource ?? this.dataSource,\n exaggeration: changedProps.exaggeration ?? this.exaggeration,\n nonLocatable: changedProps.nonLocatable ?? this.nonLocatable,\n applyLighting: changedProps.applyLighting ?? this.applyLighting,\n heightOrigin: changedProps.heightOrigin ?? this.heightOrigin,\n heightOriginMode: changedProps.heightOriginMode ?? this.heightOriginMode,\n };\n\n return TerrainSettings.fromJSON(props);\n }\n}\n"]}
1
+ {"version":3,"file":"TerrainSettings.js","sourceRoot":"","sources":["../../src/TerrainSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,uDAAyD;AAkCzD;;;;GAIG;AACH,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,sHAAsH;IACtH,6EAAY,CAAA;IACZ,0GAA0G;IAC1G,uEAAS,CAAA;IACT,yGAAyG;IACzG,yEAAU,CAAA;AACZ,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC;AAED;;GAEG;AACH,MAAa,eAAe;IAClB,aAAa,CAAmB;IACxC;;OAEG;IACa,YAAY,CAAS;IACrC;;;;OAIG;IACa,UAAU,CAAS;IACnC,qIAAqI;IACrH,YAAY,CAAS;IACrC,+FAA+F;IAC/E,aAAa,CAAU;IACvC,yHAAyH;IACzG,YAAY,CAAS;IACrC,mGAAmG;IACnF,gBAAgB,CAA0B;IAC1D;;;OAGG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAOD,gBAAgB;IAChB,YAAY,mBAAsD,EAAE,YAAqB,EAAE,aAAuB,EAAE,YAAqB,EAAE,gBAA0C;QACnL,IAAI,YAAY,CAAC;QACjB,IAAI,UAAU,CAAC;QACf,IAAI,YAAY,CAAC;QACjB,IAAI,OAAO,mBAAmB,KAAK,QAAQ,EAAE,CAAC;YAC5C,YAAY,GAAG,mBAAmB,CAAC;QACrC,CAAC;aAAM,IAAI,mBAAmB,EAAE,CAAC;YAC/B,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAAC,CAAC;QAClI,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,o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AAI,IAAI,CAAC,YAAY;YAC5D,aAAa,EAAE,YAAY,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;YAC/D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;SACzE,CAAC;QAEF,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AA/HD,0CA+HC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { BackgroundMapProps } from \"./BackgroundMapSettings\";\nimport { CesiumTerrainAssetId } from \"./CesiumIonAssets\";\n\n\n/** JSON representation of the settings of the terrain applied to background map display by a [[DisplayStyle]].\n * @see [[DisplayStyleSettingsProps]]\n * @see [[BackgroundMapProps]]\n * @public\n * @extensions\n */\nexport interface TerrainProps {\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * If omitted, it defaults to \"CesiumWorldTerrain\".\n */\n providerName?: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n dataSource?: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled.false (or 1.0) indicate no exaggeration. Default value: 1.0 */\n exaggeration?: number;\n /** Applying lighting can help to visualize subtle terrain variation. Default value: true */\n applyLighting?: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value: 0.0 */\n heightOrigin?: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n heightOriginMode?: TerrainHeightOriginMode;\n /** If true, the terrain will not be locatable. Otherwise, [[BackgroundMapProps.nonLocatable]] will determine whether terrain is locatable.\n * @internal use [[BackgroundMapProps.nonLocatable]]. Retained for backwards compatibility only.\n */\n nonLocatable?: boolean;\n}\n\n/** Correction modes for terrain height\n * @see [[TerrainProps]]\n * @public\n * @extensions\n */\nexport enum TerrainHeightOriginMode {\n /** Height value indicates the geodetic height of the IModel origin (also referred to as ellipsoidal or GPS height) */\n Geodetic = 0,\n /** Height value indicates the geoidal height of the IModel origin (commonly referred to as sea level). */\n Geoid = 1,\n /** Height value indicates the height of the IModel origin relative to ground level at project center. */\n Ground = 2,\n}\n\n/** Normalized version of [[TerrainProps]] for which provider has been validated and default values of all members are used.\n * @public\n */\nexport class TerrainSettings {\n private _nonLocatable: true | undefined;\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * Defaults to \"CesiumWorldTerrain\".\n */\n public readonly providerName: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n public readonly dataSource: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled. 1.0 indicates no exaggeration. Default value: 1.0 */\n public readonly exaggeration: number;\n /** Applying lighting can help to visualize subtle terrain variations. Default value: false */\n public readonly applyLighting: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value 0.0 */\n public readonly heightOrigin: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n public readonly heightOriginMode: TerrainHeightOriginMode;\n /** Optionally overrides [[BackgroundMapSettings.locatable]]. For backwards compatibility only.\n * @see [[TerrainProps.nonLocatable]].\n * @internal\n */\n public get nonLocatable(): true | undefined {\n return this._nonLocatable;\n }\n\n /** @deprecated in 4.5.x - will not be removed until after 2026-06-13. Use the overload that takes [[TerrainProps]]. */\n constructor(providerName?: string, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode);\n\n constructor(props?: TerrainProps);\n\n /** @internal */\n constructor(providerNameOrProps: string | TerrainProps | undefined, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode) {\n let providerName;\n let dataSource;\n let nonLocatable;\n if (typeof providerNameOrProps === \"string\") {\n providerName = providerNameOrProps;\n } else if (providerNameOrProps) {\n ({ providerName, dataSource, exaggeration, applyLighting, heightOrigin, heightOriginMode, nonLocatable } = providerNameOrProps);\n }\n\n this.providerName = providerName ?? \"CesiumWorldTerrain\";\n this.dataSource = dataSource ?? \"\";\n this.exaggeration = Math.min(100, Math.max(0.1, exaggeration ?? 1.0));\n this.applyLighting = applyLighting ?? false;\n this.heightOrigin = heightOrigin ?? 0.0;\n\n if (true === nonLocatable)\n this._nonLocatable = true;\n\n switch (heightOriginMode) {\n case TerrainHeightOriginMode.Ground:\n case TerrainHeightOriginMode.Geoid:\n this.heightOriginMode = heightOriginMode;\n break;\n default:\n this.heightOriginMode = TerrainHeightOriginMode.Geodetic;\n break;\n }\n }\n\n public static fromJSON(json?: TerrainProps) {\n return new TerrainSettings(json);\n }\n\n /** Create settings that obtain terrain from a [Cesium ION asset](https://cesium.com/platform/cesium-ion/content/) such as\n * one of those defined by [[CesiumTerrainAssetId]].\n * @note You must ensure your Cesium ION account has access to the specified asset.\n */\n public static fromCesiumIonAsset(assetId: string = CesiumTerrainAssetId.Default, options?: Omit<TerrainProps, \"providerName\" | \"dataSource\">): TerrainSettings {\n return TerrainSettings.fromJSON({\n ...options,\n dataSource: assetId,\n });\n }\n\n public toJSON(): TerrainProps {\n const props: TerrainProps = { heightOriginMode: this.heightOriginMode };\n if (\"CesiumWorldTerrain\" !== this.providerName)\n props.providerName = this.providerName;\n if (this.dataSource)\n props.dataSource = this.dataSource;\n if (1 !== this.exaggeration)\n props.exaggeration = this.exaggeration;\n if (this.nonLocatable)\n props.nonLocatable = true;\n if (this.applyLighting)\n props.applyLighting = true;\n if (0 !== this.heightOrigin)\n props.heightOrigin = this.heightOrigin;\n\n return props;\n }\n\n public equals(other: TerrainSettings): boolean {\n return this.providerName === other.providerName && this.dataSource === other.dataSource && this.exaggeration === other.exaggeration && this.applyLighting === other.applyLighting\n && this.heightOrigin === other.heightOrigin && this.heightOriginMode === other.heightOriginMode && this.nonLocatable === other.nonLocatable;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(TerrainSettings.fromJSON(json));\n }\n\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A TerrainSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: TerrainProps): TerrainSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n providerName: changedProps.providerName ?? this.providerName,\n dataSource: changedProps.dataSource ?? this.dataSource,\n exaggeration: changedProps.exaggeration ?? this.exaggeration,\n nonLocatable: changedProps.nonLocatable ?? this.nonLocatable,\n applyLighting: changedProps.applyLighting ?? this.applyLighting,\n heightOrigin: changedProps.heightOrigin ?? this.heightOrigin,\n heightOriginMode: changedProps.heightOriginMode ?? this.heightOriginMode,\n };\n\n return TerrainSettings.fromJSON(props);\n }\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  import type { Readable, Writable } from "stream";
5
5
  import type { Buffer } from "buffer";
6
6
  /** BackendReadable and BackendWritable are not tagged internal for deprecated public RPC APIs which reference these types. */
7
- /** @public @deprecated in 3.x - might be removed in next major version. This type was mistakenly made public in the common scope. */
7
+ /** @public @deprecated in 3.x - might be removed in next major version. This type was mistakenly made public in the common scope. */
8
8
  export type BackendReadable = Readable;
9
9
  /** @public @deprecated in 3.x - might be removed in next major version. This type was mistakenly made public in the common scope. */
10
10
  export type BackendWritable = Writable;