Browse Source

Removed flagged deprecated content

David Catuhe 6 years ago
parent
commit
b854f5f5ba
29 changed files with 9827 additions and 10241 deletions
  1. 4690 4728
      Playground/babylon.d.txt
  2. 4740 4778
      dist/preview release/babylon.d.ts
  3. 1 1
      dist/preview release/babylon.js
  4. 55 175
      dist/preview release/babylon.max.js
  5. 55 175
      dist/preview release/babylon.no-module.max.js
  6. 1 1
      dist/preview release/babylon.worker.js
  7. 55 175
      dist/preview release/es6.js
  8. 1 1
      dist/preview release/gui/babylon.gui.js
  9. 1 1
      dist/preview release/gui/babylon.gui.min.js
  10. 1 1
      dist/preview release/gui/babylon.gui.min.js.map
  11. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  12. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  13. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  14. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  15. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  16. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  17. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  18. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  19. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  20. 1 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  21. 92 28
      dist/preview release/viewer/babylon.viewer.d.ts
  22. 3 3
      dist/preview release/viewer/babylon.viewer.js
  23. 5 5
      dist/preview release/viewer/babylon.viewer.max.js
  24. 94 30
      dist/preview release/viewer/babylon.viewer.module.d.ts
  25. 18 0
      dist/preview release/what's new.md
  26. 0 12
      src/Engine/babylon.engine.ts
  27. 0 34
      src/Lights/Shadows/babylon.shadowGenerator.ts
  28. 1 1
      src/Math/babylon.math.ts
  29. 4 82
      src/babylon.scene.ts

File diff suppressed because it is too large
+ 4690 - 4728
Playground/babylon.d.txt


File diff suppressed because it is too large
+ 4740 - 4778
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.js


+ 55 - 175
dist/preview release/babylon.max.js

