David Catuhe 6 年之前
父节点
当前提交
9deb1df98e
共有 77 个文件被更改,包括 5181 次插入5115 次删除
  1. 9 54
      Playground/babylon.d.txt
  2. 2 0
      dist/babylon.d.ts
  3. 1 1
      dist/babylon.js
  4. 61 52
      dist/babylon.max.js
  5. 1 1
      dist/babylon.max.js.map
  6. 4 0
      dist/babylon.module.d.ts
  7. 5 52
      dist/gltf2Interface/babylon.glTF2Interface.d.ts
  8. 1 1
      dist/gltf2Interface/package.json
  9. 4458 4573
      dist/gltf_validator.js
  10. 2 2
      dist/gui/package.json
  11. 6 6
      dist/inspector/package.json
  12. 7 4
      dist/loaders/babylon.glTF1FileLoader.js
  13. 1 1
      dist/loaders/babylon.glTF1FileLoader.js.map
  14. 2 2
      dist/loaders/babylon.glTF1FileLoader.min.js
  15. 7 4
      dist/loaders/babylon.glTF2FileLoader.js
  16. 1 1
      dist/loaders/babylon.glTF2FileLoader.js.map
  17. 1 1
      dist/loaders/babylon.glTF2FileLoader.min.js
  18. 7 4
      dist/loaders/babylon.glTFFileLoader.js
  19. 1 1
      dist/loaders/babylon.glTFFileLoader.js.map
  20. 2 2
      dist/loaders/babylon.glTFFileLoader.min.js
  21. 2 2
      dist/loaders/babylonjs.loaders.d.ts
  22. 7 4
      dist/loaders/babylonjs.loaders.js
  23. 1 1
      dist/loaders/babylonjs.loaders.js.map
  24. 1 1
      dist/loaders/babylonjs.loaders.min.js
  25. 28 28
      dist/loaders/babylonjs.loaders.module.d.ts
  26. 3 3
      dist/loaders/package.json
  27. 2 2
      dist/materialsLibrary/package.json
  28. 2 2
      dist/postProcessesLibrary/package.json
  29. 2 0
      dist/preview release/babylon.d.ts
  30. 1 1
      dist/preview release/babylon.js
  31. 61 52
      dist/preview release/babylon.max.js
  32. 1 1
      dist/preview release/babylon.max.js.map
  33. 4 0
      dist/preview release/babylon.module.d.ts
  34. 1 1
      dist/preview release/glTF2Interface/package.json
  35. 2 2
      dist/preview release/gui/package.json
  36. 6 6
      dist/preview release/inspector/package.json
  37. 7 4
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  38. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.js.map
  39. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  40. 7 4
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  41. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.js.map
  42. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  43. 7 4
      dist/preview release/loaders/babylon.glTFFileLoader.js
  44. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.js.map
  45. 2 2
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  46. 2 2
      dist/preview release/loaders/babylonjs.loaders.d.ts
  47. 7 4
      dist/preview release/loaders/babylonjs.loaders.js
  48. 1 1
      dist/preview release/loaders/babylonjs.loaders.js.map
  49. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  50. 28 28
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  51. 3 3
      dist/preview release/loaders/package.json
  52. 2 2
      dist/preview release/materialsLibrary/package.json
  53. 1 1
      dist/preview release/package.json
  54. 1 1
      dist/preview release/packagesSizeBaseLine.json
  55. 2 2
      dist/preview release/postProcessesLibrary/package.json
  56. 2 2
      dist/preview release/proceduralTexturesLibrary/package.json
  57. 1 1
      dist/preview release/readme.md
  58. 3 3
      dist/preview release/serializers/package.json
  59. 4 0
      dist/preview release/viewer/babylon.module.d.ts
  60. 68 5
      dist/preview release/viewer/babylon.viewer.d.ts
  61. 15 15
      dist/preview release/viewer/babylon.viewer.js
  62. 2 2
      dist/preview release/viewer/babylon.viewer.max.js
  63. 72 6
      dist/preview release/viewer/babylon.viewer.module.d.ts
  64. 28 28
      dist/preview release/viewer/babylonjs.loaders.module.d.ts
  65. 2 2
      dist/proceduralTexturesLibrary/package.json
  66. 1 1
      dist/readme.md
  67. 3 3
      dist/serializers/package.json
  68. 5 52
      dist/viewer/babylon.glTF2Interface.d.ts
  69. 4 0
      dist/viewer/babylon.module.d.ts
  70. 68 5
      dist/viewer/babylon.viewer.d.ts
  71. 15 15
      dist/viewer/babylon.viewer.js
  72. 2 2
      dist/viewer/babylon.viewer.max.js
  73. 72 6
      dist/viewer/babylon.viewer.module.d.ts
  74. 28 28
      dist/viewer/babylonjs.loaders.module.d.ts
  75. 1 1
      package.json
  76. 2 2
      src/Engines/engine.ts
  77. 3 3
      src/Physics/Plugins/ammoJSPlugin.ts

+ 9 - 54
Playground/babylon.d.txt

