@babylonjs/viewer 5.0.0 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/configuration/configuration.d.ts +107 -107
  2. package/configuration/configuration.js +15 -15
  3. package/configuration/configurationCompatibility.d.ts +8 -8
  4. package/configuration/configurationCompatibility.js +65 -65
  5. package/configuration/configurationContainer.d.ts +10 -10
  6. package/configuration/configurationContainer.js +9 -9
  7. package/configuration/globals.d.ts +6 -6
  8. package/configuration/globals.js +17 -17
  9. package/configuration/index.d.ts +2 -2
  10. package/configuration/index.js +3 -3
  11. package/configuration/interfaces/cameraConfiguration.d.ts +31 -31
  12. package/configuration/interfaces/cameraConfiguration.js +1 -1
  13. package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -81
  14. package/configuration/interfaces/colorGradingConfiguration.js +1 -1
  15. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -20
  16. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +1 -1
  17. package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -22
  18. package/configuration/interfaces/environmentMapConfiguration.js +1 -1
  19. package/configuration/interfaces/groundConfiguration.d.ts +24 -24
  20. package/configuration/interfaces/groundConfiguration.js +1 -1
  21. package/configuration/interfaces/imageProcessingConfiguration.d.ts +43 -43
  22. package/configuration/interfaces/imageProcessingConfiguration.js +1 -1
  23. package/configuration/interfaces/index.d.ts +15 -15
  24. package/configuration/interfaces/index.js +15 -15
  25. package/configuration/interfaces/lightConfiguration.d.ts +60 -60
  26. package/configuration/interfaces/lightConfiguration.js +1 -1
  27. package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -26
  28. package/configuration/interfaces/modelAnimationConfiguration.js +1 -1
  29. package/configuration/interfaces/modelConfiguration.d.ts +65 -65
  30. package/configuration/interfaces/modelConfiguration.js +1 -1
  31. package/configuration/interfaces/observersConfiguration.d.ts +5 -5
  32. package/configuration/interfaces/observersConfiguration.js +1 -1
  33. package/configuration/interfaces/sceneConfiguration.d.ts +48 -48
  34. package/configuration/interfaces/sceneConfiguration.js +1 -1
  35. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -23
  36. package/configuration/interfaces/sceneOptimizerConfiguration.js +1 -1
  37. package/configuration/interfaces/skyboxConfiguration.d.ts +21 -21
  38. package/configuration/interfaces/skyboxConfiguration.js +1 -1
  39. package/configuration/interfaces/templateConfiguration.d.ts +67 -67
  40. package/configuration/interfaces/templateConfiguration.js +1 -1
  41. package/configuration/interfaces/vrConfiguration.d.ts +16 -16
  42. package/configuration/interfaces/vrConfiguration.js +1 -1
  43. package/configuration/loader.d.ts +4 -4
  44. package/configuration/loader.js +16 -16
  45. package/configuration/mappers.d.ts +42 -42
  46. package/configuration/mappers.js +190 -190
  47. package/configuration/renderOnlyLoader.d.ts +33 -33
  48. package/configuration/renderOnlyLoader.js +161 -161
  49. package/configuration/types/default.d.ts +6 -6
  50. package/configuration/types/default.js +120 -120
  51. package/configuration/types/environmentMap.d.ts +5 -5
  52. package/configuration/types/environmentMap.js +13 -13
  53. package/configuration/types/extended.d.ts +6 -6
  54. package/configuration/types/extended.js +316 -316
  55. package/configuration/types/index.d.ts +13 -13
  56. package/configuration/types/index.js +49 -49
  57. package/configuration/types/minimal.d.ts +6 -6
  58. package/configuration/types/minimal.js +42 -42
  59. package/configuration/types/renderOnlyDefault.d.ts +30 -30
  60. package/configuration/types/renderOnlyDefault.js +30 -30
  61. package/configuration/types/shadowLight.d.ts +9 -9
  62. package/configuration/types/shadowLight.js +63 -63
  63. package/helper/index.d.ts +26 -26
  64. package/helper/index.js +62 -62
  65. package/index.d.ts +30 -30
  66. package/index.js +45 -45
  67. package/initializer.d.ts +11 -11
  68. package/initializer.js +34 -34
  69. package/interfaces.d.ts +5 -5
  70. package/interfaces.js +1 -1
  71. package/labs/environmentSerializer.d.ts +126 -126
  72. package/labs/environmentSerializer.js +190 -190
  73. package/labs/texture.d.ts +183 -183
  74. package/labs/texture.js +300 -300
  75. package/labs/viewerLabs.d.ts +51 -51
  76. package/labs/viewerLabs.js +133 -133
  77. package/loader/modelLoader.d.ts +47 -47
  78. package/loader/modelLoader.js +189 -189
  79. package/loader/plugins/applyMaterialConfig.d.ts +12 -12
  80. package/loader/plugins/applyMaterialConfig.js +15 -15
  81. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -9
  82. package/loader/plugins/extendedMaterialLoaderPlugin.js +15 -15
  83. package/loader/plugins/index.d.ts +18 -18
  84. package/loader/plugins/index.js +42 -42
  85. package/loader/plugins/loaderPlugin.d.ts +24 -24
  86. package/loader/plugins/loaderPlugin.js +1 -1
  87. package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -12
  88. package/loader/plugins/msftLodLoaderPlugin.js +20 -20
  89. package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -12
  90. package/loader/plugins/telemetryLoaderPlugin.js +35 -35
  91. package/managers/observablesManager.d.ts +66 -66
  92. package/managers/observablesManager.js +34 -34
  93. package/managers/sceneManager.d.ts +243 -243
  94. package/managers/sceneManager.js +1388 -1388
  95. package/managers/telemetryManager.d.ts +57 -57
  96. package/managers/telemetryManager.js +113 -113
  97. package/model/modelAnimation.d.ts +215 -215
  98. package/model/modelAnimation.js +232 -232
  99. package/model/viewerModel.d.ts +228 -228
  100. package/model/viewerModel.js +669 -669
  101. package/optimizer/custom/extended.d.ts +11 -11
  102. package/optimizer/custom/extended.js +98 -98
  103. package/optimizer/custom/index.d.ts +8 -8
  104. package/optimizer/custom/index.js +24 -24
  105. package/package.json +5 -5
  106. package/renderOnlyIndex.d.ts +11 -11
  107. package/renderOnlyIndex.js +17 -17
  108. package/templating/eventManager.d.ts +35 -35
  109. package/templating/eventManager.js +65 -65
  110. package/templating/plugins/hdButtonPlugin.d.ts +9 -9
  111. package/templating/plugins/hdButtonPlugin.js +21 -21
  112. package/templating/plugins/printButton.d.ts +9 -9
  113. package/templating/plugins/printButton.js +40 -40
  114. package/templating/templateManager.d.ts +190 -190
  115. package/templating/templateManager.js +553 -553
  116. package/templating/viewerTemplatePlugin.d.ts +21 -21
  117. package/templating/viewerTemplatePlugin.js +68 -68
  118. package/viewer/defaultViewer.d.ts +122 -122
  119. package/viewer/defaultViewer.js +665 -665
  120. package/viewer/renderOnlyViewer.d.ts +8 -8
  121. package/viewer/renderOnlyViewer.js +43 -43
  122. package/viewer/viewer.d.ts +254 -254
  123. package/viewer/viewer.js +777 -777
  124. package/viewer/viewerManager.d.ts +55 -55
  125. package/viewer/viewerManager.js +87 -87
  126. package/viewer/viewerWithTemplate.d.ts +9 -9
  127. package/viewer/viewerWithTemplate.js +19 -19