@@ -5477,7 +5477,7 @@ var BABYLON;
         };
         /**
          * Returns a new Vector3 set from the index "offset" of the given Float32Array
-         * This function is deprecated.  Use FromArray instead
+         * This function is deprecated. Use FromArray instead
          * @param array defines the source array
          * @param offset defines the offset in the source array
          * @returns the new Vector3
@@ -13236,24 +13236,6 @@ var BABYLON;
         Engine.prototype.getCaps = function () {
             return this._caps;
         };
-        Object.defineProperty(Engine.prototype, "drawCalls", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("drawCalls is deprecated. Please use SceneInstrumentation class");
-                return 0;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine.prototype, "drawCallsPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("drawCallsPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the current depth function
          * @returns a number defining the depth function
@@ -26553,48 +26535,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        /** @hidden */
-        Scene.prototype.getInterFramePerfCounter = function () {
-            BABYLON.Tools.Warn("getInterFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "interFramePerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("interFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getLastFrameDuration = function () {
-            BABYLON.Tools.Warn("getLastFrameDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "lastFramePerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("lastFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getEvaluateActiveMeshesDuration = function () {
-            BABYLON.Tools.Warn("getEvaluateActiveMeshesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "evaluateActiveMeshesDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("evaluateActiveMeshesDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the array of active meshes
          * @returns an array of AbstractMesh
@@ -26602,53 +26542,6 @@ var BABYLON;
         Scene.prototype.getActiveMeshes = function () {
             return this._activeMeshes;
         };
-        /** @hidden */
-        Scene.prototype.getRenderTargetsDuration = function () {
-            BABYLON.Tools.Warn("getRenderTargetsDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        /** @hidden */
-        Scene.prototype.getRenderDuration = function () {
-            BABYLON.Tools.Warn("getRenderDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "renderDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("renderDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getParticlesDuration = function () {
-            BABYLON.Tools.Warn("getParticlesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "particlesDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("particlesDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getSpritesDuration = function () {
-            BABYLON.Tools.Warn("getSpritesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "spriteDuractionPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("spriteDuractionPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the animation ratio (which is 1.0 is the scene renders at 60fps and 2 if the scene renders at 30fps, etc.)
          * @returns a number
@@ -37295,20 +37188,27 @@ var BABYLON;
          * @param flag defines a flag used to determine which parts of the material have to be marked as dirty
          */
         Material.prototype.markAsDirty = function (flag) {
+            if (this.getScene().blockMaterialDirtyMechanism) {
+                return;
+            }
+            Material._DirtyCallbackArray.length = 0;
             if (flag & Material.TextureDirtyFlag) {
-                this._markAllSubMeshesAsTexturesDirty();
+                Material._DirtyCallbackArray.push(Material._TextureDirtyCallBack);
             }
             if (flag & Material.LightDirtyFlag) {
-                this._markAllSubMeshesAsLightsDirty();
+                Material._DirtyCallbackArray.push(Material._LightsDirtyCallBack);
             }
             if (flag & Material.FresnelDirtyFlag) {
-                this._markAllSubMeshesAsFresnelDirty();
+                Material._DirtyCallbackArray.push(Material._FresnelDirtyCallBack);
             }
             if (flag & Material.AttributesDirtyFlag) {
-                this._markAllSubMeshesAsAttributesDirty();
+                Material._DirtyCallbackArray.push(Material._AttributeDirtyCallBack);
             }
             if (flag & Material.MiscDirtyFlag) {
-                this._markAllSubMeshesAsMiscDirty();
+                Material._DirtyCallbackArray.push(Material._MiscDirtyCallBack);
+            }
+            if (Material._DirtyCallbackArray.length) {
+                this._markAllSubMeshesAsDirty(Material._RunDirtyCallBacks);
             }
             this.getScene().resetCachedMaterial();
         };
@@ -37317,13 +37217,17 @@ var BABYLON;
          * @param func defines a function which checks material defines against the submeshes
          */
         Material.prototype._markAllSubMeshesAsDirty = function (func) {
-            for (var _i = 0, _a = this.getScene().meshes; _i < _a.length; _i++) {
-                var mesh = _a[_i];
+            if (this.getScene().blockMaterialDirtyMechanism) {
+                return;
+            }
+            var meshes = this.getScene().meshes;
+            for (var _i = 0, meshes_1 = meshes; _i < meshes_1.length; _i++) {
+                var mesh = meshes_1[_i];
                 if (!mesh.subMeshes) {
                     continue;
                 }
-                for (var _b = 0, _c = mesh.subMeshes; _b < _c.length; _b++) {
-                    var subMesh = _c[_b];
+                for (var _a = 0, _b = mesh.subMeshes; _a < _b.length; _a++) {
+                    var subMesh = _b[_a];
                     if (subMesh.getMaterial() !== this) {
                         continue;
                     }
@@ -37338,55 +37242,49 @@ var BABYLON;
          * Indicates that image processing needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsImageProcessingDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsImageProcessingDirty(); });
+            this._markAllSubMeshesAsDirty(Material._ImageProcessingDirtyCallBack);
         };
         /**
          * Indicates that textures need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsTexturesDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsTexturesDirty(); });
+            this._markAllSubMeshesAsDirty(Material._TextureDirtyCallBack);
         };
         /**
          * Indicates that fresnel needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsFresnelDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsFresnelDirty(); });
+            this._markAllSubMeshesAsDirty(Material._FresnelDirtyCallBack);
         };
         /**
          * Indicates that fresnel and misc need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsFresnelAndMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) {
-                defines.markAsFresnelDirty();
-                defines.markAsMiscDirty();
-            });
+            this._markAllSubMeshesAsDirty(Material._FresnelAndMiscDirtyCallBack);
         };
         /**
          * Indicates that lights need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsLightsDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsLightDirty(); });
+            this._markAllSubMeshesAsDirty(Material._LightsDirtyCallBack);
         };
         /**
          * Indicates that attributes need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsAttributesDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsAttributesDirty(); });
+            this._markAllSubMeshesAsDirty(Material._AttributeDirtyCallBack);
         };
         /**
          * Indicates that misc needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsMiscDirty(); });
+            this._markAllSubMeshesAsDirty(Material._MiscDirtyCallBack);
         };
         /**
          * Indicates that textures and misc need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsTexturesAndMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) {
-                defines.markAsTexturesDirty();
-                defines.markAsMiscDirty();
-            });
+            this._markAllSubMeshesAsDirty(Material._TextureAndMiscDirtyCallBack);
         };
         /**
          * Disposes the material
@@ -37414,8 +37312,8 @@ var BABYLON;
                 }
                 else {
                     var meshes = scene.meshes;
-                    for (var _i = 0, meshes_1 = meshes; _i < meshes_1.length; _i++) {
-                        var mesh = meshes_1[_i];
+                    for (var _i = 0, meshes_2 = meshes; _i < meshes_2.length; _i++) {
+                        var mesh = meshes_2[_i];
                         if (mesh.material === this) {
                             mesh.material = null;
                             this.releaseVertexArrayObject(mesh, forceDisposeEffect);
@@ -37554,6 +37452,27 @@ var BABYLON;
          * The all dirty flag value
          */
         Material.AllDirtyFlag = 31;
+        Material._ImageProcessingDirtyCallBack = function (defines) { return defines.markAsImageProcessingDirty(); };
+        Material._TextureDirtyCallBack = function (defines) { return defines.markAsTexturesDirty(); };
+        Material._FresnelDirtyCallBack = function (defines) { return defines.markAsFresnelDirty(); };
+        Material._MiscDirtyCallBack = function (defines) { return defines.markAsMiscDirty(); };
+        Material._LightsDirtyCallBack = function (defines) { return defines.markAsLightDirty(); };
+        Material._AttributeDirtyCallBack = function (defines) { return defines.markAsAttributesDirty(); };
+        Material._FresnelAndMiscDirtyCallBack = function (defines) {
+            Material._FresnelDirtyCallBack(defines);
+            Material._MiscDirtyCallBack(defines);
+        };
+        Material._TextureAndMiscDirtyCallBack = function (defines) {
+            Material._TextureDirtyCallBack(defines);
+            Material._MiscDirtyCallBack(defines);
+        };
+        Material._DirtyCallbackArray = [];
+        Material._RunDirtyCallBacks = function (defines) {
+            for (var _i = 0, _a = Material._DirtyCallbackArray; _i < _a.length; _i++) {
+                var cb = _a[_i];
+                cb(defines);
+            }
+        };
         __decorate([
             BABYLON.serialize()
         ], Material.prototype, "id", void 0);
@@ -66902,7 +66821,6 @@ var BABYLON;
             _this._started = false;
             _this._stopped = false;
             _this._timeDelta = 0;
-            _this._attributesStrideSize = 21;
             _this._actualFrame = 0;
             _this._rawTextureWidth = 256;
             /**
@@ -67518,6 +67436,8 @@ var BABYLON;
             }
             var engine = this._scene.getEngine();
             var data = new Array();
+            this._attributesStrideSize = 21;
+            this._targetIndex = 0;
             if (!this.isBillboardBased) {
                 this._attributesStrideSize += 3;
             }
@@ -76609,46 +76529,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(ShadowGenerator.prototype, "useVarianceShadowMap", {
-            /**
-             * Gets if the current filter is set to VSM.
-             * DEPRECATED. Should use useExponentialShadowMap instead.
-             */
-            get: function () {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useExponentialShadowMap instead.");
-                return this.useExponentialShadowMap;
-            },
-            /**
-             * Sets the current filter is to VSM.
-             * DEPRECATED. Should use useExponentialShadowMap instead.
-             */
-            set: function (value) {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useExponentialShadowMap instead.");
-                this.useExponentialShadowMap = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(ShadowGenerator.prototype, "useBlurVarianceShadowMap", {
-            /**
-             * Gets if the current filter is set to blurred VSM.
-             * DEPRECATED. Should use useBlurExponentialShadowMap instead.
-             */
-            get: function () {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.");
-                return this.useBlurExponentialShadowMap;
-            },
-            /**
-             * Sets the current filter is to blurred VSM.
-             * DEPRECATED. Should use useBlurExponentialShadowMap instead.
-             */
-            set: function (value) {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.");
-                this.useBlurExponentialShadowMap = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(ShadowGenerator.prototype, "useExponentialShadowMap", {
             /**
              * Gets if the current filter is set to ESM.
@@ -109191,7 +109071,7 @@ var BABYLON;
             this._tmpMatrix = new BABYLON.Matrix();
             this._frameObserver = helper._sessionManager.onXRFrameObservable.add(function () {
                 if (!helper._sessionManager._currentXRFrame || !helper._sessionManager._currentXRFrame.getDevicePose) {
-                    return false;
+                    return;
                 }
                 var xrFrame = helper._sessionManager._currentXRFrame;
                 var inputSources = helper._sessionManager._xrSession.getInputSources();

+ 55 - 175
dist/preview release/babylon.no-module.max.js

@@ -5444,7 +5444,7 @@ var BABYLON;
         };
         /**
          * Returns a new Vector3 set from the index "offset" of the given Float32Array
-         * This function is deprecated.  Use FromArray instead
+         * This function is deprecated. Use FromArray instead
          * @param array defines the source array
          * @param offset defines the offset in the source array
          * @returns the new Vector3
@@ -13203,24 +13203,6 @@ var BABYLON;
         Engine.prototype.getCaps = function () {
             return this._caps;
         };
-        Object.defineProperty(Engine.prototype, "drawCalls", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("drawCalls is deprecated. Please use SceneInstrumentation class");
-                return 0;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine.prototype, "drawCallsPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("drawCallsPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the current depth function
          * @returns a number defining the depth function
@@ -26520,48 +26502,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        /** @hidden */
-        Scene.prototype.getInterFramePerfCounter = function () {
-            BABYLON.Tools.Warn("getInterFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "interFramePerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("interFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getLastFrameDuration = function () {
-            BABYLON.Tools.Warn("getLastFrameDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "lastFramePerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("lastFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getEvaluateActiveMeshesDuration = function () {
-            BABYLON.Tools.Warn("getEvaluateActiveMeshesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "evaluateActiveMeshesDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("evaluateActiveMeshesDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the array of active meshes
          * @returns an array of AbstractMesh
@@ -26569,53 +26509,6 @@ var BABYLON;
         Scene.prototype.getActiveMeshes = function () {
             return this._activeMeshes;
         };
-        /** @hidden */
-        Scene.prototype.getRenderTargetsDuration = function () {
-            BABYLON.Tools.Warn("getRenderTargetsDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        /** @hidden */
-        Scene.prototype.getRenderDuration = function () {
-            BABYLON.Tools.Warn("getRenderDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "renderDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("renderDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getParticlesDuration = function () {
-            BABYLON.Tools.Warn("getParticlesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "particlesDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("particlesDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getSpritesDuration = function () {
-            BABYLON.Tools.Warn("getSpritesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "spriteDuractionPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("spriteDuractionPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the animation ratio (which is 1.0 is the scene renders at 60fps and 2 if the scene renders at 30fps, etc.)
          * @returns a number
@@ -37262,20 +37155,27 @@ var BABYLON;
          * @param flag defines a flag used to determine which parts of the material have to be marked as dirty
          */
         Material.prototype.markAsDirty = function (flag) {
+            if (this.getScene().blockMaterialDirtyMechanism) {
+                return;
+            }
+            Material._DirtyCallbackArray.length = 0;
             if (flag & Material.TextureDirtyFlag) {
-                this._markAllSubMeshesAsTexturesDirty();
+                Material._DirtyCallbackArray.push(Material._TextureDirtyCallBack);
             }
             if (flag & Material.LightDirtyFlag) {
-                this._markAllSubMeshesAsLightsDirty();
+                Material._DirtyCallbackArray.push(Material._LightsDirtyCallBack);
             }
             if (flag & Material.FresnelDirtyFlag) {
-                this._markAllSubMeshesAsFresnelDirty();
+                Material._DirtyCallbackArray.push(Material._FresnelDirtyCallBack);
             }
             if (flag & Material.AttributesDirtyFlag) {
-                this._markAllSubMeshesAsAttributesDirty();
+                Material._DirtyCallbackArray.push(Material._AttributeDirtyCallBack);
             }
             if (flag & Material.MiscDirtyFlag) {
-                this._markAllSubMeshesAsMiscDirty();
+                Material._DirtyCallbackArray.push(Material._MiscDirtyCallBack);
+            }
+            if (Material._DirtyCallbackArray.length) {
+                this._markAllSubMeshesAsDirty(Material._RunDirtyCallBacks);
             }
             this.getScene().resetCachedMaterial();
         };
@@ -37284,13 +37184,17 @@ var BABYLON;
          * @param func defines a function which checks material defines against the submeshes
          */
         Material.prototype._markAllSubMeshesAsDirty = function (func) {
-            for (var _i = 0, _a = this.getScene().meshes; _i < _a.length; _i++) {
-                var mesh = _a[_i];
+            if (this.getScene().blockMaterialDirtyMechanism) {
+                return;
+            }
+            var meshes = this.getScene().meshes;
+            for (var _i = 0, meshes_1 = meshes; _i < meshes_1.length; _i++) {
+                var mesh = meshes_1[_i];
                 if (!mesh.subMeshes) {
                     continue;
                 }
-                for (var _b = 0, _c = mesh.subMeshes; _b < _c.length; _b++) {
-                    var subMesh = _c[_b];
+                for (var _a = 0, _b = mesh.subMeshes; _a < _b.length; _a++) {
+                    var subMesh = _b[_a];
                     if (subMesh.getMaterial() !== this) {
                         continue;
                     }
@@ -37305,55 +37209,49 @@ var BABYLON;
          * Indicates that image processing needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsImageProcessingDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsImageProcessingDirty(); });
+            this._markAllSubMeshesAsDirty(Material._ImageProcessingDirtyCallBack);
         };
         /**
          * Indicates that textures need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsTexturesDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsTexturesDirty(); });
+            this._markAllSubMeshesAsDirty(Material._TextureDirtyCallBack);
         };
         /**
          * Indicates that fresnel needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsFresnelDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsFresnelDirty(); });
+            this._markAllSubMeshesAsDirty(Material._FresnelDirtyCallBack);
         };
         /**
          * Indicates that fresnel and misc need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsFresnelAndMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) {
-                defines.markAsFresnelDirty();
-                defines.markAsMiscDirty();
-            });
+            this._markAllSubMeshesAsDirty(Material._FresnelAndMiscDirtyCallBack);
         };
         /**
          * Indicates that lights need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsLightsDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsLightDirty(); });
+            this._markAllSubMeshesAsDirty(Material._LightsDirtyCallBack);
         };
         /**
          * Indicates that attributes need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsAttributesDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsAttributesDirty(); });
+            this._markAllSubMeshesAsDirty(Material._AttributeDirtyCallBack);
         };
         /**
          * Indicates that misc needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsMiscDirty(); });
+            this._markAllSubMeshesAsDirty(Material._MiscDirtyCallBack);
         };
         /**
          * Indicates that textures and misc need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsTexturesAndMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) {
-                defines.markAsTexturesDirty();
-                defines.markAsMiscDirty();
-            });
+            this._markAllSubMeshesAsDirty(Material._TextureAndMiscDirtyCallBack);
         };
         /**
          * Disposes the material
@@ -37381,8 +37279,8 @@ var BABYLON;
                 }
                 else {
                     var meshes = scene.meshes;
-                    for (var _i = 0, meshes_1 = meshes; _i < meshes_1.length; _i++) {
-                        var mesh = meshes_1[_i];
+                    for (var _i = 0, meshes_2 = meshes; _i < meshes_2.length; _i++) {
+                        var mesh = meshes_2[_i];
                         if (mesh.material === this) {
                             mesh.material = null;
                             this.releaseVertexArrayObject(mesh, forceDisposeEffect);
@@ -37521,6 +37419,27 @@ var BABYLON;
          * The all dirty flag value
          */
         Material.AllDirtyFlag = 31;
+        Material._ImageProcessingDirtyCallBack = function (defines) { return defines.markAsImageProcessingDirty(); };
+        Material._TextureDirtyCallBack = function (defines) { return defines.markAsTexturesDirty(); };
+        Material._FresnelDirtyCallBack = function (defines) { return defines.markAsFresnelDirty(); };
+        Material._MiscDirtyCallBack = function (defines) { return defines.markAsMiscDirty(); };
+        Material._LightsDirtyCallBack = function (defines) { return defines.markAsLightDirty(); };
+        Material._AttributeDirtyCallBack = function (defines) { return defines.markAsAttributesDirty(); };
+        Material._FresnelAndMiscDirtyCallBack = function (defines) {
+            Material._FresnelDirtyCallBack(defines);
+            Material._MiscDirtyCallBack(defines);
+        };
+        Material._TextureAndMiscDirtyCallBack = function (defines) {
+            Material._TextureDirtyCallBack(defines);
+            Material._MiscDirtyCallBack(defines);
+        };
+        Material._DirtyCallbackArray = [];
+        Material._RunDirtyCallBacks = function (defines) {
+            for (var _i = 0, _a = Material._DirtyCallbackArray; _i < _a.length; _i++) {
+                var cb = _a[_i];
+                cb(defines);
+            }
+        };
         __decorate([
             BABYLON.serialize()
         ], Material.prototype, "id", void 0);
@@ -66869,7 +66788,6 @@ var BABYLON;
             _this._started = false;
             _this._stopped = false;
             _this._timeDelta = 0;
-            _this._attributesStrideSize = 21;
             _this._actualFrame = 0;
             _this._rawTextureWidth = 256;
             /**
@@ -67485,6 +67403,8 @@ var BABYLON;
             }
             var engine = this._scene.getEngine();
             var data = new Array();
+            this._attributesStrideSize = 21;
+            this._targetIndex = 0;
             if (!this.isBillboardBased) {
                 this._attributesStrideSize += 3;
             }
@@ -76576,46 +76496,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(ShadowGenerator.prototype, "useVarianceShadowMap", {
-            /**
-             * Gets if the current filter is set to VSM.
-             * DEPRECATED. Should use useExponentialShadowMap instead.
-             */
-            get: function () {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useExponentialShadowMap instead.");
-                return this.useExponentialShadowMap;
-            },
-            /**
-             * Sets the current filter is to VSM.
-             * DEPRECATED. Should use useExponentialShadowMap instead.
-             */
-            set: function (value) {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useExponentialShadowMap instead.");
-                this.useExponentialShadowMap = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(ShadowGenerator.prototype, "useBlurVarianceShadowMap", {
-            /**
-             * Gets if the current filter is set to blurred VSM.
-             * DEPRECATED. Should use useBlurExponentialShadowMap instead.
-             */
-            get: function () {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.");
-                return this.useBlurExponentialShadowMap;
-            },
-            /**
-             * Sets the current filter is to blurred VSM.
-             * DEPRECATED. Should use useBlurExponentialShadowMap instead.
-             */
-            set: function (value) {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.");
-                this.useBlurExponentialShadowMap = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(ShadowGenerator.prototype, "useExponentialShadowMap", {
             /**
              * Gets if the current filter is set to ESM.
@@ -109158,7 +109038,7 @@ var BABYLON;
             this._tmpMatrix = new BABYLON.Matrix();
             this._frameObserver = helper._sessionManager.onXRFrameObservable.add(function () {
                 if (!helper._sessionManager._currentXRFrame || !helper._sessionManager._currentXRFrame.getDevicePose) {
-                    return false;
+                    return;
                 }
                 var xrFrame = helper._sessionManager._currentXRFrame;
                 var inputSources = helper._sessionManager._xrSession.getInputSources();

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.worker.js


+ 55 - 175
dist/preview release/es6.js

@@ -5444,7 +5444,7 @@ var BABYLON;
         };
         /**
          * Returns a new Vector3 set from the index "offset" of the given Float32Array
-         * This function is deprecated.  Use FromArray instead
+         * This function is deprecated. Use FromArray instead
          * @param array defines the source array
          * @param offset defines the offset in the source array
          * @returns the new Vector3
@@ -13203,24 +13203,6 @@ var BABYLON;
         Engine.prototype.getCaps = function () {
             return this._caps;
         };
-        Object.defineProperty(Engine.prototype, "drawCalls", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("drawCalls is deprecated. Please use SceneInstrumentation class");
-                return 0;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine.prototype, "drawCallsPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("drawCallsPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the current depth function
          * @returns a number defining the depth function
@@ -26520,48 +26502,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        /** @hidden */
-        Scene.prototype.getInterFramePerfCounter = function () {
-            BABYLON.Tools.Warn("getInterFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "interFramePerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("interFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getLastFrameDuration = function () {
-            BABYLON.Tools.Warn("getLastFrameDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "lastFramePerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("lastFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getEvaluateActiveMeshesDuration = function () {
-            BABYLON.Tools.Warn("getEvaluateActiveMeshesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "evaluateActiveMeshesDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("evaluateActiveMeshesDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the array of active meshes
          * @returns an array of AbstractMesh
@@ -26569,53 +26509,6 @@ var BABYLON;
         Scene.prototype.getActiveMeshes = function () {
             return this._activeMeshes;
         };
-        /** @hidden */
-        Scene.prototype.getRenderTargetsDuration = function () {
-            BABYLON.Tools.Warn("getRenderTargetsDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        /** @hidden */
-        Scene.prototype.getRenderDuration = function () {
-            BABYLON.Tools.Warn("getRenderDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "renderDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("renderDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getParticlesDuration = function () {
-            BABYLON.Tools.Warn("getParticlesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "particlesDurationPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("particlesDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /** @hidden */
-        Scene.prototype.getSpritesDuration = function () {
-            BABYLON.Tools.Warn("getSpritesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        };
-        Object.defineProperty(Scene.prototype, "spriteDuractionPerfCounter", {
-            /** @hidden */
-            get: function () {
-                BABYLON.Tools.Warn("spriteDuractionPerfCounter is deprecated. Please use SceneInstrumentation class");
-                return null;
-            },
-            enumerable: true,
-            configurable: true
-        });
         /**
          * Gets the animation ratio (which is 1.0 is the scene renders at 60fps and 2 if the scene renders at 30fps, etc.)
          * @returns a number
@@ -37262,20 +37155,27 @@ var BABYLON;
          * @param flag defines a flag used to determine which parts of the material have to be marked as dirty
          */
         Material.prototype.markAsDirty = function (flag) {
+            if (this.getScene().blockMaterialDirtyMechanism) {
+                return;
+            }
+            Material._DirtyCallbackArray.length = 0;
             if (flag & Material.TextureDirtyFlag) {
-                this._markAllSubMeshesAsTexturesDirty();
+                Material._DirtyCallbackArray.push(Material._TextureDirtyCallBack);
             }
             if (flag & Material.LightDirtyFlag) {
-                this._markAllSubMeshesAsLightsDirty();
+                Material._DirtyCallbackArray.push(Material._LightsDirtyCallBack);
             }
             if (flag & Material.FresnelDirtyFlag) {
-                this._markAllSubMeshesAsFresnelDirty();
+                Material._DirtyCallbackArray.push(Material._FresnelDirtyCallBack);
             }
             if (flag & Material.AttributesDirtyFlag) {
-                this._markAllSubMeshesAsAttributesDirty();
+                Material._DirtyCallbackArray.push(Material._AttributeDirtyCallBack);
             }
             if (flag & Material.MiscDirtyFlag) {
-                this._markAllSubMeshesAsMiscDirty();
+                Material._DirtyCallbackArray.push(Material._MiscDirtyCallBack);
+            }
+            if (Material._DirtyCallbackArray.length) {
+                this._markAllSubMeshesAsDirty(Material._RunDirtyCallBacks);
             }
             this.getScene().resetCachedMaterial();
         };
@@ -37284,13 +37184,17 @@ var BABYLON;
          * @param func defines a function which checks material defines against the submeshes
          */
         Material.prototype._markAllSubMeshesAsDirty = function (func) {
-            for (var _i = 0, _a = this.getScene().meshes; _i < _a.length; _i++) {
-                var mesh = _a[_i];
+            if (this.getScene().blockMaterialDirtyMechanism) {
+                return;
+            }
+            var meshes = this.getScene().meshes;
+            for (var _i = 0, meshes_1 = meshes; _i < meshes_1.length; _i++) {
+                var mesh = meshes_1[_i];
                 if (!mesh.subMeshes) {
                     continue;
                 }
-                for (var _b = 0, _c = mesh.subMeshes; _b < _c.length; _b++) {
-                    var subMesh = _c[_b];
+                for (var _a = 0, _b = mesh.subMeshes; _a < _b.length; _a++) {
+                    var subMesh = _b[_a];
                     if (subMesh.getMaterial() !== this) {
                         continue;
                     }
@@ -37305,55 +37209,49 @@ var BABYLON;
          * Indicates that image processing needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsImageProcessingDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsImageProcessingDirty(); });
+            this._markAllSubMeshesAsDirty(Material._ImageProcessingDirtyCallBack);
         };
         /**
          * Indicates that textures need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsTexturesDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsTexturesDirty(); });
+            this._markAllSubMeshesAsDirty(Material._TextureDirtyCallBack);
         };
         /**
          * Indicates that fresnel needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsFresnelDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsFresnelDirty(); });
+            this._markAllSubMeshesAsDirty(Material._FresnelDirtyCallBack);
         };
         /**
          * Indicates that fresnel and misc need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsFresnelAndMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) {
-                defines.markAsFresnelDirty();
-                defines.markAsMiscDirty();
-            });
+            this._markAllSubMeshesAsDirty(Material._FresnelAndMiscDirtyCallBack);
         };
         /**
          * Indicates that lights need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsLightsDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsLightDirty(); });
+            this._markAllSubMeshesAsDirty(Material._LightsDirtyCallBack);
         };
         /**
          * Indicates that attributes need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsAttributesDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsAttributesDirty(); });
+            this._markAllSubMeshesAsDirty(Material._AttributeDirtyCallBack);
         };
         /**
          * Indicates that misc needs to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) { return defines.markAsMiscDirty(); });
+            this._markAllSubMeshesAsDirty(Material._MiscDirtyCallBack);
         };
         /**
          * Indicates that textures and misc need to be re-calculated for all submeshes
          */
         Material.prototype._markAllSubMeshesAsTexturesAndMiscDirty = function () {
-            this._markAllSubMeshesAsDirty(function (defines) {
-                defines.markAsTexturesDirty();
-                defines.markAsMiscDirty();
-            });
+            this._markAllSubMeshesAsDirty(Material._TextureAndMiscDirtyCallBack);
         };
         /**
          * Disposes the material
@@ -37381,8 +37279,8 @@ var BABYLON;
                 }
                 else {
                     var meshes = scene.meshes;
-                    for (var _i = 0, meshes_1 = meshes; _i < meshes_1.length; _i++) {
-                        var mesh = meshes_1[_i];
+                    for (var _i = 0, meshes_2 = meshes; _i < meshes_2.length; _i++) {
+                        var mesh = meshes_2[_i];
                         if (mesh.material === this) {
                             mesh.material = null;
                             this.releaseVertexArrayObject(mesh, forceDisposeEffect);
@@ -37521,6 +37419,27 @@ var BABYLON;
          * The all dirty flag value
          */
         Material.AllDirtyFlag = 31;
+        Material._ImageProcessingDirtyCallBack = function (defines) { return defines.markAsImageProcessingDirty(); };
+        Material._TextureDirtyCallBack = function (defines) { return defines.markAsTexturesDirty(); };
+        Material._FresnelDirtyCallBack = function (defines) { return defines.markAsFresnelDirty(); };
+        Material._MiscDirtyCallBack = function (defines) { return defines.markAsMiscDirty(); };
+        Material._LightsDirtyCallBack = function (defines) { return defines.markAsLightDirty(); };
+        Material._AttributeDirtyCallBack = function (defines) { return defines.markAsAttributesDirty(); };
+        Material._FresnelAndMiscDirtyCallBack = function (defines) {
+            Material._FresnelDirtyCallBack(defines);
+            Material._MiscDirtyCallBack(defines);
+        };
+        Material._TextureAndMiscDirtyCallBack = function (defines) {
+            Material._TextureDirtyCallBack(defines);
+            Material._MiscDirtyCallBack(defines);
+        };
+        Material._DirtyCallbackArray = [];
+        Material._RunDirtyCallBacks = function (defines) {
+            for (var _i = 0, _a = Material._DirtyCallbackArray; _i < _a.length; _i++) {
+                var cb = _a[_i];
+                cb(defines);
+            }
+        };
         __decorate([
             BABYLON.serialize()
         ], Material.prototype, "id", void 0);
@@ -66869,7 +66788,6 @@ var BABYLON;
             _this._started = false;
             _this._stopped = false;
             _this._timeDelta = 0;
-            _this._attributesStrideSize = 21;
             _this._actualFrame = 0;
             _this._rawTextureWidth = 256;
             /**
@@ -67485,6 +67403,8 @@ var BABYLON;
             }
             var engine = this._scene.getEngine();
             var data = new Array();
+            this._attributesStrideSize = 21;
+            this._targetIndex = 0;
             if (!this.isBillboardBased) {
                 this._attributesStrideSize += 3;
             }
@@ -76576,46 +76496,6 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
-        Object.defineProperty(ShadowGenerator.prototype, "useVarianceShadowMap", {
-            /**
-             * Gets if the current filter is set to VSM.
-             * DEPRECATED. Should use useExponentialShadowMap instead.
-             */
-            get: function () {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useExponentialShadowMap instead.");
-                return this.useExponentialShadowMap;
-            },
-            /**
-             * Sets the current filter is to VSM.
-             * DEPRECATED. Should use useExponentialShadowMap instead.
-             */
-            set: function (value) {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useExponentialShadowMap instead.");
-                this.useExponentialShadowMap = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(ShadowGenerator.prototype, "useBlurVarianceShadowMap", {
-            /**
-             * Gets if the current filter is set to blurred VSM.
-             * DEPRECATED. Should use useBlurExponentialShadowMap instead.
-             */
-            get: function () {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.");
-                return this.useBlurExponentialShadowMap;
-            },
-            /**
-             * Sets the current filter is to blurred VSM.
-             * DEPRECATED. Should use useBlurExponentialShadowMap instead.
-             */
-            set: function (value) {
-                BABYLON.Tools.Warn("VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.");
-                this.useBlurExponentialShadowMap = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(ShadowGenerator.prototype, "useExponentialShadowMap", {
             /**
              * Gets if the current filter is set to ESM.
@@ -109158,7 +109038,7 @@ var BABYLON;
             this._tmpMatrix = new BABYLON.Matrix();
             this._frameObserver = helper._sessionManager.onXRFrameObservable.add(function () {
                 if (!helper._sessionManager._currentXRFrame || !helper._sessionManager._currentXRFrame.getDevicePose) {
-                    return false;
+                    return;
                 }
                 var xrFrame = helper._sessionManager._currentXRFrame;
                 var inputSources = helper._sessionManager._xrSession.getInputSources();

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/gui/babylon.gui.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/serializers/babylon.glTF2Serializer.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


+ 92 - 28
dist/preview release/viewer/babylon.viewer.d.ts

@@ -1479,6 +1479,70 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+    export interface IModelConfiguration {
+            id?: string;
+            url?: string;
+            root?: string;
+            file?: string | File;
+            loader?: string;
+            position?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            rotation?: {
+                    x: number;
+                    y: number;
+                    z: number;
+                    w?: number;
+            };
+            scaling?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            parentObjectIndex?: number;
+            castShadow?: boolean;
+            receiveShadows?: boolean;
+            normalize?: boolean | {
+                    center?: boolean;
+                    unitSize?: boolean;
+                    parentIndex?: number;
+            };
+            title?: string;
+            subtitle?: string;
+            thumbnail?: string;
+            animation?: {
+                    autoStart?: boolean | string;
+                    playOnce?: boolean;
+                    autoStartIndex?: number;
+            };
+            entryAnimation?: IModelAnimationConfiguration;
+            exitAnimation?: IModelAnimationConfiguration;
+            material?: {
+                    directEnabled?: boolean;
+                    directIntensity?: number;
+                    emissiveIntensity?: number;
+                    environmentIntensity?: number;
+                    [propName: string]: any;
+            };
+            /**
+                * Rotation offset axis definition
+                */
+            rotationOffsetAxis?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            /**
+                * the offset angle
+                */
+            rotationOffsetAngle?: number;
+            loaderConfiguration?: {
+                    maxLODsToLoad?: number;
+                    progressiveLoading?: boolean;
+            };
+    }
 }
 declare module BabylonViewer {
     /**
@@ -1601,6 +1665,34 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+    /**
+        * Defines an animation to be applied to a model (translation, scale or rotation).
+        */
+    export interface IModelAnimationConfiguration {
+            /**
+                * Time of animation, in seconds
+                */
+            time?: number;
+            /**
+                * Scale to apply
+                */
+            scaling?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            /**
+                * Easing function to apply
+                */
+            easingFunction?: number;
+            /**
+                * An Easing mode to apply to the easing function
+                * See BABYLON.EasingFunction
+                */
+            easingMode?: number;
+    }
+}
+declare module BabylonViewer {
     export class TelemetryLoaderPlugin implements ILoaderPlugin {
         onInit(loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync, model: ViewerModel): void;
         onLoaded(model: ViewerModel): void;
@@ -1906,34 +1998,6 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
-    /**
-        * Defines an animation to be applied to a model (translation, scale or rotation).
-        */
-    export interface IModelAnimationConfiguration {
-            /**
-                * Time of animation, in seconds
-                */
-            time?: number;
-            /**
-                * Scale to apply
-                */
-            scaling?: {
-                    x: number;
-                    y: number;
-                    z: number;
-            };
-            /**
-                * Easing function to apply
-                */
-            easingFunction?: number;
-            /**
-                * An Easing mode to apply to the easing function
-                * See BABYLON.EasingFunction
-                */
-            easingMode?: number;
-    }
-}
-declare module BabylonViewer {
     export interface IObserversConfiguration {
         onEngineInit?: string;
         onSceneInit?: string;

File diff suppressed because it is too large
+ 3 - 3
dist/preview release/viewer/babylon.viewer.js


File diff suppressed because it is too large
+ 5 - 5
dist/preview release/viewer/babylon.viewer.max.js


+ 94 - 30
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -1575,7 +1575,71 @@ declare module 'babylonjs-viewer/managers/sceneManager' {
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/modelConfiguration' {
-    
+    import { IModelAnimationConfiguration } from "babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration";
+    export interface IModelConfiguration {
+            id?: string;
+            url?: string;
+            root?: string;
+            file?: string | File;
+            loader?: string;
+            position?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            rotation?: {
+                    x: number;
+                    y: number;
+                    z: number;
+                    w?: number;
+            };
+            scaling?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            parentObjectIndex?: number;
+            castShadow?: boolean;
+            receiveShadows?: boolean;
+            normalize?: boolean | {
+                    center?: boolean;
+                    unitSize?: boolean;
+                    parentIndex?: number;
+            };
+            title?: string;
+            subtitle?: string;
+            thumbnail?: string;
+            animation?: {
+                    autoStart?: boolean | string;
+                    playOnce?: boolean;
+                    autoStartIndex?: number;
+            };
+            entryAnimation?: IModelAnimationConfiguration;
+            exitAnimation?: IModelAnimationConfiguration;
+            material?: {
+                    directEnabled?: boolean;
+                    directIntensity?: number;
+                    emissiveIntensity?: number;
+                    environmentIntensity?: number;
+                    [propName: string]: any;
+            };
+            /**
+                * Rotation offset axis definition
+                */
+            rotationOffsetAxis?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            /**
+                * the offset angle
+                */
+            rotationOffsetAngle?: number;
+            loaderConfiguration?: {
+                    maxLODsToLoad?: number;
+                    progressiveLoading?: boolean;
+            };
+    }
 }
 
 declare module 'babylonjs-viewer/loader/plugins' {
@@ -1727,6 +1791,35 @@ declare module 'babylonjs-viewer/labs/viewerLabs' {
     }
 }
 
+declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration' {
+    /**
+        * Defines an animation to be applied to a model (translation, scale or rotation).
+        */
+    export interface IModelAnimationConfiguration {
+            /**
+                * Time of animation, in seconds
+                */
+            time?: number;
+            /**
+                * Scale to apply
+                */
+            scaling?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            /**
+                * Easing function to apply
+                */
+            easingFunction?: number;
+            /**
+                * An Easing mode to apply to the easing function
+                * See BABYLON.EasingFunction
+                */
+            easingMode?: number;
+    }
+}
+
 declare module 'babylonjs-viewer/loader/plugins/telemetryLoaderPlugin' {
     import { ILoaderPlugin } from "babylonjs-viewer/loader/plugins/loaderPlugin";
     import { ViewerModel } from "babylonjs-viewer/model/viewerModel";
@@ -2055,35 +2148,6 @@ declare module 'babylonjs-viewer/configuration/interfaces/lightConfiguration' {
     }
 }
 
-declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration' {
-    /**
-        * Defines an animation to be applied to a model (translation, scale or rotation).
-        */
-    export interface IModelAnimationConfiguration {
-            /**
-                * Time of animation, in seconds
-                */
-            time?: number;
-            /**
-                * Scale to apply
-                */
-            scaling?: {
-                    x: number;
-                    y: number;
-                    z: number;
-            };
-            /**
-                * Easing function to apply
-                */
-            easingFunction?: number;
-            /**
-                * An Easing mode to apply to the easing function
-                * See BABYLON.EasingFunction
-                */
-            easingMode?: number;
-    }
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces/observersConfiguration' {
     export interface IObserversConfiguration {
         onEngineInit?: string;

+ 18 - 0
dist/preview release/what's new.md

@@ -77,3 +77,21 @@
 - `scene.database` was renamed to `scene.offlineProvider` ([Deltakosh](https://github.com/deltakosh))
 - `BoundingBox.setWorldMatrix` was removed. `BoundingBox.getWorldMatrix` now returns a `Readonly<Matrix>` ([barroij](https://github.com/barroij))
 - `Matrix`'s accessor `m` and method `toArray` and `asArray` now returns a `Readonly<Float32Array>` as the matrix underlying array is not supposed to be modified manually from the outside of the class ([barroij](https://github.com/barroij))
+- Removed some deprecated (flagged since 3.0) properties and functions ([Deltakosh](https://github.com/deltakosh))
+  - `scene.getInterFramePerfCounter()`: use SceneInstrumentation class instead
+  - `scene.interFramePerfCounter`: use SceneInstrumentation class instead
+  - `scene.getLastFrameDuration()`: use SceneInstrumentation class instead
+  - `scene.lastFramePerfCounter`: use SceneInstrumentation class instead
+  - `scene.getEvaluateActiveMeshesDuration()`: use SceneInstrumentation class instead
+  - `scene.evaluateActiveMeshesDurationPerfCounter`: use SceneInstrumentation class instead
+  - `scene.getRenderTargetsDuration()`: use SceneInstrumentation class instead
+  - `scene.getRenderDuration()`: use SceneInstrumentation class instead
+  - `scene.renderDurationPerfCounter`: use SceneInstrumentation class instead
+  - `scene.getParticlesDuration()`: use SceneInstrumentation class instead
+  - `scene.particlesDurationPerfCounter`: use SceneInstrumentation class instead
+  - `scene.getSpritesDuration()`: use SceneInstrumentation class instead
+  - `scene.spriteDuractionPerfCounter`: use SceneInstrumentation class instead
+  - `engine.drawCalls`: use SceneInstrumentation class instead
+  - `engine.drawCallsPerfCounter`: use SceneInstrumentation class instead
+  - `shadowGenerator.useVarianceShadowMap`: use useExponentialShadowMap instead
+  - `shadowGenerator.useBlurVarianceShadowMap`: use useBlurExponentialShadowMap instead

+ 0 - 12
src/Engine/babylon.engine.ts

@@ -1664,18 +1664,6 @@ module BABYLON {
             return this._caps;
         }
 
-        /** @hidden */
-        public get drawCalls(): number {
-            Tools.Warn("drawCalls is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        }
-
-        /** @hidden */
-        public get drawCallsPerfCounter(): Nullable<PerfCounter> {
-            Tools.Warn("drawCallsPerfCounter is deprecated. Please use SceneInstrumentation class");
-            return null;
-        }
-
         /**
          * Gets the current depth function
          * @returns a number defining the depth function

+ 0 - 34
src/Lights/Shadows/babylon.shadowGenerator.ts

@@ -346,40 +346,6 @@ module BABYLON {
         }
 
         /**
-         * Gets if the current filter is set to VSM.
-         * DEPRECATED. Should use useExponentialShadowMap instead.
-         */
-        public get useVarianceShadowMap(): boolean {
-            Tools.Warn("VSM are now replaced by ESM. Please use useExponentialShadowMap instead.");
-            return this.useExponentialShadowMap;
-        }
-        /**
-         * Sets the current filter is to VSM.
-         * DEPRECATED. Should use useExponentialShadowMap instead.
-         */
-        public set useVarianceShadowMap(value: boolean) {
-            Tools.Warn("VSM are now replaced by ESM. Please use useExponentialShadowMap instead.");
-            this.useExponentialShadowMap = value;
-        }
-
-        /**
-         * Gets if the current filter is set to blurred VSM.
-         * DEPRECATED. Should use useBlurExponentialShadowMap instead.
-         */
-        public get useBlurVarianceShadowMap(): boolean {
-            Tools.Warn("VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.");
-            return this.useBlurExponentialShadowMap;
-        }
-        /**
-         * Sets the current filter is to blurred VSM.
-         * DEPRECATED. Should use useBlurExponentialShadowMap instead.
-         */
-        public set useBlurVarianceShadowMap(value: boolean) {
-            Tools.Warn("VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.");
-            this.useBlurExponentialShadowMap = value;
-        }
-
-        /**
          * Gets if the current filter is set to ESM.
          */
         public get useExponentialShadowMap(): boolean {

+ 1 - 1
src/Math/babylon.math.ts

@@ -2108,7 +2108,7 @@ module BABYLON {
 
         /**
          * Returns a new Vector3 set from the index "offset" of the given Float32Array
-         * This function is deprecated.  Use FromArray instead
+         * This function is deprecated. Use FromArray instead
          * @param array defines the source array
          * @param offset defines the offset in the source array
          * @returns the new Vector3

+ 4 - 82
src/babylon.scene.ts

@@ -545,13 +545,13 @@ module BABYLON {
         private _onPointerDown: (evt: PointerEvent) => void;
         private _onPointerUp: (evt: PointerEvent) => void;
 
-        /** Deprecated. Use onPointerObservable instead */
+        /** Callback called when a pointer move is detected */
         public onPointerMove: (evt: PointerEvent, pickInfo: PickingInfo, type: PointerEventTypes) => void;
-        /** Deprecated. Use onPointerObservable instead */
+        /** Callback called when a pointer down is detected  */
         public onPointerDown: (evt: PointerEvent, pickInfo: PickingInfo, type: PointerEventTypes) => void;
-        /** Deprecated. Use onPointerObservable instead */
+        /** Callback called when a pointer up is detected  */
         public onPointerUp: (evt: PointerEvent, pickInfo: Nullable<PickingInfo>, type: PointerEventTypes) => void;
-        /** Deprecated. Use onPointerObservable instead */
+        /** Callback called when a pointer pick is detected */
         public onPointerPick: (evt: PointerEvent, pickInfo: PickingInfo) => void;
 
         /**
@@ -1439,42 +1439,6 @@ module BABYLON {
             return this._activeBones;
         }
 
-        /** @hidden */
-        public getInterFramePerfCounter(): number {
-            Tools.Warn("getInterFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        }
-
-        /** @hidden */
-        public get interFramePerfCounter(): Nullable<PerfCounter> {
-            Tools.Warn("interFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-            return null;
-        }
-
-        /** @hidden */
-        public getLastFrameDuration(): number {
-            Tools.Warn("getLastFrameDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        }
-
-        /** @hidden */
-        public get lastFramePerfCounter(): Nullable<PerfCounter> {
-            Tools.Warn("lastFramePerfCounter is deprecated. Please use SceneInstrumentation class");
-            return null;
-        }
-
-        /** @hidden */
-        public getEvaluateActiveMeshesDuration(): number {
-            Tools.Warn("getEvaluateActiveMeshesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        }
-
-        /** @hidden */
-        public get evaluateActiveMeshesDurationPerfCounter(): Nullable<PerfCounter> {
-            Tools.Warn("evaluateActiveMeshesDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-            return null;
-        }
-
         /**
          * Gets the array of active meshes
          * @returns an array of AbstractMesh
@@ -1483,48 +1447,6 @@ module BABYLON {
             return this._activeMeshes;
         }
 
-        /** @hidden */
-        public getRenderTargetsDuration(): number {
-            Tools.Warn("getRenderTargetsDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        }
-
-        /** @hidden */
-        public getRenderDuration(): number {
-            Tools.Warn("getRenderDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        }
-
-        /** @hidden */
-        public get renderDurationPerfCounter(): Nullable<PerfCounter> {
-            Tools.Warn("renderDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-            return null;
-        }
-
-        /** @hidden */
-        public getParticlesDuration(): number {
-            Tools.Warn("getParticlesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        }
-
-        /** @hidden */
-        public get particlesDurationPerfCounter(): Nullable<PerfCounter> {
-            Tools.Warn("particlesDurationPerfCounter is deprecated. Please use SceneInstrumentation class");
-            return null;
-        }
-
-        /** @hidden */
-        public getSpritesDuration(): number {
-            Tools.Warn("getSpritesDuration is deprecated. Please use SceneInstrumentation class");
-            return 0;
-        }
-
-        /** @hidden */
-        public get spriteDuractionPerfCounter(): Nullable<PerfCounter> {
-            Tools.Warn("spriteDuractionPerfCounter is deprecated. Please use SceneInstrumentation class");
-            return null;
-        }
-
         /**
          * Gets the animation ratio (which is 1.0 is the scene renders at 60fps and 2 if the scene renders at 30fps, etc.)
          * @returns a number