@itwin/core-frontend 5.14.0-dev.9 → 5.15.0-dev.2
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.
- package/CHANGELOG.md +38 -1
- package/lib/cjs/GeoServices.d.ts +3 -0
- package/lib/cjs/GeoServices.d.ts.map +1 -1
- package/lib/cjs/GeoServices.js +8 -1
- package/lib/cjs/GeoServices.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +1 -0
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +1 -0
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +7 -2
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/extension/ExtensionAdmin.d.ts +0 -2
- package/lib/cjs/extension/ExtensionAdmin.d.ts.map +1 -1
- package/lib/cjs/extension/ExtensionAdmin.js +44 -22
- package/lib/cjs/extension/ExtensionAdmin.js.map +1 -1
- package/lib/cjs/extension/ExtensionRuntime.js +1 -0
- package/lib/cjs/extension/ExtensionRuntime.js.map +1 -1
- package/lib/cjs/extension/providers/RemoteExtensionProvider.d.ts +1 -1
- package/lib/cjs/extension/providers/RemoteExtensionProvider.d.ts.map +1 -1
- package/lib/cjs/extension/providers/RemoteExtensionProvider.js +2 -2
- package/lib/cjs/extension/providers/RemoteExtensionProvider.js.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js +16 -19
- package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts +2 -0
- package/lib/cjs/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.js +1 -0
- package/lib/cjs/internal/render/webgl/Target.js.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts +11 -5
- package/lib/cjs/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/OrbitGtTileTree.js +37 -13
- package/lib/cjs/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts +5 -3
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.js +7 -2
- package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +3 -1
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/esm/GeoServices.d.ts +3 -0
- package/lib/esm/GeoServices.d.ts.map +1 -1
- package/lib/esm/GeoServices.js +8 -1
- package/lib/esm/GeoServices.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +1 -0
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +1 -0
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +7 -2
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/extension/ExtensionAdmin.d.ts +0 -2
- package/lib/esm/extension/ExtensionAdmin.d.ts.map +1 -1
- package/lib/esm/extension/ExtensionAdmin.js +44 -22
- package/lib/esm/extension/ExtensionAdmin.js.map +1 -1
- package/lib/esm/extension/ExtensionRuntime.js +1 -0
- package/lib/esm/extension/ExtensionRuntime.js.map +1 -1
- package/lib/esm/extension/providers/RemoteExtensionProvider.d.ts +1 -1
- package/lib/esm/extension/providers/RemoteExtensionProvider.d.ts.map +1 -1
- package/lib/esm/extension/providers/RemoteExtensionProvider.js +2 -2
- package/lib/esm/extension/providers/RemoteExtensionProvider.js.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js +16 -19
- package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts +2 -0
- package/lib/esm/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Target.js +1 -0
- package/lib/esm/internal/render/webgl/Target.js.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts +11 -5
- package/lib/esm/internal/tile/OrbitGtTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/OrbitGtTileTree.js +36 -12
- package/lib/esm/internal/tile/OrbitGtTileTree.js.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts +5 -3
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.js +7 -2
- package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +3 -1
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/package.json +20 -20
|
@@ -34,8 +34,6 @@ export declare class ExtensionAdmin {
|
|
|
34
34
|
* @param hostUrl (string) Accepts both URLs and hostnames (e.g., http://localhost:3000, yourdomain.com, https://www.yourdomain.com, etc.).
|
|
35
35
|
*/
|
|
36
36
|
registerHost(hostUrl: string): void;
|
|
37
|
-
/** Returns the hostname of an input string. Throws an error if input is not a valid hostname (or URL). */
|
|
38
|
-
private getHostName;
|
|
39
37
|
/** Loops over all enabled Extensions and triggers each one if the provided event is defined. */
|
|
40
38
|
private activateExtensionEvents;
|
|
41
39
|
/** Executes the extension. Catches and logs any errors (so that an extension will not crash the main application). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionAdmin.d.ts","sourceRoot":"","sources":["../../../src/extension/ExtensionAdmin.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ExtensionAdmin.d.ts","sourceRoot":"","sources":["../../../src/extension/ExtensionAdmin.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA0DxE;;;GAGG;AACH,qBAAa,cAAc;IACzB,2GAA2G;IAC3G,OAAO,CAAC,WAAW,CAA0E;IAC7F,OAAO,CAAC,MAAM,CAAW;IAEzB;;OAEG;IACI,SAAS,sBAEd;;IAMF;;;;;OAKG;IACU,YAAY,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBrE;;;;OAIG;IACU,aAAa,CAAC,SAAS,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAM3E;;;;OAIG;IACI,YAAY,CAAC,OAAO,EAAE,MAAM;IAOnC,gGAAgG;YAClF,uBAAuB;IAarC,sHAAsH;YACxG,QAAQ;CAOvB"}
|
|
@@ -7,6 +7,45 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Logger } from "@itwin/core-bentley";
|
|
9
9
|
import { FrontendLoggerCategory } from "../common/FrontendLoggerCategory";
|
|
10
|
+
/** The Extensions loading system has the following goals:
|
|
11
|
+
* 1. Only fetch what is needed when it is required
|
|
12
|
+
* 1. Load a manifest file
|
|
13
|
+
* 2. Load the the main module when necessary (usually at an activation event)
|
|
14
|
+
* 2. Download the extension's files
|
|
15
|
+
*
|
|
16
|
+
* 3 ways to load an Extension into the system:
|
|
17
|
+
*
|
|
18
|
+
* 1. Load both the Extension Manifest and import the main module of the extension from a local file/package.
|
|
19
|
+
* 2. A minimum set of properties to get the manifest and javascript from a remote server.
|
|
20
|
+
* 3. A minimum set of properties to get the manifest and javascript from Bentley's Extension Service.
|
|
21
|
+
*
|
|
22
|
+
* An Extension must be added to ExtensionAdmin before it can be executed during activation events.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Normalizes hostnames for comparison.
|
|
26
|
+
* @returns The normalized hostname of a URL or bare hostname.
|
|
27
|
+
* @throws Error if the input cannot be parsed, or does not contain a hostname.
|
|
28
|
+
*/
|
|
29
|
+
function normalizeHostname(input) {
|
|
30
|
+
const invalid = () => new Error(`"${input}" is not a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).`);
|
|
31
|
+
// inputs without a scheme (e.g., https://) will throw an error in the URL constructor
|
|
32
|
+
const inputWithScheme = /^[a-z][a-z0-9+\-.]*:\/\//i.test(input) ? input : `https://${input}`;
|
|
33
|
+
let hostname;
|
|
34
|
+
try {
|
|
35
|
+
hostname = new URL(inputWithScheme).hostname.toLowerCase();
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
throw invalid();
|
|
39
|
+
}
|
|
40
|
+
// strip only a leading "www." label - removing "www" anywhere would make unrelated
|
|
41
|
+
// hosts like "wwwexample.com" compare equal to "example.com"
|
|
42
|
+
const normalized = hostname.startsWith("www.") ? hostname.substring("www.".length) : hostname;
|
|
43
|
+
// schemes with an optional or opaque host (e.g. file:///, data:) parse successfully but carry no
|
|
44
|
+
// hostname, and an input of just "www." normalizes to nothing. Neither can identify a host.
|
|
45
|
+
if (normalized.length === 0)
|
|
46
|
+
throw invalid();
|
|
47
|
+
return normalized;
|
|
48
|
+
}
|
|
10
49
|
/** The Extension Admin controls the list of currently loaded Extensions.
|
|
11
50
|
*
|
|
12
51
|
* @alpha
|
|
@@ -31,10 +70,10 @@ export class ExtensionAdmin {
|
|
|
31
70
|
* @alpha
|
|
32
71
|
*/
|
|
33
72
|
async addExtension(provider) {
|
|
34
|
-
if (provider.hostname) {
|
|
35
|
-
const
|
|
36
|
-
if (this._hosts.
|
|
37
|
-
throw new Error(`Error loading extension: ${
|
|
73
|
+
if (provider.hostname !== undefined && this._hosts.length > 0) {
|
|
74
|
+
const hostname = normalizeHostname(provider.hostname);
|
|
75
|
+
if (this._hosts.indexOf(hostname) < 0) {
|
|
76
|
+
throw new Error(`Error loading extension: ${provider.hostname} was not registered.`);
|
|
38
77
|
}
|
|
39
78
|
}
|
|
40
79
|
try {
|
|
@@ -65,28 +104,11 @@ export class ExtensionAdmin {
|
|
|
65
104
|
* @param hostUrl (string) Accepts both URLs and hostnames (e.g., http://localhost:3000, yourdomain.com, https://www.yourdomain.com, etc.).
|
|
66
105
|
*/
|
|
67
106
|
registerHost(hostUrl) {
|
|
68
|
-
const hostname =
|
|
107
|
+
const hostname = normalizeHostname(hostUrl);
|
|
69
108
|
if (this._hosts.indexOf(hostname) < 0) {
|
|
70
109
|
this._hosts.push(hostname);
|
|
71
110
|
}
|
|
72
111
|
}
|
|
73
|
-
/** Returns the hostname of an input string. Throws an error if input is not a valid hostname (or URL). */
|
|
74
|
-
getHostName(inputUrl) {
|
|
75
|
-
// inputs without a protocol (e.g., http://) will throw an error in URL constructor
|
|
76
|
-
const inputWithProtocol = /(http|https):\/\//.test(inputUrl) ?
|
|
77
|
-
inputUrl :
|
|
78
|
-
`https://${inputUrl}`;
|
|
79
|
-
try {
|
|
80
|
-
const hostname = new URL(inputWithProtocol).hostname.replace("www.", "");
|
|
81
|
-
return hostname;
|
|
82
|
-
}
|
|
83
|
-
catch (e) {
|
|
84
|
-
if (e instanceof TypeError) {
|
|
85
|
-
throw new Error("Argument hostUrl should be a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).");
|
|
86
|
-
}
|
|
87
|
-
throw e;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
112
|
/** Loops over all enabled Extensions and triggers each one if the provided event is defined. */
|
|
91
113
|
async activateExtensionEvents(event) {
|
|
92
114
|
for (const extension of this._extensions.values()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionAdmin.js","sourceRoot":"","sources":["../../../src/extension/ExtensionAdmin.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,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S,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAC/D,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,YAAY,CAAC,OAAe;QACjC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACtC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,gGAAgG;IACxF,KAAK,CAAC,uBAAuB,CAAC,KAAa;QACjD,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;YAClD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,gBAAgB;gBACtC,SAAS;YAEX,KAAK,MAAM,eAAe,IAAI,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;gBAClE,IAAI,eAAe,KAAK,KAAK,EAAE,CAAC;oBAC9B,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,8DAA8D;gBAC1F,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,sHAAsH;IAC9G,KAAK,CAAC,QAAQ,CAAC,SAA6B;QAClD,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,EAAE,6BAA6B,SAAS,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC3H,CAAC;IACH,CAAC;CACF","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 Extensions\r\n */\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\n\r\nimport { FrontendLoggerCategory } from \"../common/FrontendLoggerCategory\";\r\nimport type { ExtensionManifest, ExtensionProvider } from \"./Extension\";\r\n\r\n/** The Extensions loading system has the following goals:\r\n * 1. Only fetch what is needed when it is required\r\n * 1. Load a manifest file\r\n * 2. Load the the main module when necessary (usually at an activation event)\r\n * 2. Download the extension's files\r\n *\r\n * 3 ways to load an Extension into the system:\r\n *\r\n * 1. Load both the Extension Manifest and import the main module of the extension from a local file/package.\r\n * 2. A minimum set of properties to get the manifest and javascript from a remote server.\r\n * 3. A minimum set of properties to get the manifest and javascript from Bentley's Extension Service.\r\n *\r\n * An Extension must be added to ExtensionAdmin before it can be executed during activation events.\r\n */\r\n\r\n/**\r\n * Normalizes hostnames for comparison.\r\n * @returns The normalized hostname of a URL or bare hostname.\r\n * @throws Error if the input cannot be parsed, or does not contain a hostname.\r\n */\r\nfunction normalizeHostname(input: string): string {\r\n const invalid = () => new Error(`\"${input}\" is not a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).`);\r\n\r\n // inputs without a scheme (e.g., https://) will throw an error in the URL constructor\r\n const inputWithScheme = /^[a-z][a-z0-9+\\-.]*:\\/\\//i.test(input) ? input : `https://${input}`;\r\n\r\n let hostname;\r\n try {\r\n hostname = new URL(inputWithScheme).hostname.toLowerCase();\r\n } catch {\r\n throw invalid();\r\n }\r\n\r\n // strip only a leading \"www.\" label - removing \"www\" anywhere would make unrelated\r\n // hosts like \"wwwexample.com\" compare equal to \"example.com\"\r\n const normalized = hostname.startsWith(\"www.\") ? hostname.substring(\"www.\".length) : hostname;\r\n\r\n // schemes with an optional or opaque host (e.g. file:///, data:) parse successfully but carry no\r\n // hostname, and an input of just \"www.\" normalizes to nothing. Neither can identify a host.\r\n if (normalized.length === 0)\r\n throw invalid();\r\n\r\n return normalized;\r\n}\r\n\r\n/**\r\n * A \"ready to use\" Extension (contains a manifest object and an extension provider to help execute).\r\n * Will be used as the type for in-memory extensions in the ExtensionAdmin\r\n */\r\ninterface InstalledExtension {\r\n /** An extension provider that has been added to ExtensionAdmin */\r\n provider: ExtensionProvider;\r\n /** The manifest (package.json) of the extension */\r\n manifest: ExtensionManifest;\r\n}\r\n\r\n/** The Extension Admin controls the list of currently loaded Extensions.\r\n *\r\n * @alpha\r\n */\r\nexport class ExtensionAdmin {\r\n /** Defines the set of extensions that are currently known and can be invoked during activation events. */\r\n private _extensions: Map<string, InstalledExtension> = new Map<string, InstalledExtension>();\r\n private _hosts: string[];\r\n\r\n /** Fired when an Extension has been added or removed.\r\n * @internal\r\n */\r\n public onStartup = async () => {\r\n await this.activateExtensionEvents(\"onStartup\");\r\n };\r\n\r\n public constructor() {\r\n this._hosts = [];\r\n }\r\n\r\n /**\r\n * Adds an extension.\r\n * The manifest will be fetched and the extension will be activated on an activation event.\r\n * @param provider\r\n * @alpha\r\n */\r\n public async addExtension(provider: ExtensionProvider): Promise<void> {\r\n if (provider.hostname !== undefined && this._hosts.length > 0) {\r\n const hostname = normalizeHostname(provider.hostname);\r\n if (this._hosts.indexOf(hostname) < 0) {\r\n throw new Error(`Error loading extension: ${provider.hostname} was not registered.`);\r\n }\r\n }\r\n try {\r\n const manifest = await provider.getManifest();\r\n this._extensions.set(manifest.name, {\r\n manifest,\r\n provider,\r\n });\r\n // TODO - temporary fix to execute the missed startup event\r\n if (manifest.activationEvents.includes(\"onStartup\"))\r\n provider.execute(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n } catch (e) {\r\n throw new Error(`Failed to get extension manifest ${provider.hostname ? `at ${provider.hostname}` : \"\"}: ${String(e)}`);\r\n }\r\n }\r\n\r\n /**\r\n * Adds a list of extensions\r\n * @param providers\r\n * @alpha\r\n */\r\n public async addExtensions(providers: ExtensionProvider[]): Promise<void[]> {\r\n return Promise.all(\r\n providers.map(async (provider) => this.addExtension(provider)),\r\n );\r\n }\r\n\r\n /**\r\n * Registers a hostname for an extension.\r\n * Once a hostname has been registered, only remote extensions from registered hosts are permitted to be added.\r\n * @param hostUrl (string) Accepts both URLs and hostnames (e.g., http://localhost:3000, yourdomain.com, https://www.yourdomain.com, etc.).\r\n */\r\n public registerHost(hostUrl: string) {\r\n const hostname = normalizeHostname(hostUrl);\r\n if (this._hosts.indexOf(hostname) < 0) {\r\n this._hosts.push(hostname);\r\n }\r\n }\r\n\r\n /** Loops over all enabled Extensions and triggers each one if the provided event is defined. */\r\n private async activateExtensionEvents(event: string) {\r\n for (const extension of this._extensions.values()) {\r\n if (!extension.manifest.activationEvents)\r\n continue;\r\n\r\n for (const activationEvent of extension.manifest.activationEvents) {\r\n if (activationEvent === event) {\r\n this._execute(extension); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Executes the extension. Catches and logs any errors (so that an extension will not crash the main application). */\r\n private async _execute(extension: InstalledExtension) {\r\n try {\r\n await extension.provider.execute();\r\n } catch (e) {\r\n Logger.logError(FrontendLoggerCategory.Extensions, `Error executing extension ${extension.manifest.name}: ${String(e)}`);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
9
9
|
/* eslint-disable @itwin/no-internal-barrel-imports */
|
|
10
10
|
/* eslint-disable sort-imports */
|
|
11
|
+
/* eslint-disable @typescript-eslint/no-deprecated -- the extension runtime must keep exposing deprecated public APIs until they are removed */
|
|
11
12
|
import { ExtensionHost } from "./ExtensionHost";
|
|
12
13
|
const globalSymbol = Symbol.for("itwin.core.frontend.globals");
|
|
13
14
|
if (globalThis[globalSymbol]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionRuntime.js","sourceRoot":"","sources":["../../../src/extension/ExtensionRuntime.ts"],"names":[],"mappings":"AAAA;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YAAY;YACZ,GAAG,gBAAgB;SACpB;KACF,CAAC;AACJ,CAAC,CAAC;AAED,UAAkB,CAAC,YAAY,CAAC,GAAG;IAClC,KAAK,EAAE,IAAI,KAAK,EAAE,CAAC,KAAK;IACxB,eAAe;CAChB,CAAC","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 Extensions\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @itwin/no-internal-barrel-imports */\r\n/* eslint-disable sort-imports */\r\n\r\nimport { ExtensionHost } from \"./ExtensionHost\";\r\n\r\nconst globalSymbol = Symbol.for(\"itwin.core.frontend.globals\");\r\nif ((globalThis as any)[globalSymbol]) {\r\n // Get the stack trace from when the module was first loaded\r\n const firstLoadStack = (globalThis as any)[globalSymbol].stack;\r\n\r\n const error = new Error(\r\n \"Multiple @itwin/core-frontend imports detected! This may happen if:\\n\" +\r\n \"- You have multiple versions of the package installed\\n\" +\r\n \"- Your bundling configuration is incorrect\\n\" +\r\n \"- You're importing from both ESM and CommonJS versions\"\r\n );\r\n\r\n /* eslint-disable no-console */\r\n console.error(\"Duplicate @itwin/core-frontend import:\", error);\r\n console.error(\"First import occurred at:\", firstLoadStack);\r\n console.error(\"Current import occurred at:\", error.stack);\r\n /* eslint-enable no-console */\r\n\r\n throw error;\r\n}\r\n\r\n// BEGIN GENERATED CODE\r\nimport {\r\n // @public enum(s) from @itwin/core-frontend\r\n ACSDisplayOptions,\r\n ACSType,\r\n ActivityMessageEndReason,\r\n BeButton,\r\n BeModifierKeys,\r\n ClipEventType,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n EventHandled,\r\n FlashMode,\r\n FrontendLoggerCategory,\r\n GraphicType,\r\n HitDetailType,\r\n HitGeomType,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n InputSource,\r\n KeyinParseError,\r\n LocateAction,\r\n LocateFilterStatus,\r\n ManipulatorToolEvent,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSetEventType,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n StandardViewId,\r\n StartOrResume,\r\n TileBoundingBoxes,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileTreeLoadStatus,\r\n TileVisibility,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n UniformType,\r\n VaryingType,\r\n ViewStatus,\r\n // @public real(s) from @itwin/core-frontend\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n Cluster,\r\n ContextRealityModelState,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n EditManipulator,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n FeatureSymbology,\r\n FlashSettings,\r\n FrustumAnimator,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GlobeAnimator,\r\n GraphicAssembler,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n HiliteSet,\r\n HitDetail,\r\n HitList,\r\n IModelConnection,\r\n IconSprites,\r\n InputCollector,\r\n InteractiveTool,\r\n IntersectDetail,\r\n LocateOptions,\r\n LocateResponse,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n ModelSelectorState,\r\n ModelState,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n ParticleCollectionBuilder,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PrimitiveTool,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SelectionSet,\r\n SheetModelState,\r\n SheetViewState,\r\n SnapDetail,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n TentativePoint,\r\n Tile,\r\n TileAdmin,\r\n TileDrawArgs,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n} from \"../core-frontend\";\r\n\r\nimport {\r\n // @public enum(s) from @itwin/core-common\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n CommonLoggerCategory,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n ElementGeometryOpcode,\r\n FeatureOverrideType,\r\n FillDisplay,\r\n FillFlags,\r\n FontType,\r\n GeoCoordStatus,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeMode,\r\n GridOrientationType,\r\n HSVConstants,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n LinePixels,\r\n MassPropertiesOperation,\r\n MonochromeMode,\r\n Npc,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n QueryRowFormat,\r\n Rank,\r\n RenderMode,\r\n SectionType,\r\n SkyBoxImageType,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SyncMode,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n TxnAction,\r\n TypeOfChange,\r\n // @public real(s) from @itwin/core-common\r\n ClipIntersectionStyle,\r\n ColorByName,\r\n ColorDef,\r\n FrustumPlanes,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n} from \"@itwin/core-common\";\r\n\r\nconst extensionExports = {\r\n ACSDisplayOptions,\r\n ACSType,\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n ActivityMessageEndReason,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BeButton,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeModifierKeys,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n ClipEventType,\r\n ClipIntersectionStyle,\r\n Cluster,\r\n ColorByName,\r\n ColorDef,\r\n CommonLoggerCategory,\r\n ContextRealityModelState,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n EditManipulator,\r\n ElementGeometryOpcode,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n EventHandled,\r\n FeatureOverrideType,\r\n FeatureSymbology,\r\n FillDisplay,\r\n FillFlags,\r\n FlashMode,\r\n FlashSettings,\r\n FontType,\r\n FrontendLoggerCategory,\r\n FrustumAnimator,\r\n FrustumPlanes,\r\n GeoCoordStatus,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeAnimator,\r\n GlobeMode,\r\n GraphicAssembler,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n GraphicType,\r\n GridOrientationType,\r\n HSVConstants,\r\n HiliteSet,\r\n HitDetail,\r\n HitDetailType,\r\n HitGeomType,\r\n HitList,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n IModelConnection,\r\n IconSprites,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n InputCollector,\r\n InputSource,\r\n InteractiveTool,\r\n IntersectDetail,\r\n KeyinParseError,\r\n LinePixels,\r\n LocateAction,\r\n LocateFilterStatus,\r\n LocateOptions,\r\n LocateResponse,\r\n ManipulatorToolEvent,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n MassPropertiesOperation,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n ModelSelectorState,\r\n ModelState,\r\n MonochromeMode,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n Npc,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n ParticleCollectionBuilder,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n PrimitiveTool,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n QueryRowFormat,\r\n Rank,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderMode,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SectionType,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSet,\r\n SelectionSetEventType,\r\n SheetModelState,\r\n SheetViewState,\r\n SkyBoxImageType,\r\n SnapDetail,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n StandardViewId,\r\n StartOrResume,\r\n SyncMode,\r\n TentativePoint,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n Tile,\r\n TileAdmin,\r\n TileBoundingBoxes,\r\n TileDrawArgs,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeLoadStatus,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n TileVisibility,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n TxnAction,\r\n TypeOfChange,\r\n UniformType,\r\n VaryingType,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewStatus,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n};\r\n\r\n// END GENERATED CODE\r\n\r\nconst getExtensionApi = (_id: string) => {\r\n return {\r\n exports: {\r\n // exceptions\r\n ExtensionHost,\r\n // automated\r\n ...extensionExports,\r\n },\r\n };\r\n};\r\n\r\n(globalThis as any)[globalSymbol] = {\r\n stack: new Error().stack,\r\n getExtensionApi,\r\n};"]}
|
|
1
|
+
{"version":3,"file":"ExtensionRuntime.js","sourceRoot":"","sources":["../../../src/extension/ExtensionRuntime.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,yDAAyD;AACzD,sDAAsD;AACtD,iCAAiC;AACjC,+IAA+I;AAE/I,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC/D,IAAK,UAAkB,CAAC,YAAY,CAAC,EAAE,CAAC;IACtC,4DAA4D;IAC5D,MAAM,cAAc,GAAI,UAAkB,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC;IAE/D,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,uEAAuE;QACrE,yDAAyD;QACzD,8CAA8C;QAC9C,wDAAwD,CAC3D,CAAC;IAEF,+BAA+B;IAC/B,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;IAC/D,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,cAAc,CAAC,CAAC;IAC3D,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,8BAA8B;IAE9B,MAAM,KAAK,CAAC;AACd,CAAC;AAED,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IACR,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,mBAAmB;IACnB,6BAA6B;IAC7B,qBAAqB;IACrB,oBAAoB;IACpB,gBAAgB;IAChB,4BAA4B;IAC5B,2BAA2B;IAC3B,+BAA+B;IAC/B,sBAAsB;IACtB,6BAA6B;IAC7B,mBAAmB;IACnB,uBAAuB;IACvB,2BAA2B;IAC3B,mBAAmB;IACnB,2BAA2B;IAC3B,mBAAmB;IACnB,gBAAgB;IAChB,yBAAyB;IACzB,wBAAwB;CACzB,CAAC;AAEF,qBAAqB;AAErB,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,OAAO;QACL,OAAO,EAAE;YACP,aAAa;YACb,aAAa;YACb,YAAY;YACZ,GAAG,gBAAgB;SACpB;KACF,CAAC;AACJ,CAAC,CAAC;AAED,UAAkB,CAAC,YAAY,CAAC,GAAG;IAClC,KAAK,EAAE,IAAI,KAAK,EAAE,CAAC,KAAK;IACxB,eAAe;CAChB,CAAC","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 Extensions\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n/* eslint-disable @itwin/no-internal-barrel-imports */\r\n/* eslint-disable sort-imports */\r\n/* eslint-disable @typescript-eslint/no-deprecated -- the extension runtime must keep exposing deprecated public APIs until they are removed */\r\n\r\nimport { ExtensionHost } from \"./ExtensionHost\";\r\n\r\nconst globalSymbol = Symbol.for(\"itwin.core.frontend.globals\");\r\nif ((globalThis as any)[globalSymbol]) {\r\n // Get the stack trace from when the module was first loaded\r\n const firstLoadStack = (globalThis as any)[globalSymbol].stack;\r\n\r\n const error = new Error(\r\n \"Multiple @itwin/core-frontend imports detected! This may happen if:\\n\" +\r\n \"- You have multiple versions of the package installed\\n\" +\r\n \"- Your bundling configuration is incorrect\\n\" +\r\n \"- You're importing from both ESM and CommonJS versions\"\r\n );\r\n\r\n /* eslint-disable no-console */\r\n console.error(\"Duplicate @itwin/core-frontend import:\", error);\r\n console.error(\"First import occurred at:\", firstLoadStack);\r\n console.error(\"Current import occurred at:\", error.stack);\r\n /* eslint-enable no-console */\r\n\r\n throw error;\r\n}\r\n\r\n// BEGIN GENERATED CODE\r\nimport {\r\n // @public enum(s) from @itwin/core-frontend\r\n ACSDisplayOptions,\r\n ACSType,\r\n ActivityMessageEndReason,\r\n BeButton,\r\n BeModifierKeys,\r\n ClipEventType,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n EventHandled,\r\n FlashMode,\r\n FrontendLoggerCategory,\r\n GraphicType,\r\n HitDetailType,\r\n HitGeomType,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n InputSource,\r\n KeyinParseError,\r\n LocateAction,\r\n LocateFilterStatus,\r\n ManipulatorToolEvent,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSetEventType,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n StandardViewId,\r\n StartOrResume,\r\n TileBoundingBoxes,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileTreeLoadStatus,\r\n TileVisibility,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n UniformType,\r\n VaryingType,\r\n ViewStatus,\r\n // @public real(s) from @itwin/core-frontend\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n Cluster,\r\n ContextRealityModelState,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n EditManipulator,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n FeatureSymbology,\r\n FlashSettings,\r\n FrustumAnimator,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GlobeAnimator,\r\n GraphicAssembler,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n HiliteSet,\r\n HitDetail,\r\n HitList,\r\n IModelConnection,\r\n IconSprites,\r\n InputCollector,\r\n InteractiveTool,\r\n IntersectDetail,\r\n LocateOptions,\r\n LocateResponse,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n ModelSelectorState,\r\n ModelState,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n ParticleCollectionBuilder,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PrimitiveTool,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SelectionSet,\r\n SheetModelState,\r\n SheetViewState,\r\n SnapDetail,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n TentativePoint,\r\n Tile,\r\n TileAdmin,\r\n TileDrawArgs,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n} from \"../core-frontend\";\r\n\r\nimport {\r\n // @public enum(s) from @itwin/core-common\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n CommonLoggerCategory,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n ElementGeometryOpcode,\r\n FeatureOverrideType,\r\n FillDisplay,\r\n FillFlags,\r\n FontType,\r\n GeoCoordStatus,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeMode,\r\n GridOrientationType,\r\n HSVConstants,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n LinePixels,\r\n MassPropertiesOperation,\r\n MonochromeMode,\r\n Npc,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n QueryRowFormat,\r\n Rank,\r\n RenderMode,\r\n SectionType,\r\n SkyBoxImageType,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SyncMode,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n TxnAction,\r\n TypeOfChange,\r\n // @public real(s) from @itwin/core-common\r\n ClipIntersectionStyle,\r\n ColorByName,\r\n ColorDef,\r\n FrustumPlanes,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n} from \"@itwin/core-common\";\r\n\r\nconst extensionExports = {\r\n ACSDisplayOptions,\r\n ACSType,\r\n AccuDrawHintBuilder,\r\n AccuSnap,\r\n ActivityMessageDetails,\r\n ActivityMessageEndReason,\r\n AuxCoordSystem2dState,\r\n AuxCoordSystem3dState,\r\n AuxCoordSystemSpatialState,\r\n AuxCoordSystemState,\r\n BackgroundFill,\r\n BackgroundMapType,\r\n BatchType,\r\n BeButton,\r\n BeButtonEvent,\r\n BeButtonState,\r\n BeModifierKeys,\r\n BeTouchEvent,\r\n BeWheelEvent,\r\n BingElevationProvider,\r\n BingLocationProvider,\r\n BisCodeSpec,\r\n BriefcaseIdValue,\r\n CategorySelectorState,\r\n ChangeFlags,\r\n ChangeOpCode,\r\n ChangedValueState,\r\n ChangesetType,\r\n ClipEventType,\r\n ClipIntersectionStyle,\r\n Cluster,\r\n ColorByName,\r\n ColorDef,\r\n CommonLoggerCategory,\r\n ContextRealityModelState,\r\n ContextRotationId,\r\n CoordSource,\r\n CoordSystem,\r\n CoordinateLockOverrides,\r\n DecorateContext,\r\n Decorations,\r\n DisclosedTileTreeSet,\r\n DisplayStyle2dState,\r\n DisplayStyle3dState,\r\n DisplayStyleState,\r\n DrawingModelState,\r\n DrawingViewState,\r\n ECSqlSystemProperty,\r\n ECSqlValueType,\r\n EditManipulator,\r\n ElementGeometryOpcode,\r\n ElementLocateManager,\r\n ElementPicker,\r\n ElementState,\r\n EmphasizeElements,\r\n EntityState,\r\n EventController,\r\n EventHandled,\r\n FeatureOverrideType,\r\n FeatureSymbology,\r\n FillDisplay,\r\n FillFlags,\r\n FlashMode,\r\n FlashSettings,\r\n FontType,\r\n FrontendLoggerCategory,\r\n FrustumAnimator,\r\n FrustumPlanes,\r\n GeoCoordStatus,\r\n GeometricModel2dState,\r\n GeometricModel3dState,\r\n GeometricModelState,\r\n GeometryClass,\r\n GeometryStreamFlags,\r\n GeometrySummaryVerbosity,\r\n GlobeAnimator,\r\n GlobeMode,\r\n GraphicAssembler,\r\n GraphicBranch,\r\n GraphicBuilder,\r\n GraphicType,\r\n GridOrientationType,\r\n HSVConstants,\r\n HiliteSet,\r\n HitDetail,\r\n HitDetailType,\r\n HitGeomType,\r\n HitList,\r\n HitParentGeomType,\r\n HitPriority,\r\n HitSource,\r\n IModelConnection,\r\n IconSprites,\r\n ImageBufferFormat,\r\n ImageSourceFormat,\r\n InputCollector,\r\n InputSource,\r\n InteractiveTool,\r\n IntersectDetail,\r\n KeyinParseError,\r\n LinePixels,\r\n LocateAction,\r\n LocateFilterStatus,\r\n LocateOptions,\r\n LocateResponse,\r\n ManipulatorToolEvent,\r\n MarginPercent,\r\n Marker,\r\n MarkerSet,\r\n MassPropertiesOperation,\r\n MessageBoxIconType,\r\n MessageBoxType,\r\n MessageBoxValue,\r\n ModelSelectorState,\r\n ModelState,\r\n MonochromeMode,\r\n NotificationHandler,\r\n NotificationManager,\r\n NotifyMessageDetails,\r\n Npc,\r\n OffScreenViewport,\r\n OrthographicViewState,\r\n OutputMessageAlert,\r\n OutputMessagePriority,\r\n OutputMessageType,\r\n ParseAndRunResult,\r\n ParticleCollectionBuilder,\r\n PerModelCategoryVisibility,\r\n PhysicalModelState,\r\n Pixel,\r\n PlanarClipMaskMode,\r\n PlanarClipMaskPriority,\r\n PrimitiveTool,\r\n QParams2d,\r\n QParams3d,\r\n QPoint2d,\r\n QPoint2dBuffer,\r\n QPoint2dBufferBuilder,\r\n QPoint2dList,\r\n QPoint3d,\r\n QPoint3dBuffer,\r\n QPoint3dBufferBuilder,\r\n QPoint3dList,\r\n Quantization,\r\n QueryRowFormat,\r\n Rank,\r\n RenderClipVolume,\r\n RenderContext,\r\n RenderGraphic,\r\n RenderGraphicOwner,\r\n RenderMode,\r\n RenderSystem,\r\n Scene,\r\n ScreenViewport,\r\n SectionDrawingModelState,\r\n SectionType,\r\n SelectionMethod,\r\n SelectionMode,\r\n SelectionProcessing,\r\n SelectionSet,\r\n SelectionSetEventType,\r\n SheetModelState,\r\n SheetViewState,\r\n SkyBoxImageType,\r\n SnapDetail,\r\n SnapHeat,\r\n SnapMode,\r\n SnapStatus,\r\n SpatialClassifierInsideDisplay,\r\n SpatialClassifierOutsideDisplay,\r\n SpatialLocationModelState,\r\n SpatialModelState,\r\n SpatialViewState,\r\n Sprite,\r\n SpriteLocation,\r\n StandardViewId,\r\n StartOrResume,\r\n SyncMode,\r\n TentativePoint,\r\n TerrainHeightOriginMode,\r\n TextureMapUnits,\r\n ThematicDisplayMode,\r\n ThematicGradientColorScheme,\r\n ThematicGradientMode,\r\n ThematicGradientTransparencyMode,\r\n Tile,\r\n TileAdmin,\r\n TileBoundingBoxes,\r\n TileDrawArgs,\r\n TileGraphicType,\r\n TileLoadPriority,\r\n TileLoadStatus,\r\n TileRequest,\r\n TileRequestChannel,\r\n TileRequestChannelStatistics,\r\n TileRequestChannels,\r\n TileTree,\r\n TileTreeLoadStatus,\r\n TileTreeReference,\r\n TileUsageMarker,\r\n TileVisibility,\r\n Tiles,\r\n Tool,\r\n ToolAdmin,\r\n ToolAssistance,\r\n ToolAssistanceImage,\r\n ToolAssistanceInputMethod,\r\n ToolSettings,\r\n TwoWayViewportFrustumSync,\r\n TwoWayViewportSync,\r\n TxnAction,\r\n TypeOfChange,\r\n UniformType,\r\n VaryingType,\r\n ViewClipClearTool,\r\n ViewClipDecoration,\r\n ViewClipDecorationProvider,\r\n ViewClipTool,\r\n ViewCreator2d,\r\n ViewCreator3d,\r\n ViewManager,\r\n ViewManip,\r\n ViewPose,\r\n ViewPose2d,\r\n ViewPose3d,\r\n ViewRect,\r\n ViewState,\r\n ViewState2d,\r\n ViewState3d,\r\n ViewStatus,\r\n ViewTool,\r\n ViewingSpace,\r\n Viewport,\r\n canvasToImageBuffer,\r\n canvasToResizedCanvasWithBars,\r\n connectViewportFrusta,\r\n connectViewportViews,\r\n connectViewports,\r\n extractImageSourceDimensions,\r\n getCompressedJpegFromCanvas,\r\n getImageSourceFormatForMimeType,\r\n getImageSourceMimeType,\r\n imageBufferToBase64EncodedPng,\r\n imageBufferToCanvas,\r\n imageBufferToPngDataUrl,\r\n imageElementFromImageSource,\r\n imageElementFromUrl,\r\n queryTerrainElevationOffset,\r\n readElementGraphics,\r\n readGltfGraphics,\r\n synchronizeViewportFrusta,\r\n synchronizeViewportViews,\r\n};\r\n\r\n// END GENERATED CODE\r\n\r\nconst getExtensionApi = (_id: string) => {\r\n return {\r\n exports: {\r\n // exceptions\r\n ExtensionHost,\r\n // automated\r\n ...extensionExports,\r\n },\r\n };\r\n};\r\n\r\n(globalThis as any)[globalSymbol] = {\r\n stack: new Error().stack,\r\n getExtensionApi,\r\n};"]}
|
|
@@ -17,7 +17,7 @@ export interface RemoteExtensionProviderProps {
|
|
|
17
17
|
*/
|
|
18
18
|
export declare class RemoteExtensionProvider implements ExtensionProvider {
|
|
19
19
|
private readonly _props;
|
|
20
|
-
/** The
|
|
20
|
+
/** The hostname of the server where the extension is hosted. */
|
|
21
21
|
readonly hostname: string;
|
|
22
22
|
constructor(_props: RemoteExtensionProviderProps);
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteExtensionProvider.d.ts","sourceRoot":"","sources":["../../../../src/extension/providers/RemoteExtensionProvider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAItB;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,iBAAiB;IAInD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,
|
|
1
|
+
{"version":3,"file":"RemoteExtensionProvider.d.ts","sourceRoot":"","sources":["../../../../src/extension/providers/RemoteExtensionProvider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAItB;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,iBAAiB;IAInD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,gEAAgE;IAChE,SAAgB,QAAQ,EAAE,MAAM,CAAC;gBAEJ,MAAM,EAAE,4BAA4B;IAIjE;;;OAGG;IACU,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvC;;;OAGG;IACU,WAAW,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAIvD"}
|
|
@@ -8,11 +8,11 @@ import { loadScript } from "./ExtensionLoadScript";
|
|
|
8
8
|
*/
|
|
9
9
|
export class RemoteExtensionProvider {
|
|
10
10
|
_props;
|
|
11
|
-
/** The
|
|
11
|
+
/** The hostname of the server where the extension is hosted. */
|
|
12
12
|
hostname;
|
|
13
13
|
constructor(_props) {
|
|
14
14
|
this._props = _props;
|
|
15
|
-
this.hostname = new URL(this._props.jsUrl).hostname
|
|
15
|
+
this.hostname = new URL(this._props.jsUrl).hostname;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Attempts to execute an extension.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteExtensionProvider.js","sourceRoot":"","sources":["../../../../src/extension/providers/RemoteExtensionProvider.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAanD;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAIL;IAH7B,
|
|
1
|
+
{"version":3,"file":"RemoteExtensionProvider.js","sourceRoot":"","sources":["../../../../src/extension/providers/RemoteExtensionProvider.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAanD;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAIL;IAH7B,gEAAgE;IAChD,QAAQ,CAAS;IAEjC,YAA6B,MAAoC;QAApC,WAAM,GAAN,MAAM,CAA8B;QAC/D,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC;IACtD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,OAAO;QAClB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,WAAW;QACtB,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;CAEF","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\nimport type {\r\n ExtensionManifest,\r\n ExtensionProvider,\r\n} from \"../Extension\";\r\nimport { request } from \"../../request/Request\";\r\nimport { loadScript } from \"./ExtensionLoadScript\";\r\n\r\n/**\r\n * Required props for a remote extension provider\r\n * @alpha\r\n */\r\nexport interface RemoteExtensionProviderProps {\r\n /** URL where the extension entry point can be loaded from */\r\n jsUrl: string;\r\n /** URL where the manifest (package.json) can be loaded from */\r\n manifestUrl: string;\r\n}\r\n\r\n/**\r\n * Implements a \"remote\" extension.\r\n * Remote extensions are hosted on an external server.\r\n * The execute() and getManifest() methods are used by the ExtensionAdmin to load and execute the extension.\r\n * @alpha\r\n */\r\nexport class RemoteExtensionProvider implements ExtensionProvider {\r\n /** The hostname of the server where the extension is hosted. */\r\n public readonly hostname: string;\r\n\r\n constructor(private readonly _props: RemoteExtensionProviderProps) {\r\n this.hostname = new URL(this._props.jsUrl).hostname;\r\n }\r\n\r\n /**\r\n * Attempts to execute an extension.\r\n * Throws an error if the provided jsUrl is not accessible.\r\n */\r\n public async execute(): Promise<string> {\r\n return loadScript(this._props.jsUrl);\r\n }\r\n\r\n /**\r\n * Attempts to fetch an extension's manifest (package.json) file.\r\n * Throws an error if the provided manifestUrl is not accessible.\r\n */\r\n public async getManifest(): Promise<ExtensionManifest> {\r\n return request(this._props.manifestUrl, \"json\");\r\n }\r\n\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneCompositor.d.ts","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/SceneCompositor.ts"],"names":[],"mappings":"AAIA;;GAEG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB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K,CAAC,MAAM,GAAG,SAAS;aAC9E,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;aACzD,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;aACtD,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;aAC3D,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,qBAAqB,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI;aAC9F,iBAAiB,IAAI,IAAI;IAEzC,8GAA8G;IAC9G,aAAoB,oBAAoB,IAAI,WAAW,CAAC;IAExD,aAAoB,UAAU,IAAI,aAAa,CAAC;IAChD,aAAoB,aAAa,IAAI,aAAa,CAAC;IACnD,aAAoB,gBAAgB,IAAI,MAAM,CAAC;IAE/C,IAAW,eAAe,IAAI,OAAO,CAAkC;IAEvE,SAAS,aAAa,MAAM,EAAE,MAAM;WAOtB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe;aAIrC,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,GAAG,IAAI;CACxE"}
|
|
@@ -227,8 +227,8 @@ class FrameBuffers {
|
|
|
227
227
|
idsAndZComposite;
|
|
228
228
|
idsAndAltZComposite;
|
|
229
229
|
edlDrawCol;
|
|
230
|
-
init(textures, depth, depthMS) {
|
|
231
|
-
if (!this.initPotentialMSFbos(textures, depth, depthMS))
|
|
230
|
+
init(textures, depth, depthMS, boundColor) {
|
|
231
|
+
if (!this.initPotentialMSFbos(textures, depth, depthMS, boundColor))
|
|
232
232
|
return false;
|
|
233
233
|
this.depthAndOrder = FrameBuffer.create([expectDefined(textures.depthAndOrder)], depth);
|
|
234
234
|
this.hilite = FrameBuffer.create([expectDefined(textures.hilite)], depth);
|
|
@@ -236,7 +236,7 @@ class FrameBuffers {
|
|
|
236
236
|
if (!this.depthAndOrder || !this.hilite || !this.hiliteUsingStencil)
|
|
237
237
|
return false;
|
|
238
238
|
assert(undefined === this.opaqueAll);
|
|
239
|
-
if (!this.initPotentialMSMRTFbos(textures, depth, depthMS))
|
|
239
|
+
if (!this.initPotentialMSMRTFbos(textures, depth, depthMS, boundColor))
|
|
240
240
|
return false;
|
|
241
241
|
assert(undefined !== textures.accumulation && undefined !== textures.revealage);
|
|
242
242
|
const colors = [textures.accumulation, textures.revealage];
|
|
@@ -253,9 +253,8 @@ class FrameBuffers {
|
|
|
253
253
|
&& undefined !== this.clearTranslucent
|
|
254
254
|
&& undefined !== this.pingPong;
|
|
255
255
|
}
|
|
256
|
-
initPotentialMSFbos(textures, depth, depthMS) {
|
|
257
|
-
|
|
258
|
-
assert(undefined !== boundColor && undefined !== textures.color);
|
|
256
|
+
initPotentialMSFbos(textures, depth, depthMS, boundColor) {
|
|
257
|
+
assert(undefined !== textures.color);
|
|
259
258
|
if (undefined === depthMS) {
|
|
260
259
|
this.opaqueColor = FrameBuffer.create([boundColor], depth);
|
|
261
260
|
this.opaqueAndCompositeColor = FrameBuffer.create([textures.color], depth);
|
|
@@ -268,10 +267,8 @@ class FrameBuffers {
|
|
|
268
267
|
return undefined !== this.opaqueColor
|
|
269
268
|
&& undefined !== this.opaqueAndCompositeColor;
|
|
270
269
|
}
|
|
271
|
-
initPotentialMSMRTFbos(textures, depth, depthMs) {
|
|
272
|
-
|
|
273
|
-
assert(undefined !== boundColor &&
|
|
274
|
-
undefined !== textures.color &&
|
|
270
|
+
initPotentialMSMRTFbos(textures, depth, depthMs, boundColor) {
|
|
271
|
+
assert(undefined !== textures.color &&
|
|
275
272
|
undefined !== textures.featureId &&
|
|
276
273
|
undefined !== textures.depthAndOrder &&
|
|
277
274
|
undefined !== textures.accumulation &&
|
|
@@ -385,23 +382,23 @@ class FrameBuffers {
|
|
|
385
382
|
this.idsAndAltZComposite = dispose(this.idsAndAltZComposite);
|
|
386
383
|
}
|
|
387
384
|
}
|
|
388
|
-
enableMultiSampling(textures, depth, depthMS) {
|
|
385
|
+
enableMultiSampling(textures, depth, depthMS, boundColor) {
|
|
389
386
|
this.opaqueColor = dispose(this.opaqueColor);
|
|
390
387
|
this.opaqueAndCompositeColor = dispose(this.opaqueAndCompositeColor);
|
|
391
|
-
let rVal = this.initPotentialMSFbos(textures, depth, depthMS);
|
|
388
|
+
let rVal = this.initPotentialMSFbos(textures, depth, depthMS, boundColor);
|
|
392
389
|
this.opaqueAll = dispose(this.opaqueAll);
|
|
393
390
|
this.opaqueAndCompositeAll = dispose(this.opaqueAndCompositeAll);
|
|
394
|
-
rVal = this.initPotentialMSMRTFbos(textures, depth, depthMS);
|
|
391
|
+
rVal = this.initPotentialMSMRTFbos(textures, depth, depthMS, boundColor);
|
|
395
392
|
return rVal;
|
|
396
393
|
}
|
|
397
|
-
disableMultiSampling(textures, depth) {
|
|
394
|
+
disableMultiSampling(textures, depth, boundColor) {
|
|
398
395
|
this.opaqueAll = dispose(this.opaqueAll);
|
|
399
396
|
this.opaqueAndCompositeAll = dispose(this.opaqueAndCompositeAll);
|
|
400
|
-
if (!this.initPotentialMSMRTFbos(textures, depth, undefined))
|
|
397
|
+
if (!this.initPotentialMSMRTFbos(textures, depth, undefined, boundColor))
|
|
401
398
|
return false;
|
|
402
399
|
this.opaqueColor = dispose(this.opaqueColor);
|
|
403
400
|
this.opaqueAndCompositeColor = dispose(this.opaqueAndCompositeColor);
|
|
404
|
-
return this.initPotentialMSFbos(textures, depth, undefined);
|
|
401
|
+
return this.initPotentialMSFbos(textures, depth, undefined, boundColor);
|
|
405
402
|
}
|
|
406
403
|
get isDisposed() {
|
|
407
404
|
return undefined === this.opaqueColor && undefined === this.opaqueAndCompositeColor && undefined === this.depthAndOrder
|
|
@@ -1444,7 +1441,7 @@ class Compositor extends SceneCompositor {
|
|
|
1444
1441
|
this._depthMS = undefined;
|
|
1445
1442
|
if (this._depth !== undefined) {
|
|
1446
1443
|
return this._textures.init(this._width, this._height, this._antialiasSamples)
|
|
1447
|
-
&& this._fbos.init(this._textures, this._depth, this._depthMS)
|
|
1444
|
+
&& this._fbos.init(this._textures, this._depth, this._depthMS, expectDefined(this.target.outputColorTexture))
|
|
1448
1445
|
&& this._geom.init(this._textures)
|
|
1449
1446
|
&& this.eyeDomeLighting.init(this._width, this._height, this._depth);
|
|
1450
1447
|
}
|
|
@@ -1459,11 +1456,11 @@ class Compositor extends SceneCompositor {
|
|
|
1459
1456
|
if (!this._textures.enableMultiSampling(this._width, this._height, this._antialiasSamples))
|
|
1460
1457
|
return false;
|
|
1461
1458
|
assert(undefined !== this._depth && undefined !== this._depthMS);
|
|
1462
|
-
return this._fbos.enableMultiSampling(this._textures, this._depth, this._depthMS);
|
|
1459
|
+
return this._fbos.enableMultiSampling(this._textures, this._depth, this._depthMS, expectDefined(this.target.outputColorTexture));
|
|
1463
1460
|
}
|
|
1464
1461
|
disableMultiSampling() {
|
|
1465
1462
|
assert(undefined !== this._depth);
|
|
1466
|
-
if (!this._fbos.disableMultiSampling(this._textures, this._depth))
|
|
1463
|
+
if (!this._fbos.disableMultiSampling(this._textures, this._depth, expectDefined(this.target.outputColorTexture)))
|
|
1467
1464
|
return false;
|
|
1468
1465
|
// Want to disable multisampling without deleting & reallocating other stuff.
|
|
1469
1466
|
this._depthMS = dispose(this._depthMS);
|