David Catuhe преди 6 години
родител
ревизия
bbec21c129

+ 60 - 0
dist/preview release/babylon.d.ts

@@ -47281,6 +47281,66 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * This represents a texture coming from an equirectangular image supported by the web browser canvas.
+     */
+    export class EquiRectangularCubeTexture extends BaseTexture {
+        /** The six faces of the cube. */
+        private static _FacesMapping;
+        private _noMipmap;
+        private _onLoad;
+        private _onError;
+        /** The size of the cubemap. */
+        private _size;
+        /** The buffer of the image. */
+        private _buffer;
+        /** The width of the input image. */
+        private _width;
+        /** The height of the input image. */
+        private _height;
+        /** The URL to the image. */
+        url: string;
+        /** The texture coordinates mode. As this texture is stored in a cube format, please modify carefully. */
+        coordinatesMode: number;
+        /**
+         * Instantiates an EquiRectangularCubeTexture from the following parameters.
+         * @param url The location of the image
+         * @param scene The scene the texture will be used in
+         * @param size The cubemap desired size (the more it increases the longer the generation will be)
+         * @param noMipmap Forces to not generate the mipmap if true
+         * @param gammaSpace Specifies if the texture will be used in gamma or linear space
+         * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)
+         * @param onLoad — defines a callback called when texture is loaded
+         * @param onError — defines a callback called if there is an error
+         */
+        constructor(url: string, scene: Scene, size: number, noMipmap?: boolean, gammaSpace?: boolean, onLoad?: Nullable<() => void>, onError?: Nullable<(message?: string, exception?: any) => void>);
+        /**
+         * Load the image data, by putting the image on a canvas and extracting its buffer.
+         */
+        private loadImage;
+        /**
+         * Convert the image buffer into a cubemap and create a CubeTexture.
+         */
+        private loadTexture;
+        /**
+         * Convert the ArrayBuffer into a Float32Array and drop the transparency channel.
+         * @param buffer The ArrayBuffer that should be converted.
+         * @returns The buffer as Float32Array.
+         */
+        private getFloat32ArrayFromArrayBuffer;
+        /**
+         * Get the current class name of the texture useful for serialization or dynamic coding.
+         * @returns "EquiRectangularCubeTexture"
+         */
+        getClassName(): string;
+        /**
+         * Create a clone of the current EquiRectangularCubeTexture and return it.
+         * @returns A clone of the current EquiRectangularCubeTexture.
+         */
+        clone(): EquiRectangularCubeTexture;
+    }
+}
+declare module BABYLON {
+    /**
      * Based on jsTGALoader - Javascript loader for TGA file
      * By Vincent Thibault
      * @see http://blog.robrowser.com/javascript-tga-loader.html

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/babylon.js


Файловите разлики са ограничени, защото са твърде много
+ 223 - 45
dist/preview release/babylon.max.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 124 - 0
dist/preview release/babylon.module.d.ts

@@ -49276,6 +49276,69 @@ declare module "babylonjs/Materials/Textures/colorGradingTexture" {
         serialize(): any;
     }
 }
+declare module "babylonjs/Materials/Textures/equiRectangularCubeTexture" {
+    import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
+    import { Scene } from "babylonjs/scene";
+    import { Nullable } from "babylonjs/types";
+    /**
+     * This represents a texture coming from an equirectangular image supported by the web browser canvas.
+     */
+    export class EquiRectangularCubeTexture extends BaseTexture {
+        /** The six faces of the cube. */
+        private static _FacesMapping;
+        private _noMipmap;
+        private _onLoad;
+        private _onError;
+        /** The size of the cubemap. */
+        private _size;
+        /** The buffer of the image. */
+        private _buffer;
+        /** The width of the input image. */
+        private _width;
+        /** The height of the input image. */
+        private _height;
+        /** The URL to the image. */
+        url: string;
+        /** The texture coordinates mode. As this texture is stored in a cube format, please modify carefully. */
+        coordinatesMode: number;
+        /**
+         * Instantiates an EquiRectangularCubeTexture from the following parameters.
+         * @param url The location of the image
+         * @param scene The scene the texture will be used in
+         * @param size The cubemap desired size (the more it increases the longer the generation will be)
+         * @param noMipmap Forces to not generate the mipmap if true
+         * @param gammaSpace Specifies if the texture will be used in gamma or linear space
+         * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)
+         * @param onLoad — defines a callback called when texture is loaded
+         * @param onError — defines a callback called if there is an error
+         */
+        constructor(url: string, scene: Scene, size: number, noMipmap?: boolean, gammaSpace?: boolean, onLoad?: Nullable<() => void>, onError?: Nullable<(message?: string, exception?: any) => void>);
+        /**
+         * Load the image data, by putting the image on a canvas and extracting its buffer.
+         */
+        private loadImage;
+        /**
+         * Convert the image buffer into a cubemap and create a CubeTexture.
+         */
+        private loadTexture;
+        /**
+         * Convert the ArrayBuffer into a Float32Array and drop the transparency channel.
+         * @param buffer The ArrayBuffer that should be converted.
+         * @returns The buffer as Float32Array.
+         */
+        private getFloat32ArrayFromArrayBuffer;
+        /**
+         * Get the current class name of the texture useful for serialization or dynamic coding.
+         * @returns "EquiRectangularCubeTexture"
+         */
+        getClassName(): string;
+        /**
+         * Create a clone of the current EquiRectangularCubeTexture and return it.
+         * @returns A clone of the current EquiRectangularCubeTexture.
+         */
+        clone(): EquiRectangularCubeTexture;
+    }
+}
 declare module "babylonjs/Misc/tga" {
     import { InternalTexture } from "babylonjs/Materials/Textures/internalTexture";
     /**
@@ -49625,6 +49688,7 @@ declare module "babylonjs/Materials/Textures/index" {
     export * from "babylonjs/Materials/Textures/colorGradingTexture";
     export * from "babylonjs/Materials/Textures/cubeTexture";
     export * from "babylonjs/Materials/Textures/dynamicTexture";
+    export * from "babylonjs/Materials/Textures/equiRectangularCubeTexture";
     export * from "babylonjs/Materials/Textures/hdrCubeTexture";
     export * from "babylonjs/Materials/Textures/internalTexture";
     export * from "babylonjs/Materials/Textures/internalTextureLoader";
@@ -105132,6 +105196,66 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * This represents a texture coming from an equirectangular image supported by the web browser canvas.
+     */
+    export class EquiRectangularCubeTexture extends BaseTexture {
+        /** The six faces of the cube. */
+        private static _FacesMapping;
+        private _noMipmap;
+        private _onLoad;
+        private _onError;
+        /** The size of the cubemap. */
+        private _size;
+        /** The buffer of the image. */
+        private _buffer;
+        /** The width of the input image. */
+        private _width;
+        /** The height of the input image. */
+        private _height;
+        /** The URL to the image. */
+        url: string;
+        /** The texture coordinates mode. As this texture is stored in a cube format, please modify carefully. */
+        coordinatesMode: number;
+        /**
+         * Instantiates an EquiRectangularCubeTexture from the following parameters.
+         * @param url The location of the image
+         * @param scene The scene the texture will be used in
+         * @param size The cubemap desired size (the more it increases the longer the generation will be)
+         * @param noMipmap Forces to not generate the mipmap if true
+         * @param gammaSpace Specifies if the texture will be used in gamma or linear space
+         * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)
+         * @param onLoad — defines a callback called when texture is loaded
+         * @param onError — defines a callback called if there is an error
+         */
+        constructor(url: string, scene: Scene, size: number, noMipmap?: boolean, gammaSpace?: boolean, onLoad?: Nullable<() => void>, onError?: Nullable<(message?: string, exception?: any) => void>);
+        /**
+         * Load the image data, by putting the image on a canvas and extracting its buffer.
+         */
+        private loadImage;
+        /**
+         * Convert the image buffer into a cubemap and create a CubeTexture.
+         */
+        private loadTexture;
+        /**
+         * Convert the ArrayBuffer into a Float32Array and drop the transparency channel.
+         * @param buffer The ArrayBuffer that should be converted.
+         * @returns The buffer as Float32Array.
+         */
+        private getFloat32ArrayFromArrayBuffer;
+        /**
+         * Get the current class name of the texture useful for serialization or dynamic coding.
+         * @returns "EquiRectangularCubeTexture"
+         */
+        getClassName(): string;
+        /**
+         * Create a clone of the current EquiRectangularCubeTexture and return it.
+         * @returns A clone of the current EquiRectangularCubeTexture.
+         */
+        clone(): EquiRectangularCubeTexture;
+    }
+}
+declare module BABYLON {
+    /**
      * Based on jsTGALoader - Javascript loader for TGA file
      * By Vincent Thibault
      * @see http://blog.robrowser.com/javascript-tga-loader.html

+ 1 - 1
dist/preview release/glTF2Interface/package.json

@@ -1,7 +1,7 @@
 {
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.27"
+        "babylonjs": "4.0.0-alpha.28"
     },
     "engines": {
         "node": "*"

+ 6 - 6
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -31,11 +31,11 @@
     "dependencies": {
         "@types/react": "~16.7.3",
         "@types/react-dom": "~16.0.9",
-        "babylonjs": "4.0.0-alpha.27",
-        "babylonjs-gui": "4.0.0-alpha.27",
-        "babylonjs-loaders": "4.0.0-alpha.27",
-        "babylonjs-serializers": "4.0.0-alpha.27",
-        "babylonjs-gltf2interface": "4.0.0-alpha.27"
+        "babylonjs": "4.0.0-alpha.28",
+        "babylonjs-gui": "4.0.0-alpha.28",
+        "babylonjs-loaders": "4.0.0-alpha.28",
+        "babylonjs-serializers": "4.0.0-alpha.28",
+        "babylonjs-gltf2interface": "4.0.0-alpha.28"
     },
     "engines": {
         "node": "*"

+ 3 - 3
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.0.0-alpha.27",
-        "babylonjs": "4.0.0-alpha.27"
+        "babylonjs-gltf2interface": "4.0.0-alpha.28",
+        "babylonjs": "4.0.0-alpha.28"
     },
     "engines": {
         "node": "*"

+ 2 - 2
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.27"
+        "babylonjs": "4.0.0-alpha.28"
     },
     "engines": {
         "node": "*"

+ 1 - 1
dist/preview release/package.json

@@ -9,7 +9,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.27"
+        "babylonjs": "4.0.0-alpha.28"
     },
     "engines": {
         "node": "*"

+ 2 - 2
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.27"
+        "babylonjs": "4.0.0-alpha.28"
     },
     "engines": {
         "node": "*"

+ 3 - 3
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.27",
-        "babylonjs-gltf2interface": "4.0.0-alpha.27"
+        "babylonjs": "4.0.0-alpha.28",
+        "babylonjs-gltf2interface": "4.0.0-alpha.28"
     },
     "engines": {
         "node": "*"

+ 124 - 0
dist/preview release/viewer/babylon.module.d.ts

@@ -49276,6 +49276,69 @@ declare module "babylonjs/Materials/Textures/colorGradingTexture" {
         serialize(): any;
     }
 }
+declare module "babylonjs/Materials/Textures/equiRectangularCubeTexture" {
+    import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
+    import { Scene } from "babylonjs/scene";
+    import { Nullable } from "babylonjs/types";
+    /**
+     * This represents a texture coming from an equirectangular image supported by the web browser canvas.
+     */
+    export class EquiRectangularCubeTexture extends BaseTexture {
+        /** The six faces of the cube. */
+        private static _FacesMapping;
+        private _noMipmap;
+        private _onLoad;
+        private _onError;
+        /** The size of the cubemap. */
+        private _size;
+        /** The buffer of the image. */
+        private _buffer;
+        /** The width of the input image. */
+        private _width;
+        /** The height of the input image. */
+        private _height;
+        /** The URL to the image. */
+        url: string;
+        /** The texture coordinates mode. As this texture is stored in a cube format, please modify carefully. */
+        coordinatesMode: number;
+        /**
+         * Instantiates an EquiRectangularCubeTexture from the following parameters.
+         * @param url The location of the image
+         * @param scene The scene the texture will be used in
+         * @param size The cubemap desired size (the more it increases the longer the generation will be)
+         * @param noMipmap Forces to not generate the mipmap if true
+         * @param gammaSpace Specifies if the texture will be used in gamma or linear space
+         * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)
+         * @param onLoad — defines a callback called when texture is loaded
+         * @param onError — defines a callback called if there is an error
+         */
+        constructor(url: string, scene: Scene, size: number, noMipmap?: boolean, gammaSpace?: boolean, onLoad?: Nullable<() => void>, onError?: Nullable<(message?: string, exception?: any) => void>);
+        /**
+         * Load the image data, by putting the image on a canvas and extracting its buffer.
+         */
+        private loadImage;
+        /**
+         * Convert the image buffer into a cubemap and create a CubeTexture.
+         */
+        private loadTexture;
+        /**
+         * Convert the ArrayBuffer into a Float32Array and drop the transparency channel.
+         * @param buffer The ArrayBuffer that should be converted.
+         * @returns The buffer as Float32Array.
+         */
+        private getFloat32ArrayFromArrayBuffer;
+        /**
+         * Get the current class name of the texture useful for serialization or dynamic coding.
+         * @returns "EquiRectangularCubeTexture"
+         */
+        getClassName(): string;
+        /**
+         * Create a clone of the current EquiRectangularCubeTexture and return it.
+         * @returns A clone of the current EquiRectangularCubeTexture.
+         */
+        clone(): EquiRectangularCubeTexture;
+    }
+}
 declare module "babylonjs/Misc/tga" {
     import { InternalTexture } from "babylonjs/Materials/Textures/internalTexture";
     /**
@@ -49625,6 +49688,7 @@ declare module "babylonjs/Materials/Textures/index" {
     export * from "babylonjs/Materials/Textures/colorGradingTexture";
     export * from "babylonjs/Materials/Textures/cubeTexture";
     export * from "babylonjs/Materials/Textures/dynamicTexture";
+    export * from "babylonjs/Materials/Textures/equiRectangularCubeTexture";
     export * from "babylonjs/Materials/Textures/hdrCubeTexture";
     export * from "babylonjs/Materials/Textures/internalTexture";
     export * from "babylonjs/Materials/Textures/internalTextureLoader";
@@ -105132,6 +105196,66 @@ declare module BABYLON {
 }
 declare module BABYLON {
     /**
+     * This represents a texture coming from an equirectangular image supported by the web browser canvas.
+     */
+    export class EquiRectangularCubeTexture extends BaseTexture {
+        /** The six faces of the cube. */
+        private static _FacesMapping;
+        private _noMipmap;
+        private _onLoad;
+        private _onError;
+        /** The size of the cubemap. */
+        private _size;
+        /** The buffer of the image. */
+        private _buffer;
+        /** The width of the input image. */
+        private _width;
+        /** The height of the input image. */
+        private _height;
+        /** The URL to the image. */
+        url: string;
+        /** The texture coordinates mode. As this texture is stored in a cube format, please modify carefully. */
+        coordinatesMode: number;
+        /**
+         * Instantiates an EquiRectangularCubeTexture from the following parameters.
+         * @param url The location of the image
+         * @param scene The scene the texture will be used in
+         * @param size The cubemap desired size (the more it increases the longer the generation will be)
+         * @param noMipmap Forces to not generate the mipmap if true
+         * @param gammaSpace Specifies if the texture will be used in gamma or linear space
+         * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)
+         * @param onLoad — defines a callback called when texture is loaded
+         * @param onError — defines a callback called if there is an error
+         */
+        constructor(url: string, scene: Scene, size: number, noMipmap?: boolean, gammaSpace?: boolean, onLoad?: Nullable<() => void>, onError?: Nullable<(message?: string, exception?: any) => void>);
+        /**
+         * Load the image data, by putting the image on a canvas and extracting its buffer.
+         */
+        private loadImage;
+        /**
+         * Convert the image buffer into a cubemap and create a CubeTexture.
+         */
+        private loadTexture;
+        /**
+         * Convert the ArrayBuffer into a Float32Array and drop the transparency channel.
+         * @param buffer The ArrayBuffer that should be converted.
+         * @returns The buffer as Float32Array.
+         */
+        private getFloat32ArrayFromArrayBuffer;
+        /**
+         * Get the current class name of the texture useful for serialization or dynamic coding.
+         * @returns "EquiRectangularCubeTexture"
+         */
+        getClassName(): string;
+        /**
+         * Create a clone of the current EquiRectangularCubeTexture and return it.
+         * @returns A clone of the current EquiRectangularCubeTexture.
+         */
+        clone(): EquiRectangularCubeTexture;
+    }
+}
+declare module BABYLON {
+    /**
      * Based on jsTGALoader - Javascript loader for TGA file
      * By Vincent Thibault
      * @see http://blog.robrowser.com/javascript-tga-loader.html

+ 19 - 5
dist/preview release/viewer/babylon.viewer.d.ts

@@ -196,11 +196,11 @@ declare module BabylonViewer {
                 * 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<string> | Promise<Template>;
+            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<string> | Promise<Template>;
+            hideOverlayScreen(): Promise<Template> | Promise<string>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -217,11 +217,11 @@ declare module BabylonViewer {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<string> | Promise<Template>;
+            showLoadingScreen(): Promise<Template> | Promise<string>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<string> | Promise<Template>;
+            hideLoadingScreen(): Promise<Template> | Promise<string>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -950,7 +950,7 @@ declare module BabylonViewer {
       * @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): (sceneManager: SceneManager) => boolean;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1593,6 +1593,20 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
+    /**
+        * 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 BabylonViewer {
     export interface IEnvironmentMapConfiguration {
             /**
                 * Environment map texture path in relative to the asset folder.

Файловите разлики са ограничени, защото са твърде много
+ 10 - 6
dist/preview release/viewer/babylon.viewer.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 22 - 5
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -229,11 +229,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<string> | Promise<Template>;
+            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<string> | Promise<Template>;
+            hideOverlayScreen(): Promise<Template> | Promise<string>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -250,11 +250,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<string> | Promise<Template>;
+            showLoadingScreen(): Promise<Template> | Promise<string>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<string> | Promise<Template>;
+            hideLoadingScreen(): Promise<Template> | Promise<string>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -1030,13 +1030,14 @@ 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): (sceneManager: SceneManager) => boolean;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1736,6 +1737,22 @@ 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';

+ 2 - 2
package.json

@@ -9,7 +9,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.0.0-alpha.27",
+    "version": "4.0.0-alpha.28",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -104,4 +104,4 @@
         "react-contextmenu": "~2.10.0",
         "ajv": "^6.9.1"
     }
-}
+}

+ 1 - 1
src/Engines/engine.ts

@@ -496,7 +496,7 @@ export class Engine {
      * Returns the current version of the framework
      */
     public static get Version(): string {
-        return "4.0.0-alpha.27";
+        return "4.0.0-alpha.28";
     }
 
     /**