|
@@ -5,8 +5,8 @@ declare module "babylonjs-loaders"{ export=BABYLON;}
|
|
|
|
|
|
// Generated by dts-bundle v0.7.3
|
|
|
// Dependencies for this module:
|
|
|
-// ../../../../../Tools/Gulp/babylonjs
|
|
|
-// ../../../../../Tools/Gulp/babylonjs-loaders
|
|
|
+// ../../../../../Tools/gulp/babylonjs
|
|
|
+// ../../../../../Tools/gulp/babylonjs-loaders
|
|
|
|
|
|
declare module 'babylonjs-viewer' {
|
|
|
import { mapperManager } from 'babylonjs-viewer/configuration/mappers';
|
|
@@ -200,11 +200,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
|
|
|
* Mainly used for help and errors
|
|
|
* @param subScreen the name of the subScreen. Those can be defined in the configuration object
|
|
|
*/
|
|
|
- showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
|
|
|
+ showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
|
|
|
/**
|
|
|
* Hide the overlay screen.
|
|
|
*/
|
|
|
- hideOverlayScreen(): Promise<Template> | Promise<string>;
|
|
|
+ hideOverlayScreen(): Promise<string> | Promise<Template>;
|
|
|
/**
|
|
|
* show the viewer (in case it was hidden)
|
|
|
*
|
|
@@ -221,11 +221,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
|
|
|
* Show the loading screen.
|
|
|
* The loading screen can be configured using the configuration object
|
|
|
*/
|
|
|
- showLoadingScreen(): Promise<Template> | Promise<string>;
|
|
|
+ showLoadingScreen(): Promise<string> | Promise<Template>;
|
|
|
/**
|
|
|
* Hide the loading screen
|
|
|
*/
|
|
|
- hideLoadingScreen(): Promise<Template> | Promise<string>;
|
|
|
+ hideLoadingScreen(): Promise<string> | Promise<Template>;
|
|
|
dispose(): void;
|
|
|
protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
|
|
|
}
|
|
@@ -566,169 +566,7 @@ declare module 'babylonjs-viewer/loader/modelLoader' {
|
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/model/viewerModel' {
|
|
|
- import { ISceneLoaderPlugin, ISceneLoaderPluginAsync, AnimationGroup, AbstractMesh, Observable, SceneLoaderProgressEvent, IParticleSystem, Skeleton, IDisposable, Nullable, Animation, Material } from "babylonjs";
|
|
|
- import { GLTF2 } from "babylonjs-loaders";
|
|
|
- import { IModelConfiguration } from "babylonjs-viewer/configuration/interfaces/modelConfiguration";
|
|
|
- import { IModelAnimation } from "babylonjs-viewer/model/modelAnimation";
|
|
|
- import { ObservablesManager } from "babylonjs-viewer/managers/observablesManager";
|
|
|
- import { ConfigurationContainer } from "babylonjs-viewer/configuration/configurationContainer";
|
|
|
- /**
|
|
|
- * The current state of the model
|
|
|
- */
|
|
|
- export enum ModelState {
|
|
|
- INIT = 0,
|
|
|
- LOADING = 1,
|
|
|
- LOADED = 2,
|
|
|
- ENTRY = 3,
|
|
|
- ENTRYDONE = 4,
|
|
|
- COMPLETE = 5,
|
|
|
- CANCELED = 6,
|
|
|
- ERROR = 7
|
|
|
- }
|
|
|
- /**
|
|
|
- * The viewer model is a container for all assets representing a sngle loaded model.
|
|
|
- */
|
|
|
- export class ViewerModel implements IDisposable {
|
|
|
- /**
|
|
|
- * The loader used to load this model.
|
|
|
- */
|
|
|
- loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
|
- /**
|
|
|
- * This model's root mesh (the parent of all other meshes).
|
|
|
- * This mesh does not(!) exist in the meshes array.
|
|
|
- */
|
|
|
- rootMesh: AbstractMesh;
|
|
|
- /**
|
|
|
- * ParticleSystems connected to this model
|
|
|
- */
|
|
|
- particleSystems: Array<IParticleSystem>;
|
|
|
- /**
|
|
|
- * Skeletons defined in this model
|
|
|
- */
|
|
|
- skeletons: Array<Skeleton>;
|
|
|
- /**
|
|
|
- * The current model animation.
|
|
|
- * On init, this will be undefined.
|
|
|
- */
|
|
|
- currentAnimation: IModelAnimation;
|
|
|
- /**
|
|
|
- * Observers registered here will be executed when the model is done loading
|
|
|
- */
|
|
|
- onLoadedObservable: Observable<ViewerModel>;
|
|
|
- /**
|
|
|
- * Observers registered here will be executed when the loader notified of a progress event
|
|
|
- */
|
|
|
- onLoadProgressObservable: Observable<SceneLoaderProgressEvent>;
|
|
|
- /**
|
|
|
- * Observers registered here will be executed when the loader notified of an error.
|
|
|
- */
|
|
|
- onLoadErrorObservable: Observable<{
|
|
|
- message: string;
|
|
|
- exception: any;
|
|
|
- }>;
|
|
|
- /**
|
|
|
- * Will be executed after the model finished loading and complete, including entry animation and lod
|
|
|
- */
|
|
|
- onCompleteObservable: Observable<ViewerModel>;
|
|
|
- /**
|
|
|
- * Observers registered here will be executed every time the model is being configured.
|
|
|
- * This can be used to extend the model's configuration without extending the class itself
|
|
|
- */
|
|
|
- onAfterConfigure: Observable<ViewerModel>;
|
|
|
- /**
|
|
|
- * The current model state (loaded, error, etc)
|
|
|
- */
|
|
|
- state: ModelState;
|
|
|
- /**
|
|
|
- * A loadID provided by the modelLoader, unique to ths (Abstract)Viewer instance.
|
|
|
- */
|
|
|
- loadId: number;
|
|
|
- loadInfo: GLTF2.IAsset;
|
|
|
- constructor(_observablesManager: ObservablesManager, modelConfiguration: IModelConfiguration, _configurationContainer?: ConfigurationContainer | undefined);
|
|
|
- shadowsRenderedAfterLoad: boolean;
|
|
|
- getViewerId(): string | undefined;
|
|
|
- /**
|
|
|
- * Set whether this model is enabled or not.
|
|
|
- */
|
|
|
- enabled: boolean;
|
|
|
- loaderDone: boolean;
|
|
|
- /**
|
|
|
- * Add a mesh to this model.
|
|
|
- * Any mesh that has no parent will be provided with the root mesh as its new parent.
|
|
|
- *
|
|
|
- * @param mesh the new mesh to add
|
|
|
- * @param triggerLoaded should this mesh trigger the onLoaded observable. Used when adding meshes manually.
|
|
|
- */
|
|
|
- addMesh(mesh: AbstractMesh, triggerLoaded?: boolean): Promise<ViewerModel> | undefined;
|
|
|
- /**
|
|
|
- * get the list of meshes (excluding the root mesh)
|
|
|
- */
|
|
|
- readonly meshes: AbstractMesh[];
|
|
|
- /**
|
|
|
- * (Re-)set the model's entire configuration
|
|
|
- * @param newConfiguration the new configuration to replace the new one
|
|
|
- */
|
|
|
- configuration: IModelConfiguration;
|
|
|
- /**
|
|
|
- * Update the current configuration with new values.
|
|
|
- * Configuration will not be overwritten, but merged with the new configuration.
|
|
|
- * Priority is to the new configuration
|
|
|
- * @param newConfiguration the configuration to be merged into the current configuration;
|
|
|
- */
|
|
|
- updateConfiguration(newConfiguration: Partial<IModelConfiguration>): void;
|
|
|
- /**
|
|
|
- * Add a new animation group to this model.
|
|
|
- * @param animationGroup the new animation group to be added
|
|
|
- */
|
|
|
- addAnimationGroup(animationGroup: AnimationGroup): void;
|
|
|
- /**
|
|
|
- * Get the ModelAnimation array
|
|
|
- */
|
|
|
- getAnimations(): Array<IModelAnimation>;
|
|
|
- /**
|
|
|
- * Get the animations' names. Using the names you can play a specific animation.
|
|
|
- */
|
|
|
- getAnimationNames(): Array<string>;
|
|
|
- /**
|
|
|
- * Get an animation by the provided name. Used mainly when playing n animation.
|
|
|
- * @param name the name of the animation to find
|
|
|
- */
|
|
|
- protected _getAnimationByName(name: string): Nullable<IModelAnimation>;
|
|
|
- /**
|
|
|
- * Choose an initialized animation using its name and start playing it
|
|
|
- * @param name the name of the animation to play
|
|
|
- * @returns The model aniamtion to be played.
|
|
|
- */
|
|
|
- playAnimation(name: string): IModelAnimation;
|
|
|
- setCurrentAnimationByName(name: string): IModelAnimation;
|
|
|
- /**
|
|
|
- * Apply a material configuration to a material
|
|
|
- * @param material Material to apply configuration to
|
|
|
- * @hidden
|
|
|
- */
|
|
|
- _applyModelMaterialConfiguration(material: Material): void;
|
|
|
- /**
|
|
|
- * Begin @animations with the specified @easingFunction
|
|
|
- * @param animations The BABYLON Animations to begin
|
|
|
- * @param duration of transition, in seconds
|
|
|
- * @param easingFunction An easing function to apply
|
|
|
- * @param easingMode A easing mode to apply to the easingFunction
|
|
|
- * @param onAnimationEnd Call back trigger at the end of the animation.
|
|
|
- */
|
|
|
- transitionTo(animations: Animation[], duration: number, easingFunction: any, easingMode: number | undefined, onAnimationEnd: () => void): void;
|
|
|
- /**
|
|
|
- * Stops and removes all animations that have been applied to the model
|
|
|
- */
|
|
|
- stopAllAnimations(): void;
|
|
|
- /**
|
|
|
- * Will remove this model from the viewer (but NOT dispose it).
|
|
|
- */
|
|
|
- remove(): void;
|
|
|
- /**
|
|
|
- * Dispose this model, including all of its associated assets.
|
|
|
- */
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/model/modelAnimation' {
|
|
@@ -985,14 +823,13 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
|
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/optimizer/custom' {
|
|
|
- import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
|
|
|
import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
|
|
|
/**
|
|
|
*
|
|
|
* @param name the name of the custom optimizer configuration
|
|
|
* @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
|
|
|
*/
|
|
|
- export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
|
|
|
+ export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
|
|
|
export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
|
|
|
}
|
|
|
|
|
@@ -1663,22 +1500,6 @@ declare module 'babylonjs-viewer/loader/plugins' {
|
|
|
export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
|
|
|
}
|
|
|
|
|
|
-declare module 'babylonjs-viewer/optimizer/custom/extended' {
|
|
|
- import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
|
|
|
- /**
|
|
|
- * A custom upgrade-oriented function configuration for the scene optimizer.
|
|
|
- *
|
|
|
- * @param viewer the viewer to optimize
|
|
|
- */
|
|
|
- export function extendedUpgrade(sceneManager: SceneManager): boolean;
|
|
|
- /**
|
|
|
- * A custom degrade-oriented function configuration for the scene optimizer.
|
|
|
- *
|
|
|
- * @param viewer the viewer to optimize
|
|
|
- */
|
|
|
- export function extendedDegrade(sceneManager: SceneManager): boolean;
|
|
|
-}
|
|
|
-
|
|
|
declare module 'babylonjs-viewer/configuration/interfaces' {
|
|
|
export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
|
|
|
export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';
|