@@ -1,24 +1,24 @@
1
- import type { ViewerModel } from "../../model/viewerModel";
2
- import type { IGLTFLoaderExtension } from "@babylonjs/loaders/glTF/2.0/glTFLoaderExtension.js";
3
- import type { IGLTFLoaderData } from "@babylonjs/loaders/glTF/glTFFileLoader.js";
4
- import type { ISceneLoaderPlugin, ISceneLoaderPluginAsync, ISceneLoaderProgressEvent } from "@babylonjs/core/Loading/sceneLoader.js";
5
- import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
6
- import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
7
- import type { Material } from "@babylonjs/core/Materials/material.js";
8
- /**
9
- * This interface defines the structure of a loader plugin.
10
- * Any of those functions will be called if (!) the loader supports those callbacks.
11
- * Any loader supports onInit, onLoaded, onError and onProgress.
12
- */
13
- export interface ILoaderPlugin {
14
- onInit?: (loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel) => void;
15
- onLoaded?: (model: ViewerModel) => void;
16
- onError?: (message: string, exception?: any) => void;
17
- onProgress?: (progressEvent: ISceneLoaderProgressEvent) => void;
18
- onExtensionLoaded?: (extension: IGLTFLoaderExtension) => void;
19
- onParsed?: (parsedData: IGLTFLoaderData) => void;
20
- onMeshLoaded?: (mesh: AbstractMesh) => void;
21
- onTextureLoaded?: (texture: BaseTexture) => void;
22
- onMaterialLoaded?: (material: Material) => void;
23
- onComplete?: () => void;
24
- }
1
+ import type { ViewerModel } from "../../model/viewerModel";
2
+ import type { IGLTFLoaderExtension } from "@babylonjs/loaders/glTF/2.0/glTFLoaderExtension.js";
3
+ import type { IGLTFLoaderData } from "@babylonjs/loaders/glTF/glTFFileLoader.js";
4
+ import type { ISceneLoaderPlugin, ISceneLoaderPluginAsync, ISceneLoaderProgressEvent } from "@babylonjs/core/Loading/sceneLoader.js";
5
+ import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
6
+ import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
7
+ import type { Material } from "@babylonjs/core/Materials/material.js";
8
+ /**
9
+ * This interface defines the structure of a loader plugin.
10
+ * Any of those functions will be called if (!) the loader supports those callbacks.
11
+ * Any loader supports onInit, onLoaded, onError and onProgress.
12
+ */
13
+ export interface ILoaderPlugin {
14
+ onInit?: (loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel) => void;
15
+ onLoaded?: (model: ViewerModel) => void;
16
+ onError?: (message: string, exception?: any) => void;
17
+ onProgress?: (progressEvent: ISceneLoaderProgressEvent) => void;
18
+ onExtensionLoaded?: (extension: IGLTFLoaderExtension) => void;
19
+ onParsed?: (parsedData: IGLTFLoaderData) => void;
20
+ onMeshLoaded?: (mesh: AbstractMesh) => void;
21
+ onTextureLoaded?: (texture: BaseTexture) => void;
22
+ onMaterialLoaded?: (material: Material) => void;
23
+ onComplete?: () => void;
24
+ }
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=loaderPlugin.js.map
@@ -1,12 +1,12 @@
1
- import type { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "@babylonjs/core/Loading/sceneLoader.js";
2
- import type { IGLTFLoaderExtension } from "@babylonjs/loaders/glTF/2.0/glTFLoaderExtension.js";
3
- import type { ViewerModel } from "../../model/viewerModel";
4
- import type { ILoaderPlugin } from "./loaderPlugin";
5
- /**
6
- * A loader plugin to use MSFT_lod extension correctly (glTF)
7
- */
8
- export declare class MSFTLodLoaderPlugin implements ILoaderPlugin {
9
- private _model;
10
- onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
11
- onExtensionLoaded(extension: IGLTFLoaderExtension): void;
12
- }
1
+ import type { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "@babylonjs/core/Loading/sceneLoader.js";
2
+ import type { IGLTFLoaderExtension } from "@babylonjs/loaders/glTF/2.0/glTFLoaderExtension.js";
3
+ import type { ViewerModel } from "../../model/viewerModel";
4
+ import type { ILoaderPlugin } from "./loaderPlugin";
5
+ /**
6
+ * A loader plugin to use MSFT_lod extension correctly (glTF)
7
+ */
8
+ export declare class MSFTLodLoaderPlugin implements ILoaderPlugin {
9
+ private _model;
10
+ onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
11
+ onExtensionLoaded(extension: IGLTFLoaderExtension): void;
12
+ }
@@ -1,21 +1,21 @@
1
- /**
2
- * A loader plugin to use MSFT_lod extension correctly (glTF)
3
- */
4
- var MSFTLodLoaderPlugin = /** @class */ (function () {
5
- function MSFTLodLoaderPlugin() {
6
- }
7
- MSFTLodLoaderPlugin.prototype.onInit = function (loader, model) {
8
- this._model = model;
9
- };
10
- MSFTLodLoaderPlugin.prototype.onExtensionLoaded = function (extension) {
11
- if (extension.name === "MSFT_lod" && this._model.configuration.loaderConfiguration) {
12
- // eslint-disable-next-line @typescript-eslint/naming-convention
13
- var MSFT_lod = extension;
14
- MSFT_lod.enabled = !!this._model.configuration.loaderConfiguration.progressiveLoading;
15
- MSFT_lod.maxLODsToLoad = this._model.configuration.loaderConfiguration.maxLODsToLoad || Number.MAX_VALUE;
16
- }
17
- };
18
- return MSFTLodLoaderPlugin;
19
- }());
20
- export { MSFTLodLoaderPlugin };
1
+ /**
2
+ * A loader plugin to use MSFT_lod extension correctly (glTF)
3
+ */
4
+ var MSFTLodLoaderPlugin = /** @class */ (function () {
5
+ function MSFTLodLoaderPlugin() {
6
+ }
7
+ MSFTLodLoaderPlugin.prototype.onInit = function (loader, model) {
8
+ this._model = model;
9
+ };
10
+ MSFTLodLoaderPlugin.prototype.onExtensionLoaded = function (extension) {
11
+ if (extension.name === "MSFT_lod" && this._model.configuration.loaderConfiguration) {
12
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
+ var MSFT_lod = extension;
14
+ MSFT_lod.enabled = !!this._model.configuration.loaderConfiguration.progressiveLoading;
15
+ MSFT_lod.maxLODsToLoad = this._model.configuration.loaderConfiguration.maxLODsToLoad || Number.MAX_VALUE;
16
+ }
17
+ };
18
+ return MSFTLodLoaderPlugin;
19
+ }());
20
+ export { MSFTLodLoaderPlugin };
21
21
  //# sourceMappingURL=msftLodLoaderPlugin.js.map
@@ -1,12 +1,12 @@
1
- import type { ILoaderPlugin } from "./loaderPlugin";
2
- import type { ViewerModel } from "../../model/viewerModel";
3
- import type { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "@babylonjs/core/Loading/sceneLoader.js";
4
- export declare class TelemetryLoaderPlugin implements ILoaderPlugin {
5
- private _model;
6
- private _loadStart;
7
- private _loadEnd;
8
- onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
9
- onLoaded(model: ViewerModel): void;
10
- onError(): void;
11
- onComplete(): void;
12
- }
1
+ import type { ILoaderPlugin } from "./loaderPlugin";
2
+ import type { ViewerModel } from "../../model/viewerModel";
3
+ import type { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "@babylonjs/core/Loading/sceneLoader.js";
4
+ export declare class TelemetryLoaderPlugin implements ILoaderPlugin {
5
+ private _model;
6
+ private _loadStart;
7
+ private _loadEnd;
8
+ onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
9
+ onLoaded(model: ViewerModel): void;
10
+ onError(): void;
11
+ onComplete(): void;
12
+ }
@@ -1,36 +1,36 @@
1
- import { telemetryManager } from "../../managers/telemetryManager.js";
2
- import { PrecisionDate } from "@babylonjs/core/Misc/precisionDate.js";
3
- var TelemetryLoaderPlugin = /** @class */ (function () {
4
- function TelemetryLoaderPlugin() {
5
- }
6
- TelemetryLoaderPlugin.prototype.onInit = function (loader, model) {
7
- this._model = model;
8
- this._loadStart = PrecisionDate.Now;
9
- };
10
- TelemetryLoaderPlugin.prototype.onLoaded = function (model) {
11
- telemetryManager.broadcast("Model Loaded", model.getViewerId(), {
12
- model: model,
13
- loadTime: PrecisionDate.Now - this._loadStart,
14
- });
15
- telemetryManager.flushWebGLErrors(model.rootMesh.getEngine(), model.getViewerId());
16
- };
17
- TelemetryLoaderPlugin.prototype.onError = function () {
18
- this._loadEnd = PrecisionDate.Now;
19
- telemetryManager.broadcast("Load Error", this._model.getViewerId(), {
20
- model: this._model,
21
- loadTime: this._loadEnd - this._loadStart,
22
- });
23
- telemetryManager.flushWebGLErrors(this._model.rootMesh.getEngine(), this._model.getViewerId());
24
- };
25
- TelemetryLoaderPlugin.prototype.onComplete = function () {
26
- this._loadEnd = PrecisionDate.Now;
27
- telemetryManager.broadcast("Load Complete", this._model.getViewerId(), {
28
- model: this._model,
29
- loadTime: this._loadEnd - this._loadStart,
30
- });
31
- telemetryManager.flushWebGLErrors(this._model.rootMesh.getEngine(), this._model.getViewerId());
32
- };
33
- return TelemetryLoaderPlugin;
34
- }());
35
- export { TelemetryLoaderPlugin };
1
+ import { telemetryManager } from "../../managers/telemetryManager.js";
2
+ import { PrecisionDate } from "@babylonjs/core/Misc/precisionDate.js";
3
+ var TelemetryLoaderPlugin = /** @class */ (function () {
4
+ function TelemetryLoaderPlugin() {
5
+ }
6
+ TelemetryLoaderPlugin.prototype.onInit = function (loader, model) {
7
+ this._model = model;
8
+ this._loadStart = PrecisionDate.Now;
9
+ };
10
+ TelemetryLoaderPlugin.prototype.onLoaded = function (model) {
11
+ telemetryManager.broadcast("Model Loaded", model.getViewerId(), {
12
+ model: model,
13
+ loadTime: PrecisionDate.Now - this._loadStart,
14
+ });
15
+ telemetryManager.flushWebGLErrors(model.rootMesh.getEngine(), model.getViewerId());
16
+ };
17
+ TelemetryLoaderPlugin.prototype.onError = function () {
18
+ this._loadEnd = PrecisionDate.Now;
19
+ telemetryManager.broadcast("Load Error", this._model.getViewerId(), {
20
+ model: this._model,
21
+ loadTime: this._loadEnd - this._loadStart,
22
+ });
23
+ telemetryManager.flushWebGLErrors(this._model.rootMesh.getEngine(), this._model.getViewerId());
24
+ };
25
+ TelemetryLoaderPlugin.prototype.onComplete = function () {
26
+ this._loadEnd = PrecisionDate.Now;
27
+ telemetryManager.broadcast("Load Complete", this._model.getViewerId(), {
28
+ model: this._model,
29
+ loadTime: this._loadEnd - this._loadStart,
30
+ });
31
+ telemetryManager.flushWebGLErrors(this._model.rootMesh.getEngine(), this._model.getViewerId());
32
+ };
33
+ return TelemetryLoaderPlugin;
34
+ }());
35
+ export { TelemetryLoaderPlugin };
36
36
  //# sourceMappingURL=telemetryLoaderPlugin.js.map
@@ -1,66 +1,66 @@
1
- import { Observable } from "@babylonjs/core/Misc/observable.js";
2
- import type { Scene } from "@babylonjs/core/scene.js";
3
- import type { Engine } from "@babylonjs/core/Engines/engine.js";
4
- import type { ISceneLoaderProgressEvent, ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "@babylonjs/core/Loading/sceneLoader.js";
5
- import type { ViewerModel } from "../model/viewerModel";
6
- export declare class ObservablesManager {
7
- /**
8
- * Will notify when the scene was initialized
9
- */
10
- onSceneInitObservable: Observable<Scene>;
11
- /**
12
- * will notify when the engine was initialized
13
- */
14
- onEngineInitObservable: Observable<Engine>;
15
- /**
16
- * Will notify when a new model was added to the scene.
17
- * Note that added does not necessarily mean loaded!
18
- */
19
- onModelAddedObservable: Observable<ViewerModel>;
20
- /**
21
- * will notify after every model load
22
- */
23
- onModelLoadedObservable: Observable<ViewerModel>;
24
- /**
25
- * will notify when any model notify of progress
26
- */
27
- onModelLoadProgressObservable: Observable<ISceneLoaderProgressEvent>;
28
- /**
29
- * will notify when any model load failed.
30
- */
31
- onModelLoadErrorObservable: Observable<{
32
- message: string;
33
- exception: any;
34
- }>;
35
- /**
36
- * Will notify when a model was removed from the scene;
37
- */
38
- onModelRemovedObservable: Observable<ViewerModel>;
39
- /**
40
- * will notify when a new loader was initialized.
41
- * Used mainly to know when a model starts loading.
42
- */
43
- onLoaderInitObservable: Observable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
44
- /**
45
- * Observers registered here will be executed when the entire load process has finished.
46
- */
47
- onViewerInitDoneObservable: Observable<any>;
48
- /**
49
- * Will notify when the viewer init started (after configuration was loaded)
50
- */
51
- onViewerInitStartedObservable: Observable<any>;
52
- /**
53
- * Functions added to this observable will be executed on each frame rendered.
54
- */
55
- onFrameRenderedObservable: Observable<any>;
56
- /**
57
- * Will notify when VR mode is entered.
58
- */
59
- onEnteringVRObservable: Observable<any>;
60
- /**
61
- * Will notify when VR mode is exited.
62
- */
63
- onExitingVRObservable: Observable<any>;
64
- constructor();
65
- dispose(): void;
66
- }
1
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
2
+ import type { Scene } from "@babylonjs/core/scene.js";
3
+ import type { Engine } from "@babylonjs/core/Engines/engine.js";
4
+ import type { ISceneLoaderProgressEvent, ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "@babylonjs/core/Loading/sceneLoader.js";
5
+ import type { ViewerModel } from "../model/viewerModel";
6
+ export declare class ObservablesManager {
7
+ /**
8
+ * Will notify when the scene was initialized
9
+ */
10
+ onSceneInitObservable: Observable<Scene>;
11
+ /**
12
+ * will notify when the engine was initialized
13
+ */
14
+ onEngineInitObservable: Observable<Engine>;
15
+ /**
16
+ * Will notify when a new model was added to the scene.
17
+ * Note that added does not necessarily mean loaded!
18
+ */
19
+ onModelAddedObservable: Observable<ViewerModel>;
20
+ /**
21
+ * will notify after every model load
22
+ */
23
+ onModelLoadedObservable: Observable<ViewerModel>;
24
+ /**
25
+ * will notify when any model notify of progress
26
+ */
27
+ onModelLoadProgressObservable: Observable<ISceneLoaderProgressEvent>;
28
+ /**
29
+ * will notify when any model load failed.
30
+ */
31
+ onModelLoadErrorObservable: Observable<{
32
+ message: string;
33
+ exception: any;
34
+ }>;
35
+ /**
36
+ * Will notify when a model was removed from the scene;
37
+ */
38
+ onModelRemovedObservable: Observable<ViewerModel>;
39
+ /**
40
+ * will notify when a new loader was initialized.
41
+ * Used mainly to know when a model starts loading.
42
+ */
43
+ onLoaderInitObservable: Observable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
44
+ /**
45
+ * Observers registered here will be executed when the entire load process has finished.
46
+ */
47
+ onViewerInitDoneObservable: Observable<any>;
48
+ /**
49
+ * Will notify when the viewer init started (after configuration was loaded)
50
+ */
51
+ onViewerInitStartedObservable: Observable<any>;
52
+ /**
53
+ * Functions added to this observable will be executed on each frame rendered.
54
+ */
55
+ onFrameRenderedObservable: Observable<any>;
56
+ /**
57
+ * Will notify when VR mode is entered.
58
+ */
59
+ onEnteringVRObservable: Observable<any>;
60
+ /**
61
+ * Will notify when VR mode is exited.
62
+ */
63
+ onExitingVRObservable: Observable<any>;
64
+ constructor();
65
+ dispose(): void;
66
+ }
@@ -1,35 +1,35 @@
1
- import { Observable } from "@babylonjs/core/Misc/observable.js";
2
- var ObservablesManager = /** @class */ (function () {
3
- function ObservablesManager() {
4
- this.onSceneInitObservable = new Observable();
5
- this.onEngineInitObservable = new Observable();
6
- this.onModelLoadedObservable = new Observable();
7
- this.onModelLoadProgressObservable = new Observable();
8
- this.onModelLoadErrorObservable = new Observable();
9
- this.onModelAddedObservable = new Observable();
10
- this.onModelRemovedObservable = new Observable();
11
- this.onViewerInitDoneObservable = new Observable();
12
- this.onViewerInitStartedObservable = new Observable();
13
- this.onLoaderInitObservable = new Observable();
14
- this.onFrameRenderedObservable = new Observable();
15
- this.onEnteringVRObservable = new Observable();
16
- this.onExitingVRObservable = new Observable();
17
- }
18
- ObservablesManager.prototype.dispose = function () {
19
- this.onSceneInitObservable.clear();
20
- this.onEngineInitObservable.clear();
21
- this.onModelLoadedObservable.clear();
22
- this.onModelLoadProgressObservable.clear();
23
- this.onModelLoadErrorObservable.clear();
24
- this.onModelAddedObservable.clear();
25
- this.onModelRemovedObservable.clear();
26
- this.onViewerInitDoneObservable.clear();
27
- this.onLoaderInitObservable.clear();
28
- this.onFrameRenderedObservable.clear();
29
- this.onEnteringVRObservable.clear();
30
- this.onExitingVRObservable.clear();
31
- };
32
- return ObservablesManager;
33
- }());
34
- export { ObservablesManager };
1
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
2
+ var ObservablesManager = /** @class */ (function () {
3
+ function ObservablesManager() {
4
+ this.onSceneInitObservable = new Observable();
5
+ this.onEngineInitObservable = new Observable();
6
+ this.onModelLoadedObservable = new Observable();
7
+ this.onModelLoadProgressObservable = new Observable();
8
+ this.onModelLoadErrorObservable = new Observable();
9
+ this.onModelAddedObservable = new Observable();
10
+ this.onModelRemovedObservable = new Observable();
11
+ this.onViewerInitDoneObservable = new Observable();
12
+ this.onViewerInitStartedObservable = new Observable();
13
+ this.onLoaderInitObservable = new Observable();
14
+ this.onFrameRenderedObservable = new Observable();
15
+ this.onEnteringVRObservable = new Observable();
16
+ this.onExitingVRObservable = new Observable();
17
+ }
18
+ ObservablesManager.prototype.dispose = function () {
19
+ this.onSceneInitObservable.clear();
20
+ this.onEngineInitObservable.clear();
21
+ this.onModelLoadedObservable.clear();
22
+ this.onModelLoadProgressObservable.clear();
23
+ this.onModelLoadErrorObservable.clear();
24
+ this.onModelAddedObservable.clear();
25
+ this.onModelRemovedObservable.clear();
26
+ this.onViewerInitDoneObservable.clear();
27
+ this.onLoaderInitObservable.clear();
28
+ this.onFrameRenderedObservable.clear();
29
+ this.onEnteringVRObservable.clear();
30
+ this.onExitingVRObservable.clear();
31
+ };
32
+ return ObservablesManager;
33
+ }());
34
+ export { ObservablesManager };
35
35
  //# sourceMappingURL=observablesManager.js.map