@itwin/core-frontend 5.1.0-dev.47 → 5.1.0-dev.51

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 (71) hide show
  1. package/lib/cjs/IModelApp.d.ts +1 -1
  2. package/lib/cjs/IModelApp.js +1 -1
  3. package/lib/cjs/IModelApp.js.map +1 -1
  4. package/lib/cjs/RealityDataSource.d.ts +65 -3
  5. package/lib/cjs/RealityDataSource.d.ts.map +1 -1
  6. package/lib/cjs/RealityDataSource.js +79 -3
  7. package/lib/cjs/RealityDataSource.js.map +1 -1
  8. package/lib/cjs/RealityDataSourceTilesetUrlImpl.js +1 -1
  9. package/lib/cjs/RealityDataSourceTilesetUrlImpl.js.map +1 -1
  10. package/lib/cjs/internal/GoogleMapsDecorator.d.ts +53 -0
  11. package/lib/cjs/internal/GoogleMapsDecorator.d.ts.map +1 -0
  12. package/lib/cjs/internal/GoogleMapsDecorator.js +132 -0
  13. package/lib/cjs/internal/GoogleMapsDecorator.js.map +1 -0
  14. package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.d.ts +83 -0
  15. package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.d.ts.map +1 -0
  16. package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.js +201 -0
  17. package/lib/cjs/internal/RealityDataSourceGoogle3dTilesImpl.js.map +1 -0
  18. package/lib/cjs/internal/cross-package.d.ts +1 -0
  19. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  20. package/lib/cjs/internal/cross-package.js +4 -1
  21. package/lib/cjs/internal/cross-package.js.map +1 -1
  22. package/lib/cjs/internal/tile/RealityModelTileTree.d.ts +5 -2
  23. package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
  24. package/lib/cjs/internal/tile/RealityModelTileTree.js +15 -4
  25. package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
  26. package/lib/cjs/tile/GltfReader.d.ts +1 -0
  27. package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
  28. package/lib/cjs/tile/GltfReader.js +1 -0
  29. package/lib/cjs/tile/GltfReader.js.map +1 -1
  30. package/lib/cjs/tile/RealityTile.d.ts +5 -0
  31. package/lib/cjs/tile/RealityTile.d.ts.map +1 -1
  32. package/lib/cjs/tile/RealityTile.js +5 -0
  33. package/lib/cjs/tile/RealityTile.js.map +1 -1
  34. package/lib/esm/IModelApp.d.ts +1 -1
  35. package/lib/esm/IModelApp.js +1 -1
  36. package/lib/esm/IModelApp.js.map +1 -1
  37. package/lib/esm/RealityDataSource.d.ts +65 -3
  38. package/lib/esm/RealityDataSource.d.ts.map +1 -1
  39. package/lib/esm/RealityDataSource.js +77 -3
  40. package/lib/esm/RealityDataSource.js.map +1 -1
  41. package/lib/esm/RealityDataSourceTilesetUrlImpl.js +1 -1
  42. package/lib/esm/RealityDataSourceTilesetUrlImpl.js.map +1 -1
  43. package/lib/esm/internal/GoogleMapsDecorator.d.ts +53 -0
  44. package/lib/esm/internal/GoogleMapsDecorator.d.ts.map +1 -0
  45. package/lib/esm/internal/GoogleMapsDecorator.js +126 -0
  46. package/lib/esm/internal/GoogleMapsDecorator.js.map +1 -0
  47. package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.d.ts +83 -0
  48. package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.d.ts.map +1 -0
  49. package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.js +197 -0
  50. package/lib/esm/internal/RealityDataSourceGoogle3dTilesImpl.js.map +1 -0
  51. package/lib/esm/internal/cross-package.d.ts +1 -0
  52. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  53. package/lib/esm/internal/cross-package.js +1 -0
  54. package/lib/esm/internal/cross-package.js.map +1 -1
  55. package/lib/esm/internal/tile/RealityModelTileTree.d.ts +5 -2
  56. package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
  57. package/lib/esm/internal/tile/RealityModelTileTree.js +15 -4
  58. package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
  59. package/lib/esm/tile/GltfReader.d.ts +1 -0
  60. package/lib/esm/tile/GltfReader.d.ts.map +1 -1
  61. package/lib/esm/tile/GltfReader.js +1 -0
  62. package/lib/esm/tile/GltfReader.js.map +1 -1
  63. package/lib/esm/tile/RealityTile.d.ts +5 -0
  64. package/lib/esm/tile/RealityTile.d.ts.map +1 -1
  65. package/lib/esm/tile/RealityTile.js +5 -0
  66. package/lib/esm/tile/RealityTile.js.map +1 -1
  67. package/lib/public/images/google_on_non_white.png +0 -0
  68. package/lib/public/images/google_on_non_white_hdpi.png +0 -0
  69. package/lib/public/images/google_on_white.png +0 -0
  70. package/lib/public/images/google_on_white_hdpi.png +0 -0
  71. package/package.json +22 -20
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RealityDataSourceGoogle3dTilesImpl = void 0;
4
+ /*---------------------------------------------------------------------------------------------
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
+ /** @packageDocumentation
9
+ * @module Tiles
10
+ */
11
+ const core_bentley_1 = require("@itwin/core-bentley");
12
+ const core_common_1 = require("@itwin/core-common");
13
+ const Request_1 = require("../request/Request");
14
+ const internal_1 = require("../tile/internal");
15
+ /** This class provides access to the reality data provider services.
16
+ * It encapsulates access to a reality data from the Google Photorealistic 3D Tiles service.
17
+ * A valid Google 3D Tiles authentication key must be configured for this provider to work (provide the key in the [[RealityDataSourceGoogle3dTilesImpl.createFromKey]] method).
18
+ * @internal
19
+ */
20
+ class RealityDataSourceGoogle3dTilesImpl {
21
+ key;
22
+ /** The URL that supplies the 3d tiles for displaying the Google 3D Tiles tileset. */
23
+ _tilesetUrl;
24
+ /** Base URL of the Google 3D Tiles tileset. Does not include trailing subdirectories. */
25
+ _baseUrl = "";
26
+ /** Search parameters that must be passed down to child tile requests. */
27
+ _searchParams;
28
+ /** Google Map Tiles API Key used to access Google 3D Tiles. */
29
+ _apiKey;
30
+ /** Function that returns an OAuth token for authenticating with GP3sDT. This token is expected to not contain the "Bearer" prefix. */
31
+ _getAuthToken;
32
+ /** This is necessary for Google 3D Tiles tilesets! This tells the iTwin.js tiling system to use the geometric error specified in the tileset rather than any of our own. */
33
+ usesGeometricError = true;
34
+ maximumScreenSpaceError = 16;
35
+ /** Construct a new reality data source.
36
+ * @param props JSON representation of the reality data source
37
+ */
38
+ constructor(props, apiKey, _getAuthToken) {
39
+ this.key = props.sourceKey;
40
+ this._tilesetUrl = this.key.id;
41
+ this._apiKey = apiKey;
42
+ this._getAuthToken = _getAuthToken;
43
+ }
44
+ /**
45
+ * Create an instance of this class from a source key and iTwin context.
46
+ */
47
+ static async createFromKey(sourceKey, _iTwinId, apiKey, _getAuthToken) {
48
+ return new RealityDataSourceGoogle3dTilesImpl({ sourceKey }, apiKey, _getAuthToken);
49
+ }
50
+ get isContextShare() {
51
+ return false;
52
+ }
53
+ /**
54
+ * Returns Reality Data if available
55
+ */
56
+ get realityData() {
57
+ return undefined;
58
+ }
59
+ get realityDataId() {
60
+ return undefined;
61
+ }
62
+ /**
63
+ * Returns Reality Data type if available
64
+ */
65
+ get realityDataType() {
66
+ return undefined;
67
+ }
68
+ getTilesetUrl() {
69
+ return this._tilesetUrl;
70
+ }
71
+ /** Return the URL of the Google 3D Tiles tileset with its API key included. */
72
+ getTilesetUrlWithKey() {
73
+ const google3dTilesKey = this._apiKey;
74
+ if (this._getAuthToken) {
75
+ // If we have a getAuthToken function, no need to append API key to the URL
76
+ return this._tilesetUrl;
77
+ }
78
+ else {
79
+ return `${this._tilesetUrl}?key=${google3dTilesKey}`;
80
+ }
81
+ }
82
+ setBaseUrl(url) {
83
+ const urlParts = url.split("/");
84
+ const newUrl = new URL(url);
85
+ this._searchParams = newUrl.searchParams;
86
+ urlParts.pop();
87
+ if (urlParts.length === 0) {
88
+ this._baseUrl = "";
89
+ }
90
+ else {
91
+ this._baseUrl = newUrl.origin;
92
+ }
93
+ }
94
+ /**
95
+ * This method returns the URL to access the actual 3d tiles from the service provider.
96
+ * @returns string containing the URL to reality data.
97
+ */
98
+ async getServiceUrl(_iTwinId) {
99
+ return this._tilesetUrl;
100
+ }
101
+ async getRootDocument(_iTwinId) {
102
+ const url = this.getTilesetUrlWithKey();
103
+ if (!url)
104
+ throw new core_common_1.IModelError(core_bentley_1.BentleyStatus.ERROR, "Unable to get service url");
105
+ this.setBaseUrl(url);
106
+ let authToken;
107
+ if (this._getAuthToken) {
108
+ authToken = await this._getAuthToken();
109
+ }
110
+ return (0, Request_1.request)(url, "json", authToken ? {
111
+ headers: {
112
+ authorization: `Bearer ${authToken}`
113
+ }
114
+ } : undefined);
115
+ }
116
+ /** Returns the tile URL relative to the base URL.
117
+ * If the tile path is a relative URL, the base URL is prepended to it.
118
+ * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.
119
+ */
120
+ getTileUrl(tilePath) {
121
+ // this._baseUrl does not include the trailing subdirectories.
122
+ // This is not an issue because the tile path always starts with the appropriate subdirectories.
123
+ // We also do not need to worry about the tile path starting with a slash.
124
+ // This happens in these tiles at the second .json level, but the URL API will handle that for us.
125
+ const url = new URL(tilePath, this._baseUrl);
126
+ // If tile is a reference to a tileset, iterate over tileset url's search params and store them in this._searchParams so we can pass them down to children
127
+ if (this.getTileContentType(url.toString()) === "tileset" && url.searchParams.size !== 0) {
128
+ for (const [key, value] of url.searchParams.entries()) {
129
+ this._searchParams?.append(key, value);
130
+ }
131
+ }
132
+ if (this._searchParams === undefined || this._searchParams.size === 0) {
133
+ return url.toString();
134
+ }
135
+ // Append all stored search params to url's existing ones
136
+ const newUrl = new URL(url.toString());
137
+ for (const [key, value] of this._searchParams.entries()) {
138
+ if (!url.searchParams.has(key)) {
139
+ // Only append the search param if it does not already exist in the url
140
+ newUrl.searchParams.append(key, value);
141
+ }
142
+ }
143
+ return newUrl.toString();
144
+ }
145
+ /**
146
+ * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
147
+ */
148
+ async getTileContent(name) {
149
+ let authToken;
150
+ if (this._getAuthToken) {
151
+ authToken = await this._getAuthToken();
152
+ }
153
+ return (0, Request_1.request)(this.getTileUrl(name), "arraybuffer", authToken ? {
154
+ headers: {
155
+ authorization: `Bearer ${authToken}`
156
+ }
157
+ } : undefined);
158
+ }
159
+ /**
160
+ * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.
161
+ */
162
+ async getTileJson(name) {
163
+ let authToken;
164
+ if (this._getAuthToken) {
165
+ authToken = await this._getAuthToken();
166
+ }
167
+ return (0, Request_1.request)(this.getTileUrl(name), "json", authToken ? {
168
+ headers: {
169
+ authorization: `Bearer ${authToken}`
170
+ }
171
+ } : undefined);
172
+ }
173
+ getTileContentType(url) {
174
+ return new URL(url, "https://localhost/").pathname.toLowerCase().endsWith("json") ? "tileset" : "tile";
175
+ }
176
+ /**
177
+ * Gets spatial location and extents of this reality data source
178
+ * @returns spatial location and extents
179
+ * @internal
180
+ */
181
+ async getSpatialLocationAndExtents() {
182
+ let spatialLocation;
183
+ if (this.key.format === core_common_1.RealityDataFormat.ThreeDTile) {
184
+ const rootDocument = await this.getRootDocument(undefined);
185
+ spatialLocation = internal_1.ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);
186
+ }
187
+ return spatialLocation;
188
+ }
189
+ /**
190
+ * Gets information to identify the product and engine that create this reality data
191
+ * Will return undefined if cannot be resolved
192
+ * @returns information to identify the product and engine that create this reality data
193
+ * @alpha
194
+ */
195
+ async getPublisherProductInfo() {
196
+ let publisherInfo;
197
+ return publisherInfo;
198
+ }
199
+ }
200
+ exports.RealityDataSourceGoogle3dTilesImpl = RealityDataSourceGoogle3dTilesImpl;
201
+ //# sourceMappingURL=RealityDataSourceGoogle3dTilesImpl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RealityDataSourceGoogle3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,+BAAiB,CAAC,UAAU,EAAE,CAAC;YACrD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAC3D,eAAe,GAAG,sCAA2B,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACD;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB;QAClC,IAAI,aAA+C,CAAC;QACpD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAxMD,gFAwMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\nimport { BentleyStatus, GuidString } from \"@itwin/core-bentley\";\r\nimport { IModelError, RealityData, RealityDataFormat, RealityDataSourceKey, RealityDataSourceProps } from \"@itwin/core-common\";\r\n\r\nimport { request } from \"../request/Request\";\r\nimport { PublisherProductInfo, RealityDataSource, SpatialLocationAndExtents } from \"../RealityDataSource\";\r\nimport { ThreeDTileFormatInterpreter } from \"../tile/internal\";\r\n\r\n/** This class provides access to the reality data provider services.\r\n * It encapsulates access to a reality data from the Google Photorealistic 3D Tiles service.\r\n * A valid Google 3D Tiles authentication key must be configured for this provider to work (provide the key in the [[RealityDataSourceGoogle3dTilesImpl.createFromKey]] method).\r\n* @internal\r\n*/\r\nexport class RealityDataSourceGoogle3dTilesImpl implements RealityDataSource {\r\n public readonly key: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the Google 3D Tiles tileset. */\r\n private _tilesetUrl: string | undefined;\r\n /** Base URL of the Google 3D Tiles tileset. Does not include trailing subdirectories. */\r\n private _baseUrl: string = \"\"\r\n /** Search parameters that must be passed down to child tile requests. */\r\n private _searchParams?: URLSearchParams;\r\n /** Google Map Tiles API Key used to access Google 3D Tiles. */\r\n private _apiKey?: string;\r\n /** Function that returns an OAuth token for authenticating with GP3sDT. This token is expected to not contain the \"Bearer\" prefix. */\r\n private _getAuthToken?: () => Promise<string | undefined>;\r\n\r\n /** This is necessary for Google 3D Tiles tilesets! This tells the iTwin.js tiling system to use the geometric error specified in the tileset rather than any of our own. */\r\n public readonly usesGeometricError = true;\r\n public readonly maximumScreenSpaceError = 16;\r\n\r\n /** Construct a new reality data source.\r\n * @param props JSON representation of the reality data source\r\n */\r\n protected constructor(props: RealityDataSourceProps, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>) {\r\n this.key = props.sourceKey;\r\n this._tilesetUrl = this.key.id;\r\n this._apiKey = apiKey;\r\n this._getAuthToken = _getAuthToken;\r\n }\r\n\r\n /**\r\n * Create an instance of this class from a source key and iTwin context.\r\n */\r\n public static async createFromKey(sourceKey: RealityDataSourceKey, _iTwinId: GuidString | undefined, apiKey: string | undefined, _getAuthToken?: () => Promise<string | undefined>): Promise<RealityDataSource | undefined> {\r\n return new RealityDataSourceGoogle3dTilesImpl({ sourceKey }, apiKey, _getAuthToken);\r\n }\r\n\r\n public get isContextShare(): boolean {\r\n return false;\r\n }\r\n /**\r\n * Returns Reality Data if available\r\n */\r\n public get realityData(): RealityData | undefined {\r\n return undefined;\r\n }\r\n public get realityDataId(): string | undefined {\r\n return undefined;\r\n }\r\n /**\r\n * Returns Reality Data type if available\r\n */\r\n public get realityDataType(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n public getTilesetUrl(): string | undefined {\r\n return this._tilesetUrl;\r\n }\r\n\r\n /** Return the URL of the Google 3D Tiles tileset with its API key included. */\r\n private getTilesetUrlWithKey() {\r\n const google3dTilesKey = this._apiKey;\r\n if (this._getAuthToken) {\r\n // If we have a getAuthToken function, no need to append API key to the URL\r\n return this._tilesetUrl;\r\n } else {\r\n return `${this._tilesetUrl}?key=${google3dTilesKey}`;\r\n }\r\n }\r\n\r\n protected setBaseUrl(url: string): void {\r\n const urlParts = url.split(\"/\");\r\n const newUrl = new URL(url);\r\n this._searchParams = newUrl.searchParams;\r\n urlParts.pop();\r\n if (urlParts.length === 0) {\r\n this._baseUrl = \"\";\r\n } else {\r\n this._baseUrl = newUrl.origin;\r\n }\r\n }\r\n\r\n /**\r\n * This method returns the URL to access the actual 3d tiles from the service provider.\r\n * @returns string containing the URL to reality data.\r\n */\r\n public async getServiceUrl(_iTwinId: GuidString | undefined): Promise<string | undefined> {\r\n return this._tilesetUrl;\r\n }\r\n\r\n public async getRootDocument(_iTwinId: GuidString | undefined): Promise<any> {\r\n const url = this.getTilesetUrlWithKey();\r\n if (!url)\r\n throw new IModelError(BentleyStatus.ERROR, \"Unable to get service url\");\r\n\r\n this.setBaseUrl(url);\r\n\r\n let authToken;\r\n if (this._getAuthToken) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(url, \"json\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n /** Returns the tile URL relative to the base URL.\r\n * If the tile path is a relative URL, the base URL is prepended to it.\r\n * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.\r\n */\r\n public getTileUrl(tilePath: string): string {\r\n // this._baseUrl does not include the trailing subdirectories.\r\n // This is not an issue because the tile path always starts with the appropriate subdirectories.\r\n // We also do not need to worry about the tile path starting with a slash.\r\n // This happens in these tiles at the second .json level, but the URL API will handle that for us.\r\n const url = new URL(tilePath, this._baseUrl);\r\n\r\n // If tile is a reference to a tileset, iterate over tileset url's search params and store them in this._searchParams so we can pass them down to children\r\n if (this.getTileContentType(url.toString()) === \"tileset\" && url.searchParams.size !== 0) {\r\n for (const [key, value] of url.searchParams.entries()) {\r\n this._searchParams?.append(key, value);\r\n }\r\n }\r\n\r\n if (this._searchParams === undefined || this._searchParams.size === 0) {\r\n return url.toString();\r\n }\r\n\r\n // Append all stored search params to url's existing ones\r\n const newUrl = new URL(url.toString());\r\n for (const [key, value] of this._searchParams.entries()) {\r\n if (!url.searchParams.has(key)) {\r\n // Only append the search param if it does not already exist in the url\r\n newUrl.searchParams.append(key, value);\r\n }\r\n }\r\n\r\n return newUrl.toString();\r\n }\r\n\r\n /**\r\n * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileContent(name: string): Promise<ArrayBuffer> {\r\n let authToken;\r\n if (this._getAuthToken) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(this.getTileUrl(name), \"arraybuffer\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.\r\n */\r\n public async getTileJson(name: string): Promise<any> {\r\n let authToken;\r\n if (this._getAuthToken) {\r\n authToken = await this._getAuthToken();\r\n }\r\n\r\n return request(this.getTileUrl(name), \"json\", authToken ? {\r\n headers: {\r\n authorization: `Bearer ${authToken}`\r\n }} : undefined\r\n );\r\n }\r\n\r\n public getTileContentType(url: string): \"tile\" | \"tileset\" {\r\n return new URL(url, \"https://localhost/\").pathname.toLowerCase().endsWith(\"json\") ? \"tileset\" : \"tile\";\r\n }\r\n\r\n /**\r\n * Gets spatial location and extents of this reality data source\r\n * @returns spatial location and extents\r\n * @internal\r\n */\r\n public async getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined> {\r\n let spatialLocation: SpatialLocationAndExtents | undefined;\r\n if (this.key.format === RealityDataFormat.ThreeDTile) {\r\n const rootDocument = await this.getRootDocument(undefined);\r\n spatialLocation = ThreeDTileFormatInterpreter.getSpatialLocationAndExtents(rootDocument);\r\n }\r\n return spatialLocation;\r\n }\r\n /**\r\n * Gets information to identify the product and engine that create this reality data\r\n * Will return undefined if cannot be resolved\r\n * @returns information to identify the product and engine that create this reality data\r\n * @alpha\r\n */\r\n public async getPublisherProductInfo(): Promise<PublisherProductInfo | undefined> {\r\n let publisherInfo: PublisherProductInfo | undefined;\r\n return publisherInfo;\r\n }\r\n}\r\n\r\n"]}
@@ -10,6 +10,7 @@ export { type GLTimerResult, RenderDiagnostics, type RenderSystemDebugControl }
10
10
  export { formatAnimationBranchId } from "./render/AnimationBranchState";
