Browse Source

strictNullChecks aka "What a good idea" step 4

David Catuhe 7 years ago
parent
commit
6bf40467b7
100 changed files with 9751 additions and 11829 deletions
  1. 0 22
      Tools/Gulp/config.json
  2. 806 1016
      dist/preview release/babylon.d.ts
  3. 44 45
      dist/preview release/babylon.js
  4. 495 1109
      dist/preview release/babylon.max.js
  5. 806 1016
      dist/preview release/babylon.module.d.ts
  6. 45 46
      dist/preview release/babylon.worker.js
  7. 3054 3264
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  8. 47 48
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  9. 492 1113
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js
  10. 3054 3264
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts
  11. 27 27
      dist/preview release/gui/babylon.gui.js
  12. 3 3
      dist/preview release/gui/babylon.gui.min.js
  13. 263 264
      dist/preview release/inspector/babylon.inspector.bundle.js
  14. 0 3
      dist/preview release/inspector/babylon.inspector.d.ts
  15. 55 64
      dist/preview release/inspector/babylon.inspector.js
  16. 3 4
      dist/preview release/inspector/babylon.inspector.min.js
  17. 9 9
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  18. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  19. 8 8
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  20. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  21. 15 15
      dist/preview release/loaders/babylon.glTFFileLoader.js
  22. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  23. 2 2
      dist/preview release/loaders/babylon.objFileLoader.js
  24. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  25. 1 1
      dist/preview release/loaders/babylon.stlFileLoader.js
  26. 18 18
      dist/preview release/loaders/babylonjs.loaders.js
  27. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  28. 2 2
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  29. 7 7
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  30. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  31. 2 2
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  32. 2 2
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  33. 2 2
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  34. 2 2
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  35. 2 2
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  36. 2 2
      dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.js
  37. 2 2
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  38. 2 2
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  39. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  40. 2 2
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  41. 2 2
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  42. 2 2
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  43. 2 2
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  44. 2 2
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  45. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  46. 35 35
      dist/preview release/materialsLibrary/babylonjs.materials.js
  47. 3 3
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  48. 2 2
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js
  49. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  50. 2 2
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js
  51. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  52. 4 4
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.js
  53. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  54. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js
  55. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js
  56. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js
  57. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js
  58. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js
  59. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.normalMapProceduralTexture.js
  60. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.js
  61. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.js
  62. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js
  63. 1 1
      dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.js
  64. 10 10
      dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.js
  65. 1 1
      dist/preview release/serializers/babylon.objSerializer.js
  66. 1 1
      dist/preview release/serializers/babylonjs.serializers.js
  67. 1 0
      dist/preview release/what's new.md
  68. 0 3
      inspector/src/properties.ts
  69. 1 8
      inspector/src/tabs/TextureTab.ts
  70. 1 1
      src/Actions/babylon.actionManager.ts
  71. 7 4
      src/Behaviors/Cameras/babylon.autoRotationBehavior.ts
  72. 6 4
      src/Behaviors/Cameras/babylon.bouncingBehavior.ts
  73. 15 7
      src/Behaviors/Cameras/babylon.framingBehavior.ts
  74. 2 2
      src/Cameras/Inputs/babylon.arcRotateCameraGamepadInput.ts
  75. 2 2
      src/Cameras/Inputs/babylon.freeCameraGamepadInput.ts
  76. 2 2
      src/Cameras/VR/babylon.webVRCamera.ts
  77. 15 3
      src/Collisions/babylon.pickingInfo.ts
  78. 30 30
      src/Engine/babylon.engine.ts
  79. 1 1
      src/Events/babylon.pointerEvents.ts
  80. 1 1
      src/LensFlare/babylon.lensFlare.ts
  81. 7 7
      src/LensFlare/babylon.lensFlareSystem.ts
  82. 98 25
      src/Lights/Shadows/babylon.shadowGenerator.ts
  83. 8 0
      src/Lights/babylon.directionalLight.ts
  84. 1 1
      src/Lights/babylon.hemisphericLight.ts
  85. 18 7
      src/Lights/babylon.light.ts
  86. 5 0
      src/Lights/babylon.pointLight.ts
  87. 4 0
      src/Lights/babylon.spotLight.ts
  88. 15 15
      src/Loading/Plugins/babylon.babylonFileLoader.ts
  89. 5 1
      src/Loading/babylon.loadingScreen.ts
  90. 2 2
      src/Materials/PBR/babylon.pbrMaterial.ts
  91. 5 5
      src/Materials/Textures/babylon.baseTexture.ts
  92. 0 113
      src/Materials/Textures/babylon.mapTexture.ts
  93. 14 13
      src/Materials/babylon.effect.ts
  94. 7 5
      src/Materials/babylon.standardMaterial.ts
  95. 20 6
      src/Math/babylon.math.ts
  96. 77 66
      src/Mesh/babylon.abstractMesh.ts
  97. 2 2
      src/Mesh/babylon.mesh.vertexData.ts
  98. 10 10
      src/Mesh/babylon.subMesh.ts
  99. 3 3
      src/Physics/babylon.physicsEngine.ts
  100. 0 0
      src/PostProcess/babylon.postProcess.ts

+ 0 - 22
Tools/Gulp/config.json

@@ -67,8 +67,6 @@
             "optimizations",
             "optimizations",
             "highlights",
             "highlights",
             "assetsManager",
             "assetsManager",
-            "mapTexture",
-            "dynamicFloatArray",
             "serialization",
             "serialization",
             "probes",
             "probes",
             "layer",
             "layer",
@@ -143,8 +141,6 @@
             "optimizations",
             "optimizations",
             "highlights",
             "highlights",
             "assetsManager",
             "assetsManager",
-            "mapTexture",
-            "dynamicFloatArray",
             "serialization",
             "serialization",
             "probes",
             "probes",
             "layer",
             "layer",
@@ -924,7 +920,6 @@
                 "additionalMeshes",
                 "additionalMeshes",
                 "standardMaterial",
                 "standardMaterial",
                 "stringDictionary",
                 "stringDictionary",
-                "dynamicFloatArray",
                 "actions"
                 "actions"
             ],
             ],
             "shaders": [
             "shaders": [
@@ -1030,23 +1025,6 @@
                 "core"
                 "core"
             ]
             ]
         },
         },
