|
@@ -321,6 +321,14 @@ declare module 'babylonjs-viewer/viewer/viewer' {
|
|
* Functions added to this observable will be executed on each frame rendered.
|
|
* Functions added to this observable will be executed on each frame rendered.
|
|
*/
|
|
*/
|
|
readonly onFrameRenderedObservable: Observable<AbstractViewer>;
|
|
readonly onFrameRenderedObservable: Observable<AbstractViewer>;
|
|
|
|
+ /**
|
|
|
|
+ * Observers registered here will be executed when VR more is entered.
|
|
|
|
+ */
|
|
|
|
+ readonly onEnteringVRObservable: Observable<AbstractViewer>;
|
|
|
|
+ /**
|
|
|
|
+ * Observers registered here will be executed when VR mode is exited.
|
|
|
|
+ */
|
|
|
|
+ readonly onExitingVRObservable: Observable<AbstractViewer>;
|
|
observablesManager: ObservablesManager;
|
|
observablesManager: ObservablesManager;
|
|
/**
|
|
/**
|
|
* The canvas associated with this viewer
|
|
* The canvas associated with this viewer
|
|
@@ -416,7 +424,7 @@ declare module 'babylonjs-viewer/viewer/viewer' {
|
|
*/
|
|
*/
|
|
protected _configureObservers(observersConfiguration: IObserversConfiguration): void;
|
|
protected _configureObservers(observersConfiguration: IObserversConfiguration): void;
|
|
/**
|
|
/**
|
|
- * Dispoe the entire viewer including the scene and the engine
|
|
|
|
|
|
+ * Dispose the entire viewer including the scene and the engine
|
|
*/
|
|
*/
|
|
dispose(): void;
|
|
dispose(): void;
|
|
/**
|
|
/**
|
|
@@ -519,42 +527,7 @@ declare module 'babylonjs-viewer/managers/telemetryManager' {
|
|
}
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/loader/modelLoader' {
|
|
declare module 'babylonjs-viewer/loader/modelLoader' {
|
|
- import { ConfigurationContainer } from 'babylonjs-viewer/configuration/configurationContainer';
|
|
|
|
- import { IModelConfiguration } from 'babylonjs-viewer/configuration/interfaces/modelConfiguration';
|
|
|
|
- import { ObservablesManager } from 'babylonjs-viewer/managers/observablesManager';
|
|
|
|
- import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
|
|
|
|
- import { ILoaderPlugin } from 'babylonjs-viewer/loader/plugins';
|
|
|
|
- /**
|
|
|
|
- * An instance of the class is in charge of loading the model correctly.
|
|
|
|
- * This class will continously be expended with tasks required from the specific loaders Babylon has.
|
|
|
|
- *
|
|
|
|
- * 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
|
|
|
|
- */
|
|
|
|
- constructor(_observablesManager: ObservablesManager, _configurationContainer?: ConfigurationContainer | undefined);
|
|
|
|
- /**
|
|
|
|
- * Adds a new plugin to the loader process.
|
|
|
|
- *
|
|
|
|
- * @param plugin the plugin name or the plugin itself
|
|
|
|
- */
|
|
|
|
- addPlugin(plugin: ILoaderPlugin | string): void;
|
|
|
|
- /**
|
|
|
|
- * Load a model using predefined configuration
|
|
|
|
- * @param modelConfiguration the modelConfiguration to use to load the model
|
|
|
|
- */
|
|
|
|
- load(modelConfiguration: IModelConfiguration): ViewerModel;
|
|
|
|
- cancelLoad(model: ViewerModel): void;
|
|
|
|
- /**
|
|
|
|
- * dispose the model loader.
|
|
|
|
- * If loaders are registered and are in the middle of loading, they will be disposed and the request(s) will be cancelled.
|
|
|
|
- */
|
|
|
|
- dispose(): void;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/model/viewerModel' {
|
|
declare module 'babylonjs-viewer/model/viewerModel' {
|
|
@@ -1364,6 +1337,14 @@ declare module 'babylonjs-viewer/managers/observablesManager' {
|
|
* Functions added to this observable will be executed on each frame rendered.
|
|
* Functions added to this observable will be executed on each frame rendered.
|
|
*/
|
|
*/
|
|
onFrameRenderedObservable: Observable<any>;
|
|
onFrameRenderedObservable: Observable<any>;
|
|
|
|
+ /**
|
|
|
|
+ * Will notify when VR mode is entered.
|
|
|
|
+ */
|
|
|
|
+ onEnteringVRObservable: Observable<any>;
|
|
|
|
+ /**
|
|
|
|
+ * Will notify when VR mode is exited.
|
|
|
|
+ */
|
|
|
|
+ onExitingVRObservable: Observable<any>;
|
|
constructor();
|
|
constructor();
|
|
dispose(): void;
|
|
dispose(): void;
|
|
}
|
|
}
|
|
@@ -1626,26 +1607,6 @@ declare module 'babylonjs-viewer/configuration/interfaces/modelConfiguration' {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-declare module 'babylonjs-viewer/loader/plugins' {
|
|
|
|
- import { TelemetryLoaderPlugin } from "babylonjs-viewer/loader/plugins/telemetryLoaderPlugin";
|
|
|
|
- import { ILoaderPlugin } from "babylonjs-viewer/loader/plugins/loaderPlugin";
|
|
|
|
- import { MSFTLodLoaderPlugin } from 'babylonjs-viewer/loader/plugins/msftLodLoaderPlugin';
|
|
|
|
- import { ApplyMaterialConfigPlugin } from 'babylonjs-viewer/loader/plugins/applyMaterialConfig';
|
|
|
|
- import { ExtendedMaterialLoaderPlugin } from 'babylonjs-viewer/loader/plugins/extendedMaterialLoaderPlugin';
|
|
|
|
- export { TelemetryLoaderPlugin, ILoaderPlugin, MSFTLodLoaderPlugin, ApplyMaterialConfigPlugin, ExtendedMaterialLoaderPlugin };
|
|
|
|
- /**
|
|
|
|
- * Get a loader plugin according to its name.
|
|
|
|
- * The plugin will be cached and will be reused if called for again.
|
|
|
|
- *
|
|
|
|
- * @param name the name of the plugin
|
|
|
|
- */
|
|
|
|
- export function getLoaderPluginByName(name: string): ILoaderPlugin;
|
|
|
|
- /**
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
- export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
declare module 'babylonjs-viewer/configuration/interfaces' {
|
|
declare module 'babylonjs-viewer/configuration/interfaces' {
|
|
export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
|
|
export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
|
|
export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';
|
|
export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';
|
|
@@ -1804,57 +1765,6 @@ declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfigur
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-declare module 'babylonjs-viewer/loader/plugins/telemetryLoaderPlugin' {
|
|
|
|
- import { ILoaderPlugin } from "babylonjs-viewer/loader/plugins/loaderPlugin";
|
|
|
|
- import { ViewerModel } from "babylonjs-viewer/model/viewerModel";
|
|
|
|
- import { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from "babylonjs";
|
|
|
|
- export class TelemetryLoaderPlugin implements ILoaderPlugin {
|
|
|
|
- onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
|
|
|
|
- onLoaded(model: ViewerModel): void;
|
|
|
|
- onError(message: string, exception: any): void;
|
|
|
|
- onComplete(): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module 'babylonjs-viewer/loader/plugins/msftLodLoaderPlugin' {
|
|
|
|
- import { ISceneLoaderPlugin, ISceneLoaderPluginAsync } from 'babylonjs';
|
|
|
|
- import { IGLTFLoaderExtension } from 'babylonjs-loaders';
|
|
|
|
- import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
|
|
|
|
- import { ILoaderPlugin } from 'babylonjs-viewer/loader/plugins/loaderPlugin';
|
|
|
|
- /**
|
|
|
|
- * A loder plugin to use MSFT_lod extension correctly (glTF)
|
|
|
|
- */
|
|
|
|
- export class MSFTLodLoaderPlugin implements ILoaderPlugin {
|
|
|
|
- onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
|
|
|
|
- onExtensionLoaded(extension: IGLTFLoaderExtension): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module 'babylonjs-viewer/loader/plugins/applyMaterialConfig' {
|
|
|
|
- import { ISceneLoaderPlugin, ISceneLoaderPluginAsync, Material } from 'babylonjs';
|
|
|
|
- import { ViewerModel } from 'babylonjs-viewer/model/viewerModel';
|
|
|
|
- import { ILoaderPlugin } from 'babylonjs-viewer/loader/plugins/loaderPlugin';
|
|
|
|
- /**
|
|
|
|
- * Force-apply material configuration right after a material was loaded.
|
|
|
|
- */
|
|
|
|
- export class ApplyMaterialConfigPlugin implements ILoaderPlugin {
|
|
|
|
- onInit(loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync, model: ViewerModel): void;
|
|
|
|
- onMaterialLoaded(material: Material): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-declare module 'babylonjs-viewer/loader/plugins/extendedMaterialLoaderPlugin' {
|
|
|
|
- import { Material } from 'babylonjs';
|
|
|
|
- import { ILoaderPlugin } from 'babylonjs-viewer/loader/plugins/loaderPlugin';
|
|
|
|
- /**
|
|
|
|
- * A (PBR) material will be extended using this function.
|
|
|
|
- * This function will hold extra default configuration for the viewer, if not implemented in Babylon itself.
|
|
|
|
- */
|
|
|
|
- export class ExtendedMaterialLoaderPlugin implements ILoaderPlugin {
|
|
|
|
- onMaterialLoaded(baseMaterial: Material): void;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
declare module 'babylonjs-viewer/configuration/interfaces/cameraConfiguration' {
|
|
declare module 'babylonjs-viewer/configuration/interfaces/cameraConfiguration' {
|
|
export interface ICameraConfiguration {
|
|
export interface ICameraConfiguration {
|
|
position?: {
|
|
position?: {
|