|
@@ -41,47 +41,7 @@ declare module 'babylonjs-viewer' {
|
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/configuration/mappers' {
|
|
|
- import { ViewerConfiguration } from 'babylonjs-viewer/configuration/configuration';
|
|
|
- /**
|
|
|
- * This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager
|
|
|
- */
|
|
|
- export interface IMapper {
|
|
|
- map(rawSource: any): ViewerConfiguration;
|
|
|
- }
|
|
|
- /**
|
|
|
- * The MapperManager manages the different implemented mappers.
|
|
|
- * It allows the user to register new mappers as well and use them to parse their own configuration data
|
|
|
- */
|
|
|
- export class MapperManager {
|
|
|
- /**
|
|
|
- * The default mapper is the JSON mapper.
|
|
|
- */
|
|
|
- static DefaultMapper: string;
|
|
|
- constructor();
|
|
|
- /**
|
|
|
- * Get a specific configuration mapper.
|
|
|
- *
|
|
|
- * @param type the name of the mapper to load
|
|
|
- */
|
|
|
- getMapper(type: string): IMapper;
|
|
|
- /**
|
|
|
- * Use this functio to register your own configuration mapper.
|
|
|
- * After a mapper is registered, it can be used to parse the specific type fo configuration to the standard ViewerConfiguration.
|
|
|
- * @param type the name of the mapper. This will be used to define the configuration type and/or to get the mapper
|
|
|
- * @param mapper The implemented mapper
|
|
|
- */
|
|
|
- registerMapper(type: string, mapper: IMapper): void;
|
|
|
- /**
|
|
|
- * Dispose the mapper manager and all of its mappers.
|
|
|
- */
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
- /**
|
|
|
- * mapperManager is a singleton of the type MapperManager.
|
|
|
- * The mapperManager can be disposed directly with calling mapperManager.dispose()
|
|
|
- * or indirectly with using BabylonViewer.disposeAll()
|
|
|
- */
|
|
|
- export let mapperManager: MapperManager;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/configuration/globals' {
|
|
@@ -1006,105 +966,6 @@ declare module 'babylonjs-viewer/configuration' {
|
|
|
export * from 'babylonjs-viewer/configuration/interfaces';
|
|
|
}
|
|
|
|
|
|
-declare module 'babylonjs-viewer/configuration/configuration' {
|
|
|
- import { EngineOptions } from 'babylonjs';
|
|
|
- import { ICameraConfiguration, IDefaultRenderingPipelineConfiguration, IGroundConfiguration, ILightConfiguration, IModelConfiguration, IObserversConfiguration, ISceneConfiguration, ISceneOptimizerConfiguration, ISkyboxConfiguration, ITemplateConfiguration, IVRConfiguration } from 'babylonjs-viewer/configuration/interfaces';
|
|
|
- import { IEnvironmentMapConfiguration } from 'babylonjs-viewer/configuration/interfaces/environmentMapConfiguration';
|
|
|
- export function getConfigurationKey(key: string, configObject: any): any;
|
|
|
- export interface ViewerConfiguration {
|
|
|
- version?: string;
|
|
|
- extends?: string;
|
|
|
- pageUrl?: string;
|
|
|
- configuration?: string | {
|
|
|
- url?: string;
|
|
|
- payload?: any;
|
|
|
- mapper?: string;
|
|
|
- };
|
|
|
- observers?: IObserversConfiguration;
|
|
|
- canvasElement?: string;
|
|
|
- model?: IModelConfiguration | string;
|
|
|
- scene?: ISceneConfiguration;
|
|
|
- optimizer?: ISceneOptimizerConfiguration | boolean;
|
|
|
- camera?: ICameraConfiguration;
|
|
|
- skybox?: boolean | ISkyboxConfiguration;
|
|
|
- ground?: boolean | IGroundConfiguration;
|
|
|
- lights?: {
|
|
|
- [name: string]: number | boolean | ILightConfiguration;
|
|
|
- };
|
|
|
- engine?: {
|
|
|
- renderInBackground?: boolean;
|
|
|
- antialiasing?: boolean;
|
|
|
- disableResize?: boolean;
|
|
|
- engineOptions?: EngineOptions;
|
|
|
- adaptiveQuality?: boolean;
|
|
|
- hdEnabled?: boolean;
|
|
|
- };
|
|
|
- templates?: {
|
|
|
- main: ITemplateConfiguration;
|
|
|
- [key: string]: ITemplateConfiguration;
|
|
|
- };
|
|
|
- customShaders?: {
|
|
|
- shaders?: {
|
|
|
- [key: string]: string;
|
|
|
- };
|
|
|
- includes?: {
|
|
|
- [key: string]: string;
|
|
|
- };
|
|
|
- };
|
|
|
- loaderPlugins?: {
|
|
|
- extendedMaterial?: boolean;
|
|
|
- msftLod?: boolean;
|
|
|
- telemetry?: boolean;
|
|
|
- minecraft?: boolean;
|
|
|
- [propName: string]: boolean | undefined;
|
|
|
- };
|
|
|
- environmentMap?: IEnvironmentMapConfiguration;
|
|
|
- vr?: IVRConfiguration;
|
|
|
- lab?: {
|
|
|
- flashlight?: boolean | {
|
|
|
- exponent?: number;
|
|
|
- angle?: number;
|
|
|
- intensity?: number;
|
|
|
- diffuse?: {
|
|
|
- r: number;
|
|
|
- g: number;
|
|
|
- b: number;
|
|
|
- };
|
|
|
- specular?: {
|
|
|
- r: number;
|
|
|
- g: number;
|
|
|
- b: number;
|
|
|
- };
|
|
|
- };
|
|
|
- hideLoadingDelay?: number;
|
|
|
- /** Deprecated */
|
|
|
- assetsRootURL?: string;
|
|
|
- environmentMainColor?: {
|
|
|
- r: number;
|
|
|
- g: number;
|
|
|
- b: number;
|
|
|
- };
|
|
|
- /** Deprecated */
|
|
|
- environmentMap?: {
|
|
|
- /**
|
|
|
- * Environment map texture path in relative to the asset folder.
|
|
|
- */
|
|
|
- texture: string;
|
|
|
- /**
|
|
|
- * Default rotation to apply to the environment map.
|
|
|
- */
|
|
|
- rotationY: number;
|
|
|
- /**
|
|
|
- * Tint level of the main color on the environment map.
|
|
|
- */
|
|
|
- tintLevel: number;
|
|
|
- };
|
|
|
- defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;
|
|
|
- globalLightRotation?: number;
|
|
|
- };
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
declare module 'babylonjs-viewer/templating/templateManager' {
|
|
|
import { Observable } from 'babylonjs';
|
|
|
import { EventManager } from 'babylonjs-viewer/templating/eventManager';
|
|
@@ -1646,6 +1507,105 @@ declare module 'babylonjs-viewer/loader/plugins' {
|
|
|
export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
|
|
|
}
|
|
|
|
|
|
+declare module 'babylonjs-viewer/configuration/configuration' {
|
|
|
+ import { EngineOptions } from 'babylonjs';
|
|
|
+ import { ICameraConfiguration, IDefaultRenderingPipelineConfiguration, IGroundConfiguration, ILightConfiguration, IModelConfiguration, IObserversConfiguration, ISceneConfiguration, ISceneOptimizerConfiguration, ISkyboxConfiguration, ITemplateConfiguration, IVRConfiguration } from 'babylonjs-viewer/configuration/interfaces';
|
|
|
+ import { IEnvironmentMapConfiguration } from 'babylonjs-viewer/configuration/interfaces/environmentMapConfiguration';
|
|
|
+ export function getConfigurationKey(key: string, configObject: any): any;
|
|
|
+ export interface ViewerConfiguration {
|
|
|
+ version?: string;
|
|
|
+ extends?: string;
|
|
|
+ pageUrl?: string;
|
|
|
+ configuration?: string | {
|
|
|
+ url?: string;
|
|
|
+ payload?: any;
|
|
|
+ mapper?: string;
|
|
|
+ };
|
|
|
+ observers?: IObserversConfiguration;
|
|
|
+ canvasElement?: string;
|
|
|
+ model?: IModelConfiguration | string;
|
|
|
+ scene?: ISceneConfiguration;
|
|
|
+ optimizer?: ISceneOptimizerConfiguration | boolean;
|
|
|
+ camera?: ICameraConfiguration;
|
|
|
+ skybox?: boolean | ISkyboxConfiguration;
|
|
|
+ ground?: boolean | IGroundConfiguration;
|
|
|
+ lights?: {
|
|
|
+ [name: string]: number | boolean | ILightConfiguration;
|
|
|
+ };
|
|
|
+ engine?: {
|
|
|
+ renderInBackground?: boolean;
|
|
|
+ antialiasing?: boolean;
|
|
|
+ disableResize?: boolean;
|
|
|
+ engineOptions?: EngineOptions;
|
|
|
+ adaptiveQuality?: boolean;
|
|
|
+ hdEnabled?: boolean;
|
|
|
+ };
|
|
|
+ templates?: {
|
|
|
+ main: ITemplateConfiguration;
|
|
|
+ [key: string]: ITemplateConfiguration;
|
|
|
+ };
|
|
|
+ customShaders?: {
|
|
|
+ shaders?: {
|
|
|
+ [key: string]: string;
|
|
|
+ };
|
|
|
+ includes?: {
|
|
|
+ [key: string]: string;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ loaderPlugins?: {
|
|
|
+ extendedMaterial?: boolean;
|
|
|
+ msftLod?: boolean;
|
|
|
+ telemetry?: boolean;
|
|
|
+ minecraft?: boolean;
|
|
|
+ [propName: string]: boolean | undefined;
|
|
|
+ };
|
|
|
+ environmentMap?: IEnvironmentMapConfiguration;
|
|
|
+ vr?: IVRConfiguration;
|
|
|
+ lab?: {
|
|
|
+ flashlight?: boolean | {
|
|
|
+ exponent?: number;
|
|
|
+ angle?: number;
|
|
|
+ intensity?: number;
|
|
|
+ diffuse?: {
|
|
|
+ r: number;
|
|
|
+ g: number;
|
|
|
+ b: number;
|
|
|
+ };
|
|
|
+ specular?: {
|
|
|
+ r: number;
|
|
|
+ g: number;
|
|
|
+ b: number;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ hideLoadingDelay?: number;
|
|
|
+ /** Deprecated */
|
|
|
+ assetsRootURL?: string;
|
|
|
+ environmentMainColor?: {
|
|
|
+ r: number;
|
|
|
+ g: number;
|
|
|
+ b: number;
|
|
|
+ };
|
|
|
+ /** Deprecated */
|
|
|
+ environmentMap?: {
|
|
|
+ /**
|
|
|
+ * Environment map texture path in relative to the asset folder.
|
|
|
+ */
|
|
|
+ texture: string;
|
|
|
+ /**
|
|
|
+ * Default rotation to apply to the environment map.
|
|
|
+ */
|
|
|
+ rotationY: number;
|
|
|
+ /**
|
|
|
+ * Tint level of the main color on the environment map.
|
|
|
+ */
|
|
|
+ tintLevel: number;
|
|
|
+ };
|
|
|
+ defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;
|
|
|
+ globalLightRotation?: number;
|
|
|
+ };
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
declare module 'babylonjs-viewer/configuration/interfaces' {
|
|
|
export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
|
|
|
export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';
|
|
@@ -1664,31 +1624,6 @@ declare module 'babylonjs-viewer/configuration/interfaces' {
|
|
|
export * from 'babylonjs-viewer/configuration/interfaces/environmentMapConfiguration';
|
|
|
}
|
|
|
|
|
|
-declare module 'babylonjs-viewer/configuration/interfaces/environmentMapConfiguration' {
|
|
|
- export interface IEnvironmentMapConfiguration {
|
|
|
- /**
|
|
|
- * Environment map texture path in relative to the asset folder.
|
|
|
- */
|
|
|
- texture: string;
|
|
|
- /**
|
|
|
- * Default rotation to apply to the environment map.
|
|
|
- */
|
|
|
- rotationY: number;
|
|
|
- /**
|
|
|
- * Tint level of the main color on the environment map.
|
|
|
- */
|
|
|
- tintLevel: number;
|
|
|
- /**
|
|
|
- * The environment's main color.
|
|
|
- */
|
|
|
- mainColor?: {
|
|
|
- r?: number;
|
|
|
- g?: number;
|
|
|
- b?: number;
|
|
|
- };
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
declare module 'babylonjs-viewer/templating/eventManager' {
|
|
|
import { EventCallback, TemplateManager } from "babylonjs-viewer/templating/templateManager";
|
|
|
/**
|
|
@@ -1775,6 +1710,31 @@ declare module 'babylonjs-viewer/labs/viewerLabs' {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module 'babylonjs-viewer/configuration/interfaces/environmentMapConfiguration' {
|
|
|
+ export interface IEnvironmentMapConfiguration {
|
|
|
+ /**
|
|
|
+ * Environment map texture path in relative to the asset folder.
|
|
|
+ */
|
|
|
+ texture: string;
|
|
|
+ /**
|
|
|
+ * Default rotation to apply to the environment map.
|
|
|
+ */
|
|
|
+ rotationY: number;
|
|
|
+ /**
|
|
|
+ * Tint level of the main color on the environment map.
|
|
|
+ */
|
|
|
+ tintLevel: number;
|
|
|
+ /**
|
|
|
+ * The environment's main color.
|
|
|
+ */
|
|
|
+ mainColor?: {
|
|
|
+ r?: number;
|
|
|
+ g?: number;
|
|
|
+ b?: number;
|
|
|
+ };
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration' {
|
|
|
/**
|
|
|
* Defines an animation to be applied to a model (translation, scale or rotation).
|
|
@@ -1974,7 +1934,26 @@ declare module 'babylonjs-viewer/configuration/interfaces/colorGradingConfigurat
|
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/configuration/interfaces/defaultRenderingPipelineConfiguration' {
|
|
|
-
|
|
|
+ import { DepthOfFieldEffectBlurLevel } from 'babylonjs';
|
|
|
+ export interface IDefaultRenderingPipelineConfiguration {
|
|
|
+ sharpenEnabled?: boolean;
|
|
|
+ bloomEnabled?: boolean;
|
|
|
+ bloomThreshold?: number;
|
|
|
+ depthOfFieldEnabled?: boolean;
|
|
|
+ depthOfFieldBlurLevel?: DepthOfFieldEffectBlurLevel;
|
|
|
+ fxaaEnabled?: boolean;
|
|
|
+ imageProcessingEnabled?: boolean;
|
|
|
+ defaultPipelineTextureType?: number;
|
|
|
+ bloomScale?: number;
|
|
|
+ chromaticAberrationEnabled?: boolean;
|
|
|
+ grainEnabled?: boolean;
|
|
|
+ bloomKernel?: number;
|
|
|
+ hardwareScaleLevel?: number;
|
|
|
+ bloomWeight?: number;
|
|
|
+ hdr?: boolean;
|
|
|
+ samples?: number;
|
|
|
+ glowLayerEnabled?: boolean;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
declare module 'babylonjs-viewer/configuration/interfaces/groundConfiguration' {
|