-        "mapTexture": {
-            "files": [
-                "../../src/Materials/Textures/babylon.mapTexture.js",
-                "../../src/Tools/babylon.rectPackingMap.js"
-            ],
-            "dependUpon": [
-                "core"
-            ]
-        },
-        "dynamicFloatArray": {
-            "files": [
-                "../../src/Tools/babylon.dynamicFloatArray.js"
-            ],
-            "dependUpon": [
-                "core"
-            ]
-        },
         "serialization": {
         "serialization": {
             "files": [
             "files": [
                 "../../src/Tools/babylon.sceneSerializer.js"
                 "../../src/Tools/babylon.sceneSerializer.js"

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


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


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


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


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


File diff suppressed because it is too large
+ 3054 - 3264
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


File diff suppressed because it is too large
+ 47 - 48
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


File diff suppressed because it is too large
+ 492 - 1113
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js


File diff suppressed because it is too large
+ 3054 - 3264
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 27 - 27
dist/preview release/gui/babylon.gui.js

@@ -22,7 +22,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var AdvancedDynamicTexture = /** @class */ (function (_super) {
+        var AdvancedDynamicTexture = (function (_super) {
             __extends(AdvancedDynamicTexture, _super);
             __extends(AdvancedDynamicTexture, _super);
             function AdvancedDynamicTexture(name, width, height, scene, generateMipMaps, samplingMode) {
             function AdvancedDynamicTexture(name, width, height, scene, generateMipMaps, samplingMode) {
                 if (width === void 0) { width = 0; }
                 if (width === void 0) { width = 0; }
@@ -430,7 +430,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Measure = /** @class */ (function () {
+        var Measure = (function () {
             function Measure(left, top, width, height) {
             function Measure(left, top, width, height) {
                 this.left = left;
                 this.left = left;
                 this.top = top;
                 this.top = top;
@@ -475,7 +475,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Vector2WithInfo = /** @class */ (function (_super) {
+        var Vector2WithInfo = (function (_super) {
             __extends(Vector2WithInfo, _super);
             __extends(Vector2WithInfo, _super);
             function Vector2WithInfo(source, buttonIndex) {
             function Vector2WithInfo(source, buttonIndex) {
                 if (buttonIndex === void 0) { buttonIndex = 0; }
                 if (buttonIndex === void 0) { buttonIndex = 0; }
@@ -486,7 +486,7 @@ var BABYLON;
             return Vector2WithInfo;
             return Vector2WithInfo;
         }(BABYLON.Vector2));
         }(BABYLON.Vector2));
         GUI.Vector2WithInfo = Vector2WithInfo;
         GUI.Vector2WithInfo = Vector2WithInfo;
-        var Matrix2D = /** @class */ (function () {
+        var Matrix2D = (function () {
             function Matrix2D(m00, m01, m10, m11, m20, m21) {
             function Matrix2D(m00, m01, m10, m11, m20, m21) {
                 this.m = new Float32Array(6);
                 this.m = new Float32Array(6);
                 this.fromValues(m00, m01, m10, m11, m20, m21);
                 this.fromValues(m00, m01, m10, m11, m20, m21);
@@ -607,7 +607,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var ValueAndUnit = /** @class */ (function () {
+        var ValueAndUnit = (function () {
             function ValueAndUnit(value, unit, negativeValueAllowed) {
             function ValueAndUnit(value, unit, negativeValueAllowed) {
                 if (unit === void 0) { unit = ValueAndUnit.UNITMODE_PIXEL; }
                 if (unit === void 0) { unit = ValueAndUnit.UNITMODE_PIXEL; }
                 if (negativeValueAllowed === void 0) { negativeValueAllowed = true; }
                 if (negativeValueAllowed === void 0) { negativeValueAllowed = true; }
@@ -725,7 +725,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Control = /** @class */ (function () {
+        var Control = (function () {
             // Functions
             // Functions
             function Control(name) {
             function Control(name) {
                 this.name = name;
                 this.name = name;
@@ -1771,7 +1771,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Container = /** @class */ (function (_super) {
+        var Container = (function (_super) {
             __extends(Container, _super);
             __extends(Container, _super);
             function Container(name) {
             function Container(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -1950,7 +1950,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var StackPanel = /** @class */ (function (_super) {
+        var StackPanel = (function (_super) {
             __extends(StackPanel, _super);
             __extends(StackPanel, _super);
             function StackPanel(name) {
             function StackPanel(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -2092,7 +2092,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Rectangle = /** @class */ (function (_super) {
+        var Rectangle = (function (_super) {
             __extends(Rectangle, _super);
             __extends(Rectangle, _super);
             function Rectangle(name) {
             function Rectangle(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -2208,7 +2208,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Ellipse = /** @class */ (function (_super) {
+        var Ellipse = (function (_super) {
             __extends(Ellipse, _super);
             __extends(Ellipse, _super);
             function Ellipse(name) {
             function Ellipse(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -2274,7 +2274,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Line = /** @class */ (function (_super) {
+        var Line = (function (_super) {
             __extends(Line, _super);
             __extends(Line, _super);
             function Line(name) {
             function Line(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -2474,7 +2474,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Slider = /** @class */ (function (_super) {
+        var Slider = (function (_super) {
             __extends(Slider, _super);
             __extends(Slider, _super);
             function Slider(name) {
             function Slider(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -2684,7 +2684,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Checkbox = /** @class */ (function (_super) {
+        var Checkbox = (function (_super) {
             __extends(Checkbox, _super);
             __extends(Checkbox, _super);
             function Checkbox(name) {
             function Checkbox(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -2800,7 +2800,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var RadioButton = /** @class */ (function (_super) {
+        var RadioButton = (function (_super) {
             __extends(RadioButton, _super);
             __extends(RadioButton, _super);
             function RadioButton(name) {
             function RadioButton(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -2937,7 +2937,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var TextBlock = /** @class */ (function (_super) {
+        var TextBlock = (function (_super) {
             __extends(TextBlock, _super);
             __extends(TextBlock, _super);
             function TextBlock(name, text) {
             function TextBlock(name, text) {
                 if (text === void 0) { text = ""; }
                 if (text === void 0) { text = ""; }
@@ -3146,7 +3146,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Image = /** @class */ (function (_super) {
+        var Image = (function (_super) {
             __extends(Image, _super);
             __extends(Image, _super);
             function Image(name, url) {
             function Image(name, url) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -3388,7 +3388,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var Button = /** @class */ (function (_super) {
+        var Button = (function (_super) {
             __extends(Button, _super);
             __extends(Button, _super);
             function Button(name) {
             function Button(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -3517,7 +3517,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var ColorPicker = /** @class */ (function (_super) {
+        var ColorPicker = (function (_super) {
             __extends(ColorPicker, _super);
             __extends(ColorPicker, _super);
             function ColorPicker(name) {
             function ColorPicker(name) {
                 var _this = _super.call(this, name) || this;
                 var _this = _super.call(this, name) || this;
@@ -3863,7 +3863,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var InputText = /** @class */ (function (_super) {
+        var InputText = (function (_super) {
             __extends(InputText, _super);
             __extends(InputText, _super);
             function InputText(name, text) {
             function InputText(name, text) {
                 if (text === void 0) { text = ""; }
                 if (text === void 0) { text = ""; }
@@ -4112,12 +4112,12 @@ var BABYLON;
                         return;
                         return;
                 }
                 }
                 // Printable characters
                 // Printable characters
-                if ((keyCode === -1) || // Direct access
-                    (keyCode === 32) || // Space
-                    (keyCode > 47 && keyCode < 58) || // Numbers
-                    (keyCode > 64 && keyCode < 91) || // Letters
-                    (keyCode > 185 && keyCode < 193) || // Special characters
-                    (keyCode > 218 && keyCode < 223) || // Special characters
+                if ((keyCode === -1) ||
+                    (keyCode === 32) ||
+                    (keyCode > 47 && keyCode < 58) ||
+                    (keyCode > 64 && keyCode < 91) ||
+                    (keyCode > 185 && keyCode < 193) ||
+                    (keyCode > 218 && keyCode < 223) ||
                     (keyCode > 95 && keyCode < 112)) {
                     (keyCode > 95 && keyCode < 112)) {
                     if (this._cursorOffset === 0) {
                     if (this._cursorOffset === 0) {
                         this.text += key;
                         this.text += key;
@@ -4276,13 +4276,13 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GUI;
     var GUI;
     (function (GUI) {
     (function (GUI) {
-        var KeyPropertySet = /** @class */ (function () {
+        var KeyPropertySet = (function () {
             function KeyPropertySet() {
             function KeyPropertySet() {
             }
             }
             return KeyPropertySet;
             return KeyPropertySet;
         }());
         }());
         GUI.KeyPropertySet = KeyPropertySet;
         GUI.KeyPropertySet = KeyPropertySet;
-        var VirtualKeyboard = /** @class */ (function (_super) {
+        var VirtualKeyboard = (function (_super) {
             __extends(VirtualKeyboard, _super);
             __extends(VirtualKeyboard, _super);
             function VirtualKeyboard() {
             function VirtualKeyboard() {
                 var _this = _super !== null && _super.apply(this, arguments) || this;
                 var _this = _super !== null && _super.apply(this, arguments) || this;

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


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


+ 0 - 3
dist/preview release/inspector/babylon.inspector.d.ts

@@ -139,9 +139,6 @@ declare module INSPECTOR {
             properties: string[];
             properties: string[];
             format: (tex: BABYLON.Texture) => string;
             format: (tex: BABYLON.Texture) => string;
         };
         };
-        'MapTexture': {
-            type: typeof BABYLON.MapTexture;
-        };
         'RenderTargetTexture': {
         'RenderTargetTexture': {
             type: typeof BABYLON.RenderTargetTexture;
             type: typeof BABYLON.RenderTargetTexture;
         };
         };

+ 55 - 64
dist/preview release/inspector/babylon.inspector.js

@@ -1,6 +1,6 @@
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var Inspector = /** @class */ (function () {
+    var Inspector = (function () {
         /** The inspector is created with the given engine.
         /** The inspector is created with the given engine.
          * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
          * If the parameter 'popup' is false, the inspector is created as a right panel on the main window.
          * If the parameter 'popup' is true, the inspector is created in another popup.
          * If the parameter 'popup' is true, the inspector is created in another popup.
@@ -406,9 +406,6 @@ var INSPECTOR;
             ],
             ],
             format: function (tex) { return tex.name; }
             format: function (tex) { return tex.name; }
         },
         },
-        'MapTexture': {
-            type: BABYLON.MapTexture
-        },
         'RenderTargetTexture': {
         'RenderTargetTexture': {
             type: BABYLON.RenderTargetTexture
             type: BABYLON.RenderTargetTexture
         },
         },
@@ -783,7 +780,7 @@ var INSPECTOR;
      * Represents a html div element.
      * Represents a html div element.
      * The div is built when an instance of BasicElement is created.
      * The div is built when an instance of BasicElement is created.
      */
      */
-    var BasicElement = /** @class */ (function () {
+    var BasicElement = (function () {
         function BasicElement() {
         function BasicElement() {
             this._div = INSPECTOR.Helpers.CreateDiv();
             this._div = INSPECTOR.Helpers.CreateDiv();
         }
         }
@@ -810,7 +807,7 @@ var INSPECTOR;
 
 
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var Adapter = /** @class */ (function () {
+    var Adapter = (function () {
         function Adapter(obj) {
         function Adapter(obj) {
             this._obj = obj;
             this._obj = obj;
         }
         }
@@ -865,7 +862,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var CameraAdapter = /** @class */ (function (_super) {
+    var CameraAdapter = (function (_super) {
         __extends(CameraAdapter, _super);
         __extends(CameraAdapter, _super);
         function CameraAdapter(obj) {
         function CameraAdapter(obj) {
             return _super.call(this, obj) || this;
             return _super.call(this, obj) || this;
@@ -914,7 +911,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var PhysicsImpostorAdapter = /** @class */ (function (_super) {
+    var PhysicsImpostorAdapter = (function (_super) {
         __extends(PhysicsImpostorAdapter, _super);
         __extends(PhysicsImpostorAdapter, _super);
         function PhysicsImpostorAdapter(obj, viewer) {
         function PhysicsImpostorAdapter(obj, viewer) {
             var _this = _super.call(this, obj) || this;
             var _this = _super.call(this, obj) || this;
@@ -975,7 +972,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var GUIAdapter = /** @class */ (function (_super) {
+    var GUIAdapter = (function (_super) {
         __extends(GUIAdapter, _super);
         __extends(GUIAdapter, _super);
         function GUIAdapter(obj) {
         function GUIAdapter(obj) {
             return _super.call(this, obj) || this;
             return _super.call(this, obj) || this;
@@ -1026,7 +1023,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var SoundAdapter = /** @class */ (function (_super) {
+    var SoundAdapter = (function (_super) {
         __extends(SoundAdapter, _super);
         __extends(SoundAdapter, _super);
         function SoundAdapter(obj) {
         function SoundAdapter(obj) {
             return _super.call(this, obj) || this;
             return _super.call(this, obj) || this;
@@ -1082,7 +1079,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var TextureAdapter = /** @class */ (function (_super) {
+    var TextureAdapter = (function (_super) {
         __extends(TextureAdapter, _super);
         __extends(TextureAdapter, _super);
         function TextureAdapter(obj) {
         function TextureAdapter(obj) {
             return _super.call(this, obj) || this;
             return _super.call(this, obj) || this;
@@ -1128,7 +1125,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var LightAdapter = /** @class */ (function (_super) {
+    var LightAdapter = (function (_super) {
         __extends(LightAdapter, _super);
         __extends(LightAdapter, _super);
         function LightAdapter(obj) {
         function LightAdapter(obj) {
             return _super.call(this, obj) || this;
             return _super.call(this, obj) || this;
@@ -1179,7 +1176,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var MaterialAdapter = /** @class */ (function (_super) {
+    var MaterialAdapter = (function (_super) {
         __extends(MaterialAdapter, _super);
         __extends(MaterialAdapter, _super);
         function MaterialAdapter(obj) {
         function MaterialAdapter(obj) {
             return _super.call(this, obj) || this;
             return _super.call(this, obj) || this;
@@ -1223,7 +1220,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var MeshAdapter = /** @class */ (function (_super) {
+    var MeshAdapter = (function (_super) {
         __extends(MeshAdapter, _super);
         __extends(MeshAdapter, _super);
         function MeshAdapter(obj) {
         function MeshAdapter(obj) {
             return _super.call(this, obj) || this;
             return _super.call(this, obj) || this;
@@ -1313,7 +1310,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var DetailPanel = /** @class */ (function (_super) {
+    var DetailPanel = (function (_super) {
         __extends(DetailPanel, _super);
         __extends(DetailPanel, _super);
         function DetailPanel(dr) {
         function DetailPanel(dr) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -1461,7 +1458,7 @@ var INSPECTOR;
     /**
     /**
      * A property is a link between a data (string) and an object.
      * A property is a link between a data (string) and an object.
      */
      */
-    var Property = /** @class */ (function () {
+    var Property = (function () {
         function Property(prop, obj) {
         function Property(prop, obj) {
             this._property = prop;
             this._property = prop;
             this._obj = obj;
             this._obj = obj;
@@ -1509,7 +1506,7 @@ var INSPECTOR;
 
 
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var PropertyFormatter = /** @class */ (function () {
+    var PropertyFormatter = (function () {
         function PropertyFormatter() {
         function PropertyFormatter() {
         }
         }
         /**
         /**
@@ -1536,7 +1533,7 @@ var INSPECTOR;
      * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
      * If this instance has no link to other instances, its type is ALWAYS a simple one (see above).
      *
      *
      */
      */
-    var PropertyLine = /** @class */ (function () {
+    var PropertyLine = (function () {
         function PropertyLine(prop, parent, level) {
         function PropertyLine(prop, parent, level) {
             if (level === void 0) { level = 0; }
             if (level === void 0) { level = 0; }
             // If the type is complex, this property will have child to update
             // If the type is complex, this property will have child to update
@@ -1975,7 +1972,7 @@ var INSPECTOR;
     /**
     /**
     * Display a very small div corresponding to the given color
     * Display a very small div corresponding to the given color
     */
     */
-    var ColorElement = /** @class */ (function (_super) {
+    var ColorElement = (function (_super) {
         __extends(ColorElement, _super);
         __extends(ColorElement, _super);
         // The color as hexadecimal string
         // The color as hexadecimal string
         function ColorElement(color) {
         function ColorElement(color) {
@@ -2025,7 +2022,7 @@ var INSPECTOR;
      * Represents a html div element.
      * Represents a html div element.
      * The div is built when an instance of BasicElement is created.
      * The div is built when an instance of BasicElement is created.
      */
      */
-    var ColorPickerElement = /** @class */ (function (_super) {
+    var ColorPickerElement = (function (_super) {
         __extends(ColorPickerElement, _super);
         __extends(ColorPickerElement, _super);
         function ColorPickerElement(color, propertyLine) {
         function ColorPickerElement(color, propertyLine) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -2095,7 +2092,7 @@ var INSPECTOR;
     * Display a very small div. A new canvas is created, with a new Babylon.js scene, containing only the
     * Display a very small div. A new canvas is created, with a new Babylon.js scene, containing only the
     * cube texture in a cube
     * cube texture in a cube
     */
     */
-    var CubeTextureElement = /** @class */ (function (_super) {
+    var CubeTextureElement = (function (_super) {
         __extends(CubeTextureElement, _super);
         __extends(CubeTextureElement, _super);
         /** The texture given as a parameter should be cube. */
         /** The texture given as a parameter should be cube. */
         function CubeTextureElement(tex) {
         function CubeTextureElement(tex) {
@@ -2210,7 +2207,7 @@ var INSPECTOR;
     * Display a very small div. A new canvas is created, with a new Babylon.js scene, containing only the
     * Display a very small div. A new canvas is created, with a new Babylon.js scene, containing only the
     * cube texture in a cube
     * cube texture in a cube
     */
     */
-    var HDRCubeTextureElement = /** @class */ (function (_super) {
+    var HDRCubeTextureElement = (function (_super) {
         __extends(HDRCubeTextureElement, _super);
         __extends(HDRCubeTextureElement, _super);
         /** The texture given as a parameter should be cube. */
         /** The texture given as a parameter should be cube. */
         function HDRCubeTextureElement(tex) {
         function HDRCubeTextureElement(tex) {
@@ -2254,7 +2251,7 @@ var INSPECTOR;
      * A search bar can be used to filter elements in the tree panel.
      * A search bar can be used to filter elements in the tree panel.
      * At each keypress on the input, the treepanel will be filtered.
      * At each keypress on the input, the treepanel will be filtered.
      */
      */
-    var SearchBar = /** @class */ (function (_super) {
+    var SearchBar = (function (_super) {
         __extends(SearchBar, _super);
         __extends(SearchBar, _super);
         function SearchBar(tab) {
         function SearchBar(tab) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -2300,7 +2297,7 @@ var INSPECTOR;
     /**
     /**
     * Display a very small div corresponding to the given texture. On mouse over, display the full image
     * Display a very small div corresponding to the given texture. On mouse over, display the full image
     */
     */
-    var TextureElement = /** @class */ (function (_super) {
+    var TextureElement = (function (_super) {
         __extends(TextureElement, _super);
         __extends(TextureElement, _super);
         function TextureElement(tex) {
         function TextureElement(tex) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -2336,7 +2333,7 @@ var INSPECTOR;
     /**
     /**
      * Creates a tooltip for the parent of the given html element
      * Creates a tooltip for the parent of the given html element
      */
      */
-    var Tooltip = /** @class */ (function () {
+    var Tooltip = (function () {
         function Tooltip(elem, tip, attachTo) {
         function Tooltip(elem, tip, attachTo) {
             var _this = this;
             var _this = this;
             this._elem = elem;
             this._elem = elem;
@@ -2357,7 +2354,7 @@ var INSPECTOR;
 
 
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var Helpers = /** @class */ (function () {
+    var Helpers = (function () {
         function Helpers() {
         function Helpers() {
         }
         }
         /**
         /**
@@ -2544,7 +2541,7 @@ var INSPECTOR;
 
 
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var Scheduler = /** @class */ (function () {
+    var Scheduler = (function () {
         function Scheduler() {
         function Scheduler() {
             /** Is this scheduler in pause ? */
             /** Is this scheduler in pause ? */
             this.pause = false;
             this.pause = false;
@@ -2597,7 +2594,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var Tab = /** @class */ (function (_super) {
+    var Tab = (function (_super) {
         __extends(Tab, _super);
         __extends(Tab, _super);
         function Tab(tabbar, name) {
         function Tab(tabbar, name) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -2676,7 +2673,7 @@ var INSPECTOR;
      * in which properties will be displayed.
      * in which properties will be displayed.
      * Both panels are separated by a resize bar
      * Both panels are separated by a resize bar
      */
      */
-    var PropertyTab = /** @class */ (function (_super) {
+    var PropertyTab = (function (_super) {
         __extends(PropertyTab, _super);
         __extends(PropertyTab, _super);
         function PropertyTab(tabbar, name, insp) {
         function PropertyTab(tabbar, name, insp) {
             var _this = _super.call(this, tabbar, name) || this;
             var _this = _super.call(this, tabbar, name) || this;
@@ -2820,7 +2817,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var CameraTab = /** @class */ (function (_super) {
+    var CameraTab = (function (_super) {
         __extends(CameraTab, _super);
         __extends(CameraTab, _super);
         function CameraTab(tabbar, inspector) {
         function CameraTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Camera', inspector) || this;
             return _super.call(this, tabbar, 'Camera', inspector) || this;
@@ -2853,7 +2850,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var GUITab = /** @class */ (function (_super) {
+    var GUITab = (function (_super) {
         __extends(GUITab, _super);
         __extends(GUITab, _super);
         function GUITab(tabbar, inspector) {
         function GUITab(tabbar, inspector) {
             return _super.call(this, tabbar, 'GUI', inspector) || this;
             return _super.call(this, tabbar, 'GUI', inspector) || this;
@@ -2908,7 +2905,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var PhysicsTab = /** @class */ (function (_super) {
+    var PhysicsTab = (function (_super) {
         __extends(PhysicsTab, _super);
         __extends(PhysicsTab, _super);
         function PhysicsTab(tabbar, inspector) {
         function PhysicsTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Physics', inspector) || this;
             return _super.call(this, tabbar, 'Physics', inspector) || this;
@@ -2948,7 +2945,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var SoundTab = /** @class */ (function (_super) {
+    var SoundTab = (function (_super) {
         __extends(SoundTab, _super);
         __extends(SoundTab, _super);
         function SoundTab(tabbar, inspector) {
         function SoundTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Audio', inspector) || this;
             return _super.call(this, tabbar, 'Audio', inspector) || this;
@@ -2985,7 +2982,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var TextureTab = /** @class */ (function (_super) {
+    var TextureTab = (function (_super) {
         __extends(TextureTab, _super);
         __extends(TextureTab, _super);
         function TextureTab(tabbar, inspector) {
         function TextureTab(tabbar, inspector) {
             var _this = _super.call(this, tabbar, 'Textures') || this;
             var _this = _super.call(this, tabbar, 'Textures') || this;
@@ -3054,13 +3051,7 @@ var INSPECTOR;
             for (var i = 0; i < 5; i++) {
             for (var i = 0; i < 5; i++) {
                 imgs.push(INSPECTOR.Helpers.CreateElement('img', 'texture-image', this._imagePanel));
                 imgs.push(INSPECTOR.Helpers.CreateElement('img', 'texture-image', this._imagePanel));
             }
             }
-            if (texture instanceof BABYLON.MapTexture) {
-                // instance of Map texture
-                texture.bindTextureForPosSize(new BABYLON.Vector2(0, 0), new BABYLON.Size(texture.getSize().width, texture.getSize().height), false);
-                BABYLON.Tools.DumpFramebuffer(texture.getSize().width, texture.getSize().height, this._inspector.scene.getEngine(), function (data) { return img.src = data; });
-                texture.unbindTexture();
-            }
-            else if (texture instanceof BABYLON.RenderTargetTexture) {
+            if (texture instanceof BABYLON.RenderTargetTexture) {
                 // RenderTarget textures
                 // RenderTarget textures
                 var scene = this._inspector.scene;
                 var scene = this._inspector.scene;
                 var engine_1 = scene.getEngine();
                 var engine_1 = scene.getEngine();
@@ -3160,7 +3151,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var LightTab = /** @class */ (function (_super) {
+    var LightTab = (function (_super) {
         __extends(LightTab, _super);
         __extends(LightTab, _super);
         function LightTab(tabbar, inspector) {
         function LightTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Light', inspector) || this;
             return _super.call(this, tabbar, 'Light', inspector) || this;
@@ -3193,7 +3184,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var MaterialTab = /** @class */ (function (_super) {
+    var MaterialTab = (function (_super) {
         __extends(MaterialTab, _super);
         __extends(MaterialTab, _super);
         function MaterialTab(tabbar, inspector) {
         function MaterialTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Material', inspector) || this;
             return _super.call(this, tabbar, 'Material', inspector) || this;
@@ -3227,7 +3218,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var MeshTab = /** @class */ (function (_super) {
+    var MeshTab = (function (_super) {
         __extends(MeshTab, _super);
         __extends(MeshTab, _super);
         function MeshTab(tabbar, inspector) {
         function MeshTab(tabbar, inspector) {
             return _super.call(this, tabbar, 'Mesh', inspector) || this;
             return _super.call(this, tabbar, 'Mesh', inspector) || this;
@@ -3299,7 +3290,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var SceneTab = /** @class */ (function (_super) {
+    var SceneTab = (function (_super) {
         __extends(SceneTab, _super);
         __extends(SceneTab, _super);
         function SceneTab(tabbar, insp) {
         function SceneTab(tabbar, insp) {
             var _this = _super.call(this, tabbar, 'Scene') || this;
             var _this = _super.call(this, tabbar, 'Scene') || this;
@@ -3486,7 +3477,7 @@ var INSPECTOR;
      * - hook all console.log call and display them in this panel (and in the browser console as well)
      * - hook all console.log call and display them in this panel (and in the browser console as well)
      * - display all Babylon logs (called with Tools.Log...)
      * - display all Babylon logs (called with Tools.Log...)
      */
      */
-    var ConsoleTab = /** @class */ (function (_super) {
+    var ConsoleTab = (function (_super) {
         __extends(ConsoleTab, _super);
         __extends(ConsoleTab, _super);
         function ConsoleTab(tabbar, insp) {
         function ConsoleTab(tabbar, insp) {
             var _this = _super.call(this, tabbar, 'Console') || this;
             var _this = _super.call(this, tabbar, 'Console') || this;
@@ -3620,7 +3611,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var StatsTab = /** @class */ (function (_super) {
+    var StatsTab = (function (_super) {
         __extends(StatsTab, _super);
         __extends(StatsTab, _super);
         function StatsTab(tabbar, insp) {
         function StatsTab(tabbar, insp) {
             var _this = _super.call(this, tabbar, 'Stats') || this;
             var _this = _super.call(this, tabbar, 'Stats') || this;
@@ -3909,7 +3900,7 @@ var INSPECTOR;
      * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
      * A tab bar will contains each view the inspector can have : Canvas2D, Meshes...
      * The default active tab is the first one of the list.
      * The default active tab is the first one of the list.
      */
      */
-    var TabBar = /** @class */ (function (_super) {
+    var TabBar = (function (_super) {
         __extends(TabBar, _super);
         __extends(TabBar, _super);
         function TabBar(inspector, initialTab) {
         function TabBar(inspector, initialTab) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4103,7 +4094,7 @@ var INSPECTOR;
 
 
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var AbstractTool = /** @class */ (function () {
+    var AbstractTool = (function () {
         function AbstractTool(icon, parent, inspector, tooltip) {
         function AbstractTool(icon, parent, inspector, tooltip) {
             var _this = this;
             var _this = this;
             this._inspector = inspector;
             this._inspector = inspector;
@@ -4150,7 +4141,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var PauseScheduleTool = /** @class */ (function (_super) {
+    var PauseScheduleTool = (function (_super) {
         __extends(PauseScheduleTool, _super);
         __extends(PauseScheduleTool, _super);
         function PauseScheduleTool(parent, inspector) {
         function PauseScheduleTool(parent, inspector) {
             var _this = _super.call(this, 'fa-pause', parent, inspector, 'Pause the automatic update of properties') || this;
             var _this = _super.call(this, 'fa-pause', parent, inspector, 'Pause the automatic update of properties') || this;
@@ -4186,7 +4177,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var PickTool = /** @class */ (function (_super) {
+    var PickTool = (function (_super) {
         __extends(PickTool, _super);
         __extends(PickTool, _super);
         function PickTool(parent, inspector) {
         function PickTool(parent, inspector) {
             var _this = _super.call(this, 'fa-mouse-pointer', parent, inspector, 'Select a mesh in the scene') || this;
             var _this = _super.call(this, 'fa-mouse-pointer', parent, inspector, 'Select a mesh in the scene') || this;
@@ -4247,7 +4238,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var PopupTool = /** @class */ (function (_super) {
+    var PopupTool = (function (_super) {
         __extends(PopupTool, _super);
         __extends(PopupTool, _super);
         function PopupTool(parent, inspector) {
         function PopupTool(parent, inspector) {
             return _super.call(this, 'fa-external-link', parent, inspector, 'Open the inspector in a popup') || this;
             return _super.call(this, 'fa-external-link', parent, inspector, 'Open the inspector in a popup') || this;
@@ -4273,7 +4264,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var RefreshTool = /** @class */ (function (_super) {
+    var RefreshTool = (function (_super) {
         __extends(RefreshTool, _super);
         __extends(RefreshTool, _super);
         function RefreshTool(parent, inspector) {
         function RefreshTool(parent, inspector) {
             return _super.call(this, 'fa-refresh', parent, inspector, 'Refresh the current tab') || this;
             return _super.call(this, 'fa-refresh', parent, inspector, 'Refresh the current tab') || this;
@@ -4299,7 +4290,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var LabelTool = /** @class */ (function (_super) {
+    var LabelTool = (function (_super) {
         __extends(LabelTool, _super);
         __extends(LabelTool, _super);
         function LabelTool(parent, inspector) {
         function LabelTool(parent, inspector) {
             var _this = _super.call(this, 'fa-tags', parent, inspector, 'Display mesh names on the canvas') || this;
             var _this = _super.call(this, 'fa-tags', parent, inspector, 'Display mesh names on the canvas') || this;
@@ -4416,7 +4407,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var Toolbar = /** @class */ (function (_super) {
+    var Toolbar = (function (_super) {
         __extends(Toolbar, _super);
         __extends(Toolbar, _super);
         function Toolbar(inspector) {
         function Toolbar(inspector) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4482,7 +4473,7 @@ var INSPECTOR;
     /**
     /**
      * Removes the inspector panel
      * Removes the inspector panel
      */
      */
-    var DisposeTool = /** @class */ (function (_super) {
+    var DisposeTool = (function (_super) {
         __extends(DisposeTool, _super);
         __extends(DisposeTool, _super);
         function DisposeTool(parent, inspector) {
         function DisposeTool(parent, inspector) {
             return _super.call(this, 'fa-times', parent, inspector, 'Close the inspector panel') || this;
             return _super.call(this, 'fa-times', parent, inspector, 'Close the inspector panel') || this;
@@ -4508,7 +4499,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var TreeItem = /** @class */ (function (_super) {
+    var TreeItem = (function (_super) {
         __extends(TreeItem, _super);
         __extends(TreeItem, _super);
         function TreeItem(tab, obj) {
         function TreeItem(tab, obj) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4665,7 +4656,7 @@ var INSPECTOR;
 
 
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var AbstractTreeTool = /** @class */ (function () {
+    var AbstractTreeTool = (function () {
         function AbstractTreeTool() {
         function AbstractTreeTool() {
             /** Is the tool enabled ? */
             /** Is the tool enabled ? */
             this._on = false;
             this._on = false;
@@ -4710,7 +4701,7 @@ var INSPECTOR;
     /**
     /**
      * Checkbox to display/hide the primitive
      * Checkbox to display/hide the primitive
      */
      */
-    var BoundingBox = /** @class */ (function (_super) {
+    var BoundingBox = (function (_super) {
         __extends(BoundingBox, _super);
         __extends(BoundingBox, _super);
         function BoundingBox(obj) {
         function BoundingBox(obj) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4757,7 +4748,7 @@ var INSPECTOR;
     /**
     /**
      *
      *
      */
      */
-    var CameraPOV = /** @class */ (function (_super) {
+    var CameraPOV = (function (_super) {
         __extends(CameraPOV, _super);
         __extends(CameraPOV, _super);
         function CameraPOV(camera) {
         function CameraPOV(camera) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4801,7 +4792,7 @@ var INSPECTOR;
     /**
     /**
      *
      *
      */
      */
-    var SoundInteractions = /** @class */ (function (_super) {
+    var SoundInteractions = (function (_super) {
         __extends(SoundInteractions, _super);
         __extends(SoundInteractions, _super);
         function SoundInteractions(playSound) {
         function SoundInteractions(playSound) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4849,7 +4840,7 @@ var INSPECTOR;
     /**
     /**
      * Checkbox to display/hide the primitive
      * Checkbox to display/hide the primitive
      */
      */
-    var Checkbox = /** @class */ (function (_super) {
+    var Checkbox = (function (_super) {
         __extends(Checkbox, _super);
         __extends(Checkbox, _super);
         function Checkbox(obj) {
         function Checkbox(obj) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4899,7 +4890,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var INSPECTOR;
 var INSPECTOR;
 (function (INSPECTOR) {
 (function (INSPECTOR) {
-    var DebugArea = /** @class */ (function (_super) {
+    var DebugArea = (function (_super) {
         __extends(DebugArea, _super);
         __extends(DebugArea, _super);
         function DebugArea(obj) {
         function DebugArea(obj) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4939,7 +4930,7 @@ var INSPECTOR;
     /**
     /**
      * Checkbox to display/hide the primitive
      * Checkbox to display/hide the primitive
      */
      */
-    var Info = /** @class */ (function (_super) {
+    var Info = (function (_super) {
         __extends(Info, _super);
         __extends(Info, _super);
         function Info(obj) {
         function Info(obj) {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;

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


+ 9 - 9
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -11,7 +11,7 @@ var BABYLON;
         // Sets the useRightHandedSystem flag on the scene.
         // Sets the useRightHandedSystem flag on the scene.
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
-    var GLTFFileLoader = /** @class */ (function () {
+    var GLTFFileLoader = (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // V2 options
             // V2 options
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
@@ -218,7 +218,7 @@ var BABYLON;
         return GLTFFileLoader;
         return GLTFFileLoader;
     }());
     }());
     BABYLON.GLTFFileLoader = GLTFFileLoader;
     BABYLON.GLTFFileLoader = GLTFFileLoader;
-    var BinaryReader = /** @class */ (function () {
+    var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
         function BinaryReader(arrayBuffer) {
             this._arrayBuffer = arrayBuffer;
             this._arrayBuffer = arrayBuffer;
             this._dataView = new DataView(arrayBuffer);
             this._dataView = new DataView(arrayBuffer);
@@ -364,7 +364,7 @@ var BABYLON;
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
         })(ETokenType || (ETokenType = {}));
         })(ETokenType || (ETokenType = {}));
-        var Tokenizer = /** @class */ (function () {
+        var Tokenizer = (function () {
             function Tokenizer(toParse) {
             function Tokenizer(toParse) {
                 this._pos = 0;
                 this._pos = 0;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
@@ -1292,7 +1292,7 @@ var BABYLON;
         /**
         /**
         * Implementation of the base glTF spec
         * Implementation of the base glTF spec
         */
         */
-        var GLTFLoaderBase = /** @class */ (function () {
+        var GLTFLoaderBase = (function () {
             function GLTFLoaderBase() {
             function GLTFLoaderBase() {
             }
             }
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
@@ -1587,7 +1587,7 @@ var BABYLON;
         /**
         /**
         * glTF V1 Loader
         * glTF V1 Loader
         */
         */
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader() {
             function GLTFLoader() {
             }
             }
             GLTFLoader.RegisterExtension = function (extension) {
             GLTFLoader.RegisterExtension = function (extension) {
@@ -1771,7 +1771,7 @@ var BABYLON;
         /**
         /**
         * Utils functions for GLTF
         * Utils functions for GLTF
         */
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             function GLTFUtils() {
             }
             }
             /**
             /**
@@ -2021,7 +2021,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF1;
     var GLTF1;
     (function (GLTF1) {
     (function (GLTF1) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension(name) {
             function GLTFLoaderExtension(name) {
                 this._name = name;
                 this._name = name;
             }
             }
@@ -2175,7 +2175,7 @@ var BABYLON;
         var BinaryExtensionBufferName = "binary_glTF";
         var BinaryExtensionBufferName = "binary_glTF";
         ;
         ;
         ;
         ;
-        var GLTFBinaryExtension = /** @class */ (function (_super) {
+        var GLTFBinaryExtension = (function (_super) {
             __extends(GLTFBinaryExtension, _super);
             __extends(GLTFBinaryExtension, _super);
             function GLTFBinaryExtension() {
             function GLTFBinaryExtension() {
                 return _super.call(this, "KHR_binary_glTF") || this;
                 return _super.call(this, "KHR_binary_glTF") || this;
@@ -2252,7 +2252,7 @@ var BABYLON;
         ;
         ;
         ;
         ;
         ;
         ;
-        var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
+        var GLTFMaterialsCommonExtension = (function (_super) {
             __extends(GLTFMaterialsCommonExtension, _super);
             __extends(GLTFMaterialsCommonExtension, _super);
             function GLTFMaterialsCommonExtension() {
             function GLTFMaterialsCommonExtension() {
                 return _super.call(this, "KHR_materials_common") || this;
                 return _super.call(this, "KHR_materials_common") || this;

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


+ 8 - 8
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -11,7 +11,7 @@ var BABYLON;
         // Sets the useRightHandedSystem flag on the scene.
         // Sets the useRightHandedSystem flag on the scene.
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
-    var GLTFFileLoader = /** @class */ (function () {
+    var GLTFFileLoader = (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // V2 options
             // V2 options
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
@@ -218,7 +218,7 @@ var BABYLON;
         return GLTFFileLoader;
         return GLTFFileLoader;
     }());
     }());
     BABYLON.GLTFFileLoader = GLTFFileLoader;
     BABYLON.GLTFFileLoader = GLTFFileLoader;
-    var BinaryReader = /** @class */ (function () {
+    var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
         function BinaryReader(arrayBuffer) {
             this._arrayBuffer = arrayBuffer;
             this._arrayBuffer = arrayBuffer;
             this._dataView = new DataView(arrayBuffer);
             this._dataView = new DataView(arrayBuffer);
@@ -309,7 +309,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
-        var GLTFLoaderTracker = /** @class */ (function () {
+        var GLTFLoaderTracker = (function () {
             function GLTFLoaderTracker(onComplete) {
             function GLTFLoaderTracker(onComplete) {
                 this._pendingCount = 0;
                 this._pendingCount = 0;
                 this._callback = onComplete;
                 this._callback = onComplete;
@@ -324,7 +324,7 @@ var BABYLON;
             };
             };
             return GLTFLoaderTracker;
             return GLTFLoaderTracker;
         }());
         }());
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader(parent) {
             function GLTFLoader(parent) {
                 this._renderReady = false;
                 this._renderReady = false;
                 this._disposed = false;
                 this._disposed = false;
@@ -1541,7 +1541,7 @@ var BABYLON;
         /**
         /**
         * Utils functions for GLTF
         * Utils functions for GLTF
         */
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             function GLTFUtils() {
             }
             }
             /**
             /**
@@ -1639,7 +1639,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension() {
             function GLTFLoaderExtension() {
                 this.enabled = true;
                 this.enabled = true;
             }
             }
@@ -1715,7 +1715,7 @@ var BABYLON;
         var Extensions;
         var Extensions;
         (function (Extensions) {
         (function (Extensions) {
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
-            var MSFTLOD = /** @class */ (function (_super) {
+            var MSFTLOD = (function (_super) {
                 __extends(MSFTLOD, _super);
                 __extends(MSFTLOD, _super);
                 function MSFTLOD() {
                 function MSFTLOD() {
                     return _super !== null && _super.apply(this, arguments) || this;
                     return _super !== null && _super.apply(this, arguments) || this;
@@ -1831,7 +1831,7 @@ var BABYLON;
     (function (GLTF2) {
     (function (GLTF2) {
         var Extensions;
         var Extensions;
         (function (Extensions) {
         (function (Extensions) {
-            var KHRMaterialsPbrSpecularGlossiness = /** @class */ (function (_super) {
+            var KHRMaterialsPbrSpecularGlossiness = (function (_super) {
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 function KHRMaterialsPbrSpecularGlossiness() {
                 function KHRMaterialsPbrSpecularGlossiness() {
                     return _super !== null && _super.apply(this, arguments) || this;
                     return _super !== null && _super.apply(this, arguments) || this;

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


+ 15 - 15
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -11,7 +11,7 @@ var BABYLON;
         // Sets the useRightHandedSystem flag on the scene.
         // Sets the useRightHandedSystem flag on the scene.
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
-    var GLTFFileLoader = /** @class */ (function () {
+    var GLTFFileLoader = (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // V2 options
             // V2 options
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
@@ -218,7 +218,7 @@ var BABYLON;
         return GLTFFileLoader;
         return GLTFFileLoader;
     }());
     }());
     BABYLON.GLTFFileLoader = GLTFFileLoader;
     BABYLON.GLTFFileLoader = GLTFFileLoader;
-    var BinaryReader = /** @class */ (function () {
+    var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
         function BinaryReader(arrayBuffer) {
             this._arrayBuffer = arrayBuffer;
             this._arrayBuffer = arrayBuffer;
             this._dataView = new DataView(arrayBuffer);
             this._dataView = new DataView(arrayBuffer);
@@ -364,7 +364,7 @@ var BABYLON;
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
         })(ETokenType || (ETokenType = {}));
         })(ETokenType || (ETokenType = {}));
-        var Tokenizer = /** @class */ (function () {
+        var Tokenizer = (function () {
             function Tokenizer(toParse) {
             function Tokenizer(toParse) {
                 this._pos = 0;
                 this._pos = 0;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
@@ -1292,7 +1292,7 @@ var BABYLON;
         /**
         /**
         * Implementation of the base glTF spec
         * Implementation of the base glTF spec
         */
         */
-        var GLTFLoaderBase = /** @class */ (function () {
+        var GLTFLoaderBase = (function () {
             function GLTFLoaderBase() {
             function GLTFLoaderBase() {
             }
             }
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
@@ -1587,7 +1587,7 @@ var BABYLON;
         /**
         /**
         * glTF V1 Loader
         * glTF V1 Loader
         */
         */
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader() {
             function GLTFLoader() {
             }
             }
             GLTFLoader.RegisterExtension = function (extension) {
             GLTFLoader.RegisterExtension = function (extension) {
@@ -1771,7 +1771,7 @@ var BABYLON;
         /**
         /**
         * Utils functions for GLTF
         * Utils functions for GLTF
         */
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             function GLTFUtils() {
             }
             }
             /**
             /**
@@ -2021,7 +2021,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF1;
     var GLTF1;
     (function (GLTF1) {
     (function (GLTF1) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension(name) {
             function GLTFLoaderExtension(name) {
                 this._name = name;
                 this._name = name;
             }
             }
@@ -2175,7 +2175,7 @@ var BABYLON;
         var BinaryExtensionBufferName = "binary_glTF";
         var BinaryExtensionBufferName = "binary_glTF";
         ;
         ;
         ;
         ;
-        var GLTFBinaryExtension = /** @class */ (function (_super) {
+        var GLTFBinaryExtension = (function (_super) {
             __extends(GLTFBinaryExtension, _super);
             __extends(GLTFBinaryExtension, _super);
             function GLTFBinaryExtension() {
             function GLTFBinaryExtension() {
                 return _super.call(this, "KHR_binary_glTF") || this;
                 return _super.call(this, "KHR_binary_glTF") || this;
@@ -2252,7 +2252,7 @@ var BABYLON;
         ;
         ;
         ;
         ;
         ;
         ;
-        var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
+        var GLTFMaterialsCommonExtension = (function (_super) {
             __extends(GLTFMaterialsCommonExtension, _super);
             __extends(GLTFMaterialsCommonExtension, _super);
             function GLTFMaterialsCommonExtension() {
             function GLTFMaterialsCommonExtension() {
                 return _super.call(this, "KHR_materials_common") || this;
                 return _super.call(this, "KHR_materials_common") || this;
@@ -2415,7 +2415,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
-        var GLTFLoaderTracker = /** @class */ (function () {
+        var GLTFLoaderTracker = (function () {
             function GLTFLoaderTracker(onComplete) {
             function GLTFLoaderTracker(onComplete) {
                 this._pendingCount = 0;
                 this._pendingCount = 0;
                 this._callback = onComplete;
                 this._callback = onComplete;
@@ -2430,7 +2430,7 @@ var BABYLON;
             };
             };
             return GLTFLoaderTracker;
             return GLTFLoaderTracker;
         }());
         }());
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader(parent) {
             function GLTFLoader(parent) {
                 this._renderReady = false;
                 this._renderReady = false;
                 this._disposed = false;
                 this._disposed = false;
@@ -3647,7 +3647,7 @@ var BABYLON;
         /**
         /**
         * Utils functions for GLTF
         * Utils functions for GLTF
         */
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             function GLTFUtils() {
             }
             }
             /**
             /**
@@ -3745,7 +3745,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension() {
             function GLTFLoaderExtension() {
                 this.enabled = true;
                 this.enabled = true;
             }
             }
@@ -3821,7 +3821,7 @@ var BABYLON;
         var Extensions;
         var Extensions;
         (function (Extensions) {
         (function (Extensions) {
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
-            var MSFTLOD = /** @class */ (function (_super) {
+            var MSFTLOD = (function (_super) {
                 __extends(MSFTLOD, _super);
                 __extends(MSFTLOD, _super);
                 function MSFTLOD() {
                 function MSFTLOD() {
                     return _super !== null && _super.apply(this, arguments) || this;
                     return _super !== null && _super.apply(this, arguments) || this;
@@ -3937,7 +3937,7 @@ var BABYLON;
     (function (GLTF2) {
     (function (GLTF2) {
         var Extensions;
         var Extensions;
         (function (Extensions) {
         (function (Extensions) {
-            var KHRMaterialsPbrSpecularGlossiness = /** @class */ (function (_super) {
+            var KHRMaterialsPbrSpecularGlossiness = (function (_super) {
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 function KHRMaterialsPbrSpecularGlossiness() {
                 function KHRMaterialsPbrSpecularGlossiness() {
                     return _super !== null && _super.apply(this, arguments) || this;
                     return _super !== null && _super.apply(this, arguments) || this;

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


+ 2 - 2
dist/preview release/loaders/babylon.objFileLoader.js

@@ -4,7 +4,7 @@ var BABYLON;
     /**
     /**
      * Class reading and parsing the MTL file bundled with the obj file.
      * Class reading and parsing the MTL file bundled with the obj file.
      */
      */
-    var MTLFileLoader = /** @class */ (function () {
+    var MTLFileLoader = (function () {
         function MTLFileLoader() {
         function MTLFileLoader() {
             // All material loaded from the mtl will be set here
             // All material loaded from the mtl will be set here
             this.materials = [];
             this.materials = [];
@@ -203,7 +203,7 @@ var BABYLON;
         return MTLFileLoader;
         return MTLFileLoader;
     }());
     }());
     BABYLON.MTLFileLoader = MTLFileLoader;
     BABYLON.MTLFileLoader = MTLFileLoader;
-    var OBJFileLoader = /** @class */ (function () {
+    var OBJFileLoader = (function () {
         function OBJFileLoader() {
         function OBJFileLoader() {
             this.name = "obj";
             this.name = "obj";
             this.extensions = ".obj";
             this.extensions = ".obj";

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


+ 1 - 1
dist/preview release/loaders/babylon.stlFileLoader.js

@@ -1,7 +1,7 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var STLFileLoader = /** @class */ (function () {
+    var STLFileLoader = (function () {
         function STLFileLoader() {
         function STLFileLoader() {
             this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
             this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
             this.facetsPattern = /facet([\s\S]*?)endfacet/g;
             this.facetsPattern = /facet([\s\S]*?)endfacet/g;

+ 18 - 18
dist/preview release/loaders/babylonjs.loaders.js

@@ -19,7 +19,7 @@ var __extends = (this && this.__extends) || (function () {
         
         
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var STLFileLoader = /** @class */ (function () {
+    var STLFileLoader = (function () {
         function STLFileLoader() {
         function STLFileLoader() {
             this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
             this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
             this.facetsPattern = /facet([\s\S]*?)endfacet/g;
             this.facetsPattern = /facet([\s\S]*?)endfacet/g;
@@ -187,7 +187,7 @@ var BABYLON;
     /**
     /**
      * Class reading and parsing the MTL file bundled with the obj file.
      * Class reading and parsing the MTL file bundled with the obj file.
      */
      */
-    var MTLFileLoader = /** @class */ (function () {
+    var MTLFileLoader = (function () {
         function MTLFileLoader() {
         function MTLFileLoader() {
             // All material loaded from the mtl will be set here
             // All material loaded from the mtl will be set here
             this.materials = [];
             this.materials = [];
@@ -386,7 +386,7 @@ var BABYLON;
         return MTLFileLoader;
         return MTLFileLoader;
     }());
     }());
     BABYLON.MTLFileLoader = MTLFileLoader;
     BABYLON.MTLFileLoader = MTLFileLoader;
-    var OBJFileLoader = /** @class */ (function () {
+    var OBJFileLoader = (function () {
         function OBJFileLoader() {
         function OBJFileLoader() {
             this.name = "obj";
             this.name = "obj";
             this.extensions = ".obj";
             this.extensions = ".obj";
@@ -982,7 +982,7 @@ var BABYLON;
         // Sets the useRightHandedSystem flag on the scene.
         // Sets the useRightHandedSystem flag on the scene.
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
         GLTFLoaderCoordinateSystemMode[GLTFLoaderCoordinateSystemMode["FORCE_RIGHT_HANDED"] = 2] = "FORCE_RIGHT_HANDED";
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
     })(GLTFLoaderCoordinateSystemMode = BABYLON.GLTFLoaderCoordinateSystemMode || (BABYLON.GLTFLoaderCoordinateSystemMode = {}));
-    var GLTFFileLoader = /** @class */ (function () {
+    var GLTFFileLoader = (function () {
         function GLTFFileLoader() {
         function GLTFFileLoader() {
             // V2 options
             // V2 options
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
             this.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;
@@ -1189,7 +1189,7 @@ var BABYLON;
         return GLTFFileLoader;
         return GLTFFileLoader;
     }());
     }());
     BABYLON.GLTFFileLoader = GLTFFileLoader;
     BABYLON.GLTFFileLoader = GLTFFileLoader;
-    var BinaryReader = /** @class */ (function () {
+    var BinaryReader = (function () {
         function BinaryReader(arrayBuffer) {
         function BinaryReader(arrayBuffer) {
             this._arrayBuffer = arrayBuffer;
             this._arrayBuffer = arrayBuffer;
             this._dataView = new DataView(arrayBuffer);
             this._dataView = new DataView(arrayBuffer);
@@ -1335,7 +1335,7 @@ var BABYLON;
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["UNKNOWN"] = 2] = "UNKNOWN";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
             ETokenType[ETokenType["END_OF_INPUT"] = 3] = "END_OF_INPUT";
         })(ETokenType || (ETokenType = {}));
         })(ETokenType || (ETokenType = {}));
-        var Tokenizer = /** @class */ (function () {
+        var Tokenizer = (function () {
             function Tokenizer(toParse) {
             function Tokenizer(toParse) {
                 this._pos = 0;
                 this._pos = 0;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
                 this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/;
@@ -2263,7 +2263,7 @@ var BABYLON;
         /**
         /**
         * Implementation of the base glTF spec
         * Implementation of the base glTF spec
         */
         */
-        var GLTFLoaderBase = /** @class */ (function () {
+        var GLTFLoaderBase = (function () {
             function GLTFLoaderBase() {
             function GLTFLoaderBase() {
             }
             }
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
             GLTFLoaderBase.CreateRuntime = function (parsedData, scene, rootUrl) {
@@ -2558,7 +2558,7 @@ var BABYLON;
         /**
         /**
         * glTF V1 Loader
         * glTF V1 Loader
         */
         */
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader() {
             function GLTFLoader() {
             }
             }
             GLTFLoader.RegisterExtension = function (extension) {
             GLTFLoader.RegisterExtension = function (extension) {
@@ -2742,7 +2742,7 @@ var BABYLON;
         /**
         /**
         * Utils functions for GLTF
         * Utils functions for GLTF
         */
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             function GLTFUtils() {
             }
             }
             /**
             /**
@@ -2992,7 +2992,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF1;
     var GLTF1;
     (function (GLTF1) {
     (function (GLTF1) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension(name) {
             function GLTFLoaderExtension(name) {
                 this._name = name;
                 this._name = name;
             }
             }
@@ -3137,7 +3137,7 @@ var BABYLON;
         var BinaryExtensionBufferName = "binary_glTF";
         var BinaryExtensionBufferName = "binary_glTF";
         ;
         ;
         ;
         ;
-        var GLTFBinaryExtension = /** @class */ (function (_super) {
+        var GLTFBinaryExtension = (function (_super) {
             __extends(GLTFBinaryExtension, _super);
             __extends(GLTFBinaryExtension, _super);
             function GLTFBinaryExtension() {
             function GLTFBinaryExtension() {
                 return _super.call(this, "KHR_binary_glTF") || this;
                 return _super.call(this, "KHR_binary_glTF") || this;
@@ -3205,7 +3205,7 @@ var BABYLON;
         ;
         ;
         ;
         ;
         ;
         ;
-        var GLTFMaterialsCommonExtension = /** @class */ (function (_super) {
+        var GLTFMaterialsCommonExtension = (function (_super) {
             __extends(GLTFMaterialsCommonExtension, _super);
             __extends(GLTFMaterialsCommonExtension, _super);
             function GLTFMaterialsCommonExtension() {
             function GLTFMaterialsCommonExtension() {
                 return _super.call(this, "KHR_materials_common") || this;
                 return _super.call(this, "KHR_materials_common") || this;
@@ -3368,7 +3368,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
-        var GLTFLoaderTracker = /** @class */ (function () {
+        var GLTFLoaderTracker = (function () {
             function GLTFLoaderTracker(onComplete) {
             function GLTFLoaderTracker(onComplete) {
                 this._pendingCount = 0;
                 this._pendingCount = 0;
                 this._callback = onComplete;
                 this._callback = onComplete;
@@ -3383,7 +3383,7 @@ var BABYLON;
             };
             };
             return GLTFLoaderTracker;
             return GLTFLoaderTracker;
         }());
         }());
-        var GLTFLoader = /** @class */ (function () {
+        var GLTFLoader = (function () {
             function GLTFLoader(parent) {
             function GLTFLoader(parent) {
                 this._renderReady = false;
                 this._renderReady = false;
                 this._disposed = false;
                 this._disposed = false;
@@ -4600,7 +4600,7 @@ var BABYLON;
         /**
         /**
         * Utils functions for GLTF
         * Utils functions for GLTF
         */
         */
-        var GLTFUtils = /** @class */ (function () {
+        var GLTFUtils = (function () {
             function GLTFUtils() {
             function GLTFUtils() {
             }
             }
             /**
             /**
@@ -4698,7 +4698,7 @@ var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;
     (function (GLTF2) {
     (function (GLTF2) {
-        var GLTFLoaderExtension = /** @class */ (function () {
+        var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension() {
             function GLTFLoaderExtension() {
                 this.enabled = true;
                 this.enabled = true;
             }
             }
@@ -4765,7 +4765,7 @@ var BABYLON;
         var Extensions;
         var Extensions;
         (function (Extensions) {
         (function (Extensions) {
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
             // See https://github.com/sbtron/glTF/tree/MSFT_lod/extensions/Vendor/MSFT_lod for more information about this extension.
-            var MSFTLOD = /** @class */ (function (_super) {
+            var MSFTLOD = (function (_super) {
                 __extends(MSFTLOD, _super);
                 __extends(MSFTLOD, _super);
                 function MSFTLOD() {
                 function MSFTLOD() {
                     return _super !== null && _super.apply(this, arguments) || this;
                     return _super !== null && _super.apply(this, arguments) || this;
@@ -4872,7 +4872,7 @@ var BABYLON;
     (function (GLTF2) {
     (function (GLTF2) {
         var Extensions;
         var Extensions;
         (function (Extensions) {
         (function (Extensions) {
-            var KHRMaterialsPbrSpecularGlossiness = /** @class */ (function (_super) {
+            var KHRMaterialsPbrSpecularGlossiness = (function (_super) {
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 __extends(KHRMaterialsPbrSpecularGlossiness, _super);
                 function KHRMaterialsPbrSpecularGlossiness() {
                 function KHRMaterialsPbrSpecularGlossiness() {
                     return _super !== null && _super.apply(this, arguments) || this;
                     return _super !== null && _super.apply(this, arguments) || this;

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


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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var CellMaterialDefines = /** @class */ (function (_super) {
+    var CellMaterialDefines = (function (_super) {
         __extends(CellMaterialDefines, _super);
         __extends(CellMaterialDefines, _super);
         function CellMaterialDefines() {
         function CellMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -43,7 +43,7 @@ var BABYLON;
         }
         }
         return CellMaterialDefines;
         return CellMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var CellMaterial = /** @class */ (function (_super) {
+    var CellMaterial = (function (_super) {
         __extends(CellMaterial, _super);
         __extends(CellMaterial, _super);
         function CellMaterial(name, scene) {
         function CellMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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

@@ -18,7 +18,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     // old version of standard material updated every 3 months
     // old version of standard material updated every 3 months
-    var StandardMaterialDefines_OldVer = /** @class */ (function (_super) {
+    var StandardMaterialDefines_OldVer = (function (_super) {
         __extends(StandardMaterialDefines_OldVer, _super);
         __extends(StandardMaterialDefines_OldVer, _super);
         function StandardMaterialDefines_OldVer() {
         function StandardMaterialDefines_OldVer() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -111,7 +111,7 @@ var BABYLON;
         return StandardMaterialDefines_OldVer;
         return StandardMaterialDefines_OldVer;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
     BABYLON.StandardMaterialDefines_OldVer = StandardMaterialDefines_OldVer;
     BABYLON.StandardMaterialDefines_OldVer = StandardMaterialDefines_OldVer;
-    var StandardMaterial_OldVer = /** @class */ (function (_super) {
+    var StandardMaterial_OldVer = (function (_super) {
         __extends(StandardMaterial_OldVer, _super);
         __extends(StandardMaterial_OldVer, _super);
         function StandardMaterial_OldVer(name, scene) {
         function StandardMaterial_OldVer(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -1382,19 +1382,19 @@ var BABYLON;
         return StandardMaterial_OldVer;
         return StandardMaterial_OldVer;
     }(BABYLON.PushMaterial));
     }(BABYLON.PushMaterial));
     BABYLON.StandardMaterial_OldVer = StandardMaterial_OldVer;
     BABYLON.StandardMaterial_OldVer = StandardMaterial_OldVer;
-    var CustomShaderStructure = /** @class */ (function () {
+    var CustomShaderStructure = (function () {
         function CustomShaderStructure() {
         function CustomShaderStructure() {
         }
         }
         return CustomShaderStructure;
         return CustomShaderStructure;
     }());
     }());
     BABYLON.CustomShaderStructure = CustomShaderStructure;
     BABYLON.CustomShaderStructure = CustomShaderStructure;
-    var ShaderSpecialParts = /** @class */ (function () {
+    var ShaderSpecialParts = (function () {
         function ShaderSpecialParts() {
         function ShaderSpecialParts() {
         }
         }
         return ShaderSpecialParts;
         return ShaderSpecialParts;
     }());
     }());
     BABYLON.ShaderSpecialParts = ShaderSpecialParts;
     BABYLON.ShaderSpecialParts = ShaderSpecialParts;
-    var ShaderForVer3_0 = /** @class */ (function (_super) {
+    var ShaderForVer3_0 = (function (_super) {
         __extends(ShaderForVer3_0, _super);
         __extends(ShaderForVer3_0, _super);
         function ShaderForVer3_0() {
         function ShaderForVer3_0() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -1895,14 +1895,14 @@ vColor=color;\n\
         return ShaderForVer3_0;
         return ShaderForVer3_0;
     }(CustomShaderStructure));
     }(CustomShaderStructure));
     BABYLON.ShaderForVer3_0 = ShaderForVer3_0;
     BABYLON.ShaderForVer3_0 = ShaderForVer3_0;
-    var StandardShaderVersions = /** @class */ (function () {
+    var StandardShaderVersions = (function () {
         function StandardShaderVersions() {
         function StandardShaderVersions() {
         }
         }
         StandardShaderVersions.Ver3_0 = "3.0.0";
         StandardShaderVersions.Ver3_0 = "3.0.0";
         return StandardShaderVersions;
         return StandardShaderVersions;
     }());
     }());
     BABYLON.StandardShaderVersions = StandardShaderVersions;
     BABYLON.StandardShaderVersions = StandardShaderVersions;
-    var CustomMaterial = /** @class */ (function (_super) {
+    var CustomMaterial = (function (_super) {
         __extends(CustomMaterial, _super);
         __extends(CustomMaterial, _super);
         function CustomMaterial(name, scene) {
         function CustomMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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


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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var FireMaterialDefines = /** @class */ (function (_super) {
+    var FireMaterialDefines = (function (_super) {
         __extends(FireMaterialDefines, _super);
         __extends(FireMaterialDefines, _super);
         function FireMaterialDefines() {
         function FireMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -38,7 +38,7 @@ var BABYLON;
         }
         }
         return FireMaterialDefines;
         return FireMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var FireMaterial = /** @class */ (function (_super) {
+    var FireMaterial = (function (_super) {
         __extends(FireMaterial, _super);
         __extends(FireMaterial, _super);
         function FireMaterial(name, scene) {
         function FireMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var FurMaterialDefines = /** @class */ (function (_super) {
+    var FurMaterialDefines = (function (_super) {
         __extends(FurMaterialDefines, _super);
         __extends(FurMaterialDefines, _super);
         function FurMaterialDefines() {
         function FurMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -42,7 +42,7 @@ var BABYLON;
         }
         }
         return FurMaterialDefines;
         return FurMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var FurMaterial = /** @class */ (function (_super) {
+    var FurMaterial = (function (_super) {
         __extends(FurMaterial, _super);
         __extends(FurMaterial, _super);
         function FurMaterial(name, scene) {
         function FurMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var GradientMaterialDefines = /** @class */ (function (_super) {
+    var GradientMaterialDefines = (function (_super) {
         __extends(GradientMaterialDefines, _super);
         __extends(GradientMaterialDefines, _super);
         function GradientMaterialDefines() {
         function GradientMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -73,7 +73,7 @@ var BABYLON;
         }
         }
         return GradientMaterialDefines;
         return GradientMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var GradientMaterial = /** @class */ (function (_super) {
+    var GradientMaterial = (function (_super) {
         __extends(GradientMaterial, _super);
         __extends(GradientMaterial, _super);
         function GradientMaterial(name, scene) {
         function GradientMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var GridMaterialDefines = /** @class */ (function (_super) {
+    var GridMaterialDefines = (function (_super) {
         __extends(GridMaterialDefines, _super);
         __extends(GridMaterialDefines, _super);
         function GridMaterialDefines() {
         function GridMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -33,7 +33,7 @@ var BABYLON;
      * The grid materials allows you to wrap any shape with a grid.
      * The grid materials allows you to wrap any shape with a grid.
      * Colors are customizable.
      * Colors are customizable.
      */
      */
-    var GridMaterial = /** @class */ (function (_super) {
+    var GridMaterial = (function (_super) {
         __extends(GridMaterial, _super);
         __extends(GridMaterial, _super);
         /**
         /**
          * constructor
          * constructor

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var LavaMaterialDefines = /** @class */ (function (_super) {
+    var LavaMaterialDefines = (function (_super) {
         __extends(LavaMaterialDefines, _super);
         __extends(LavaMaterialDefines, _super);
         function LavaMaterialDefines() {
         function LavaMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -73,7 +73,7 @@ var BABYLON;
         }
         }
         return LavaMaterialDefines;
         return LavaMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var LavaMaterial = /** @class */ (function (_super) {
+    var LavaMaterial = (function (_super) {
         __extends(LavaMaterial, _super);
         __extends(LavaMaterial, _super);
         function LavaMaterial(name, scene) {
         function LavaMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

+ 2 - 2
dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.js

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var LegacyPBRMaterialDefines = /** @class */ (function (_super) {
+    var LegacyPBRMaterialDefines = (function (_super) {
         __extends(LegacyPBRMaterialDefines, _super);
         __extends(LegacyPBRMaterialDefines, _super);
         function LegacyPBRMaterialDefines() {
         function LegacyPBRMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -110,7 +110,7 @@ var BABYLON;
      * For more information, please refer to the documentation :
      * For more information, please refer to the documentation :
      * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
      * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
      */
      */
-    var LegacyPBRMaterial = /** @class */ (function (_super) {
+    var LegacyPBRMaterial = (function (_super) {
         __extends(LegacyPBRMaterial, _super);
         __extends(LegacyPBRMaterial, _super);
         /**
         /**
          * Instantiates a new PBRMaterial instance.
          * Instantiates a new PBRMaterial instance.

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var NormalMaterialDefines = /** @class */ (function (_super) {
+    var NormalMaterialDefines = (function (_super) {
         __extends(NormalMaterialDefines, _super);
         __extends(NormalMaterialDefines, _super);
         function NormalMaterialDefines() {
         function NormalMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -73,7 +73,7 @@ var BABYLON;
         }
         }
         return NormalMaterialDefines;
         return NormalMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var NormalMaterial = /** @class */ (function (_super) {
+    var NormalMaterial = (function (_super) {
         __extends(NormalMaterial, _super);
         __extends(NormalMaterial, _super);
         function NormalMaterial(name, scene) {
         function NormalMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var ShadowOnlyMaterialDefines = /** @class */ (function (_super) {
+    var ShadowOnlyMaterialDefines = (function (_super) {
         __extends(ShadowOnlyMaterialDefines, _super);
         __extends(ShadowOnlyMaterialDefines, _super);
         function ShadowOnlyMaterialDefines() {
         function ShadowOnlyMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -27,7 +27,7 @@ var BABYLON;
         }
         }
         return ShadowOnlyMaterialDefines;
         return ShadowOnlyMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var ShadowOnlyMaterial = /** @class */ (function (_super) {
+    var ShadowOnlyMaterial = (function (_super) {
         __extends(ShadowOnlyMaterial, _super);
         __extends(ShadowOnlyMaterial, _super);
         function ShadowOnlyMaterial(name, scene) {
         function ShadowOnlyMaterial(name, scene) {
             return _super.call(this, name, scene) || this;
             return _super.call(this, name, scene) || this;

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


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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var SimpleMaterialDefines = /** @class */ (function (_super) {
+    var SimpleMaterialDefines = (function (_super) {
         __extends(SimpleMaterialDefines, _super);
         __extends(SimpleMaterialDefines, _super);
         function SimpleMaterialDefines() {
         function SimpleMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -40,7 +40,7 @@ var BABYLON;
         }
         }
         return SimpleMaterialDefines;
         return SimpleMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var SimpleMaterial = /** @class */ (function (_super) {
+    var SimpleMaterial = (function (_super) {
         __extends(SimpleMaterial, _super);
         __extends(SimpleMaterial, _super);
         function SimpleMaterial(name, scene) {
         function SimpleMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var SkyMaterialDefines = /** @class */ (function (_super) {
+    var SkyMaterialDefines = (function (_super) {
         __extends(SkyMaterialDefines, _super);
         __extends(SkyMaterialDefines, _super);
         function SkyMaterialDefines() {
         function SkyMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -31,7 +31,7 @@ var BABYLON;
         }
         }
         return SkyMaterialDefines;
         return SkyMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var SkyMaterial = /** @class */ (function (_super) {
+    var SkyMaterial = (function (_super) {
         __extends(SkyMaterial, _super);
         __extends(SkyMaterial, _super);
         function SkyMaterial(name, scene) {
         function SkyMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var TerrainMaterialDefines = /** @class */ (function (_super) {
+    var TerrainMaterialDefines = (function (_super) {
         __extends(TerrainMaterialDefines, _super);
         __extends(TerrainMaterialDefines, _super);
         function TerrainMaterialDefines() {
         function TerrainMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -42,7 +42,7 @@ var BABYLON;
         }
         }
         return TerrainMaterialDefines;
         return TerrainMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var TerrainMaterial = /** @class */ (function (_super) {
+    var TerrainMaterial = (function (_super) {
         __extends(TerrainMaterial, _super);
         __extends(TerrainMaterial, _super);
         function TerrainMaterial(name, scene) {
         function TerrainMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

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

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var TriPlanarMaterialDefines = /** @class */ (function (_super) {
+    var TriPlanarMaterialDefines = (function (_super) {
         __extends(TriPlanarMaterialDefines, _super);
         __extends(TriPlanarMaterialDefines, _super);
         function TriPlanarMaterialDefines() {
         function TriPlanarMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -44,7 +44,7 @@ var BABYLON;
         }
         }
         return TriPlanarMaterialDefines;
         return TriPlanarMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var TriPlanarMaterial = /** @class */ (function (_super) {
+    var TriPlanarMaterial = (function (_super) {
         __extends(TriPlanarMaterial, _super);
         __extends(TriPlanarMaterial, _super);
         function TriPlanarMaterial(name, scene) {
         function TriPlanarMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;

+ 2 - 2
dist/preview release/materialsLibrary/babylon.waterMaterial.js

@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
 };
 };
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var WaterMaterialDefines = /** @class */ (function (_super) {
+    var WaterMaterialDefines = (function (_super) {
         __extends(WaterMaterialDefines, _super);
         __extends(WaterMaterialDefines, _super);
         function WaterMaterialDefines() {
         function WaterMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -46,7 +46,7 @@ var BABYLON;
         }
         }
         return WaterMaterialDefines;
         return WaterMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var WaterMaterial = /** @class */ (function (_super) {
+    var WaterMaterial = (function (_super) {
         __extends(WaterMaterial, _super);
         __extends(WaterMaterial, _super);
         /**
         /**
         * Constructor
         * Constructor

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


+ 35 - 35
dist/preview release/materialsLibrary/babylonjs.materials.js

@@ -20,7 +20,7 @@ var __extends = (this && this.__extends) || (function () {
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var ShadowOnlyMaterialDefines = /** @class */ (function (_super) {
+    var ShadowOnlyMaterialDefines = (function (_super) {
         __extends(ShadowOnlyMaterialDefines, _super);
         __extends(ShadowOnlyMaterialDefines, _super);
         function ShadowOnlyMaterialDefines() {
         function ShadowOnlyMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -36,7 +36,7 @@ var BABYLON;
         }
         }
         return ShadowOnlyMaterialDefines;
         return ShadowOnlyMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var ShadowOnlyMaterial = /** @class */ (function (_super) {
+    var ShadowOnlyMaterial = (function (_super) {
         __extends(ShadowOnlyMaterial, _super);
         __extends(ShadowOnlyMaterial, _super);
         function ShadowOnlyMaterial(name, scene) {
         function ShadowOnlyMaterial(name, scene) {
             return _super.call(this, name, scene) || this;
             return _super.call(this, name, scene) || this;
@@ -221,7 +221,7 @@ BABYLON.Effect.ShadersStore['shadowOnlyPixelShader'] = "precision highp float;\n
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var GradientMaterialDefines = /** @class */ (function (_super) {
+    var GradientMaterialDefines = (function (_super) {
         __extends(GradientMaterialDefines, _super);
         __extends(GradientMaterialDefines, _super);
         function GradientMaterialDefines() {
         function GradientMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -277,7 +277,7 @@ var BABYLON;
         }
         }
         return GradientMaterialDefines;
         return GradientMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var GradientMaterial = /** @class */ (function (_super) {
+    var GradientMaterial = (function (_super) {
         __extends(GradientMaterial, _super);
         __extends(GradientMaterial, _super);
         function GradientMaterial(name, scene) {
         function GradientMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -496,7 +496,7 @@ BABYLON.Effect.ShadersStore['gradientPixelShader'] = "precision highp float;\n\n
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var NormalMaterialDefines = /** @class */ (function (_super) {
+    var NormalMaterialDefines = (function (_super) {
         __extends(NormalMaterialDefines, _super);
         __extends(NormalMaterialDefines, _super);
         function NormalMaterialDefines() {
         function NormalMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -552,7 +552,7 @@ var BABYLON;
         }
         }
         return NormalMaterialDefines;
         return NormalMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var NormalMaterial = /** @class */ (function (_super) {
+    var NormalMaterial = (function (_super) {
         __extends(NormalMaterial, _super);
         __extends(NormalMaterial, _super);
         function NormalMaterial(name, scene) {
         function NormalMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -798,7 +798,7 @@ BABYLON.Effect.ShadersStore['normalPixelShader'] = "precision highp float;\n\nun
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var LavaMaterialDefines = /** @class */ (function (_super) {
+    var LavaMaterialDefines = (function (_super) {
         __extends(LavaMaterialDefines, _super);
         __extends(LavaMaterialDefines, _super);
         function LavaMaterialDefines() {
         function LavaMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -854,7 +854,7 @@ var BABYLON;
         }
         }
         return LavaMaterialDefines;
         return LavaMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var LavaMaterial = /** @class */ (function (_super) {
+    var LavaMaterial = (function (_super) {
         __extends(LavaMaterial, _super);
         __extends(LavaMaterial, _super);
         function LavaMaterial(name, scene) {
         function LavaMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -1146,7 +1146,7 @@ BABYLON.Effect.ShadersStore['lavaPixelShader'] = "precision highp float;\n\nunif
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var SimpleMaterialDefines = /** @class */ (function (_super) {
+    var SimpleMaterialDefines = (function (_super) {
         __extends(SimpleMaterialDefines, _super);
         __extends(SimpleMaterialDefines, _super);
         function SimpleMaterialDefines() {
         function SimpleMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -1169,7 +1169,7 @@ var BABYLON;
         }
         }
         return SimpleMaterialDefines;
         return SimpleMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var SimpleMaterial = /** @class */ (function (_super) {
+    var SimpleMaterial = (function (_super) {
         __extends(SimpleMaterial, _super);
         __extends(SimpleMaterial, _super);
         function SimpleMaterial(name, scene) {
         function SimpleMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -1415,7 +1415,7 @@ BABYLON.Effect.ShadersStore['simplePixelShader'] = "precision highp float;\n\nun
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var WaterMaterialDefines = /** @class */ (function (_super) {
+    var WaterMaterialDefines = (function (_super) {
         __extends(WaterMaterialDefines, _super);
         __extends(WaterMaterialDefines, _super);
         function WaterMaterialDefines() {
         function WaterMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -1444,7 +1444,7 @@ var BABYLON;
         }
         }
         return WaterMaterialDefines;
         return WaterMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var WaterMaterial = /** @class */ (function (_super) {
+    var WaterMaterial = (function (_super) {
         __extends(WaterMaterial, _super);
         __extends(WaterMaterial, _super);
         /**
         /**
         * Constructor
         * Constructor
@@ -2007,7 +2007,7 @@ BABYLON.Effect.ShadersStore['waterPixelShader'] = "#ifdef LOGARITHMICDEPTH\n#ext
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var FireMaterialDefines = /** @class */ (function (_super) {
+    var FireMaterialDefines = (function (_super) {
         __extends(FireMaterialDefines, _super);
         __extends(FireMaterialDefines, _super);
         function FireMaterialDefines() {
         function FireMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -2028,7 +2028,7 @@ var BABYLON;
         }
         }
         return FireMaterialDefines;
         return FireMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var FireMaterial = /** @class */ (function (_super) {
+    var FireMaterial = (function (_super) {
         __extends(FireMaterial, _super);
         __extends(FireMaterial, _super);
         function FireMaterial(name, scene) {
         function FireMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -2322,7 +2322,7 @@ BABYLON.Effect.ShadersStore['firePixelShader'] = "precision highp float;\n\nunif
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var FurMaterialDefines = /** @class */ (function (_super) {
+    var FurMaterialDefines = (function (_super) {
         __extends(FurMaterialDefines, _super);
         __extends(FurMaterialDefines, _super);
         function FurMaterialDefines() {
         function FurMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -2347,7 +2347,7 @@ var BABYLON;
         }
         }
         return FurMaterialDefines;
         return FurMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var FurMaterial = /** @class */ (function (_super) {
+    var FurMaterial = (function (_super) {
         __extends(FurMaterial, _super);
         __extends(FurMaterial, _super);
         function FurMaterial(name, scene) {
         function FurMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -2778,7 +2778,7 @@ BABYLON.Effect.ShadersStore['furPixelShader'] = "precision highp float;\n\nunifo
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var TerrainMaterialDefines = /** @class */ (function (_super) {
+    var TerrainMaterialDefines = (function (_super) {
         __extends(TerrainMaterialDefines, _super);
         __extends(TerrainMaterialDefines, _super);
         function TerrainMaterialDefines() {
         function TerrainMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -2803,7 +2803,7 @@ var BABYLON;
         }
         }
         return TerrainMaterialDefines;
         return TerrainMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var TerrainMaterial = /** @class */ (function (_super) {
+    var TerrainMaterial = (function (_super) {
         __extends(TerrainMaterial, _super);
         __extends(TerrainMaterial, _super);
         function TerrainMaterial(name, scene) {
         function TerrainMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -3162,7 +3162,7 @@ BABYLON.Effect.ShadersStore['terrainPixelShader'] = "precision highp float;\n\nu
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var TriPlanarMaterialDefines = /** @class */ (function (_super) {
+    var TriPlanarMaterialDefines = (function (_super) {
         __extends(TriPlanarMaterialDefines, _super);
         __extends(TriPlanarMaterialDefines, _super);
         function TriPlanarMaterialDefines() {
         function TriPlanarMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -3189,7 +3189,7 @@ var BABYLON;
         }
         }
         return TriPlanarMaterialDefines;
         return TriPlanarMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var TriPlanarMaterial = /** @class */ (function (_super) {
+    var TriPlanarMaterial = (function (_super) {
         __extends(TriPlanarMaterial, _super);
         __extends(TriPlanarMaterial, _super);
         function TriPlanarMaterial(name, scene) {
         function TriPlanarMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -3541,7 +3541,7 @@ BABYLON.Effect.ShadersStore['triplanarPixelShader'] = "precision highp float;\n\
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var SkyMaterialDefines = /** @class */ (function (_super) {
+    var SkyMaterialDefines = (function (_super) {
         __extends(SkyMaterialDefines, _super);
         __extends(SkyMaterialDefines, _super);
         function SkyMaterialDefines() {
         function SkyMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -3555,7 +3555,7 @@ var BABYLON;
         }
         }
         return SkyMaterialDefines;
         return SkyMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var SkyMaterial = /** @class */ (function (_super) {
+    var SkyMaterial = (function (_super) {
         __extends(SkyMaterial, _super);
         __extends(SkyMaterial, _super);
         function SkyMaterial(name, scene) {
         function SkyMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -3753,7 +3753,7 @@ BABYLON.Effect.ShadersStore['skyPixelShader'] = "precision highp float;\n\nvaryi
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var GridMaterialDefines = /** @class */ (function (_super) {
+    var GridMaterialDefines = (function (_super) {
         __extends(GridMaterialDefines, _super);
         __extends(GridMaterialDefines, _super);
         function GridMaterialDefines() {
         function GridMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -3769,7 +3769,7 @@ var BABYLON;
      * The grid materials allows you to wrap any shape with a grid.
      * The grid materials allows you to wrap any shape with a grid.
      * Colors are customizable.
      * Colors are customizable.
      */
      */
-    var GridMaterial = /** @class */ (function (_super) {
+    var GridMaterial = (function (_super) {
         __extends(GridMaterial, _super);
         __extends(GridMaterial, _super);
         /**
         /**
          * constructor
          * constructor
@@ -3947,7 +3947,7 @@ BABYLON.Effect.ShadersStore['gridPixelShader'] = "#extension GL_OES_standard_der
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     // old version of standard material updated every 3 months
     // old version of standard material updated every 3 months
-    var StandardMaterialDefines_OldVer = /** @class */ (function (_super) {
+    var StandardMaterialDefines_OldVer = (function (_super) {
         __extends(StandardMaterialDefines_OldVer, _super);
         __extends(StandardMaterialDefines_OldVer, _super);
         function StandardMaterialDefines_OldVer() {
         function StandardMaterialDefines_OldVer() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -4040,7 +4040,7 @@ var BABYLON;
         return StandardMaterialDefines_OldVer;
         return StandardMaterialDefines_OldVer;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
     BABYLON.StandardMaterialDefines_OldVer = StandardMaterialDefines_OldVer;
     BABYLON.StandardMaterialDefines_OldVer = StandardMaterialDefines_OldVer;
-    var StandardMaterial_OldVer = /** @class */ (function (_super) {
+    var StandardMaterial_OldVer = (function (_super) {
         __extends(StandardMaterial_OldVer, _super);
         __extends(StandardMaterial_OldVer, _super);
         function StandardMaterial_OldVer(name, scene) {
         function StandardMaterial_OldVer(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -5311,19 +5311,19 @@ var BABYLON;
         return StandardMaterial_OldVer;
         return StandardMaterial_OldVer;
     }(BABYLON.PushMaterial));
     }(BABYLON.PushMaterial));
     BABYLON.StandardMaterial_OldVer = StandardMaterial_OldVer;
     BABYLON.StandardMaterial_OldVer = StandardMaterial_OldVer;
-    var CustomShaderStructure = /** @class */ (function () {
+    var CustomShaderStructure = (function () {
         function CustomShaderStructure() {
         function CustomShaderStructure() {
         }
         }
         return CustomShaderStructure;
         return CustomShaderStructure;
     }());
     }());
     BABYLON.CustomShaderStructure = CustomShaderStructure;
     BABYLON.CustomShaderStructure = CustomShaderStructure;
-    var ShaderSpecialParts = /** @class */ (function () {
+    var ShaderSpecialParts = (function () {
         function ShaderSpecialParts() {
         function ShaderSpecialParts() {
         }
         }
         return ShaderSpecialParts;
         return ShaderSpecialParts;
     }());
     }());
     BABYLON.ShaderSpecialParts = ShaderSpecialParts;
     BABYLON.ShaderSpecialParts = ShaderSpecialParts;
-    var ShaderForVer3_0 = /** @class */ (function (_super) {
+    var ShaderForVer3_0 = (function (_super) {
         __extends(ShaderForVer3_0, _super);
         __extends(ShaderForVer3_0, _super);
         function ShaderForVer3_0() {
         function ShaderForVer3_0() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -5824,14 +5824,14 @@ vColor=color;\n\
         return ShaderForVer3_0;
         return ShaderForVer3_0;
     }(CustomShaderStructure));
     }(CustomShaderStructure));
     BABYLON.ShaderForVer3_0 = ShaderForVer3_0;
     BABYLON.ShaderForVer3_0 = ShaderForVer3_0;
-    var StandardShaderVersions = /** @class */ (function () {
+    var StandardShaderVersions = (function () {
         function StandardShaderVersions() {
         function StandardShaderVersions() {
         }
         }
         StandardShaderVersions.Ver3_0 = "3.0.0";
         StandardShaderVersions.Ver3_0 = "3.0.0";
         return StandardShaderVersions;
         return StandardShaderVersions;
     }());
     }());
     BABYLON.StandardShaderVersions = StandardShaderVersions;
     BABYLON.StandardShaderVersions = StandardShaderVersions;
-    var CustomMaterial = /** @class */ (function (_super) {
+    var CustomMaterial = (function (_super) {
         __extends(CustomMaterial, _super);
         __extends(CustomMaterial, _super);
         function CustomMaterial(name, scene) {
         function CustomMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -5991,7 +5991,7 @@ vColor=color;\n\
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var CellMaterialDefines = /** @class */ (function (_super) {
+    var CellMaterialDefines = (function (_super) {
         __extends(CellMaterialDefines, _super);
         __extends(CellMaterialDefines, _super);
         function CellMaterialDefines() {
         function CellMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -6017,7 +6017,7 @@ var BABYLON;
         }
         }
         return CellMaterialDefines;
         return CellMaterialDefines;
     }(BABYLON.MaterialDefines));
     }(BABYLON.MaterialDefines));
-    var CellMaterial = /** @class */ (function (_super) {
+    var CellMaterial = (function (_super) {
         __extends(CellMaterial, _super);
         __extends(CellMaterial, _super);
         function CellMaterial(name, scene) {
         function CellMaterial(name, scene) {
             var _this = _super.call(this, name, scene) || this;
             var _this = _super.call(this, name, scene) || this;
@@ -6269,7 +6269,7 @@ BABYLON.Effect.ShadersStore['cellPixelShader'] = "precision highp float;\n\nunif
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var LegacyPBRMaterialDefines = /** @class */ (function (_super) {
+    var LegacyPBRMaterialDefines = (function (_super) {
         __extends(LegacyPBRMaterialDefines, _super);
         __extends(LegacyPBRMaterialDefines, _super);
         function LegacyPBRMaterialDefines() {
         function LegacyPBRMaterialDefines() {
             var _this = _super.call(this) || this;
             var _this = _super.call(this) || this;
@@ -6362,7 +6362,7 @@ var BABYLON;
      * For more information, please refer to the documentation :
      * For more information, please refer to the documentation :
      * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
      * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
      */
      */
-    var LegacyPBRMaterial = /** @class */ (function (_super) {
+    var LegacyPBRMaterial = (function (_super) {
         __extends(LegacyPBRMaterial, _super);
         __extends(LegacyPBRMaterial, _super);
         /**
         /**
          * Instantiates a new PBRMaterial instance.
          * Instantiates a new PBRMaterial instance.

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


+ 2 - 2
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js

@@ -23,7 +23,7 @@ var BABYLON;
      * It basically takes care rendering the font front the given font size to a texture.
      * It basically takes care rendering the font front the given font size to a texture.
      * This is used later on in the postprocess.
      * This is used later on in the postprocess.
      */
      */
-    var AsciiArtFontTexture = /** @class */ (function (_super) {
+    var AsciiArtFontTexture = (function (_super) {
         __extends(AsciiArtFontTexture, _super);
         __extends(AsciiArtFontTexture, _super);
         /**
         /**
          * Create a new instance of the Ascii Art FontTexture class
          * Create a new instance of the Ascii Art FontTexture class
@@ -160,7 +160,7 @@ var BABYLON;
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
      * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
      */
      */
-    var AsciiArtPostProcess = /** @class */ (function (_super) {
+    var AsciiArtPostProcess = (function (_super) {
         __extends(AsciiArtPostProcess, _super);
         __extends(AsciiArtPostProcess, _super);
         /**
         /**
          * Instantiates a new Ascii Art Post Process.
          * Instantiates a new Ascii Art Post Process.

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


+ 2 - 2
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js

@@ -23,7 +23,7 @@ var BABYLON;
      * It basically takes care rendering the font front the given font size to a texture.
      * It basically takes care rendering the font front the given font size to a texture.
      * This is used later on in the postprocess.
      * This is used later on in the postprocess.
      */
      */
-    var DigitalRainFontTexture = /** @class */ (function (_super) {
+    var DigitalRainFontTexture = (function (_super) {
         __extends(DigitalRainFontTexture, _super);
         __extends(DigitalRainFontTexture, _super);
         /**
         /**
          * Create a new instance of the Digital Rain FontTexture class
          * Create a new instance of the Digital Rain FontTexture class
@@ -160,7 +160,7 @@ var BABYLON;
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
      * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
      */
      */
-    var DigitalRainPostProcess = /** @class */ (function (_super) {
+    var DigitalRainPostProcess = (function (_super) {
         __extends(DigitalRainPostProcess, _super);
         __extends(DigitalRainPostProcess, _super);
         /**
         /**
          * Instantiates a new Digital Rain Post Process.
          * Instantiates a new Digital Rain Post Process.

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


+ 4 - 4
dist/preview release/postProcessesLibrary/babylonjs.postProcess.js

@@ -27,7 +27,7 @@ var BABYLON;
      * It basically takes care rendering the font front the given font size to a texture.
      * It basically takes care rendering the font front the given font size to a texture.
      * This is used later on in the postprocess.
      * This is used later on in the postprocess.
      */
      */
-    var AsciiArtFontTexture = /** @class */ (function (_super) {
+    var AsciiArtFontTexture = (function (_super) {
         __extends(AsciiArtFontTexture, _super);
         __extends(AsciiArtFontTexture, _super);
         /**
         /**
          * Create a new instance of the Ascii Art FontTexture class
          * Create a new instance of the Ascii Art FontTexture class
@@ -164,7 +164,7 @@ var BABYLON;
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
      * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
      */
      */
-    var AsciiArtPostProcess = /** @class */ (function (_super) {
+    var AsciiArtPostProcess = (function (_super) {
         __extends(AsciiArtPostProcess, _super);
         __extends(AsciiArtPostProcess, _super);
         /**
         /**
          * Instantiates a new Ascii Art Post Process.
          * Instantiates a new Ascii Art Post Process.
@@ -231,7 +231,7 @@ var BABYLON;
      * It basically takes care rendering the font front the given font size to a texture.
      * It basically takes care rendering the font front the given font size to a texture.
      * This is used later on in the postprocess.
      * This is used later on in the postprocess.
      */
      */
-    var DigitalRainFontTexture = /** @class */ (function (_super) {
+    var DigitalRainFontTexture = (function (_super) {
         __extends(DigitalRainFontTexture, _super);
         __extends(DigitalRainFontTexture, _super);
         /**
         /**
          * Create a new instance of the Digital Rain FontTexture class
          * Create a new instance of the Digital Rain FontTexture class
@@ -368,7 +368,7 @@ var BABYLON;
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Simmply add it to your scene and let the nerd that lives in you have fun.
      * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
      * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
      */
      */
-    var DigitalRainPostProcess = /** @class */ (function (_super) {
+    var DigitalRainPostProcess = (function (_super) {
         __extends(DigitalRainPostProcess, _super);
         __extends(DigitalRainPostProcess, _super);
         /**
         /**
          * Instantiates a new Digital Rain Post Process.
          * Instantiates a new Digital Rain Post Process.

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


+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.brickProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var BrickProceduralTexture = /** @class */ (function (_super) {
+    var BrickProceduralTexture = (function (_super) {
         __extends(BrickProceduralTexture, _super);
         __extends(BrickProceduralTexture, _super);
         function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var CloudProceduralTexture = /** @class */ (function (_super) {
+    var CloudProceduralTexture = (function (_super) {
         __extends(CloudProceduralTexture, _super);
         __extends(CloudProceduralTexture, _super);
         function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.fireProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var FireProceduralTexture = /** @class */ (function (_super) {
+    var FireProceduralTexture = (function (_super) {
         __extends(FireProceduralTexture, _super);
         __extends(FireProceduralTexture, _super);
         function FireProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function FireProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.grassProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var GrassProceduralTexture = /** @class */ (function (_super) {
+    var GrassProceduralTexture = (function (_super) {
         __extends(GrassProceduralTexture, _super);
         __extends(GrassProceduralTexture, _super);
         function GrassProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function GrassProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var MarbleProceduralTexture = /** @class */ (function (_super) {
+    var MarbleProceduralTexture = (function (_super) {
         __extends(MarbleProceduralTexture, _super);
         __extends(MarbleProceduralTexture, _super);
         function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.normalMapProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var NormalMapProceduralTexture = /** @class */ (function (_super) {
+    var NormalMapProceduralTexture = (function (_super) {
         __extends(NormalMapProceduralTexture, _super);
         __extends(NormalMapProceduralTexture, _super);
         function NormalMapProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function NormalMapProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "normalMapProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "normalMapProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var PerlinNoiseProceduralTexture = /** @class */ (function (_super) {
+    var PerlinNoiseProceduralTexture = (function (_super) {
         __extends(PerlinNoiseProceduralTexture, _super);
         __extends(PerlinNoiseProceduralTexture, _super);
         function PerlinNoiseProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function PerlinNoiseProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "perlinNoiseProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "perlinNoiseProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.roadProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var RoadProceduralTexture = /** @class */ (function (_super) {
+    var RoadProceduralTexture = (function (_super) {
         __extends(RoadProceduralTexture, _super);
         __extends(RoadProceduralTexture, _super);
         function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var StarfieldProceduralTexture = /** @class */ (function (_super) {
+    var StarfieldProceduralTexture = (function (_super) {
         __extends(StarfieldProceduralTexture, _super);
         __extends(StarfieldProceduralTexture, _super);
         function StarfieldProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function StarfieldProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/babylon.woodProceduralTexture.js

@@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 })();
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var WoodProceduralTexture = /** @class */ (function (_super) {
+    var WoodProceduralTexture = (function (_super) {
         __extends(WoodProceduralTexture, _super);
         __extends(WoodProceduralTexture, _super);
         function WoodProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function WoodProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 10 - 10
dist/preview release/proceduralTexturesLibrary/babylonjs.proceduralTextures.js

@@ -20,7 +20,7 @@ var __extends = (this && this.__extends) || (function () {
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var WoodProceduralTexture = /** @class */ (function (_super) {
+    var WoodProceduralTexture = (function (_super) {
         __extends(WoodProceduralTexture, _super);
         __extends(WoodProceduralTexture, _super);
         function WoodProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function WoodProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -68,7 +68,7 @@ BABYLON.Effect.ShadersStore['woodProceduralTexturePixelShader'] = "precision hig
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var FireProceduralTexture = /** @class */ (function (_super) {
+    var FireProceduralTexture = (function (_super) {
         __extends(FireProceduralTexture, _super);
         __extends(FireProceduralTexture, _super);
         function FireProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function FireProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -211,7 +211,7 @@ BABYLON.Effect.ShadersStore['fireProceduralTexturePixelShader'] = "precision hig
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var CloudProceduralTexture = /** @class */ (function (_super) {
+    var CloudProceduralTexture = (function (_super) {
         __extends(CloudProceduralTexture, _super);
         __extends(CloudProceduralTexture, _super);
         function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -259,7 +259,7 @@ BABYLON.Effect.ShadersStore['cloudProceduralTexturePixelShader'] = "precision hi
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var GrassProceduralTexture = /** @class */ (function (_super) {
+    var GrassProceduralTexture = (function (_super) {
         __extends(GrassProceduralTexture, _super);
         __extends(GrassProceduralTexture, _super);
         function GrassProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function GrassProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -313,7 +313,7 @@ BABYLON.Effect.ShadersStore['grassProceduralTexturePixelShader'] = "precision hi
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var RoadProceduralTexture = /** @class */ (function (_super) {
+    var RoadProceduralTexture = (function (_super) {
         __extends(RoadProceduralTexture, _super);
         __extends(RoadProceduralTexture, _super);
         function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -348,7 +348,7 @@ BABYLON.Effect.ShadersStore['roadProceduralTexturePixelShader'] = "precision hig
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var BrickProceduralTexture = /** @class */ (function (_super) {
+    var BrickProceduralTexture = (function (_super) {
         __extends(BrickProceduralTexture, _super);
         __extends(BrickProceduralTexture, _super);
         function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -422,7 +422,7 @@ BABYLON.Effect.ShadersStore['brickProceduralTexturePixelShader'] = "precision hi
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var MarbleProceduralTexture = /** @class */ (function (_super) {
+    var MarbleProceduralTexture = (function (_super) {
         __extends(MarbleProceduralTexture, _super);
         __extends(MarbleProceduralTexture, _super);
         function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -496,7 +496,7 @@ BABYLON.Effect.ShadersStore['marbleProceduralTexturePixelShader'] = "precision h
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var StarfieldProceduralTexture = /** @class */ (function (_super) {
+    var StarfieldProceduralTexture = (function (_super) {
         __extends(StarfieldProceduralTexture, _super);
         __extends(StarfieldProceduralTexture, _super);
         function StarfieldProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function StarfieldProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -661,7 +661,7 @@ BABYLON.Effect.ShadersStore['starfieldProceduralTexturePixelShader'] = "precisio
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var NormalMapProceduralTexture = /** @class */ (function (_super) {
+    var NormalMapProceduralTexture = (function (_super) {
         __extends(NormalMapProceduralTexture, _super);
         __extends(NormalMapProceduralTexture, _super);
         function NormalMapProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function NormalMapProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "normalMapProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "normalMapProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
@@ -704,7 +704,7 @@ BABYLON.Effect.ShadersStore['normalMapProceduralTexturePixelShader'] = "precisio
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var PerlinNoiseProceduralTexture = /** @class */ (function (_super) {
+    var PerlinNoiseProceduralTexture = (function (_super) {
         __extends(PerlinNoiseProceduralTexture, _super);
         __extends(PerlinNoiseProceduralTexture, _super);
         function PerlinNoiseProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
         function PerlinNoiseProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
             var _this = _super.call(this, name, size, "perlinNoiseProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
             var _this = _super.call(this, name, size, "perlinNoiseProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;

+ 1 - 1
dist/preview release/serializers/babylon.objSerializer.js

@@ -1,7 +1,7 @@
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../dist/preview release/babylon.d.ts"/>
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var OBJExport = /** @class */ (function () {
+    var OBJExport = (function () {
         function OBJExport() {
         function OBJExport() {
         }
         }
         //Exports the geometrys of a Mesh array in .OBJ file format (text)
         //Exports the geometrys of a Mesh array in .OBJ file format (text)

+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.js

@@ -19,7 +19,7 @@ var __extends = (this && this.__extends) || (function () {
         
         
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
-    var OBJExport = /** @class */ (function () {
+    var OBJExport = (function () {
         function OBJExport() {
         function OBJExport() {
         }
         }
         //Exports the geometrys of a Mesh array in .OBJ file format (text)
         //Exports the geometrys of a Mesh array in .OBJ file format (text)

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

@@ -43,3 +43,4 @@
 
 
 ## Breaking changes
 ## Breaking changes
 - `Gamepads` was removed in favor of `scene.gamepadManager`
 - `Gamepads` was removed in favor of `scene.gamepadManager`
+- `DynamicFloatArray`, `MapTexture` and `RectPakingMap` were removed because there were not used anymore

+ 0 - 3
inspector/src/properties.ts

@@ -75,9 +75,6 @@ module INSPECTOR {
             ],
             ],
             format: (tex: BABYLON.Texture) => { return tex.name }
             format: (tex: BABYLON.Texture) => { return tex.name }
         },
         },
-        'MapTexture': {
-            type: BABYLON.MapTexture
-        },
         'RenderTargetTexture': {
         'RenderTargetTexture': {
             type: BABYLON.RenderTargetTexture
             type: BABYLON.RenderTargetTexture
         },
         },

+ 1 - 8
inspector/src/tabs/TextureTab.ts

@@ -85,14 +85,7 @@ module INSPECTOR {
                 imgs.push(Helpers.CreateElement('img', 'texture-image', this._imagePanel) as HTMLImageElement);
                 imgs.push(Helpers.CreateElement('img', 'texture-image', this._imagePanel) as HTMLImageElement);
             }
             }
             
             
-            if (texture instanceof BABYLON.MapTexture) {
-                // instance of Map texture
-                texture.bindTextureForPosSize(new BABYLON.Vector2(0, 0), new BABYLON.Size(texture.getSize().width, texture.getSize().height), false);
-                BABYLON.Tools.DumpFramebuffer(texture.getSize().width, texture.getSize().height, this._inspector.scene.getEngine(), (data) => img.src = data);
-                texture.unbindTexture();
-
-            }
-            else if (texture instanceof BABYLON.RenderTargetTexture) {
+            if (texture instanceof BABYLON.RenderTargetTexture) {
                 // RenderTarget textures
                 // RenderTarget textures
                 let scene = this._inspector.scene;
                 let scene = this._inspector.scene;
                 let engine = scene.getEngine();
                 let engine = scene.getEngine();

+ 1 - 1
src/Actions/babylon.actionManager.ts

@@ -415,7 +415,7 @@
             return root;
             return root;
         }
         }
 
 
-        public static Parse(parsedActions: any, object: AbstractMesh, scene: Scene) {
+        public static Parse(parsedActions: any, object: Nullable<AbstractMesh>, scene: Scene) {
             var actionManager = new BABYLON.ActionManager(scene);
             var actionManager = new BABYLON.ActionManager(scene);
             if (object === null)
             if (object === null)
                 scene.actionManager = actionManager;
                 scene.actionManager = actionManager;

+ 7 - 4
src/Behaviors/Cameras/babylon.autoRotationBehavior.ts

@@ -73,8 +73,8 @@ module BABYLON {
 		}
 		}
         
         
         // Default behavior functions
         // Default behavior functions
-        private _onPrePointerObservableObserver: Observer<PointerInfoPre>;
-        private _onAfterCheckInputsObserver: Observer<Camera>;
+        private _onPrePointerObservableObserver: Nullable<Observer<PointerInfoPre>>;
+        private _onAfterCheckInputsObserver: Nullable<Observer<Camera>>;
         private _attachedCamera: Nullable<ArcRotateCamera>;
         private _attachedCamera: Nullable<ArcRotateCamera>;
         private _isPointerDown = false;
         private _isPointerDown = false;
         private _lastFrameTime: Nullable<number> = null;
         private _lastFrameTime: Nullable<number> = null;
@@ -123,8 +123,11 @@ module BABYLON {
 				return;
 				return;
 			}
 			}
             let scene = this._attachedCamera.getScene();
             let scene = this._attachedCamera.getScene();
-            
-            scene.onPrePointerObservable.remove(this._onPrePointerObservableObserver);
+			
+			if (this._onPrePointerObservableObserver) {
+				scene.onPrePointerObservable.remove(this._onPrePointerObservableObserver);
+			}
+			
 			this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver);
 			this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver);
 			this._attachedCamera = null;
 			this._attachedCamera = null;
 		}
 		}

+ 6 - 4
src/Behaviors/Cameras/babylon.bouncingBehavior.ts

@@ -76,8 +76,8 @@ module BABYLON {
         
         
         // Connection
         // Connection
         private _attachedCamera: Nullable<ArcRotateCamera>;
         private _attachedCamera: Nullable<ArcRotateCamera>;
-		private _onAfterCheckInputsObserver: Observer<Camera>;	
-		private _onMeshTargetChangedObserver: Observer<AbstractMesh>;
+		private _onAfterCheckInputsObserver: Nullable<Observer<Camera>>;	
+		private _onMeshTargetChangedObserver: Nullable<Observer<AbstractMesh>>;
         public attach(camera: ArcRotateCamera): void {
         public attach(camera: ArcRotateCamera): void {
             this._attachedCamera = camera;
             this._attachedCamera = camera;
             this._onAfterCheckInputsObserver = camera.onAfterCheckInputsObservable.add(() => {
             this._onAfterCheckInputsObserver = camera.onAfterCheckInputsObservable.add(() => {
@@ -101,7 +101,9 @@ module BABYLON {
 			if (!this._attachedCamera) {
 			if (!this._attachedCamera) {
 				return;
 				return;
 			}			
 			}			
-			this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver);
+			if (this._onAfterCheckInputsObserver) {
+				this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver);
+			}
 			if (this._onMeshTargetChangedObserver) {
 			if (this._onMeshTargetChangedObserver) {
 				this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver);
 				this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver);
 			}
 			}
@@ -119,7 +121,7 @@ module BABYLON {
 		 * @param radiusLimit The limit to check against.
 		 * @param radiusLimit The limit to check against.
 		 * @return Bool to indicate if at limit.
 		 * @return Bool to indicate if at limit.
 		 */
 		 */
-		private _isRadiusAtLimit(radiusLimit: number): boolean {
+		private _isRadiusAtLimit(radiusLimit: Nullable<number>): boolean {
 			if (!this._attachedCamera) {
 			if (!this._attachedCamera) {
 				return false;
 				return false;
 			}
 			}

+ 15 - 7
src/Behaviors/Cameras/babylon.framingBehavior.ts

@@ -140,9 +140,9 @@ module BABYLON {
 		}        
 		}        
         
         
         // Default behavior functions
         // Default behavior functions
-        private _onPrePointerObservableObserver: Observer<PointerInfoPre>;
-		private _onAfterCheckInputsObserver: Observer<Camera>;
-		private _onMeshTargetChangedObserver: Observer<AbstractMesh>;
+        private _onPrePointerObservableObserver: Nullable<Observer<PointerInfoPre>>;
+		private _onAfterCheckInputsObserver: Nullable<Observer<Camera>>;
+		private _onMeshTargetChangedObserver: Nullable<Observer<AbstractMesh>>;
         private _attachedCamera: Nullable<ArcRotateCamera>;
         private _attachedCamera: Nullable<ArcRotateCamera>;
         private _isPointerDown = false;
         private _isPointerDown = false;
         private _lastInteractionTime = -Infinity;
         private _lastInteractionTime = -Infinity;
@@ -186,10 +186,18 @@ module BABYLON {
 			}
 			}
 
 
             let scene = this._attachedCamera.getScene();
             let scene = this._attachedCamera.getScene();
-            
-            scene.onPrePointerObservable.remove(this._onPrePointerObservableObserver);
-			this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver);
-			this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver);
+			
+			if (this._onPrePointerObservableObserver) {
+				scene.onPrePointerObservable.remove(this._onPrePointerObservableObserver);
+			}
+
+			if (this._onAfterCheckInputsObserver) {
+				this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver);
+			}
+
+			if (this._onMeshTargetChangedObserver) {
+				this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver);
+			}
 
 
 			this._attachedCamera = null;
 			this._attachedCamera = null;
         }
         }

+ 2 - 2
src/Cameras/Inputs/babylon.arcRotateCameraGamepadInput.ts

@@ -3,8 +3,8 @@ module BABYLON {
         camera: ArcRotateCamera;
         camera: ArcRotateCamera;
 
 
         public gamepad: Nullable<Gamepad>;
         public gamepad: Nullable<Gamepad>;
-        private _onGamepadConnectedObserver : Observer<Gamepad>;
-        private _onGamepadDisconnectedObserver : Observer<Gamepad>;
+        private _onGamepadConnectedObserver : Nullable<Observer<Gamepad>>;
+        private _onGamepadDisconnectedObserver : Nullable<Observer<Gamepad>>;
 
 
         @serialize()
         @serialize()
         public gamepadRotationSensibility = 80;
         public gamepadRotationSensibility = 80;

+ 2 - 2
src/Cameras/Inputs/babylon.freeCameraGamepadInput.ts

@@ -3,8 +3,8 @@ module BABYLON {
         camera: FreeCamera;
         camera: FreeCamera;
 
 
         public gamepad: Nullable<Gamepad>;        
         public gamepad: Nullable<Gamepad>;        
-        private _onGamepadConnectedObserver : Observer<Gamepad>;
-        private _onGamepadDisconnectedObserver : Observer<Gamepad>;
+        private _onGamepadConnectedObserver : Nullable<Observer<Gamepad>>;
+        private _onGamepadDisconnectedObserver : Nullable<Observer<Gamepad>>;
 
 
         @serialize()
         @serialize()
         public gamepadAngularSensibility = 200;
         public gamepadAngularSensibility = 200;

+ 2 - 2
src/Cameras/VR/babylon.webVRCamera.ts

@@ -326,8 +326,8 @@ module BABYLON {
             return this._projectionMatrix;
             return this._projectionMatrix;
         }
         }
 
 
-        private _onGamepadConnectedObserver: Observer<Gamepad>;
-        private _onGamepadDisconnectedObserver: Observer<Gamepad>;
+        private _onGamepadConnectedObserver: Nullable<Observer<Gamepad>>;
+        private _onGamepadDisconnectedObserver: Nullable<Observer<Gamepad>>;
 
 
         public initControllers() {
         public initControllers() {
             this.controllers = [];
             this.controllers = [];

+ 15 - 3
src/Collisions/babylon.pickingInfo.ts

@@ -3,7 +3,7 @@
         public faceId = 0;
         public faceId = 0;
         public subMeshId = 0;
         public subMeshId = 0;
 
 
-        constructor(public bu: number, public bv: number, public distance: number) {
+        constructor(public bu: Nullable<number>, public bv: Nullable<number>, public distance: number) {
         }
         }
     }
     }
 
 
@@ -25,10 +25,15 @@
             }
             }
 
 
             var indices = this.pickedMesh.getIndices();
             var indices = this.pickedMesh.getIndices();
+
+            if (!indices) {
+                return null;
+            }
+
             var result: Vector3;
             var result: Vector3;
 
 
             if (useVerticesNormals) {
             if (useVerticesNormals) {
-                var normals = this.pickedMesh.getVerticesData(VertexBuffer.NormalKind);
+                var normals = (<number[] | Float32Array>this.pickedMesh.getVerticesData(VertexBuffer.NormalKind));
 
 
                 var normal0 = Vector3.FromArray(normals, indices[this.faceId * 3] * 3);
                 var normal0 = Vector3.FromArray(normals, indices[this.faceId * 3] * 3);
                 var normal1 = Vector3.FromArray(normals, indices[this.faceId * 3 + 1] * 3);
                 var normal1 = Vector3.FromArray(normals, indices[this.faceId * 3 + 1] * 3);
@@ -40,7 +45,7 @@
 
 
                 result = new Vector3(normal0.x + normal1.x + normal2.x, normal0.y + normal1.y + normal2.y, normal0.z + normal1.z + normal2.z);
                 result = new Vector3(normal0.x + normal1.x + normal2.x, normal0.y + normal1.y + normal2.y, normal0.z + normal1.z + normal2.z);
             } else {
             } else {
-                var positions = this.pickedMesh.getVerticesData(VertexBuffer.PositionKind);
+                var positions = (<number[] | Float32Array>this.pickedMesh.getVerticesData(VertexBuffer.PositionKind));
 
 
                 var vertex1 = Vector3.FromArray(positions, indices[this.faceId * 3] * 3);
                 var vertex1 = Vector3.FromArray(positions, indices[this.faceId * 3] * 3);
                 var vertex2 = Vector3.FromArray(positions, indices[this.faceId * 3 + 1] * 3);
                 var vertex2 = Vector3.FromArray(positions, indices[this.faceId * 3 + 1] * 3);
@@ -65,7 +70,14 @@
             }
             }
 
 
             var indices = this.pickedMesh.getIndices();
             var indices = this.pickedMesh.getIndices();
+            if (!indices) {
+                return null;
+            }
+
             var uvs = this.pickedMesh.getVerticesData(VertexBuffer.UVKind);
             var uvs = this.pickedMesh.getVerticesData(VertexBuffer.UVKind);
+            if (!uvs) {
+                return null;
+            }            
 
 
             var uv0 = Vector2.FromArray(uvs, indices[this.faceId * 3] * 2);
             var uv0 = Vector2.FromArray(uvs, indices[this.faceId * 3] * 2);
             var uv1 = Vector2.FromArray(uvs, indices[this.faceId * 3 + 1] * 2);
             var uv1 = Vector2.FromArray(uvs, indices[this.faceId * 3 + 1] * 2);

+ 30 - 30
src/Engine/babylon.engine.ts

@@ -1,5 +1,5 @@
 module BABYLON {
 module BABYLON {
-    var compileShader = (gl: WebGLRenderingContext, source: string, type: string, defines: string, shaderVersion: string): WebGLShader => {
+    var compileShader = (gl: WebGLRenderingContext, source: string, type: string, defines: Nullable<string>, shaderVersion: string): WebGLShader => {
         return compileRawShader(gl, shaderVersion + (defines ? defines + "\n" : "") + source, type);
         return compileRawShader(gl, shaderVersion + (defines ? defines + "\n" : "") + source, type);
     };
     };
 
 
@@ -2424,7 +2424,7 @@
             return this._createShaderProgram(vertexShader, fragmentShader, context);
             return this._createShaderProgram(vertexShader, fragmentShader, context);
         }
         }
 
 
-        public createShaderProgram(vertexCode: string, fragmentCode: string, defines: string, context?: WebGLRenderingContext): WebGLProgram {
+        public createShaderProgram(vertexCode: string, fragmentCode: string, defines: Nullable<string>, context?: WebGLRenderingContext): WebGLProgram {
             context = context || this._gl;
             context = context || this._gl;
 
 
             var shaderVersion = (this._webGLVersion > 1) ? "#version 300 es\n" : "";
             var shaderVersion = (this._webGLVersion > 1) ? "#version 300 es\n" : "";
@@ -2463,7 +2463,7 @@
         }
         }
 
 
         public getUniforms(shaderProgram: WebGLProgram, uniformsNames: string[]): Nullable<WebGLUniformLocation>[] {
         public getUniforms(shaderProgram: WebGLProgram, uniformsNames: string[]): Nullable<WebGLUniformLocation>[] {
-            var results = [];
+            var results = new Array<Nullable<WebGLUniformLocation>>();
 
 
             for (var index = 0; index < uniformsNames.length; index++) {
             for (var index = 0; index < uniformsNames.length; index++) {
                 results.push(this._gl.getUniformLocation(shaderProgram, uniformsNames[index]));
                 results.push(this._gl.getUniformLocation(shaderProgram, uniformsNames[index]));
@@ -2498,161 +2498,161 @@
             effect.onBindObservable.notifyObservers(effect);
             effect.onBindObservable.notifyObservers(effect);
         }
         }
 
 
-        public setIntArray(uniform: WebGLUniformLocation, array: Int32Array): void {
+        public setIntArray(uniform: Nullable<WebGLUniformLocation>, array: Int32Array): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform1iv(uniform, array);
             this._gl.uniform1iv(uniform, array);
         }
         }
 
 
-        public setIntArray2(uniform: WebGLUniformLocation, array: Int32Array): void {
+        public setIntArray2(uniform: Nullable<WebGLUniformLocation>, array: Int32Array): void {
             if (!uniform || array.length % 2 !== 0)
             if (!uniform || array.length % 2 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform2iv(uniform, array);
             this._gl.uniform2iv(uniform, array);
         }
         }
 
 
-        public setIntArray3(uniform: WebGLUniformLocation, array: Int32Array): void {
+        public setIntArray3(uniform: Nullable<WebGLUniformLocation>, array: Int32Array): void {
             if (!uniform || array.length % 3 !== 0)
             if (!uniform || array.length % 3 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform3iv(uniform, array);
             this._gl.uniform3iv(uniform, array);
         }
         }
 
 
-        public setIntArray4(uniform: WebGLUniformLocation, array: Int32Array): void {
+        public setIntArray4(uniform: Nullable<WebGLUniformLocation>, array: Int32Array): void {
             if (!uniform || array.length % 4 !== 0)
             if (!uniform || array.length % 4 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform4iv(uniform, array);
             this._gl.uniform4iv(uniform, array);
         }
         }
 
 
-        public setFloatArray(uniform: WebGLUniformLocation, array: Float32Array): void {
+        public setFloatArray(uniform: Nullable<WebGLUniformLocation>, array: Float32Array): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform1fv(uniform, array);
             this._gl.uniform1fv(uniform, array);
         }
         }
 
 
-        public setFloatArray2(uniform: WebGLUniformLocation, array: Float32Array): void {
+        public setFloatArray2(uniform: Nullable<WebGLUniformLocation>, array: Float32Array): void {
             if (!uniform || array.length % 2 !== 0)
             if (!uniform || array.length % 2 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform2fv(uniform, array);
             this._gl.uniform2fv(uniform, array);
         }
         }
 
 
-        public setFloatArray3(uniform: WebGLUniformLocation, array: Float32Array): void {
+        public setFloatArray3(uniform: Nullable<WebGLUniformLocation>, array: Float32Array): void {
             if (!uniform || array.length % 3 !== 0)
             if (!uniform || array.length % 3 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform3fv(uniform, array);
             this._gl.uniform3fv(uniform, array);
         }
         }
 
 
-        public setFloatArray4(uniform: WebGLUniformLocation, array: Float32Array): void {
+        public setFloatArray4(uniform: Nullable<WebGLUniformLocation>, array: Float32Array): void {
             if (!uniform || array.length % 4 !== 0)
             if (!uniform || array.length % 4 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform4fv(uniform, array);
             this._gl.uniform4fv(uniform, array);
         }
         }
 
 
-        public setArray(uniform: WebGLUniformLocation, array: number[]): void {
+        public setArray(uniform: Nullable<WebGLUniformLocation>, array: number[]): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform1fv(uniform, <any>array);
             this._gl.uniform1fv(uniform, <any>array);
         }
         }
 
 
-        public setArray2(uniform: WebGLUniformLocation, array: number[]): void {
+        public setArray2(uniform: Nullable<WebGLUniformLocation>, array: number[]): void {
             if (!uniform || array.length % 2 !== 0)
             if (!uniform || array.length % 2 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform2fv(uniform, <any>array);
             this._gl.uniform2fv(uniform, <any>array);
         }
         }
 
 
-        public setArray3(uniform: WebGLUniformLocation, array: number[]): void {
+        public setArray3(uniform: Nullable<WebGLUniformLocation>, array: number[]): void {
             if (!uniform || array.length % 3 !== 0)
             if (!uniform || array.length % 3 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform3fv(uniform, <any>array);
             this._gl.uniform3fv(uniform, <any>array);
         }
         }
 
 
-        public setArray4(uniform: WebGLUniformLocation, array: number[]): void {
+        public setArray4(uniform: Nullable<WebGLUniformLocation>, array: number[]): void {
             if (!uniform || array.length % 4 !== 0)
             if (!uniform || array.length % 4 !== 0)
                 return;
                 return;
 
 
             this._gl.uniform4fv(uniform, <any>array);
             this._gl.uniform4fv(uniform, <any>array);
         }
         }
 
 
-        public setMatrices(uniform: WebGLUniformLocation, matrices: Float32Array): void {
+        public setMatrices(uniform: Nullable<WebGLUniformLocation>, matrices: Float32Array): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniformMatrix4fv(uniform, false, matrices);
             this._gl.uniformMatrix4fv(uniform, false, matrices);
         }
         }
 
 
-        public setMatrix(uniform: WebGLUniformLocation, matrix: Matrix): void {
+        public setMatrix(uniform: Nullable<WebGLUniformLocation>, matrix: Matrix): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniformMatrix4fv(uniform, false, matrix.toArray());
             this._gl.uniformMatrix4fv(uniform, false, matrix.toArray());
         }
         }
 
 
-        public setMatrix3x3(uniform: WebGLUniformLocation, matrix: Float32Array): void {
+        public setMatrix3x3(uniform: Nullable<WebGLUniformLocation>, matrix: Float32Array): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniformMatrix3fv(uniform, false, matrix);
             this._gl.uniformMatrix3fv(uniform, false, matrix);
         }
         }
 
 
-        public setMatrix2x2(uniform: WebGLUniformLocation, matrix: Float32Array): void {
+        public setMatrix2x2(uniform: Nullable<WebGLUniformLocation>, matrix: Float32Array): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniformMatrix2fv(uniform, false, matrix);
             this._gl.uniformMatrix2fv(uniform, false, matrix);
         }
         }
 
 
-        public setFloat(uniform: WebGLUniformLocation, value: number): void {
+        public setFloat(uniform: Nullable<WebGLUniformLocation>, value: number): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform1f(uniform, value);
             this._gl.uniform1f(uniform, value);
         }
         }
 
 
-        public setFloat2(uniform: WebGLUniformLocation, x: number, y: number): void {
+        public setFloat2(uniform: Nullable<WebGLUniformLocation>, x: number, y: number): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform2f(uniform, x, y);
             this._gl.uniform2f(uniform, x, y);
         }
         }
 
 
-        public setFloat3(uniform: WebGLUniformLocation, x: number, y: number, z: number): void {
+        public setFloat3(uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform3f(uniform, x, y, z);
             this._gl.uniform3f(uniform, x, y, z);
         }
         }
 
 
-        public setBool(uniform: WebGLUniformLocation, bool: number): void {
+        public setBool(uniform: Nullable<WebGLUniformLocation>, bool: number): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform1i(uniform, bool);
             this._gl.uniform1i(uniform, bool);
         }
         }
 
 
-        public setFloat4(uniform: WebGLUniformLocation, x: number, y: number, z: number, w: number): void {
+        public setFloat4(uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number, w: number): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform4f(uniform, x, y, z, w);
             this._gl.uniform4f(uniform, x, y, z, w);
         }
         }
 
 
-        public setColor3(uniform: WebGLUniformLocation, color3: Color3): void {
+        public setColor3(uniform: Nullable<WebGLUniformLocation>, color3: Color3): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
             this._gl.uniform3f(uniform, color3.r, color3.g, color3.b);
             this._gl.uniform3f(uniform, color3.r, color3.g, color3.b);
         }
         }
 
 
-        public setColor4(uniform: WebGLUniformLocation, color3: Color3, alpha: number): void {
+        public setColor4(uniform: Nullable<WebGLUniformLocation>, color3: Color3, alpha: number): void {
             if (!uniform)
             if (!uniform)
                 return;
                 return;
 
 
@@ -4300,7 +4300,7 @@
             }
             }
         }
         }
 
 
-        public setTexture(channel: number, uniform: WebGLUniformLocation, texture: BaseTexture): void {
+        public setTexture(channel: number, uniform: Nullable<WebGLUniformLocation>, texture: Nullable<BaseTexture>): void {
             if (channel < 0) {
             if (channel < 0) {
                 return;
                 return;
             }
             }
@@ -4309,7 +4309,7 @@
             this._setTexture(channel, texture);
             this._setTexture(channel, texture);
         }
         }
 
 
-        private _setTexture(channel: number, texture: BaseTexture): void {
+        private _setTexture(channel: number, texture: Nullable<BaseTexture>): void {
             // Not ready?
             // Not ready?
             if (!texture) {
             if (!texture) {
                 if (this._activeTexturesCache[channel] != null) {
                 if (this._activeTexturesCache[channel] != null) {
@@ -4392,8 +4392,8 @@
             }
             }
         }
         }
 
 
-        public setTextureArray(channel: number, uniform: WebGLUniformLocation, textures: BaseTexture[]): void {
-            if (channel < 0) {
+        public setTextureArray(channel: number, uniform: Nullable<WebGLUniformLocation>, textures: BaseTexture[]): void {
+            if (channel < 0 || !uniform) {
                 return;
                 return;
             }
             }
 
 

+ 1 - 1
src/Events/babylon.pointerEvents.ts

@@ -62,7 +62,7 @@ module BABYLON {
      * The event member is an instance of PointerEvent for all types except PointerWheel and is of type MouseWheelEvent when type equals PointerWheel. The different event types can be found in the PointerEventTypes class.
      * The event member is an instance of PointerEvent for all types except PointerWheel and is of type MouseWheelEvent when type equals PointerWheel. The different event types can be found in the PointerEventTypes class.
      */
      */
     export class PointerInfo extends PointerInfoBase {
     export class PointerInfo extends PointerInfoBase {
-        constructor(type: number, event: PointerEvent | MouseWheelEvent, public pickInfo: PickingInfo) {
+        constructor(type: number, event: PointerEvent | MouseWheelEvent, public pickInfo: Nullable<PickingInfo>) {
             super(type, event);
             super(type, event);
         }
         }
     }    
     }    

+ 1 - 1
src/LensFlare/babylon.lensFlare.ts

@@ -1,7 +1,7 @@
 module BABYLON {
 module BABYLON {
     export class LensFlare {
     export class LensFlare {
         public color: Color3;
         public color: Color3;
-        public texture: Texture;
+        public texture: Nullable<Texture>;
         public alphaMode: number = Engine.ALPHA_ONEONE;
         public alphaMode: number = Engine.ALPHA_ONEONE;
 
 
         private _system: LensFlareSystem;
         private _system: LensFlareSystem;

+ 7 - 7
src/LensFlare/babylon.lensFlareSystem.ts

@@ -9,8 +9,8 @@
 
 
         private _scene: Scene;
         private _scene: Scene;
         private _emitter: any;
         private _emitter: any;
-        private _vertexBuffers: { [key: string]: VertexBuffer } = {};
-        private _indexBuffer: WebGLBuffer;
+        private _vertexBuffers: { [key: string]: Nullable<VertexBuffer> } = {};
+        private _indexBuffer: Nullable<WebGLBuffer>;
         private _effect: Effect;
         private _effect: Effect;
         private _positionX: number;
         private _positionX: number;
         private _positionY: number;
         private _positionY: number;
@@ -23,7 +23,7 @@
             this.id = name;
             this.id = name;
             scene.lensFlareSystems.push(this);
             scene.lensFlareSystems.push(this);
 
 
-            this.meshesSelectionPredicate = m => m.material && m.isVisible && m.isEnabled() && m.isBlocker && ((m.layerMask & scene.activeCamera.layerMask) != 0);
+            this.meshesSelectionPredicate = m => scene.activeCamera !== null && m.material && m.isVisible && m.isEnabled() && m.isBlocker && ((m.layerMask & scene.activeCamera.layerMask) != 0);
 
 
             var engine = scene.getEngine();
             var engine = scene.getEngine();
 
 
@@ -112,7 +112,7 @@
         }
         }
 
 
         public _isVisible(): boolean {
         public _isVisible(): boolean {
-            if (!this._isEnabled) {
+            if (!this._isEnabled || !this._scene.activeCamera) {
                 return false;
                 return false;
             }
             }
 
 
@@ -124,11 +124,11 @@
             var ray = new Ray(this._scene.activeCamera.globalPosition, direction);
             var ray = new Ray(this._scene.activeCamera.globalPosition, direction);
             var pickInfo = this._scene.pickWithRay(ray, this.meshesSelectionPredicate, true);
             var pickInfo = this._scene.pickWithRay(ray, this.meshesSelectionPredicate, true);
 
 
-            return !pickInfo.hit || pickInfo.distance > distance;
+            return !pickInfo || !pickInfo.hit || pickInfo.distance > distance;
         }
         }
 
 
         public render(): boolean {
         public render(): boolean {
-            if (!this._effect.isReady())
+            if (!this._effect.isReady() || !this._scene.activeCamera)
                 return false;
                 return false;
 
 
             var engine = this._scene.getEngine();
             var engine = this._scene.getEngine();
@@ -298,7 +298,7 @@
                     size: flare.size,
                     size: flare.size,
                     position: flare.position,
                     position: flare.position,
                     color: flare.color.asArray(),
                     color: flare.color.asArray(),
-                    textureName: Tools.GetFilename(flare.texture.name)
+                    textureName: Tools.GetFilename(flare.texture ? flare.texture.name : "")
                 });
                 });
             }
             }
 
 

+ 98 - 25
src/Lights/Shadows/babylon.shadowGenerator.ts

@@ -3,8 +3,8 @@
      * Interface to implement to create a shadow generator compatible with BJS.
      * Interface to implement to create a shadow generator compatible with BJS.
      */
      */
     export interface IShadowGenerator {
     export interface IShadowGenerator {
-        getShadowMap(): RenderTargetTexture;
-        getShadowMapForRendering(): RenderTargetTexture;
+        getShadowMap(): Nullable<RenderTargetTexture>;
+        getShadowMapForRendering(): Nullable<RenderTargetTexture>;
  
  
         isReady(subMesh: SubMesh, useInstances: boolean): boolean;
         isReady(subMesh: SubMesh, useInstances: boolean): boolean;
 
 
@@ -250,18 +250,18 @@
             return this;
             return this;
         }
         }
 
 
-        private _shadowMap: RenderTargetTexture;
-        private _shadowMap2: RenderTargetTexture;
+        private _shadowMap: Nullable<RenderTargetTexture>;
+        private _shadowMap2: Nullable<RenderTargetTexture>;
         /**
         /**
          * Returns a RenderTargetTexture object : the shadow map texture.  
          * Returns a RenderTargetTexture object : the shadow map texture.  
          */
          */
-        public getShadowMap(): RenderTargetTexture {
+        public getShadowMap(): Nullable<RenderTargetTexture> {
             return this._shadowMap;
             return this._shadowMap;
         }
         }
         /**
         /**
          * Returns the most ready computed shadow map as a RenderTargetTexture object.  
          * Returns the most ready computed shadow map as a RenderTargetTexture object.  
          */
          */
-        public getShadowMapForRendering(): RenderTargetTexture {
+        public getShadowMapForRendering(): Nullable<RenderTargetTexture> {
             if (this._shadowMap2) {
             if (this._shadowMap2) {
                 return this._shadowMap2;
                 return this._shadowMap2;
             }
             }
@@ -275,6 +275,14 @@
          * @param includeDescendants boolean indicating if the descendants should be added. Default to true
          * @param includeDescendants boolean indicating if the descendants should be added. Default to true
          */
          */
         public addShadowCaster(mesh: AbstractMesh, includeDescendants = true): ShadowGenerator {
         public addShadowCaster(mesh: AbstractMesh, includeDescendants = true): ShadowGenerator {
+            if (!this._shadowMap) {
+                return this;
+            }
+
+            if (!this._shadowMap.renderList) {
+                this._shadowMap.renderList = [];
+            }
+
             this._shadowMap.renderList.push(mesh);
             this._shadowMap.renderList.push(mesh);
 
 
             if (includeDescendants) {
             if (includeDescendants) {
@@ -290,6 +298,10 @@
          * @param includeDescendants boolean indicating if the descendants should be removed. Default to true
          * @param includeDescendants boolean indicating if the descendants should be removed. Default to true
          */
          */
         public removeShadowCaster(mesh: AbstractMesh, includeDescendants = true): ShadowGenerator {
         public removeShadowCaster(mesh: AbstractMesh, includeDescendants = true): ShadowGenerator {
+            if (!this._shadowMap || !this._shadowMap.renderList) {
+                return this;
+            }
+
             var index = this._shadowMap.renderList.indexOf(mesh);
             var index = this._shadowMap.renderList.indexOf(mesh);
 
 
             if (index !== -1) {
             if (index !== -1) {
@@ -333,10 +345,10 @@
         private _cachedDirection: Vector3;
         private _cachedDirection: Vector3;
         private _cachedDefines: string;
         private _cachedDefines: string;
         private _currentRenderID: number;
         private _currentRenderID: number;
-        private _downSamplePostprocess: PassPostProcess;
-        private _boxBlurPostprocess: PostProcess;
-        private _kernelBlurXPostprocess: PostProcess;
-        private _kernelBlurYPostprocess: PostProcess;
+        private _downSamplePostprocess: Nullable<PassPostProcess>;
+        private _boxBlurPostprocess: Nullable<PostProcess>;
+        private _kernelBlurXPostprocess: Nullable<PostProcess>;
+        private _kernelBlurYPostprocess: Nullable<PostProcess>;
         private _blurPostProcesses: PostProcess[];
         private _blurPostProcesses: PostProcess[];
         private _mapSize: number;
         private _mapSize: number;
         private _currentFaceIndex = 0;
         private _currentFaceIndex = 0;
@@ -420,8 +432,11 @@
                 if (!this._blurPostProcesses) {
                 if (!this._blurPostProcesses) {
                     this._initializeBlurRTTAndPostProcesses();
                     this._initializeBlurRTTAndPostProcesses();
                 }
                 }
+                let shadowMap = this.getShadowMapForRendering();
 
 
-                this._scene.postProcessManager.directRender(this._blurPostProcesses, this.getShadowMapForRendering().getInternalTexture(), true);
+                if (shadowMap) {
+                    this._scene.postProcessManager.directRender(this._blurPostProcesses, shadowMap.getInternalTexture(), true);
+                }
             });
             });
 
 
             // Clear according to the chosen filter.
             // Clear according to the chosen filter.
@@ -531,7 +546,9 @@
                 this._effect.setMatrix("viewProjection", this.getTransformMatrix());
                 this._effect.setMatrix("viewProjection", this.getTransformMatrix());
                 this._effect.setVector3("lightPosition", this.getLight().position);
                 this._effect.setVector3("lightPosition", this.getLight().position);
                 
                 
-                this._effect.setFloat2("depthValues", this.getLight().getDepthMinZ(scene.activeCamera), this.getLight().getDepthMinZ(scene.activeCamera) + this.getLight().getDepthMaxZ(scene.activeCamera));
+                if (scene.activeCamera) {
+                    this._effect.setFloat2("depthValues", this.getLight().getDepthMinZ(scene.activeCamera), this.getLight().getDepthMinZ(scene.activeCamera) + this.getLight().getDepthMaxZ(scene.activeCamera));
+                }
 
 
                 // Alpha test
                 // Alpha test
                 if (material && material.needAlphaTesting()) {
                 if (material && material.needAlphaTesting()) {
@@ -560,11 +577,17 @@
                 }
                 }
             } else {
             } else {
                 // Need to reset refresh rate of the shadowMap
                 // Need to reset refresh rate of the shadowMap
-                this._shadowMap.resetRefreshCounter();
+                if (this._shadowMap) {
+                    this._shadowMap.resetRefreshCounter();
+                }
             }
             }
         }
         }
 
 
         private _applyFilterValues(): void {
         private _applyFilterValues(): void {
+            if (!this._shadowMap) {
+                return;
+            }
+
             if (this.filter === ShadowGenerator.FILTER_NONE) {
             if (this.filter === ShadowGenerator.FILTER_NONE) {
                 this._shadowMap.updateSamplingMode(Texture.NEAREST_SAMPLINGMODE);
                 this._shadowMap.updateSamplingMode(Texture.NEAREST_SAMPLINGMODE);
             } else {
             } else {
@@ -576,10 +599,21 @@
          * Force shader compilation including textures ready check
          * Force shader compilation including textures ready check
          */
          */
         public forceCompilation(onCompiled: (generator: ShadowGenerator) => void, options?: { useInstances: boolean }): void {
         public forceCompilation(onCompiled: (generator: ShadowGenerator) => void, options?: { useInstances: boolean }): void {
+            let shadowMap = this.getShadowMap();
+            if (!shadowMap) {
+                return;
+            }
+
             var subMeshes = new Array<SubMesh>();
             var subMeshes = new Array<SubMesh>();
             var currentIndex = 0;
             var currentIndex = 0;
 
 
-            for(var mesh of this.getShadowMap().renderList) {
+            let renderList = shadowMap.renderList;
+
+            if (!renderList) {
+                return;
+            }
+
+            for(var mesh of renderList) {
                 subMeshes.push(...mesh.subMeshes);
                 subMeshes.push(...mesh.subMeshes);
             }
             }
 
 
@@ -720,12 +754,23 @@
                 return;
                 return;
             }
             }
 
 
+            let camera = scene.activeCamera;
+            if (!camera) {
+                return;
+            }
+
+            let shadowMap = this.getShadowMap();
+
+            if (!shadowMap) {
+                return;
+            }
+
             if (!light.needCube()) {
             if (!light.needCube()) {
                 effect.setMatrix("lightMatrix" + lightIndex, this.getTransformMatrix());
                 effect.setMatrix("lightMatrix" + lightIndex, this.getTransformMatrix());
             } 
             } 
             effect.setTexture("shadowSampler" + lightIndex, this.getShadowMapForRendering());
             effect.setTexture("shadowSampler" + lightIndex, this.getShadowMapForRendering());
-            light._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), this.blurScale / this.getShadowMap().getSize().width, this.depthScale, this.frustumEdgeFalloff, lightIndex);
-            light._uniformBuffer.updateFloat2("depthValues", this.getLight().getDepthMinZ(scene.activeCamera), this.getLight().getDepthMinZ(scene.activeCamera) + this.getLight().getDepthMaxZ(scene.activeCamera), lightIndex);
+            light._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), this.blurScale / shadowMap.getSize().width, this.depthScale, this.frustumEdgeFalloff, lightIndex);
+            light._uniformBuffer.updateFloat2("depthValues", this.getLight().getDepthMinZ(camera), this.getLight().getDepthMinZ(camera) + this.getLight().getDepthMaxZ(camera), lightIndex);
         }
         }
 
 
         // Methods
         // Methods
@@ -758,7 +803,15 @@
 
 
                 Matrix.LookAtLHToRef(lightPosition, lightPosition.add(this._lightDirection), Vector3.Up(), this._viewMatrix);
                 Matrix.LookAtLHToRef(lightPosition, lightPosition.add(this._lightDirection), Vector3.Up(), this._viewMatrix);
 
 
-                this._light.setShadowProjectionMatrix(this._projectionMatrix, this._viewMatrix, this.getShadowMap().renderList);
+                let shadowMap = this.getShadowMap();
+
+                if (shadowMap) {
+                    let renderList =shadowMap.renderList;
+
+                    if (renderList) {
+                        this._light.setShadowProjectionMatrix(this._projectionMatrix, this._viewMatrix, renderList);
+                    }
+                }
 
 
                 this._viewMatrix.multiplyToRef(this._projectionMatrix, this._transformMatrix);
                 this._viewMatrix.multiplyToRef(this._projectionMatrix, this._transformMatrix);
             }
             }
@@ -767,8 +820,14 @@
         }
         }
 
 
         public recreateShadowMap(): void {
         public recreateShadowMap(): void {
+            let shadowMap = this._shadowMap;
+
+            if (!shadowMap) {
+                return;                
+            }
+
             // Track render list.
             // Track render list.
-            var renderList = this._shadowMap.renderList;
+            var renderList = shadowMap.renderList;
             // Clean up existing data.
             // Clean up existing data.
             this._disposeRTTandPostProcesses();
             this._disposeRTTandPostProcesses();
             // Reinitializes.
             // Reinitializes.
@@ -778,7 +837,7 @@
             // Reaffect the filter.
             // Reaffect the filter.
             this._applyFilterValues();
             this._applyFilterValues();
             // Reaffect Render List.
             // Reaffect Render List.
-            this._shadowMap.renderList = renderList;
+            shadowMap.renderList = renderList;
         }
         }
 
 
         private _disposeBlurPostProcesses(): void {
         private _disposeBlurPostProcesses(): void {
@@ -807,7 +866,7 @@
                 this._kernelBlurYPostprocess = null;
                 this._kernelBlurYPostprocess = null;
             }
             }
 
 
-            this._blurPostProcesses = null;
+            this._blurPostProcesses = [];
         }
         }
 
 
         private _disposeRTTandPostProcesses(): void {
         private _disposeRTTandPostProcesses(): void {
@@ -826,8 +885,10 @@
         public dispose(): void {
         public dispose(): void {
             this._disposeRTTandPostProcesses();
             this._disposeRTTandPostProcesses();
 
 
-            this._light._shadowGenerator = null;
-            this._light._markMeshesAsLightDirty();
+            if (this._light) {
+                this._light._shadowGenerator = null;
+                this._light._markMeshesAsLightDirty();
+            }
         }
         }
         /**
         /**
          * Serializes the ShadowGenerator and returns a serializationObject.  
          * Serializes the ShadowGenerator and returns a serializationObject.  
@@ -836,6 +897,10 @@
             var serializationObject: any = {};
             var serializationObject: any = {};
             var shadowMap = this.getShadowMap();
             var shadowMap = this.getShadowMap();
 
 
+            if (!shadowMap) {
+                return serializationObject;
+            }
+
             serializationObject.lightId = this._light.id;
             serializationObject.lightId = this._light.id;
             serializationObject.mapSize = shadowMap.getRenderSize();
             serializationObject.mapSize = shadowMap.getRenderSize();
             serializationObject.useExponentialShadowMap = this.useExponentialShadowMap;
             serializationObject.useExponentialShadowMap = this.useExponentialShadowMap;
@@ -853,10 +918,12 @@
             serializationObject.transparencyShadow = this._transparencyShadow;
             serializationObject.transparencyShadow = this._transparencyShadow;
 
 
             serializationObject.renderList = [];
             serializationObject.renderList = [];
-            for (var meshIndex = 0; meshIndex < shadowMap.renderList.length; meshIndex++) {
-                var mesh = shadowMap.renderList[meshIndex];
+            if (shadowMap.renderList) {
+                for (var meshIndex = 0; meshIndex < shadowMap.renderList.length; meshIndex++) {
+                    var mesh = shadowMap.renderList[meshIndex];
 
 
-                serializationObject.renderList.push(mesh.id);
+                    serializationObject.renderList.push(mesh.id);
+                }
             }
             }
 
 
             return serializationObject;
             return serializationObject;
@@ -873,6 +940,12 @@
             for (var meshIndex = 0; meshIndex < parsedShadowGenerator.renderList.length; meshIndex++) {
             for (var meshIndex = 0; meshIndex < parsedShadowGenerator.renderList.length; meshIndex++) {
                 var meshes = scene.getMeshesByID(parsedShadowGenerator.renderList[meshIndex]);
                 var meshes = scene.getMeshesByID(parsedShadowGenerator.renderList[meshIndex]);
                 meshes.forEach(function (mesh) {
                 meshes.forEach(function (mesh) {
+                    if (!shadowMap) {
+                        return;
+                    }
+                    if (!shadowMap.renderList) {
+                        shadowMap.renderList = [];
+                    }
                     shadowMap.renderList.push(mesh);
                     shadowMap.renderList.push(mesh);
                 });
                 });
             }
             }

+ 8 - 0
src/Lights/babylon.directionalLight.ts

@@ -84,6 +84,10 @@ module BABYLON {
         protected _setDefaultFixedFrustumShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix): void {
         protected _setDefaultFixedFrustumShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix): void {
             var activeCamera = this.getScene().activeCamera;
             var activeCamera = this.getScene().activeCamera;
 
 
+            if (!activeCamera) {
+                return;
+            }
+
             Matrix.OrthoLHToRef(this.shadowFrustumSize, this.shadowFrustumSize,
             Matrix.OrthoLHToRef(this.shadowFrustumSize, this.shadowFrustumSize,
                 this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ, this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ, matrix);
                 this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ, this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ, matrix);
         }
         }
@@ -95,6 +99,10 @@ module BABYLON {
         protected _setDefaultAutoExtendShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void {
         protected _setDefaultAutoExtendShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void {
             var activeCamera = this.getScene().activeCamera;
             var activeCamera = this.getScene().activeCamera;
 
 
+            if (!activeCamera) {
+                return;
+            }
+
             // Check extends
             // Check extends
             if (this.autoUpdateExtends || this._orthoLeft === Number.MAX_VALUE) {
             if (this.autoUpdateExtends || this._orthoLeft === Number.MAX_VALUE) {
                 var tempVector3 = Vector3.Zero();
                 var tempVector3 = Vector3.Zero();

+ 1 - 1
src/Lights/babylon.hemisphericLight.ts

@@ -44,7 +44,7 @@
             return this.direction;
             return this.direction;
         }
         }
 
 
-        public getShadowGenerator(): ShadowGenerator {
+        public getShadowGenerator(): Nullable<ShadowGenerator> {
             return null;
             return null;
         }
         }
 
 

+ 18 - 7
src/Lights/babylon.light.ts

@@ -237,7 +237,7 @@
         }
         }
 
 
         private _parentedWorldMatrix: Matrix;
         private _parentedWorldMatrix: Matrix;
-        public _shadowGenerator: IShadowGenerator;
+        public _shadowGenerator: Nullable<IShadowGenerator>;
         public _excludedMeshesIds = new Array<string>();
         public _excludedMeshesIds = new Array<string>();
         public _includedOnlyMeshesIds = new Array<string>();
         public _includedOnlyMeshesIds = new Array<string>();
 
 
@@ -302,7 +302,7 @@
         /**
         /**
          * Returns the Light associated shadow generator.  
          * Returns the Light associated shadow generator.  
          */
          */
-        public getShadowGenerator(): IShadowGenerator {
+        public getShadowGenerator(): Nullable<IShadowGenerator> {
             return this._shadowGenerator;
             return this._shadowGenerator;
         }
         }
 
 
@@ -426,8 +426,13 @@
         /**
         /**
          * Returns a new Light object, named "name", from the current one.  
          * Returns a new Light object, named "name", from the current one.  
          */
          */
-        public clone(name: string): Light {
-            return SerializationHelper.Clone(Light.GetConstructorFromName(this.getTypeID(), name, this.getScene()), this);
+        public clone(name: string): Nullable<Light> {
+            let constructor = Light.GetConstructorFromName(this.getTypeID(), name, this.getScene());
+
+            if (!constructor) {
+                return null;
+            }
+            return SerializationHelper.Clone(constructor, this);
         }
         }
         /**
         /**
          * Serializes the current light into a Serialization object.  
          * Serializes the current light into a Serialization object.  
@@ -470,7 +475,7 @@
          * Creates a new typed light from the passed type (integer) : point light = 0, directional light = 1, spot light = 2, hemispheric light = 3.  
          * Creates a new typed light from the passed type (integer) : point light = 0, directional light = 1, spot light = 2, hemispheric light = 3.  
          * This new light is named "name" and added to the passed scene.  
          * This new light is named "name" and added to the passed scene.  
          */
          */
-        static GetConstructorFromName(type: number, name: string, scene: Scene): () => Light {
+        static GetConstructorFromName(type: number, name: string, scene: Scene): Nullable<() => Light> {
             switch (type) {
             switch (type) {
                 case 0:
                 case 0:
                     return () => new PointLight(name, Vector3.Zero(), scene);
                     return () => new PointLight(name, Vector3.Zero(), scene);
@@ -488,8 +493,14 @@
         /**
         /**
          * Parses the passed "parsedLight" and returns a new instanced Light from this parsing.  
          * Parses the passed "parsedLight" and returns a new instanced Light from this parsing.  
          */
          */
-        public static Parse(parsedLight: any, scene: Scene): Light {
-            var light = SerializationHelper.Parse(Light.GetConstructorFromName(parsedLight.type, parsedLight.name, scene), parsedLight, scene);
+        public static Parse(parsedLight: any, scene: Scene): Nullable<Light> {
+            let constructor = Light.GetConstructorFromName(parsedLight.type, parsedLight.name, scene);
+
+            if (!constructor) {
+                return null;
+            }
+
+            var light = SerializationHelper.Parse(constructor, parsedLight, scene);
 
 
             // Inclusion / exclusions
             // Inclusion / exclusions
             if (parsedLight.excludedMeshesIds) {
             if (parsedLight.excludedMeshesIds) {

+ 5 - 0
src/Lights/babylon.pointLight.ts

@@ -110,6 +110,11 @@
          */
          */
         protected _setDefaultShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void {
         protected _setDefaultShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void {
             var activeCamera = this.getScene().activeCamera;
             var activeCamera = this.getScene().activeCamera;
+
+            if (!activeCamera) {
+                return;
+            }
+
             Matrix.PerspectiveFovLHToRef(this.shadowAngle, 1.0, 
             Matrix.PerspectiveFovLHToRef(this.shadowAngle, 1.0, 
             this.getDepthMinZ(activeCamera), this.getDepthMaxZ(activeCamera), matrix);
             this.getDepthMinZ(activeCamera), this.getDepthMaxZ(activeCamera), matrix);
         }
         }

+ 4 - 0
src/Lights/babylon.spotLight.ts

@@ -69,6 +69,10 @@
         protected _setDefaultShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void {
         protected _setDefaultShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void {
             var activeCamera = this.getScene().activeCamera;
             var activeCamera = this.getScene().activeCamera;
 
 
+            if (!activeCamera) {
+                return;
+            }
+
             this._shadowAngleScale = this._shadowAngleScale || 1;
             this._shadowAngleScale = this._shadowAngleScale || 1;
             var angle = this._shadowAngleScale * this._angle;
             var angle = this._shadowAngleScale * this._angle;
             
             

+ 15 - 15
src/Loading/Plugins/babylon.babylonFileLoader.ts

@@ -54,10 +54,10 @@
                     meshesNames = [meshesNames];
                     meshesNames = [meshesNames];
                 }
                 }
 
 
+                var hierarchyIds = new Array<number>();
                 if (parsedData.meshes !== undefined && parsedData.meshes !== null) {
                 if (parsedData.meshes !== undefined && parsedData.meshes !== null) {
                     var loadedSkeletonsIds = [];
                     var loadedSkeletonsIds = [];
                     var loadedMaterialsIds = [];
                     var loadedMaterialsIds = [];
-                    var hierarchyIds = new Array<number>();
                     var index: number;
                     var index: number;
                     var cache: number;
                     var cache: number;
                     for (index = 0, cache = parsedData.meshes.length; index < cache; index++) {
                     for (index = 0, cache = parsedData.meshes.length; index < cache; index++) {
@@ -180,7 +180,7 @@
                         currentMesh = scene.meshes[index];
                         currentMesh = scene.meshes[index];
                         if (currentMesh._waitingParentId) {
                         if (currentMesh._waitingParentId) {
                             currentMesh.parent = scene.getLastEntryByID(currentMesh._waitingParentId);
                             currentMesh.parent = scene.getLastEntryByID(currentMesh._waitingParentId);
-                            currentMesh._waitingParentId = undefined;
+                            currentMesh._waitingParentId = null;
                         }
                         }
                     }
                     }
 
 
@@ -189,7 +189,7 @@
                         currentMesh = scene.meshes[index];
                         currentMesh = scene.meshes[index];
                         if (currentMesh._waitingFreezeWorldMatrix) {
                         if (currentMesh._waitingFreezeWorldMatrix) {
                             currentMesh.freezeWorldMatrix();
                             currentMesh.freezeWorldMatrix();
-                            currentMesh._waitingFreezeWorldMatrix = undefined;
+                            currentMesh._waitingFreezeWorldMatrix = null;
                         } else {
                         } else {
                             currentMesh.computeWorldMatrix(true);
                             currentMesh.computeWorldMatrix(true);
                         }
                         }
@@ -214,7 +214,6 @@
                     onError(msg, err);
                     onError(msg, err);
                 } else {
                 } else {
                     Tools.Log(msg);
                     Tools.Log(msg);
-                    log = null;
                     throw err;
                     throw err;
                 }
                 }
             } finally {
             } finally {
@@ -301,8 +300,10 @@
                     for (index = 0, cache = parsedData.lights.length; index < cache; index++) {
                     for (index = 0, cache = parsedData.lights.length; index < cache; index++) {
                         var parsedLight = parsedData.lights[index];
                         var parsedLight = parsedData.lights[index];
                         var light = Light.Parse(parsedLight, scene);
                         var light = Light.Parse(parsedLight, scene);
-                        log += (index === 0 ? "\n\tLights:" : "");
-                        log += "\n\t\t" + light.toString(fullDetails);
+                        if (light) {
+                            log += (index === 0 ? "\n\tLights:" : "");
+                            log += "\n\t\t" + light.toString(fullDetails);
+                        }
                     }
                     }
                 }
                 }
 
 
@@ -461,15 +462,15 @@
                     var camera = scene.cameras[index];
                     var camera = scene.cameras[index];
                     if (camera._waitingParentId) {
                     if (camera._waitingParentId) {
                         camera.parent = scene.getLastEntryByID(camera._waitingParentId);
                         camera.parent = scene.getLastEntryByID(camera._waitingParentId);
-                        camera._waitingParentId = undefined;
+                        camera._waitingParentId = null;
                     }
                     }
                 }
                 }
 
 
                 for (index = 0, cache = scene.lights.length; index < cache; index++) {
                 for (index = 0, cache = scene.lights.length; index < cache; index++) {
-                    var light = scene.lights[index];
-                    if (light._waitingParentId) {
+                    let light = scene.lights[index];
+                    if (light && light._waitingParentId) {
                         light.parent = scene.getLastEntryByID(light._waitingParentId);
                         light.parent = scene.getLastEntryByID(light._waitingParentId);
-                        light._waitingParentId = undefined;
+                        light._waitingParentId = null;
                     }
                     }
                 }
                 }
 
 
@@ -501,11 +502,11 @@
                     var mesh = scene.meshes[index];
                     var mesh = scene.meshes[index];
                     if (mesh._waitingParentId) {
                     if (mesh._waitingParentId) {
                         mesh.parent = scene.getLastEntryByID(mesh._waitingParentId);
                         mesh.parent = scene.getLastEntryByID(mesh._waitingParentId);
-                        mesh._waitingParentId = undefined;
+                        mesh._waitingParentId = null;
                     }
                     }
                     if (mesh._waitingActions) {
                     if (mesh._waitingActions) {
                         ActionManager.Parse(mesh._waitingActions, mesh, scene);
                         ActionManager.Parse(mesh._waitingActions, mesh, scene);
-                        mesh._waitingActions = undefined;
+                        mesh._waitingActions = null;
                     }
                     }
                 }
                 }
 
 
@@ -514,7 +515,7 @@
                     var currentMesh = scene.meshes[index];
                     var currentMesh = scene.meshes[index];
                     if (currentMesh._waitingFreezeWorldMatrix) {
                     if (currentMesh._waitingFreezeWorldMatrix) {
                         currentMesh.freezeWorldMatrix();
                         currentMesh.freezeWorldMatrix();
-                        currentMesh._waitingFreezeWorldMatrix = undefined;
+                        currentMesh._waitingFreezeWorldMatrix = null;
                     } else {
                     } else {
                         currentMesh.computeWorldMatrix(true);
                         currentMesh.computeWorldMatrix(true);
                     }
                     }
@@ -546,7 +547,7 @@
 
 
                 // Lights exclusions / inclusions
                 // Lights exclusions / inclusions
                 for (index = 0, cache = scene.lights.length; index < cache; index++) {
                 for (index = 0, cache = scene.lights.length; index < cache; index++) {
-                    var light = scene.lights[index];
+                    let light = scene.lights[index];
                     // Excluded check
                     // Excluded check
                     if (light._excludedMeshesIds.length > 0) {
                     if (light._excludedMeshesIds.length > 0) {
                         for (var excludedIndex = 0; excludedIndex < light._excludedMeshesIds.length; excludedIndex++) {
                         for (var excludedIndex = 0; excludedIndex < light._excludedMeshesIds.length; excludedIndex++) {
@@ -588,7 +589,6 @@
                     onError(msg, err);
                     onError(msg, err);
                 } else {
                 } else {
                     Tools.Log(msg);
                     Tools.Log(msg);
-                    log = null;
                     throw err;
                     throw err;
                 }
                 }
             } finally {
             } finally {

+ 5 - 1
src/Loading/babylon.loadingScreen.ts

@@ -11,7 +11,7 @@ module BABYLON {
 
 
     export class DefaultLoadingScreen implements ILoadingScreen {
     export class DefaultLoadingScreen implements ILoadingScreen {
 
 
-        private _loadingDiv: HTMLDivElement;
+        private _loadingDiv: Nullable<HTMLDivElement>;
         private _loadingTextDiv: HTMLDivElement;
         private _loadingTextDiv: HTMLDivElement;
 
 
         constructor(private _renderingCanvas: HTMLCanvasElement, private _loadingText = "", private _loadingDivBackgroundColor = "black") {
         constructor(private _renderingCanvas: HTMLCanvasElement, private _loadingText = "", private _loadingDivBackgroundColor = "black") {
@@ -137,6 +137,10 @@ module BABYLON {
             var canvasRect = this._renderingCanvas.getBoundingClientRect();
             var canvasRect = this._renderingCanvas.getBoundingClientRect();
             var canvasPositioning = window.getComputedStyle(this._renderingCanvas).position;
             var canvasPositioning = window.getComputedStyle(this._renderingCanvas).position;
 
 
+            if (!this._loadingDiv) {
+                return;
+            }
+
             this._loadingDiv.style.position = (canvasPositioning === "fixed") ? "fixed" : "absolute";
             this._loadingDiv.style.position = (canvasPositioning === "fixed") ? "fixed" : "absolute";
             this._loadingDiv.style.left = canvasRect.left + "px";
             this._loadingDiv.style.left = canvasRect.left + "px";
             this._loadingDiv.style.top = canvasRect.top + "px";
             this._loadingDiv.style.top = canvasRect.top + "px";

+ 2 - 2
src/Materials/PBR/babylon.pbrMaterial.ts

@@ -106,7 +106,7 @@
 
 
         @serializeAsTexture()
         @serializeAsTexture()
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public reflectionTexture: BaseTexture;
+        public reflectionTexture: Nullable<BaseTexture>;
 
 
         @serializeAsTexture()
         @serializeAsTexture()
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
@@ -402,7 +402,7 @@
          */
          */
         @serializeAsTexture()
         @serializeAsTexture()
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public environmentBRDFTexture: BaseTexture = null;
+        public environmentBRDFTexture: Nullable<BaseTexture> = null;
 
 
         /**
         /**
          * Force normal to face away from face.
          * Force normal to face away from face.

+ 5 - 5
src/Materials/Textures/babylon.baseTexture.ts

@@ -97,7 +97,7 @@
         */
         */
         public onDisposeObservable = new Observable<BaseTexture>();
         public onDisposeObservable = new Observable<BaseTexture>();
 
 
-        private _onDisposeObserver: Observer<BaseTexture>;
+        private _onDisposeObserver: Nullable<Observer<BaseTexture>>;
         public set onDispose(callback: () => void) {
         public set onDispose(callback: () => void) {
             if (this._onDisposeObserver) {
             if (this._onDisposeObserver) {
                 this.onDisposeObservable.remove(this._onDisposeObserver);
                 this.onDisposeObservable.remove(this._onDisposeObserver);
@@ -127,12 +127,12 @@
             return this._scene;
             return this._scene;
         }
         }
 
 
-        public getTextureMatrix(): Nullable<Matrix> {
-            return null;
+        public getTextureMatrix(): Matrix {
+            return Matrix.IdentityReadOnly;
         }
         }
 
 
-        public getReflectionTextureMatrix(): Nullable<Matrix> {
-            return null;
+        public getReflectionTextureMatrix(): Matrix {
+            return Matrix.IdentityReadOnly;
         }
         }
 
 
         public getInternalTexture(): Nullable<InternalTexture> {
         public getInternalTexture(): Nullable<InternalTexture> {

+ 0 - 113
src/Materials/Textures/babylon.mapTexture.ts

@@ -1,113 +0,0 @@
-module BABYLON {
-
-    export class MapTexture extends Texture {
-        private _rectPackingMap: RectPackingMap;
-        private _size: ISize;
-
-        private _replacedViewport: Viewport;
-
-        constructor(name: string, scene: Scene, size: ISize, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE, useMipMap: boolean=false, margin=0) {
-            super(null, scene, !useMipMap, false, samplingMode);
-
-            this.name = name;
-            this._size = size;
-            this.wrapU = Texture.CLAMP_ADDRESSMODE;
-            this.wrapV = Texture.CLAMP_ADDRESSMODE;
-
-            // Create the rectPackMap that will allocate portion of the texture
-            this._rectPackingMap = new RectPackingMap(new Size(size.width, size.height), margin);
-
-            // Create the texture that will store the content
-            this._texture = scene.getEngine().createRenderTargetTexture(size, { generateMipMaps: !this.noMipmap, type: Engine.TEXTURETYPE_UNSIGNED_INT });
-        }
-
-        /**
-         * Allocate a rectangle of a given size in the texture map
-         * @param size the size of the rectangle to allocation
-         * @return the PackedRect instance corresponding to the allocated rect or null is there was not enough space to allocate it.
-         */
-        public allocateRect(size: Size): PackedRect {
-            return this._rectPackingMap.addRect(size);
-        }
-
-        /**
-         * Free a given rectangle from the texture map
-         * @param rectInfo the instance corresponding to the rect to free.
-         */
-        public freeRect(rectInfo: PackedRect) {
-            if (rectInfo) {
-                rectInfo.freeContent();
-            }
-        }
-
-        /**
-         * Return the available space in the range of [O;1]. 0 being not space left at all, 1 being an empty texture map.
-         * This is the cumulated space, not the biggest available surface. Due to fragmentation you may not allocate a rect corresponding to this surface.
-         * @returns {} 
-         */
-        public get freeSpace(): number {
-            return this._rectPackingMap.freeSpace;
-        }
-
-        /**
-         * Bind the texture to the rendering engine to render in the zone of a given rectangle.
-         * Use this method when you want to render into the texture map with a clipspace set to the location and size of the given rect.
-         * Don't forget to call unbindTexture when you're done rendering
-         * @param rect the zone to render to
-         * @param clear true to clear the portion's color/depth data
-         */
-        public bindTextureForRect(rect: PackedRect, clear: boolean) {
-            return this.bindTextureForPosSize(rect.pos, rect.contentSize, clear);
-        }
-
-        /**
-         * Bind the texture to the rendering engine to render in the zone of the given size at the given position.
-         * Use this method when you want to render into the texture map with a clipspace set to the location and size of the given rect.
-         * Don't forget to call unbindTexture when you're done rendering
-         * @param pos the position into the texture
-         * @param size the portion to fit the clip space to
-         * @param clear true to clear the portion's color/depth data
-         */
-        public bindTextureForPosSize(pos: Vector2, size: Size, clear: boolean) {
-
-            let engine = this.getScene().getEngine();
-            engine.bindFramebuffer(this._texture);
-            this._replacedViewport = engine.setDirectViewport(pos.x, pos.y, size.width, size.height);
-            if (clear) {
-                // We only want to clear the part of the texture we're binding to, only the scissor can help us to achieve that
-                engine.scissorClear(pos.x, pos.y, size.width, size.height, new Color4(0, 0, 0, 0)); 
-            }
-        }
-
-        /**
-         * Unbind the texture map from the rendering engine.
-         * Call this method when you're done rendering. A previous call to bindTextureForRect has to be made.
-         * @param dumpForDebug if set to true the content of the texture map will be dumped to a picture file that will be sent to the internet browser.
-         */
-        public unbindTexture(dumpForDebug?:boolean) {
-            // Dump ?
-            if (dumpForDebug) {
-                Tools.DumpFramebuffer(this._size.width, this._size.height, this.getScene().getEngine());
-            }
-
-            let engine = this.getScene().getEngine();
-
-            if (this._replacedViewport) {
-                engine.setViewport(this._replacedViewport);
-                this._replacedViewport = null;
-            }
-
-            engine.unBindFramebuffer(this._texture);
-        }
-
-        public get canRescale(): boolean {
-            return false;
-        }
-
-        // Note, I don't know what behavior this method should have: clone the underlying texture/rectPackingMap or just reference them?
-        // Anyway, there's not much point to use this method for this kind of texture I guess
-        public clone(): MapTexture {
-            return null;
-        }
-    }
-} 

+ 14 - 13
src/Materials/babylon.effect.ts

@@ -5,7 +5,7 @@
         private _currentRank = 32;
         private _currentRank = 32;
         private _maxRank = -1;
         private _maxRank = -1;
 
 
-        private _mesh: AbstractMesh;
+        private _mesh: Nullable<AbstractMesh>;
         private _meshRank: number;
         private _meshRank: number;
 
 
         public unBindMesh() {
         public unBindMesh() {
@@ -91,9 +91,9 @@
     export class Effect {
     export class Effect {
         public name: any;
         public name: any;
         public defines: string;
         public defines: string;
-        public onCompiled: (effect: Effect) => void;
-        public onError: (effect: Effect, errors: string) => void;
-        public onBind: (effect: Effect) => void;
+        public onCompiled: Nullable<(effect: Effect) => void>;
+        public onError: Nullable<(effect: Effect, errors: string) => void>;
+        public onBind: Nullable<(effect: Effect) => void>;
         public uniqueId = 0;
         public uniqueId = 0;
         public onCompileObservable = new Observable<Effect>();
         public onCompileObservable = new Observable<Effect>();
         public onErrorObservable = new Observable<Effect>();
         public onErrorObservable = new Observable<Effect>();
@@ -108,10 +108,10 @@
         private _compilationError = "";
         private _compilationError = "";
         private _attributesNames: string[];
         private _attributesNames: string[];
         private _attributes: number[];
         private _attributes: number[];
-        private _uniforms: WebGLUniformLocation[];
+        private _uniforms: Nullable<WebGLUniformLocation>[];
         public _key: string;
         public _key: string;
         private _indexParameters: any;
         private _indexParameters: any;
-        private _fallbacks: EffectFallbacks;
+        private _fallbacks: Nullable<EffectFallbacks>;
         private _vertexSourceCode: string;
         private _vertexSourceCode: string;
         private _fragmentSourceCode: string;
         private _fragmentSourceCode: string;
         private _vertexSourceCodeOverride: string;
         private _vertexSourceCodeOverride: string;
@@ -121,7 +121,8 @@
         private _valueCache: { [key: string]: any };
         private _valueCache: { [key: string]: any };
         private static _baseCache: { [key: number]: WebGLBuffer } = {};
         private static _baseCache: { [key: number]: WebGLBuffer } = {};
 
 
-        constructor(baseName: any, attributesNamesOrOptions: string[] | EffectCreationOptions, uniformsNamesOrEngine: string[] | Engine, samplers?: string[], engine?: Engine, defines?: string, fallbacks?: EffectFallbacks, onCompiled?: (effect: Effect) => void, onError?: (effect: Effect, errors: string) => void, indexParameters?: any) {
+        constructor(baseName: any, attributesNamesOrOptions: string[] | EffectCreationOptions, uniformsNamesOrEngine: string[] | Engine, samplers: Nullable<string[]> = null, engine?: Engine, defines: Nullable<string> = null, 
+                    fallbacks: Nullable<EffectFallbacks> = null, onCompiled: Nullable<(effect: Effect) => void> = null, onError: Nullable<(effect: Effect, errors: string) => void> = null, indexParameters?: any) {
             this.name = baseName;
             this.name = baseName;
 
 
             if ((<EffectCreationOptions>attributesNamesOrOptions).attributes) {
             if ((<EffectCreationOptions>attributesNamesOrOptions).attributes) {
@@ -143,10 +144,10 @@
                     }          
                     }          
                 }    
                 }    
             } else {
             } else {
-                this._engine = engine;
-                this.defines = defines;
-                this._uniformsNames = (<string[]>uniformsNamesOrEngine).concat(samplers);
-                this._samplers = samplers;
+                this._engine = <Engine>engine;
+                this.defines = <string>defines;
+                this._uniformsNames = (<string[]>uniformsNamesOrEngine).concat(<string[]>samplers);
+                this._samplers = <string[]>samplers;
                 this._attributesNames = (<string[]>attributesNamesOrOptions);
                 this._attributesNames = (<string[]>attributesNamesOrOptions);
 
 
                 this.onError = onError;
                 this.onError = onError;
@@ -245,7 +246,7 @@
             return this._uniformsNames.indexOf(uniformName);
             return this._uniformsNames.indexOf(uniformName);
         }
         }
 
 
-        public getUniform(uniformName: string): WebGLUniformLocation {
+        public getUniform(uniformName: string): Nullable<WebGLUniformLocation> {
             return this._uniforms[this._uniformsNames.indexOf(uniformName)];
             return this._uniforms[this._uniformsNames.indexOf(uniformName)];
         }
         }
 
 
@@ -648,7 +649,7 @@
             this._engine._bindTexture(this._samplers.indexOf(channel), texture);
             this._engine._bindTexture(this._samplers.indexOf(channel), texture);
         }
         }
 
 
-        public setTexture(channel: string, texture: BaseTexture): void {
+        public setTexture(channel: string, texture: Nullable<BaseTexture>): void {
             this._engine.setTexture(this._samplers.indexOf(channel), this.getUniform(channel), texture);
             this._engine.setTexture(this._samplers.indexOf(channel), this.getUniform(channel), texture);
         }
         }
 
 

+ 7 - 5
src/Materials/babylon.standardMaterial.ts

@@ -121,7 +121,7 @@ module BABYLON {
         @serializeAsTexture("reflectionTexture")
         @serializeAsTexture("reflectionTexture")
         private _reflectionTexture: BaseTexture;
         private _reflectionTexture: BaseTexture;
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public reflectionTexture: BaseTexture;        
+        public reflectionTexture: Nullable<BaseTexture>;        
 
 
         @serializeAsTexture("emissiveTexture")
         @serializeAsTexture("emissiveTexture")
         private _emissiveTexture: BaseTexture;
         private _emissiveTexture: BaseTexture;
@@ -315,13 +315,13 @@ module BABYLON {
         /**
         /**
          * Keep track of the image processing observer to allow dispose and replace.
          * Keep track of the image processing observer to allow dispose and replace.
          */
          */
-        private _imageProcessingObserver: Observer<ImageProcessingConfiguration>;
+        private _imageProcessingObserver: Nullable<Observer<ImageProcessingConfiguration>>;
 
 
         /**
         /**
          * Attaches a new image processing configuration to the Standard Material.
          * Attaches a new image processing configuration to the Standard Material.
          * @param configuration 
          * @param configuration 
          */
          */
-        protected _attachImageProcessingConfiguration(configuration: ImageProcessingConfiguration): void {
+        protected _attachImageProcessingConfiguration(configuration: Nullable<ImageProcessingConfiguration>): void {
             if (configuration === this._imageProcessingConfiguration) {
             if (configuration === this._imageProcessingConfiguration) {
                 return;
                 return;
             }
             }
@@ -510,7 +510,7 @@ module BABYLON {
         /**
         /**
          * Child classes can use it to update shaders
          * Child classes can use it to update shaders
          */
          */
-        public isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean {            
+        public isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances: boolean = false): boolean {            
             if (subMesh.effect && this.isFrozen) {
             if (subMesh.effect && this.isFrozen) {
                 if (this._wasPreviouslyReady && subMesh.effect) {
                 if (this._wasPreviouslyReady && subMesh.effect) {
                     return true;
                     return true;
@@ -1125,7 +1125,9 @@ module BABYLON {
                 // Colors
                 // Colors
                 scene.ambientColor.multiplyToRef(this.ambientColor, this._globalAmbientColor);
                 scene.ambientColor.multiplyToRef(this.ambientColor, this._globalAmbientColor);
 
 
-                effect.setVector3("vEyePosition", scene._mirroredCameraPosition ? scene._mirroredCameraPosition : scene.activeCamera.globalPosition);
+                if (scene.activeCamera) {
+                    effect.setVector3("vEyePosition", scene._mirroredCameraPosition ? scene._mirroredCameraPosition : scene.activeCamera.globalPosition);
+                }
                 effect.setColor3("vAmbientColor", this._globalAmbientColor);
                 effect.setColor3("vAmbientColor", this._globalAmbientColor);
             }
             }
 
 

+ 20 - 6
src/Math/babylon.math.ts

@@ -2884,6 +2884,7 @@
         private static _yAxis: Vector3 = Vector3.Zero();
         private static _yAxis: Vector3 = Vector3.Zero();
         private static _zAxis: Vector3 = Vector3.Zero();
         private static _zAxis: Vector3 = Vector3.Zero();
         private static _updateFlagSeed = 0;
         private static _updateFlagSeed = 0;
+        private static _identityReadOnly = Matrix.Identity();
 
 
         private _isIdentity = false;
         private _isIdentity = false;
         private _isIdentityDirty = true;
         private _isIdentityDirty = true;
@@ -3383,7 +3384,7 @@
         /**
         /**
          * Returns the index-th row of the current matrix as a new Vector4.  
          * Returns the index-th row of the current matrix as a new Vector4.  
          */
          */
-        public getRow(index: number): Vector4 {
+        public getRow(index: number): Nullable<Vector4> {
             if (index < 0 || index > 3) {
             if (index < 0 || index > 3) {
                 return null;
                 return null;
             }
             }
@@ -3426,6 +3427,15 @@
             this._markAsUpdated();
             this._markAsUpdated();
             return this;
             return this;
         }
         }
+
+        /**
+         * Static identity matrix to be used as readonly matrix
+         * Must not be updated.
+         */
+        public static get IdentityReadOnly(): Matrix {
+            return Matrix._identityReadOnly;
+        }
+
         /**
         /**
          * Returns a new Matrix set from the 16 passed floats.  
          * Returns a new Matrix set from the 16 passed floats.  
          */
          */
@@ -4760,7 +4770,7 @@
         * normal (optional) : Vector3, the first wanted normal to the curve. Ex (0, 1, 0) for a vertical normal.
         * normal (optional) : Vector3, the first wanted normal to the curve. Ex (0, 1, 0) for a vertical normal.
         * raw (optional, default false) : boolean, if true the returned Path3D isn't normalized. Useful to depict path acceleration or speed.
         * raw (optional, default false) : boolean, if true the returned Path3D isn't normalized. Useful to depict path acceleration or speed.
         */
         */
-        constructor(public path: Vector3[], firstNormal?: Vector3, raw?: boolean) {
+        constructor(public path: Vector3[], firstNormal: Nullable<Vector3> = null, raw?: boolean) {
             for (var p = 0; p < path.length; p++) {
             for (var p = 0; p < path.length; p++) {
                 this._curve[p] = path[p].clone(); // hard copy
                 this._curve[p] = path[p].clone(); // hard copy
             }
             }
@@ -4811,7 +4821,7 @@
          * Forces the Path3D tangent, normal, binormal and distance recomputation.
          * Forces the Path3D tangent, normal, binormal and distance recomputation.
          * Returns the same object updated.  
          * Returns the same object updated.  
          */
          */
-        public update(path: Vector3[], firstNormal?: Vector3): Path3D {
+        public update(path: Vector3[], firstNormal: Nullable<Vector3> = null): Path3D {
             for (var p = 0; p < path.length; p++) {
             for (var p = 0; p < path.length; p++) {
                 this._curve[p].x = path[p].x;
                 this._curve[p].x = path[p].x;
                 this._curve[p].y = path[p].y;
                 this._curve[p].y = path[p].y;
@@ -4822,7 +4832,7 @@
         }
         }
 
 
         // private function compute() : computes tangents, normals and binormals
         // private function compute() : computes tangents, normals and binormals
-        private _compute(firstNormal: Vector3): void {
+        private _compute(firstNormal: Nullable<Vector3>): void {
             var l = this._curve.length;
             var l = this._curve.length;
 
 
             // first and last tangents
             // first and last tangents
@@ -4907,7 +4917,7 @@
         // private function normalVector(v0, vt, va) :
         // private function normalVector(v0, vt, va) :
         // returns an arbitrary point in the plane defined by the point v0 and the vector vt orthogonal to this plane
         // returns an arbitrary point in the plane defined by the point v0 and the vector vt orthogonal to this plane
         // if va is passed, it returns the va projection on the plane orthogonal to vt at the point v0
         // if va is passed, it returns the va projection on the plane orthogonal to vt at the point v0
-        private _normalVector(v0: Vector3, vt: Vector3, va: Vector3): Vector3 {
+        private _normalVector(v0: Vector3, vt: Vector3, va: Nullable<Vector3>): Vector3 {
             var normal0: Vector3;
             var normal0: Vector3;
             var tgl = vt.length();
             var tgl = vt.length();
             if (tgl === 0.0) {
             if (tgl === 0.0) {
@@ -4925,6 +4935,9 @@
                 else if (!Scalar.WithinEpsilon(Math.abs(vt.z) / tgl, 1.0, Epsilon)) {
                 else if (!Scalar.WithinEpsilon(Math.abs(vt.z) / tgl, 1.0, Epsilon)) {
                     point = new Vector3(0.0, 0.0, 1.0);
                     point = new Vector3(0.0, 0.0, 1.0);
                 }
                 }
+                else {
+                    point = Vector3.Zero();
+                }
                 normal0 = Vector3.Cross(vt, point);
                 normal0 = Vector3.Cross(vt, point);
             }
             }
             else {
             else {
@@ -5010,8 +5023,9 @@
             totalPoints.push(points[points.length - 1].clone());
             totalPoints.push(points[points.length - 1].clone());
             var catmullRom = new Array<Vector3>();
             var catmullRom = new Array<Vector3>();
             var step = 1.0 / nbPoints;
             var step = 1.0 / nbPoints;
+            var amount = 0.0;
             for (var i = 0; i < totalPoints.length - 3; i++) {
             for (var i = 0; i < totalPoints.length - 3; i++) {
-                var amount = 0.0;
+                amount = 0;
                 for (var c = 0; c < nbPoints; c++) {
                 for (var c = 0; c < nbPoints; c++) {
                     catmullRom.push(Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));
                     catmullRom.push(Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));
                     amount += step
                     amount += step

+ 77 - 66
src/Mesh/babylon.abstractMesh.ts

@@ -90,7 +90,7 @@
         */
         */
         public onCollideObservable = new Observable<AbstractMesh>();
         public onCollideObservable = new Observable<AbstractMesh>();
 
 
-        private _onCollideObserver: Observer<AbstractMesh>;
+        private _onCollideObserver: Nullable<Observer<AbstractMesh>>;
         public set onCollide(callback: () => void) {
         public set onCollide(callback: () => void) {
             if (this._onCollideObserver) {
             if (this._onCollideObserver) {
                 this.onCollideObservable.remove(this._onCollideObserver);
                 this.onCollideObservable.remove(this._onCollideObserver);
@@ -104,7 +104,7 @@
         */
         */
         public onCollisionPositionChangeObservable = new Observable<Vector3>();
         public onCollisionPositionChangeObservable = new Observable<Vector3>();
 
 
-        private _onCollisionPositionChangeObserver: Observer<Vector3>;
+        private _onCollisionPositionChangeObserver: Nullable<Observer<Vector3>>;
         public set onCollisionPositionChange(callback: () => void) {
         public set onCollisionPositionChange(callback: () => void) {
             if (this._onCollisionPositionChangeObserver) {
             if (this._onCollisionPositionChangeObserver) {
                 this.onCollisionPositionChangeObservable.remove(this._onCollisionPositionChangeObserver);
                 this.onCollisionPositionChangeObservable.remove(this._onCollisionPositionChangeObserver);
@@ -178,10 +178,10 @@
             return this._isOcclusionQueryInProgress;
             return this._isOcclusionQueryInProgress;
         }
         }
 
 
-        private _occlusionQuery: WebGLQuery;
+        private _occlusionQuery: Nullable<WebGLQuery>;
 
 
         private _rotation = Vector3.Zero();
         private _rotation = Vector3.Zero();
-        private _rotationQuaternion: Quaternion;
+        private _rotationQuaternion: Nullable<Quaternion>;
         private _scaling = Vector3.One();
         private _scaling = Vector3.One();
         public billboardMode = AbstractMesh.BILLBOARDMODE_NONE;
         public billboardMode = AbstractMesh.BILLBOARDMODE_NONE;
         public visibility = 1.0;
         public visibility = 1.0;
@@ -332,7 +332,7 @@
          * This scene's action manager
          * This scene's action manager
          * @type {BABYLON.ActionManager}
          * @type {BABYLON.ActionManager}
         */
         */
-        public actionManager: ActionManager;
+        public actionManager: Nullable<ActionManager>;
 
 
         // Physics
         // Physics
         public physicsImpostor: Nullable<PhysicsImpostor>;
         public physicsImpostor: Nullable<PhysicsImpostor>;
@@ -365,12 +365,12 @@
         }
         }
 
 
         // Attach to bone
         // Attach to bone
-        private _meshToBoneReferal: AbstractMesh;
+        private _meshToBoneReferal: Nullable<AbstractMesh>;
 
 
         // Edges
         // Edges
         public edgesWidth = 1;
         public edgesWidth = 1;
         public edgesColor = new Color4(1, 0, 0, 1);
         public edgesColor = new Color4(1, 0, 0, 1);
-        public _edgesRenderer: EdgesRenderer;
+        public _edgesRenderer: Nullable<EdgesRenderer>;
 
 
         // Cache
         // Cache
         private _localWorld = Matrix.Zero();
         private _localWorld = Matrix.Zero();
@@ -400,19 +400,19 @@
 
 
         public _lightSources = new Array<Light>();
         public _lightSources = new Array<Light>();
 
 
-        public get _positions(): Vector3[] {
+        public get _positions(): Nullable<Vector3[]> {
             return null;
             return null;
         }
         }
 
 
         // Loading properties
         // Loading properties
         public _waitingActions: any;
         public _waitingActions: any;
-        public _waitingFreezeWorldMatrix: boolean;
+        public _waitingFreezeWorldMatrix: Nullable<boolean>;
 
 
         // Skeleton
         // Skeleton
-        private _skeleton: Skeleton;
-        public _bonesTransformMatrices: Float32Array;
+        private _skeleton: Nullable<Skeleton>;
+        public _bonesTransformMatrices: Nullable<Float32Array>;
 
 
-        public set skeleton(value: Skeleton) {
+        public set skeleton(value: Nullable<Skeleton>) {
             if (this._skeleton && this._skeleton.needInitialSkinMatrix) {
             if (this._skeleton && this._skeleton.needInitialSkinMatrix) {
                 this._skeleton._unregisterMeshWithPoseMatrix(this);
                 this._skeleton._unregisterMeshWithPoseMatrix(this);
             }
             }
@@ -430,7 +430,7 @@
             this._markSubMeshesAsAttributesDirty();
             this._markSubMeshesAsAttributesDirty();
         }
         }
 
 
-        public get skeleton(): Skeleton {
+        public get skeleton(): Nullable<Skeleton> {
             return this._skeleton;
             return this._skeleton;
         }
         }
 
 
@@ -602,11 +602,11 @@
          * It's null by default.  
          * It's null by default.  
          * If set, only the rotationQuaternion is then used to compute the mesh rotation and its property `.rotation\ is then ignored and set to (0.0, 0.0, 0.0)
          * If set, only the rotationQuaternion is then used to compute the mesh rotation and its property `.rotation\ is then ignored and set to (0.0, 0.0, 0.0)
          */
          */
-        public get rotationQuaternion() {
+        public get rotationQuaternion(): Nullable<Quaternion> {
             return this._rotationQuaternion;
             return this._rotationQuaternion;
         }
         }
 
 
-        public set rotationQuaternion(quaternion: Quaternion) {
+        public set rotationQuaternion(quaternion: Nullable<Quaternion>) {
             this._rotationQuaternion = quaternion;
             this._rotationQuaternion = quaternion;
             //reset the rotation vector. 
             //reset the rotation vector. 
             if (quaternion && this.rotation.length()) {
             if (quaternion && this.rotation.length()) {
@@ -637,9 +637,9 @@
          * Returns the AbstractMesh.  
          * Returns the AbstractMesh.  
          */
          */
         public disableEdgesRendering(): AbstractMesh {
         public disableEdgesRendering(): AbstractMesh {
-            if (this._edgesRenderer !== undefined) {
+            if (this._edgesRenderer) {
                 this._edgesRenderer.dispose();
                 this._edgesRenderer.dispose();
-                this._edgesRenderer = undefined;
+                this._edgesRenderer = null;
             }
             }
             return this;
             return this;
         }
         }
@@ -682,7 +682,7 @@
          * Returns null by default, used by the class Mesh. 
          * Returns null by default, used by the class Mesh. 
          * Returned type : integer array 
          * Returned type : integer array 
          */
          */
-        public getIndices(): IndicesArray {
+        public getIndices(): Nullable<IndicesArray> {
             return null;
             return null;
         }
         }
 
 
@@ -690,7 +690,7 @@
          * Returns the array of the requested vertex data kind. Used by the class Mesh. Returns null here. 
          * Returns the array of the requested vertex data kind. Used by the class Mesh. Returns null here. 
          * Returned type : float array or Float32Array 
          * Returned type : float array or Float32Array 
          */
          */
-        public getVerticesData(kind: string): number[] | Float32Array {
+        public getVerticesData(kind: string): Nullable<number[] | Float32Array> {
             return null;
             return null;
         }
         }
         /**
         /**
@@ -718,8 +718,8 @@
          * 
          * 
          * Returns the Mesh.  
          * Returns the Mesh.  
          */
          */
-        public setVerticesData(kind: string, data: number[] | Float32Array, updatable?: boolean, stride?: number): Mesh {
-            return null;
+        public setVerticesData(kind: string, data: number[] | Float32Array, updatable?: boolean, stride?: number): AbstractMesh {
+            return this;
         }
         }
 
 
         /**
         /**
@@ -746,8 +746,8 @@
          * 
          * 
          * Returns the Mesh.  
          * Returns the Mesh.  
          */
          */
-        public updateVerticesData(kind: string, data: number[] | Float32Array, updateExtends?: boolean, makeItUnique?: boolean): Mesh {
-            return null;
+        public updateVerticesData(kind: string, data: number[] | Float32Array, updateExtends?: boolean, makeItUnique?: boolean): AbstractMesh {
+            return this;
         }
         }
 
 
         /**
         /**
@@ -757,8 +757,8 @@
          * This method creates a new index buffer each call.  
          * This method creates a new index buffer each call.  
          * Returns the Mesh.  
          * Returns the Mesh.  
          */
          */
-        public setIndices(indices: IndicesArray, totalVertices?: number): Mesh {
-            return null;
+        public setIndices(indices: IndicesArray, totalVertices?: number): AbstractMesh {
+            return this;
         }
         }
 
 
         /** Returns false by default, used by the class Mesh.  
         /** Returns false by default, used by the class Mesh.  
@@ -793,7 +793,7 @@
         }
         }
 
 
         public get useBones(): boolean {
         public get useBones(): boolean {
-            return this.skeleton && this.getScene().skeletonsEnabled && this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind) && this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind);
+            return (<boolean>(this.skeleton && this.getScene().skeletonsEnabled && this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind) && this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)));
         }
         }
 
 
         public _preActivate(): void {
         public _preActivate(): void {
@@ -1278,16 +1278,16 @@
             }
             }
 
 
             // Translation
             // Translation
-            if (this.infiniteDistance && !this.parent) {
-                var camera = this.getScene().activeCamera;
-                if (camera) {
-                    var cameraWorldMatrix = camera.getWorldMatrix();
+            let camera = (<Camera>this.getScene().activeCamera);
+            
+            if (this.infiniteDistance && !this.parent && camera) {
 
 
-                    var cameraGlobalPosition = new Vector3(cameraWorldMatrix.m[12], cameraWorldMatrix.m[13], cameraWorldMatrix.m[14]);
+                var cameraWorldMatrix = camera.getWorldMatrix();
 
 
-                    Matrix.TranslationToRef(this.position.x + cameraGlobalPosition.x, this.position.y + cameraGlobalPosition.y,
-                        this.position.z + cameraGlobalPosition.z, Tmp.Matrix[2]);
-                }
+                var cameraGlobalPosition = new Vector3(cameraWorldMatrix.m[12], cameraWorldMatrix.m[13], cameraWorldMatrix.m[14]);
+
+                Matrix.TranslationToRef(this.position.x + cameraGlobalPosition.x, this.position.y + cameraGlobalPosition.y,
+                    this.position.z + cameraGlobalPosition.z, Tmp.Matrix[2]);
             } else {
             } else {
                 Matrix.TranslationToRef(this.position.x, this.position.y, this.position.z, Tmp.Matrix[2]);
                 Matrix.TranslationToRef(this.position.x, this.position.y, this.position.z, Tmp.Matrix[2]);
             }
             }
@@ -1297,7 +1297,7 @@
             Tmp.Matrix[4].multiplyToRef(Tmp.Matrix[0], Tmp.Matrix[5]);
             Tmp.Matrix[4].multiplyToRef(Tmp.Matrix[0], Tmp.Matrix[5]);
 
 
             // Billboarding (testing PG:http://www.babylonjs-playground.com/#UJEIL#13)
             // Billboarding (testing PG:http://www.babylonjs-playground.com/#UJEIL#13)
-            if (this.billboardMode !== AbstractMesh.BILLBOARDMODE_NONE && this.getScene().activeCamera) {
+            if (this.billboardMode !== AbstractMesh.BILLBOARDMODE_NONE && camera) {
                 if ((this.billboardMode & AbstractMesh.BILLBOARDMODE_ALL) !== AbstractMesh.BILLBOARDMODE_ALL) {
                 if ((this.billboardMode & AbstractMesh.BILLBOARDMODE_ALL) !== AbstractMesh.BILLBOARDMODE_ALL) {
                     // Need to decompose each rotation here
                     // Need to decompose each rotation here
                     var currentPosition = Tmp.Vector3[3];
                     var currentPosition = Tmp.Vector3[3];
@@ -1313,7 +1313,7 @@
                         currentPosition.copyFrom(this.position);
                         currentPosition.copyFrom(this.position);
                     }
                     }
 
 
-                    currentPosition.subtractInPlace(this.getScene().activeCamera.globalPosition);
+                    currentPosition.subtractInPlace(camera.globalPosition);
 
 
                     var finalEuler = Tmp.Vector3[4].copyFromFloats(0, 0, 0);
                     var finalEuler = Tmp.Vector3[4].copyFromFloats(0, 0, 0);
                     if ((this.billboardMode & AbstractMesh.BILLBOARDMODE_X) === AbstractMesh.BILLBOARDMODE_X) {
                     if ((this.billboardMode & AbstractMesh.BILLBOARDMODE_X) === AbstractMesh.BILLBOARDMODE_X) {
@@ -1330,7 +1330,7 @@
 
 
                     Matrix.RotationYawPitchRollToRef(finalEuler.y, finalEuler.x, finalEuler.z, Tmp.Matrix[0]);
                     Matrix.RotationYawPitchRollToRef(finalEuler.y, finalEuler.x, finalEuler.z, Tmp.Matrix[0]);
                 } else {
                 } else {
-                    Tmp.Matrix[1].copyFrom(this.getScene().activeCamera.getViewMatrix());
+                    Tmp.Matrix[1].copyFrom(camera.getViewMatrix());
 
 
                     Tmp.Matrix[1].setTranslationFromFloats(0, 0, 0);
                     Tmp.Matrix[1].setTranslationFromFloats(0, 0, 0);
                     Tmp.Matrix[1].invertToRef(Tmp.Matrix[0]);
                     Tmp.Matrix[1].invertToRef(Tmp.Matrix[0]);
@@ -1475,6 +1475,10 @@
         }
         }
 
 
         public detachFromBone(): AbstractMesh {
         public detachFromBone(): AbstractMesh {
+            if (!this.parent) {
+                return this;
+            }
+
             if (this.parent.getWorldMatrix().determinant() < 0) {
             if (this.parent.getWorldMatrix().determinant() < 0) {
                 this.scalingDeterminant *= -1;
                 this.scalingDeterminant *= -1;
             }
             }
@@ -1507,7 +1511,7 @@
          * includeDescendants can be set to true to test if the mesh defined in parameters intersects with the current mesh or any child meshes
          * includeDescendants can be set to true to test if the mesh defined in parameters intersects with the current mesh or any child meshes
          * Returns a boolean.  
          * Returns a boolean.  
          */
          */
-        public intersectsMesh(mesh: AbstractMesh | SolidParticle, precise?: boolean, includeDescendants?: boolean): boolean {
+        public intersectsMesh(mesh: AbstractMesh | SolidParticle, precise: boolean = false, includeDescendants?: boolean): boolean {
             if (!this._boundingInfo || !mesh._boundingInfo) {
             if (!this._boundingInfo || !mesh._boundingInfo) {
                 return false;
                 return false;
             }
             }
@@ -1539,13 +1543,13 @@
             return this._boundingInfo.intersectsPoint(point);
             return this._boundingInfo.intersectsPoint(point);
         }
         }
 
 
-        public getPhysicsImpostor(): PhysicsImpostor {
+        public getPhysicsImpostor(): Nullable<PhysicsImpostor> {
             return this.physicsImpostor;
             return this.physicsImpostor;
         }
         }
 
 
-        public getPositionInCameraSpace(camera?: Camera): Vector3 {
+        public getPositionInCameraSpace(camera: Nullable<Camera> = null): Vector3 {
             if (!camera) {
             if (!camera) {
-                camera = this.getScene().activeCamera;
+                camera = (<Camera>this.getScene().activeCamera);
             }
             }
 
 
             return Vector3.TransformCoordinates(this.absolutePosition, camera.getViewMatrix());
             return Vector3.TransformCoordinates(this.absolutePosition, camera.getViewMatrix());
@@ -1555,9 +1559,9 @@
          * Returns the distance from the mesh to the active camera.  
          * Returns the distance from the mesh to the active camera.  
          * Returns a float.  
          * Returns a float.  
          */
          */
-        public getDistanceToCamera(camera?: Camera): number {
+        public getDistanceToCamera(camera: Nullable<Camera> = null): number {
             if (!camera) {
             if (!camera) {
-                camera = this.getScene().activeCamera;
+                camera = (<Camera>this.getScene().activeCamera);
             }
             }
             return this.absolutePosition.subtract(camera.position).length();
             return this.absolutePosition.subtract(camera.position).length();
         }
         }
@@ -1615,7 +1619,7 @@
             return this;
             return this;
         }
         }
 
 
-        private _onCollisionPositionChange = (collisionId: number, newPosition: Vector3, collidedMesh: AbstractMesh = null) => {
+        private _onCollisionPositionChange = (collisionId: number, newPosition: Vector3, collidedMesh: Nullable<AbstractMesh> = null) => {
             //TODO move this to the collision coordinator!
             //TODO move this to the collision coordinator!
             if (this.getScene().workerCollisions)
             if (this.getScene().workerCollisions)
                 newPosition.multiplyInPlace(this._collider.radius);
                 newPosition.multiplyInPlace(this._collider.radius);
@@ -1657,6 +1661,11 @@
         // Collisions
         // Collisions
         public _collideForSubMesh(subMesh: SubMesh, transformMatrix: Matrix, collider: Collider): AbstractMesh {
         public _collideForSubMesh(subMesh: SubMesh, transformMatrix: Matrix, collider: Collider): AbstractMesh {
             this._generatePointsArray();
             this._generatePointsArray();
+
+            if (!this._positions) {
+                return this;
+            }
+            
             // Transformation
             // Transformation
             if (!subMesh._lastColliderWorldVertices || !subMesh._lastColliderTransformMatrix.equals(transformMatrix)) {
             if (!subMesh._lastColliderWorldVertices || !subMesh._lastColliderTransformMatrix.equals(transformMatrix)) {
                 subMesh._lastColliderTransformMatrix = transformMatrix.clone();
                 subMesh._lastColliderTransformMatrix = transformMatrix.clone();
@@ -1669,7 +1678,7 @@
                 }
                 }
             }
             }
             // Collide
             // Collide
-            collider._collide(subMesh._trianglePlanes, subMesh._lastColliderWorldVertices, this.getIndices(), subMesh.indexStart, subMesh.indexStart + subMesh.indexCount, subMesh.verticesStart, !!subMesh.getMaterial());
+            collider._collide(subMesh._trianglePlanes, subMesh._lastColliderWorldVertices, (<IndicesArray>this.getIndices()), subMesh.indexStart, subMesh.indexStart + subMesh.indexCount, subMesh.verticesStart, !!subMesh.getMaterial());
             if (collider.collisionFound) {
             if (collider.collisionFound) {
                 collider.collidedMesh = this;
                 collider.collidedMesh = this;
             }
             }
@@ -1736,7 +1745,7 @@
                 return pickingInfo;
                 return pickingInfo;
             }
             }
 
 
-            var intersectInfo: IntersectionInfo = null;
+            var intersectInfo: Nullable<IntersectionInfo> = null;
 
 
             // Octrees
             // Octrees
             var subMeshes: SubMesh[];
             var subMeshes: SubMesh[];
@@ -1760,7 +1769,7 @@
                 if (len > 1 && !subMesh.canIntersects(ray))
                 if (len > 1 && !subMesh.canIntersects(ray))
                     continue;
                     continue;
 
 
-                var currentIntersectInfo = subMesh.intersects(ray, this._positions, this.getIndices(), fastCheck);
+                var currentIntersectInfo = subMesh.intersects(ray, (<Vector3[]>this._positions), (<IndicesArray>this.getIndices()), fastCheck);
 
 
                 if (currentIntersectInfo) {
                 if (currentIntersectInfo) {
                     if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {
                     if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {
@@ -1789,8 +1798,8 @@
                 pickingInfo.distance = Vector3.Distance(worldOrigin, pickedPoint);
                 pickingInfo.distance = Vector3.Distance(worldOrigin, pickedPoint);
                 pickingInfo.pickedPoint = pickedPoint;
                 pickingInfo.pickedPoint = pickedPoint;
                 pickingInfo.pickedMesh = this;
                 pickingInfo.pickedMesh = this;
-                pickingInfo.bu = intersectInfo.bu;
-                pickingInfo.bv = intersectInfo.bv;
+                pickingInfo.bu = intersectInfo.bu || 0;
+                pickingInfo.bv = intersectInfo.bv || 0;
                 pickingInfo.faceId = intersectInfo.faceId;
                 pickingInfo.faceId = intersectInfo.faceId;
                 pickingInfo.subMeshId = intersectInfo.subMeshId;
                 pickingInfo.subMeshId = intersectInfo.subMeshId;
                 return pickingInfo;
                 return pickingInfo;
@@ -1803,7 +1812,7 @@
          * Clones the mesh, used by the class Mesh.  
          * Clones the mesh, used by the class Mesh.  
          * Just returns `null` for an AbstractMesh.  
          * Just returns `null` for an AbstractMesh.  
          */
          */
-        public clone(name: string, newParent: Node, doNotCloneChildren?: boolean): AbstractMesh {
+        public clone(name: string, newParent: Node, doNotCloneChildren?: boolean): Nullable<AbstractMesh> {
             return null;
             return null;
         }
         }
 
 
@@ -1878,10 +1887,13 @@
                 var generator = light.getShadowGenerator();
                 var generator = light.getShadowGenerator();
                 if (generator) {
                 if (generator) {
                     var shadowMap = generator.getShadowMap();
                     var shadowMap = generator.getShadowMap();
-                    meshIndex = shadowMap.renderList.indexOf(this);
 
 
-                    if (meshIndex !== -1) {
-                        shadowMap.renderList.splice(meshIndex, 1);
+                    if (shadowMap && shadowMap.renderList) {
+                        meshIndex = shadowMap.renderList.indexOf(this);
+
+                        if (meshIndex !== -1) {
+                            shadowMap.renderList.splice(meshIndex, 1);
+                        }
                     }
                     }
                 }
                 }
             });
             });
@@ -2036,10 +2048,10 @@
          * Defines the passed mesh as the parent of the current mesh.  
          * Defines the passed mesh as the parent of the current mesh.  
          * Returns the AbstractMesh.  
          * Returns the AbstractMesh.  
          */
          */
-        public setParent(mesh: AbstractMesh): AbstractMesh {
+        public setParent(mesh: Nullable<AbstractMesh>): AbstractMesh {
 
 
             var child = this;
             var child = this;
-            var parent = mesh;
+            var parent = (<AbstractMesh>mesh);
 
 
             if (mesh == null) {
             if (mesh == null) {
 
 
@@ -2119,7 +2131,7 @@
             if (!this._facetPartitioning) {
             if (!this._facetPartitioning) {
                 this._facetPartitioning = new Array<number[]>();
                 this._facetPartitioning = new Array<number[]>();
             }
             }
-            this._facetNb = this.getIndices().length / 3;
+            this._facetNb = (<IndicesArray>this.getIndices()).length / 3;
             this._partitioningSubdivisions = (this._partitioningSubdivisions) ? this._partitioningSubdivisions : 10;   // default nb of partitioning subdivisions = 10
             this._partitioningSubdivisions = (this._partitioningSubdivisions) ? this._partitioningSubdivisions : 10;   // default nb of partitioning subdivisions = 10
             this._partitioningBBoxRatio = (this._partitioningBBoxRatio) ? this._partitioningBBoxRatio : 1.01;          // default ratio 1.01 = the partitioning is 1% bigger than the bounding box
             this._partitioningBBoxRatio = (this._partitioningBBoxRatio) ? this._partitioningBBoxRatio : 1.01;          // default ratio 1.01 = the partitioning is 1% bigger than the bounding box
             for (var f = 0; f < this._facetNb; f++) {
             for (var f = 0; f < this._facetNb; f++) {
@@ -2236,7 +2248,7 @@
         /** 
         /** 
          * Returns the facets (in an array) in the same partitioning block than the one the passed coordinates are located (expressed in the mesh local system).
          * Returns the facets (in an array) in the same partitioning block than the one the passed coordinates are located (expressed in the mesh local system).
          */
          */
-        public getFacetsAtLocalCoordinates(x: number, y: number, z: number): number[] {
+        public getFacetsAtLocalCoordinates(x: number, y: number, z: number): Nullable<number[]> {
             var bInfo = this.getBoundingInfo();
             var bInfo = this.getBoundingInfo();
             var ox = Math.floor((x - bInfo.minimum.x * this._partitioningBBoxRatio) * this._subDiv.X * this._partitioningBBoxRatio / this._bbSize.x);
             var ox = Math.floor((x - bInfo.minimum.x * this._partitioningBBoxRatio) * this._subDiv.X * this._partitioningBBoxRatio / this._bbSize.x);
             var oy = Math.floor((y - bInfo.minimum.y * this._partitioningBBoxRatio) * this._subDiv.Y * this._partitioningBBoxRatio / this._bbSize.y);
             var oy = Math.floor((y - bInfo.minimum.y * this._partitioningBBoxRatio) * this._subDiv.Y * this._partitioningBBoxRatio / this._bbSize.y);
@@ -2253,14 +2265,13 @@
          * If facing and checkFace are true, only the facet "facing" to (x, y, z) are returned : positive dot (x, y, z) * facet position.
          * If facing and checkFace are true, only the facet "facing" to (x, y, z) are returned : positive dot (x, y, z) * facet position.
          * If facing si false and checkFace is true, only the facet "turning their backs" to (x, y, z) are returned : negative dot (x, y, z) * facet position. 
          * If facing si false and checkFace is true, only the facet "turning their backs" to (x, y, z) are returned : negative dot (x, y, z) * facet position. 
          */
          */
-        public getClosestFacetAtCoordinates(x: number, y: number, z: number, projected?: Vector3, checkFace: boolean = false, facing: boolean = true): number {
+        public getClosestFacetAtCoordinates(x: number, y: number, z: number, projected?: Vector3, checkFace: boolean = false, facing: boolean = true): Nullable<number> {
             var world = this.getWorldMatrix();
             var world = this.getWorldMatrix();
             var invMat = Tmp.Matrix[5];
             var invMat = Tmp.Matrix[5];
             world.invertToRef(invMat);
             world.invertToRef(invMat);
             var invVect = Tmp.Vector3[8];
             var invVect = Tmp.Vector3[8];
-            var closest = null;
             Vector3.TransformCoordinatesFromFloatsToRef(x, y, z, invMat, invVect);  // transform (x,y,z) to coordinates in the mesh local space
             Vector3.TransformCoordinatesFromFloatsToRef(x, y, z, invMat, invVect);  // transform (x,y,z) to coordinates in the mesh local space
-            closest = this.getClosestFacetAtLocalCoordinates(invVect.x, invVect.y, invVect.z, projected, checkFace, facing);
+            var closest = this.getClosestFacetAtLocalCoordinates(invVect.x, invVect.y, invVect.z, projected, checkFace, facing);
             if (projected) {
             if (projected) {
                 // tranform the local computed projected vector to world coordinates
                 // tranform the local computed projected vector to world coordinates
                 Vector3.TransformCoordinatesFromFloatsToRef(projected.x, projected.y, projected.z, world, projected);
                 Vector3.TransformCoordinatesFromFloatsToRef(projected.x, projected.y, projected.z, world, projected);
@@ -2274,7 +2285,7 @@
          * If facing and checkFace are true, only the facet "facing" to (x, y, z) are returned : positive dot (x, y, z) * facet position.
          * If facing and checkFace are true, only the facet "facing" to (x, y, z) are returned : positive dot (x, y, z) * facet position.
          * If facing si false and checkFace is true, only the facet "turning their backs"  to (x, y, z) are returned : negative dot (x, y, z) * facet position.
          * If facing si false and checkFace is true, only the facet "turning their backs"  to (x, y, z) are returned : negative dot (x, y, z) * facet position.
          */
          */
-        public getClosestFacetAtLocalCoordinates(x: number, y: number, z: number, projected?: Vector3, checkFace: boolean = false, facing: boolean = true): number {
+        public getClosestFacetAtLocalCoordinates(x: number, y: number, z: number, projected?: Vector3, checkFace: boolean = false, facing: boolean = true): Nullable<number> {
             var closest = null;
             var closest = null;
             var tmpx = 0.0;
             var tmpx = 0.0;
             var tmpy = 0.0;
             var tmpy = 0.0;
@@ -2342,9 +2353,9 @@
         public disableFacetData(): AbstractMesh {
         public disableFacetData(): AbstractMesh {
             if (this._facetDataEnabled) {
             if (this._facetDataEnabled) {
                 this._facetDataEnabled = false;
                 this._facetDataEnabled = false;
-                this._facetPositions = null;
-                this._facetNormals = null;
-                this._facetPartitioning = null;
+                this._facetPositions = new Array<Vector3>();;
+                this._facetNormals = new Array<Vector3>();;
+                this._facetPartitioning = new Array<number[]>();;
                 this._facetParameters = null;
                 this._facetParameters = null;
             }
             }
             return this;
             return this;
@@ -2360,7 +2371,7 @@
             var normals: number[] | Float32Array;
             var normals: number[] | Float32Array;
 
 
             if (this.isVerticesDataPresent(VertexBuffer.NormalKind)) {
             if (this.isVerticesDataPresent(VertexBuffer.NormalKind)) {
-                normals = this.getVerticesData(VertexBuffer.NormalKind);
+                normals = (<number[] | Float32Array>this.getVerticesData(VertexBuffer.NormalKind));
             } else {
             } else {
                 normals = [];
                 normals = [];
             }
             }
@@ -2377,7 +2388,7 @@
                 return;
                 return;
             }
             }
 
 
-            if (this.isOcclusionQueryInProgress) {
+            if (this.isOcclusionQueryInProgress && this._occlusionQuery) {
                 
                 
                 var isOcclusionQueryAvailable = engine.isQueryResultAvailable(this._occlusionQuery);
                 var isOcclusionQueryAvailable = engine.isQueryResultAvailable(this._occlusionQuery);
                 if (isOcclusionQueryAvailable) {
                 if (isOcclusionQueryAvailable) {

+ 2 - 2
src/Mesh/babylon.mesh.vertexData.ts

@@ -4,8 +4,8 @@
     export interface IGetSetVerticesData
     export interface IGetSetVerticesData
     {
     {
         isVerticesDataPresent(kind: string): boolean;
         isVerticesDataPresent(kind: string): boolean;
-        getVerticesData(kind: string, copyWhenShared?: boolean, forceCopy?: boolean): number[] | Float32Array;
-        getIndices(copyWhenShared?: boolean): IndicesArray;
+        getVerticesData(kind: string, copyWhenShared?: boolean, forceCopy?: boolean): Nullable<number[] | Float32Array>;
+        getIndices(copyWhenShared?: boolean): Nullable<IndicesArray>;
         setVerticesData(kind: string, data: number[] | Float32Array, updatable?: boolean): void;
         setVerticesData(kind: string, data: number[] | Float32Array, updatable?: boolean): void;
         updateVerticesData(kind: string, data: number[] | Float32Array, updateExtends?: boolean, makeItUnique?: boolean): void;
         updateVerticesData(kind: string, data: number[] | Float32Array, updateExtends?: boolean, makeItUnique?: boolean): void;
         setIndices(indices: IndicesArray, totalVertices?: number, updatable?: boolean): void;
         setIndices(indices: IndicesArray, totalVertices?: number, updatable?: boolean): void;

+ 10 - 10
src/Mesh/babylon.subMesh.ts

@@ -1,16 +1,16 @@
 module BABYLON {
 module BABYLON {
     export class BaseSubMesh {
     export class BaseSubMesh {
-        public _materialDefines: MaterialDefines;
-        public _materialEffect: Effect;
+        public _materialDefines: Nullable<MaterialDefines>;
+        public _materialEffect: Nullable<Effect>;
 
 
-        public get effect(): Effect {
+        public get effect(): Nullable<Effect> {
             return this._materialEffect;
             return this._materialEffect;
         }       
         }       
 
 
-        public setEffect(effect: Effect, defines?: MaterialDefines) {
+        public setEffect(effect: Nullable<Effect>, defines: Nullable<MaterialDefines> = null) {
             if (this._materialEffect === effect) {
             if (this._materialEffect === effect) {
                 if (!effect) {
                 if (!effect) {
-                    this._materialDefines = undefined;
+                    this._materialDefines = null;
                 }
                 }
                 return;
                 return;
             }
             }
@@ -25,8 +25,8 @@
         private _mesh: AbstractMesh;
         private _mesh: AbstractMesh;
         private _renderingMesh: Mesh;
         private _renderingMesh: Mesh;
         private _boundingInfo: BoundingInfo;
         private _boundingInfo: BoundingInfo;
-        private _linesIndexBuffer: WebGLBuffer;
-        public _lastColliderWorldVertices: Vector3[];
+        private _linesIndexBuffer: Nullable<WebGLBuffer>;
+        public _lastColliderWorldVertices: Nullable<Vector3[]>;
         public _trianglePlanes: Plane[];
         public _trianglePlanes: Plane[];
         public _lastColliderTransformMatrix: Matrix;
         public _lastColliderTransformMatrix: Matrix;
 
 
@@ -107,7 +107,7 @@
 
 
                 if (this._currentMaterial !== effectiveMaterial) {
                 if (this._currentMaterial !== effectiveMaterial) {
                     this._currentMaterial = effectiveMaterial;
                     this._currentMaterial = effectiveMaterial;
-                    this._materialDefines = undefined;
+                    this._materialDefines = null;
                 }
                 }
 
 
                 return effectiveMaterial;
                 return effectiveMaterial;
@@ -224,8 +224,8 @@
         /**
         /**
          * Returns an object IntersectionInfo.  
          * Returns an object IntersectionInfo.  
          */
          */
-        public intersects(ray: Ray, positions: Vector3[], indices: IndicesArray, fastCheck?: boolean): IntersectionInfo {
-            var intersectInfo: IntersectionInfo = null;
+        public intersects(ray: Ray, positions: Vector3[], indices: IndicesArray, fastCheck?: boolean): Nullable<IntersectionInfo> {
+            var intersectInfo: Nullable<IntersectionInfo> = null;
 
 
             // LineMesh first as it's also a Mesh...
             // LineMesh first as it's also a Mesh...
             if (this._mesh instanceof LinesMesh) {
             if (this._mesh instanceof LinesMesh) {

+ 3 - 3
src/Physics/babylon.physicsEngine.ts

@@ -10,7 +10,7 @@
 
 
         public gravity: Vector3;
         public gravity: Vector3;
 
 
-        constructor(gravity?: Vector3, private _physicsPlugin: IPhysicsEnginePlugin = new CannonJSPlugin()) {
+        constructor(gravity: Nullable<Vector3>, private _physicsPlugin: IPhysicsEnginePlugin = new CannonJSPlugin()) {
             if (!this._physicsPlugin.isSupported()) {
             if (!this._physicsPlugin.isSupported()) {
                 throw new Error("Physics Engine " + this._physicsPlugin.name + " cannot be found. "
                 throw new Error("Physics Engine " + this._physicsPlugin.name + " cannot be found. "
                     + "Please make sure it is included.")
                     + "Please make sure it is included.")
@@ -147,7 +147,7 @@
             return this._physicsPlugin;
             return this._physicsPlugin;
         }
         }
 
 
-        public getImpostorForPhysicsObject(object: IPhysicsEnabledObject): PhysicsImpostor {
+        public getImpostorForPhysicsObject(object: IPhysicsEnabledObject): Nullable<PhysicsImpostor> {
             for (var i = 0; i < this._impostors.length; ++i) {
             for (var i = 0; i < this._impostors.length; ++i) {
                 if (this._impostors[i].object === object) {
                 if (this._impostors[i].object === object) {
                     return this._impostors[i];
                     return this._impostors[i];
@@ -157,7 +157,7 @@
             return null;
             return null;
         }
         }
 
 
-        public getImpostorWithPhysicsBody(body: any): PhysicsImpostor {
+        public getImpostorWithPhysicsBody(body: any): Nullable<PhysicsImpostor> {
             for (var i = 0; i < this._impostors.length; ++i) {
             for (var i = 0; i < this._impostors.length; ++i) {
                 if (this._impostors[i].physicsBody === body) {
                 if (this._impostors[i].physicsBody === body) {
                     return this._impostors[i];
                     return this._impostors[i];

+ 0 - 0
src/PostProcess/babylon.postProcess.ts


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