11
11
  export { PrimitiveVisibility, type RenderTargetDebugControl } from "./render/RenderTargetDebugControl";
12
12
  export { acquireImdlDecoder, appendQueryParams, ArcGisErrorCode, ArcGisGeometryReaderJSON, type ArcGisGetServiceJsonArgs, ArcGISImageryProvider, type ArcGISServiceMetadata, ArcGisUtilities, type ArcGisValidateSourceArgs, createSpatialTileTreeReferences, deflateCoordinates, type FeatureAttributeDrivenSymbology, FeatureGeometryBaseRenderer, type FeatureGeometryRenderer, FeatureGraphicsRenderer, type FeatureSymbolizedRenderer, type FeatureSymbologyRenderer, GltfReader, type GltfReaderArgs, type GltfReaderResult, type GraphicsGeometryRenderer, ImageryMapTileTree, type ImdlDecoder, ImdlReader, type MapLayerInfoFromTileTree, MapTileTreeReference, RealityModelTileUtils, RealityTileLoader, SpatialTileTreeReferences, type WGS84Extent, WmsUtilities, LayerTileTreeHandler, type MapLayerTreeSetting, LayerTileTreeReferenceHandler } from "../tile/internal";
13
+ export { GoogleMapsDecorator, LogoDecoration } from "./GoogleMapsDecorator";
13
14
  export { DebugShaderFile } from "./render/RenderSystemDebugControl";
