@babylonjs/viewer 7.21.5-alpha → 7.21.5
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 -0
- package/configuration/configuration.js +16 -0
- package/configuration/configuration.js.map +1 -0
- package/configuration/configurationCompatibility.d.ts +8 -0
- package/configuration/configurationCompatibility.js +66 -0
- package/configuration/configurationCompatibility.js.map +1 -0
- package/configuration/configurationContainer.d.ts +10 -0
- package/configuration/configurationContainer.js +10 -0
- package/configuration/configurationContainer.js.map +1 -0
- package/configuration/globals.d.ts +6 -0
- package/configuration/globals.js +18 -0
- package/configuration/globals.js.map +1 -0
- package/configuration/index.d.ts +2 -0
- package/configuration/index.js +4 -0
- package/configuration/index.js.map +1 -0
- package/configuration/interfaces/cameraConfiguration.d.ts +31 -0
- package/configuration/interfaces/cameraConfiguration.js +2 -0
- package/configuration/interfaces/cameraConfiguration.js.map +1 -0
- package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -0
- package/configuration/interfaces/colorGradingConfiguration.js +2 -0
- package/configuration/interfaces/colorGradingConfiguration.js.map +1 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +2 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -0
- package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -0
- package/configuration/interfaces/environmentMapConfiguration.js +2 -0
- package/configuration/interfaces/environmentMapConfiguration.js.map +1 -0
- package/configuration/interfaces/groundConfiguration.d.ts +24 -0
- package/configuration/interfaces/groundConfiguration.js +2 -0
- package/configuration/interfaces/groundConfiguration.js.map +1 -0
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +45 -0
- package/configuration/interfaces/imageProcessingConfiguration.js +2 -0
- package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -0
- package/configuration/interfaces/index.d.ts +15 -0
- package/configuration/interfaces/index.js +16 -0
- package/configuration/interfaces/index.js.map +1 -0
- package/configuration/interfaces/lightConfiguration.d.ts +60 -0
- package/configuration/interfaces/lightConfiguration.js +2 -0
- package/configuration/interfaces/lightConfiguration.js.map +1 -0
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -0
- package/configuration/interfaces/modelAnimationConfiguration.js +2 -0
- package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -0
- package/configuration/interfaces/modelConfiguration.d.ts +65 -0
- package/configuration/interfaces/modelConfiguration.js +2 -0
- package/configuration/interfaces/modelConfiguration.js.map +1 -0
- package/configuration/interfaces/observersConfiguration.d.ts +5 -0
- package/configuration/interfaces/observersConfiguration.js +2 -0
- package/configuration/interfaces/observersConfiguration.js.map +1 -0
- package/configuration/interfaces/sceneConfiguration.d.ts +48 -0
- package/configuration/interfaces/sceneConfiguration.js +2 -0
- package/configuration/interfaces/sceneConfiguration.js.map +1 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.js +2 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -0
- package/configuration/interfaces/skyboxConfiguration.d.ts +21 -0
- package/configuration/interfaces/skyboxConfiguration.js +2 -0
- package/configuration/interfaces/skyboxConfiguration.js.map +1 -0
- package/configuration/interfaces/templateConfiguration.d.ts +67 -0
- package/configuration/interfaces/templateConfiguration.js +2 -0
- package/configuration/interfaces/templateConfiguration.js.map +1 -0
- package/configuration/interfaces/vrConfiguration.d.ts +16 -0
- package/configuration/interfaces/vrConfiguration.js +2 -0
- package/configuration/interfaces/vrConfiguration.js.map +1 -0
- package/configuration/loader.d.ts +4 -0
- package/configuration/loader.js +17 -0
- package/configuration/loader.js.map +1 -0
- package/configuration/mappers.d.ts +43 -0
- package/configuration/mappers.js +192 -0
- package/configuration/mappers.js.map +1 -0
- package/configuration/renderOnlyLoader.d.ts +33 -0
- package/configuration/renderOnlyLoader.js +162 -0
- package/configuration/renderOnlyLoader.js.map +1 -0
- package/configuration/types/default.d.ts +6 -0
- package/configuration/types/default.js +121 -0
- package/configuration/types/default.js.map +1 -0
- package/configuration/types/environmentMap.d.ts +5 -0
- package/configuration/types/environmentMap.js +14 -0
- package/configuration/types/environmentMap.js.map +1 -0
- package/configuration/types/extended.d.ts +6 -0
- package/configuration/types/extended.js +317 -0
- package/configuration/types/extended.js.map +1 -0
- package/configuration/types/index.d.ts +14 -0
- package/configuration/types/index.js +51 -0
- package/configuration/types/index.js.map +1 -0
- package/configuration/types/minimal.d.ts +6 -0
- package/configuration/types/minimal.js +43 -0
- package/configuration/types/minimal.js.map +1 -0
- package/configuration/types/renderOnlyDefault.d.ts +30 -0
- package/configuration/types/renderOnlyDefault.js +31 -0
- package/configuration/types/renderOnlyDefault.js.map +1 -0
- package/configuration/types/shadowLight.d.ts +9 -0
- package/configuration/types/shadowLight.js +64 -0
- package/configuration/types/shadowLight.js.map +1 -0
- package/helper/index.d.ts +29 -0
- package/helper/index.js +66 -0
- package/helper/index.js.map +1 -0
- package/index.d.ts +30 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/initializer.d.ts +11 -0
- package/initializer.js +35 -0
- package/initializer.js.map +1 -0
- package/interfaces.d.ts +5 -0
- package/interfaces.js +7 -0
- package/interfaces.js.map +1 -0
- package/labs/environmentSerializer.d.ts +126 -0
- package/labs/environmentSerializer.js +191 -0
- package/labs/environmentSerializer.js.map +1 -0
- package/labs/texture.d.ts +183 -0
- package/labs/texture.js +351 -0
- package/labs/texture.js.map +1 -0
- package/labs/viewerLabs.d.ts +51 -0
- package/labs/viewerLabs.js +134 -0
- package/labs/viewerLabs.js.map +1 -0
- package/loader/modelLoader.d.ts +56 -0
- package/loader/modelLoader.js +199 -0
- package/loader/modelLoader.js.map +1 -0
- package/loader/plugins/applyMaterialConfig.d.ts +12 -0
- package/loader/plugins/applyMaterialConfig.js +16 -0
- package/loader/plugins/applyMaterialConfig.js.map +1 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.js +16 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -0
- package/loader/plugins/index.d.ts +19 -0
- package/loader/plugins/index.js +44 -0
- package/loader/plugins/index.js.map +1 -0
- package/loader/plugins/loaderPlugin.d.ts +24 -0
- package/loader/plugins/loaderPlugin.js +2 -0
- package/loader/plugins/loaderPlugin.js.map +1 -0
- package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -0
- package/loader/plugins/msftLodLoaderPlugin.js +21 -0
- package/loader/plugins/msftLodLoaderPlugin.js.map +1 -0
- package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -0
- package/loader/plugins/telemetryLoaderPlugin.js +36 -0
- package/loader/plugins/telemetryLoaderPlugin.js.map +1 -0
- package/managers/observablesManager.d.ts +66 -0
- package/managers/observablesManager.js +35 -0
- package/managers/observablesManager.js.map +1 -0
- package/managers/sceneManager.d.ts +245 -0
- package/managers/sceneManager.js +1375 -0
- package/managers/sceneManager.js.map +1 -0
- package/managers/telemetryManager.d.ts +78 -0
- package/managers/telemetryManager.js +117 -0
- package/managers/telemetryManager.js.map +1 -0
- package/model/modelAnimation.d.ts +215 -0
- package/model/modelAnimation.js +237 -0
- package/model/modelAnimation.js.map +1 -0
- package/model/viewerModel.d.ts +233 -0
- package/model/viewerModel.js +673 -0
- package/model/viewerModel.js.map +1 -0
- package/optimizer/custom/extended.d.ts +13 -0
- package/optimizer/custom/extended.js +101 -0
- package/optimizer/custom/extended.js.map +1 -0
- package/optimizer/custom/index.d.ts +9 -0
- package/optimizer/custom/index.js +26 -0
- package/optimizer/custom/index.js.map +1 -0
- package/package.json +29 -16
- package/readme.md +21 -35
- package/renderOnlyIndex.d.ts +11 -0
- package/renderOnlyIndex.js +18 -0
- package/renderOnlyIndex.js.map +1 -0
- package/templating/eventManager.d.ts +35 -0
- package/templating/eventManager.js +66 -0
- package/templating/eventManager.js.map +1 -0
- package/templating/plugins/hdButtonPlugin.d.ts +9 -0
- package/templating/plugins/hdButtonPlugin.js +21 -0
- package/templating/plugins/hdButtonPlugin.js.map +1 -0
- package/templating/plugins/printButton.d.ts +9 -0
- package/templating/plugins/printButton.js +40 -0
- package/templating/plugins/printButton.js.map +1 -0
- package/templating/templateManager.d.ts +197 -0
- package/templating/templateManager.js +561 -0
- package/templating/templateManager.js.map +1 -0
- package/templating/viewerTemplatePlugin.d.ts +21 -0
- package/templating/viewerTemplatePlugin.js +69 -0
- package/templating/viewerTemplatePlugin.js.map +1 -0
- package/viewer/defaultViewer.d.ts +130 -0
- package/viewer/defaultViewer.js +675 -0
- package/viewer/defaultViewer.js.map +1 -0
- package/viewer/renderOnlyViewer.d.ts +9 -0
- package/viewer/renderOnlyViewer.js +46 -0
- package/viewer/renderOnlyViewer.js.map +1 -0
- package/viewer/viewer.d.ts +258 -0
- package/viewer/viewer.js +783 -0
- package/viewer/viewer.js.map +1 -0
- package/viewer/viewerManager.d.ts +58 -0
- package/viewer/viewerManager.js +91 -0
- package/viewer/viewerManager.js.map +1 -0
- package/viewer/viewerWithTemplate.d.ts +9 -0
- package/viewer/viewerWithTemplate.js +20 -0
- package/viewer/viewerWithTemplate.js.map +1 -0
- package/dist/babylon-viewer.esm.js +0 -114635
- package/dist/babylon-viewer.esm.js.map +0 -1
- package/dist/babylon-viewer.esm.min.js +0 -2
- package/dist/babylon-viewer.esm.min.js.map +0 -1
- package/lib/index.d.ts +0 -132
- package/lib/index.js +0 -369
- package/lib/index.js.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface ILightConfiguration {
|
|
2
|
+
type: number;
|
|
3
|
+
name?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
position?: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
z: number;
|
|
9
|
+
};
|
|
10
|
+
target?: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
|
+
};
|
|
15
|
+
direction?: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
z: number;
|
|
19
|
+
};
|
|
20
|
+
diffuse?: {
|
|
21
|
+
r: number;
|
|
22
|
+
g: number;
|
|
23
|
+
b: number;
|
|
24
|
+
};
|
|
25
|
+
specular?: {
|
|
26
|
+
r: number;
|
|
27
|
+
g: number;
|
|
28
|
+
b: number;
|
|
29
|
+
};
|
|
30
|
+
intensity?: number;
|
|
31
|
+
intensityMode?: number;
|
|
32
|
+
radius?: number;
|
|
33
|
+
shadownEnabled?: boolean;
|
|
34
|
+
shadowConfig?: {
|
|
35
|
+
useBlurExponentialShadowMap?: boolean;
|
|
36
|
+
useBlurCloseExponentialShadowMap?: boolean;
|
|
37
|
+
useKernelBlur?: boolean;
|
|
38
|
+
blurKernel?: number;
|
|
39
|
+
blurScale?: number;
|
|
40
|
+
minZ?: number;
|
|
41
|
+
maxZ?: number;
|
|
42
|
+
frustumSize?: number;
|
|
43
|
+
angleScale?: number;
|
|
44
|
+
frustumEdgeFalloff?: number;
|
|
45
|
+
[propName: string]: any;
|
|
46
|
+
};
|
|
47
|
+
spotAngle?: number;
|
|
48
|
+
shadowFieldOfView?: number;
|
|
49
|
+
shadowBufferSize?: number;
|
|
50
|
+
shadowFrustumSize?: number;
|
|
51
|
+
shadowMinZ?: number;
|
|
52
|
+
shadowMaxZ?: number;
|
|
53
|
+
[propName: string]: any;
|
|
54
|
+
behaviors?: {
|
|
55
|
+
[name: string]: number | {
|
|
56
|
+
type: number;
|
|
57
|
+
[propName: string]: any;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lightConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/lightConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface ILightConfiguration {\r\n type: number;\r\n name?: string;\r\n disabled?: boolean;\r\n position?: { x: number; y: number; z: number };\r\n target?: { x: number; y: number; z: number };\r\n direction?: { x: number; y: number; z: number };\r\n diffuse?: { r: number; g: number; b: number };\r\n specular?: { r: number; g: number; b: number };\r\n intensity?: number;\r\n intensityMode?: number;\r\n radius?: number;\r\n shadownEnabled?: boolean; // only on specific lights!\r\n shadowConfig?: {\r\n useBlurExponentialShadowMap?: boolean;\r\n useBlurCloseExponentialShadowMap?: boolean;\r\n useKernelBlur?: boolean;\r\n blurKernel?: number;\r\n blurScale?: number;\r\n minZ?: number;\r\n maxZ?: number;\r\n frustumSize?: number;\r\n angleScale?: number;\r\n frustumEdgeFalloff?: number;\r\n [propName: string]: any;\r\n };\r\n spotAngle?: number;\r\n shadowFieldOfView?: number;\r\n shadowBufferSize?: number;\r\n shadowFrustumSize?: number;\r\n shadowMinZ?: number;\r\n shadowMaxZ?: number;\r\n [propName: string]: any;\r\n\r\n // no behaviors for light at the moment, but allowing configuration for future reference.\r\n behaviors?: {\r\n [name: string]:\r\n | number\r\n | {\r\n type: number;\r\n [propName: string]: any;\r\n };\r\n };\r\n}\r\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines an animation to be applied to a model (translation, scale or rotation).
|
|
3
|
+
*/
|
|
4
|
+
export interface IModelAnimationConfiguration {
|
|
5
|
+
/**
|
|
6
|
+
* Time of animation, in seconds
|
|
7
|
+
*/
|
|
8
|
+
time?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Scale to apply
|
|
11
|
+
*/
|
|
12
|
+
scaling?: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
z: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Easing function to apply
|
|
19
|
+
*/
|
|
20
|
+
easingFunction?: number;
|
|
21
|
+
/**
|
|
22
|
+
* An Easing mode to apply to the easing function
|
|
23
|
+
* See BABYLON.EasingFunction
|
|
24
|
+
*/
|
|
25
|
+
easingMode?: number;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelAnimationConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/modelAnimationConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Defines an animation to be applied to a model (translation, scale or rotation).\r\n */\r\nexport interface IModelAnimationConfiguration {\r\n /**\r\n * Time of animation, in seconds\r\n */\r\n time?: number;\r\n\r\n /**\r\n * Scale to apply\r\n */\r\n scaling?: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n\r\n /**\r\n * Easing function to apply\r\n */\r\n easingFunction?: number;\r\n\r\n /**\r\n * An Easing mode to apply to the easing function\r\n * See BABYLON.EasingFunction\r\n */\r\n easingMode?: number;\r\n}\r\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { IModelAnimationConfiguration } from "./modelAnimationConfiguration";
|
|
2
|
+
export interface IModelConfiguration {
|
|
3
|
+
id?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
root?: string;
|
|
6
|
+
file?: string | File;
|
|
7
|
+
loader?: string;
|
|
8
|
+
position?: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
z: number;
|
|
12
|
+
};
|
|
13
|
+
rotation?: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
z: number;
|
|
17
|
+
w?: number;
|
|
18
|
+
};
|
|
19
|
+
scaling?: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
z: number;
|
|
23
|
+
};
|
|
24
|
+
parentObjectIndex?: number;
|
|
25
|
+
castShadow?: boolean;
|
|
26
|
+
receiveShadows?: boolean;
|
|
27
|
+
normalize?: boolean | {
|
|
28
|
+
center?: boolean;
|
|
29
|
+
unitSize?: boolean;
|
|
30
|
+
parentIndex?: number;
|
|
31
|
+
};
|
|
32
|
+
title?: string;
|
|
33
|
+
subtitle?: string;
|
|
34
|
+
thumbnail?: string;
|
|
35
|
+
animation?: {
|
|
36
|
+
autoStart?: boolean | string;
|
|
37
|
+
playOnce?: boolean;
|
|
38
|
+
autoStartIndex?: number;
|
|
39
|
+
};
|
|
40
|
+
entryAnimation?: IModelAnimationConfiguration;
|
|
41
|
+
exitAnimation?: IModelAnimationConfiguration;
|
|
42
|
+
material?: {
|
|
43
|
+
directEnabled?: boolean;
|
|
44
|
+
directIntensity?: number;
|
|
45
|
+
emissiveIntensity?: number;
|
|
46
|
+
environmentIntensity?: number;
|
|
47
|
+
[propName: string]: any;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Rotation offset axis definition
|
|
51
|
+
*/
|
|
52
|
+
rotationOffsetAxis?: {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
z: number;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* the offset angle
|
|
59
|
+
*/
|
|
60
|
+
rotationOffsetAngle?: number;
|
|
61
|
+
loaderConfiguration?: {
|
|
62
|
+
maxLODsToLoad?: number;
|
|
63
|
+
progressiveLoading?: boolean;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/modelConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IModelAnimationConfiguration } from \"./modelAnimationConfiguration\";\r\n\r\nexport interface IModelConfiguration {\r\n id?: string;\r\n url?: string;\r\n root?: string; //optional\r\n file?: string | File; // is a file being loaded? root and url ignored\r\n loader?: string; // obj, gltf?\r\n position?: { x: number; y: number; z: number };\r\n rotation?: { x: number; y: number; z: number; w?: number };\r\n scaling?: { x: number; y: number; z: number };\r\n parentObjectIndex?: number; // the index of the parent object of the model in the loaded meshes array.\r\n\r\n castShadow?: boolean;\r\n receiveShadows?: boolean;\r\n normalize?:\r\n | boolean\r\n | {\r\n center?: boolean;\r\n unitSize?: boolean;\r\n parentIndex?: number;\r\n }; // should the model be scaled to unit-size\r\n\r\n title?: string;\r\n subtitle?: string;\r\n thumbnail?: string; // URL or data-url\r\n\r\n animation?: {\r\n autoStart?: boolean | string;\r\n playOnce?: boolean;\r\n autoStartIndex?: number;\r\n };\r\n\r\n entryAnimation?: IModelAnimationConfiguration;\r\n exitAnimation?: IModelAnimationConfiguration;\r\n\r\n material?: {\r\n directEnabled?: boolean;\r\n directIntensity?: number;\r\n emissiveIntensity?: number;\r\n environmentIntensity?: number;\r\n [propName: string]: any;\r\n };\r\n\r\n /**\r\n * Rotation offset axis definition\r\n */\r\n rotationOffsetAxis?: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n\r\n /**\r\n * the offset angle\r\n */\r\n rotationOffsetAngle?: number;\r\n\r\n loaderConfiguration?: {\r\n maxLODsToLoad?: number;\r\n progressiveLoading?: boolean;\r\n };\r\n\r\n // [propName: string]: any; // further configuration, like title and creator\r\n}\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observersConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/observersConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IObserversConfiguration {\r\n onEngineInit?: string;\r\n onSceneInit?: string;\r\n onModelLoaded?: string;\r\n}\r\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IImageProcessingConfiguration } from "./imageProcessingConfiguration";
|
|
2
|
+
import type { IColorGradingConfiguration } from "./colorGradingConfiguration";
|
|
3
|
+
import type { IGlowLayerOptions } from "@babylonjs/core/Layers/glowLayer.js";
|
|
4
|
+
export interface ISceneConfiguration {
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
clearColor?: {
|
|
7
|
+
r: number;
|
|
8
|
+
g: number;
|
|
9
|
+
b: number;
|
|
10
|
+
a: number;
|
|
11
|
+
};
|
|
12
|
+
/** @deprecated Please use environmentMap.mainColor instead. */
|
|
13
|
+
mainColor?: {
|
|
14
|
+
r?: number;
|
|
15
|
+
g?: number;
|
|
16
|
+
b?: number;
|
|
17
|
+
};
|
|
18
|
+
imageProcessingConfiguration?: IImageProcessingConfiguration;
|
|
19
|
+
environmentTexture?: string;
|
|
20
|
+
colorGrading?: IColorGradingConfiguration;
|
|
21
|
+
environmentRotationY?: number;
|
|
22
|
+
/** @deprecated Please use default rendering pipeline. */
|
|
23
|
+
glow?: boolean | IGlowLayerOptions;
|
|
24
|
+
disableHdr?: boolean;
|
|
25
|
+
renderInBackground?: boolean;
|
|
26
|
+
disableCameraControl?: boolean;
|
|
27
|
+
animationPropertiesOverride?: {
|
|
28
|
+
[propName: string]: any;
|
|
29
|
+
};
|
|
30
|
+
defaultMaterial?: {
|
|
31
|
+
materialType: "standard" | "pbr";
|
|
32
|
+
[propName: string]: any;
|
|
33
|
+
};
|
|
34
|
+
flags?: {
|
|
35
|
+
shadowsEnabled?: boolean;
|
|
36
|
+
particlesEnabled?: boolean;
|
|
37
|
+
collisionsEnabled?: boolean;
|
|
38
|
+
lightsEnabled?: boolean;
|
|
39
|
+
texturesEnabled?: boolean;
|
|
40
|
+
lensFlaresEnabled?: boolean;
|
|
41
|
+
proceduralTexturesEnabled?: boolean;
|
|
42
|
+
renderTargetsEnabled?: boolean;
|
|
43
|
+
spritesEnabled?: boolean;
|
|
44
|
+
skeletonsEnabled?: boolean;
|
|
45
|
+
audioEnabled?: boolean;
|
|
46
|
+
};
|
|
47
|
+
assetsRootURL?: string;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sceneConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/sceneConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IImageProcessingConfiguration } from \"./imageProcessingConfiguration\";\r\nimport type { IColorGradingConfiguration } from \"./colorGradingConfiguration\";\r\nimport type { IGlowLayerOptions } from \"core/Layers/glowLayer\";\r\n\r\nexport interface ISceneConfiguration {\r\n debug?: boolean;\r\n clearColor?: { r: number; g: number; b: number; a: number };\r\n /** @deprecated Please use environmentMap.mainColor instead. */\r\n mainColor?: { r?: number; g?: number; b?: number };\r\n imageProcessingConfiguration?: IImageProcessingConfiguration;\r\n environmentTexture?: string;\r\n colorGrading?: IColorGradingConfiguration;\r\n environmentRotationY?: number;\r\n /** @deprecated Please use default rendering pipeline. */\r\n glow?: boolean | IGlowLayerOptions;\r\n disableHdr?: boolean;\r\n renderInBackground?: boolean;\r\n disableCameraControl?: boolean;\r\n animationPropertiesOverride?: {\r\n [propName: string]: any;\r\n };\r\n defaultMaterial?: {\r\n materialType: \"standard\" | \"pbr\";\r\n [propName: string]: any;\r\n };\r\n flags?: {\r\n shadowsEnabled?: boolean;\r\n particlesEnabled?: boolean;\r\n collisionsEnabled?: boolean;\r\n lightsEnabled?: boolean;\r\n texturesEnabled?: boolean;\r\n lensFlaresEnabled?: boolean;\r\n proceduralTexturesEnabled?: boolean;\r\n renderTargetsEnabled?: boolean;\r\n spritesEnabled?: boolean;\r\n skeletonsEnabled?: boolean;\r\n audioEnabled?: boolean;\r\n };\r\n assetsRootURL?: string;\r\n}\r\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ISceneOptimizerConfiguration {
|
|
2
|
+
targetFrameRate?: number;
|
|
3
|
+
trackerDuration?: number;
|
|
4
|
+
autoGeneratePriorities?: boolean;
|
|
5
|
+
improvementMode?: boolean;
|
|
6
|
+
degradation?: string;
|
|
7
|
+
types?: {
|
|
8
|
+
texture?: ISceneOptimizerParameters;
|
|
9
|
+
hardwareScaling?: ISceneOptimizerParameters;
|
|
10
|
+
shadow?: ISceneOptimizerParameters;
|
|
11
|
+
postProcess?: ISceneOptimizerParameters;
|
|
12
|
+
lensFlare?: ISceneOptimizerParameters;
|
|
13
|
+
particles?: ISceneOptimizerParameters;
|
|
14
|
+
renderTarget?: ISceneOptimizerParameters;
|
|
15
|
+
mergeMeshes?: ISceneOptimizerParameters;
|
|
16
|
+
};
|
|
17
|
+
custom?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ISceneOptimizerParameters {
|
|
20
|
+
priority?: number;
|
|
21
|
+
maximumSize?: number;
|
|
22
|
+
step?: number;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sceneOptimizerConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/sceneOptimizerConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface ISceneOptimizerConfiguration {\r\n targetFrameRate?: number;\r\n trackerDuration?: number;\r\n autoGeneratePriorities?: boolean;\r\n improvementMode?: boolean;\r\n degradation?: string; // low, moderate, high\r\n types?: {\r\n texture?: ISceneOptimizerParameters;\r\n hardwareScaling?: ISceneOptimizerParameters;\r\n shadow?: ISceneOptimizerParameters;\r\n postProcess?: ISceneOptimizerParameters;\r\n lensFlare?: ISceneOptimizerParameters;\r\n particles?: ISceneOptimizerParameters;\r\n renderTarget?: ISceneOptimizerParameters;\r\n mergeMeshes?: ISceneOptimizerParameters;\r\n };\r\n custom?: string;\r\n}\r\n\r\nexport interface ISceneOptimizerParameters {\r\n priority?: number;\r\n maximumSize?: number;\r\n step?: number;\r\n}\r\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IImageProcessingConfiguration } from "./imageProcessingConfiguration";
|
|
2
|
+
export interface ISkyboxConfiguration {
|
|
3
|
+
cubeTexture?: {
|
|
4
|
+
noMipMap?: boolean;
|
|
5
|
+
gammaSpace?: boolean;
|
|
6
|
+
url?: string | Array<string>;
|
|
7
|
+
};
|
|
8
|
+
color?: {
|
|
9
|
+
r: number;
|
|
10
|
+
g: number;
|
|
11
|
+
b: number;
|
|
12
|
+
};
|
|
13
|
+
/** @deprecated */ pbr?: boolean;
|
|
14
|
+
scale?: number;
|
|
15
|
+
/** @deprecated */ blur?: number;
|
|
16
|
+
material?: {
|
|
17
|
+
imageProcessingConfiguration?: IImageProcessingConfiguration;
|
|
18
|
+
[propName: string]: any;
|
|
19
|
+
};
|
|
20
|
+
infiniteDistance?: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skyboxConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/skyboxConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IImageProcessingConfiguration } from \"./imageProcessingConfiguration\";\r\n\r\nexport interface ISkyboxConfiguration {\r\n cubeTexture?: {\r\n noMipMap?: boolean;\r\n gammaSpace?: boolean;\r\n url?: string | Array<string>;\r\n };\r\n color?: { r: number; g: number; b: number };\r\n /** @deprecated */ pbr?: boolean;\r\n scale?: number;\r\n /** @deprecated */ blur?: number;\r\n material?: {\r\n imageProcessingConfiguration?: IImageProcessingConfiguration;\r\n [propName: string]: any;\r\n };\r\n infiniteDistance?: boolean;\r\n}\r\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single template configuration object
|
|
3
|
+
*/
|
|
4
|
+
export interface ITemplateConfiguration {
|
|
5
|
+
/**
|
|
6
|
+
* can be either the id of the template's html element or a URL.
|
|
7
|
+
* See - https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#location-vs-html
|
|
8
|
+
*/
|
|
9
|
+
location?: string;
|
|
10
|
+
/**
|
|
11
|
+
* If no location is provided you can provide here the raw html of this template.
|
|
12
|
+
* See https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#location-vs-html
|
|
13
|
+
*/
|
|
14
|
+
html?: string;
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Parameters that will be delivered to the template and will render it accordingly.
|
|
18
|
+
*/
|
|
19
|
+
params?: {
|
|
20
|
+
[key: string]: string | number | boolean | object;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Events to attach to this template.
|
|
24
|
+
* event name is the key. the value can either be a boolean (attach to the parent element)
|
|
25
|
+
* or a map of html id elements.
|
|
26
|
+
*
|
|
27
|
+
* See - https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#event-binding
|
|
28
|
+
*/
|
|
29
|
+
events?: {
|
|
30
|
+
pointerdown?: boolean | {
|
|
31
|
+
[id: string]: boolean;
|
|
32
|
+
};
|
|
33
|
+
pointerup?: boolean | {
|
|
34
|
+
[id: string]: boolean;
|
|
35
|
+
};
|
|
36
|
+
pointermove?: boolean | {
|
|
37
|
+
[id: string]: boolean;
|
|
38
|
+
};
|
|
39
|
+
pointerover?: boolean | {
|
|
40
|
+
[id: string]: boolean;
|
|
41
|
+
};
|
|
42
|
+
pointerout?: boolean | {
|
|
43
|
+
[id: string]: boolean;
|
|
44
|
+
};
|
|
45
|
+
pointerenter?: boolean | {
|
|
46
|
+
[id: string]: boolean;
|
|
47
|
+
};
|
|
48
|
+
pointerleave?: boolean | {
|
|
49
|
+
[id: string]: boolean;
|
|
50
|
+
};
|
|
51
|
+
pointercancel?: boolean | {
|
|
52
|
+
[id: string]: boolean;
|
|
53
|
+
};
|
|
54
|
+
click?: boolean | {
|
|
55
|
+
[id: string]: boolean;
|
|
56
|
+
};
|
|
57
|
+
dragstart?: boolean | {
|
|
58
|
+
[id: string]: boolean;
|
|
59
|
+
};
|
|
60
|
+
drop?: boolean | {
|
|
61
|
+
[id: string]: boolean;
|
|
62
|
+
};
|
|
63
|
+
[key: string]: boolean | {
|
|
64
|
+
[id: string]: boolean;
|
|
65
|
+
} | undefined;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/templateConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * A single template configuration object\r\n */\r\nexport interface ITemplateConfiguration {\r\n /**\r\n * can be either the id of the template's html element or a URL.\r\n * See - https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#location-vs-html\r\n */\r\n location?: string; // #template-id OR http://example.com/loading.html\r\n /**\r\n * If no location is provided you can provide here the raw html of this template.\r\n * See https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#location-vs-html\r\n */\r\n html?: string; // raw html string\r\n id?: string;\r\n /**\r\n * Parameters that will be delivered to the template and will render it accordingly.\r\n */\r\n params?: { [key: string]: string | number | boolean | object };\r\n /**\r\n * Events to attach to this template.\r\n * event name is the key. the value can either be a boolean (attach to the parent element)\r\n * or a map of html id elements.\r\n *\r\n * See - https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#event-binding\r\n */\r\n events?: {\r\n // pointer events\r\n pointerdown?: boolean | { [id: string]: boolean };\r\n pointerup?: boolean | { [id: string]: boolean };\r\n pointermove?: boolean | { [id: string]: boolean };\r\n pointerover?: boolean | { [id: string]: boolean };\r\n pointerout?: boolean | { [id: string]: boolean };\r\n pointerenter?: boolean | { [id: string]: boolean };\r\n pointerleave?: boolean | { [id: string]: boolean };\r\n pointercancel?: boolean | { [id: string]: boolean };\r\n //click, just in case\r\n click?: boolean | { [id: string]: boolean };\r\n // drag and drop\r\n dragstart?: boolean | { [id: string]: boolean };\r\n drop?: boolean | { [id: string]: boolean };\r\n\r\n [key: string]: boolean | { [id: string]: boolean } | undefined;\r\n };\r\n}\r\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { VRExperienceHelperOptions } from "@babylonjs/core/Cameras/VR/vrExperienceHelper.js";
|
|
2
|
+
export interface IVRConfiguration {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
objectScaleFactor?: number;
|
|
5
|
+
disableInteractions?: boolean;
|
|
6
|
+
disableTeleportation?: boolean;
|
|
7
|
+
overrideFloorMeshName?: string;
|
|
8
|
+
vrOptions?: VRExperienceHelperOptions;
|
|
9
|
+
modelHeightCorrection?: number | boolean;
|
|
10
|
+
rotateUsingControllers?: boolean;
|
|
11
|
+
cameraPosition?: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
z: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vrConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/vrConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { VRExperienceHelperOptions } from \"core/Cameras/VR/vrExperienceHelper\";\r\n\r\nexport interface IVRConfiguration {\r\n disabled?: boolean;\r\n objectScaleFactor?: number;\r\n disableInteractions?: boolean;\r\n disableTeleportation?: boolean;\r\n overrideFloorMeshName?: string;\r\n vrOptions?: VRExperienceHelperOptions;\r\n modelHeightCorrection?: number | boolean;\r\n rotateUsingControllers?: boolean; // experimental feature\r\n cameraPosition?: { x: number; y: number; z: number };\r\n}\r\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __extends } from "@babylonjs/core/tslib.es6.js";
|
|
2
|
+
import { RenderOnlyConfigurationLoader } from "./renderOnlyLoader.js";
|
|
3
|
+
// eslint-disable-next-line import/no-internal-modules
|
|
4
|
+
import { getConfigurationType } from "./types/index.js";
|
|
5
|
+
var ConfigurationLoader = /** @class */ (function (_super) {
|
|
6
|
+
__extends(ConfigurationLoader, _super);
|
|
7
|
+
function ConfigurationLoader() {
|
|
8
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11
|
+
ConfigurationLoader.prototype.getExtendedConfig = function (type) {
|
|
12
|
+
return getConfigurationType(type || "extended");
|
|
13
|
+
};
|
|
14
|
+
return ConfigurationLoader;
|
|
15
|
+
}(RenderOnlyConfigurationLoader));
|
|
16
|
+
export { ConfigurationLoader };
|
|
17
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/loader.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,sDAAsD;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD;IAAyC,uCAA6B;IAAtE;;IAKA,CAAC;IAJG,gEAAgE;IAC7C,+CAAiB,GAApC,UAAqC,IAAwB;QACzD,OAAO,oBAAoB,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC;IACpD,CAAC;IACL,0BAAC;AAAD,CAAC,AALD,CAAyC,6BAA6B,GAKrE","sourcesContent":["import { RenderOnlyConfigurationLoader } from \"./renderOnlyLoader\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { getConfigurationType } from \"./types/index\";\r\n\r\nexport class ConfigurationLoader extends RenderOnlyConfigurationLoader {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected override getExtendedConfig(type: string | undefined) {\r\n return getConfigurationType(type || \"extended\");\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ViewerConfiguration } from "./configuration";
|
|
2
|
+
/**
|
|
3
|
+
* This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager
|
|
4
|
+
*/
|
|
5
|
+
export interface IMapper {
|
|
6
|
+
map(rawSource: any): ViewerConfiguration;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The MapperManager manages the different implemented mappers.
|
|
10
|
+
* It allows the user to register new mappers as well and use them to parse their own configuration data
|
|
11
|
+
*/
|
|
12
|
+
export declare class MapperManager {
|
|
13
|
+
private _mappers;
|
|
14
|
+
/**
|
|
15
|
+
* The default mapper is the JSON mapper.
|
|
16
|
+
*/
|
|
17
|
+
static DefaultMapper: string;
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Get a specific configuration mapper.
|
|
21
|
+
*
|
|
22
|
+
* @param type the name of the mapper to load
|
|
23
|
+
* @returns the mapper
|
|
24
|
+
*/
|
|
25
|
+
getMapper(type: string): IMapper;
|
|
26
|
+
/**
|
|
27
|
+
* Use this function to register your own configuration mapper.
|
|
28
|
+
* After a mapper is registered, it can be used to parse the specific type fo configuration to the standard ViewerConfiguration.
|
|
29
|
+
* @param type the name of the mapper. This will be used to define the configuration type and/or to get the mapper
|
|
30
|
+
* @param mapper The implemented mapper
|
|
31
|
+
*/
|
|
32
|
+
registerMapper(type: string, mapper: IMapper): void;
|
|
33
|
+
/**
|
|
34
|
+
* Dispose the mapper manager and all of its mappers.
|
|
35
|
+
*/
|
|
36
|
+
dispose(): void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* mapperManager is a singleton of the type MapperManager.
|
|
40
|
+
* The mapperManager can be disposed directly with calling mapperManager.dispose()
|
|
41
|
+
* or indirectly with using BabylonViewer.disposeAll()
|
|
42
|
+
*/
|
|
43
|
+
export declare const mapperManager: MapperManager;
|