@babylonjs/viewer 5.0.0-rc.4 → 5.0.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/configuration/configuration.d.ts +107 -107
- package/configuration/configuration.js +15 -15
- package/configuration/configuration.js.map +1 -1
- package/configuration/configurationCompatibility.d.ts +8 -8
- package/configuration/configurationCompatibility.js +65 -65
- package/configuration/configurationCompatibility.js.map +1 -1
- package/configuration/configurationContainer.d.ts +10 -10
- package/configuration/configurationContainer.js +9 -9
- package/configuration/configurationContainer.js.map +1 -1
- package/configuration/globals.d.ts +6 -6
- package/configuration/globals.js +17 -17
- package/configuration/globals.js.map +1 -1
- package/configuration/index.d.ts +2 -2
- package/configuration/index.js +3 -2
- package/configuration/index.js.map +1 -1
- package/configuration/interfaces/cameraConfiguration.d.ts +31 -31
- package/configuration/interfaces/cameraConfiguration.js +1 -1
- package/configuration/interfaces/cameraConfiguration.js.map +1 -1
- package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -81
- package/configuration/interfaces/colorGradingConfiguration.js +1 -1
- package/configuration/interfaces/colorGradingConfiguration.js.map +1 -1
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -20
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +1 -1
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -1
- package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -22
- package/configuration/interfaces/environmentMapConfiguration.js +1 -1
- package/configuration/interfaces/environmentMapConfiguration.js.map +1 -1
- package/configuration/interfaces/groundConfiguration.d.ts +24 -24
- package/configuration/interfaces/groundConfiguration.js +1 -1
- package/configuration/interfaces/groundConfiguration.js.map +1 -1
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +43 -43
- package/configuration/interfaces/imageProcessingConfiguration.js +1 -1
- package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -1
- package/configuration/interfaces/index.d.ts +15 -15
- package/configuration/interfaces/index.js +15 -15
- package/configuration/interfaces/index.js.map +1 -1
- package/configuration/interfaces/lightConfiguration.d.ts +60 -60
- package/configuration/interfaces/lightConfiguration.js +1 -1
- package/configuration/interfaces/lightConfiguration.js.map +1 -1
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -26
- package/configuration/interfaces/modelAnimationConfiguration.js +1 -1
- package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -1
- package/configuration/interfaces/modelConfiguration.d.ts +65 -65
- package/configuration/interfaces/modelConfiguration.js +1 -1
- package/configuration/interfaces/modelConfiguration.js.map +1 -1
- package/configuration/interfaces/observersConfiguration.d.ts +5 -5
- package/configuration/interfaces/observersConfiguration.js +1 -1
- package/configuration/interfaces/observersConfiguration.js.map +1 -1
- package/configuration/interfaces/sceneConfiguration.d.ts +48 -48
- package/configuration/interfaces/sceneConfiguration.js +1 -1
- package/configuration/interfaces/sceneConfiguration.js.map +1 -1
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -23
- package/configuration/interfaces/sceneOptimizerConfiguration.js +1 -1
- package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -1
- package/configuration/interfaces/skyboxConfiguration.d.ts +21 -21
- package/configuration/interfaces/skyboxConfiguration.js +1 -1
- package/configuration/interfaces/skyboxConfiguration.js.map +1 -1
- package/configuration/interfaces/templateConfiguration.d.ts +67 -67
- package/configuration/interfaces/templateConfiguration.js +1 -1
- package/configuration/interfaces/templateConfiguration.js.map +1 -1
- package/configuration/interfaces/vrConfiguration.d.ts +16 -16
- package/configuration/interfaces/vrConfiguration.js +1 -1
- package/configuration/interfaces/vrConfiguration.js.map +1 -1
- package/configuration/loader.d.ts +4 -4
- package/configuration/loader.js +16 -28
- package/configuration/loader.js.map +1 -1
- package/configuration/mappers.d.ts +42 -42
- package/configuration/mappers.js +190 -189
- package/configuration/mappers.js.map +1 -1
- package/configuration/renderOnlyLoader.d.ts +33 -33
- package/configuration/renderOnlyLoader.js +161 -158
- package/configuration/renderOnlyLoader.js.map +1 -1
- package/configuration/types/default.d.ts +6 -6
- package/configuration/types/default.js +120 -119
- package/configuration/types/default.js.map +1 -1
- package/configuration/types/environmentMap.d.ts +5 -5
- package/configuration/types/environmentMap.js +13 -13
- package/configuration/types/environmentMap.js.map +1 -1
- package/configuration/types/extended.d.ts +6 -6
- package/configuration/types/extended.js +316 -316
- package/configuration/types/extended.js.map +1 -1
- package/configuration/types/index.d.ts +13 -13
- package/configuration/types/index.js +49 -48
- package/configuration/types/index.js.map +1 -1
- package/configuration/types/minimal.d.ts +6 -6
- package/configuration/types/minimal.js +42 -42
- package/configuration/types/minimal.js.map +1 -1
- package/configuration/types/renderOnlyDefault.d.ts +30 -30
- package/configuration/types/renderOnlyDefault.js +30 -30
- package/configuration/types/renderOnlyDefault.js.map +1 -1
- package/configuration/types/shadowLight.d.ts +9 -9
- package/configuration/types/shadowLight.js +63 -63
- package/configuration/types/shadowLight.js.map +1 -1
- package/helper/index.d.ts +26 -26
- package/helper/index.js +62 -56
- package/helper/index.js.map +1 -1
- package/index.d.ts +30 -30
- package/index.js +45 -41
- package/index.js.map +1 -1
- package/initializer.d.ts +11 -11
- package/initializer.js +34 -33
- package/initializer.js.map +1 -1
- package/interfaces.d.ts +5 -5
- package/interfaces.js +1 -1
- package/interfaces.js.map +1 -1
- package/labs/environmentSerializer.d.ts +126 -126
- package/labs/environmentSerializer.js +190 -186
- package/labs/environmentSerializer.js.map +1 -1
- package/labs/texture.d.ts +183 -184
- package/labs/texture.js +300 -297
- package/labs/texture.js.map +1 -1
- package/labs/viewerLabs.d.ts +51 -51
- package/labs/viewerLabs.js +133 -131
- package/labs/viewerLabs.js.map +1 -1
- package/license.md +71 -0
- package/loader/modelLoader.d.ts +47 -44
- package/loader/modelLoader.js +189 -182
- package/loader/modelLoader.js.map +1 -1
- package/loader/plugins/applyMaterialConfig.d.ts +12 -12
- package/loader/plugins/applyMaterialConfig.js +15 -15
- package/loader/plugins/applyMaterialConfig.js.map +1 -1
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -9
- package/loader/plugins/extendedMaterialLoaderPlugin.js +15 -15
- package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -1
- package/loader/plugins/index.d.ts +18 -17
- package/loader/plugins/index.js +42 -41
- package/loader/plugins/index.js.map +1 -1
- package/loader/plugins/loaderPlugin.d.ts +24 -24
- package/loader/plugins/loaderPlugin.js +1 -1
- package/loader/plugins/loaderPlugin.js.map +1 -1
- package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -12
- package/loader/plugins/msftLodLoaderPlugin.js +20 -19
- package/loader/plugins/msftLodLoaderPlugin.js.map +1 -1
- package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -12
- package/loader/plugins/telemetryLoaderPlugin.js +35 -35
- package/loader/plugins/telemetryLoaderPlugin.js.map +1 -1
- package/managers/observablesManager.d.ts +66 -66
- package/managers/observablesManager.js +34 -34
- package/managers/observablesManager.js.map +1 -1
- package/managers/sceneManager.d.ts +243 -245
- package/managers/sceneManager.js +1388 -1387
- package/managers/sceneManager.js.map +1 -1
- package/managers/telemetryManager.d.ts +57 -57
- package/managers/telemetryManager.js +113 -113
- package/managers/telemetryManager.js.map +1 -1
- package/model/modelAnimation.d.ts +215 -215
- package/model/modelAnimation.js +232 -232
- package/model/modelAnimation.js.map +1 -1
- package/model/viewerModel.d.ts +228 -236
- package/model/viewerModel.js +669 -664
- package/model/viewerModel.js.map +1 -1
- package/optimizer/custom/extended.d.ts +11 -13
- package/optimizer/custom/extended.js +98 -100
- package/optimizer/custom/extended.js.map +1 -1
- package/optimizer/custom/index.d.ts +8 -8
- package/optimizer/custom/index.js +24 -24
- package/optimizer/custom/index.js.map +1 -1
- package/package.json +41 -215
- package/readme.md +12 -8
- package/renderOnlyIndex.d.ts +11 -11
- package/renderOnlyIndex.js +17 -15
- package/renderOnlyIndex.js.map +1 -1
- package/templating/eventManager.d.ts +35 -35
- package/templating/eventManager.js +65 -63
- package/templating/eventManager.js.map +1 -1
- package/templating/plugins/hdButtonPlugin.d.ts +9 -9
- package/templating/plugins/hdButtonPlugin.js +21 -34
- package/templating/plugins/hdButtonPlugin.js.map +1 -1
- package/templating/plugins/printButton.d.ts +9 -10
- package/templating/plugins/printButton.js +40 -53
- package/templating/plugins/printButton.js.map +1 -1
- package/templating/templateManager.d.ts +190 -189
- package/templating/templateManager.js +553 -543
- package/templating/templateManager.js.map +1 -1
- package/templating/viewerTemplatePlugin.d.ts +21 -21
- package/templating/viewerTemplatePlugin.js +68 -68
- package/templating/viewerTemplatePlugin.js.map +1 -1
- package/viewer/defaultViewer.d.ts +122 -116
- package/viewer/defaultViewer.js +665 -670
- package/viewer/defaultViewer.js.map +1 -1
- package/viewer/renderOnlyViewer.d.ts +8 -8
- package/viewer/renderOnlyViewer.js +43 -50
- package/viewer/renderOnlyViewer.js.map +1 -1
- package/viewer/viewer.d.ts +254 -253
- package/viewer/viewer.js +777 -763
- package/viewer/viewer.js.map +1 -1
- package/viewer/viewerManager.d.ts +55 -55
- package/viewer/viewerManager.js +87 -86
- package/viewer/viewerManager.js.map +1 -1
- package/viewer/viewerWithTemplate.d.ts +9 -9
- package/viewer/viewerWithTemplate.js +19 -32
- package/viewer/viewerWithTemplate.js.map +1 -1
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import { IEnvironmentMapConfiguration } from
|
|
2
|
-
import { EngineOptions } from
|
|
3
|
-
import { IObserversConfiguration } from
|
|
4
|
-
import { IModelConfiguration } from
|
|
5
|
-
import { ISceneConfiguration } from
|
|
6
|
-
import { ISceneOptimizerConfiguration } from
|
|
7
|
-
import { ICameraConfiguration } from
|
|
8
|
-
import { ISkyboxConfiguration } from
|
|
9
|
-
import { IGroundConfiguration } from
|
|
10
|
-
import { ILightConfiguration } from
|
|
11
|
-
import { ITemplateConfiguration } from
|
|
12
|
-
import { IVRConfiguration } from
|
|
13
|
-
import { IDefaultRenderingPipelineConfiguration } from
|
|
14
|
-
export declare function getConfigurationKey(key: string, configObject: any): any;
|
|
15
|
-
export interface ViewerConfiguration {
|
|
16
|
-
version?: string;
|
|
17
|
-
extends?: string;
|
|
18
|
-
pageUrl?: string;
|
|
19
|
-
configuration?: string | {
|
|
20
|
-
url?: string;
|
|
21
|
-
payload?: any;
|
|
22
|
-
mapper?: string;
|
|
23
|
-
};
|
|
24
|
-
observers?: IObserversConfiguration;
|
|
25
|
-
canvasElement?: string;
|
|
26
|
-
model?: IModelConfiguration | string;
|
|
27
|
-
scene?: ISceneConfiguration;
|
|
28
|
-
optimizer?: ISceneOptimizerConfiguration | boolean;
|
|
29
|
-
camera?: ICameraConfiguration;
|
|
30
|
-
skybox?: boolean | ISkyboxConfiguration;
|
|
31
|
-
ground?: boolean | IGroundConfiguration;
|
|
32
|
-
lights?: {
|
|
33
|
-
[name: string]: number | boolean | ILightConfiguration;
|
|
34
|
-
};
|
|
35
|
-
engine?: {
|
|
36
|
-
renderInBackground?: boolean;
|
|
37
|
-
antialiasing?: boolean;
|
|
38
|
-
disableResize?: boolean;
|
|
39
|
-
engineOptions?: EngineOptions;
|
|
40
|
-
adaptiveQuality?: boolean;
|
|
41
|
-
hdEnabled?: boolean;
|
|
42
|
-
};
|
|
43
|
-
templates?: {
|
|
44
|
-
main: ITemplateConfiguration;
|
|
45
|
-
[key: string]: ITemplateConfiguration;
|
|
46
|
-
};
|
|
47
|
-
customShaders?: {
|
|
48
|
-
shaders?: {
|
|
49
|
-
[key: string]: string;
|
|
50
|
-
};
|
|
51
|
-
includes?: {
|
|
52
|
-
[key: string]: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
loaderPlugins?: {
|
|
56
|
-
extendedMaterial?: boolean;
|
|
57
|
-
msftLod?: boolean;
|
|
58
|
-
telemetry?: boolean;
|
|
59
|
-
minecraft?: boolean;
|
|
60
|
-
[propName: string]: boolean | undefined;
|
|
61
|
-
};
|
|
62
|
-
environmentMap?: IEnvironmentMapConfiguration;
|
|
63
|
-
vr?: IVRConfiguration;
|
|
64
|
-
"3dCommerceCertified"?: boolean;
|
|
65
|
-
lab?: {
|
|
66
|
-
flashlight?: boolean | {
|
|
67
|
-
exponent?: number;
|
|
68
|
-
angle?: number;
|
|
69
|
-
intensity?: number;
|
|
70
|
-
diffuse?: {
|
|
71
|
-
r: number;
|
|
72
|
-
g: number;
|
|
73
|
-
b: number;
|
|
74
|
-
};
|
|
75
|
-
specular?: {
|
|
76
|
-
r: number;
|
|
77
|
-
g: number;
|
|
78
|
-
b: number;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
hideLoadingDelay?: number;
|
|
82
|
-
/** @deprecated */
|
|
83
|
-
assetsRootURL?: string;
|
|
84
|
-
environmentMainColor?: {
|
|
85
|
-
r: number;
|
|
86
|
-
g: number;
|
|
87
|
-
b: number;
|
|
88
|
-
};
|
|
89
|
-
/** @deprecated */
|
|
90
|
-
environmentMap?: {
|
|
91
|
-
/**
|
|
92
|
-
* Environment map texture path in relative to the asset folder.
|
|
93
|
-
*/
|
|
94
|
-
texture: string;
|
|
95
|
-
/**
|
|
96
|
-
* Default rotation to apply to the environment map.
|
|
97
|
-
*/
|
|
98
|
-
rotationY: number;
|
|
99
|
-
/**
|
|
100
|
-
* Tint level of the main color on the environment map.
|
|
101
|
-
*/
|
|
102
|
-
tintLevel: number;
|
|
103
|
-
};
|
|
104
|
-
defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;
|
|
105
|
-
globalLightRotation?: number;
|
|
106
|
-
};
|
|
107
|
-
}
|
|
1
|
+
import type { IEnvironmentMapConfiguration } from "./interfaces/environmentMapConfiguration";
|
|
2
|
+
import type { EngineOptions } from "@babylonjs/core/Engines/thinEngine.js";
|
|
3
|
+
import type { IObserversConfiguration } from "./interfaces/observersConfiguration";
|
|
4
|
+
import type { IModelConfiguration } from "./interfaces/modelConfiguration";
|
|
5
|
+
import type { ISceneConfiguration } from "./interfaces/sceneConfiguration";
|
|
6
|
+
import type { ISceneOptimizerConfiguration } from "./interfaces/sceneOptimizerConfiguration";
|
|
7
|
+
import type { ICameraConfiguration } from "./interfaces/cameraConfiguration";
|
|
8
|
+
import type { ISkyboxConfiguration } from "./interfaces/skyboxConfiguration";
|
|
9
|
+
import type { IGroundConfiguration } from "./interfaces/groundConfiguration";
|
|
10
|
+
import type { ILightConfiguration } from "./interfaces/lightConfiguration";
|
|
11
|
+
import type { ITemplateConfiguration } from "./interfaces/templateConfiguration";
|
|
12
|
+
import type { IVRConfiguration } from "./interfaces/vrConfiguration";
|
|
13
|
+
import type { IDefaultRenderingPipelineConfiguration } from "./interfaces/defaultRenderingPipelineConfiguration";
|
|
14
|
+
export declare function getConfigurationKey(key: string, configObject: any): any;
|
|
15
|
+
export interface ViewerConfiguration {
|
|
16
|
+
version?: string;
|
|
17
|
+
extends?: string;
|
|
18
|
+
pageUrl?: string;
|
|
19
|
+
configuration?: string | {
|
|
20
|
+
url?: string;
|
|
21
|
+
payload?: any;
|
|
22
|
+
mapper?: string;
|
|
23
|
+
};
|
|
24
|
+
observers?: IObserversConfiguration;
|
|
25
|
+
canvasElement?: string;
|
|
26
|
+
model?: IModelConfiguration | string;
|
|
27
|
+
scene?: ISceneConfiguration;
|
|
28
|
+
optimizer?: ISceneOptimizerConfiguration | boolean;
|
|
29
|
+
camera?: ICameraConfiguration;
|
|
30
|
+
skybox?: boolean | ISkyboxConfiguration;
|
|
31
|
+
ground?: boolean | IGroundConfiguration;
|
|
32
|
+
lights?: {
|
|
33
|
+
[name: string]: number | boolean | ILightConfiguration;
|
|
34
|
+
};
|
|
35
|
+
engine?: {
|
|
36
|
+
renderInBackground?: boolean;
|
|
37
|
+
antialiasing?: boolean;
|
|
38
|
+
disableResize?: boolean;
|
|
39
|
+
engineOptions?: EngineOptions;
|
|
40
|
+
adaptiveQuality?: boolean;
|
|
41
|
+
hdEnabled?: boolean;
|
|
42
|
+
};
|
|
43
|
+
templates?: {
|
|
44
|
+
main: ITemplateConfiguration;
|
|
45
|
+
[key: string]: ITemplateConfiguration;
|
|
46
|
+
};
|
|
47
|
+
customShaders?: {
|
|
48
|
+
shaders?: {
|
|
49
|
+
[key: string]: string;
|
|
50
|
+
};
|
|
51
|
+
includes?: {
|
|
52
|
+
[key: string]: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
loaderPlugins?: {
|
|
56
|
+
extendedMaterial?: boolean;
|
|
57
|
+
msftLod?: boolean;
|
|
58
|
+
telemetry?: boolean;
|
|
59
|
+
minecraft?: boolean;
|
|
60
|
+
[propName: string]: boolean | undefined;
|
|
61
|
+
};
|
|
62
|
+
environmentMap?: IEnvironmentMapConfiguration;
|
|
63
|
+
vr?: IVRConfiguration;
|
|
64
|
+
"3dCommerceCertified"?: boolean;
|
|
65
|
+
lab?: {
|
|
66
|
+
flashlight?: boolean | {
|
|
67
|
+
exponent?: number;
|
|
68
|
+
angle?: number;
|
|
69
|
+
intensity?: number;
|
|
70
|
+
diffuse?: {
|
|
71
|
+
r: number;
|
|
72
|
+
g: number;
|
|
73
|
+
b: number;
|
|
74
|
+
};
|
|
75
|
+
specular?: {
|
|
76
|
+
r: number;
|
|
77
|
+
g: number;
|
|
78
|
+
b: number;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
hideLoadingDelay?: number;
|
|
82
|
+
/** @deprecated */
|
|
83
|
+
assetsRootURL?: string;
|
|
84
|
+
environmentMainColor?: {
|
|
85
|
+
r: number;
|
|
86
|
+
g: number;
|
|
87
|
+
b: number;
|
|
88
|
+
};
|
|
89
|
+
/** @deprecated */
|
|
90
|
+
environmentMap?: {
|
|
91
|
+
/**
|
|
92
|
+
* Environment map texture path in relative to the asset folder.
|
|
93
|
+
*/
|
|
94
|
+
texture: string;
|
|
95
|
+
/**
|
|
96
|
+
* Default rotation to apply to the environment map.
|
|
97
|
+
*/
|
|
98
|
+
rotationY: number;
|
|
99
|
+
/**
|
|
100
|
+
* Tint level of the main color on the environment map.
|
|
101
|
+
*/
|
|
102
|
+
tintLevel: number;
|
|
103
|
+
};
|
|
104
|
+
defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;
|
|
105
|
+
globalLightRotation?: number;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export function getConfigurationKey(key, configObject) {
|
|
2
|
-
var splits = key.split(
|
|
3
|
-
if (splits.length === 0 || !configObject) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
else if (splits.length === 1) {
|
|
7
|
-
if (configObject[key] !== undefined) {
|
|
8
|
-
return configObject[key];
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
var firstKey = splits.shift();
|
|
13
|
-
return getConfigurationKey(splits.join("."), configObject[firstKey]);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
export function getConfigurationKey(key, configObject) {
|
|
2
|
+
var splits = key.split(".");
|
|
3
|
+
if (splits.length === 0 || !configObject) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
else if (splits.length === 1) {
|
|
7
|
+
if (configObject[key] !== undefined) {
|
|
8
|
+
return configObject[key];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
var firstKey = splits.shift();
|
|
13
|
+
return getConfigurationKey(splits.join("."), configObject[firstKey]);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
16
|
//# sourceMappingURL=configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/configuration.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,mBAAmB,CAAC,GAAW,EAAE,YAAiB;IAC9D,IAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE;QACtC,OAAO;KACV;SAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,IAAI,YAAY,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YACjC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;SAC5B;KACJ;SAAM;QACH,IAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,OAAO,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,QAAS,CAAC,CAAC,CAAC;KACzE;AACL,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { IEnvironmentMapConfiguration } from \"./interfaces/environmentMapConfiguration\";\r\nimport type { EngineOptions } from \"core/Engines/thinEngine\";\r\nimport type { IObserversConfiguration } from \"./interfaces/observersConfiguration\";\r\nimport type { IModelConfiguration } from \"./interfaces/modelConfiguration\";\r\nimport type { ISceneConfiguration } from \"./interfaces/sceneConfiguration\";\r\nimport type { ISceneOptimizerConfiguration } from \"./interfaces/sceneOptimizerConfiguration\";\r\nimport type { ICameraConfiguration } from \"./interfaces/cameraConfiguration\";\r\nimport type { ISkyboxConfiguration } from \"./interfaces/skyboxConfiguration\";\r\nimport type { IGroundConfiguration } from \"./interfaces/groundConfiguration\";\r\nimport type { ILightConfiguration } from \"./interfaces/lightConfiguration\";\r\nimport type { ITemplateConfiguration } from \"./interfaces/templateConfiguration\";\r\nimport type { IVRConfiguration } from \"./interfaces/vrConfiguration\";\r\nimport type { IDefaultRenderingPipelineConfiguration } from \"./interfaces/defaultRenderingPipelineConfiguration\";\r\n\r\nexport function getConfigurationKey(key: string, configObject: any): any {\r\n const splits = key.split(\".\");\r\n\r\n if (splits.length === 0 || !configObject) {\r\n return;\r\n } else if (splits.length === 1) {\r\n if (configObject[key] !== undefined) {\r\n return configObject[key];\r\n }\r\n } else {\r\n const firstKey = splits.shift();\r\n return getConfigurationKey(splits.join(\".\"), configObject[firstKey!]);\r\n }\r\n}\r\n\r\nexport interface ViewerConfiguration {\r\n // configuration version\r\n version?: string;\r\n extends?: string; // is this configuration extending an existing configuration?\r\n\r\n pageUrl?: string; // will be used for sharing and other fun stuff. This is the page showing the model (not the model's url!)\r\n\r\n configuration?:\r\n | string\r\n | {\r\n url?: string;\r\n payload?: any;\r\n mapper?: string; // json (default), html, yaml, xml, etc'. if not provided, file extension will be used.\r\n };\r\n\r\n // names of functions in the window context.\r\n observers?: IObserversConfiguration;\r\n\r\n canvasElement?: string; // if there is a need to override the standard implementation - ID of HTMLCanvasElement\r\n\r\n model?: IModelConfiguration | string;\r\n\r\n scene?: ISceneConfiguration;\r\n optimizer?: ISceneOptimizerConfiguration | boolean;\r\n // at the moment, support only a single camera.\r\n camera?: ICameraConfiguration;\r\n skybox?: boolean | ISkyboxConfiguration;\r\n\r\n ground?: boolean | IGroundConfiguration;\r\n lights?: {\r\n //globalRotation: number,\r\n [name: string]: number | boolean | ILightConfiguration;\r\n };\r\n // engine configuration. optional!\r\n engine?: {\r\n renderInBackground?: boolean;\r\n antialiasing?: boolean;\r\n disableResize?: boolean;\r\n engineOptions?: EngineOptions;\r\n adaptiveQuality?: boolean;\r\n hdEnabled?: boolean;\r\n };\r\n //templateStructure?: ITemplateStructure,\r\n templates?: {\r\n main: ITemplateConfiguration;\r\n [key: string]: ITemplateConfiguration;\r\n };\r\n\r\n customShaders?: {\r\n shaders?: {\r\n [key: string]: string;\r\n };\r\n includes?: {\r\n [key: string]: string;\r\n };\r\n };\r\n\r\n loaderPlugins?: {\r\n extendedMaterial?: boolean;\r\n msftLod?: boolean;\r\n telemetry?: boolean;\r\n minecraft?: boolean;\r\n\r\n [propName: string]: boolean | undefined;\r\n };\r\n\r\n environmentMap?: IEnvironmentMapConfiguration;\r\n\r\n vr?: IVRConfiguration;\r\n \"3dCommerceCertified\"?: boolean;\r\n\r\n // features that are being tested.\r\n // those features' syntax will change and move out!\r\n // Don't use in production (or be ready to make the changes :) )\r\n lab?: {\r\n flashlight?:\r\n | boolean\r\n | {\r\n exponent?: number;\r\n angle?: number;\r\n intensity?: number;\r\n diffuse?: { r: number; g: number; b: number };\r\n specular?: { r: number; g: number; b: number };\r\n };\r\n hideLoadingDelay?: number;\r\n /** @deprecated */\r\n assetsRootURL?: string;\r\n environmentMainColor?: { r: number; g: number; b: number };\r\n /** @deprecated */\r\n environmentMap?: {\r\n /**\r\n * Environment map texture path in relative to the asset folder.\r\n */\r\n texture: string;\r\n\r\n /**\r\n * Default rotation to apply to the environment map.\r\n */\r\n rotationY: number;\r\n\r\n /**\r\n * Tint level of the main color on the environment map.\r\n */\r\n tintLevel: number;\r\n };\r\n defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;\r\n globalLightRotation?: number;\r\n };\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ViewerConfiguration } from
|
|
2
|
-
/**
|
|
3
|
-
* This function will make sure the configuration file is taking deprecated fields into account
|
|
4
|
-
* and is setting them to the correct keys and values.
|
|
5
|
-
*
|
|
6
|
-
* @param configuration The configuration to process. Mutable!
|
|
7
|
-
*/
|
|
8
|
-
export declare function processConfigurationCompatibility(configuration: ViewerConfiguration): void;
|
|
1
|
+
import type { ViewerConfiguration } from "./configuration";
|
|
2
|
+
/**
|
|
3
|
+
* This function will make sure the configuration file is taking deprecated fields into account
|
|
4
|
+
* and is setting them to the correct keys and values.
|
|
5
|
+
*
|
|
6
|
+
* @param configuration The configuration to process. Mutable!
|
|
7
|
+
*/
|
|
8
|
+
export declare function processConfigurationCompatibility(configuration: ViewerConfiguration): void;
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { getConfigurationKey } from
|
|
2
|
-
/**
|
|
3
|
-
* This function will make sure the configuration file is taking deprecated fields into account
|
|
4
|
-
* and is setting them to the correct keys and values.
|
|
5
|
-
*
|
|
6
|
-
* @param configuration The configuration to process. Mutable!
|
|
7
|
-
*/
|
|
8
|
-
export function processConfigurationCompatibility(configuration) {
|
|
9
|
-
if (configuration.camera) {
|
|
10
|
-
// camera contrast -> image processing contrast
|
|
11
|
-
if (configuration.camera.contrast !== undefined) {
|
|
12
|
-
setKeyInObject(configuration, "scene.imageProcessingConfiguration.contrast", configuration.camera.contrast);
|
|
13
|
-
}
|
|
14
|
-
// camera exposure -> image processing exposure
|
|
15
|
-
if (configuration.camera.exposure !== undefined) {
|
|
16
|
-
setKeyInObject(configuration, "scene.imageProcessingConfiguration.exposure", configuration.camera.exposure);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (configuration.scene) {
|
|
20
|
-
//glow
|
|
21
|
-
if (configuration.scene.glow) {
|
|
22
|
-
setKeyInObject(configuration, "lab.defaultRenderingPipelines.glowLayerEnabled", true);
|
|
23
|
-
var enabledProcessing = getConfigurationKey("scene.imageProcessingConfiguration.isEnabled", configuration);
|
|
24
|
-
if (enabledProcessing !== false) {
|
|
25
|
-
setKeyInObject(configuration, "scene.imageProcessingConfiguration.isEnabled", true);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (configuration.scene.mainColor) {
|
|
29
|
-
setKeyInObject(configuration, "environmentMap.mainColor", configuration.scene.mainColor, true);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (configuration.model && typeof configuration.model ===
|
|
33
|
-
// castShadows === castShadow
|
|
34
|
-
if (configuration.model.castShadows !== undefined && configuration.model.castShadow === undefined) {
|
|
35
|
-
configuration.model.castShadow = configuration.model.castShadows;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
if (configuration.lab) {
|
|
39
|
-
if (configuration.lab.assetsRootURL) {
|
|
40
|
-
setKeyInObject(configuration, "scene.assetsRootURL", configuration.lab.assetsRootURL, true);
|
|
41
|
-
}
|
|
42
|
-
if (configuration.lab.environmentMap) {
|
|
43
|
-
setKeyInObject(configuration, "environmentMap", configuration.lab.environmentMap, true);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function setKeyInObject(object, keys, value, shouldOverwrite) {
|
|
48
|
-
var keySplit = keys.split(".");
|
|
49
|
-
if (keySplit.length === 0) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
var lastKey = keySplit.pop();
|
|
53
|
-
if (!lastKey) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
var curObj = object;
|
|
57
|
-
keySplit.forEach(function (key) {
|
|
58
|
-
curObj[key] = curObj[key] || {};
|
|
59
|
-
curObj = curObj[key];
|
|
60
|
-
});
|
|
61
|
-
if (curObj[lastKey] !== undefined && !shouldOverwrite) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
curObj[lastKey] = value;
|
|
65
|
-
}
|
|
1
|
+
import { getConfigurationKey } from "./configuration.js";
|
|
2
|
+
/**
|
|
3
|
+
* This function will make sure the configuration file is taking deprecated fields into account
|
|
4
|
+
* and is setting them to the correct keys and values.
|
|
5
|
+
*
|
|
6
|
+
* @param configuration The configuration to process. Mutable!
|
|
7
|
+
*/
|
|
8
|
+
export function processConfigurationCompatibility(configuration) {
|
|
9
|
+
if (configuration.camera) {
|
|
10
|
+
// camera contrast -> image processing contrast
|
|
11
|
+
if (configuration.camera.contrast !== undefined) {
|
|
12
|
+
setKeyInObject(configuration, "scene.imageProcessingConfiguration.contrast", configuration.camera.contrast);
|
|
13
|
+
}
|
|
14
|
+
// camera exposure -> image processing exposure
|
|
15
|
+
if (configuration.camera.exposure !== undefined) {
|
|
16
|
+
setKeyInObject(configuration, "scene.imageProcessingConfiguration.exposure", configuration.camera.exposure);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
if (configuration.scene) {
|
|
20
|
+
//glow
|
|
21
|
+
if (configuration.scene.glow) {
|
|
22
|
+
setKeyInObject(configuration, "lab.defaultRenderingPipelines.glowLayerEnabled", true);
|
|
23
|
+
var enabledProcessing = getConfigurationKey("scene.imageProcessingConfiguration.isEnabled", configuration);
|
|
24
|
+
if (enabledProcessing !== false) {
|
|
25
|
+
setKeyInObject(configuration, "scene.imageProcessingConfiguration.isEnabled", true);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (configuration.scene.mainColor) {
|
|
29
|
+
setKeyInObject(configuration, "environmentMap.mainColor", configuration.scene.mainColor, true);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (configuration.model && typeof configuration.model === "object") {
|
|
33
|
+
// castShadows === castShadow
|
|
34
|
+
if (configuration.model.castShadows !== undefined && configuration.model.castShadow === undefined) {
|
|
35
|
+
configuration.model.castShadow = configuration.model.castShadows;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (configuration.lab) {
|
|
39
|
+
if (configuration.lab.assetsRootURL) {
|
|
40
|
+
setKeyInObject(configuration, "scene.assetsRootURL", configuration.lab.assetsRootURL, true);
|
|
41
|
+
}
|
|
42
|
+
if (configuration.lab.environmentMap) {
|
|
43
|
+
setKeyInObject(configuration, "environmentMap", configuration.lab.environmentMap, true);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function setKeyInObject(object, keys, value, shouldOverwrite) {
|
|
48
|
+
var keySplit = keys.split(".");
|
|
49
|
+
if (keySplit.length === 0) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
var lastKey = keySplit.pop();
|
|
53
|
+
if (!lastKey) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
var curObj = object;
|
|
57
|
+
keySplit.forEach(function (key) {
|
|
58
|
+
curObj[key] = curObj[key] || {};
|
|
59
|
+
curObj = curObj[key];
|
|
60
|
+
});
|
|
61
|
+
if (curObj[lastKey] !== undefined && !shouldOverwrite) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
curObj[lastKey] = value;
|
|
65
|
+
}
|
|
66
66
|
//# sourceMappingURL=configurationCompatibility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationCompatibility.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"configurationCompatibility.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/configurationCompatibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAAC,aAAkC;IAChF,IAAI,aAAa,CAAC,MAAM,EAAE;QACtB,+CAA+C;QAC/C,IAAI,aAAa,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC7C,cAAc,CAAC,aAAa,EAAE,6CAA6C,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC/G;QAED,+CAA+C;QAC/C,IAAI,aAAa,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC7C,cAAc,CAAC,aAAa,EAAE,6CAA6C,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC/G;KACJ;IAED,IAAI,aAAa,CAAC,KAAK,EAAE;QACrB,MAAM;QACN,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE;YAC1B,cAAc,CAAC,aAAa,EAAE,gDAAgD,EAAE,IAAI,CAAC,CAAC;YACtF,IAAM,iBAAiB,GAAG,mBAAmB,CAAC,8CAA8C,EAAE,aAAa,CAAC,CAAC;YAC7G,IAAI,iBAAiB,KAAK,KAAK,EAAE;gBAC7B,cAAc,CAAC,aAAa,EAAE,8CAA8C,EAAE,IAAI,CAAC,CAAC;aACvF;SACJ;QAED,IAAI,aAAa,CAAC,KAAK,CAAC,SAAS,EAAE;YAC/B,cAAc,CAAC,aAAa,EAAE,0BAA0B,EAAE,aAAa,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;SAClG;KACJ;IAED,IAAI,aAAa,CAAC,KAAK,IAAI,OAAO,aAAa,CAAC,KAAK,KAAK,QAAQ,EAAE;QAChE,6BAA6B;QAC7B,IAAU,aAAa,CAAC,KAAM,CAAC,WAAW,KAAK,SAAS,IAAI,aAAa,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE;YACtG,aAAa,CAAC,KAAK,CAAC,UAAU,GAAS,aAAa,CAAC,KAAM,CAAC,WAAW,CAAC;SAC3E;KACJ;IAED,IAAI,aAAa,CAAC,GAAG,EAAE;QACnB,IAAI,aAAa,CAAC,GAAG,CAAC,aAAa,EAAE;YACjC,cAAc,CAAC,aAAa,EAAE,qBAAqB,EAAE,aAAa,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;SAC/F;QACD,IAAI,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE;YAClC,cAAc,CAAC,aAAa,EAAE,gBAAgB,EAAE,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;SAC3F;KACJ;AACL,CAAC;AAED,SAAS,cAAc,CAAC,MAAW,EAAE,IAAY,EAAE,KAAU,EAAE,eAAyB;IACpF,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO;KACV;IACD,IAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;IAC/B,IAAI,CAAC,OAAO,EAAE;QACV,OAAO;KACV;IACD,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,CAAC,UAAC,GAAG;QACjB,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QAChC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,eAAe,EAAE;QACnD,OAAO;KACV;IACD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;AAC5B,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./configuration\";\r\nimport { getConfigurationKey } from \"./configuration\";\r\n/**\r\n * This function will make sure the configuration file is taking deprecated fields into account\r\n * and is setting them to the correct keys and values.\r\n *\r\n * @param configuration The configuration to process. Mutable!\r\n */\r\nexport function processConfigurationCompatibility(configuration: ViewerConfiguration) {\r\n if (configuration.camera) {\r\n // camera contrast -> image processing contrast\r\n if (configuration.camera.contrast !== undefined) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.contrast\", configuration.camera.contrast);\r\n }\r\n\r\n // camera exposure -> image processing exposure\r\n if (configuration.camera.exposure !== undefined) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.exposure\", configuration.camera.exposure);\r\n }\r\n }\r\n\r\n if (configuration.scene) {\r\n //glow\r\n if (configuration.scene.glow) {\r\n setKeyInObject(configuration, \"lab.defaultRenderingPipelines.glowLayerEnabled\", true);\r\n const enabledProcessing = getConfigurationKey(\"scene.imageProcessingConfiguration.isEnabled\", configuration);\r\n if (enabledProcessing !== false) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.isEnabled\", true);\r\n }\r\n }\r\n\r\n if (configuration.scene.mainColor) {\r\n setKeyInObject(configuration, \"environmentMap.mainColor\", configuration.scene.mainColor, true);\r\n }\r\n }\r\n\r\n if (configuration.model && typeof configuration.model === \"object\") {\r\n // castShadows === castShadow\r\n if ((<any>configuration.model).castShadows !== undefined && configuration.model.castShadow === undefined) {\r\n configuration.model.castShadow = (<any>configuration.model).castShadows;\r\n }\r\n }\r\n\r\n if (configuration.lab) {\r\n if (configuration.lab.assetsRootURL) {\r\n setKeyInObject(configuration, \"scene.assetsRootURL\", configuration.lab.assetsRootURL, true);\r\n }\r\n if (configuration.lab.environmentMap) {\r\n setKeyInObject(configuration, \"environmentMap\", configuration.lab.environmentMap, true);\r\n }\r\n }\r\n}\r\n\r\nfunction setKeyInObject(object: any, keys: string, value: any, shouldOverwrite?: boolean) {\r\n const keySplit = keys.split(\".\");\r\n if (keySplit.length === 0) {\r\n return;\r\n }\r\n const lastKey = keySplit.pop();\r\n if (!lastKey) {\r\n return;\r\n }\r\n let curObj = object;\r\n keySplit.forEach((key) => {\r\n curObj[key] = curObj[key] || {};\r\n curObj = curObj[key];\r\n });\r\n if (curObj[lastKey] !== undefined && !shouldOverwrite) {\r\n return;\r\n }\r\n curObj[lastKey] = value;\r\n}\r\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ViewerConfiguration } from
|
|
2
|
-
import { Color3 } from
|
|
3
|
-
import { Scene } from
|
|
4
|
-
export declare class ConfigurationContainer {
|
|
5
|
-
configuration: ViewerConfiguration;
|
|
6
|
-
viewerId: string;
|
|
7
|
-
mainColor: Color3;
|
|
8
|
-
reflectionColor: Color3;
|
|
9
|
-
scene?: Scene;
|
|
10
|
-
}
|
|
1
|
+
import type { ViewerConfiguration } from "./configuration";
|
|
2
|
+
import { Color3 } from "@babylonjs/core/Maths/math.js";
|
|
3
|
+
import type { Scene } from "@babylonjs/core/scene.js";
|
|
4
|
+
export declare class ConfigurationContainer {
|
|
5
|
+
configuration: ViewerConfiguration;
|
|
6
|
+
viewerId: string;
|
|
7
|
+
mainColor: Color3;
|
|
8
|
+
reflectionColor: Color3;
|
|
9
|
+
scene?: Scene;
|
|
10
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Color3 } from
|
|
2
|
-
var ConfigurationContainer = /** @class */ (function () {
|
|
3
|
-
function ConfigurationContainer() {
|
|
4
|
-
this.mainColor = Color3.White();
|
|
5
|
-
this.reflectionColor = Color3.White();
|
|
6
|
-
}
|
|
7
|
-
return ConfigurationContainer;
|
|
8
|
-
}());
|
|
9
|
-
export { ConfigurationContainer };
|
|
1
|
+
import { Color3 } from "@babylonjs/core/Maths/math.js";
|
|
2
|
+
var ConfigurationContainer = /** @class */ (function () {
|
|
3
|
+
function ConfigurationContainer() {
|
|
4
|
+
this.mainColor = Color3.White();
|
|
5
|
+
this.reflectionColor = Color3.White();
|
|
6
|
+
}
|
|
7
|
+
return ConfigurationContainer;
|
|
8
|
+
}());
|
|
9
|
+
export { ConfigurationContainer };
|
|
10
10
|
//# sourceMappingURL=configurationContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationContainer.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"configurationContainer.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/configurationContainer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,sCAAwB;AAGzC;IAAA;QAKW,cAAS,GAAW,MAAM,CAAC,KAAK,EAAE,CAAC;QACnC,oBAAe,GAAW,MAAM,CAAC,KAAK,EAAE,CAAC;IAEpD,CAAC;IAAD,6BAAC;AAAD,CAAC,AARD,IAQC","sourcesContent":["import type { ViewerConfiguration } from \"./configuration\";\r\nimport { Color3 } from \"core/Maths/math\";\r\nimport type { Scene } from \"core/scene\";\r\n\r\nexport class ConfigurationContainer {\r\n public configuration: ViewerConfiguration;\r\n\r\n public viewerId: string;\r\n\r\n public mainColor: Color3 = Color3.White();\r\n public reflectionColor: Color3 = Color3.White();\r\n public scene?: Scene;\r\n}\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare class ViewerGlobals {
|
|
2
|
-
disableInit: boolean;
|
|
3
|
-
disableWebGL2Support: boolean;
|
|
4
|
-
get version(): string;
|
|
5
|
-
}
|
|
6
|
-
export declare
|
|
1
|
+
export declare class ViewerGlobals {
|
|
2
|
+
disableInit: boolean;
|
|
3
|
+
disableWebGL2Support: boolean;
|
|
4
|
+
get version(): string;
|
|
5
|
+
}
|
|
6
|
+
export declare const viewerGlobals: ViewerGlobals;
|
package/configuration/globals.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Engine } from "@babylonjs/core/Engines/engine.js";
|
|
2
|
-
var ViewerGlobals = /** @class */ (function () {
|
|
3
|
-
function ViewerGlobals() {
|
|
4
|
-
this.disableInit = false;
|
|
5
|
-
this.disableWebGL2Support = false;
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(ViewerGlobals.prototype, "version", {
|
|
8
|
-
get: function () {
|
|
9
|
-
return Engine.Version;
|
|
10
|
-
},
|
|
11
|
-
enumerable: false,
|
|
12
|
-
configurable: true
|
|
13
|
-
});
|
|
14
|
-
return ViewerGlobals;
|
|
15
|
-
}());
|
|
16
|
-
export { ViewerGlobals };
|
|
17
|
-
export var viewerGlobals = new ViewerGlobals();
|
|
1
|
+
import { Engine } from "@babylonjs/core/Engines/engine.js";
|
|
2
|
+
var ViewerGlobals = /** @class */ (function () {
|
|
3
|
+
function ViewerGlobals() {
|
|
4
|
+
this.disableInit = false;
|
|
5
|
+
this.disableWebGL2Support = false;
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(ViewerGlobals.prototype, "version", {
|
|
8
|
+
get: function () {
|
|
9
|
+
return Engine.Version;
|
|
10
|
+
},
|
|
11
|
+
enumerable: false,
|
|
12
|
+
configurable: true
|
|
13
|
+
});
|
|
14
|
+
return ViewerGlobals;
|
|
15
|
+
}());
|
|
16
|
+
export { ViewerGlobals };
|
|
17
|
+
export var viewerGlobals = new ViewerGlobals();
|
|
18
18
|
//# sourceMappingURL=globals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"globals.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/globals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,0CAA4B;AAE7C;IAAA;QACW,gBAAW,GAAY,KAAK,CAAC;QAC7B,yBAAoB,GAAY,KAAK,CAAC;IAKjD,CAAC;IAHG,sBAAW,kCAAO;aAAlB;YACI,OAAO,MAAM,CAAC,OAAO,CAAC;QAC1B,CAAC;;;OAAA;IACL,oBAAC;AAAD,CAAC,AAPD,IAOC;;AAED,MAAM,CAAC,IAAM,aAAa,GAAkB,IAAI,aAAa,EAAE,CAAC","sourcesContent":["import { Engine } from \"core/Engines/engine\";\r\n\r\nexport class ViewerGlobals {\r\n public disableInit: boolean = false;\r\n public disableWebGL2Support: boolean = false;\r\n\r\n public get version(): string {\r\n return Engine.Version;\r\n }\r\n}\r\n\r\nexport const viewerGlobals: ViewerGlobals = new ViewerGlobals();\r\n"]}
|
package/configuration/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./configuration";
|
|
2
|
+
export * from "./interfaces/index";
|
package/configuration/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./configuration\";\r\nexport * from \"./interfaces/index\";\r\n"]}
|