14
15
  export { IModelTileTree } from "./tile/IModelTileTree";
15
16
  //# sourceMappingURL=cross-package.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cross-package.d.ts","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,uBAA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TileTree = exports.DebugShaderFile = exports.LayerTileTreeReferenceHandler = exports.LayerTileTreeHandler = exports.WmsUtilities = exports.SpatialTileTreeReferences = exports.RealityTileLoader = exports.RealityModelTileUtils = exports.MapTileTreeReference = exports.ImdlReader = exports.ImageryMapTileTree = exports.GltfReader = exports.FeatureGraphicsRenderer = exports.FeatureGeometryBaseRenderer = exports.deflateCoordinates = exports.createSpatialTileTreeReferences = exports.ArcGisUtilities = exports.ArcGISImageryProvider = exports.ArcGisGeometryReaderJSON = exports.ArcGisErrorCode = exports.appendQueryParams = exports.acquireImdlDecoder = exports.PrimitiveVisibility = exports.formatAnimationBranchId = exports.RenderDiagnostics = exports.PerformanceMetrics = exports.Target = exports.OnScreenTarget = exports.GltfDataType = exports.AnimationNodeId = exports._scheduleScriptReference = exports._callIpcChannel = void 0;
10
+ exports.IModelTileTree = exports.DebugShaderFile = exports.LogoDecoration = exports.GoogleMapsDecorator = exports.LayerTileTreeReferenceHandler = exports.LayerTileTreeHandler = exports.WmsUtilities = exports.SpatialTileTreeReferences = exports.RealityTileLoader = exports.RealityModelTileUtils = exports.MapTileTreeReference = exports.ImdlReader = exports.ImageryMapTileTree = exports.GltfReader = exports.FeatureGraphicsRenderer = exports.FeatureGeometryBaseRenderer = exports.deflateCoordinates = exports.createSpatialTileTreeReferences = exports.ArcGisUtilities = exports.ArcGISImageryProvider = exports.ArcGisGeometryReaderJSON = exports.ArcGisErrorCode = exports.appendQueryParams = exports.acquireImdlDecoder = exports.PrimitiveVisibility = exports.formatAnimationBranchId = exports.RenderDiagnostics = exports.PerformanceMetrics = exports.Target = exports.OnScreenTarget = exports.GltfDataType = exports.AnimationNodeId = exports._scheduleScriptReference = exports._callIpcChannel = void 0;
11
11
  var Symbols_1 = require("../common/internal/Symbols");
