Browse Source

Merge branch 'master' into physicsConsistency

Trevor Baron 6 years ago
parent
commit
93503adc30
100 changed files with 169722 additions and 5413 deletions
  1. 763 643
      Playground/babylon.d.txt
  2. 4 1
      Tools/Config/config.js
  3. 32 47
      Tools/Config/config.json
  4. 2 2
      Tools/DevLoader/BabylonLoader.js
  5. 1 1
      Tools/Gulp/package.json
  6. 3 2
      Tools/Gulp/tasks/gulpTasks-libraries.js
  7. 3 2
      Tools/Gulp/tasks/gulpTasks-librariesES6.js
  8. 1 1
      Tools/Gulp/tasks/gulpTasks-viewerLibraries.js
  9. 1 1
      Tools/Gulp/tasks/gulpTasks-watchCore.js
  10. 7 8
      Tools/Publisher/tasks/processEs6Packages.js
  11. 2 2
      Tools/Publisher/tasks/processUMDPackages.js
  12. 2 2
      Tools/Publisher/tasks/processUMDViewer.js
  13. 1 1
      Viewer/tests/unit/tsconfig.json
  14. 632 514
      dist/preview release/babylon.d.ts
  15. 2 2
      dist/preview release/babylon.js
  16. 549 152
      dist/preview release/babylon.max.js
  17. 1 1
      dist/preview release/babylon.max.js.map
  18. 56898 3342
      dist/preview release/babylon.module.d.ts
  19. 1 1
      dist/preview release/glTF2Interface/package.json
  20. 139 126
      dist/preview release/gui/babylon.gui.d.ts
  21. 99 65
      dist/preview release/gui/babylon.gui.js
  22. 1 1
      dist/preview release/gui/babylon.gui.js.map
  23. 1 1
      dist/preview release/gui/babylon.gui.min.js
  24. 281 254
      dist/preview release/gui/babylon.gui.module.d.ts
  25. 2 2
      dist/preview release/gui/package.json
  26. 31 0
      dist/preview release/gui/readme-es6.md
  27. 6 6
      dist/preview release/inspector/package.json
  28. 27 0
      dist/preview release/inspector/readme-es6.md
  29. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.js.map
  30. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.js.map
  31. 1 1
      dist/preview release/loaders/babylonjs.loaders.js.map
  32. 3 3
      dist/preview release/loaders/package.json
  33. 24 0
      dist/preview release/loaders/readme-es6.md
  34. 6 6
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  35. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.js.map
  36. 4 4
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  37. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.js.map
  38. 6 6
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  39. 1 1
      dist/preview release/materialsLibrary/babylon.fireMaterial.js.map
  40. 6 6
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  41. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.js.map
  42. 6 6
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  43. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js.map
  44. 6 6
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  45. 1 1
      dist/preview release/materialsLibrary/babylon.gridMaterial.js.map
  46. 6 6
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  47. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js.map
  48. 6 6
      dist/preview release/materialsLibrary/babylon.mixMaterial.js
  49. 1 1
      dist/preview release/materialsLibrary/babylon.mixMaterial.js.map
  50. 6 6
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  51. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.js.map
  52. 6 6
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  53. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js.map
  54. 6 6
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  55. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js.map
  56. 6 6
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  57. 1 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.js.map
  58. 6 6
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  59. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js.map
  60. 6 6
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  61. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js.map
  62. 7 7
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  63. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.js.map
  64. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  65. 47 47
      dist/preview release/materialsLibrary/babylonjs.materials.js
  66. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.js.map
  67. 1 1
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  68. 2 2
      dist/preview release/materialsLibrary/package.json
  69. 30 0
      dist/preview release/materialsLibrary/readme-es6.md
  70. 3 3
      dist/preview release/package.json
  71. 2 2
      dist/preview release/postProcessesLibrary/package.json
  72. 31 0
      dist/preview release/postProcessesLibrary/readme-es6.md
  73. 2 2
      dist/preview release/proceduralTexturesLibrary/package.json
  74. 34 0
      dist/preview release/proceduralTexturesLibrary/readme-es6.md
  75. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.js.map
  76. 1 1
      dist/preview release/serializers/babylonjs.serializers.js.map
  77. 3 3
      dist/preview release/serializers/package.json
  78. 29 0
      dist/preview release/serializers/readme-es6.md
  79. 109391 0
      dist/preview release/viewer/babylon.module.d.ts
  80. 5 1
      dist/preview release/viewer/babylon.viewer.d.ts
  81. 58 38
      dist/preview release/viewer/babylon.viewer.js
  82. 4 4
      dist/preview release/viewer/babylon.viewer.max.js
  83. 6 1
      dist/preview release/viewer/babylon.viewer.module.d.ts
  84. 6 1
      dist/preview release/what's new.md
  85. 6 2
      gui/src/2D/controls/container.ts
  86. 4 1
      gui/src/2D/controls/control.ts
  87. 2 6
      materialsLibrary/src/water/water.fragment.fx
  88. 3 3
      materialsLibrary/test/addfur.js
  89. 2 2
      package.json
  90. 122 0
      readme-es6.md
  91. 21 0
      src/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.ts
  92. 147 0
      src/Cameras/Inputs/followCameraMouseWheelInput.ts
  93. 22 0
      src/Cameras/Inputs/freeCameraDeviceOrientationInput.ts
  94. 22 0
      src/Cameras/Inputs/freeCameraVirtualJoystickInput.ts
  95. 4 0
      src/Cameras/RigModes/index.ts
  96. 8 0
      src/Cameras/RigModes/stereoscopicAnaglyphRigMode.ts
  97. 10 0
      src/Cameras/RigModes/stereoscopicRigMode.ts
  98. 27 0
      src/Cameras/RigModes/vrRigMode.ts
  99. 38 0
      src/Cameras/RigModes/webVRRigMode.ts
  100. 0 0
      src/Cameras/Stereoscopic/anaglyphArcRotateCamera.ts

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


+ 4 - 1
Tools/Config/config.js

@@ -21,6 +21,8 @@ const tempTypingsFileName = tempTypingsAMDFileName.replace(".js", ".d.ts");
 const tempTypingsAMDFilePath = path.join(tempFolder, tempTypingsAMDFileName);
 const tempTypingsFilePath = path.join(tempFolder, tempTypingsFileName);
 
+const tscPath = path.resolve(rootFolder, "node_modules/typescript/bin/tsc");
+
 config.computed = {
     rootFolder,
     tempFolder,
@@ -36,7 +38,8 @@ config.computed = {
     tempTypingsAMDFileName,
     tempTypingsFileName,
     tempTypingsAMDFilePath,
-    tempTypingsFilePath
+    tempTypingsFilePath,
+    tscPath
 }
 
 config.additionalNpmPackages.forEach(package => {

+ 32 - 47
Tools/Config/config.json

@@ -102,29 +102,28 @@
                             "path": "babylonjs/Debug/skeletonViewer",
                             "namespace": "BABYLON.Debug"
                         }
-                    ],
-                    "doNotAppendNamespace": true,
-                    "prependToNamespaceText": "declare module 'babylonjs' { export = BABYLON; }"
+                    ]
                 },
+                "requiredFiles": [
+                    "readme.md"
+                ],
                 "packagesFiles": [
-                    "babylon.d.ts",
+                    "babylon.module.d.ts",
                     "babylon.js",
                     "babylon.max.js",
                     "babylon.max.js.map",
                     "Oimo.js",
                     "readme.md"
                 ],
-                "typings": "babylon.d.ts",
+                "typings": "babylon.module.d.ts",
                 "index": "babylon.js",
                 "dependencies": [],
                 "devDependencies": []
             },
             "es6": {
-                "packageName": "@babylonjs/core"
-            },
-            "requiredFiles": [
-                "readme.md"
-            ]
+                "packageName": "@babylonjs/core",
+                "readme": "readme-es6.md"
+            }
         }
     },
     "materialsLibrary": {
@@ -225,9 +224,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/materials",
-                "requiredFiles": [
-                    "dist/preview release/materialsLibrary/readme.md"
-                ]
+                "readme": "dist/preview release/materialsLibrary/readme-es6.md"
             }
         }
     },
@@ -264,9 +261,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/post-processes",
-                "requiredFiles": [
-                    "dist/preview release/postProcessesLibrary/readme.md"
-                ]
+                "readme": "dist/preview release/postProcessesLibrary/readme-es6.md"
             }
         }
     },
@@ -343,9 +338,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/procedural-textures",
-                "requiredFiles": [
-                    "dist/preview release/proceduralTexturesLibrary/readme.md"
-                ]
+                "readme": "dist/preview release/proceduralTexturesLibrary/readme-es6.md"
             }
         }
     },
@@ -416,9 +409,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/loaders",
-                "requiredFiles": [
-                    "dist/preview release/loaders/readme.md"
-                ]
+                "readme": "dist/preview release/loaders/readme-es6.md"
             }
         }
     },
@@ -476,9 +467,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/serializers",
-                "requiredFiles": [
-                    "dist/preview release/serializers/readme.md"
-                ]
+                "readme": "dist/preview release/serializers/readme-es6.md"
             }
         }
     },
@@ -507,9 +496,7 @@
             },
             "es6": {
                 "packageName": "@babylonjs/gui",
-                "requiredFiles": [
-                    "dist/preview release/gui/readme.md"
-                ]
+                "readme": "dist/preview release/gui/readme-es6.md"
             }
         }
     },
@@ -553,9 +540,7 @@
                     ]
                 },
                 "packageName": "@babylonjs/inspector",
-                "requiredFiles": [
-                    "dist/preview release/inspector/readme.md"
-                ],
+                "readme": "dist/preview release/inspector/readme-es6.md",
                 "packagesFiles": [
                     "babylon.inspector.bundle.max.js",
                     "babylon.inspector.bundle.max.js.map",
@@ -591,7 +576,7 @@
                 "processDeclaration": {
                     "moduleName": "BabylonViewer",
                     "doNotAppendNamespace": true,
-                    "prependText": "/// <reference path=\"./babylon.d.ts\"/>\n/// <reference path=\"./babylon.glTF2Interface.d.ts\"/>\n/// <reference path=\"./babylonjs.loaders.d.ts\"/>\ndeclare module \"babylonjs-loaders\"{ export=BABYLON;}\n",
+                    "prependText": "/// <reference path=\"./babylon.module.d.ts\"/>\n/// <reference path=\"./babylon.glTF2Interface.d.ts\"/>\n/// <reference path=\"./babylonjs.loaders.d.ts\"/>\ndeclare module \"babylonjs-loaders\"{ export=BABYLON;}\n",
                     "importsToRemove": [
                         "pep",
                         "babylonjs-loaders"
@@ -600,7 +585,13 @@
                         "babylonjs": "BABYLON",
                         "babylonjs-loaders": "BABYLON"
                     }
-                }
+                },
+                "requiredFiles": [
+                    "dist/preview release/viewer/readme.md",
+                    "dist/preview release/viewer/package.json",
+                    "dist/preview release/viewer/babylon.viewer.js",
+                    "dist/preview release/viewer/babylon.viewer.max.js"
+                ]
             },
             "outputs": [
                 {
@@ -613,7 +604,7 @@
                             "filename": "babylon.viewer.js",
                             "outputDirectory": "/viewer/",
                             "addBabylonDeclaration": [
-                                "babylon.d.ts",
+                                "babylon.module.d.ts",
                                 "loaders/babylonjs.loaders.d.ts",
                                 "glTF2Interface/babylon.glTF2Interface.d.ts"
                             ]
@@ -634,13 +625,7 @@
                     ]
                 }
             ],
-            "legacyPackageOutputDirectory": "../../../Viewer/build/src/",
-            "requiredFiles": [
-                "dist/preview release/viewer/readme.md",
-                "dist/preview release/viewer/package.json",
-                "dist/preview release/viewer/babylon.viewer.js",
-                "dist/preview release/viewer/babylon.viewer.max.js"
-            ]
+            "legacyPackageOutputDirectory": "../../../Viewer/build/src/"
         }
     },
     "viewer-assets": {
@@ -658,7 +643,11 @@
             "webpack": "../../../Viewer/webpack.assets.config.js",
             "distOutputDirectory": "/viewer/",
             "umd": {
-                "packageName": "babylonjs-viewer-assets"
+                "packageName": "babylonjs-viewer-assets",
+                "requiredFiles": [
+                    "Viewer/assets/readme.md",
+                    "Viewer/assets/package.json"
+                ]
             },
             "dtsBundle": {
                 "name": "babylonjs-viewer-assets",
@@ -676,11 +665,7 @@
                     "minified": true
                 }
             ],
-            "legacyPackageOutputDirectory": "../../../Viewer/build/assets/",
-            "requiredFiles": [
-                "Viewer/assets/readme.md",
-                "Viewer/assets/package.json"
-            ]
+            "legacyPackageOutputDirectory": "../../../Viewer/build/assets/"
         }
     }
 }

+ 2 - 2
Tools/DevLoader/BabylonLoader.js

@@ -192,7 +192,7 @@ var BABYLONDEVTOOLS;
 
         Loader.prototype.loadCoreDev = function() {
             // Es6 core import
-            this.loadESMScript(babylonJSPath + "/.temp/" + localDevES6FolderName + "/core/legacy/legacy.js");
+            this.loadESMScript(babylonJSPath + "/.temp/" + localDevES6FolderName + "/core/Legacy/legacy.js");
         }
 
         Loader.prototype.loadModule = function(moduleName, module) {
@@ -260,4 +260,4 @@ var BABYLONDEVTOOLS;
     var loader = new Loader();
     BABYLONDEVTOOLS.Loader = loader;
 
-})(BABYLONDEVTOOLS || (BABYLONDEVTOOLS = {}))
+})(BABYLONDEVTOOLS || (BABYLONDEVTOOLS = {}))

+ 1 - 1
Tools/Gulp/package.json

@@ -12,4 +12,4 @@
         "install": "cd ../../ && npm install && cd Playground/ && npm install && cd ../Viewer && npm install && cd ../Tools/Gulp/",
         "build": "gulp --max-old-space-size=8192 --tsLintFix"
     }
-}
+}

+ 3 - 2
Tools/Gulp/tasks/gulpTasks-libraries.js

@@ -17,7 +17,8 @@ var del = require("del");
 // Parse Command Line.
 var commandLineOptions = minimist(process.argv.slice(2), {
     boolean: ["noNamespace"],
-    string: ["moduleName"]
+    string: ["moduleName"],
+    string: ["tscPath"]
 });
 
 // Import Build Config
