|
@@ -232,14 +232,14 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
|
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/viewer/viewer' {
|
|
|
- import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
|
|
|
+ import { Engine, ISceneLoaderPlugin, ISceneLoaderPluginAsync, Observable, Scene, SceneLoaderProgressEvent } from 'babylonjs';
|
|
|
+ import { IModelConfiguration, IObserversConfiguration, ViewerConfiguration } from 'babylonjs-viewer/configuration';
|
|
|
+ import { ConfigurationContainer } from 'babylonjs-viewer/configuration/configurationContainer';
|
|
|
import { ConfigurationLoader } from 'babylonjs-viewer/configuration/loader';
|
|
|
- import { Observable, Engine, Scene, SceneLoaderProgressEvent, ISceneLoaderPlugin, ISceneLoaderPluginAsync } from 'babylonjs';
|
|
|
- import { ViewerConfiguration, IObserversConfiguration, IModelConfiguration } from 'babylonjs-viewer/configuration';
|
|
|
- import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
|
|
|
import { ModelLoader } from 'babylonjs-viewer/loader/modelLoader';
|
|
|
import { ObservablesManager } from 'babylonjs-viewer/managers/observablesManager';
|
|
|
- import { ConfigurationContainer } from 'babylonjs-viewer/configuration/configurationContainer';
|
|
|
+ import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
|
|
|
+ import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
|
|
|
import { TemplateManager } from 'babylonjs-viewer/templating/templateManager';
|
|
|
/**
|
|
|
* The AbstractViewr is the center of Babylon's viewer.
|
|
@@ -529,6 +529,7 @@ declare module 'babylonjs-viewer/loader/modelLoader' {
|
|
|
* A Model loader is unique per (Abstract)Viewer. It is being generated by the viewer
|
|
|
*/
|
|
|
export class ModelLoader {
|
|
|
+ readonly baseUrl: string;
|
|
|
/**
|
|
|
* Create a new Model loader
|
|
|
* @param _viewer the viewer using this model loader
|
|
@@ -1264,6 +1265,101 @@ declare module 'babylonjs-viewer/templating/templateManager' {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module 'babylonjs-viewer/configuration/configurationContainer' {
|
|
|
+ import { ViewerConfiguration } from 'babylonjs-viewer/configuration/configuration';
|
|
|
+ import { Color3, Scene } from 'babylonjs';
|
|
|
+ export class ConfigurationContainer {
|
|
|
+ configuration: ViewerConfiguration;
|
|
|
+ viewerId: string;
|
|
|
+ mainColor: Color3;
|
|
|
+ reflectionColor: Color3;
|
|
|
+ scene?: Scene;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module 'babylonjs-viewer/configuration/loader' {
|
|
|
+ import { ViewerConfiguration } from 'babylonjs-viewer/configuration/configuration';
|
|
|
+ /**
|
|
|
+ * The configuration loader will load the configuration object from any source and will use the defined mapper to
|
|
|
+ * parse the object and return a conform ViewerConfiguration.
|
|
|
+ * It is a private member of the scene.
|
|
|
+ */
|
|
|
+ export class ConfigurationLoader {
|
|
|
+ constructor(_enableCache?: boolean);
|
|
|
+ /**
|
|
|
+ * load a configuration object that is defined in the initial configuration provided.
|
|
|
+ * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.
|
|
|
+ *
|
|
|
+ * @param initConfig the initial configuration that has the definitions of further configuration to load.
|
|
|
+ * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only
|
|
|
+ * @returns A promise that delivers the extended viewer configuration, when done.
|
|
|
+ */
|
|
|
+ loadConfiguration(initConfig?: ViewerConfiguration, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration>;
|
|
|
+ /**
|
|
|
+ * Dispose the configuration loader. This will cancel file requests, if active.
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module 'babylonjs-viewer/managers/observablesManager' {
|
|
|
+ import { Engine, ISceneLoaderPlugin, ISceneLoaderPluginAsync, Observable, Scene, SceneLoaderProgressEvent } from 'babylonjs';
|
|
|
+ import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
|
|
|
+ export class ObservablesManager {
|
|
|
+ /**
|
|
|
+ * Will notify when the scene was initialized
|
|
|
+ */
|
|
|
+ onSceneInitObservable: Observable<Scene>;
|
|
|
+ /**
|
|
|
+ * will notify when the engine was initialized
|
|
|
+ */
|
|
|
+ onEngineInitObservable: Observable<Engine>;
|
|
|
+ /**
|
|
|
+ * Will notify when a new model was added to the scene.
|
|
|
+ * Note that added does not neccessarily mean loaded!
|
|
|
+ */
|
|
|
+ onModelAddedObservable: Observable<ViewerModel>;
|
|
|
+ /**
|
|
|
+ * will notify after every model load
|
|
|
+ */
|
|
|
+ onModelLoadedObservable: Observable<ViewerModel>;
|
|
|
+ /**
|
|
|
+ * will notify when any model notify of progress
|
|
|
+ */
|
|
|
+ onModelLoadProgressObservable: Observable<SceneLoaderProgressEvent>;
|
|
|
+ /**
|
|
|
+ * will notify when any model load failed.
|
|
|
+ */
|
|
|
+ onModelLoadErrorObservable: Observable<{
|
|
|
+ message: string;
|
|
|
+ exception: any;
|
|
|
+ }>;
|
|
|
+ /**
|
|
|
+ * Will notify when a model was removed from the scene;
|
|
|
+ */
|
|
|
+ onModelRemovedObservable: Observable<ViewerModel>;
|
|
|
+ /**
|
|
|
+ * will notify when a new loader was initialized.
|
|
|
+ * Used mainly to know when a model starts loading.
|
|
|
+ */
|
|
|
+ onLoaderInitObservable: Observable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
|
+ /**
|
|
|
+ * Observers registered here will be executed when the entire load process has finished.
|
|
|
+ */
|
|
|
+ onViewerInitDoneObservable: Observable<any>;
|
|
|
+ /**
|
|
|
+ * Will notify when the viewer init started (after configuration was loaded)
|
|
|
+ */
|
|
|
+ onViewerInitStartedObservable: Observable<any>;
|
|
|
+ /**
|
|
|
+ * Functions added to this observable will be executed on each frame rendered.
|
|
|
+ */
|
|
|
+ onFrameRenderedObservable: Observable<any>;
|
|
|
+ constructor();
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
declare module 'babylonjs-viewer/managers/sceneManager' {
|
|
|
import { Scene, ArcRotateCamera, Engine, Light, SceneOptimizer, EnvironmentHelper, Color3, Observable, DefaultRenderingPipeline, Nullable, VRExperienceHelper } from 'babylonjs';
|
|
|
import { ILightConfiguration, ISceneConfiguration, ISceneOptimizerConfiguration, ICameraConfiguration, ISkyboxConfiguration, ViewerConfiguration, IGroundConfiguration, IModelConfiguration, IVRConfiguration } from 'babylonjs-viewer/configuration';
|
|
@@ -1451,101 +1547,6 @@ declare module 'babylonjs-viewer/managers/sceneManager' {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-declare module 'babylonjs-viewer/configuration/loader' {
|
|
|
- import { ViewerConfiguration } from 'babylonjs-viewer/configuration/configuration';
|
|
|
- /**
|
|
|
- * The configuration loader will load the configuration object from any source and will use the defined mapper to
|
|
|
- * parse the object and return a conform ViewerConfiguration.
|
|
|
- * It is a private member of the scene.
|
|
|
- */
|
|
|
- export class ConfigurationLoader {
|
|
|
- constructor(_enableCache?: boolean);
|
|
|
- /**
|
|
|
- * load a configuration object that is defined in the initial configuration provided.
|
|
|
- * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.
|
|
|
- *
|
|
|
- * @param initConfig the initial configuration that has the definitions of further configuration to load.
|
|
|
- * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only
|
|
|
- * @returns A promise that delivers the extended viewer configuration, when done.
|
|
|
- */
|
|
|
- loadConfiguration(initConfig?: ViewerConfiguration, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration>;
|
|
|
- /**
|
|
|
- * Dispose the configuration loader. This will cancel file requests, if active.
|
|
|
- */
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module 'babylonjs-viewer/managers/observablesManager' {
|
|
|
- import { Engine, ISceneLoaderPlugin, ISceneLoaderPluginAsync, Observable, Scene, SceneLoaderProgressEvent } from 'babylonjs';
|
|
|
- import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
|
|
|
- export class ObservablesManager {
|
|
|
- /**
|
|
|
- * Will notify when the scene was initialized
|
|
|
- */
|
|
|
- onSceneInitObservable: Observable<Scene>;
|
|
|
- /**
|
|
|
- * will notify when the engine was initialized
|
|
|
- */
|
|
|
- onEngineInitObservable: Observable<Engine>;
|
|
|
- /**
|
|
|
- * Will notify when a new model was added to the scene.
|
|
|
- * Note that added does not neccessarily mean loaded!
|
|
|
- */
|
|
|
- onModelAddedObservable: Observable<ViewerModel>;
|
|
|
- /**
|
|
|
- * will notify after every model load
|
|
|
- */
|
|
|
- onModelLoadedObservable: Observable<ViewerModel>;
|
|
|
- /**
|
|
|
- * will notify when any model notify of progress
|
|
|
- */
|
|
|
- onModelLoadProgressObservable: Observable<SceneLoaderProgressEvent>;
|
|
|
- /**
|
|
|
- * will notify when any model load failed.
|
|
|
- */
|
|
|
- onModelLoadErrorObservable: Observable<{
|
|
|
- message: string;
|
|
|
- exception: any;
|
|
|
- }>;
|
|
|
- /**
|
|
|
- * Will notify when a model was removed from the scene;
|
|
|
- */
|
|
|
- onModelRemovedObservable: Observable<ViewerModel>;
|
|
|
- /**
|
|
|
- * will notify when a new loader was initialized.
|
|
|
- * Used mainly to know when a model starts loading.
|
|
|
- */
|
|
|
- onLoaderInitObservable: Observable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
|
- /**
|
|
|
- * Observers registered here will be executed when the entire load process has finished.
|
|
|
- */
|
|
|
- onViewerInitDoneObservable: Observable<any>;
|
|
|
- /**
|
|
|
- * Will notify when the viewer init started (after configuration was loaded)
|
|
|
- */
|
|
|
- onViewerInitStartedObservable: Observable<any>;
|
|
|
- /**
|
|
|
- * Functions added to this observable will be executed on each frame rendered.
|
|
|
- */
|
|
|
- onFrameRenderedObservable: Observable<any>;
|
|
|
- constructor();
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module 'babylonjs-viewer/configuration/configurationContainer' {
|
|
|
- import { ViewerConfiguration } from 'babylonjs-viewer/configuration/configuration';
|
|
|
- import { Color3, Scene } from 'babylonjs';
|
|
|
- export class ConfigurationContainer {
|
|
|
- configuration: ViewerConfiguration;
|
|
|
- viewerId: string;
|
|
|
- mainColor: Color3;
|
|
|
- reflectionColor: Color3;
|
|
|
- scene?: Scene;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
declare module 'babylonjs-viewer/configuration/interfaces/modelConfiguration' {
|
|
|
import { IModelAnimationConfiguration } from "babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration";
|
|
|
export interface IModelConfiguration {
|