12
12
  Object.defineProperty(exports, "_callIpcChannel", { enumerable: true, get: function () { return Symbols_1._callIpcChannel; } });
13
13
  Object.defineProperty(exports, "_scheduleScriptReference", { enumerable: true, get: function () { return Symbols_1._scheduleScriptReference; } });
@@ -48,6 +48,9 @@ Object.defineProperty(exports, "SpatialTileTreeReferences", { enumerable: true,
48
48
  Object.defineProperty(exports, "WmsUtilities", { enumerable: true, get: function () { return internal_1.WmsUtilities; } });
49
49
  Object.defineProperty(exports, "LayerTileTreeHandler", { enumerable: true, get: function () { return internal_1.LayerTileTreeHandler; } });
50
50
  Object.defineProperty(exports, "LayerTileTreeReferenceHandler", { enumerable: true, get: function () { return internal_1.LayerTileTreeReferenceHandler; } });
51
+ var GoogleMapsDecorator_1 = require("./GoogleMapsDecorator");
52
+ Object.defineProperty(exports, "GoogleMapsDecorator", { enumerable: true, get: function () { return GoogleMapsDecorator_1.GoogleMapsDecorator; } });
53
+ Object.defineProperty(exports, "LogoDecoration", { enumerable: true, get: function () { return GoogleMapsDecorator_1.LogoDecoration; } });
51
54
  // Used by display-test-app which currently builds using both ESModules and CommonJS.
52
55
  // Remove once CommonJS is dropped.
53
56
  var RenderSystemDebugControl_2 = require("./render/RenderSystemDebugControl");
@@ -1 +1 @@
1
- {"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuF;AAA9E,0GAAA,eAAe,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAClD,6EAA4E;AAAnE,kHAAA,eAAe,OAAA;AACxB,wDAAiF;AAAxE,0GAAA,YAAY,OAAA;AACrB,gDAA+D;AAAtD,wGAAA,cAAc,OAAA;AAAE,gGAAA,MAAM,OAAA;AAC/B,wEAAuE;AAA9D,wHAAA,kBAAkB,OAAA;AAC3B,8EAAyH;AAA5F,6HAAA,iBAAiB,OAAA;AAC9C,sEAAwE;AAA/D,+HAAA,uBAAuB,OAAA;AAChC,8EAAuG;AAA9F,+HAAA,mBAAmB,OAAA;AAE5B,iEAAiE;AACjE,6CAiC0B;AAhCzB,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,2GAAA,eAAe,OAAA;AACf,oHAAA,wBAAwB,OAAA;AAExB,iHAAA,qBAAqB,OAAA;AAErB,2GAAA,eAAe,OAAA;AAEf,2HAAA,+BAA+B,OAAA;AAC/B,8GAAA,kBAAkB,OAAA;AAElB,uHAAA,2BAA2B,OAAA;AAE3B,mHAAA,uBAAuB,OAAA;AAGvB,sGAAA,UAAU,OAAA;AAIV,8GAAA,kBAAkB,OAAA;AAElB,sGAAA,UAAU,OAAA;AAEV,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AACrB,6GAAA,iBAAiB,OAAA;AACjB,qHAAA,yBAAyB,OAAA;AAEzB,wGAAA,YAAY,OAAA;AACZ,gHAAA,oBAAoB,OAAA;AAA4B,yHAAA,6BAA6B,OAAA;AAG9E,qFAAqF;AACrF,mCAAmC;AACnC,8EAAoE;AAA3D,2HAAA,eAAe,OAAA;AACxB,wDAAuD;AAA9C,gHAAA,cAAc,OAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utils\r\n */\r\n\r\nexport { _callIpcChannel, _scheduleScriptReference } from \"../common/internal/Symbols\";\r\nexport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\r\nexport { GltfDataType, type GltfMeshPrimitive } from \"../common/gltf/GltfSchema\";\r\nexport { OnScreenTarget, Target } from \"./render/webgl/Target\";\r\nexport { PerformanceMetrics } from \"./render/webgl/PerformanceMetrics\";\r\nexport { type GLTimerResult, RenderDiagnostics, type RenderSystemDebugControl } from \"./render/RenderSystemDebugControl\";\r\nexport { formatAnimationBranchId } from \"./render/AnimationBranchState\";\r\nexport { PrimitiveVisibility, type RenderTargetDebugControl } from \"./render/RenderTargetDebugControl\";\r\n\r\n// Used by frontend-tiles, map-layers-formats, frontend-dev-tools\r\nexport {\r\n acquireImdlDecoder,\r\n appendQueryParams,\r\n ArcGisErrorCode,\r\n ArcGisGeometryReaderJSON,\r\n type ArcGisGetServiceJsonArgs,\r\n ArcGISImageryProvider,\r\n type ArcGISServiceMetadata,\r\n ArcGisUtilities,\r\n type ArcGisValidateSourceArgs,\r\n createSpatialTileTreeReferences,\r\n deflateCoordinates,\r\n type FeatureAttributeDrivenSymbology,\r\n FeatureGeometryBaseRenderer,\r\n type FeatureGeometryRenderer,\r\n FeatureGraphicsRenderer,\r\n type FeatureSymbolizedRenderer,\r\n type FeatureSymbologyRenderer,\r\n GltfReader,\r\n type GltfReaderArgs,\r\n type GltfReaderResult,\r\n type GraphicsGeometryRenderer,\r\n ImageryMapTileTree,\r\n type ImdlDecoder,\r\n ImdlReader,\r\n type MapLayerInfoFromTileTree,\r\n MapTileTreeReference,\r\n RealityModelTileUtils,\r\n RealityTileLoader,\r\n SpatialTileTreeReferences,\r\n type WGS84Extent,\r\n WmsUtilities,\r\n LayerTileTreeHandler, type MapLayerTreeSetting, LayerTileTreeReferenceHandler\r\n} from \"../tile/internal\";\r\n\r\n// Used by display-test-app which currently builds using both ESModules and CommonJS.\r\n// Remove once CommonJS is dropped.\r\nexport { DebugShaderFile } from \"./render/RenderSystemDebugControl\";\r\nexport { IModelTileTree } from \"./tile/IModelTileTree\";\r\n"]}
1
+ {"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuF;AAA9E,0GAAA,eAAe,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAClD,6EAA4E;AAAnE,kHAAA,eAAe,OAAA;AACxB,wDAAiF;AAAxE,0GAAA,YAAY,OAAA;AACrB,gDAA+D;AAAtD,wGAAA,cAAc,OAAA;AAAE,gGAAA,MAAM,OAAA;AAC/B,wEAAuE;AAA9D,wHAAA,kBAAkB,OAAA;AAC3B,8EAAyH;AAA5F,6HAAA,iBAAiB,OAAA;AAC9C,sEAAwE;AAA/D,+HAAA,uBAAuB,OAAA;AAChC,8EAAuG;AAA9F,+HAAA,mBAAmB,OAAA;AAE5B,iEAAiE;AACjE,6CAiC0B;AAhCzB,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,2GAAA,eAAe,OAAA;AACf,oHAAA,wBAAwB,OAAA;AAExB,iHAAA,qBAAqB,OAAA;AAErB,2GAAA,eAAe,OAAA;AAEf,2HAAA,+BAA+B,OAAA;AAC/B,8GAAA,kBAAkB,OAAA;AAElB,uHAAA,2BAA2B,OAAA;AAE3B,mHAAA,uBAAuB,OAAA;AAGvB,sGAAA,UAAU,OAAA;AAIV,8GAAA,kBAAkB,OAAA;AAElB,sGAAA,UAAU,OAAA;AAEV,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AACrB,6GAAA,iBAAiB,OAAA;AACjB,qHAAA,yBAAyB,OAAA;AAEzB,wGAAA,YAAY,OAAA;AACZ,gHAAA,oBAAoB,OAAA;AAA4B,yHAAA,6BAA6B,OAAA;AAE9E,6DAA4E;AAAnE,0HAAA,mBAAmB,OAAA;AAAE,qHAAA,cAAc,OAAA;AAE5C,qFAAqF;AACrF,mCAAmC;AACnC,8EAAoE;AAA3D,2HAAA,eAAe,OAAA;AACxB,wDAAuD;AAA9C,gHAAA,cAAc,OAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utils\r\n */\r\n\r\nexport { _callIpcChannel, _scheduleScriptReference } from \"../common/internal/Symbols\";\r\nexport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\r\nexport { GltfDataType, type GltfMeshPrimitive } from \"../common/gltf/GltfSchema\";\r\nexport { OnScreenTarget, Target } from \"./render/webgl/Target\";\r\nexport { PerformanceMetrics } from \"./render/webgl/PerformanceMetrics\";\r\nexport { type GLTimerResult, RenderDiagnostics, type RenderSystemDebugControl } from \"./render/RenderSystemDebugControl\";\r\nexport { formatAnimationBranchId } from \"./render/AnimationBranchState\";\r\nexport { PrimitiveVisibility, type RenderTargetDebugControl } from \"./render/RenderTargetDebugControl\";\r\n\r\n// Used by frontend-tiles, map-layers-formats, frontend-dev-tools\r\nexport {\r\n acquireImdlDecoder,\r\n appendQueryParams,\r\n ArcGisErrorCode,\r\n ArcGisGeometryReaderJSON,\r\n type ArcGisGetServiceJsonArgs,\r\n ArcGISImageryProvider,\r\n type ArcGISServiceMetadata,\r\n ArcGisUtilities,\r\n type ArcGisValidateSourceArgs,\r\n createSpatialTileTreeReferences,\r\n deflateCoordinates,\r\n type FeatureAttributeDrivenSymbology,\r\n FeatureGeometryBaseRenderer,\r\n type FeatureGeometryRenderer,\r\n FeatureGraphicsRenderer,\r\n type FeatureSymbolizedRenderer,\r\n type FeatureSymbologyRenderer,\r\n GltfReader,\r\n type GltfReaderArgs,\r\n type GltfReaderResult,\r\n type GraphicsGeometryRenderer,\r\n ImageryMapTileTree,\r\n type ImdlDecoder,\r\n ImdlReader,\r\n type MapLayerInfoFromTileTree,\r\n MapTileTreeReference,\r\n RealityModelTileUtils,\r\n RealityTileLoader,\r\n SpatialTileTreeReferences,\r\n type WGS84Extent,\r\n WmsUtilities,\r\n LayerTileTreeHandler, type MapLayerTreeSetting, LayerTileTreeReferenceHandler\r\n} from \"../tile/internal\";\r\nexport { GoogleMapsDecorator, LogoDecoration } from \"./GoogleMapsDecorator\";\r\n\r\n// Used by display-test-app which currently builds using both ESModules and CommonJS.\r\n// Remove once CommonJS is dropped.\r\nexport { DebugShaderFile } from \"./render/RenderSystemDebugControl\";\r\nexport { IModelTileTree } from \"./tile/IModelTileTree\";\r\n"]}
@@ -10,10 +10,11 @@ import { IModelConnection } from "../../IModelConnection";
10
10
  import { PlanarClipMaskState } from "../../PlanarClipMaskState";