@@ -95,7 +96,7 @@ var buildAMDDTSFiles = function(libraries, settings, cb) {
     let library = libraries[0];
     if (!library.preventLoadLibrary) {
         // Generate DTS the old way...
-        cp.execSync(`tsc --module amd --outFile "${config.computed.tempTypingsAMDFilePath}" --emitDeclarationOnly true`, {
+        cp.execSync(`node "${commandLineOptions.tscPath || config.computed.tscPath}" --module amd --outFile "${config.computed.tempTypingsAMDFilePath}" --emitDeclarationOnly true`, {
             cwd: settings.computed.srcDirectory
         });
     }

+ 3 - 2
Tools/Gulp/tasks/gulpTasks-librariesES6.js

@@ -187,7 +187,7 @@ var build = function(settings, cb) {
         verbose: true
     };
 
-    let command = `tsc --inlineSources --sourceMap true -t es5 -m esNext --outDir "${settings.computed.distES6Directory}"`;
+    let command = `node "${config.computed.tscPath}" --skipLibCheck false --inlineSources --sourceMap true -t es5 -m esNext --outDir "${settings.computed.distES6Directory}"`;
     shelljs.exec(command, options, function(code, stdout, stderr) {
         if (stderr) {
             console.log(stderr);
@@ -216,7 +216,8 @@ var buildWebpack = function(settings, module, cb) {
         verbose: true
     };
 
-    let command = `gulp ${module} --noNamespace --moduleName ${settings.build.es6.packageName}`;
+    let command = `gulp ${module} --noNamespace --moduleName ${settings.build.es6.packageName} --tscPath "${config.computed.tscPath}"`;
+    console.log(command)
     shelljs.exec(command, options, function(code, stdout, stderr) {
         if (stderr) {
             console.log(stderr);

+ 1 - 1
Tools/Gulp/tasks/gulpTasks-viewerLibraries.js

@@ -68,7 +68,7 @@ var buildViewerLibrary = function(library, settings) {
             if (dest.addBabylonDeclaration) {
                 // include the babylon declaration
                 if (dest.addBabylonDeclaration === true) {
-                    dest.addBabylonDeclaration = ["babylon.d.ts"];
+                    dest.addBabylonDeclaration = ["babylon.module.d.ts"];
                 }
                 var decsToAdd = dest.addBabylonDeclaration.map(function(dec) {
                     return config.build.outputDirectory + '/' + dec;

+ 1 - 1
Tools/Gulp/tasks/gulpTasks-watchCore.js

@@ -54,7 +54,7 @@ gulp.task("watchCore", gulp.series("watchCore-buildShaders", function watch() {
         async: true,
         verbose: true
     };
-    shelljs.exec(`tsc --importHelpers false --isolatedModules true --declaration false --target es5 --module es2015 --outDir "${outputDirectory}" -w`, options, function(code, stdout, stderr) {
+    shelljs.exec(`node "${config.computed.tscPath}" --importHelpers false --isolatedModules true --declaration false --target es5 --module es2015 --outDir "${outputDirectory}" -w`, options, function(code, stdout, stderr) {
         if (stderr) {
             console.log(stderr);
         }

+ 7 - 8
Tools/Publisher/tasks/processEs6Packages.js

@@ -32,14 +32,6 @@ function processEs6Packages(version) {
         colorConsole.log("    Copy Dist folder " + distPath.cyan + " to " + packagePath.cyan);
         fs.copySync(distPath, packagePath);
 
-        if (module.build.requiredFiles) {
-            module.build.requiredFiles.forEach(file => {
-                let source = path.join(config.computed.rootFolder, file);
-                let destination = path.join(packagePath, path.basename(file));
-                colorConsole.log("    Copy required file: ", source.cyan, destination.cyan);
-                fs.copySync(source, destination);
-            });
-        }
         if (es6Config.requiredFiles) {
             es6Config.requiredFiles.forEach(file => {
                 let source = path.join(config.computed.rootFolder, file);
@@ -49,6 +41,13 @@ function processEs6Packages(version) {
             });
         }
 
+        if (es6Config.readme) {
+            let source = path.join(config.computed.rootFolder, es6Config.readme);
+            let destination = path.join(packagePath, "readme.md");
+            colorConsole.log("    Copy es6 readme file: ", source.cyan, destination.cyan);
+            fs.copySync(source, destination);
+        }
+
         umdPackageJson.name = es6Config.packageName;
         umdPackageJson.version = version;
         umdPackageJson.main = es6Config.index || "index.js";

+ 2 - 2
Tools/Publisher/tasks/processUMDPackages.js

@@ -32,8 +32,8 @@ function processUMDPackages(version) {
                 outputDirectory = module.computed.distDirectory;
             }
 
-            if (module.build.requiredFiles) {
-                module.build.requiredFiles.forEach(file => {
+            if (module.build.umd.requiredFiles) {
+                module.build.umd.requiredFiles.forEach(file => {
                     let source = path.join(config.computed.rootFolder, file);
                     let destination = path.join(outputDirectory, path.basename(file));
                     colorConsole.log("    Copy required file: ", source.cyan, destination.cyan);

+ 2 - 2
Tools/Publisher/tasks/processUMDViewer.js

@@ -19,8 +19,8 @@ function processUMDViewer(module, version) {
     let projectPath = '../../../Viewer';
     let buildPath = path.resolve(__dirname, projectPath + "/build/src/");
 
-    if (module.build.requiredFiles) {
-        module.build.requiredFiles.forEach(file => {
+    if (module.build.umd.requiredFiles) {
+        module.build.umd.requiredFiles.forEach(file => {
             let source = path.join(config.computed.rootFolder, file);
             let destination = path.join(buildPath, path.basename(file));
             colorConsole.log("    Copy required file: ", source.cyan, destination.cyan);

+ 1 - 1
Viewer/tests/unit/tsconfig.json

@@ -23,7 +23,7 @@
         "rootDir": "../../",
         "paths": {
             "babylonjs": [
-                "../../../../dist/preview release/babylon.d.ts"
+                "../../../../dist/preview release/babylon.module.d.ts"
             ],
             "babylonjs-loaders": [
                 "../../../../dist/preview release/loaders/babylonjs.loaders.module.d.ts"

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


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


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


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


File diff suppressed because it is too large
+ 56898 - 3342
dist/preview release/babylon.module.d.ts


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

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

+ 139 - 126
dist/preview release/gui/babylon.gui.d.ts

@@ -114,6 +114,118 @@ declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
     /**
+     * Class used to transport BABYLON.Vector2 information for pointer events
+     */
+    export class Vector2WithInfo extends BABYLON.Vector2 {
+        /** defines the current mouse button index */
+        buttonIndex: number;
+        /**
+         * Creates a new Vector2WithInfo
+         * @param source defines the vector2 data to transport
+         * @param buttonIndex defines the current mouse button index
+         */
+        constructor(source: BABYLON.Vector2, 
+        /** defines the current mouse button index */
+        buttonIndex?: number);
+    }
+    /** Class used to provide 2D matrix features */
+    export class Matrix2D {
+        /** Gets the internal array of 6 floats used to store matrix data */
+        m: Float32Array;
+        /**
+         * Creates a new matrix
+         * @param m00 defines value for (0, 0)
+         * @param m01 defines value for (0, 1)
+         * @param m10 defines value for (1, 0)
+         * @param m11 defines value for (1, 1)
+         * @param m20 defines value for (2, 0)
+         * @param m21 defines value for (2, 1)
+         */
+        constructor(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number);
+        /**
+         * Fills the matrix from direct values
+         * @param m00 defines value for (0, 0)
+         * @param m01 defines value for (0, 1)
+         * @param m10 defines value for (1, 0)
+         * @param m11 defines value for (1, 1)
+         * @param m20 defines value for (2, 0)
+         * @param m21 defines value for (2, 1)
+         * @returns the current modified matrix
+         */
+        fromValues(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number): Matrix2D;
+        /**
+         * Gets matrix determinant
+         * @returns the determinant
+         */
+        determinant(): number;
+        /**
+         * Inverses the matrix and stores it in a target matrix
+         * @param result defines the target matrix
+         * @returns the current matrix
+         */
+        invertToRef(result: Matrix2D): Matrix2D;
+        /**
+         * Multiplies the current matrix with another one
+         * @param other defines the second operand
+         * @param result defines the target matrix
+         * @returns the current matrix
+         */
+        multiplyToRef(other: Matrix2D, result: Matrix2D): Matrix2D;
+        /**
+         * Applies the current matrix to a set of 2 floats and stores the result in a vector2
+         * @param x defines the x coordinate to transform
+         * @param y defines the x coordinate to transform
+         * @param result defines the target vector2
+         * @returns the current matrix
+         */
+        transformCoordinates(x: number, y: number, result: BABYLON.Vector2): Matrix2D;
+        /**
+         * Creates an identity matrix
+         * @returns a new matrix
+         */
+        static Identity(): Matrix2D;
+        /**
+         * Creates a translation matrix and stores it in a target matrix
+         * @param x defines the x coordinate of the translation
+         * @param y defines the y coordinate of the translation
+         * @param result defines the target matrix
+         */
+        static TranslationToRef(x: number, y: number, result: Matrix2D): void;
+        /**
+         * Creates a scaling matrix and stores it in a target matrix
+         * @param x defines the x coordinate of the scaling
+         * @param y defines the y coordinate of the scaling
+         * @param result defines the target matrix
+         */
+        static ScalingToRef(x: number, y: number, result: Matrix2D): void;
+        /**
+         * Creates a rotation matrix and stores it in a target matrix
+         * @param angle defines the rotation angle
+         * @param result defines the target matrix
+         */
+        static RotationToRef(angle: number, result: Matrix2D): void;
+        private static _TempPreTranslationMatrix;
+        private static _TempPostTranslationMatrix;
+        private static _TempRotationMatrix;
+        private static _TempScalingMatrix;
+        private static _TempCompose0;
+        private static _TempCompose1;
+        private static _TempCompose2;
+        /**
+         * Composes a matrix from translation, rotation, scaling and parent matrix and stores it in a target matrix
+         * @param tx defines the x coordinate of the translation
+         * @param ty defines the y coordinate of the translation
+         * @param angle defines the rotation angle
+         * @param scaleX defines the x coordinate of the scaling
+         * @param scaleY defines the y coordinate of the scaling
+         * @param parentMatrix defines the parent matrix to multiply by (can be null)
+         * @param result defines the target matrix
+         */
+        static ComposeToRef(tx: number, ty: number, angle: number, scaleX: number, scaleY: number, parentMatrix: BABYLON.Nullable<Matrix2D>, result: Matrix2D): void;
+    }
+}
+declare module BABYLON.GUI {
+    /**
      * Class used to store 2D control sizes
      */
     export class Measure {
@@ -155,6 +267,19 @@ declare module BABYLON.GUI {
          */
         copyFromFloats(left: number, top: number, width: number, height: number): void;
         /**
+         * Computes the axis aligned bounding box measure for two given measures
+         * @param a Input measure
+         * @param b Input measure
+         * @param result the resulting bounding measure
+         */
+        static CombineToRef(a: Measure, b: Measure, result: Measure): void;
+        /**
+         * Computes the axis aligned bounding box of the measure after it is modified by a given transform
+         * @param transform the matrix to transform the measure before computing the AABB
+         * @param result the resulting AABB
+         */
+        transformToRef(transform: Matrix2D, result: Measure): void;
+        /**
          * Check equality between this measure and another one
          * @param other defines the other measures
          * @returns true if both measures are equals
@@ -357,20 +482,15 @@ declare module BABYLON.GUI {
          * Gets or sets a boolean indicating if the InvalidateRect optimization should be turned on
          */
         useInvalidateRectOptimization: boolean;
-        private _clearRectangle;
         private _invalidatedRectangle;
         /**
          * Invalidates a rectangle area on the gui texture
-         * @param clearMinX left most position of the rectangle to clear in the texture
-         * @param clearMinY top most position of the rectangle to clear in the texture
-         * @param clearMaxX right most position of the rectangle to clear in the texture
-         * @param clearMaxY bottom most position of the rectangle to clear in the texture
-         * @param minX left most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param minY top most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param maxX right most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param maxY bottom most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
+         * @param invalidMinX left most position of the rectangle to invalidate in the texture
+         * @param invalidMinY top most position of the rectangle to invalidate in the texture
+         * @param invalidMaxX right most position of the rectangle to invalidate in the texture
+         * @param invalidMaxY bottom most position of the rectangle to invalidate in the texture
          */
-        invalidateRect(clearMinX: number, clearMinY: number, clearMaxX: number, clearMaxY: number, minX: number, minY: number, maxX: number, maxY: number): void;
+        invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
         /**
         * Marks the texture as dirty forcing a complete update
         */
@@ -477,118 +597,6 @@ declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
     /**
-     * Class used to transport BABYLON.Vector2 information for pointer events
-     */
-    export class Vector2WithInfo extends BABYLON.Vector2 {
-        /** defines the current mouse button index */
-        buttonIndex: number;
-        /**
-         * Creates a new Vector2WithInfo
-         * @param source defines the vector2 data to transport
-         * @param buttonIndex defines the current mouse button index
-         */
-        constructor(source: BABYLON.Vector2, 
-        /** defines the current mouse button index */
-        buttonIndex?: number);
-    }
-    /** Class used to provide 2D matrix features */
-    export class Matrix2D {
-        /** Gets the internal array of 6 floats used to store matrix data */
-        m: Float32Array;
-        /**
-         * Creates a new matrix
-         * @param m00 defines value for (0, 0)
-         * @param m01 defines value for (0, 1)
-         * @param m10 defines value for (1, 0)
-         * @param m11 defines value for (1, 1)
-         * @param m20 defines value for (2, 0)
-         * @param m21 defines value for (2, 1)
-         */
-        constructor(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number);
-        /**
-         * Fills the matrix from direct values
-         * @param m00 defines value for (0, 0)
-         * @param m01 defines value for (0, 1)
-         * @param m10 defines value for (1, 0)
-         * @param m11 defines value for (1, 1)
-         * @param m20 defines value for (2, 0)
-         * @param m21 defines value for (2, 1)
-         * @returns the current modified matrix
-         */
-        fromValues(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number): Matrix2D;
-        /**
-         * Gets matrix determinant
-         * @returns the determinant
-         */
-        determinant(): number;
-        /**
-         * Inverses the matrix and stores it in a target matrix
-         * @param result defines the target matrix
-         * @returns the current matrix
-         */
-        invertToRef(result: Matrix2D): Matrix2D;
-        /**
-         * Multiplies the current matrix with another one
-         * @param other defines the second operand
-         * @param result defines the target matrix
-         * @returns the current matrix
-         */
-        multiplyToRef(other: Matrix2D, result: Matrix2D): Matrix2D;
-        /**
-         * Applies the current matrix to a set of 2 floats and stores the result in a vector2
-         * @param x defines the x coordinate to transform
-         * @param y defines the x coordinate to transform
-         * @param result defines the target vector2
-         * @returns the current matrix
-         */
-        transformCoordinates(x: number, y: number, result: BABYLON.Vector2): Matrix2D;
-        /**
-         * Creates an identity matrix
-         * @returns a new matrix
-         */
-        static Identity(): Matrix2D;
-        /**
-         * Creates a translation matrix and stores it in a target matrix
-         * @param x defines the x coordinate of the translation
-         * @param y defines the y coordinate of the translation
-         * @param result defines the target matrix
-         */
-        static TranslationToRef(x: number, y: number, result: Matrix2D): void;
-        /**
-         * Creates a scaling matrix and stores it in a target matrix
-         * @param x defines the x coordinate of the scaling
-         * @param y defines the y coordinate of the scaling
-         * @param result defines the target matrix
-         */
-        static ScalingToRef(x: number, y: number, result: Matrix2D): void;
-        /**
-         * Creates a rotation matrix and stores it in a target matrix
-         * @param angle defines the rotation angle
-         * @param result defines the target matrix
-         */
-        static RotationToRef(angle: number, result: Matrix2D): void;
-        private static _TempPreTranslationMatrix;
-        private static _TempPostTranslationMatrix;
-        private static _TempRotationMatrix;
-        private static _TempScalingMatrix;
-        private static _TempCompose0;
-        private static _TempCompose1;
-        private static _TempCompose2;
-        /**
-         * Composes a matrix from translation, rotation, scaling and parent matrix and stores it in a target matrix
-         * @param tx defines the x coordinate of the translation
-         * @param ty defines the y coordinate of the translation
-         * @param angle defines the rotation angle
-         * @param scaleX defines the x coordinate of the scaling
-         * @param scaleY defines the y coordinate of the scaling
-         * @param parentMatrix defines the parent matrix to multiply by (can be null)
-         * @param result defines the target matrix
-         */
-        static ComposeToRef(tx: number, ty: number, angle: number, scaleX: number, scaleY: number, parentMatrix: BABYLON.Nullable<Matrix2D>, result: Matrix2D): void;
-    }
-}
-declare module BABYLON.GUI {
-    /**
      * Root class used for all 2D controls
      * @see http://doc.babylonjs.com/how_to/gui#controls
      */
@@ -637,7 +645,7 @@ declare module BABYLON.GUI {
         /** @hidden */
         _tempParentMeasure: Measure;
         /** @hidden */
-        _tempCurrentMeasure: Measure;
+        _prevCurrentMeasureTransformedIntoGlobalSpace: Measure;
         /** @hidden */
         protected _cachedParentMeasure: Measure;
         private _paddingLeft;
@@ -653,7 +661,8 @@ declare module BABYLON.GUI {
         private _rotation;
         private _transformCenterX;
         private _transformCenterY;
-        private _transformMatrix;
+        /** @hidden */
+        _transformMatrix: Matrix2D;
         /** @hidden */
         protected _invertTransformMatrix: Matrix2D;
         /** @hidden */
@@ -693,7 +702,10 @@ declare module BABYLON.GUI {
         isPointerBlocker: boolean;
         /** Gets or sets a boolean indicating if the control can be focusable */
         isFocusInvisible: boolean;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         clipChildren: boolean;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
@@ -1022,7 +1034,7 @@ declare module BABYLON.GUI {
         /** @hidden */
         _intersectsRect(rect: Measure): boolean;
         /** @hidden */
-        protected invalidateRect(left: number, top: number, right: number, bottom: number): void;
+        protected invalidateRect(): void;
         /** @hidden */
         _markAsDirty(force?: boolean): void;
         /** @hidden */
@@ -1053,6 +1065,7 @@ declare module BABYLON.GUI {
         /** @hidden */
         protected _clipForChildren(context: CanvasRenderingContext2D): void;
         private static _ClipMeasure;
+        private _tmpMeasureA;
         private _clip;
         /** @hidden */
         _render(context: CanvasRenderingContext2D, invalidatedRectangle?: BABYLON.Nullable<Measure>): boolean;

+ 99 - 65
dist/preview release/gui/babylon.gui.js

@@ -592,7 +592,7 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
         */
         _this.premulAlpha = false;
         _this._useInvalidateRectOptimization = true;
-        _this._clearRectangle = null;
+        // Invalidated rectangle which is the combination of all invalidated controls after they have been rotated into absolute position
         _this._invalidatedRectangle = null;
         _this._clearMeasure = new _measure__WEBPACK_IMPORTED_MODULE_4__["Measure"](0, 0, 0, 0);
         /** @hidden */
@@ -885,35 +885,24 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
     });
     /**
      * Invalidates a rectangle area on the gui texture
-     * @param clearMinX left most position of the rectangle to clear in the texture
-     * @param clearMinY top most position of the rectangle to clear in the texture
-     * @param clearMaxX right most position of the rectangle to clear in the texture
-     * @param clearMaxY bottom most position of the rectangle to clear in the texture
-     * @param minX left most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-     * @param minY top most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-     * @param maxX right most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-     * @param maxY bottom most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-     */
-    AdvancedDynamicTexture.prototype.invalidateRect = function (clearMinX, clearMinY, clearMaxX, clearMaxY, minX, minY, maxX, maxY) {
+     * @param invalidMinX left most position of the rectangle to invalidate in the texture
+     * @param invalidMinY top most position of the rectangle to invalidate in the texture
+     * @param invalidMaxX right most position of the rectangle to invalidate in the texture
+     * @param invalidMaxY bottom most position of the rectangle to invalidate in the texture
+     */
+    AdvancedDynamicTexture.prototype.invalidateRect = function (invalidMinX, invalidMinY, invalidMaxX, invalidMaxY) {
         if (!this._useInvalidateRectOptimization) {
             return;
         }
-        if (!this._clearRectangle || !this._invalidatedRectangle) {
-            this._clearRectangle = new _measure__WEBPACK_IMPORTED_MODULE_4__["Measure"](clearMinX, clearMinY, clearMaxX - clearMinX + 1, clearMaxY - clearMinY + 1);
-            this._invalidatedRectangle = new _measure__WEBPACK_IMPORTED_MODULE_4__["Measure"](minX, minY, maxX - minX + 1, maxY - minY + 1);
+        if (!this._invalidatedRectangle) {
+            this._invalidatedRectangle = new _measure__WEBPACK_IMPORTED_MODULE_4__["Measure"](invalidMinX, invalidMinY, invalidMaxX - invalidMinX + 1, invalidMaxY - invalidMinY + 1);
         }
         else {
             // Compute intersection
-            var maxX = Math.ceil(Math.max(this._clearRectangle.left + this._clearRectangle.width - 1, clearMaxX));
-            var maxY = Math.ceil(Math.max(this._clearRectangle.top + this._clearRectangle.height - 1, clearMaxY));
-            this._clearRectangle.left = Math.floor(Math.min(this._clearRectangle.left, clearMinX));
-            this._clearRectangle.top = Math.floor(Math.min(this._clearRectangle.top, clearMinY));
-            this._clearRectangle.width = maxX - this._clearRectangle.left + 1;
-            this._clearRectangle.height = maxY - this._clearRectangle.top + 1;
-            maxX = Math.max(this._invalidatedRectangle.left + this._invalidatedRectangle.width - 1, maxX);
-            maxY = Math.max(this._invalidatedRectangle.top + this._invalidatedRectangle.height - 1, maxY);
-            this._invalidatedRectangle.left = Math.min(this._invalidatedRectangle.left, minX);
-            this._invalidatedRectangle.top = Math.min(this._invalidatedRectangle.top, minY);
+            var maxX = Math.ceil(Math.max(this._invalidatedRectangle.left + this._invalidatedRectangle.width - 1, invalidMaxX));
+            var maxY = Math.ceil(Math.max(this._invalidatedRectangle.top + this._invalidatedRectangle.height - 1, invalidMaxY));
+            this._invalidatedRectangle.left = Math.floor(Math.min(this._invalidatedRectangle.left, invalidMinX));
+            this._invalidatedRectangle.top = Math.floor(Math.min(this._invalidatedRectangle.top, invalidMinY));
             this._invalidatedRectangle.width = maxX - this._invalidatedRectangle.left + 1;
             this._invalidatedRectangle.height = maxY - this._invalidatedRectangle.top + 1;
         }
@@ -1016,7 +1005,7 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
                 this._rootContainer._markAllAsDirty();
             }
         }
-        this.invalidateRect(0, 0, textureSize.width - 1, textureSize.height - 1, 0, 0, textureSize.width - 1, textureSize.height - 1);
+        this.invalidateRect(0, 0, textureSize.width - 1, textureSize.height - 1);
     };
     /** @hidden */
     AdvancedDynamicTexture.prototype._getGlobalViewport = function (scene) {
@@ -1096,8 +1085,8 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
         this.onEndLayoutObservable.notifyObservers(this);
         this._isDirty = false; // Restoring the dirty state that could have been set by controls during layout processing
         // Clear
-        if (this._clearRectangle) {
-            this._clearMeasure.copyFrom(this._clearRectangle);
+        if (this._invalidatedRectangle) {
+            this._clearMeasure.copyFrom(this._invalidatedRectangle);
         }
         else {
             this._clearMeasure.copyFromFloats(0, 0, renderWidth, renderHeight);
@@ -1113,7 +1102,6 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
         this.onBeginRenderObservable.notifyObservers(this);
         this._rootContainer._render(context, this._invalidatedRectangle);
         this.onEndRenderObservable.notifyObservers(this);
-        this._clearRectangle = null;
         this._invalidatedRectangle = null;
     };
     /** @hidden */
@@ -3442,13 +3430,17 @@ var Container = /** @class */ (function (_super) {
     /** @hidden */
     Container.prototype._reOrderControl = function (control) {
         this.removeControl(control);
+        var wasAdded = false;
         for (var index = 0; index < this._children.length; index++) {
             if (this._children[index].zIndex > control.zIndex) {
                 this._children.splice(index, 0, control);
-                return;
+                wasAdded = true;
+                break;
             }
         }
-        this._children.push(control);
+        if (!wasAdded) {
+            this._children.push(control);
+        }
         control.parent = this;
         this._markAsDirty();
     };
@@ -3511,11 +3503,11 @@ var Container = /** @class */ (function (_super) {
     };
     /** @hidden */
     Container.prototype._layout = function (parentMeasure, context) {
-        if (!this.isVisible || this.notRenderable) {
+        if (!this.isDirty && (!this.isVisible || this.notRenderable)) {
             return false;
         }
         if (this._isDirty) {
-            this._tempCurrentMeasure.copyFrom(this._currentMeasure);
+            this._currentMeasure.transformToRef(this._transformMatrix, this._prevCurrentMeasureTransformedIntoGlobalSpace);
         }
         var rebuildCount = 0;
         context.save();
@@ -3560,7 +3552,7 @@ var Container = /** @class */ (function (_super) {
         }
         context.restore();
         if (this._isDirty) {
-            this.invalidateRect(Math.min(this._currentMeasure.left, this._tempCurrentMeasure.left), Math.min(this._currentMeasure.top, this._tempCurrentMeasure.top), Math.max(this._currentMeasure.left + this._currentMeasure.width, this._tempCurrentMeasure.left + this._tempCurrentMeasure.width) - 1, Math.max(this._currentMeasure.top + this._currentMeasure.height, this._tempCurrentMeasure.top + this._tempCurrentMeasure.height) - 1);
+            this.invalidateRect();
             this._isDirty = false;
         }
         return true;
@@ -3579,7 +3571,7 @@ var Container = /** @class */ (function (_super) {
             // Only redraw parts of the screen that are invalidated
             if (invalidatedRectangle) {
                 if (!child._intersectsRect(invalidatedRectangle)) {
-                    // continue;
+                    continue;
                 }
             }
             child._render(context, invalidatedRectangle);
@@ -3666,7 +3658,6 @@ __webpack_require__.r(__webpack_exports__);
 
 
 
-
 /**
  * Root class used for all 2D controls
  * @see http://doc.babylonjs.com/how_to/gui#controls
@@ -3707,7 +3698,7 @@ var Control = /** @class */ (function () {
         /** @hidden */
         this._tempParentMeasure = _measure__WEBPACK_IMPORTED_MODULE_2__["Measure"].Empty();
         /** @hidden */
-        this._tempCurrentMeasure = _measure__WEBPACK_IMPORTED_MODULE_2__["Measure"].Empty();
+        this._prevCurrentMeasureTransformedIntoGlobalSpace = _measure__WEBPACK_IMPORTED_MODULE_2__["Measure"].Empty();
         /** @hidden */
         this._cachedParentMeasure = _measure__WEBPACK_IMPORTED_MODULE_2__["Measure"].Empty();
         this._paddingLeft = new _valueAndUnit__WEBPACK_IMPORTED_MODULE_1__["ValueAndUnit"](0);
@@ -3723,6 +3714,7 @@ var Control = /** @class */ (function () {
         this._rotation = 0;
         this._transformCenterX = 0.5;
         this._transformCenterY = 0.5;
+        /** @hidden */
         this._transformMatrix = _math2D__WEBPACK_IMPORTED_MODULE_3__["Matrix2D"].Identity();
         /** @hidden */
         this._invertTransformMatrix = _math2D__WEBPACK_IMPORTED_MODULE_3__["Matrix2D"].Identity();
@@ -3753,7 +3745,10 @@ var Control = /** @class */ (function () {
         this.isPointerBlocker = false;
         /** Gets or sets a boolean indicating if the control can be focusable */
         this.isFocusInvisible = false;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         this.clipChildren = true;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
@@ -3805,6 +3800,7 @@ var Control = /** @class */ (function () {
          * An event triggered after the control was drawn
          */
         this.onAfterDrawObservable = new babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]();
+        this._tmpMeasureA = new _measure__WEBPACK_IMPORTED_MODULE_2__["Measure"](0, 0, 0, 0);
     }
     Object.defineProperty(Control.prototype, "shadowOffsetX", {
         /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
@@ -3948,7 +3944,6 @@ var Control = /** @class */ (function () {
                 return;
             }
             this._scaleX = value;
-            this._transform();
             this._markAsDirty();
             this._markMatrixAsDirty();
         },
@@ -3967,7 +3962,6 @@ var Control = /** @class */ (function () {
                 return;
             }
             this._scaleY = value;
-            this._transform();
             this._markAsDirty();
             this._markMatrixAsDirty();
         },
@@ -4753,35 +4747,32 @@ var Control = /** @class */ (function () {
     };
     /** @hidden */
     Control.prototype._intersectsRect = function (rect) {
-        if (this._currentMeasure.left >= rect.left + rect.width) {
+        // Rotate the control's current measure into local space and check if it intersects the passed in rectangle
+        this._currentMeasure.transformToRef(this._transformMatrix, this._tmpMeasureA);
+        if (this._tmpMeasureA.left >= rect.left + rect.width) {
             return false;
         }
-        if (this._currentMeasure.top >= rect.top + rect.height) {
+        if (this._tmpMeasureA.top >= rect.top + rect.height) {
             return false;
         }
-        if (this._currentMeasure.left + this._currentMeasure.width <= rect.left) {
+        if (this._tmpMeasureA.left + this._tmpMeasureA.width <= rect.left) {
             return false;
         }
-        if (this._currentMeasure.top + this._currentMeasure.height <= rect.top) {
+        if (this._tmpMeasureA.top + this._tmpMeasureA.height <= rect.top) {
             return false;
         }
         return true;
     };
     /** @hidden */
-    Control.prototype.invalidateRect = function (left, top, right, bottom) {
+    Control.prototype.invalidateRect = function () {
+        this._transform();
         if (this.host && this.host.useInvalidateRectOptimization) {
-            // Compute AABB of transformed container box (eg. to handle rotation and scaling)
-            var rectanglePoints = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Polygon"].Rectangle(left, top, right, bottom);
-            var min = new babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Vector2"](Number.MAX_VALUE, Number.MAX_VALUE);
-            var max = new babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Vector2"](0, 0);
-            for (var i = 0; i < 4; i++) {
-                this._transformMatrix.transformCoordinates(rectanglePoints[i].x, rectanglePoints[i].y, rectanglePoints[i]);
-                min.x = Math.min(min.x, rectanglePoints[i].x);
-                min.y = Math.min(min.y, rectanglePoints[i].y);
-                max.x = Math.max(max.x, rectanglePoints[i].x);
-                max.y = Math.max(max.y, rectanglePoints[i].y);
-            }
-            this.host.invalidateRect(min.x, min.y, max.x, max.y, left, top, right, bottom);
+            // Rotate by transform to get the measure transformed to global space
+            this._currentMeasure.transformToRef(this._transformMatrix, this._tmpMeasureA);
+            // get the boudning box of the current measure and last frames measure in global space and invalidate it
+            // the previous measure is used to properly clear a control that is scaled down
+            _measure__WEBPACK_IMPORTED_MODULE_2__["Measure"].CombineToRef(this._tmpMeasureA, this._prevCurrentMeasureTransformedIntoGlobalSpace, this._tmpMeasureA);
+            this.host.invalidateRect(Math.floor(this._tmpMeasureA.left), Math.floor(this._tmpMeasureA.top), Math.ceil(this._tmpMeasureA.left + this._tmpMeasureA.width), Math.ceil(this._tmpMeasureA.top + this._tmpMeasureA.height));
         }
     };
     /** @hidden */
@@ -4876,11 +4867,11 @@ var Control = /** @class */ (function () {
     };
     /** @hidden */
     Control.prototype._layout = function (parentMeasure, context) {
-        if (!this.isVisible || this.notRenderable) {
+        if (!this.isDirty && (!this.isVisible || this.notRenderable)) {
             return false;
         }
         if (this._isDirty || !this._cachedParentMeasure.isEqualsTo(parentMeasure)) {
-            this._tempCurrentMeasure.copyFrom(this._currentMeasure);
+            this._currentMeasure.transformToRef(this._transformMatrix, this._prevCurrentMeasureTransformedIntoGlobalSpace);
             context.save();
             this._applyStates(context);
             var rebuildCount = 0;
@@ -4893,7 +4884,7 @@ var Control = /** @class */ (function () {
                 babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Logger"].Error("Layout cycle detected in GUI (Control name=" + this.name + ", uniqueId=" + this.uniqueId + ")");
             }
             context.restore();
-            this.invalidateRect(Math.min(this._currentMeasure.left, this._tempCurrentMeasure.left), Math.min(this._currentMeasure.top, this._tempCurrentMeasure.top), Math.max(this._currentMeasure.left + this._currentMeasure.width, this._tempCurrentMeasure.left + this._tempCurrentMeasure.width), Math.max(this._currentMeasure.top + this._currentMeasure.height, this._tempCurrentMeasure.top + this._tempCurrentMeasure.height));
+            this.invalidateRect();
             this._evaluateClippingState(parentMeasure);
         }
         this._wasDirty = this._isDirty;
@@ -5047,12 +5038,15 @@ var Control = /** @class */ (function () {
         context.beginPath();
         Control._ClipMeasure.copyFrom(this._currentMeasure);
         if (invalidatedRectangle) {
-            var right = Math.min(invalidatedRectangle.left + invalidatedRectangle.width, this._currentMeasure.left + this._currentMeasure.width);
-            var bottom = Math.min(invalidatedRectangle.top + invalidatedRectangle.height, this._currentMeasure.top + this._currentMeasure.height);
-            Control._ClipMeasure.left = Math.max(invalidatedRectangle.left, this._currentMeasure.left);
-            Control._ClipMeasure.top = Math.max(invalidatedRectangle.top, this._currentMeasure.top);
-            Control._ClipMeasure.width = right - Control._ClipMeasure.left;
-            Control._ClipMeasure.height = bottom - Control._ClipMeasure.top;
+            // Rotate the invalidated rect into the control's space
+            invalidatedRectangle.transformToRef(this._invertTransformMatrix, this._tmpMeasureA);
+            // Get the intersection of the rect in context space and the current context
+            var intersection = new _measure__WEBPACK_IMPORTED_MODULE_2__["Measure"](0, 0, 0, 0);
+            intersection.left = Math.max(this._tmpMeasureA.left, this._currentMeasure.left);
+            intersection.top = Math.max(this._tmpMeasureA.top, this._currentMeasure.top);
+            intersection.width = Math.min(this._tmpMeasureA.left + this._tmpMeasureA.width, this._currentMeasure.left + this._currentMeasure.width) - intersection.left;
+            intersection.height = Math.min(this._tmpMeasureA.top + this._tmpMeasureA.height, this._currentMeasure.top + this._currentMeasure.height) - intersection.top;
+            Control._ClipMeasure.copyFrom(intersection);
         }
         if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {
             var shadowOffsetX = this.shadowOffsetX;
@@ -12115,6 +12109,9 @@ var Matrix2D = /** @class */ (function () {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Measure", function() { return Measure; });
+/* harmony import */ var babylonjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs */ "babylonjs/Misc/observable");
+/* harmony import */ var babylonjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs__WEBPACK_IMPORTED_MODULE_0__);
+
 /**
  * Class used to store 2D control sizes
  */
@@ -12164,6 +12161,43 @@ var Measure = /** @class */ (function () {
         this.height = height;
     };
     /**
+     * Computes the axis aligned bounding box measure for two given measures
+     * @param a Input measure
+     * @param b Input measure
+     * @param result the resulting bounding measure
+     */
+    Measure.CombineToRef = function (a, b, result) {
+        var left = Math.min(a.left, b.left);
+        var top = Math.min(a.top, b.top);
+        var right = Math.max(a.left + a.width, b.left + b.width);
+        var bottom = Math.max(a.top + a.height, b.top + b.height);
+        result.left = left;
+        result.top = top;
+        result.width = right - left;
+        result.height = bottom - top;
+    };
+    /**
+     * Computes the axis aligned bounding box of the measure after it is modified by a given transform
+     * @param transform the matrix to transform the measure before computing the AABB
+     * @param result the resulting AABB
+     */
+    Measure.prototype.transformToRef = function (transform, result) {
+        var rectanglePoints = babylonjs__WEBPACK_IMPORTED_MODULE_0__["Polygon"].Rectangle(this.left, this.top, this.left + this.width, this.top + this.height);
+        var min = new babylonjs__WEBPACK_IMPORTED_MODULE_0__["Vector2"](Number.MAX_VALUE, Number.MAX_VALUE);
+        var max = new babylonjs__WEBPACK_IMPORTED_MODULE_0__["Vector2"](0, 0);
+        for (var i = 0; i < 4; i++) {
+            transform.transformCoordinates(rectanglePoints[i].x, rectanglePoints[i].y, rectanglePoints[i]);
+            min.x = Math.floor(Math.min(min.x, rectanglePoints[i].x));
+            min.y = Math.floor(Math.min(min.y, rectanglePoints[i].y));
+            max.x = Math.ceil(Math.max(max.x, rectanglePoints[i].x));
+            max.y = Math.ceil(Math.max(max.y, rectanglePoints[i].y));
+        }
+        result.left = min.x;
+        result.top = min.y;
+        result.width = max.x - min.x;
+        result.height = max.y - min.y;
+    };
+    /**
      * Check equality between this measure and another one
      * @param other defines the other measures
      * @returns true if both measures are equals

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


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


+ 281 - 254
dist/preview release/gui/babylon.gui.module.d.ts

@@ -117,7 +117,122 @@ declare module "babylonjs-gui/2D/style" {
         dispose(): void;
     }
 }
+declare module "babylonjs-gui/2D/math2D" {
+    import { Nullable } from "babylonjs/types";
+    import { Vector2 } from "babylonjs/Maths/math";
+    /**
+     * Class used to transport Vector2 information for pointer events
+     */
+    export class Vector2WithInfo extends Vector2 {
+        /** defines the current mouse button index */
+        buttonIndex: number;
+        /**
+         * Creates a new Vector2WithInfo
+         * @param source defines the vector2 data to transport
+         * @param buttonIndex defines the current mouse button index
+         */
+        constructor(source: Vector2, 
+        /** defines the current mouse button index */
+        buttonIndex?: number);
+    }
+    /** Class used to provide 2D matrix features */
+    export class Matrix2D {
+        /** Gets the internal array of 6 floats used to store matrix data */
+        m: Float32Array;
+        /**
+         * Creates a new matrix
+         * @param m00 defines value for (0, 0)
+         * @param m01 defines value for (0, 1)
+         * @param m10 defines value for (1, 0)
+         * @param m11 defines value for (1, 1)
+         * @param m20 defines value for (2, 0)
+         * @param m21 defines value for (2, 1)
+         */
+        constructor(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number);
+        /**
+         * Fills the matrix from direct values
+         * @param m00 defines value for (0, 0)
+         * @param m01 defines value for (0, 1)
+         * @param m10 defines value for (1, 0)
+         * @param m11 defines value for (1, 1)
+         * @param m20 defines value for (2, 0)
+         * @param m21 defines value for (2, 1)
+         * @returns the current modified matrix
+         */
+        fromValues(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number): Matrix2D;
+        /**
+         * Gets matrix determinant
+         * @returns the determinant
+         */
+        determinant(): number;
+        /**
+         * Inverses the matrix and stores it in a target matrix
+         * @param result defines the target matrix
+         * @returns the current matrix
+         */
+        invertToRef(result: Matrix2D): Matrix2D;
+        /**
+         * Multiplies the current matrix with another one
+         * @param other defines the second operand
+         * @param result defines the target matrix
+         * @returns the current matrix
+         */
+        multiplyToRef(other: Matrix2D, result: Matrix2D): Matrix2D;
+        /**
+         * Applies the current matrix to a set of 2 floats and stores the result in a vector2
+         * @param x defines the x coordinate to transform
+         * @param y defines the x coordinate to transform
+         * @param result defines the target vector2
+         * @returns the current matrix
+         */
+        transformCoordinates(x: number, y: number, result: Vector2): Matrix2D;
+        /**
+         * Creates an identity matrix
+         * @returns a new matrix
+         */
+        static Identity(): Matrix2D;
+        /**
+         * Creates a translation matrix and stores it in a target matrix
+         * @param x defines the x coordinate of the translation
+         * @param y defines the y coordinate of the translation
+         * @param result defines the target matrix
+         */
+        static TranslationToRef(x: number, y: number, result: Matrix2D): void;
+        /**
+         * Creates a scaling matrix and stores it in a target matrix
+         * @param x defines the x coordinate of the scaling
+         * @param y defines the y coordinate of the scaling
+         * @param result defines the target matrix
+         */
+        static ScalingToRef(x: number, y: number, result: Matrix2D): void;
+        /**
+         * Creates a rotation matrix and stores it in a target matrix
+         * @param angle defines the rotation angle
+         * @param result defines the target matrix
+         */
+        static RotationToRef(angle: number, result: Matrix2D): void;
+        private static _TempPreTranslationMatrix;
+        private static _TempPostTranslationMatrix;
+        private static _TempRotationMatrix;
+        private static _TempScalingMatrix;
+        private static _TempCompose0;
+        private static _TempCompose1;
+        private static _TempCompose2;
+        /**
+         * Composes a matrix from translation, rotation, scaling and parent matrix and stores it in a target matrix
+         * @param tx defines the x coordinate of the translation
+         * @param ty defines the y coordinate of the translation
+         * @param angle defines the rotation angle
+         * @param scaleX defines the x coordinate of the scaling
+         * @param scaleY defines the y coordinate of the scaling
+         * @param parentMatrix defines the parent matrix to multiply by (can be null)
+         * @param result defines the target matrix
+         */
+        static ComposeToRef(tx: number, ty: number, angle: number, scaleX: number, scaleY: number, parentMatrix: Nullable<Matrix2D>, result: Matrix2D): void;
+    }
+}
 declare module "babylonjs-gui/2D/measure" {
+    import { Matrix2D } from "babylonjs-gui/2D/math2D";
     /**
      * Class used to store 2D control sizes
      */
@@ -160,6 +275,19 @@ declare module "babylonjs-gui/2D/measure" {
          */
         copyFromFloats(left: number, top: number, width: number, height: number): void;
         /**
+         * Computes the axis aligned bounding box measure for two given measures
+         * @param a Input measure
+         * @param b Input measure
+         * @param result the resulting bounding measure
+         */
+        static CombineToRef(a: Measure, b: Measure, result: Measure): void;
+        /**
+         * Computes the axis aligned bounding box of the measure after it is modified by a given transform
+         * @param transform the matrix to transform the measure before computing the AABB
+         * @param result the resulting AABB
+         */
+        transformToRef(transform: Matrix2D, result: Measure): void;
+        /**
          * Check equality between this measure and another one
          * @param other defines the other measures
          * @returns true if both measures are equals
@@ -373,20 +501,15 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
          * Gets or sets a boolean indicating if the InvalidateRect optimization should be turned on
          */
         useInvalidateRectOptimization: boolean;
-        private _clearRectangle;
         private _invalidatedRectangle;
         /**
          * Invalidates a rectangle area on the gui texture
-         * @param clearMinX left most position of the rectangle to clear in the texture
-         * @param clearMinY top most position of the rectangle to clear in the texture
-         * @param clearMaxX right most position of the rectangle to clear in the texture
-         * @param clearMaxY bottom most position of the rectangle to clear in the texture
-         * @param minX left most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param minY top most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param maxX right most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param maxY bottom most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
+         * @param invalidMinX left most position of the rectangle to invalidate in the texture
+         * @param invalidMinY top most position of the rectangle to invalidate in the texture
+         * @param invalidMaxX right most position of the rectangle to invalidate in the texture
+         * @param invalidMaxY bottom most position of the rectangle to invalidate in the texture
          */
-        invalidateRect(clearMinX: number, clearMinY: number, clearMaxX: number, clearMaxY: number, minX: number, minY: number, maxX: number, maxY: number): void;
+        invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
         /**
         * Marks the texture as dirty forcing a complete update
         */
@@ -491,120 +614,6 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
         static CreateFullscreenUI(name: string, foreground?: boolean, scene?: Nullable<Scene>, sampling?: number): AdvancedDynamicTexture;
     }
 }
-declare module "babylonjs-gui/2D/math2D" {
-    import { Nullable } from "babylonjs/types";
-    import { Vector2 } from "babylonjs/Maths/math";
-    /**
-     * Class used to transport Vector2 information for pointer events
-     */
-    export class Vector2WithInfo extends Vector2 {
-        /** defines the current mouse button index */
-        buttonIndex: number;
-        /**
-         * Creates a new Vector2WithInfo
-         * @param source defines the vector2 data to transport
-         * @param buttonIndex defines the current mouse button index
-         */
-        constructor(source: Vector2, 
-        /** defines the current mouse button index */
-        buttonIndex?: number);
-    }
-    /** Class used to provide 2D matrix features */
-    export class Matrix2D {
-        /** Gets the internal array of 6 floats used to store matrix data */
-        m: Float32Array;
-        /**
-         * Creates a new matrix
-         * @param m00 defines value for (0, 0)
-         * @param m01 defines value for (0, 1)
-         * @param m10 defines value for (1, 0)
-         * @param m11 defines value for (1, 1)
-         * @param m20 defines value for (2, 0)
-         * @param m21 defines value for (2, 1)
-         */
-        constructor(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number);
-        /**
-         * Fills the matrix from direct values
-         * @param m00 defines value for (0, 0)
-         * @param m01 defines value for (0, 1)
-         * @param m10 defines value for (1, 0)
-         * @param m11 defines value for (1, 1)
-         * @param m20 defines value for (2, 0)
-         * @param m21 defines value for (2, 1)
-         * @returns the current modified matrix
-         */
-        fromValues(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number): Matrix2D;
-        /**
-         * Gets matrix determinant
-         * @returns the determinant
-         */
-        determinant(): number;
-        /**
-         * Inverses the matrix and stores it in a target matrix
-         * @param result defines the target matrix
-         * @returns the current matrix
-         */
-        invertToRef(result: Matrix2D): Matrix2D;
-        /**
-         * Multiplies the current matrix with another one
-         * @param other defines the second operand
-         * @param result defines the target matrix
-         * @returns the current matrix
-         */
-        multiplyToRef(other: Matrix2D, result: Matrix2D): Matrix2D;
-        /**
-         * Applies the current matrix to a set of 2 floats and stores the result in a vector2
-         * @param x defines the x coordinate to transform
-         * @param y defines the x coordinate to transform
-         * @param result defines the target vector2
-         * @returns the current matrix
-         */
-        transformCoordinates(x: number, y: number, result: Vector2): Matrix2D;
-        /**
-         * Creates an identity matrix
-         * @returns a new matrix
-         */
-        static Identity(): Matrix2D;
-        /**
-         * Creates a translation matrix and stores it in a target matrix
-         * @param x defines the x coordinate of the translation
-         * @param y defines the y coordinate of the translation
-         * @param result defines the target matrix
-         */
-        static TranslationToRef(x: number, y: number, result: Matrix2D): void;
-        /**
-         * Creates a scaling matrix and stores it in a target matrix
-         * @param x defines the x coordinate of the scaling
-         * @param y defines the y coordinate of the scaling
-         * @param result defines the target matrix
-         */
-        static ScalingToRef(x: number, y: number, result: Matrix2D): void;
-        /**
-         * Creates a rotation matrix and stores it in a target matrix
-         * @param angle defines the rotation angle
-         * @param result defines the target matrix
-         */
-        static RotationToRef(angle: number, result: Matrix2D): void;
-        private static _TempPreTranslationMatrix;
-        private static _TempPostTranslationMatrix;
-        private static _TempRotationMatrix;
-        private static _TempScalingMatrix;
-        private static _TempCompose0;
-        private static _TempCompose1;
-        private static _TempCompose2;
-        /**
-         * Composes a matrix from translation, rotation, scaling and parent matrix and stores it in a target matrix
-         * @param tx defines the x coordinate of the translation
-         * @param ty defines the y coordinate of the translation
-         * @param angle defines the rotation angle
-         * @param scaleX defines the x coordinate of the scaling
-         * @param scaleY defines the y coordinate of the scaling
-         * @param parentMatrix defines the parent matrix to multiply by (can be null)
-         * @param result defines the target matrix
-         */
-        static ComposeToRef(tx: number, ty: number, angle: number, scaleX: number, scaleY: number, parentMatrix: Nullable<Matrix2D>, result: Matrix2D): void;
-    }
-}
 declare module "babylonjs-gui/2D/controls/control" {
     import { Nullable } from "babylonjs/types";
     import { Observable } from "babylonjs/Misc/observable";
@@ -666,7 +675,7 @@ declare module "babylonjs-gui/2D/controls/control" {
         /** @hidden */
         _tempParentMeasure: Measure;
         /** @hidden */
-        _tempCurrentMeasure: Measure;
+        _prevCurrentMeasureTransformedIntoGlobalSpace: Measure;
         /** @hidden */
         protected _cachedParentMeasure: Measure;
         private _paddingLeft;
@@ -682,7 +691,8 @@ declare module "babylonjs-gui/2D/controls/control" {
         private _rotation;
         private _transformCenterX;
         private _transformCenterY;
-        private _transformMatrix;
+        /** @hidden */
+        _transformMatrix: Matrix2D;
         /** @hidden */
         protected _invertTransformMatrix: Matrix2D;
         /** @hidden */
@@ -722,7 +732,10 @@ declare module "babylonjs-gui/2D/controls/control" {
         isPointerBlocker: boolean;
         /** Gets or sets a boolean indicating if the control can be focusable */
         isFocusInvisible: boolean;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         clipChildren: boolean;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
@@ -1051,7 +1064,7 @@ declare module "babylonjs-gui/2D/controls/control" {
         /** @hidden */
         _intersectsRect(rect: Measure): boolean;
         /** @hidden */
-        protected invalidateRect(left: number, top: number, right: number, bottom: number): void;
+        protected invalidateRect(): void;
         /** @hidden */
         _markAsDirty(force?: boolean): void;
         /** @hidden */
@@ -1082,6 +1095,7 @@ declare module "babylonjs-gui/2D/controls/control" {
         /** @hidden */
         protected _clipForChildren(context: CanvasRenderingContext2D): void;
         private static _ClipMeasure;
+        private _tmpMeasureA;
         private _clip;
         /** @hidden */
         _render(context: CanvasRenderingContext2D, invalidatedRectangle?: Nullable<Measure>): boolean;
@@ -3940,6 +3954,118 @@ declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
     /**
+     * Class used to transport BABYLON.Vector2 information for pointer events
+     */
+    export class Vector2WithInfo extends BABYLON.Vector2 {
+        /** defines the current mouse button index */
+        buttonIndex: number;
+        /**
+         * Creates a new Vector2WithInfo
+         * @param source defines the vector2 data to transport
+         * @param buttonIndex defines the current mouse button index
+         */
+        constructor(source: BABYLON.Vector2, 
+        /** defines the current mouse button index */
+        buttonIndex?: number);
+    }
+    /** Class used to provide 2D matrix features */
+    export class Matrix2D {
+        /** Gets the internal array of 6 floats used to store matrix data */
+        m: Float32Array;
+        /**
+         * Creates a new matrix
+         * @param m00 defines value for (0, 0)
+         * @param m01 defines value for (0, 1)
+         * @param m10 defines value for (1, 0)
+         * @param m11 defines value for (1, 1)
+         * @param m20 defines value for (2, 0)
+         * @param m21 defines value for (2, 1)
+         */
+        constructor(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number);
+        /**
+         * Fills the matrix from direct values
+         * @param m00 defines value for (0, 0)
+         * @param m01 defines value for (0, 1)
+         * @param m10 defines value for (1, 0)
+         * @param m11 defines value for (1, 1)
+         * @param m20 defines value for (2, 0)
+         * @param m21 defines value for (2, 1)
+         * @returns the current modified matrix
+         */
+        fromValues(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number): Matrix2D;
+        /**
+         * Gets matrix determinant
+         * @returns the determinant
+         */
+        determinant(): number;
+        /**
+         * Inverses the matrix and stores it in a target matrix
+         * @param result defines the target matrix
+         * @returns the current matrix
+         */
+        invertToRef(result: Matrix2D): Matrix2D;
+        /**
+         * Multiplies the current matrix with another one
+         * @param other defines the second operand
+         * @param result defines the target matrix
+         * @returns the current matrix
+         */
+        multiplyToRef(other: Matrix2D, result: Matrix2D): Matrix2D;
+        /**
+         * Applies the current matrix to a set of 2 floats and stores the result in a vector2
+         * @param x defines the x coordinate to transform
+         * @param y defines the x coordinate to transform
+         * @param result defines the target vector2
+         * @returns the current matrix
+         */
+        transformCoordinates(x: number, y: number, result: BABYLON.Vector2): Matrix2D;
+        /**
+         * Creates an identity matrix
+         * @returns a new matrix
+         */
+        static Identity(): Matrix2D;
+        /**
+         * Creates a translation matrix and stores it in a target matrix
+         * @param x defines the x coordinate of the translation
+         * @param y defines the y coordinate of the translation
+         * @param result defines the target matrix
+         */
+        static TranslationToRef(x: number, y: number, result: Matrix2D): void;
+        /**
+         * Creates a scaling matrix and stores it in a target matrix
+         * @param x defines the x coordinate of the scaling
+         * @param y defines the y coordinate of the scaling
+         * @param result defines the target matrix
+         */
+        static ScalingToRef(x: number, y: number, result: Matrix2D): void;
+        /**
+         * Creates a rotation matrix and stores it in a target matrix
+         * @param angle defines the rotation angle
+         * @param result defines the target matrix
+         */
+        static RotationToRef(angle: number, result: Matrix2D): void;
+        private static _TempPreTranslationMatrix;
+        private static _TempPostTranslationMatrix;
+        private static _TempRotationMatrix;
+        private static _TempScalingMatrix;
+        private static _TempCompose0;
+        private static _TempCompose1;
+        private static _TempCompose2;
+        /**
+         * Composes a matrix from translation, rotation, scaling and parent matrix and stores it in a target matrix
+         * @param tx defines the x coordinate of the translation
+         * @param ty defines the y coordinate of the translation
+         * @param angle defines the rotation angle
+         * @param scaleX defines the x coordinate of the scaling
+         * @param scaleY defines the y coordinate of the scaling
+         * @param parentMatrix defines the parent matrix to multiply by (can be null)
+         * @param result defines the target matrix
+         */
+        static ComposeToRef(tx: number, ty: number, angle: number, scaleX: number, scaleY: number, parentMatrix: BABYLON.Nullable<Matrix2D>, result: Matrix2D): void;
+    }
+}
+declare module BABYLON.GUI {
+    /**
      * Class used to store 2D control sizes
      */
     export class Measure {
@@ -3981,6 +4107,19 @@ declare module BABYLON.GUI {
          */
         copyFromFloats(left: number, top: number, width: number, height: number): void;
         /**
+         * Computes the axis aligned bounding box measure for two given measures
+         * @param a Input measure
+         * @param b Input measure
+         * @param result the resulting bounding measure
+         */
+        static CombineToRef(a: Measure, b: Measure, result: Measure): void;
+        /**
+         * Computes the axis aligned bounding box of the measure after it is modified by a given transform
+         * @param transform the matrix to transform the measure before computing the AABB
+         * @param result the resulting AABB
+         */
+        transformToRef(transform: Matrix2D, result: Measure): void;
+        /**
          * Check equality between this measure and another one
          * @param other defines the other measures
          * @returns true if both measures are equals
@@ -4183,20 +4322,15 @@ declare module BABYLON.GUI {
          * Gets or sets a boolean indicating if the InvalidateRect optimization should be turned on
          */
         useInvalidateRectOptimization: boolean;
-        private _clearRectangle;
         private _invalidatedRectangle;
         /**
          * Invalidates a rectangle area on the gui texture
-         * @param clearMinX left most position of the rectangle to clear in the texture
-         * @param clearMinY top most position of the rectangle to clear in the texture
-         * @param clearMaxX right most position of the rectangle to clear in the texture
-         * @param clearMaxY bottom most position of the rectangle to clear in the texture
-         * @param minX left most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param minY top most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param maxX right most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
-         * @param maxY bottom most position of the rectangle to invalidate in absolute coordinates (not taking in account local transformation)
+         * @param invalidMinX left most position of the rectangle to invalidate in the texture
+         * @param invalidMinY top most position of the rectangle to invalidate in the texture
+         * @param invalidMaxX right most position of the rectangle to invalidate in the texture
+         * @param invalidMaxY bottom most position of the rectangle to invalidate in the texture
          */
-        invalidateRect(clearMinX: number, clearMinY: number, clearMaxX: number, clearMaxY: number, minX: number, minY: number, maxX: number, maxY: number): void;
+        invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
         /**
         * Marks the texture as dirty forcing a complete update
         */
@@ -4303,118 +4437,6 @@ declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
     /**
-     * Class used to transport BABYLON.Vector2 information for pointer events
-     */
-    export class Vector2WithInfo extends BABYLON.Vector2 {
-        /** defines the current mouse button index */
-        buttonIndex: number;
-        /**
-         * Creates a new Vector2WithInfo
-         * @param source defines the vector2 data to transport
-         * @param buttonIndex defines the current mouse button index
-         */
-        constructor(source: BABYLON.Vector2, 
-        /** defines the current mouse button index */
-        buttonIndex?: number);
-    }
-    /** Class used to provide 2D matrix features */
-    export class Matrix2D {
-        /** Gets the internal array of 6 floats used to store matrix data */
-        m: Float32Array;
-        /**
-         * Creates a new matrix
-         * @param m00 defines value for (0, 0)
-         * @param m01 defines value for (0, 1)
-         * @param m10 defines value for (1, 0)
-         * @param m11 defines value for (1, 1)
-         * @param m20 defines value for (2, 0)
-         * @param m21 defines value for (2, 1)
-         */
-        constructor(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number);
-        /**
-         * Fills the matrix from direct values
-         * @param m00 defines value for (0, 0)
-         * @param m01 defines value for (0, 1)
-         * @param m10 defines value for (1, 0)
-         * @param m11 defines value for (1, 1)
-         * @param m20 defines value for (2, 0)
-         * @param m21 defines value for (2, 1)
-         * @returns the current modified matrix
-         */
-        fromValues(m00: number, m01: number, m10: number, m11: number, m20: number, m21: number): Matrix2D;
-        /**
-         * Gets matrix determinant
-         * @returns the determinant
-         */
-        determinant(): number;
-        /**
-         * Inverses the matrix and stores it in a target matrix
-         * @param result defines the target matrix
-         * @returns the current matrix
-         */
-        invertToRef(result: Matrix2D): Matrix2D;
-        /**
-         * Multiplies the current matrix with another one
-         * @param other defines the second operand
-         * @param result defines the target matrix
-         * @returns the current matrix
-         */
-        multiplyToRef(other: Matrix2D, result: Matrix2D): Matrix2D;
-        /**
-         * Applies the current matrix to a set of 2 floats and stores the result in a vector2
-         * @param x defines the x coordinate to transform
-         * @param y defines the x coordinate to transform
-         * @param result defines the target vector2
-         * @returns the current matrix
-         */
-        transformCoordinates(x: number, y: number, result: BABYLON.Vector2): Matrix2D;
-        /**
-         * Creates an identity matrix
-         * @returns a new matrix
-         */
-        static Identity(): Matrix2D;
-        /**
-         * Creates a translation matrix and stores it in a target matrix
-         * @param x defines the x coordinate of the translation
-         * @param y defines the y coordinate of the translation
-         * @param result defines the target matrix
-         */
-        static TranslationToRef(x: number, y: number, result: Matrix2D): void;
-        /**
-         * Creates a scaling matrix and stores it in a target matrix
-         * @param x defines the x coordinate of the scaling
-         * @param y defines the y coordinate of the scaling
-         * @param result defines the target matrix
-         */
-        static ScalingToRef(x: number, y: number, result: Matrix2D): void;
-        /**
-         * Creates a rotation matrix and stores it in a target matrix
-         * @param angle defines the rotation angle
-         * @param result defines the target matrix
-         */
-        static RotationToRef(angle: number, result: Matrix2D): void;
-        private static _TempPreTranslationMatrix;
-        private static _TempPostTranslationMatrix;
-        private static _TempRotationMatrix;
-        private static _TempScalingMatrix;
-        private static _TempCompose0;
-        private static _TempCompose1;
-        private static _TempCompose2;
-        /**
-         * Composes a matrix from translation, rotation, scaling and parent matrix and stores it in a target matrix
-         * @param tx defines the x coordinate of the translation
-         * @param ty defines the y coordinate of the translation
-         * @param angle defines the rotation angle
-         * @param scaleX defines the x coordinate of the scaling
-         * @param scaleY defines the y coordinate of the scaling
-         * @param parentMatrix defines the parent matrix to multiply by (can be null)
-         * @param result defines the target matrix
-         */
-        static ComposeToRef(tx: number, ty: number, angle: number, scaleX: number, scaleY: number, parentMatrix: BABYLON.Nullable<Matrix2D>, result: Matrix2D): void;
-    }
-}
-declare module BABYLON.GUI {
-    /**
      * Root class used for all 2D controls
      * @see http://doc.babylonjs.com/how_to/gui#controls
      */
@@ -4463,7 +4485,7 @@ declare module BABYLON.GUI {
         /** @hidden */
         _tempParentMeasure: Measure;
         /** @hidden */
-        _tempCurrentMeasure: Measure;
+        _prevCurrentMeasureTransformedIntoGlobalSpace: Measure;
         /** @hidden */
         protected _cachedParentMeasure: Measure;
         private _paddingLeft;
@@ -4479,7 +4501,8 @@ declare module BABYLON.GUI {
         private _rotation;
         private _transformCenterX;
         private _transformCenterY;
-        private _transformMatrix;
+        /** @hidden */
+        _transformMatrix: Matrix2D;
         /** @hidden */
         protected _invertTransformMatrix: Matrix2D;
         /** @hidden */
@@ -4519,7 +4542,10 @@ declare module BABYLON.GUI {
         isPointerBlocker: boolean;
         /** Gets or sets a boolean indicating if the control can be focusable */
         isFocusInvisible: boolean;
-        /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+        /**
+         * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+         * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+         */
         clipChildren: boolean;
         /**
          * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
@@ -4848,7 +4874,7 @@ declare module BABYLON.GUI {
         /** @hidden */
         _intersectsRect(rect: Measure): boolean;
         /** @hidden */
-        protected invalidateRect(left: number, top: number, right: number, bottom: number): void;
+        protected invalidateRect(): void;
         /** @hidden */
         _markAsDirty(force?: boolean): void;
         /** @hidden */
@@ -4879,6 +4905,7 @@ declare module BABYLON.GUI {
         /** @hidden */
         protected _clipForChildren(context: CanvasRenderingContext2D): void;
         private static _ClipMeasure;
+        private _tmpMeasureA;
         private _clip;
         /** @hidden */
         _render(context: CanvasRenderingContext2D, invalidatedRectangle?: BABYLON.Nullable<Measure>): boolean;

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

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

+ 31 - 0
dist/preview release/gui/readme-es6.md

@@ -0,0 +1,31 @@
+Babylon.js GUI module
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/overviews/gui
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/gui
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { AdvancedDynamicTexture } from '@babylonjs/gui/2D';
+```
+
+And used as usual:
+
+```
+// Some awesome code
+// Creates the post process
+let postProcess = new AdvancedDynamicTexture("adt", 128, 128, scene);
+// Some more awesome code
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

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

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

+ 27 - 0
dist/preview release/inspector/readme-es6.md

@@ -0,0 +1,27 @@
+Babylon.js inspector module
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/how_to/debug_layer.
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save-dev @babylonjs/core @babylonjs/inspector
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import "@babylonjs/core/Debug/debugLayer";
+import "@babylonjs/inspector";
+```
+
+The first line will ensure you can access the property debugLayer of the scene while the second will ensure the inspector can be use within your scene.
+
+This is a great example where code splitting or conditional loading could be use to ensure you are not delivering the inspector if not part of your final app.
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

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


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


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


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

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

+ 24 - 0
dist/preview release/loaders/readme-es6.md

@@ -0,0 +1,24 @@
+Babylon.js Loaders module
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/extensions and choose "loaders".
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save-dev @babylonjs/core @babylonjs/loaders
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import "@babylonjs/loaders/glTF";
+```
+
+This will extend Babylon's loader plugins to allow the load of gltf and glb files.
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

+ 6 - 6
dist/preview release/materialsLibrary/babylon.cellMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellPixelShader", function() { return cellPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -388,7 +388,7 @@ var cellPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellVertexShader", function() { return cellVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -422,7 +422,7 @@ var cellVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return CellMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _cell_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell.fragment */ "./cell/cell.fragment.ts");
 /* harmony import */ var _cell_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cell.vertex */ "./cell/cell.vertex.ts");
@@ -762,14 +762,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 4 - 4
dist/preview release/materialsLibrary/babylon.customMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -358,7 +358,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return ShaderSpecialParts; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return CustomMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__);
 
 
@@ -596,14 +596,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.fireMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firePixelShader", function() { return firePixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -382,7 +382,7 @@ var firePixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fireVertexShader", function() { return fireVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -413,7 +413,7 @@ var fireVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return FireMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _fire_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fire.fragment */ "./fire/fire.fragment.ts");
 /* harmony import */ var _fire_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fire.vertex */ "./fire/fire.vertex.ts");
@@ -793,14 +793,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.furMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "furPixelShader", function() { return furPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -388,7 +388,7 @@ var furPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "furVertexShader", function() { return furVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -422,7 +422,7 @@ var furVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return FurMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _fur_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fur.fragment */ "./fur/fur.fragment.ts");
 /* harmony import */ var _fur_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fur.vertex */ "./fur/fur.vertex.ts");
@@ -951,14 +951,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.gradientMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gradientPixelShader", function() { return gradientPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -388,7 +388,7 @@ var gradientPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gradientVertexShader", function() { return gradientVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -422,7 +422,7 @@ var gradientVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return GradientMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _gradient_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gradient.fragment */ "./gradient/gradient.fragment.ts");
 /* harmony import */ var _gradient_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gradient.vertex */ "./gradient/gradient.vertex.ts");
@@ -731,14 +731,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.gridMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -355,7 +355,7 @@ function __importDefault(mod) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridPixelShader", function() { return gridPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -379,7 +379,7 @@ var gridPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridVertexShader", function() { return gridVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -404,7 +404,7 @@ var gridVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return GridMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _grid_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./grid.fragment */ "./grid/grid.fragment.ts");
 /* harmony import */ var _grid_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./grid.vertex */ "./grid/grid.vertex.ts");
@@ -698,14 +698,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.lavaMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -372,7 +372,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lavaPixelShader", function() { return lavaPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -405,7 +405,7 @@ var lavaPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lavaVertexShader", function() { return lavaVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -439,7 +439,7 @@ var lavaVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return LavaMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _lava_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lava.fragment */ "./lava/lava.fragment.ts");
 /* harmony import */ var _lava_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lava.vertex */ "./lava/lava.vertex.ts");
@@ -850,14 +850,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.mixMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixPixelShader", function() { return mixPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -434,7 +434,7 @@ var mixPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixVertexShader", function() { return mixVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -468,7 +468,7 @@ var mixVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return MixMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _mix_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mix.fragment */ "./mix/mix.fragment.ts");
 /* harmony import */ var _mix_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mix.vertex */ "./mix/mix.vertex.ts");
@@ -937,14 +937,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.normalMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalPixelShader", function() { return normalPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -434,7 +434,7 @@ var normalPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalVertexShader", function() { return normalVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -468,7 +468,7 @@ var normalVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return NormalMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _normal_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./normal.fragment */ "./normal/normal.fragment.ts");
 /* harmony import */ var _normal_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./normal.vertex */ "./normal/normal.vertex.ts");
@@ -795,14 +795,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowOnlyPixelShader", function() { return shadowOnlyPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -433,7 +433,7 @@ var shadowOnlyPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowOnlyVertexShader", function() { return shadowOnlyVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -467,7 +467,7 @@ var shadowOnlyVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return ShadowOnlyMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _shadowOnly_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shadowOnly.fragment */ "./shadowOnly/shadowOnly.fragment.ts");
 /* harmony import */ var _shadowOnly_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shadowOnly.vertex */ "./shadowOnly/shadowOnly.vertex.ts");
@@ -686,14 +686,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.simpleMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simplePixelShader", function() { return simplePixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -434,7 +434,7 @@ var simplePixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simpleVertexShader", function() { return simpleVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -468,7 +468,7 @@ var simpleVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return SimpleMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _simple_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./simple.fragment */ "./simple/simple.fragment.ts");
 /* harmony import */ var _simple_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simple.vertex */ "./simple/simple.vertex.ts");
@@ -753,14 +753,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.skyMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skyPixelShader", function() { return skyPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -427,7 +427,7 @@ var skyPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skyVertexShader", function() { return skyVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -454,7 +454,7 @@ var skyVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return SkyMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _sky_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sky.fragment */ "./sky/sky.fragment.ts");
 /* harmony import */ var _sky_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sky.vertex */ "./sky/sky.vertex.ts");
@@ -785,14 +785,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.terrainMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -401,7 +401,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "terrainPixelShader", function() { return terrainPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -434,7 +434,7 @@ var terrainPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "terrainVertexShader", function() { return terrainVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -468,7 +468,7 @@ var terrainVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return TerrainMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _terrain_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./terrain.fragment */ "./terrain/terrain.fragment.ts");
 /* harmony import */ var _terrain_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./terrain.vertex */ "./terrain/terrain.vertex.ts");
@@ -868,14 +868,14 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


+ 6 - 6
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-materials"] = factory(require("babylonjs"));
 	else
 		root["MATERIALS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -402,7 +402,7 @@ __webpack_require__.r(__webpack_exports__);
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return TriPlanarMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _triplanar_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./triplanar.fragment */ "./triPlanar/triplanar.fragment.ts");
 /* harmony import */ var _triplanar_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./triplanar.vertex */ "./triPlanar/triplanar.vertex.ts");
@@ -807,7 +807,7 @@ babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triplanarPixelShader", function() { return triplanarPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -840,7 +840,7 @@ var triplanarPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triplanarVertexShader", function() { return triplanarVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Materials/effect");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -863,14 +863,14 @@ var triplanarVertexShader = { name: name, shader: shader };
 
 /***/ }),
 
-/***/ "babylonjs/Materials/effect":
+/***/ "babylonjs/Misc/decorators":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
 
 /***/ })
 

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


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


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


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


File diff suppressed because it is too large
+ 47 - 47
dist/preview release/materialsLibrary/babylonjs.materials.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/materialsLibrary/babylonjs.materials.js.map


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


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

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

+ 30 - 0
dist/preview release/materialsLibrary/readme-es6.md

@@ -0,0 +1,30 @@
+Babylon.js Materials Library
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/extensions and choose "materials library".
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/materials
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { GridMaterial } from '@babylonjs/materials/Grid';
+```
+
+And used as usual:
+
+```
+// Some awesome code
+let gridMaterial = new GridMaterial("gridMaterial", scene);
+// Some more awesome code
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

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

@@ -9,21 +9,21 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
     },
     "main": "babylon.js",
     "files": [
-        "babylon.d.ts",
+        "babylon.module.d.ts",
         "babylon.js",
         "babylon.max.js",
         "babylon.max.js.map",
         "Oimo.js",
         "readme.md"
     ],
-    "typings": "babylon.d.ts",
+    "typings": "babylon.module.d.ts",
     "keywords": [
         "3D",
         "javascript",

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

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

+ 31 - 0
dist/preview release/postProcessesLibrary/readme-es6.md

@@ -0,0 +1,31 @@
+Babylon.js Post Processes Library
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/extensions and choose "post process library".
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/post-processes
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { AsciiArtPostProcess } from '@babylonjs/post-processes/asciiArt';
+```
+
+And used as usual:
+
+```
+// Some awesome code
+// Creates the post process
+let postProcess = new AsciiArtPostProcess("AsciiArt", camera);
+// Some more awesome code
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

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

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

+ 34 - 0
dist/preview release/proceduralTexturesLibrary/readme-es6.md

@@ -0,0 +1,34 @@
+Babylon.js Procedural Textures Library
+=====================
+
+For usage documentation please visit http://doc.babylonjs.com/extensions and choose "procedural textures library".
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/procedural-textures
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial';
+import { FireProceduralTexture } from '@babylonjs/procedural-textures/fireProceduralTexture';
+```
+
+And used as usual:
+
+```
+// Some awesome code
+var fireMaterial = new StandardMaterial("fontainSculptur2", scene);
+var fireTexture = new FireProceduralTexture("fire", 256, scene);
+fireMaterial.diffuseTexture = fireTexture;
+fireMaterial.opacityTexture = fireTexture;
+// Some more awesome code
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support).

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


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


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

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

+ 29 - 0
dist/preview release/serializers/readme-es6.md

@@ -0,0 +1,29 @@
+Babylon.js Serializers
+=====================
+
+# Installation instructions
+
+To install using npm :
+
+```
+npm install --save @babylonjs/core @babylonjs/serializers
+```
+
+# How to use
+
+Afterwards it can be imported to the your project using:
+
+```
+import { GLTF2Export } from '@babylonjs/serializers/glTF';
+```
+
+And used as usual:
+
+```
+GLTF2Export.GLTFAsync(scene, "fileName").then((gltf) => {
+    gltf.downloadFiles();
+});
+```
+
+For more information you can have a look at our [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support) and the [gltf exporter documentation](https://doc.babylonjs.com/extensions/gltfexporter).
+

File diff suppressed because it is too large
+ 109391 - 0
dist/preview release/viewer/babylon.module.d.ts


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

@@ -1,4 +1,8 @@
-/// <reference path="./babylon.d.ts"/>
+/// <reference path="./babylon.module.d.ts"/>
+/// <reference path="./babylon.glTF2Interface.d.ts"/>
+/// <reference path="./babylonjs.loaders.d.ts"/>
+declare module "babylonjs-loaders"{ export=BABYLON;}
+/// <reference path="./babylon.module.d.ts"/>
 /// <reference path="./babylon.glTF2Interface.d.ts"/>
 /// <reference path="./babylonjs.loaders.d.ts"/>
 declare module "babylonjs-loaders"{ export=BABYLON;}

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


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


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

@@ -1,4 +1,9 @@
-/// <reference path="./babylon.d.ts"/>
+/// <reference path="./babylon.module.d.ts"/>
+/// <reference path="./babylon.glTF2Interface.d.ts"/>
+/// <reference path="./babylonjs.loaders.d.ts"/>
+declare module "babylonjs-loaders"{ export=BABYLON;}
+
+/// <reference path="./babylon.module.d.ts"/>
 /// <reference path="./babylon.glTF2Interface.d.ts"/>
 /// <reference path="./babylonjs.loaders.d.ts"/>
 declare module "babylonjs-loaders"{ export=BABYLON;}

+ 6 - 1
dist/preview release/what's new.md

@@ -89,6 +89,8 @@
 - Added per mesh culling strategy ([jerome](https://github.com/jbousquie))
 - Added InputsManager and keyboard bindings for FollowCamera. ([mrdunk](https://github.com))
 - Fix typo in FollowCamera InputsManager when limiting rotation to 360 degrees. ([mrdunk](https://github.com))
+- Added MouseWheel bindings for FollowCamera. ([mrdunk](https://github.com))
+- Added maximum and minimum limits for FollowCamera parameters. ([mrdunk](https://github.com))
 - Added per solid particle culling possibility : `solidParticle.isInFrustum()`  ([jerome](https://github.com/jbousquie))
 - Added transparency support to `GlowLayer` ([Sebavan](https://github.com/Sebavan))
 - Added option `forceDisposeChildren` to multiMaterial.dispose ([danjpar](https://github.com/danjpar))
@@ -113,6 +115,7 @@
 ### Materials Library
 - Added the `cameraOffset` vector property in the `SkyMaterial` to get an offset according to the horizon ([julien-moreau](https://github.com/julien-moreau))
 - Fixed `GradientMaterial` to consider disableLighting working as emissive ([julien-moreau](https://github.com/julien-moreau))
+- Fixed fresnel term computation in `WaterMaterial` ([julien-moreau](https://github.com/julien-moreau))
 
 ## Bug fixes
 - Fixed TransformNode.setDirection (orientation was wrong) ([Deltakosh](https://github.com/deltakosh))
@@ -124,7 +127,7 @@
 - Gizmo scaling not consistent when camera is parented ([TrevorDev](https://github.com/TrevorDev))
 - Context loss causing unexpected results with dynamic textures, geometries with the same name and reflectionTextures ([TrevorDev](https://github.com/TrevorDev))
 - CreateScreenshotUsingRenderTarget stretches mirror textures when setting both width and height ([TrevorDev](https://github.com/TrevorDev))
-- VR helper only updating vr cameras position when entering vr, rotation was missing ([TrevorDev](https://github.com/TrevorDev))
+- VR helper only updating vr cameras position when entering vr, rotation was missing, laser distance stopped working ([TrevorDev](https://github.com/TrevorDev))
 - Fix VR controllers after gltfLoader transformNode change ([TrevorDev](https://github.com/TrevorDev))
 - Bounding Box fixedDragMeshScreenSize stopped working and allow rotating through bounding box ([TrevorDev](https://github.com/TrevorDev))
 - VR helper would rotate non vr camera while in VR ([TrevorDev](https://github.com/TrevorDev))
@@ -143,9 +146,11 @@
 - Updated comment in TransformNode.rotationQuaternion to include undefined as one of the potential return values ([nathankmiller](https://github.com/nathankmiller))
 - CannonJS ignores connectedPivot joint parameter ([TrevorDev](https://github.com/TrevorDev))
 - Fix case sensitive paths ([mrdunk](https://github.com))
+- Fix more case sensitive paths ([mrdunk](https://github.com))
 - Attaching a BoundingBoxGizmo on a child should not remove its parent ([TrevorDev](https://github.com/TrevorDev)))
 - AmmoJS fix include issue caused after modules update and use world contact point to be consistent with oimo and cannon ([TrevorDev](https://github.com/TrevorDev)))
 - Oimo disable motor maxForce, cannonJS support no impostor, cannonJS cylinder axis ([TrevorDev](https://github.com/TrevorDev)))
+- Utility layer should render on last active camera ([TrevorDev](https://github.com/TrevorDev))
 
 ### Core Engine
 - Fixed a bug with `mesh.alwaysSelectAsActiveMesh` preventing layerMask to be taken in account ([Deltakosh](https://github.com/deltakosh))

+ 6 - 2
gui/src/2D/controls/container.ts

@@ -203,14 +203,18 @@ export class Container extends Control {
     public _reOrderControl(control: Control): void {
         this.removeControl(control);
 
+        let wasAdded = false;
         for (var index = 0; index < this._children.length; index++) {
             if (this._children[index].zIndex > control.zIndex) {
                 this._children.splice(index, 0, control);
-                return;
+                wasAdded = true;
+                break;
             }
         }
 
-        this._children.push(control);
+        if (!wasAdded) {
+            this._children.push(control);
+        }
 
         control.parent = this;
 

+ 4 - 1
gui/src/2D/controls/control.ts

@@ -121,7 +121,10 @@ export class Control {
     /** Gets or sets a boolean indicating if the control can be focusable */
     public isFocusInvisible = false;
 
-    /** Gets or sets a boolean indicating if the children are clipped to the current control bounds */
+    /**
+     * Gets or sets a boolean indicating if the children are clipped to the current control bounds.
+     * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
+     */
     public clipChildren = true;
 
     /**

+ 2 - 6
materialsLibrary/src/water/water.fragment.fx

@@ -123,8 +123,6 @@ void main(void) {
 #ifdef FRESNELSEPARATE
     #ifdef REFLECTION
         // Water
-        vec3 eyeVector = normalize(vEyePosition - vPosition);
-
         vec2 projectedRefractionTexCoords = clamp(vRefractionMapTexCoord.xy / vRefractionMapTexCoord.z + perturbation*0.5, 0.0, 1.0);
         vec4 refractiveColor = texture2D(refractionSampler, projectedRefractionTexCoords);
 
@@ -137,7 +135,7 @@ void main(void) {
 
         vec3 upVector = vec3(0.0, 1.0, 0.0);
 
-        float fresnelTerm = clamp(abs(pow(dot(eyeVector, upVector),3.0)),0.05,0.65);
+        float fresnelTerm = clamp(abs(pow(dot(viewDirectionW, upVector),3.0)),0.05,0.65);
         float IfresnelTerm = 1.0 - fresnelTerm;
 
         refractiveColor = colorBlendFactor*waterColor + (1.0-colorBlendFactor)*refractiveColor;
@@ -178,8 +176,6 @@ void main(void) {
 #else // !FRESNELSEPARATE
     #ifdef REFLECTION
         // Water
-        vec3 eyeVector = normalize(vEyePosition - vPosition);
-
         vec2 projectedRefractionTexCoords = clamp(vRefractionMapTexCoord.xy / vRefractionMapTexCoord.z + perturbation, 0.0, 1.0);
         vec4 refractiveColor = texture2D(refractionSampler, projectedRefractionTexCoords);
 
@@ -188,7 +184,7 @@ void main(void) {
 
         vec3 upVector = vec3(0.0, 1.0, 0.0);
 
-        float fresnelTerm = max(dot(eyeVector, upVector), 0.0);
+        float fresnelTerm = max(dot(viewDirectionW, upVector), 0.0);
 
         vec4 combinedColor = refractiveColor * fresnelTerm + reflectiveColor * (1.0 - fresnelTerm);
 

+ 3 - 3
materialsLibrary/test/addfur.js

@@ -2,8 +2,8 @@ window.prepareFur = function() {
 	var shells = 30;
 	var meshes = [];
 	
-	var diffuseTexture = new BABYLON.Texture("/playground/textures/leopard_fur.JPG", scene);
-	var heightTexture = new BABYLON.Texture("/playground/textures/speckles.jpg", scene);
+	var diffuseTexture = new BABYLON.Texture("/Playground/textures/leopard_fur.JPG", scene);
+	var heightTexture = new BABYLON.Texture("/Playground/textures/speckles.jpg", scene);
 	var furTexture = BABYLON.FurMaterial.GenerateTexture("furTexture", scene);
 	
 	var fur = new BABYLON.FurMaterial("fur", scene);
@@ -132,4 +132,4 @@ window.prepareFur = function() {
 			configureFur(mesh);
 		}
 	};
-};
+};

+ 2 - 2
package.json

@@ -9,7 +9,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "4.0.0-alpha.18",
+    "version": "4.0.0-alpha.19",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -99,7 +99,7 @@
         "tslib": "^1.9.3",
         "tslint": "^5.11.0",
         "typedoc": "^0.12.0",
-        "typescript": "~3.0.1",
+        "typescript": "^3.2.2",
         "webpack": "^4.25.1",
         "webpack-cli": "^3.1.2",
         "webpack-dev-server": "^3.1.14",

+ 122 - 0
readme-es6.md

@@ -0,0 +1,122 @@
+# Babylon.js
+
+Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
+
+[![npm version](https://badge.fury.io/js/babylonjs.svg)](https://badge.fury.io/js/babylonjs)
+[![Build Status](https://travis-ci.com/BabylonJS/Babylon.js.svg?branch=master)](https://travis-ci.com/BabylonJS/Babylon.js)
+[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/BabylonJS/Babylon.js.svg)](http://isitmaintained.com/project/BabylonJS/Babylon.js "Average time to resolve an issue")
+[![Percentage of issues still open](https://isitmaintained.com/badge/open/babylonJS/babylon.js.svg)](https://isitmaintained.com/project/babylonJS/babylon.js "Percentage of issues still open")
+[![Build Size](https://img.badgesize.io/BabylonJS/Babylon.js/master/dist/preview%20release/babylon.js.svg?compression=gzip)](https://img.badgesize.io/BabylonJS/Babylon.js/master/dist/preview%20release/babylon.js.svg?compression=gzip)
+[![Twitter](https://img.shields.io/twitter/follow/babylonjs.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=babylonjs)
+
+**Any questions?** Here is our official [forum](https://forum.babylonjs.com/).
+
+## CDN
+
+To look into our CDN bundled distribution, you can refer to the package [babylonjs](https://www.npmjs.com/package/babylonjs)
+
+## npm
+
+BabylonJS and its modules are published on npm as esNext modules with full typing support. To install, use:
+
+```text
+npm install @babylonjs/core --save
+```
+
+This will allow you to import BabylonJS entirely using:
+
+```javascript
+import * as BABYLON from '@babylonjs/core/Legacy/legacy';
+```
+
+or individual classes to benefit from enhanced tree shaking using :
+
+```javascript
+import { Scene } from '@babylonjs/core/scene';
+import { Engine } from '@babylonjs/core/Engines/engine';
+```
+
+To add a module, install the respective package. A list of extra packages and their installation instructions can be found on the [babylonjs user on npm](https://www.npmjs.com/~babylonjs) scoped on @babylonjs.
+
+## Usage
+
+See [our ES6 dedicated documentation](https://doc.babylonjs.com/features/es6_support):
+
+```javascript
+import { Engine } from "@babylonjs/core/Engines/engine";
+import { Scene } from "@babylonjs/core/scene";
+import { Vector3 } from "@babylonjs/core/Maths/math";
+import { FreeCamera } from "@babylonjs/core/Cameras/freeCamera";
+import { HemisphericLight } from "@babylonjs/core/Lights/hemisphericLight";
+import { Mesh } from "@babylonjs/core/Meshes/mesh";
+
+// Side-effects only imports allowing the standard material to be used as default.
+import "@babylonjs/core/Materials/standardMaterial";
+// Side-effects only imports allowing Mesh to create default shapes (to enhance tree shaking, the construction methods on mesh are not available if the meshbuilder has not been imported).
+import "@babylonjs/core/Meshes/meshBuilder";
+
+const canvas = document.getElementById("renderCanvas") as HTMLCanvasElement;
+const engine = new Engine(canvas);
+var scene = new Scene(engine);
+
+// This creates and positions a free camera (non-mesh)
+var camera = new FreeCamera("camera1", new Vector3(0, 5, -10), scene);
+
+// This targets the camera to scene origin
+camera.setTarget(Vector3.Zero());
+
+// This attaches the camera to the canvas
+camera.attachControl(canvas, true);
+
+// This creates a light, aiming 0,1,0 - to the sky (non-mesh)
+var light = new HemisphericLight("light1", new Vector3(0, 1, 0), scene);
+
+// Default intensity is 1. Let's dim the light a small amount
+light.intensity = 0.7;
+
+// Our built-in 'sphere' shape. Params: name, subdivs, size, scene
+var sphere = Mesh.CreateSphere("sphere1", 16, 2, scene);
+
+// Move the sphere upward 1/2 its height
+sphere.position.y = 2;
+
+// Our built-in 'ground' shape. Params: name, width, depth, subdivs, scene
+Mesh.CreateGround("ground1", 6, 6, 2, scene);
+
+engine.runRenderLoop(() => {
+    scene.render();
+});
+```
+
+## Preview release
+
+Preview version of **4.0** 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
+
+- [Documentation](https://doc.babylonjs.com)
+- [Examples](https://doc.babylonjs.com/examples)
+
+## Contributing
+Please see the [Contributing Guidelines](./contributing.md)
+
+## Useful links
+
+- Official web site: [www.babylonjs.com](https://www.babylonjs.com/)
+- Online [playground](https://playground.babylonjs.com/) to learn by experimentating
+- Online [sandbox](https://www.babylonjs.com/sandbox) where you can test your .babylon and glTF scenes with a simple drag'n'drop
+- Online [shader creation tool](https://www.babylonjs.com/cyos/) where you can learn how to create GLSL shaders
+- 3DS Max [exporter](https://github.com/BabylonJS/Exporters/tree/master/3ds%20Max) can be used to generate a .babylon file from 3DS Max
+- Maya [exporter](https://github.com/BabylonJS/Exporters/tree/master/Maya) can be used to generate a .babylon file from 3DS Max
+- Blender [exporter](https://github.com/BabylonJS/Exporters/tree/master/Blender) can be used to generate a .babylon file from Blender 3d
+- Unity 5[ (deprecated) exporter](https://github.com/BabylonJS/Exporters/tree/master/Unity) can be used to export your geometries from Unity 5 scene editor(animations are supported)
+- [glTF Tools](https://github.com/KhronosGroup/glTF#gltf-tools) by KhronosGroup
+
+## Features
+
+To get a complete list of supported features, please visit our [website](https://www.babylonjs.com/#specifications).
+
+## Build
+
+Babylon.js is automatically built using [Gulp](https://gulpjs.com/). For further instructions see the readme at [/Tools/Gulp](https://github.com/BabylonJS/Babylon.js/tree/master/Tools/Gulp).

+ 21 - 0
src/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.ts

@@ -1,6 +1,27 @@
 import { Nullable } from "../../types";
 import { ArcRotateCamera } from "../../Cameras/arcRotateCamera";
 import { ICameraInput, CameraInputTypes } from "../../Cameras/cameraInputsManager";
+import { ArcRotateCameraInputsManager } from "../../Cameras/arcRotateCameraInputsManager";
+
+// Module augmentation to abstract orientation inputs from camera.
+declare module "../../Cameras/arcRotateCameraInputsManager" {
+    export interface ArcRotateCameraInputsManager {
+        /**
+         * Add orientation input support to the input manager.
+         * @returns the current input manager
+         */
+        addVRDeviceOrientation(): ArcRotateCameraInputsManager;
+    }
+}
+
+/**
+ * Add orientation input support to the input manager.
+ * @returns the current input manager
+ */
+ArcRotateCameraInputsManager.prototype.addVRDeviceOrientation = function(): ArcRotateCameraInputsManager {
+    this.add(new ArcRotateCameraVRDeviceOrientationInput());
+    return this;
+};
 
 /**
  * Manage the device orientation inputs (gyroscope) to control an arc rotate camera.

+ 147 - 0
src/Cameras/Inputs/followCameraMouseWheelInput.ts

@@ -0,0 +1,147 @@
+import { Nullable } from "../../types";
+import { serialize } from "../../Misc/decorators";
+import { EventState, Observer } from "../../Misc/observable";
+import { FollowCamera } from "../../Cameras/followCamera";
+import { ICameraInput, CameraInputTypes } from "../../Cameras/cameraInputsManager";
+import { PointerInfo, PointerEventTypes } from "../../Events/pointerEvents";
+
+/**
+ * Manage the mouse wheel inputs to control a follow camera.
+ * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+ */
+export class FollowCameraMouseWheelInput implements ICameraInput<FollowCamera> {
+    /**
+     * Defines the camera the input is attached to.
+     */
+    public camera: FollowCamera;
+
+    /**
+     * Moue wheel controls zoom. (Moue wheel modifies camera.radius value.)
+     */
+    @serialize()
+    public axisControlRadius: boolean = true;
+
+    /**
+     * Moue wheel controls height. (Moue wheel modifies camera.heightOffset value.)
+     */
+    @serialize()
+    public axisControlHeight: boolean = false;
+
+    /**
+     * Moue wheel controls angle. (Moue wheel modifies camera.rotationOffset value.)
+     */
+    @serialize()
+    public axisControlRotation: boolean = false;
+
+    /**
+     * Gets or Set the mouse wheel precision or how fast is the camera moves in
+     * relation to mouseWheel events.
+     */
+    @serialize()
+    public wheelPrecision = 3.0;
+
+    /**
+     * wheelDeltaPercentage will be used instead of wheelPrecision if different from 0.
+     * It defines the percentage of current camera.radius to use as delta when wheel is used.
+     */
+    @serialize()
+    public wheelDeltaPercentage = 0;
+
+    private _wheel: Nullable<(p: PointerInfo, s: EventState) => void>;
+    private _observer: Nullable<Observer<PointerInfo>>;
+
+    /**
+     * Attach the input controls to a specific dom element to get the input from.
+     * @param element Defines the element the controls should be listened from
+     * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+     */
+    public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
+        this._wheel = (p, s) => {
+            // sanity check - this should be a PointerWheel event.
+            if (p.type !== PointerEventTypes.POINTERWHEEL) { return; }
+            var event = <MouseWheelEvent>p.event;
+            var delta = 0;
+
+            // Chrome, Safari: event.deltaY
+            // IE: event.wheelDelta
+            // Firefox: event.detail (inverted)
+            var wheelDelta = Math.max(-1, Math.min(1,
+              (event.deltaY || (<any>event).wheelDelta || -event.detail)));
+            if (this.wheelDeltaPercentage) {
+                console.assert((<number>(<unknown>this.axisControlRadius) +
+                                <number>(<unknown>this.axisControlHeight) +
+                                <number>(<unknown>this.axisControlRotation)) <= 1,
+                               "wheelDeltaPercentage only usable when mouse wheel " +
+                               "controlls ONE axis. " +
+                               "Currently enabled: " +
+                               "axisControlRadius: " + this.axisControlRadius +
+                               ", axisControlHeightOffset: " + this.axisControlHeight +
+                               ", axisControlRotationOffset: " + this.axisControlRotation);
+
+                if (this.axisControlRadius) {
+                    delta =
+                        wheelDelta * 0.01 * this.wheelDeltaPercentage *
+                        this.camera.radius;
+                } else if (this.axisControlHeight) {
+                    delta =
+                        wheelDelta * 0.01 * this.wheelDeltaPercentage *
+                        this.camera.heightOffset;
+                } else if (this.axisControlRotation) {
+                    delta =
+                        wheelDelta * 0.01 * this.wheelDeltaPercentage *
+                        this.camera.rotationOffset;
+                }
+            } else {
+                delta = wheelDelta * this.wheelPrecision;
+            }
+
+            if (delta) {
+                if (this.axisControlRadius) {
+                    this.camera.radius += delta;
+                } else if (this.axisControlHeight) {
+                    this.camera.heightOffset += delta;
+                } else if (this.axisControlRotation) {
+                    this.camera.rotationOffset += delta;
+                }
+            }
+
+            if (event.preventDefault) {
+                if (!noPreventDefault) {
+                    event.preventDefault();
+                }
+            }
+        };
+
+        this._observer = this.camera.getScene().onPointerObservable.add(this._wheel, PointerEventTypes.POINTERWHEEL);
+    }
+
+    /**
+     * Detach the current controls from the specified dom element.
+     * @param element Defines the element to stop listening the inputs from
+     */
+    public detachControl(element: Nullable<HTMLElement>): void {
+        if (this._observer && element) {
+            this.camera.getScene().onPointerObservable.remove(this._observer);
+            this._observer = null;
+            this._wheel = null;
+        }
+    }
+
+    /**
+     * Gets the class name of the current intput.
+     * @returns the class name
+     */
+    public getClassName(): string {
+        return "ArcRotateCameraMouseWheelInput";
+    }
+
+    /**
+     * Get the friendly name associated with the input class.
+     * @returns the input friendly name
+     */
+    public getSimpleName(): string {
+        return "mousewheel";
+    }
+}
+
+(<any>CameraInputTypes)["FollowCameraMouseWheelInput"] = FollowCameraMouseWheelInput;

+ 22 - 0
src/Cameras/Inputs/freeCameraDeviceOrientationInput.ts

@@ -3,6 +3,28 @@ import { ICameraInput, CameraInputTypes } from "../../Cameras/cameraInputsManage
 import { FreeCamera } from "../../Cameras/freeCamera";
 import { Quaternion } from "../../Maths/math";
 import { Tools } from "../../Misc/tools";
+import { FreeCameraInputsManager } from "../../Cameras/freeCameraInputsManager";
+
+// Module augmentation to abstract orientation inputs from camera.
+declare module "../../Cameras/freeCameraInputsManager" {
+    export interface FreeCameraInputsManager {
+        /**
+         * Add orientation input support to the input manager.
+         * @returns the current input manager
+         */
+        addDeviceOrientation(): FreeCameraInputsManager;
+    }
+}
+
+/**
+ * Add orientation input support to the input manager.
+ * @returns the current input manager
+ */
+FreeCameraInputsManager.prototype.addDeviceOrientation = function(): FreeCameraInputsManager {
+    this.add(new FreeCameraDeviceOrientationInput());
+    return this;
+};
+
 /**
  * Takes information about the orientation of the device as reported by the deviceorientation event to orient the camera.
  * Screen rotation is taken into account.

+ 22 - 0
src/Cameras/Inputs/freeCameraVirtualJoystickInput.ts

@@ -3,6 +3,28 @@ import { Nullable } from "../../types";
 import { ICameraInput, CameraInputTypes } from "../../Cameras/cameraInputsManager";
 import { FreeCamera } from "../../Cameras/freeCamera";
 import { Matrix, Vector3 } from "../../Maths/math";
+import { FreeCameraInputsManager } from "../../Cameras/freeCameraInputsManager";
+
+// Module augmentation to abstract virtual joystick from camera.
+declare module "../../Cameras/freeCameraInputsManager" {
+    export interface FreeCameraInputsManager {
+        /**
+         * Add virtual joystick input support to the input manager.
+         * @returns the current input manager
+         */
+        addVirtualJoystick(): FreeCameraInputsManager;
+    }
+}
+
+/**
+* Add virtual joystick input support to the input manager.
+* @returns the current input manager
+*/
+FreeCameraInputsManager.prototype.addVirtualJoystick = function(): FreeCameraInputsManager {
+   this.add(new FreeCameraVirtualJoystickInput());
+   return this;
+};
+
 /**
  * Manage the Virtual Joystick inputs to control the movement of a free camera.
  * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs

+ 4 - 0
src/Cameras/RigModes/index.ts

@@ -0,0 +1,4 @@
+export * from "./stereoscopicAnaglyphRigMode";
+export * from "./stereoscopicRigMode";
+export * from "./vrRigMode";
+export * from "./webVRRigMode";

+ 8 - 0
src/Cameras/RigModes/stereoscopicAnaglyphRigMode.ts

@@ -0,0 +1,8 @@
+import { Camera } from "../camera";
+import { PassPostProcess } from "../../PostProcesses/passPostProcess";
+import { AnaglyphPostProcess } from "../../PostProcesses/anaglyphPostProcess";
+
+Camera._setStereoscopicAnaglyphRigMode = function(camera: Camera) {
+    camera._rigCameras[0]._rigPostProcess = new PassPostProcess(camera.name + "_passthru", 1.0, camera._rigCameras[0]);
+    camera._rigCameras[1]._rigPostProcess = new AnaglyphPostProcess(camera.name + "_anaglyph", 1.0, camera._rigCameras);
+};

+ 10 - 0
src/Cameras/RigModes/stereoscopicRigMode.ts

@@ -0,0 +1,10 @@
+import { Camera } from "../camera";
+import { PassPostProcess } from "../../PostProcesses/passPostProcess";
+import { StereoscopicInterlacePostProcess } from "../../PostProcesses/stereoscopicInterlacePostProcess";
+
+Camera._setStereoscopicRigMode = function(camera: Camera) {
+    var isStereoscopicHoriz = camera.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL || camera.cameraRigMode === Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED;
+
+    camera._rigCameras[0]._rigPostProcess = new PassPostProcess(camera.name + "_passthru", 1.0, camera._rigCameras[0]);
+    camera._rigCameras[1]._rigPostProcess = new StereoscopicInterlacePostProcess(camera.name + "_stereoInterlace", camera._rigCameras, isStereoscopicHoriz);
+};

+ 27 - 0
src/Cameras/RigModes/vrRigMode.ts

@@ -0,0 +1,27 @@
+import { Camera } from "../camera";
+import { Matrix, Viewport } from "../../Maths/math";
+import { VRDistortionCorrectionPostProcess } from "../../PostProcesses/vrDistortionCorrectionPostProcess";
+import { VRCameraMetrics } from "../VR/vrCameraMetrics";
+
+Camera._setVRRigMode = function(camera: Camera, rigParams: any) {
+    var metrics = rigParams.vrCameraMetrics || VRCameraMetrics.GetDefault();
+
+    camera._rigCameras[0]._cameraRigParams.vrMetrics = metrics;
+    camera._rigCameras[0].viewport = new Viewport(0, 0, 0.5, 1.0);
+    camera._rigCameras[0]._cameraRigParams.vrWorkMatrix = new Matrix();
+    camera._rigCameras[0]._cameraRigParams.vrHMatrix = metrics.leftHMatrix;
+    camera._rigCameras[0]._cameraRigParams.vrPreViewMatrix = metrics.leftPreViewMatrix;
+    camera._rigCameras[0].getProjectionMatrix = camera._rigCameras[0]._getVRProjectionMatrix;
+
+    camera._rigCameras[1]._cameraRigParams.vrMetrics = metrics;
+    camera._rigCameras[1].viewport = new Viewport(0.5, 0, 0.5, 1.0);
+    camera._rigCameras[1]._cameraRigParams.vrWorkMatrix = new Matrix();
+    camera._rigCameras[1]._cameraRigParams.vrHMatrix = metrics.rightHMatrix;
+    camera._rigCameras[1]._cameraRigParams.vrPreViewMatrix = metrics.rightPreViewMatrix;
+    camera._rigCameras[1].getProjectionMatrix = camera._rigCameras[1]._getVRProjectionMatrix;
+
+    if (metrics.compensateDistortion) {
+        camera._rigCameras[0]._rigPostProcess = new VRDistortionCorrectionPostProcess("VR_Distort_Compensation_Left", camera._rigCameras[0], false, metrics);
+        camera._rigCameras[1]._rigPostProcess = new VRDistortionCorrectionPostProcess("VR_Distort_Compensation_Right", camera._rigCameras[1], true, metrics);
+    }
+};

+ 38 - 0
src/Cameras/RigModes/webVRRigMode.ts

@@ -0,0 +1,38 @@
+import { Camera } from "../camera";
+import { Matrix, Viewport } from "../../Maths/math";
+
+Camera._setWebVRRigMode = function(camera: Camera, rigParams: any) {
+    if (rigParams.vrDisplay) {
+        var leftEye = rigParams.vrDisplay.getEyeParameters('left');
+        var rightEye = rigParams.vrDisplay.getEyeParameters('right');
+
+        //Left eye
+        camera._rigCameras[0].viewport = new Viewport(0, 0, 0.5, 1.0);
+        camera._rigCameras[0].setCameraRigParameter("left", true);
+        //leaving this for future reference
+        camera._rigCameras[0].setCameraRigParameter("specs", rigParams.specs);
+        camera._rigCameras[0].setCameraRigParameter("eyeParameters", leftEye);
+        camera._rigCameras[0].setCameraRigParameter("frameData", rigParams.frameData);
+        camera._rigCameras[0].setCameraRigParameter("parentCamera", rigParams.parentCamera);
+        camera._rigCameras[0]._cameraRigParams.vrWorkMatrix = new Matrix();
+        camera._rigCameras[0].getProjectionMatrix = camera._getWebVRProjectionMatrix;
+        camera._rigCameras[0].parent = camera;
+        camera._rigCameras[0]._getViewMatrix = camera._getWebVRViewMatrix;
+
+        //Right eye
+        camera._rigCameras[1].viewport = new Viewport(0.5, 0, 0.5, 1.0);
+        camera._rigCameras[1].setCameraRigParameter('eyeParameters', rightEye);
+        camera._rigCameras[1].setCameraRigParameter("specs", rigParams.specs);
+        camera._rigCameras[1].setCameraRigParameter("frameData", rigParams.frameData);
+        camera._rigCameras[1].setCameraRigParameter("parentCamera", rigParams.parentCamera);
+        camera._rigCameras[1]._cameraRigParams.vrWorkMatrix = new Matrix();
+        camera._rigCameras[1].getProjectionMatrix = camera._getWebVRProjectionMatrix;
+        camera._rigCameras[1].parent = camera;
+        camera._rigCameras[1]._getViewMatrix = camera._getWebVRViewMatrix;
+
+        if (Camera.UseAlternateWebVRRendering) {
+            camera._rigCameras[1]._skipRendering = true;
+            camera._rigCameras[0]._alternateCamera = camera._rigCameras[1];
+        }
+    }
+};

+ 0 - 0
src/Cameras/Stereoscopic/anaglyphArcRotateCamera.ts


Some files were not shown because too many files changed in this diff