@@ -31343,6 +31343,8 @@ declare module BABYLON {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.
@@ -60039,12 +60041,12 @@ declare module BABYLON {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<BABYLON.GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: BABYLON.GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")
@@ -63721,7 +63723,7 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * Interface for glTF validation results
+     * The glTF validation results
      */
     interface IGLTFValidationResults {
         info: {
@@ -63750,7 +63752,7 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * Interface for glTF validation options
+     * The glTF validation options
      */
     interface IGLTFValidationOptions {
         uri?: string;
@@ -63762,60 +63764,13 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * glTF validator object Tyyings
+     * The glTF validator object
      */
-    interface IGLTFValidatorTypings {
+    interface IGLTFValidator {
+        validateBytes: (data: Uint8Array, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
         validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
     }
 }
-
-/**
- * Interface for glTF validation results
- */
-interface IGLTFValidationResults {
-    info: {
-        generator: string;
-        hasAnimations: boolean;
-        hasDefaultScene: boolean;
-        hasMaterials: boolean;
-        hasMorphTargets: boolean;
-        hasSkins: boolean;
-        hasTextures: boolean;
-        maxAttributesUsed: number;
-        primitivesCount: number
-    };
-    issues: {
-        messages: Array<string>;
-        numErrors: number;
-        numHints: number;
-        numInfos: number;
-        numWarnings: number;
-        truncated: boolean
-    };
-    mimeType: string;
-    uri: string;
-    validatedAt: string;
-    validatorVersion: string;
-}
-
-/**
- * Interface for glTF validation options
- */
-interface IGLTFValidationOptions {
-    uri?: string;
-    externalResourceFunction?: (uri: string) => Promise<Uint8Array>;
-    validateAccessorData?: boolean;
-    maxIssues?: number;
-    ignoredIssues?: Array<string>;
-    severityOverrides?: Object;
-}
-
-/**
- * glTF validator object Tyyings
- */
-interface IGLTFValidatorTypings {
-    validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
-}
 
 declare module BABYLON {
     /** @hidden */

+ 2 - 0
dist/babylon.d.ts

@@ -31951,6 +31951,8 @@ declare module BABYLON {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.

文件差异内容过多而无法显示
+ 1 - 1
dist/babylon.js


文件差异内容过多而无法显示
+ 61 - 52
dist/babylon.max.js


文件差异内容过多而无法显示
+ 1 - 1
dist/babylon.max.js.map


+ 4 - 0
dist/babylon.module.d.ts

@@ -32822,6 +32822,8 @@ declare module "babylonjs/scene" {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.
@@ -92052,6 +92054,8 @@ declare module BABYLON {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.

+ 5 - 52
dist/gltf2Interface/babylon.glTF2Interface.d.ts

@@ -856,7 +856,7 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * Interface for glTF validation results
+     * The glTF validation results
      */
     interface IGLTFValidationResults {
         info: {
@@ -885,7 +885,7 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * Interface for glTF validation options
+     * The glTF validation options
      */
     interface IGLTFValidationOptions {
         uri?: string;
@@ -897,57 +897,10 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * glTF validator object Tyyings
+     * The glTF validator object
      */
-    interface IGLTFValidatorTypings {
+    interface IGLTFValidator {
+        validateBytes: (data: Uint8Array, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
         validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
     }
 }
-
-/**
- * Interface for glTF validation results
- */
-interface IGLTFValidationResults {
-    info: {
-        generator: string;
-        hasAnimations: boolean;
-        hasDefaultScene: boolean;
-        hasMaterials: boolean;
-        hasMorphTargets: boolean;
-        hasSkins: boolean;
-        hasTextures: boolean;
-        maxAttributesUsed: number;
-        primitivesCount: number
-    };
-    issues: {
-        messages: Array<string>;
-        numErrors: number;
-        numHints: number;
-        numInfos: number;
-        numWarnings: number;
-        truncated: boolean
-    };
-    mimeType: string;
-    uri: string;
-    validatedAt: string;
-    validatorVersion: string;
-}
-
-/**
- * Interface for glTF validation options
- */
-interface IGLTFValidationOptions {
-    uri?: string;
-    externalResourceFunction?: (uri: string) => Promise<Uint8Array>;
-    validateAccessorData?: boolean;
-    maxIssues?: number;
-    ignoredIssues?: Array<string>;
-    severityOverrides?: Object;
-}
-
-/**
- * glTF validator object Tyyings
- */
-interface IGLTFValidatorTypings {
-    validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
-}

+ 1 - 1
dist/gltf2Interface/package.json

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

文件差异内容过多而无法显示
+ 4458 - 4573
dist/gltf_validator.js


+ 2 - 2
dist/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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2"
+        "babylonjs": "4.0.3"
     },
     "engines": {
         "node": "*"

+ 6 - 6
dist/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "4.0.2",
+    "version": "4.0.3",
     "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.2",
-        "babylonjs-gui": "4.0.2",
-        "babylonjs-loaders": "4.0.2",
-        "babylonjs-serializers": "4.0.2",
-        "babylonjs-gltf2interface": "4.0.2"
+        "babylonjs": "4.0.3",
+        "babylonjs-gui": "4.0.3",
+        "babylonjs-loaders": "4.0.3",
+        "babylonjs-serializers": "4.0.3",
+        "babylonjs-gltf2interface": "4.0.3"
     },
     "engines": {
         "node": "*"

+ 7 - 4
dist/loaders/babylon.glTF1FileLoader.js

@@ -3169,8 +3169,8 @@ var GLTFFileLoader = /** @class */ (function () {
     GLTFFileLoader.prototype._parseAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         return Promise.resolve().then(function () {
-            var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
-            return _this._validateAsync(scene, unpacked.json, rootUrl, fileName).then(function () {
+            return _this._validateAsync(scene, data, rootUrl, fileName).then(function () {
+                var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
                 _this._startPerformanceCounter("Parse JSON");
                 _this._log("JSON length: " + unpacked.json.length);
                 var loaderData = {
@@ -3184,7 +3184,7 @@ var GLTFFileLoader = /** @class */ (function () {
             });
         });
     };
-    GLTFFileLoader.prototype._validateAsync = function (scene, json, rootUrl, fileName) {
+    GLTFFileLoader.prototype._validateAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         if (!this.validate || typeof GLTFValidator === "undefined") {
             return Promise.resolve();
@@ -3200,7 +3200,10 @@ var GLTFFileLoader = /** @class */ (function () {
         if (fileName && fileName.substr(0, 5) !== "data:") {
             options.uri = (rootUrl === "file:" ? fileName : "" + rootUrl + fileName);
         }
-        return GLTFValidator.validateString(json, options).then(function (result) {
+        var promise = (data instanceof ArrayBuffer)
+            ? GLTFValidator.validateBytes(new Uint8Array(data), options)
+            : GLTFValidator.validateString(data, options);
+        return promise.then(function (result) {
             _this._endPerformanceCounter("Validate JSON");
             _this.onValidatedObservable.notifyObservers(result);
             _this.onValidatedObservable.clear();

文件差异内容过多而无法显示
+ 1 - 1
dist/loaders/babylon.glTF1FileLoader.js.map


文件差异内容过多而无法显示
+ 2 - 2
dist/loaders/babylon.glTF1FileLoader.min.js


+ 7 - 4
dist/loaders/babylon.glTF2FileLoader.js

@@ -3869,8 +3869,8 @@ var GLTFFileLoader = /** @class */ (function () {
     GLTFFileLoader.prototype._parseAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         return Promise.resolve().then(function () {
-            var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
-            return _this._validateAsync(scene, unpacked.json, rootUrl, fileName).then(function () {
+            return _this._validateAsync(scene, data, rootUrl, fileName).then(function () {
+                var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
                 _this._startPerformanceCounter("Parse JSON");
                 _this._log("JSON length: " + unpacked.json.length);
                 var loaderData = {
@@ -3884,7 +3884,7 @@ var GLTFFileLoader = /** @class */ (function () {
             });
         });
     };
-    GLTFFileLoader.prototype._validateAsync = function (scene, json, rootUrl, fileName) {
+    GLTFFileLoader.prototype._validateAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         if (!this.validate || typeof GLTFValidator === "undefined") {
             return Promise.resolve();
@@ -3900,7 +3900,10 @@ var GLTFFileLoader = /** @class */ (function () {
         if (fileName && fileName.substr(0, 5) !== "data:") {
             options.uri = (rootUrl === "file:" ? fileName : "" + rootUrl + fileName);
         }
-        return GLTFValidator.validateString(json, options).then(function (result) {
+        var promise = (data instanceof ArrayBuffer)
+            ? GLTFValidator.validateBytes(new Uint8Array(data), options)
+            : GLTFValidator.validateString(data, options);
+        return promise.then(function (result) {
             _this._endPerformanceCounter("Validate JSON");
             _this.onValidatedObservable.notifyObservers(result);
             _this.onValidatedObservable.clear();

文件差异内容过多而无法显示
+ 1 - 1
dist/loaders/babylon.glTF2FileLoader.js.map


文件差异内容过多而无法显示
+ 1 - 1
dist/loaders/babylon.glTF2FileLoader.min.js


+ 7 - 4
dist/loaders/babylon.glTFFileLoader.js

@@ -6418,8 +6418,8 @@ var GLTFFileLoader = /** @class */ (function () {
     GLTFFileLoader.prototype._parseAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         return Promise.resolve().then(function () {
-            var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
-            return _this._validateAsync(scene, unpacked.json, rootUrl, fileName).then(function () {
+            return _this._validateAsync(scene, data, rootUrl, fileName).then(function () {
+                var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
                 _this._startPerformanceCounter("Parse JSON");
                 _this._log("JSON length: " + unpacked.json.length);
                 var loaderData = {
@@ -6433,7 +6433,7 @@ var GLTFFileLoader = /** @class */ (function () {
             });
         });
     };
-    GLTFFileLoader.prototype._validateAsync = function (scene, json, rootUrl, fileName) {
+    GLTFFileLoader.prototype._validateAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         if (!this.validate || typeof GLTFValidator === "undefined") {
             return Promise.resolve();
@@ -6449,7 +6449,10 @@ var GLTFFileLoader = /** @class */ (function () {
         if (fileName && fileName.substr(0, 5) !== "data:") {
             options.uri = (rootUrl === "file:" ? fileName : "" + rootUrl + fileName);
         }
-        return GLTFValidator.validateString(json, options).then(function (result) {
+        var promise = (data instanceof ArrayBuffer)
+            ? GLTFValidator.validateBytes(new Uint8Array(data), options)
+            : GLTFValidator.validateString(data, options);
+        return promise.then(function (result) {
             _this._endPerformanceCounter("Validate JSON");
             _this.onValidatedObservable.notifyObservers(result);
             _this.onValidatedObservable.clear();

文件差异内容过多而无法显示
+ 1 - 1
dist/loaders/babylon.glTFFileLoader.js.map


文件差异内容过多而无法显示
+ 2 - 2
dist/loaders/babylon.glTFFileLoader.min.js


+ 2 - 2
dist/loaders/babylonjs.loaders.d.ts

@@ -235,12 +235,12 @@ declare module BABYLON {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<BABYLON.GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: BABYLON.GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")

+ 7 - 4
dist/loaders/babylonjs.loaders.js

@@ -7760,8 +7760,8 @@ var GLTFFileLoader = /** @class */ (function () {
     GLTFFileLoader.prototype._parseAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         return Promise.resolve().then(function () {
-            var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
-            return _this._validateAsync(scene, unpacked.json, rootUrl, fileName).then(function () {
+            return _this._validateAsync(scene, data, rootUrl, fileName).then(function () {
+                var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
                 _this._startPerformanceCounter("Parse JSON");
                 _this._log("JSON length: " + unpacked.json.length);
                 var loaderData = {
@@ -7775,7 +7775,7 @@ var GLTFFileLoader = /** @class */ (function () {
             });
         });
     };
-    GLTFFileLoader.prototype._validateAsync = function (scene, json, rootUrl, fileName) {
+    GLTFFileLoader.prototype._validateAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         if (!this.validate || typeof GLTFValidator === "undefined") {
             return Promise.resolve();
@@ -7791,7 +7791,10 @@ var GLTFFileLoader = /** @class */ (function () {
         if (fileName && fileName.substr(0, 5) !== "data:") {
             options.uri = (rootUrl === "file:" ? fileName : "" + rootUrl + fileName);
         }
-        return GLTFValidator.validateString(json, options).then(function (result) {
+        var promise = (data instanceof ArrayBuffer)
+            ? GLTFValidator.validateBytes(new Uint8Array(data), options)
+            : GLTFValidator.validateString(data, options);
+        return promise.then(function (result) {
             _this._endPerformanceCounter("Validate JSON");
             _this.onValidatedObservable.notifyObservers(result);
             _this.onValidatedObservable.clear();

文件差异内容过多而无法显示
+ 1 - 1
dist/loaders/babylonjs.loaders.js.map


文件差异内容过多而无法显示
+ 1 - 1
dist/loaders/babylonjs.loaders.min.js


+ 28 - 28
dist/loaders/babylonjs.loaders.module.d.ts

@@ -1,5 +1,4 @@
 declare module "babylonjs-loaders/glTF/glTFFileLoader" {
-    import { IGLTFValidationResults } from "babylonjs-gltf2interface";
     import { Nullable } from "babylonjs/types";
     import { Observable } from "babylonjs/Misc/observable";
     import { Camera } from "babylonjs/Cameras/camera";
@@ -12,6 +11,7 @@ declare module "babylonjs-loaders/glTF/glTFFileLoader" {
     import { ISceneLoaderPluginFactory, ISceneLoaderPlugin, ISceneLoaderPluginAsync, SceneLoaderProgressEvent, ISceneLoaderPluginExtensions } from "babylonjs/Loading/sceneLoader";
     import { AssetContainer } from "babylonjs/assetContainer";
     import { Scene, IDisposable } from "babylonjs/scene";
+    import * as GLTF2 from "babylonjs-gltf2interface";
     /**
      * Mode that determines the coordinate system to use.
      */
@@ -248,12 +248,12 @@ declare module "babylonjs-loaders/glTF/glTFFileLoader" {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")
@@ -994,7 +994,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     import { Buffer, VertexBuffer } from "babylonjs/Meshes/buffer";
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { Mesh } from "babylonjs/Meshes/mesh";
-    import * as IGLTF2 from "babylonjs-gltf2interface";
+    import * as GLTF2 from "babylonjs-gltf2interface";
     /**
      * Loader interface with an index field.
      */
@@ -1007,7 +1007,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IAccessor extends IGLTF2.IAccessor, IArrayItem {
+    export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
@@ -1016,25 +1016,25 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimationChannel extends IGLTF2.IAnimationChannel, IArrayItem {
+    export interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     /** @hidden */
     export interface _IAnimationSamplerData {
         input: Float32Array;
-        interpolation: IGLTF2.AnimationSamplerInterpolation;
+        interpolation: GLTF2.AnimationSamplerInterpolation;
         output: Float32Array;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimationSampler extends IGLTF2.IAnimationSampler, IArrayItem {
+    export interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         _data?: Promise<_IAnimationSamplerData>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimation extends IGLTF2.IAnimation, IArrayItem {
+    export interface IAnimation extends GLTF2.IAnimation, IArrayItem {
         channels: IAnimationChannel[];
         samplers: IAnimationSampler[];
         /** @hidden */
@@ -1043,14 +1043,14 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IBuffer extends IGLTF2.IBuffer, IArrayItem {
+    export interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IBufferView extends IGLTF2.IBufferView, IArrayItem {
+    export interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
@@ -1059,36 +1059,36 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ICamera extends IGLTF2.ICamera, IArrayItem {
+    export interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IImage extends IGLTF2.IImage, IArrayItem {
+    export interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialNormalTextureInfo extends IGLTF2.IMaterialNormalTextureInfo, ITextureInfo {
+    export interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialOcclusionTextureInfo extends IGLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
+    export interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialPbrMetallicRoughness extends IGLTF2.IMaterialPbrMetallicRoughness {
+    export interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
         baseColorTexture?: ITextureInfo;
         metallicRoughnessTexture?: ITextureInfo;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterial extends IGLTF2.IMaterial, IArrayItem {
+    export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
         pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
         normalTexture?: IMaterialNormalTextureInfo;
         occlusionTexture?: IMaterialOcclusionTextureInfo;
@@ -1105,13 +1105,13 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IMesh extends IGLTF2.IMesh, IArrayItem {
+    export interface IMesh extends GLTF2.IMesh, IArrayItem {
         primitives: IMeshPrimitive[];
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMeshPrimitive extends IGLTF2.IMeshPrimitive, IArrayItem {
+    export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
         /** @hidden */
         _instanceData?: {
             babylonSourceMesh: Mesh;
@@ -1121,7 +1121,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface INode extends IGLTF2.INode, IArrayItem {
+    export interface INode extends GLTF2.INode, IArrayItem {
         /**
          * The parent glTF node.
          */
@@ -1145,19 +1145,19 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ISampler extends IGLTF2.ISampler, IArrayItem {
+    export interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         _data?: _ISamplerData;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IScene extends IGLTF2.IScene, IArrayItem {
+    export interface IScene extends GLTF2.IScene, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface ISkin extends IGLTF2.ISkin, IArrayItem {
+    export interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         _data?: {
             babylonSkeleton: Skeleton;
@@ -1167,17 +1167,17 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ITexture extends IGLTF2.ITexture, IArrayItem {
+    export interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface ITextureInfo extends IGLTF2.ITextureInfo {
+    export interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IGLTF extends IGLTF2.IGLTF {
+    export interface IGLTF extends GLTF2.IGLTF {
         accessors?: IAccessor[];
         animations?: IAnimation[];
         buffers?: IBuffer[];
@@ -2536,12 +2536,12 @@ declare module BABYLON {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<BABYLON.GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: BABYLON.GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")

+ 3 - 3
dist/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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.0.2",
-        "babylonjs": "4.0.2"
+        "babylonjs-gltf2interface": "4.0.3",
+        "babylonjs": "4.0.3"
     },
     "engines": {
         "node": "*"

+ 2 - 2
dist/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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2"
+        "babylonjs": "4.0.3"
     },
     "engines": {
         "node": "*"

+ 2 - 2
dist/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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2"
+        "babylonjs": "4.0.3"
     },
     "engines": {
         "node": "*"

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

@@ -31951,6 +31951,8 @@ declare module BABYLON {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/babylon.js


文件差异内容过多而无法显示
+ 61 - 52
dist/preview release/babylon.max.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/babylon.max.js.map


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

@@ -32822,6 +32822,8 @@ declare module "babylonjs/scene" {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.
@@ -92052,6 +92054,8 @@ declare module BABYLON {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.

+ 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.2",
+    "version": "4.0.3",
     "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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2"
+        "babylonjs": "4.0.3"
     },
     "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.2",
+    "version": "4.0.3",
     "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.2",
-        "babylonjs-gui": "4.0.2",
-        "babylonjs-loaders": "4.0.2",
-        "babylonjs-serializers": "4.0.2",
-        "babylonjs-gltf2interface": "4.0.2"
+        "babylonjs": "4.0.3",
+        "babylonjs-gui": "4.0.3",
+        "babylonjs-loaders": "4.0.3",
+        "babylonjs-serializers": "4.0.3",
+        "babylonjs-gltf2interface": "4.0.3"
     },
     "engines": {
         "node": "*"

+ 7 - 4
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -3169,8 +3169,8 @@ var GLTFFileLoader = /** @class */ (function () {
     GLTFFileLoader.prototype._parseAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         return Promise.resolve().then(function () {
-            var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
-            return _this._validateAsync(scene, unpacked.json, rootUrl, fileName).then(function () {
+            return _this._validateAsync(scene, data, rootUrl, fileName).then(function () {
+                var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
                 _this._startPerformanceCounter("Parse JSON");
                 _this._log("JSON length: " + unpacked.json.length);
                 var loaderData = {
@@ -3184,7 +3184,7 @@ var GLTFFileLoader = /** @class */ (function () {
             });
         });
     };
-    GLTFFileLoader.prototype._validateAsync = function (scene, json, rootUrl, fileName) {
+    GLTFFileLoader.prototype._validateAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         if (!this.validate || typeof GLTFValidator === "undefined") {
             return Promise.resolve();
@@ -3200,7 +3200,10 @@ var GLTFFileLoader = /** @class */ (function () {
         if (fileName && fileName.substr(0, 5) !== "data:") {
             options.uri = (rootUrl === "file:" ? fileName : "" + rootUrl + fileName);
         }
-        return GLTFValidator.validateString(json, options).then(function (result) {
+        var promise = (data instanceof ArrayBuffer)
+            ? GLTFValidator.validateBytes(new Uint8Array(data), options)
+            : GLTFValidator.validateString(data, options);
+        return promise.then(function (result) {
             _this._endPerformanceCounter("Validate JSON");
             _this.onValidatedObservable.notifyObservers(result);
             _this.onValidatedObservable.clear();

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.js.map


文件差异内容过多而无法显示
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


+ 7 - 4
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -3869,8 +3869,8 @@ var GLTFFileLoader = /** @class */ (function () {
     GLTFFileLoader.prototype._parseAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         return Promise.resolve().then(function () {
-            var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
-            return _this._validateAsync(scene, unpacked.json, rootUrl, fileName).then(function () {
+            return _this._validateAsync(scene, data, rootUrl, fileName).then(function () {
+                var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
                 _this._startPerformanceCounter("Parse JSON");
                 _this._log("JSON length: " + unpacked.json.length);
                 var loaderData = {
@@ -3884,7 +3884,7 @@ var GLTFFileLoader = /** @class */ (function () {
             });
         });
     };
-    GLTFFileLoader.prototype._validateAsync = function (scene, json, rootUrl, fileName) {
+    GLTFFileLoader.prototype._validateAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         if (!this.validate || typeof GLTFValidator === "undefined") {
             return Promise.resolve();
@@ -3900,7 +3900,10 @@ var GLTFFileLoader = /** @class */ (function () {
         if (fileName && fileName.substr(0, 5) !== "data:") {
             options.uri = (rootUrl === "file:" ? fileName : "" + rootUrl + fileName);
         }
-        return GLTFValidator.validateString(json, options).then(function (result) {
+        var promise = (data instanceof ArrayBuffer)
+            ? GLTFValidator.validateBytes(new Uint8Array(data), options)
+            : GLTFValidator.validateString(data, options);
+        return promise.then(function (result) {
             _this._endPerformanceCounter("Validate JSON");
             _this.onValidatedObservable.notifyObservers(result);
             _this.onValidatedObservable.clear();

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.js.map


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 7 - 4
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -6418,8 +6418,8 @@ var GLTFFileLoader = /** @class */ (function () {
     GLTFFileLoader.prototype._parseAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         return Promise.resolve().then(function () {
-            var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
-            return _this._validateAsync(scene, unpacked.json, rootUrl, fileName).then(function () {
+            return _this._validateAsync(scene, data, rootUrl, fileName).then(function () {
+                var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
                 _this._startPerformanceCounter("Parse JSON");
                 _this._log("JSON length: " + unpacked.json.length);
                 var loaderData = {
@@ -6433,7 +6433,7 @@ var GLTFFileLoader = /** @class */ (function () {
             });
         });
     };
-    GLTFFileLoader.prototype._validateAsync = function (scene, json, rootUrl, fileName) {
+    GLTFFileLoader.prototype._validateAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         if (!this.validate || typeof GLTFValidator === "undefined") {
             return Promise.resolve();
@@ -6449,7 +6449,10 @@ var GLTFFileLoader = /** @class */ (function () {
         if (fileName && fileName.substr(0, 5) !== "data:") {
             options.uri = (rootUrl === "file:" ? fileName : "" + rootUrl + fileName);
         }
-        return GLTFValidator.validateString(json, options).then(function (result) {
+        var promise = (data instanceof ArrayBuffer)
+            ? GLTFValidator.validateBytes(new Uint8Array(data), options)
+            : GLTFValidator.validateString(data, options);
+        return promise.then(function (result) {
             _this._endPerformanceCounter("Validate JSON");
             _this.onValidatedObservable.notifyObservers(result);
             _this.onValidatedObservable.clear();

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.js.map


文件差异内容过多而无法显示
+ 2 - 2
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 2 - 2
dist/preview release/loaders/babylonjs.loaders.d.ts

@@ -235,12 +235,12 @@ declare module BABYLON {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<BABYLON.GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: BABYLON.GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")

+ 7 - 4
dist/preview release/loaders/babylonjs.loaders.js

@@ -7760,8 +7760,8 @@ var GLTFFileLoader = /** @class */ (function () {
     GLTFFileLoader.prototype._parseAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         return Promise.resolve().then(function () {
-            var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
-            return _this._validateAsync(scene, unpacked.json, rootUrl, fileName).then(function () {
+            return _this._validateAsync(scene, data, rootUrl, fileName).then(function () {
+                var unpacked = (data instanceof ArrayBuffer) ? _this._unpackBinary(data) : { json: data, bin: null };
                 _this._startPerformanceCounter("Parse JSON");
                 _this._log("JSON length: " + unpacked.json.length);
                 var loaderData = {
@@ -7775,7 +7775,7 @@ var GLTFFileLoader = /** @class */ (function () {
             });
         });
     };
-    GLTFFileLoader.prototype._validateAsync = function (scene, json, rootUrl, fileName) {
+    GLTFFileLoader.prototype._validateAsync = function (scene, data, rootUrl, fileName) {
         var _this = this;
         if (!this.validate || typeof GLTFValidator === "undefined") {
             return Promise.resolve();
@@ -7791,7 +7791,10 @@ var GLTFFileLoader = /** @class */ (function () {
         if (fileName && fileName.substr(0, 5) !== "data:") {
             options.uri = (rootUrl === "file:" ? fileName : "" + rootUrl + fileName);
         }
-        return GLTFValidator.validateString(json, options).then(function (result) {
+        var promise = (data instanceof ArrayBuffer)
+            ? GLTFValidator.validateBytes(new Uint8Array(data), options)
+            : GLTFValidator.validateString(data, options);
+        return promise.then(function (result) {
             _this._endPerformanceCounter("Validate JSON");
             _this.onValidatedObservable.notifyObservers(result);
             _this.onValidatedObservable.clear();

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.js.map


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


+ 28 - 28
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -1,5 +1,4 @@
 declare module "babylonjs-loaders/glTF/glTFFileLoader" {
-    import { IGLTFValidationResults } from "babylonjs-gltf2interface";
     import { Nullable } from "babylonjs/types";
     import { Observable } from "babylonjs/Misc/observable";
     import { Camera } from "babylonjs/Cameras/camera";
@@ -12,6 +11,7 @@ declare module "babylonjs-loaders/glTF/glTFFileLoader" {
     import { ISceneLoaderPluginFactory, ISceneLoaderPlugin, ISceneLoaderPluginAsync, SceneLoaderProgressEvent, ISceneLoaderPluginExtensions } from "babylonjs/Loading/sceneLoader";
     import { AssetContainer } from "babylonjs/assetContainer";
     import { Scene, IDisposable } from "babylonjs/scene";
+    import * as GLTF2 from "babylonjs-gltf2interface";
     /**
      * Mode that determines the coordinate system to use.
      */
@@ -248,12 +248,12 @@ declare module "babylonjs-loaders/glTF/glTFFileLoader" {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")
@@ -994,7 +994,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     import { Buffer, VertexBuffer } from "babylonjs/Meshes/buffer";
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { Mesh } from "babylonjs/Meshes/mesh";
-    import * as IGLTF2 from "babylonjs-gltf2interface";
+    import * as GLTF2 from "babylonjs-gltf2interface";
     /**
      * Loader interface with an index field.
      */
@@ -1007,7 +1007,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IAccessor extends IGLTF2.IAccessor, IArrayItem {
+    export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
@@ -1016,25 +1016,25 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimationChannel extends IGLTF2.IAnimationChannel, IArrayItem {
+    export interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     /** @hidden */
     export interface _IAnimationSamplerData {
         input: Float32Array;
-        interpolation: IGLTF2.AnimationSamplerInterpolation;
+        interpolation: GLTF2.AnimationSamplerInterpolation;
         output: Float32Array;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimationSampler extends IGLTF2.IAnimationSampler, IArrayItem {
+    export interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         _data?: Promise<_IAnimationSamplerData>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimation extends IGLTF2.IAnimation, IArrayItem {
+    export interface IAnimation extends GLTF2.IAnimation, IArrayItem {
         channels: IAnimationChannel[];
         samplers: IAnimationSampler[];
         /** @hidden */
@@ -1043,14 +1043,14 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IBuffer extends IGLTF2.IBuffer, IArrayItem {
+    export interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IBufferView extends IGLTF2.IBufferView, IArrayItem {
+    export interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
@@ -1059,36 +1059,36 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ICamera extends IGLTF2.ICamera, IArrayItem {
+    export interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IImage extends IGLTF2.IImage, IArrayItem {
+    export interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialNormalTextureInfo extends IGLTF2.IMaterialNormalTextureInfo, ITextureInfo {
+    export interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialOcclusionTextureInfo extends IGLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
+    export interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialPbrMetallicRoughness extends IGLTF2.IMaterialPbrMetallicRoughness {
+    export interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
         baseColorTexture?: ITextureInfo;
         metallicRoughnessTexture?: ITextureInfo;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterial extends IGLTF2.IMaterial, IArrayItem {
+    export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
         pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
         normalTexture?: IMaterialNormalTextureInfo;
         occlusionTexture?: IMaterialOcclusionTextureInfo;
@@ -1105,13 +1105,13 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IMesh extends IGLTF2.IMesh, IArrayItem {
+    export interface IMesh extends GLTF2.IMesh, IArrayItem {
         primitives: IMeshPrimitive[];
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMeshPrimitive extends IGLTF2.IMeshPrimitive, IArrayItem {
+    export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
         /** @hidden */
         _instanceData?: {
             babylonSourceMesh: Mesh;
@@ -1121,7 +1121,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface INode extends IGLTF2.INode, IArrayItem {
+    export interface INode extends GLTF2.INode, IArrayItem {
         /**
          * The parent glTF node.
          */
@@ -1145,19 +1145,19 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ISampler extends IGLTF2.ISampler, IArrayItem {
+    export interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         _data?: _ISamplerData;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IScene extends IGLTF2.IScene, IArrayItem {
+    export interface IScene extends GLTF2.IScene, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface ISkin extends IGLTF2.ISkin, IArrayItem {
+    export interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         _data?: {
             babylonSkeleton: Skeleton;
@@ -1167,17 +1167,17 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ITexture extends IGLTF2.ITexture, IArrayItem {
+    export interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface ITextureInfo extends IGLTF2.ITextureInfo {
+    export interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IGLTF extends IGLTF2.IGLTF {
+    export interface IGLTF extends GLTF2.IGLTF {
         accessors?: IAccessor[];
         animations?: IAnimation[];
         buffers?: IBuffer[];
@@ -2536,12 +2536,12 @@ declare module BABYLON {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<BABYLON.GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: BABYLON.GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")

+ 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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.0.2",
-        "babylonjs": "4.0.2"
+        "babylonjs-gltf2interface": "4.0.3",
+        "babylonjs": "4.0.3"
     },
     "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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2"
+        "babylonjs": "4.0.3"
     },
     "engines": {
         "node": "*"

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

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

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

@@ -1 +1 @@
-{"engineOnly":290109,"sceneOnly":499637,"minGridMaterial":626455,"minStandardMaterial":751214}
+{"engineOnly":290133,"sceneOnly":499691,"minGridMaterial":626509,"minStandardMaterial":751268}

+ 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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2"
+        "babylonjs": "4.0.3"
     },
     "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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2"
+        "babylonjs": "4.0.3"
     },
     "engines": {
         "node": "*"

+ 1 - 1
dist/preview release/readme.md

@@ -102,7 +102,7 @@ window.addEventListener('resize', function(){
 
 ## Preview release
 
-Preview version of **4.0** can be found [here](https://github.com/BabylonJS/Babylon.js/tree/master/dist/preview%20release).
+Preview version of **4.1** can be found [here](https://github.com/BabylonJS/Babylon.js/tree/master/dist/preview%20release).
 If you want to contribute, please read our [contribution guidelines](https://github.com/BabylonJS/Babylon.js/blob/master/contributing.md) first.
 
 ## Documentation

+ 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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2",
-        "babylonjs-gltf2interface": "4.0.2"
+        "babylonjs": "4.0.3",
+        "babylonjs-gltf2interface": "4.0.3"
     },
     "engines": {
         "node": "*"

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

@@ -32822,6 +32822,8 @@ declare module "babylonjs/scene" {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.
@@ -92052,6 +92054,8 @@ declare module BABYLON {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.

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

@@ -197,11 +197,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)
                 *
@@ -218,11 +218,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;
     }
@@ -951,7 +951,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 {
@@ -1594,6 +1594,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.
@@ -2044,6 +2058,55 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+    export interface ISceneConfiguration {
+            debug?: boolean;
+            clearColor?: {
+                    r: number;
+                    g: number;
+                    b: number;
+                    a: number;
+            };
+            /** Deprecated, use environmentMap.mainColor instead. */
+            mainColor?: {
+                    r?: number;
+                    g?: number;
+                    b?: number;
+            };
+            imageProcessingConfiguration?: IImageProcessingConfiguration;
+            environmentTexture?: string;
+            colorGrading?: IColorGradingConfiguration;
+            environmentRotationY?: number;
+            /**
+                * Deprecated, please use default rendering pipeline
+                */
+            glow?: boolean | BABYLON.IGlowLayerOptions;
+            disableHdr?: boolean;
+            renderInBackground?: boolean;
+            disableCameraControl?: boolean;
+            animationPropertiesOverride?: {
+                    [propName: string]: any;
+            };
+            defaultMaterial?: {
+                    materialType: "standard" | "pbr";
+                    [propName: string]: any;
+            };
+            flags?: {
+                    shadowsEnabled?: boolean;
+                    particlesEnabled?: boolean;
+                    collisionsEnabled?: boolean;
+                    lightsEnabled?: boolean;
+                    texturesEnabled?: boolean;
+                    lensFlaresEnabled?: boolean;
+                    proceduralTexturesEnabled?: boolean;
+                    renderTargetsEnabled?: boolean;
+                    spritesEnabled?: boolean;
+                    skeletonsEnabled?: boolean;
+                    audioEnabled?: boolean;
+            };
+            assetsRootURL?: string;
+    }
+}
+declare module BabylonViewer {
     export interface ISceneOptimizerConfiguration {
         targetFrameRate?: number;
         trackerDuration?: number;

文件差异内容过多而无法显示
+ 15 - 15
dist/preview release/viewer/babylon.viewer.js


文件差异内容过多而无法显示
+ 2 - 2
dist/preview release/viewer/babylon.viewer.max.js


+ 72 - 6
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -230,11 +230,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)
                 *
@@ -251,11 +251,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;
     }
@@ -1031,13 +1031,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;
 }
 
@@ -1737,6 +1738,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';
@@ -2242,7 +2259,56 @@ declare module 'babylonjs-viewer/configuration/interfaces/observersConfiguration
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/sceneConfiguration' {
-    
+    import { IImageProcessingConfiguration } from "babylonjs-viewer/configuration/interfaces/imageProcessingConfiguration";
+    import { IColorGradingConfiguration } from "babylonjs-viewer/configuration/interfaces/colorGradingConfiguration";
+    import { IGlowLayerOptions } from "babylonjs";
+    export interface ISceneConfiguration {
+            debug?: boolean;
+            clearColor?: {
+                    r: number;
+                    g: number;
+                    b: number;
+                    a: number;
+            };
+            /** Deprecated, use environmentMap.mainColor instead. */
+            mainColor?: {
+                    r?: number;
+                    g?: number;
+                    b?: number;
+            };
+            imageProcessingConfiguration?: IImageProcessingConfiguration;
+            environmentTexture?: string;
+            colorGrading?: IColorGradingConfiguration;
+            environmentRotationY?: number;
+            /**
+                * Deprecated, please use default rendering pipeline
+                */
+            glow?: boolean | IGlowLayerOptions;
+            disableHdr?: boolean;
+            renderInBackground?: boolean;
+            disableCameraControl?: boolean;
+            animationPropertiesOverride?: {
+                    [propName: string]: any;
+            };
+            defaultMaterial?: {
+                    materialType: "standard" | "pbr";
+                    [propName: string]: any;
+            };
+            flags?: {
+                    shadowsEnabled?: boolean;
+                    particlesEnabled?: boolean;
+                    collisionsEnabled?: boolean;
+                    lightsEnabled?: boolean;
+                    texturesEnabled?: boolean;
+                    lensFlaresEnabled?: boolean;
+                    proceduralTexturesEnabled?: boolean;
+                    renderTargetsEnabled?: boolean;
+                    spritesEnabled?: boolean;
+                    skeletonsEnabled?: boolean;
+                    audioEnabled?: boolean;
+            };
+            assetsRootURL?: string;
+    }
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/sceneOptimizerConfiguration' {

+ 28 - 28
dist/preview release/viewer/babylonjs.loaders.module.d.ts

@@ -1,5 +1,4 @@
 declare module "babylonjs-loaders/glTF/glTFFileLoader" {
-    import { IGLTFValidationResults } from "babylonjs-gltf2interface";
     import { Nullable } from "babylonjs/types";
     import { Observable } from "babylonjs/Misc/observable";
     import { Camera } from "babylonjs/Cameras/camera";
@@ -12,6 +11,7 @@ declare module "babylonjs-loaders/glTF/glTFFileLoader" {
     import { ISceneLoaderPluginFactory, ISceneLoaderPlugin, ISceneLoaderPluginAsync, SceneLoaderProgressEvent, ISceneLoaderPluginExtensions } from "babylonjs/Loading/sceneLoader";
     import { AssetContainer } from "babylonjs/assetContainer";
     import { Scene, IDisposable } from "babylonjs/scene";
+    import * as GLTF2 from "babylonjs-gltf2interface";
     /**
      * Mode that determines the coordinate system to use.
      */
@@ -248,12 +248,12 @@ declare module "babylonjs-loaders/glTF/glTFFileLoader" {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")
@@ -994,7 +994,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     import { Buffer, VertexBuffer } from "babylonjs/Meshes/buffer";
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { Mesh } from "babylonjs/Meshes/mesh";
-    import * as IGLTF2 from "babylonjs-gltf2interface";
+    import * as GLTF2 from "babylonjs-gltf2interface";
     /**
      * Loader interface with an index field.
      */
@@ -1007,7 +1007,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IAccessor extends IGLTF2.IAccessor, IArrayItem {
+    export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
@@ -1016,25 +1016,25 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimationChannel extends IGLTF2.IAnimationChannel, IArrayItem {
+    export interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     /** @hidden */
     export interface _IAnimationSamplerData {
         input: Float32Array;
-        interpolation: IGLTF2.AnimationSamplerInterpolation;
+        interpolation: GLTF2.AnimationSamplerInterpolation;
         output: Float32Array;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimationSampler extends IGLTF2.IAnimationSampler, IArrayItem {
+    export interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         _data?: Promise<_IAnimationSamplerData>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimation extends IGLTF2.IAnimation, IArrayItem {
+    export interface IAnimation extends GLTF2.IAnimation, IArrayItem {
         channels: IAnimationChannel[];
         samplers: IAnimationSampler[];
         /** @hidden */
@@ -1043,14 +1043,14 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IBuffer extends IGLTF2.IBuffer, IArrayItem {
+    export interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IBufferView extends IGLTF2.IBufferView, IArrayItem {
+    export interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
@@ -1059,36 +1059,36 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ICamera extends IGLTF2.ICamera, IArrayItem {
+    export interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IImage extends IGLTF2.IImage, IArrayItem {
+    export interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialNormalTextureInfo extends IGLTF2.IMaterialNormalTextureInfo, ITextureInfo {
+    export interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialOcclusionTextureInfo extends IGLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
+    export interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialPbrMetallicRoughness extends IGLTF2.IMaterialPbrMetallicRoughness {
+    export interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
         baseColorTexture?: ITextureInfo;
         metallicRoughnessTexture?: ITextureInfo;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterial extends IGLTF2.IMaterial, IArrayItem {
+    export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
         pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
         normalTexture?: IMaterialNormalTextureInfo;
         occlusionTexture?: IMaterialOcclusionTextureInfo;
@@ -1105,13 +1105,13 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IMesh extends IGLTF2.IMesh, IArrayItem {
+    export interface IMesh extends GLTF2.IMesh, IArrayItem {
         primitives: IMeshPrimitive[];
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMeshPrimitive extends IGLTF2.IMeshPrimitive, IArrayItem {
+    export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
         /** @hidden */
         _instanceData?: {
             babylonSourceMesh: Mesh;
@@ -1121,7 +1121,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface INode extends IGLTF2.INode, IArrayItem {
+    export interface INode extends GLTF2.INode, IArrayItem {
         /**
          * The parent glTF node.
          */
@@ -1145,19 +1145,19 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ISampler extends IGLTF2.ISampler, IArrayItem {
+    export interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         _data?: _ISamplerData;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IScene extends IGLTF2.IScene, IArrayItem {
+    export interface IScene extends GLTF2.IScene, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface ISkin extends IGLTF2.ISkin, IArrayItem {
+    export interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         _data?: {
             babylonSkeleton: Skeleton;
@@ -1167,17 +1167,17 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ITexture extends IGLTF2.ITexture, IArrayItem {
+    export interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface ITextureInfo extends IGLTF2.ITextureInfo {
+    export interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IGLTF extends IGLTF2.IGLTF {
+    export interface IGLTF extends GLTF2.IGLTF {
         accessors?: IAccessor[];
         animations?: IAnimation[];
         buffers?: IBuffer[];
@@ -2536,12 +2536,12 @@ declare module BABYLON {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<BABYLON.GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: BABYLON.GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")

+ 2 - 2
dist/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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,7 +28,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2"
+        "babylonjs": "4.0.3"
     },
     "engines": {
         "node": "*"

+ 1 - 1
dist/readme.md

@@ -102,7 +102,7 @@ window.addEventListener('resize', function(){
 
 ## Preview release
 
-Preview version of **4.0** can be found [here](https://github.com/BabylonJS/Babylon.js/tree/master/dist/preview%20release).
+Preview version of **4.1** can be found [here](https://github.com/BabylonJS/Babylon.js/tree/master/dist/preview%20release).
 If you want to contribute, please read our [contribution guidelines](https://github.com/BabylonJS/Babylon.js/blob/master/contributing.md) first.
 
 ## Documentation

+ 3 - 3
dist/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.2",
+    "version": "4.0.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,8 +28,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.2",
-        "babylonjs-gltf2interface": "4.0.2"
+        "babylonjs": "4.0.3",
+        "babylonjs-gltf2interface": "4.0.3"
     },
     "engines": {
         "node": "*"

+ 5 - 52
dist/viewer/babylon.glTF2Interface.d.ts

@@ -856,7 +856,7 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * Interface for glTF validation results
+     * The glTF validation results
      */
     interface IGLTFValidationResults {
         info: {
@@ -885,7 +885,7 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * Interface for glTF validation options
+     * The glTF validation options
      */
     interface IGLTFValidationOptions {
         uri?: string;
@@ -897,57 +897,10 @@ declare module BABYLON.GLTF2 {
     }
 
     /**
-     * glTF validator object Tyyings
+     * The glTF validator object
      */
-    interface IGLTFValidatorTypings {
+    interface IGLTFValidator {
+        validateBytes: (data: Uint8Array, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
         validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
     }
 }
-
-/**
- * Interface for glTF validation results
- */
-interface IGLTFValidationResults {
-    info: {
-        generator: string;
-        hasAnimations: boolean;
-        hasDefaultScene: boolean;
-        hasMaterials: boolean;
-        hasMorphTargets: boolean;
-        hasSkins: boolean;
-        hasTextures: boolean;
-        maxAttributesUsed: number;
-        primitivesCount: number
-    };
-    issues: {
-        messages: Array<string>;
-        numErrors: number;
-        numHints: number;
-        numInfos: number;
-        numWarnings: number;
-        truncated: boolean
-    };
-    mimeType: string;
-    uri: string;
-    validatedAt: string;
-    validatorVersion: string;
-}
-
-/**
- * Interface for glTF validation options
- */
-interface IGLTFValidationOptions {
-    uri?: string;
-    externalResourceFunction?: (uri: string) => Promise<Uint8Array>;
-    validateAccessorData?: boolean;
-    maxIssues?: number;
-    ignoredIssues?: Array<string>;
-    severityOverrides?: Object;
-}
-
-/**
- * glTF validator object Tyyings
- */
-interface IGLTFValidatorTypings {
-    validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
-}

+ 4 - 0
dist/viewer/babylon.module.d.ts

@@ -32822,6 +32822,8 @@ declare module "babylonjs/scene" {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.
@@ -92052,6 +92054,8 @@ declare module BABYLON {
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
         useClonedMeshhMap?: boolean;
+        /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
+        virtual?: boolean;
     }
     /**
      * Represents a scene to be rendered by the engine.

+ 68 - 5
dist/viewer/babylon.viewer.d.ts

@@ -197,11 +197,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)
                 *
@@ -218,11 +218,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;
     }
@@ -951,7 +951,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 {
@@ -1594,6 +1594,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.
@@ -2044,6 +2058,55 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+    export interface ISceneConfiguration {
+            debug?: boolean;
+            clearColor?: {
+                    r: number;
+                    g: number;
+                    b: number;
+                    a: number;
+            };
+            /** Deprecated, use environmentMap.mainColor instead. */
+            mainColor?: {
+                    r?: number;
+                    g?: number;
+                    b?: number;
+            };
+            imageProcessingConfiguration?: IImageProcessingConfiguration;
+            environmentTexture?: string;
+            colorGrading?: IColorGradingConfiguration;
+            environmentRotationY?: number;
+            /**
+                * Deprecated, please use default rendering pipeline
+                */
+            glow?: boolean | BABYLON.IGlowLayerOptions;
+            disableHdr?: boolean;
+            renderInBackground?: boolean;
+            disableCameraControl?: boolean;
+            animationPropertiesOverride?: {
+                    [propName: string]: any;
+            };
+            defaultMaterial?: {
+                    materialType: "standard" | "pbr";
+                    [propName: string]: any;
+            };
+            flags?: {
+                    shadowsEnabled?: boolean;
+                    particlesEnabled?: boolean;
+                    collisionsEnabled?: boolean;
+                    lightsEnabled?: boolean;
+                    texturesEnabled?: boolean;
+                    lensFlaresEnabled?: boolean;
+                    proceduralTexturesEnabled?: boolean;
+                    renderTargetsEnabled?: boolean;
+                    spritesEnabled?: boolean;
+                    skeletonsEnabled?: boolean;
+                    audioEnabled?: boolean;
+            };
+            assetsRootURL?: string;
+    }
+}
+declare module BabylonViewer {
     export interface ISceneOptimizerConfiguration {
         targetFrameRate?: number;
         trackerDuration?: number;

文件差异内容过多而无法显示
+ 15 - 15
dist/viewer/babylon.viewer.js


文件差异内容过多而无法显示
+ 2 - 2
dist/viewer/babylon.viewer.max.js


+ 72 - 6
dist/viewer/babylon.viewer.module.d.ts

@@ -230,11 +230,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)
                 *
@@ -251,11 +251,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;
     }
@@ -1031,13 +1031,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;
 }
 
@@ -1737,6 +1738,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';
@@ -2242,7 +2259,56 @@ declare module 'babylonjs-viewer/configuration/interfaces/observersConfiguration
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/sceneConfiguration' {
-    
+    import { IImageProcessingConfiguration } from "babylonjs-viewer/configuration/interfaces/imageProcessingConfiguration";
+    import { IColorGradingConfiguration } from "babylonjs-viewer/configuration/interfaces/colorGradingConfiguration";
+    import { IGlowLayerOptions } from "babylonjs";
+    export interface ISceneConfiguration {
+            debug?: boolean;
+            clearColor?: {
+                    r: number;
+                    g: number;
+                    b: number;
+                    a: number;
+            };
+            /** Deprecated, use environmentMap.mainColor instead. */
+            mainColor?: {
+                    r?: number;
+                    g?: number;
+                    b?: number;
+            };
+            imageProcessingConfiguration?: IImageProcessingConfiguration;
+            environmentTexture?: string;
+            colorGrading?: IColorGradingConfiguration;
+            environmentRotationY?: number;
+            /**
+                * Deprecated, please use default rendering pipeline
+                */
+            glow?: boolean | IGlowLayerOptions;
+            disableHdr?: boolean;
+            renderInBackground?: boolean;
+            disableCameraControl?: boolean;
+            animationPropertiesOverride?: {
+                    [propName: string]: any;
+            };
+            defaultMaterial?: {
+                    materialType: "standard" | "pbr";
+                    [propName: string]: any;
+            };
+            flags?: {
+                    shadowsEnabled?: boolean;
+                    particlesEnabled?: boolean;
+                    collisionsEnabled?: boolean;
+                    lightsEnabled?: boolean;
+                    texturesEnabled?: boolean;
+                    lensFlaresEnabled?: boolean;
+                    proceduralTexturesEnabled?: boolean;
+                    renderTargetsEnabled?: boolean;
+                    spritesEnabled?: boolean;
+                    skeletonsEnabled?: boolean;
+                    audioEnabled?: boolean;
+            };
+            assetsRootURL?: string;
+    }
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/sceneOptimizerConfiguration' {

+ 28 - 28
dist/viewer/babylonjs.loaders.module.d.ts

@@ -1,5 +1,4 @@
 declare module "babylonjs-loaders/glTF/glTFFileLoader" {
-    import { IGLTFValidationResults } from "babylonjs-gltf2interface";
     import { Nullable } from "babylonjs/types";
     import { Observable } from "babylonjs/Misc/observable";
     import { Camera } from "babylonjs/Cameras/camera";
@@ -12,6 +11,7 @@ declare module "babylonjs-loaders/glTF/glTFFileLoader" {
     import { ISceneLoaderPluginFactory, ISceneLoaderPlugin, ISceneLoaderPluginAsync, SceneLoaderProgressEvent, ISceneLoaderPluginExtensions } from "babylonjs/Loading/sceneLoader";
     import { AssetContainer } from "babylonjs/assetContainer";
     import { Scene, IDisposable } from "babylonjs/scene";
+    import * as GLTF2 from "babylonjs-gltf2interface";
     /**
      * Mode that determines the coordinate system to use.
      */
@@ -248,12 +248,12 @@ declare module "babylonjs-loaders/glTF/glTFFileLoader" {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")
@@ -994,7 +994,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     import { Buffer, VertexBuffer } from "babylonjs/Meshes/buffer";
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { Mesh } from "babylonjs/Meshes/mesh";
-    import * as IGLTF2 from "babylonjs-gltf2interface";
+    import * as GLTF2 from "babylonjs-gltf2interface";
     /**
      * Loader interface with an index field.
      */
@@ -1007,7 +1007,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IAccessor extends IGLTF2.IAccessor, IArrayItem {
+    export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
@@ -1016,25 +1016,25 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimationChannel extends IGLTF2.IAnimationChannel, IArrayItem {
+    export interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     /** @hidden */
     export interface _IAnimationSamplerData {
         input: Float32Array;
-        interpolation: IGLTF2.AnimationSamplerInterpolation;
+        interpolation: GLTF2.AnimationSamplerInterpolation;
         output: Float32Array;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimationSampler extends IGLTF2.IAnimationSampler, IArrayItem {
+    export interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         _data?: Promise<_IAnimationSamplerData>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IAnimation extends IGLTF2.IAnimation, IArrayItem {
+    export interface IAnimation extends GLTF2.IAnimation, IArrayItem {
         channels: IAnimationChannel[];
         samplers: IAnimationSampler[];
         /** @hidden */
@@ -1043,14 +1043,14 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IBuffer extends IGLTF2.IBuffer, IArrayItem {
+    export interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IBufferView extends IGLTF2.IBufferView, IArrayItem {
+    export interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
@@ -1059,36 +1059,36 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ICamera extends IGLTF2.ICamera, IArrayItem {
+    export interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IImage extends IGLTF2.IImage, IArrayItem {
+    export interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialNormalTextureInfo extends IGLTF2.IMaterialNormalTextureInfo, ITextureInfo {
+    export interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialOcclusionTextureInfo extends IGLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
+    export interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterialPbrMetallicRoughness extends IGLTF2.IMaterialPbrMetallicRoughness {
+    export interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
         baseColorTexture?: ITextureInfo;
         metallicRoughnessTexture?: ITextureInfo;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMaterial extends IGLTF2.IMaterial, IArrayItem {
+    export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
         pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
         normalTexture?: IMaterialNormalTextureInfo;
         occlusionTexture?: IMaterialOcclusionTextureInfo;
@@ -1105,13 +1105,13 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface IMesh extends IGLTF2.IMesh, IArrayItem {
+    export interface IMesh extends GLTF2.IMesh, IArrayItem {
         primitives: IMeshPrimitive[];
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IMeshPrimitive extends IGLTF2.IMeshPrimitive, IArrayItem {
+    export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
         /** @hidden */
         _instanceData?: {
             babylonSourceMesh: Mesh;
@@ -1121,7 +1121,7 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface INode extends IGLTF2.INode, IArrayItem {
+    export interface INode extends GLTF2.INode, IArrayItem {
         /**
          * The parent glTF node.
          */
@@ -1145,19 +1145,19 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ISampler extends IGLTF2.ISampler, IArrayItem {
+    export interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         _data?: _ISamplerData;
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IScene extends IGLTF2.IScene, IArrayItem {
+    export interface IScene extends GLTF2.IScene, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface ISkin extends IGLTF2.ISkin, IArrayItem {
+    export interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         _data?: {
             babylonSkeleton: Skeleton;
@@ -1167,17 +1167,17 @@ declare module "babylonjs-loaders/glTF/2.0/glTFLoaderInterfaces" {
     /**
      * Loader interface with additional members.
      */
-    export interface ITexture extends IGLTF2.ITexture, IArrayItem {
+    export interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface ITextureInfo extends IGLTF2.ITextureInfo {
+    export interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     /**
      * Loader interface with additional members.
      */
-    export interface IGLTF extends IGLTF2.IGLTF {
+    export interface IGLTF extends GLTF2.IGLTF {
         accessors?: IAccessor[];
         animations?: IAnimation[];
         buffers?: IBuffer[];
@@ -2536,12 +2536,12 @@ declare module BABYLON {
         /**
          * Observable raised after validation when validate is set to true. The event data is the result of the validation.
          */
-        readonly onValidatedObservable: Observable<IGLTFValidationResults>;
+        readonly onValidatedObservable: Observable<BABYLON.GLTF2.IGLTFValidationResults>;
         private _onValidatedObserver;
         /**
          * Callback raised after a loader extension is created.
          */
-        onValidated: (results: IGLTFValidationResults) => void;
+        onValidated: (results: BABYLON.GLTF2.IGLTFValidationResults) => void;
         private _loader;
         /**
          * Name of the loader ("gltf")

+ 1 - 1
package.json

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

+ 2 - 2
src/Engines/engine.ts

@@ -491,14 +491,14 @@ export class Engine {
      */
     // Not mixed with Version for tooling purpose.
     public static get NpmPackage(): string {
-        return "babylonjs@4.0.2";
+        return "babylonjs@4.0.3";
     }
 
     /**
      * Returns the current version of the framework
      */
     public static get Version(): string {
-        return "4.0.2";
+        return "4.0.3";
     }
 
     /**

+ 3 - 3
src/Physics/Plugins/ammoJSPlugin.ts

@@ -1464,9 +1464,9 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin {
             );
             this._raycastResult.calculateHitDistance();
         }
-        Ammo.destroy(rayCallback)
-        Ammo.destroy(this._tmpAmmoVectorRCA)
-        Ammo.destroy(this._tmpAmmoVectorRCB)
+        Ammo.destroy(rayCallback);
+        Ammo.destroy(this._tmpAmmoVectorRCA);
+        Ammo.destroy(this._tmpAmmoVectorRCB);
         return this._raycastResult;
     }
 }