11
11
  import { RealityDataSource } from "../../RealityDataSource";
12
12
  import { RenderMemory } from "../../render/RenderMemory";
13
- import { SceneContext } from "../../ViewContext";
13
+ import { DecorateContext, SceneContext } from "../../ViewContext";
14
14
  import { ViewState } from "../../ViewState";
15
15
  import { DisclosedTileTreeSet, GeometryTileTreeReference, LayerTileTreeHandler, MapLayerTileTreeReference, MapLayerTreeSetting, RealityTile, RealityTileTree, RealityTileTreeParams, SpatialClassifierTileTreeReference, TileDrawArgs, TileTree, TileTreeOwner, TileTreeReference } from "../../tile/internal";
16
16
  import { SpatialClassifiersState } from "../../SpatialClassifiersState";
17
+ import { ScreenViewport } from "../../Viewport";
17
18
  export declare function createRealityTileTreeReference(props: RealityModelTileTree.ReferenceProps): RealityModelTileTree.Reference;
18
19
  export declare class RealityTileRegion {
19
20
  constructor(values: {
@@ -128,6 +129,7 @@ export declare class RealityTreeReference extends RealityModelTileTree.Reference
128
129
  protected _rdSourceKey: RealityDataSourceKey;
129
130
  private readonly _produceGeometry?;
130
131
  private readonly _modelId;
132
+ readonly useCachedDecorations?: true | undefined;
131
133
  constructor(props: RealityModelTileTree.ReferenceProps);
132
134
  get modelId(): string;
133
135
  private createTreeId;
@@ -143,6 +145,7 @@ export declare class RealityTreeReference extends RealityModelTileTree.Reference
143
145
  private _getToolTip;
144
146
  /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */
145
147
  addLogoCards(cards: HTMLTableElement): void;
146
- addAttributions(cards: HTMLTableElement): Promise<void>;
148
+ addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void>;
149
+ decorate(_context: DecorateContext): void;
147
150
  }
148
151
  //# sourceMappingURL=RealityModelTileTree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RealityModelTileTree.d.ts","sourceRoot":"","sources":["../../../../src/internal/tile/RealityModelTileTree.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAE+C,UAAU,EAC/D,MAAM,qBAAqB,CAAC;AAC7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AE,OAAO,CAAA;KAAE,GAClE,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAiB/B;CAqDF;AAED;GACG;AACH,qBAAa,oBAAqB,SAAQ,oBAAoB,CAAC,SAAS;IACtE,SAAS,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC7C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAU;IAC5C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAa;IACtC,SAAgB,oBAAoB,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;gBAErC,KAAK,EAAE,oBAAoB,CAAC,cAAc;IAwB7D,IAAoB,OAAO,WAA4B;IAEvD,OAAO,CAAC,YAAY;IAYpB,IAAW,SAAS,IAAI,aAAa,CAEpC;cAEkB,4BAA4B,IAAI,yBAAyB;IAe5E,OAAO,KAAK,aAAa,GAExB;IAED,IAAoB,YAAY,YAE/B;IAED,cAAuB,kBAAkB,IAAI,OAAO,CAEnD;IAEe,cAAc,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,GAAG,SAAS;IAmB/D,UAAU,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAWvC,gBAAgB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO;IAUnC,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;IAc3F,OAAO,CAAC,WAAW;IA+CjB,sGAAsG;IACxF,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAOrC,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAOjF,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;CAM1D"}
@@ -226,7 +226,7 @@ class RealityModelTileTreeProps {
226
226
  this.maximumScreenSpaceError = json.asset.extras?.maximumScreenSpaceError;
227
227
  }
228
228
  else if (rdSource.usesGeometricError) {
229
- this.maximumScreenSpaceError = rdSource.maximumScreenSpaceError ?? 1;
229
+ this.maximumScreenSpaceError = rdSource.maximumScreenSpaceError ?? 16;
230
230
  }
231
231
  }
232
232
  }
@@ -660,6 +660,7 @@ class RealityTreeReference extends RealityModelTileTree.Reference {
660
660
  _rdSourceKey;
661
661
  _produceGeometry;
662
662
  _modelId;
663
+ useCachedDecorations;
663
664
  constructor(props) {
664
665
  super(props);
665
666
  this._produceGeometry = props.produceGeometry;
@@ -676,6 +677,8 @@ class RealityTreeReference extends RealityModelTileTree.Reference {
676
677
  modelId = realityTreeSupplier.findCompatibleContextRealityModelId(treeId, this._source);
677
678
  }
678
679
  this._modelId = modelId ?? props.iModel.transientIds.getNext();
680
+ const provider = IModelApp_1.IModelApp.realityDataSourceProviders.find(this._rdSourceKey.provider);
681
+ this.useCachedDecorations = provider?.useCachedDecorations;
679
682
  }
680
683
  get modelId() { return this._modelId; }
681
684
  createTreeId(modelId) {
@@ -804,9 +807,17 @@ class RealityTreeReference extends RealityModelTileTree.Reference {
804
807
  cards.appendChild(IModelApp_1.IModelApp.makeLogoCard({ heading: "OpenStreetMap", notice: `&copy;<a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> ${IModelApp_1.IModelApp.localization.getLocalizedString("iModelJs:BackgroundMap:OpenStreetMapContributors")}` }));
805
808
  }
806
809
  }
807
- async addAttributions(cards) {
808
- // eslint-disable-next-line @typescript-eslint/no-deprecated
809
- return Promise.resolve(this.addLogoCards(cards));
810
+ async addAttributions(cards, vp) {
811
+ const provider = IModelApp_1.IModelApp.realityDataSourceProviders.find(this._rdSourceKey.provider);
812
+ if (provider?.addAttributions) {
813
+ await provider.addAttributions(cards, vp);
814
+ }
815
+ }
816
+ decorate(_context) {
817
+ const provider = IModelApp_1.IModelApp.realityDataSourceProviders.find(this._rdSourceKey.provider);
818
+ if (provider?.decorate) {
819
+ provider.decorate(_context);
820
+ }
810
821
  }
811
822
  }
812
823
  exports.RealityTreeReference = RealityTreeReference;