Raanan Weber пре 7 година
родитељ
комит
b2dc0ea1d6

Разлика између датотеке није приказан због своје велике величине
+ 10140 - 10125
dist/preview release/babylon.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 54 - 54
dist/preview release/babylon.js


+ 223 - 466
dist/preview release/babylon.max.js

@@ -11165,7 +11165,7 @@ var BABYLON;
         var magFilter = gl.NEAREST;
         var minFilter = gl.NEAREST;
         switch (samplingMode) {
-            case BABYLON.Texture.BILINEAR_SAMPLINGMODE:
+            case Engine.TEXTURE_BILINEAR_SAMPLINGMODE:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_NEAREST;
@@ -11174,7 +11174,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.TRILINEAR_SAMPLINGMODE:
+            case Engine.TEXTURE_TRILINEAR_SAMPLINGMODE:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_LINEAR;
@@ -11183,7 +11183,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_SAMPLINGMODE:
+            case Engine.TEXTURE_NEAREST_SAMPLINGMODE:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_LINEAR;
@@ -11192,7 +11192,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_NEAREST_MIPNEAREST:
+            case Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_NEAREST;
@@ -11201,7 +11201,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR_MIPNEAREST:
+            case Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_NEAREST;
@@ -11210,7 +11210,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR_MIPLINEAR:
+            case Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_LINEAR;
@@ -11219,15 +11219,15 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR:
+            case Engine.TEXTURE_NEAREST_LINEAR:
                 magFilter = gl.NEAREST;
                 minFilter = gl.LINEAR;
                 break;
-            case BABYLON.Texture.NEAREST_NEAREST:
+            case Engine.TEXTURE_NEAREST_NEAREST:
                 magFilter = gl.NEAREST;
                 minFilter = gl.NEAREST;
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST_MIPNEAREST:
+            case Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_NEAREST;
@@ -11236,7 +11236,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST_MIPLINEAR:
+            case Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_LINEAR;
@@ -11245,11 +11245,11 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.LINEAR_LINEAR:
+            case Engine.TEXTURE_LINEAR_LINEAR:
                 magFilter = gl.LINEAR;
                 minFilter = gl.LINEAR;
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST:
+            case Engine.TEXTURE_LINEAR_NEAREST:
                 magFilter = gl.LINEAR;
                 minFilter = gl.NEAREST;
                 break;
@@ -11828,368 +11828,12 @@ var BABYLON;
                 }
             }
         };
-        Object.defineProperty(Engine, "NEVER", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
-            get: function () {
-                return Engine._NEVER;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALWAYS", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
-            get: function () {
-                return Engine._ALWAYS;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "LESS", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
-            get: function () {
-                return Engine._LESS;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "EQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
-            get: function () {
-                return Engine._EQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "LEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
-            get: function () {
-                return Engine._LEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "GREATER", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
-            get: function () {
-                return Engine._GREATER;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "GEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
-            get: function () {
-                return Engine._GEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "NOTEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
-            get: function () {
-                return Engine._NOTEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "KEEP", {
-            /** Passed to stencilOperation to specify that stencil value must be kept */
-            get: function () {
-                return Engine._KEEP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "REPLACE", {
-            /** Passed to stencilOperation to specify that stencil value must be replaced */
-            get: function () {
-                return Engine._REPLACE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INCR", {
-            /** Passed to stencilOperation to specify that stencil value must be incremented */
-            get: function () {
-                return Engine._INCR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DECR", {
-            /** Passed to stencilOperation to specify that stencil value must be decremented */
-            get: function () {
-                return Engine._DECR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INVERT", {
-            /** Passed to stencilOperation to specify that stencil value must be inverted */
-            get: function () {
-                return Engine._INVERT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INCR_WRAP", {
-            /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
-            get: function () {
-                return Engine._INCR_WRAP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DECR_WRAP", {
-            /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
-            get: function () {
-                return Engine._DECR_WRAP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_DISABLE", {
-            // Alpha
-            /** Defines that alpha blending is disabled */
-            get: function () {
-                return Engine._ALPHA_DISABLE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_ONEONE", {
-            /** Defines that alpha blending to SRC + DEST */
-            get: function () {
-                return Engine._ALPHA_ONEONE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_ADD", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + DEST */
-            get: function () {
-                return Engine._ALPHA_ADD;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_COMBINE", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
-            get: function () {
-                return Engine._ALPHA_COMBINE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_SUBTRACT", {
-            /** Defines that alpha blending to DEST - SRC * DEST */
-            get: function () {
-                return Engine._ALPHA_SUBTRACT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_MULTIPLY", {
-            /** Defines that alpha blending to SRC * DEST */
-            get: function () {
-                return Engine._ALPHA_MULTIPLY;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_MAXIMIZED", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */
-            get: function () {
-                return Engine._ALPHA_MAXIMIZED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_PREMULTIPLIED", {
-            /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */
-            get: function () {
-                return Engine._ALPHA_PREMULTIPLIED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_PREMULTIPLIED_PORTERDUFF", {
-            /**
-             * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
-             * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
-             */
-            get: function () {
-                return Engine._ALPHA_PREMULTIPLIED_PORTERDUFF;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_INTERPOLATE", {
-            /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */
-            get: function () {
-                return Engine._ALPHA_INTERPOLATE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_SCREENMODE", {
-            /**
-             * Defines that alpha blending to SRC + (1 - SRC) * DEST
-             * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
-             */
-            get: function () {
-                return Engine._ALPHA_SCREENMODE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_NONE", {
-            // Delays
-            /** Defines that the ressource is not delayed*/
-            get: function () {
-                return Engine._DELAYLOADSTATE_NONE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_LOADED", {
-            /** Defines that the ressource was successfully delay loaded */
-            get: function () {
-                return Engine._DELAYLOADSTATE_LOADED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_LOADING", {
-            /** Defines that the ressource is currently delay loading */
-            get: function () {
-                return Engine._DELAYLOADSTATE_LOADING;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_NOTLOADED", {
-            /** Defines that the ressource is delayed and has not started loading */
-            get: function () {
-                return Engine._DELAYLOADSTATE_NOTLOADED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_ALPHA", {
-            /** ALPHA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_ALPHA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_LUMINANCE", {
-            /** LUMINANCE */
-            get: function () {
-                return Engine._TEXTUREFORMAT_LUMINANCE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_R", {
-            /**
-             * R
-             */
-            get: function () {
-                return Engine._TEXTUREFORMAT_R;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RG", {
-            /**
-             * RG
-             */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RG;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_LUMINANCE_ALPHA", {
-            /** LUMINANCE_ALPHA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_LUMINANCE_ALPHA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RGB", {
-            /** RGB */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RGB;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RGBA", {
-            /** RGBA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RGBA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_UNSIGNED_INT", {
-            /** UNSIGNED_INT */
-            get: function () {
-                return Engine._TEXTURETYPE_UNSIGNED_INT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_FLOAT", {
-            /** FLOAT */
-            get: function () {
-                return Engine._TEXTURETYPE_FLOAT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_HALF_FLOAT", {
-            /** HALF_FLOAT */
-            get: function () {
-                return Engine._TEXTURETYPE_HALF_FLOAT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_FLOOR", {
-            /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_FLOOR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_NEAREST", {
-            /** Defines that texture rescaling will look for the nearest power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_NEAREST;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_CEILING", {
-            /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_CEILING;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(Engine, "Version", {
             /**
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.9";
+                return "3.3.0-alpha.10";
             },
             enumerable: true,
             configurable: true
@@ -12288,7 +11932,7 @@ var BABYLON;
              */
             get: function () {
                 if (!this._emptyTexture) {
-                    this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyTexture;
             },
@@ -12301,7 +11945,7 @@ var BABYLON;
              */
             get: function () {
                 if (!this._emptyTexture3D) {
-                    this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyTexture3D;
             },
@@ -12316,7 +11960,7 @@ var BABYLON;
                 if (!this._emptyCubeTexture) {
                     var faceData = new Uint8Array(4);
                     var cubeData = [faceData, faceData, faceData, faceData, faceData, faceData];
-                    this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, Engine.TEXTUREFORMAT_RGBA, Engine.TEXTURETYPE_UNSIGNED_INT, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, Engine.TEXTUREFORMAT_RGBA, Engine.TEXTURETYPE_UNSIGNED_INT, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyCubeTexture;
             },
@@ -14758,7 +14402,7 @@ var BABYLON;
          */
         Engine.prototype.createTexture = function (urlArg, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, fallback, format) {
             var _this = this;
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             if (onLoad === void 0) { onLoad = null; }
             if (onError === void 0) { onError = null; }
             if (buffer === void 0) { buffer = null; }
@@ -14936,12 +14580,12 @@ var BABYLON;
             }, {
                 generateMipMaps: false,
                 type: Engine.TEXTURETYPE_UNSIGNED_INT,
-                samplingMode: BABYLON.Texture.BILINEAR_SAMPLINGMODE,
+                samplingMode: Engine.TEXTURE_BILINEAR_SAMPLINGMODE,
                 generateDepthBuffer: false,
                 generateStencilBuffer: false
             });
             if (!this._rescalePostProcess) {
-                this._rescalePostProcess = new BABYLON.PassPostProcess("rescale", 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, this, false, Engine.TEXTURETYPE_UNSIGNED_INT);
+                this._rescalePostProcess = new BABYLON.PassPostProcess("rescale", 1, null, Engine.TEXTURE_BILINEAR_SAMPLINGMODE, this, false, Engine.TEXTURETYPE_UNSIGNED_INT);
             }
             this._rescalePostProcess.getEffect().executeWhenCompiled(function () {
                 _this._rescalePostProcess.onApply = function (effect) {
@@ -15242,7 +14886,7 @@ var BABYLON;
             internalTexture.generateMipMaps = false;
             internalTexture._generateDepthBuffer = true;
             internalTexture._generateStencilBuffer = generateStencil;
-            internalTexture.samplingMode = bilinearFiltering ? BABYLON.Texture.BILINEAR_SAMPLINGMODE : BABYLON.Texture.NEAREST_SAMPLINGMODE;
+            internalTexture.samplingMode = bilinearFiltering ? Engine.TEXTURE_BILINEAR_SAMPLINGMODE : Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             internalTexture.type = Engine.TEXTURETYPE_UNSIGNED_INT;
             internalTexture._comparisonFunction = comparisonFunction;
             var gl = this._gl;
@@ -15387,7 +15031,7 @@ var BABYLON;
                 fullOptions.generateDepthBuffer = options.generateDepthBuffer === undefined ? true : options.generateDepthBuffer;
                 fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && options.generateStencilBuffer;
                 fullOptions.type = options.type === undefined ? Engine.TEXTURETYPE_UNSIGNED_INT : options.type;
-                fullOptions.samplingMode = options.samplingMode === undefined ? BABYLON.Texture.TRILINEAR_SAMPLINGMODE : options.samplingMode;
+                fullOptions.samplingMode = options.samplingMode === undefined ? Engine.TEXTURE_TRILINEAR_SAMPLINGMODE : options.samplingMode;
                 fullOptions.format = options.format === undefined ? Engine.TEXTUREFORMAT_RGBA : options.format;
             }
             else {
@@ -15395,16 +15039,16 @@ var BABYLON;
                 fullOptions.generateDepthBuffer = true;
                 fullOptions.generateStencilBuffer = false;
                 fullOptions.type = Engine.TEXTURETYPE_UNSIGNED_INT;
-                fullOptions.samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
                 fullOptions.format = Engine.TEXTUREFORMAT_RGBA;
             }
             if (fullOptions.type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                 // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             else if (fullOptions.type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                 // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             var gl = this._gl;
             var texture = new BABYLON.InternalTexture(this, BABYLON.InternalTexture.DATASOURCE_RENDERTARGET);
@@ -15464,7 +15108,7 @@ var BABYLON;
             var generateDepthTexture = false;
             var textureCount = 1;
             var defaultType = Engine.TEXTURETYPE_UNSIGNED_INT;
-            var defaultSamplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE;
+            var defaultSamplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
             var types = new Array();
             var samplingModes = new Array();
             if (options !== undefined) {
@@ -15494,11 +15138,11 @@ var BABYLON;
                 var type = types[i] || defaultType;
                 if (type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                     // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                    samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                    samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
                 }
                 else if (type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                     // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                    samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                    samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
                 }
                 var filters = getSamplingParameters(samplingMode, generateMipMaps, gl);
                 if (type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloat) {
@@ -15747,15 +15391,15 @@ var BABYLON;
          * @returns a new render target cube texture stored in an InternalTexture
          */
         Engine.prototype.createRenderTargetCubeTexture = function (size, options) {
-            var fullOptions = __assign({ generateMipMaps: true, generateDepthBuffer: true, generateStencilBuffer: false, type: Engine.TEXTURETYPE_UNSIGNED_INT, samplingMode: BABYLON.Texture.TRILINEAR_SAMPLINGMODE, format: Engine.TEXTUREFORMAT_RGBA }, options);
+            var fullOptions = __assign({ generateMipMaps: true, generateDepthBuffer: true, generateStencilBuffer: false, type: Engine.TEXTURETYPE_UNSIGNED_INT, samplingMode: Engine.TEXTURE_TRILINEAR_SAMPLINGMODE, format: Engine.TEXTUREFORMAT_RGBA }, options);
             fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;
             if (fullOptions.type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                 // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             else if (fullOptions.type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                 // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             var gl = this._gl;
             var texture = new BABYLON.InternalTexture(this, BABYLON.InternalTexture.DATASOURCE_RENDERTARGET);
@@ -16220,7 +15864,7 @@ var BABYLON;
             var _this = this;
             if (onLoad === void 0) { onLoad = null; }
             if (onError === void 0) { onError = null; }
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             if (invertY === void 0) { invertY = false; }
             var gl = this._gl;
             var texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode);
@@ -16385,7 +16029,7 @@ var BABYLON;
         };
         Engine.prototype._prepareWebGLTexture = function (texture, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {
             var _this = this;
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             var maxTextureSize = this.getCaps().maxTextureSize;
             var potWidth = Math.min(maxTextureSize, this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(width, maxTextureSize) : width);
             var potHeight = Math.min(maxTextureSize, this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(height, maxTextureSize) : height);
@@ -16707,11 +16351,11 @@ var BABYLON;
         };
         Engine.prototype._getTextureWrapMode = function (mode) {
             switch (mode) {
-                case BABYLON.Texture.WRAP_ADDRESSMODE:
+                case Engine.TEXTURE_WRAP_ADDRESSMODE:
                     return this._gl.REPEAT;
-                case BABYLON.Texture.CLAMP_ADDRESSMODE:
+                case Engine.TEXTURE_CLAMP_ADDRESSMODE:
                     return this._gl.CLAMP_TO_EDGE;
-                case BABYLON.Texture.MIRROR_ADDRESSMODE:
+                case Engine.TEXTURE_MIRROR_ADDRESSMODE:
                     return this._gl.MIRRORED_REPEAT;
             }
             return this._gl.REPEAT;
@@ -16793,7 +16437,7 @@ var BABYLON;
                 if (internalTexture._cachedCoordinatesMode !== texture.coordinatesMode) {
                     internalTexture._cachedCoordinatesMode = texture.coordinatesMode;
                     // CUBIC_MODE and SKYBOX_MODE both require CLAMP_TO_EDGE.  All other modes use REPEAT.
-                    var textureWrapMode = (texture.coordinatesMode !== BABYLON.Texture.CUBIC_MODE && texture.coordinatesMode !== BABYLON.Texture.SKYBOX_MODE) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;
+                    var textureWrapMode = (texture.coordinatesMode !== Engine.TEXTURE_CUBIC_MODE && texture.coordinatesMode !== Engine.TEXTURE_SKYBOX_MODE) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;
                     this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_S, textureWrapMode, internalTexture);
                     this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_T, textureWrapMode);
                 }
@@ -16844,9 +16488,9 @@ var BABYLON;
             }
             var anisotropicFilterExtension = this._caps.textureAnisotropicFilterExtension;
             var value = texture.anisotropicFilteringLevel;
-            if (internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR_MIPNEAREST
-                && internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR_MIPLINEAR
-                && internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR) {
+            if (internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST
+                && internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR
+                && internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR) {
                 value = 1; // Forcing the anisotropic to 1 because else webgl will force filters to linear
             }
             if (anisotropicFilterExtension && internalTexture._cachedAnisotropicFilteringLevel !== value) {
@@ -17699,52 +17343,157 @@ var BABYLON;
         /** Gets the list of created engines */
         Engine.Instances = new Array();
         // Const statics
-        Engine._ALPHA_DISABLE = 0;
-        Engine._ALPHA_ADD = 1;
-        Engine._ALPHA_COMBINE = 2;
-        Engine._ALPHA_SUBTRACT = 3;
-        Engine._ALPHA_MULTIPLY = 4;
-        Engine._ALPHA_MAXIMIZED = 5;
-        Engine._ALPHA_ONEONE = 6;
-        Engine._ALPHA_PREMULTIPLIED = 7;
-        Engine._ALPHA_PREMULTIPLIED_PORTERDUFF = 8;
-        Engine._ALPHA_INTERPOLATE = 9;
-        Engine._ALPHA_SCREENMODE = 10;
-        Engine._DELAYLOADSTATE_NONE = 0;
-        Engine._DELAYLOADSTATE_LOADED = 1;
-        Engine._DELAYLOADSTATE_LOADING = 2;
-        Engine._DELAYLOADSTATE_NOTLOADED = 4;
-        Engine._TEXTUREFORMAT_ALPHA = 0;
-        Engine._TEXTUREFORMAT_LUMINANCE = 1;
-        Engine._TEXTUREFORMAT_LUMINANCE_ALPHA = 2;
-        Engine._TEXTUREFORMAT_RGB = 4;
-        Engine._TEXTUREFORMAT_RGBA = 5;
-        Engine._TEXTUREFORMAT_R = 6;
-        Engine._TEXTUREFORMAT_RG = 7;
-        Engine._TEXTURETYPE_UNSIGNED_INT = 0;
-        Engine._TEXTURETYPE_FLOAT = 1;
-        Engine._TEXTURETYPE_HALF_FLOAT = 2;
+        /** Defines that alpha blending is disabled */
+        Engine.ALPHA_DISABLE = 0;
+        /** Defines that alpha blending to SRC ALPHA * SRC + DEST */
+        Engine.ALPHA_ADD = 1;
+        /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
+        Engine.ALPHA_COMBINE = 2;
+        /** Defines that alpha blending to DEST - SRC * DEST */
+        Engine.ALPHA_SUBTRACT = 3;
+        /** Defines that alpha blending to SRC * DEST */
+        Engine.ALPHA_MULTIPLY = 4;
+        /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */
+        Engine.ALPHA_MAXIMIZED = 5;
+        /** Defines that alpha blending to SRC + DEST */
+        Engine.ALPHA_ONEONE = 6;
+        /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */
+        Engine.ALPHA_PREMULTIPLIED = 7;
+        /**
+         * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
+         * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
+         */
+        Engine.ALPHA_PREMULTIPLIED_PORTERDUFF = 8;
+        /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */
+        Engine.ALPHA_INTERPOLATE = 9;
+        /**
+         * Defines that alpha blending to SRC + (1 - SRC) * DEST
+         * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
+         */
+        Engine.ALPHA_SCREENMODE = 10;
+        /** Defines that the ressource is not delayed*/
+        Engine.DELAYLOADSTATE_NONE = 0;
+        /** Defines that the ressource was successfully delay loaded */
+        Engine.DELAYLOADSTATE_LOADED = 1;
+        /** Defines that the ressource is currently delay loading */
+        Engine.DELAYLOADSTATE_LOADING = 2;
+        /** Defines that the ressource is delayed and has not started loading */
+        Engine.DELAYLOADSTATE_NOTLOADED = 4;
         // Depht or Stencil test Constants.
-        Engine._NEVER = 0x0200; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn.
-        Engine._ALWAYS = 0x0207; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn.
-        Engine._LESS = 0x0201; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value.
-        Engine._EQUAL = 0x0202; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value.
-        Engine._LEQUAL = 0x0203; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value.
-        Engine._GREATER = 0x0204; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value.
-        Engine._GEQUAL = 0x0206; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value.
-        Engine._NOTEQUAL = 0x0205; //  Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value.
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
+        Engine.NEVER = 0x0200;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
+        Engine.ALWAYS = 0x0207;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
+        Engine.LESS = 0x0201;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
+        Engine.EQUAL = 0x0202;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
+        Engine.LEQUAL = 0x0203;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
+        Engine.GREATER = 0x0204;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
+        Engine.GEQUAL = 0x0206;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
+        Engine.NOTEQUAL = 0x0205;
         // Stencil Actions Constants.
-        Engine._KEEP = 0x1E00;
-        Engine._REPLACE = 0x1E01;
-        Engine._INCR = 0x1E02;
-        Engine._DECR = 0x1E03;
-        Engine._INVERT = 0x150A;
-        Engine._INCR_WRAP = 0x8507;
-        Engine._DECR_WRAP = 0x8508;
+        /** Passed to stencilOperation to specify that stencil value must be kept */
+        Engine.KEEP = 0x1E00;
+        /** Passed to stencilOperation to specify that stencil value must be replaced */
+        Engine.REPLACE = 0x1E01;
+        /** Passed to stencilOperation to specify that stencil value must be incremented */
+        Engine.INCR = 0x1E02;
+        /** Passed to stencilOperation to specify that stencil value must be decremented */
+        Engine.DECR = 0x1E03;
+        /** Passed to stencilOperation to specify that stencil value must be inverted */
+        Engine.INVERT = 0x150A;
+        /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
+        Engine.INCR_WRAP = 0x8507;
+        /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
+        Engine.DECR_WRAP = 0x8508;
+        /** Texture is not repeating outside of 0..1 UVs */
+        Engine.TEXTURE_CLAMP_ADDRESSMODE = 0;
+        /** Texture is repeating outside of 0..1 UVs */
+        Engine.TEXTURE_WRAP_ADDRESSMODE = 1;
+        /** Texture is repeating and mirrored */
+        Engine.TEXTURE_MIRROR_ADDRESSMODE = 2;
+        /** ALPHA */
+        Engine.TEXTUREFORMAT_ALPHA = 0;
+        /** LUMINANCE */
+        Engine.TEXTUREFORMAT_LUMINANCE = 1;
+        /** LUMINANCE_ALPHA */
+        Engine.TEXTUREFORMAT_LUMINANCE_ALPHA = 2;
+        /** RGB */
+        Engine.TEXTUREFORMAT_RGB = 4;
+        /** RGBA */
+        Engine.TEXTUREFORMAT_RGBA = 5;
+        /** R */
+        Engine.TEXTUREFORMAT_R = 6;
+        /** RG */
+        Engine.TEXTUREFORMAT_RG = 7;
+        /** UNSIGNED_INT */
+        Engine.TEXTURETYPE_UNSIGNED_INT = 0;
+        /** FLOAT */
+        Engine.TEXTURETYPE_FLOAT = 1;
+        /** HALF_FLOAT */
+        Engine.TEXTURETYPE_HALF_FLOAT = 2;
+        /** nearest is mag = nearest and min = nearest and mip = linear */
+        Engine.TEXTURE_NEAREST_SAMPLINGMODE = 1;
+        /** Bilinear is mag = linear and min = linear and mip = nearest */
+        Engine.TEXTURE_BILINEAR_SAMPLINGMODE = 2;
+        /** Trilinear is mag = linear and min = linear and mip = linear */
+        Engine.TEXTURE_TRILINEAR_SAMPLINGMODE = 3;
+        /** nearest is mag = nearest and min = nearest and mip = linear */
+        Engine.TEXTURE_NEAREST_NEAREST_MIPLINEAR = 1;
+        /** Bilinear is mag = linear and min = linear and mip = nearest */
+        Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST = 2;
+        /** Trilinear is mag = linear and min = linear and mip = linear */
+        Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;
+        /** mag = nearest and min = nearest and mip = nearest */
+        Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;
+        /** mag = nearest and min = linear and mip = nearest */
+        Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;
+        /** mag = nearest and min = linear and mip = linear */
+        Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;
+        /** mag = nearest and min = linear and mip = none */
+        Engine.TEXTURE_NEAREST_LINEAR = 7;
+        /** mag = nearest and min = nearest and mip = none */
+        Engine.TEXTURE_NEAREST_NEAREST = 8;
+        /** mag = linear and min = nearest and mip = nearest */
+        Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;
+        /** mag = linear and min = nearest and mip = linear */
+        Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;
+        /** mag = linear and min = linear and mip = none */
+        Engine.TEXTURE_LINEAR_LINEAR = 11;
+        /** mag = linear and min = nearest and mip = none */
+        Engine.TEXTURE_LINEAR_NEAREST = 12;
+        /** Explicit coordinates mode */
+        Engine.TEXTURE_EXPLICIT_MODE = 0;
+        /** Spherical coordinates mode */
+        Engine.TEXTURE_SPHERICAL_MODE = 1;
+        /** Planar coordinates mode */
+        Engine.TEXTURE_PLANAR_MODE = 2;
+        /** Cubic coordinates mode */
+        Engine.TEXTURE_CUBIC_MODE = 3;
+        /** Projection coordinates mode */
+        Engine.TEXTURE_PROJECTION_MODE = 4;
+        /** Skybox coordinates mode */
+        Engine.TEXTURE_SKYBOX_MODE = 5;
+        /** Inverse Cubic coordinates mode */
+        Engine.TEXTURE_INVCUBIC_MODE = 6;
+        /** Equirectangular coordinates mode */
+        Engine.TEXTURE_EQUIRECTANGULAR_MODE = 7;
+        /** Equirectangular Fixed coordinates mode */
+        Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;
+        /** Equirectangular Fixed Mirrored coordinates mode */
+        Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;
         // Texture rescaling mode
-        Engine._SCALEMODE_FLOOR = 1;
-        Engine._SCALEMODE_NEAREST = 2;
-        Engine._SCALEMODE_CEILING = 3;
+        /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
+        Engine.SCALEMODE_FLOOR = 1;
+        /** Defines that texture rescaling will look for the nearest power of 2 size */
+        Engine.SCALEMODE_NEAREST = 2;
+        /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
+        Engine.SCALEMODE_CEILING = 3;
         // Updatable statics so stick with vars here
         /**
          * Gets or sets the epsilon value used by collision engine
@@ -31446,34 +31195,34 @@ var BABYLON;
             return new Texture(name, scene, noMipmap, invertY, samplingMode, onLoad, onError, buffer, deleteBuffer, format);
         };
         // Constants
-        Texture.NEAREST_SAMPLINGMODE = 1;
-        Texture.NEAREST_NEAREST_MIPLINEAR = 1; // nearest is mag = nearest and min = nearest and mip = linear
-        Texture.BILINEAR_SAMPLINGMODE = 2;
-        Texture.LINEAR_LINEAR_MIPNEAREST = 2; // Bilinear is mag = linear and min = linear and mip = nearest
-        Texture.TRILINEAR_SAMPLINGMODE = 3;
-        Texture.LINEAR_LINEAR_MIPLINEAR = 3; // Trilinear is mag = linear and min = linear and mip = linear
-        Texture.NEAREST_NEAREST_MIPNEAREST = 4;
-        Texture.NEAREST_LINEAR_MIPNEAREST = 5;
-        Texture.NEAREST_LINEAR_MIPLINEAR = 6;
-        Texture.NEAREST_LINEAR = 7;
-        Texture.NEAREST_NEAREST = 8;
-        Texture.LINEAR_NEAREST_MIPNEAREST = 9;
-        Texture.LINEAR_NEAREST_MIPLINEAR = 10;
-        Texture.LINEAR_LINEAR = 11;
-        Texture.LINEAR_NEAREST = 12;
-        Texture.EXPLICIT_MODE = 0;
-        Texture.SPHERICAL_MODE = 1;
-        Texture.PLANAR_MODE = 2;
-        Texture.CUBIC_MODE = 3;
-        Texture.PROJECTION_MODE = 4;
-        Texture.SKYBOX_MODE = 5;
-        Texture.INVCUBIC_MODE = 6;
-        Texture.EQUIRECTANGULAR_MODE = 7;
-        Texture.FIXED_EQUIRECTANGULAR_MODE = 8;
-        Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;
-        Texture.CLAMP_ADDRESSMODE = 0;
-        Texture.WRAP_ADDRESSMODE = 1;
-        Texture.MIRROR_ADDRESSMODE = 2;
+        Texture.NEAREST_SAMPLINGMODE = BABYLON.Engine.TEXTURE_NEAREST_SAMPLINGMODE;
+        Texture.NEAREST_NEAREST_MIPLINEAR = BABYLON.Engine.TEXTURE_NEAREST_NEAREST_MIPLINEAR; // nearest is mag = nearest and min = nearest and mip = linear
+        Texture.BILINEAR_SAMPLINGMODE = BABYLON.Engine.TEXTURE_BILINEAR_SAMPLINGMODE;
+        Texture.LINEAR_LINEAR_MIPNEAREST = BABYLON.Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST; // Bilinear is mag = linear and min = linear and mip = nearest
+        Texture.TRILINEAR_SAMPLINGMODE = BABYLON.Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
+        Texture.LINEAR_LINEAR_MIPLINEAR = BABYLON.Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR; // Trilinear is mag = linear and min = linear and mip = linear
+        Texture.NEAREST_NEAREST_MIPNEAREST = BABYLON.Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST;
+        Texture.NEAREST_LINEAR_MIPNEAREST = BABYLON.Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST;
+        Texture.NEAREST_LINEAR_MIPLINEAR = BABYLON.Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR;
+        Texture.NEAREST_LINEAR = BABYLON.Engine.TEXTURE_NEAREST_LINEAR;
+        Texture.NEAREST_NEAREST = BABYLON.Engine.TEXTURE_NEAREST_NEAREST;
+        Texture.LINEAR_NEAREST_MIPNEAREST = BABYLON.Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST;
+        Texture.LINEAR_NEAREST_MIPLINEAR = BABYLON.Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR;
+        Texture.LINEAR_LINEAR = BABYLON.Engine.TEXTURE_LINEAR_LINEAR;
+        Texture.LINEAR_NEAREST = BABYLON.Engine.TEXTURE_LINEAR_NEAREST;
+        Texture.EXPLICIT_MODE = BABYLON.Engine.TEXTURE_EXPLICIT_MODE;
+        Texture.SPHERICAL_MODE = BABYLON.Engine.TEXTURE_SPHERICAL_MODE;
+        Texture.PLANAR_MODE = BABYLON.Engine.TEXTURE_PLANAR_MODE;
+        Texture.CUBIC_MODE = BABYLON.Engine.TEXTURE_CUBIC_MODE;
+        Texture.PROJECTION_MODE = BABYLON.Engine.TEXTURE_PROJECTION_MODE;
+        Texture.SKYBOX_MODE = BABYLON.Engine.TEXTURE_SKYBOX_MODE;
+        Texture.INVCUBIC_MODE = BABYLON.Engine.TEXTURE_INVCUBIC_MODE;
+        Texture.EQUIRECTANGULAR_MODE = BABYLON.Engine.TEXTURE_EQUIRECTANGULAR_MODE;
+        Texture.FIXED_EQUIRECTANGULAR_MODE = BABYLON.Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE;
+        Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE = BABYLON.Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE;
+        Texture.CLAMP_ADDRESSMODE = BABYLON.Engine.TEXTURE_CLAMP_ADDRESSMODE;
+        Texture.WRAP_ADDRESSMODE = BABYLON.Engine.TEXTURE_WRAP_ADDRESSMODE;
+        Texture.MIRROR_ADDRESSMODE = BABYLON.Engine.TEXTURE_MIRROR_ADDRESSMODE;
         /**
          * Gets or sets a boolean which defines if the texture url must be build from the serialized URL instead of just using the name and loading them side by side with the scene file
          */
@@ -101475,6 +101224,14 @@ var BABYLON;
         NullEngine.prototype.updateDynamicTexture = function (texture, canvas, invertY, premulAlpha, format) {
             if (premulAlpha === void 0) { premulAlpha = false; }
         };
+        /**
+         * Get the current error code of the webGL context
+         * @returns the error code
+         * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError
+         */
+        NullEngine.prototype.getError = function () {
+            return 0;
+        };
         NullEngine.prototype.updateDynamicIndexBuffer = function (indexBuffer, indices, offset) {
             if (offset === void 0) { offset = 0; }
         };

+ 223 - 466
dist/preview release/babylon.no-module.max.js

@@ -11132,7 +11132,7 @@ var BABYLON;
         var magFilter = gl.NEAREST;
         var minFilter = gl.NEAREST;
         switch (samplingMode) {
-            case BABYLON.Texture.BILINEAR_SAMPLINGMODE:
+            case Engine.TEXTURE_BILINEAR_SAMPLINGMODE:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_NEAREST;
@@ -11141,7 +11141,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.TRILINEAR_SAMPLINGMODE:
+            case Engine.TEXTURE_TRILINEAR_SAMPLINGMODE:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_LINEAR;
@@ -11150,7 +11150,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_SAMPLINGMODE:
+            case Engine.TEXTURE_NEAREST_SAMPLINGMODE:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_LINEAR;
@@ -11159,7 +11159,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_NEAREST_MIPNEAREST:
+            case Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_NEAREST;
@@ -11168,7 +11168,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR_MIPNEAREST:
+            case Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_NEAREST;
@@ -11177,7 +11177,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR_MIPLINEAR:
+            case Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_LINEAR;
@@ -11186,15 +11186,15 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR:
+            case Engine.TEXTURE_NEAREST_LINEAR:
                 magFilter = gl.NEAREST;
                 minFilter = gl.LINEAR;
                 break;
-            case BABYLON.Texture.NEAREST_NEAREST:
+            case Engine.TEXTURE_NEAREST_NEAREST:
                 magFilter = gl.NEAREST;
                 minFilter = gl.NEAREST;
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST_MIPNEAREST:
+            case Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_NEAREST;
@@ -11203,7 +11203,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST_MIPLINEAR:
+            case Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_LINEAR;
@@ -11212,11 +11212,11 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.LINEAR_LINEAR:
+            case Engine.TEXTURE_LINEAR_LINEAR:
                 magFilter = gl.LINEAR;
                 minFilter = gl.LINEAR;
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST:
+            case Engine.TEXTURE_LINEAR_NEAREST:
                 magFilter = gl.LINEAR;
                 minFilter = gl.NEAREST;
                 break;
@@ -11795,368 +11795,12 @@ var BABYLON;
                 }
             }
         };
-        Object.defineProperty(Engine, "NEVER", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
-            get: function () {
-                return Engine._NEVER;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALWAYS", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
-            get: function () {
-                return Engine._ALWAYS;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "LESS", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
-            get: function () {
-                return Engine._LESS;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "EQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
-            get: function () {
-                return Engine._EQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "LEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
-            get: function () {
-                return Engine._LEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "GREATER", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
-            get: function () {
-                return Engine._GREATER;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "GEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
-            get: function () {
-                return Engine._GEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "NOTEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
-            get: function () {
-                return Engine._NOTEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "KEEP", {
-            /** Passed to stencilOperation to specify that stencil value must be kept */
-            get: function () {
-                return Engine._KEEP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "REPLACE", {
-            /** Passed to stencilOperation to specify that stencil value must be replaced */
-            get: function () {
-                return Engine._REPLACE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INCR", {
-            /** Passed to stencilOperation to specify that stencil value must be incremented */
-            get: function () {
-                return Engine._INCR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DECR", {
-            /** Passed to stencilOperation to specify that stencil value must be decremented */
-            get: function () {
-                return Engine._DECR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INVERT", {
-            /** Passed to stencilOperation to specify that stencil value must be inverted */
-            get: function () {
-                return Engine._INVERT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INCR_WRAP", {
-            /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
-            get: function () {
-                return Engine._INCR_WRAP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DECR_WRAP", {
-            /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
-            get: function () {
-                return Engine._DECR_WRAP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_DISABLE", {
-            // Alpha
-            /** Defines that alpha blending is disabled */
-            get: function () {
-                return Engine._ALPHA_DISABLE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_ONEONE", {
-            /** Defines that alpha blending to SRC + DEST */
-            get: function () {
-                return Engine._ALPHA_ONEONE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_ADD", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + DEST */
-            get: function () {
-                return Engine._ALPHA_ADD;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_COMBINE", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
-            get: function () {
-                return Engine._ALPHA_COMBINE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_SUBTRACT", {
-            /** Defines that alpha blending to DEST - SRC * DEST */
-            get: function () {
-                return Engine._ALPHA_SUBTRACT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_MULTIPLY", {
-            /** Defines that alpha blending to SRC * DEST */
-            get: function () {
-                return Engine._ALPHA_MULTIPLY;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_MAXIMIZED", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */
-            get: function () {
-                return Engine._ALPHA_MAXIMIZED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_PREMULTIPLIED", {
-            /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */
-            get: function () {
-                return Engine._ALPHA_PREMULTIPLIED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_PREMULTIPLIED_PORTERDUFF", {
-            /**
-             * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
-             * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
-             */
-            get: function () {
-                return Engine._ALPHA_PREMULTIPLIED_PORTERDUFF;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_INTERPOLATE", {
-            /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */
-            get: function () {
-                return Engine._ALPHA_INTERPOLATE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_SCREENMODE", {
-            /**
-             * Defines that alpha blending to SRC + (1 - SRC) * DEST
-             * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
-             */
-            get: function () {
-                return Engine._ALPHA_SCREENMODE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_NONE", {
-            // Delays
-            /** Defines that the ressource is not delayed*/
-            get: function () {
-                return Engine._DELAYLOADSTATE_NONE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_LOADED", {
-            /** Defines that the ressource was successfully delay loaded */
-            get: function () {
-                return Engine._DELAYLOADSTATE_LOADED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_LOADING", {
-            /** Defines that the ressource is currently delay loading */
-            get: function () {
-                return Engine._DELAYLOADSTATE_LOADING;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_NOTLOADED", {
-            /** Defines that the ressource is delayed and has not started loading */
-            get: function () {
-                return Engine._DELAYLOADSTATE_NOTLOADED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_ALPHA", {
-            /** ALPHA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_ALPHA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_LUMINANCE", {
-            /** LUMINANCE */
-            get: function () {
-                return Engine._TEXTUREFORMAT_LUMINANCE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_R", {
-            /**
-             * R
-             */
-            get: function () {
-                return Engine._TEXTUREFORMAT_R;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RG", {
-            /**
-             * RG
-             */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RG;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_LUMINANCE_ALPHA", {
-            /** LUMINANCE_ALPHA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_LUMINANCE_ALPHA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RGB", {
-            /** RGB */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RGB;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RGBA", {
-            /** RGBA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RGBA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_UNSIGNED_INT", {
-            /** UNSIGNED_INT */
-            get: function () {
-                return Engine._TEXTURETYPE_UNSIGNED_INT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_FLOAT", {
-            /** FLOAT */
-            get: function () {
-                return Engine._TEXTURETYPE_FLOAT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_HALF_FLOAT", {
-            /** HALF_FLOAT */
-            get: function () {
-                return Engine._TEXTURETYPE_HALF_FLOAT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_FLOOR", {
-            /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_FLOOR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_NEAREST", {
-            /** Defines that texture rescaling will look for the nearest power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_NEAREST;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_CEILING", {
-            /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_CEILING;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(Engine, "Version", {
             /**
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.9";
+                return "3.3.0-alpha.10";
             },
             enumerable: true,
             configurable: true
@@ -12255,7 +11899,7 @@ var BABYLON;
              */
             get: function () {
                 if (!this._emptyTexture) {
-                    this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyTexture;
             },
@@ -12268,7 +11912,7 @@ var BABYLON;
              */
             get: function () {
                 if (!this._emptyTexture3D) {
-                    this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyTexture3D;
             },
@@ -12283,7 +11927,7 @@ var BABYLON;
                 if (!this._emptyCubeTexture) {
                     var faceData = new Uint8Array(4);
                     var cubeData = [faceData, faceData, faceData, faceData, faceData, faceData];
-                    this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, Engine.TEXTUREFORMAT_RGBA, Engine.TEXTURETYPE_UNSIGNED_INT, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, Engine.TEXTUREFORMAT_RGBA, Engine.TEXTURETYPE_UNSIGNED_INT, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyCubeTexture;
             },
@@ -14725,7 +14369,7 @@ var BABYLON;
          */
         Engine.prototype.createTexture = function (urlArg, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, fallback, format) {
             var _this = this;
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             if (onLoad === void 0) { onLoad = null; }
             if (onError === void 0) { onError = null; }
             if (buffer === void 0) { buffer = null; }
@@ -14903,12 +14547,12 @@ var BABYLON;
             }, {
                 generateMipMaps: false,
                 type: Engine.TEXTURETYPE_UNSIGNED_INT,
-                samplingMode: BABYLON.Texture.BILINEAR_SAMPLINGMODE,
+                samplingMode: Engine.TEXTURE_BILINEAR_SAMPLINGMODE,
                 generateDepthBuffer: false,
                 generateStencilBuffer: false
             });
             if (!this._rescalePostProcess) {
-                this._rescalePostProcess = new BABYLON.PassPostProcess("rescale", 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, this, false, Engine.TEXTURETYPE_UNSIGNED_INT);
+                this._rescalePostProcess = new BABYLON.PassPostProcess("rescale", 1, null, Engine.TEXTURE_BILINEAR_SAMPLINGMODE, this, false, Engine.TEXTURETYPE_UNSIGNED_INT);
             }
             this._rescalePostProcess.getEffect().executeWhenCompiled(function () {
                 _this._rescalePostProcess.onApply = function (effect) {
@@ -15209,7 +14853,7 @@ var BABYLON;
             internalTexture.generateMipMaps = false;
             internalTexture._generateDepthBuffer = true;
             internalTexture._generateStencilBuffer = generateStencil;
-            internalTexture.samplingMode = bilinearFiltering ? BABYLON.Texture.BILINEAR_SAMPLINGMODE : BABYLON.Texture.NEAREST_SAMPLINGMODE;
+            internalTexture.samplingMode = bilinearFiltering ? Engine.TEXTURE_BILINEAR_SAMPLINGMODE : Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             internalTexture.type = Engine.TEXTURETYPE_UNSIGNED_INT;
             internalTexture._comparisonFunction = comparisonFunction;
             var gl = this._gl;
@@ -15354,7 +14998,7 @@ var BABYLON;
                 fullOptions.generateDepthBuffer = options.generateDepthBuffer === undefined ? true : options.generateDepthBuffer;
                 fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && options.generateStencilBuffer;
                 fullOptions.type = options.type === undefined ? Engine.TEXTURETYPE_UNSIGNED_INT : options.type;
-                fullOptions.samplingMode = options.samplingMode === undefined ? BABYLON.Texture.TRILINEAR_SAMPLINGMODE : options.samplingMode;
+                fullOptions.samplingMode = options.samplingMode === undefined ? Engine.TEXTURE_TRILINEAR_SAMPLINGMODE : options.samplingMode;
                 fullOptions.format = options.format === undefined ? Engine.TEXTUREFORMAT_RGBA : options.format;
             }
             else {
@@ -15362,16 +15006,16 @@ var BABYLON;
                 fullOptions.generateDepthBuffer = true;
                 fullOptions.generateStencilBuffer = false;
                 fullOptions.type = Engine.TEXTURETYPE_UNSIGNED_INT;
-                fullOptions.samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
                 fullOptions.format = Engine.TEXTUREFORMAT_RGBA;
             }
             if (fullOptions.type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                 // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             else if (fullOptions.type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                 // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             var gl = this._gl;
             var texture = new BABYLON.InternalTexture(this, BABYLON.InternalTexture.DATASOURCE_RENDERTARGET);
@@ -15431,7 +15075,7 @@ var BABYLON;
             var generateDepthTexture = false;
             var textureCount = 1;
             var defaultType = Engine.TEXTURETYPE_UNSIGNED_INT;
-            var defaultSamplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE;
+            var defaultSamplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
             var types = new Array();
             var samplingModes = new Array();
             if (options !== undefined) {
@@ -15461,11 +15105,11 @@ var BABYLON;
                 var type = types[i] || defaultType;
                 if (type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                     // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                    samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                    samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
                 }
                 else if (type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                     // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                    samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                    samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
                 }
                 var filters = getSamplingParameters(samplingMode, generateMipMaps, gl);
                 if (type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloat) {
@@ -15714,15 +15358,15 @@ var BABYLON;
          * @returns a new render target cube texture stored in an InternalTexture
          */
         Engine.prototype.createRenderTargetCubeTexture = function (size, options) {
-            var fullOptions = __assign({ generateMipMaps: true, generateDepthBuffer: true, generateStencilBuffer: false, type: Engine.TEXTURETYPE_UNSIGNED_INT, samplingMode: BABYLON.Texture.TRILINEAR_SAMPLINGMODE, format: Engine.TEXTUREFORMAT_RGBA }, options);
+            var fullOptions = __assign({ generateMipMaps: true, generateDepthBuffer: true, generateStencilBuffer: false, type: Engine.TEXTURETYPE_UNSIGNED_INT, samplingMode: Engine.TEXTURE_TRILINEAR_SAMPLINGMODE, format: Engine.TEXTUREFORMAT_RGBA }, options);
             fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;
             if (fullOptions.type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                 // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             else if (fullOptions.type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                 // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             var gl = this._gl;
             var texture = new BABYLON.InternalTexture(this, BABYLON.InternalTexture.DATASOURCE_RENDERTARGET);
@@ -16187,7 +15831,7 @@ var BABYLON;
             var _this = this;
             if (onLoad === void 0) { onLoad = null; }
             if (onError === void 0) { onError = null; }
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             if (invertY === void 0) { invertY = false; }
             var gl = this._gl;
             var texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode);
@@ -16352,7 +15996,7 @@ var BABYLON;
         };
         Engine.prototype._prepareWebGLTexture = function (texture, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {
             var _this = this;
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             var maxTextureSize = this.getCaps().maxTextureSize;
             var potWidth = Math.min(maxTextureSize, this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(width, maxTextureSize) : width);
             var potHeight = Math.min(maxTextureSize, this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(height, maxTextureSize) : height);
@@ -16674,11 +16318,11 @@ var BABYLON;
         };
         Engine.prototype._getTextureWrapMode = function (mode) {
             switch (mode) {
-                case BABYLON.Texture.WRAP_ADDRESSMODE:
+                case Engine.TEXTURE_WRAP_ADDRESSMODE:
                     return this._gl.REPEAT;
-                case BABYLON.Texture.CLAMP_ADDRESSMODE:
+                case Engine.TEXTURE_CLAMP_ADDRESSMODE:
                     return this._gl.CLAMP_TO_EDGE;
-                case BABYLON.Texture.MIRROR_ADDRESSMODE:
+                case Engine.TEXTURE_MIRROR_ADDRESSMODE:
                     return this._gl.MIRRORED_REPEAT;
             }
             return this._gl.REPEAT;
@@ -16760,7 +16404,7 @@ var BABYLON;
                 if (internalTexture._cachedCoordinatesMode !== texture.coordinatesMode) {
                     internalTexture._cachedCoordinatesMode = texture.coordinatesMode;
                     // CUBIC_MODE and SKYBOX_MODE both require CLAMP_TO_EDGE.  All other modes use REPEAT.
-                    var textureWrapMode = (texture.coordinatesMode !== BABYLON.Texture.CUBIC_MODE && texture.coordinatesMode !== BABYLON.Texture.SKYBOX_MODE) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;
+                    var textureWrapMode = (texture.coordinatesMode !== Engine.TEXTURE_CUBIC_MODE && texture.coordinatesMode !== Engine.TEXTURE_SKYBOX_MODE) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;
                     this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_S, textureWrapMode, internalTexture);
                     this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_T, textureWrapMode);
                 }
@@ -16811,9 +16455,9 @@ var BABYLON;
             }
             var anisotropicFilterExtension = this._caps.textureAnisotropicFilterExtension;
             var value = texture.anisotropicFilteringLevel;
-            if (internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR_MIPNEAREST
-                && internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR_MIPLINEAR
-                && internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR) {
+            if (internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST
+                && internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR
+                && internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR) {
                 value = 1; // Forcing the anisotropic to 1 because else webgl will force filters to linear
             }
             if (anisotropicFilterExtension && internalTexture._cachedAnisotropicFilteringLevel !== value) {
@@ -17666,52 +17310,157 @@ var BABYLON;
         /** Gets the list of created engines */
         Engine.Instances = new Array();
         // Const statics
-        Engine._ALPHA_DISABLE = 0;
-        Engine._ALPHA_ADD = 1;
-        Engine._ALPHA_COMBINE = 2;
-        Engine._ALPHA_SUBTRACT = 3;
-        Engine._ALPHA_MULTIPLY = 4;
-        Engine._ALPHA_MAXIMIZED = 5;
-        Engine._ALPHA_ONEONE = 6;
-        Engine._ALPHA_PREMULTIPLIED = 7;
-        Engine._ALPHA_PREMULTIPLIED_PORTERDUFF = 8;
-        Engine._ALPHA_INTERPOLATE = 9;
-        Engine._ALPHA_SCREENMODE = 10;
-        Engine._DELAYLOADSTATE_NONE = 0;
-        Engine._DELAYLOADSTATE_LOADED = 1;
-        Engine._DELAYLOADSTATE_LOADING = 2;
-        Engine._DELAYLOADSTATE_NOTLOADED = 4;
-        Engine._TEXTUREFORMAT_ALPHA = 0;
-        Engine._TEXTUREFORMAT_LUMINANCE = 1;
-        Engine._TEXTUREFORMAT_LUMINANCE_ALPHA = 2;
-        Engine._TEXTUREFORMAT_RGB = 4;
-        Engine._TEXTUREFORMAT_RGBA = 5;
-        Engine._TEXTUREFORMAT_R = 6;
-        Engine._TEXTUREFORMAT_RG = 7;
-        Engine._TEXTURETYPE_UNSIGNED_INT = 0;
-        Engine._TEXTURETYPE_FLOAT = 1;
-        Engine._TEXTURETYPE_HALF_FLOAT = 2;
+        /** Defines that alpha blending is disabled */
+        Engine.ALPHA_DISABLE = 0;
+        /** Defines that alpha blending to SRC ALPHA * SRC + DEST */
+        Engine.ALPHA_ADD = 1;
+        /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
+        Engine.ALPHA_COMBINE = 2;
+        /** Defines that alpha blending to DEST - SRC * DEST */
+        Engine.ALPHA_SUBTRACT = 3;
+        /** Defines that alpha blending to SRC * DEST */
+        Engine.ALPHA_MULTIPLY = 4;
+        /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */
+        Engine.ALPHA_MAXIMIZED = 5;
+        /** Defines that alpha blending to SRC + DEST */
+        Engine.ALPHA_ONEONE = 6;
+        /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */
+        Engine.ALPHA_PREMULTIPLIED = 7;
+        /**
+         * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
+         * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
+         */
+        Engine.ALPHA_PREMULTIPLIED_PORTERDUFF = 8;
+        /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */
+        Engine.ALPHA_INTERPOLATE = 9;
+        /**
+         * Defines that alpha blending to SRC + (1 - SRC) * DEST
+         * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
+         */
+        Engine.ALPHA_SCREENMODE = 10;
+        /** Defines that the ressource is not delayed*/
+        Engine.DELAYLOADSTATE_NONE = 0;
+        /** Defines that the ressource was successfully delay loaded */
+        Engine.DELAYLOADSTATE_LOADED = 1;
+        /** Defines that the ressource is currently delay loading */
+        Engine.DELAYLOADSTATE_LOADING = 2;
+        /** Defines that the ressource is delayed and has not started loading */
+        Engine.DELAYLOADSTATE_NOTLOADED = 4;
         // Depht or Stencil test Constants.
-        Engine._NEVER = 0x0200; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn.
-        Engine._ALWAYS = 0x0207; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn.
-        Engine._LESS = 0x0201; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value.
-        Engine._EQUAL = 0x0202; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value.
-        Engine._LEQUAL = 0x0203; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value.
-        Engine._GREATER = 0x0204; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value.
-        Engine._GEQUAL = 0x0206; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value.
-        Engine._NOTEQUAL = 0x0205; //  Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value.
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
+        Engine.NEVER = 0x0200;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
+        Engine.ALWAYS = 0x0207;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
+        Engine.LESS = 0x0201;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
+        Engine.EQUAL = 0x0202;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
+        Engine.LEQUAL = 0x0203;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
+        Engine.GREATER = 0x0204;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
+        Engine.GEQUAL = 0x0206;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
+        Engine.NOTEQUAL = 0x0205;
         // Stencil Actions Constants.
-        Engine._KEEP = 0x1E00;
-        Engine._REPLACE = 0x1E01;
-        Engine._INCR = 0x1E02;
-        Engine._DECR = 0x1E03;
-        Engine._INVERT = 0x150A;
-        Engine._INCR_WRAP = 0x8507;
-        Engine._DECR_WRAP = 0x8508;
+        /** Passed to stencilOperation to specify that stencil value must be kept */
+        Engine.KEEP = 0x1E00;
+        /** Passed to stencilOperation to specify that stencil value must be replaced */
+        Engine.REPLACE = 0x1E01;
+        /** Passed to stencilOperation to specify that stencil value must be incremented */
+        Engine.INCR = 0x1E02;
+        /** Passed to stencilOperation to specify that stencil value must be decremented */
+        Engine.DECR = 0x1E03;
+        /** Passed to stencilOperation to specify that stencil value must be inverted */
+        Engine.INVERT = 0x150A;
+        /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
+        Engine.INCR_WRAP = 0x8507;
+        /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
+        Engine.DECR_WRAP = 0x8508;
+        /** Texture is not repeating outside of 0..1 UVs */
+        Engine.TEXTURE_CLAMP_ADDRESSMODE = 0;
+        /** Texture is repeating outside of 0..1 UVs */
+        Engine.TEXTURE_WRAP_ADDRESSMODE = 1;
+        /** Texture is repeating and mirrored */
+        Engine.TEXTURE_MIRROR_ADDRESSMODE = 2;
+        /** ALPHA */
+        Engine.TEXTUREFORMAT_ALPHA = 0;
+        /** LUMINANCE */
+        Engine.TEXTUREFORMAT_LUMINANCE = 1;
+        /** LUMINANCE_ALPHA */
+        Engine.TEXTUREFORMAT_LUMINANCE_ALPHA = 2;
+        /** RGB */
+        Engine.TEXTUREFORMAT_RGB = 4;
+        /** RGBA */
+        Engine.TEXTUREFORMAT_RGBA = 5;
+        /** R */
+        Engine.TEXTUREFORMAT_R = 6;
+        /** RG */
+        Engine.TEXTUREFORMAT_RG = 7;
+        /** UNSIGNED_INT */
+        Engine.TEXTURETYPE_UNSIGNED_INT = 0;
+        /** FLOAT */
+        Engine.TEXTURETYPE_FLOAT = 1;
+        /** HALF_FLOAT */
+        Engine.TEXTURETYPE_HALF_FLOAT = 2;
+        /** nearest is mag = nearest and min = nearest and mip = linear */
+        Engine.TEXTURE_NEAREST_SAMPLINGMODE = 1;
+        /** Bilinear is mag = linear and min = linear and mip = nearest */
+        Engine.TEXTURE_BILINEAR_SAMPLINGMODE = 2;
+        /** Trilinear is mag = linear and min = linear and mip = linear */
+        Engine.TEXTURE_TRILINEAR_SAMPLINGMODE = 3;
+        /** nearest is mag = nearest and min = nearest and mip = linear */
+        Engine.TEXTURE_NEAREST_NEAREST_MIPLINEAR = 1;
+        /** Bilinear is mag = linear and min = linear and mip = nearest */
+        Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST = 2;
+        /** Trilinear is mag = linear and min = linear and mip = linear */
+        Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;
+        /** mag = nearest and min = nearest and mip = nearest */
+        Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;
+        /** mag = nearest and min = linear and mip = nearest */
+        Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;
+        /** mag = nearest and min = linear and mip = linear */
+        Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;
+        /** mag = nearest and min = linear and mip = none */
+        Engine.TEXTURE_NEAREST_LINEAR = 7;
+        /** mag = nearest and min = nearest and mip = none */
+        Engine.TEXTURE_NEAREST_NEAREST = 8;
+        /** mag = linear and min = nearest and mip = nearest */
+        Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;
+        /** mag = linear and min = nearest and mip = linear */
+        Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;
+        /** mag = linear and min = linear and mip = none */
+        Engine.TEXTURE_LINEAR_LINEAR = 11;
+        /** mag = linear and min = nearest and mip = none */
+        Engine.TEXTURE_LINEAR_NEAREST = 12;
+        /** Explicit coordinates mode */
+        Engine.TEXTURE_EXPLICIT_MODE = 0;
+        /** Spherical coordinates mode */
+        Engine.TEXTURE_SPHERICAL_MODE = 1;
+        /** Planar coordinates mode */
+        Engine.TEXTURE_PLANAR_MODE = 2;
+        /** Cubic coordinates mode */
+        Engine.TEXTURE_CUBIC_MODE = 3;
+        /** Projection coordinates mode */
+        Engine.TEXTURE_PROJECTION_MODE = 4;
+        /** Skybox coordinates mode */
+        Engine.TEXTURE_SKYBOX_MODE = 5;
+        /** Inverse Cubic coordinates mode */
+        Engine.TEXTURE_INVCUBIC_MODE = 6;
+        /** Equirectangular coordinates mode */
+        Engine.TEXTURE_EQUIRECTANGULAR_MODE = 7;
+        /** Equirectangular Fixed coordinates mode */
+        Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;
+        /** Equirectangular Fixed Mirrored coordinates mode */
+        Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;
         // Texture rescaling mode
-        Engine._SCALEMODE_FLOOR = 1;
-        Engine._SCALEMODE_NEAREST = 2;
-        Engine._SCALEMODE_CEILING = 3;
+        /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
+        Engine.SCALEMODE_FLOOR = 1;
+        /** Defines that texture rescaling will look for the nearest power of 2 size */
+        Engine.SCALEMODE_NEAREST = 2;
+        /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
+        Engine.SCALEMODE_CEILING = 3;
         // Updatable statics so stick with vars here
         /**
          * Gets or sets the epsilon value used by collision engine
@@ -31413,34 +31162,34 @@ var BABYLON;
             return new Texture(name, scene, noMipmap, invertY, samplingMode, onLoad, onError, buffer, deleteBuffer, format);
         };
         // Constants
-        Texture.NEAREST_SAMPLINGMODE = 1;
-        Texture.NEAREST_NEAREST_MIPLINEAR = 1; // nearest is mag = nearest and min = nearest and mip = linear
-        Texture.BILINEAR_SAMPLINGMODE = 2;
-        Texture.LINEAR_LINEAR_MIPNEAREST = 2; // Bilinear is mag = linear and min = linear and mip = nearest
-        Texture.TRILINEAR_SAMPLINGMODE = 3;
-        Texture.LINEAR_LINEAR_MIPLINEAR = 3; // Trilinear is mag = linear and min = linear and mip = linear
-        Texture.NEAREST_NEAREST_MIPNEAREST = 4;
-        Texture.NEAREST_LINEAR_MIPNEAREST = 5;
-        Texture.NEAREST_LINEAR_MIPLINEAR = 6;
-        Texture.NEAREST_LINEAR = 7;
-        Texture.NEAREST_NEAREST = 8;
-        Texture.LINEAR_NEAREST_MIPNEAREST = 9;
-        Texture.LINEAR_NEAREST_MIPLINEAR = 10;
-        Texture.LINEAR_LINEAR = 11;
-        Texture.LINEAR_NEAREST = 12;
-        Texture.EXPLICIT_MODE = 0;
-        Texture.SPHERICAL_MODE = 1;
-        Texture.PLANAR_MODE = 2;
-        Texture.CUBIC_MODE = 3;
-        Texture.PROJECTION_MODE = 4;
-        Texture.SKYBOX_MODE = 5;
-        Texture.INVCUBIC_MODE = 6;
-        Texture.EQUIRECTANGULAR_MODE = 7;
-        Texture.FIXED_EQUIRECTANGULAR_MODE = 8;
-        Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;
-        Texture.CLAMP_ADDRESSMODE = 0;
-        Texture.WRAP_ADDRESSMODE = 1;
-        Texture.MIRROR_ADDRESSMODE = 2;
+        Texture.NEAREST_SAMPLINGMODE = BABYLON.Engine.TEXTURE_NEAREST_SAMPLINGMODE;
+        Texture.NEAREST_NEAREST_MIPLINEAR = BABYLON.Engine.TEXTURE_NEAREST_NEAREST_MIPLINEAR; // nearest is mag = nearest and min = nearest and mip = linear
+        Texture.BILINEAR_SAMPLINGMODE = BABYLON.Engine.TEXTURE_BILINEAR_SAMPLINGMODE;
+        Texture.LINEAR_LINEAR_MIPNEAREST = BABYLON.Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST; // Bilinear is mag = linear and min = linear and mip = nearest
+        Texture.TRILINEAR_SAMPLINGMODE = BABYLON.Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
+        Texture.LINEAR_LINEAR_MIPLINEAR = BABYLON.Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR; // Trilinear is mag = linear and min = linear and mip = linear
+        Texture.NEAREST_NEAREST_MIPNEAREST = BABYLON.Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST;
+        Texture.NEAREST_LINEAR_MIPNEAREST = BABYLON.Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST;
+        Texture.NEAREST_LINEAR_MIPLINEAR = BABYLON.Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR;
+        Texture.NEAREST_LINEAR = BABYLON.Engine.TEXTURE_NEAREST_LINEAR;
+        Texture.NEAREST_NEAREST = BABYLON.Engine.TEXTURE_NEAREST_NEAREST;
+        Texture.LINEAR_NEAREST_MIPNEAREST = BABYLON.Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST;
+        Texture.LINEAR_NEAREST_MIPLINEAR = BABYLON.Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR;
+        Texture.LINEAR_LINEAR = BABYLON.Engine.TEXTURE_LINEAR_LINEAR;
+        Texture.LINEAR_NEAREST = BABYLON.Engine.TEXTURE_LINEAR_NEAREST;
+        Texture.EXPLICIT_MODE = BABYLON.Engine.TEXTURE_EXPLICIT_MODE;
+        Texture.SPHERICAL_MODE = BABYLON.Engine.TEXTURE_SPHERICAL_MODE;
+        Texture.PLANAR_MODE = BABYLON.Engine.TEXTURE_PLANAR_MODE;
+        Texture.CUBIC_MODE = BABYLON.Engine.TEXTURE_CUBIC_MODE;
+        Texture.PROJECTION_MODE = BABYLON.Engine.TEXTURE_PROJECTION_MODE;
+        Texture.SKYBOX_MODE = BABYLON.Engine.TEXTURE_SKYBOX_MODE;
+        Texture.INVCUBIC_MODE = BABYLON.Engine.TEXTURE_INVCUBIC_MODE;
+        Texture.EQUIRECTANGULAR_MODE = BABYLON.Engine.TEXTURE_EQUIRECTANGULAR_MODE;
+        Texture.FIXED_EQUIRECTANGULAR_MODE = BABYLON.Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE;
+        Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE = BABYLON.Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE;
+        Texture.CLAMP_ADDRESSMODE = BABYLON.Engine.TEXTURE_CLAMP_ADDRESSMODE;
+        Texture.WRAP_ADDRESSMODE = BABYLON.Engine.TEXTURE_WRAP_ADDRESSMODE;
+        Texture.MIRROR_ADDRESSMODE = BABYLON.Engine.TEXTURE_MIRROR_ADDRESSMODE;
         /**
          * Gets or sets a boolean which defines if the texture url must be build from the serialized URL instead of just using the name and loading them side by side with the scene file
          */
@@ -101442,6 +101191,14 @@ var BABYLON;
         NullEngine.prototype.updateDynamicTexture = function (texture, canvas, invertY, premulAlpha, format) {
             if (premulAlpha === void 0) { premulAlpha = false; }
         };
+        /**
+         * Get the current error code of the webGL context
+         * @returns the error code
+         * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError
+         */
+        NullEngine.prototype.getError = function () {
+            return 0;
+        };
         NullEngine.prototype.updateDynamicIndexBuffer = function (indexBuffer, indices, offset) {
             if (offset === void 0) { offset = 0; }
         };

Разлика између датотеке није приказан због своје велике величине
+ 52 - 52
dist/preview release/babylon.worker.js


+ 223 - 466
dist/preview release/es6.js

@@ -11132,7 +11132,7 @@ var BABYLON;
         var magFilter = gl.NEAREST;
         var minFilter = gl.NEAREST;
         switch (samplingMode) {
-            case BABYLON.Texture.BILINEAR_SAMPLINGMODE:
+            case Engine.TEXTURE_BILINEAR_SAMPLINGMODE:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_NEAREST;
@@ -11141,7 +11141,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.TRILINEAR_SAMPLINGMODE:
+            case Engine.TEXTURE_TRILINEAR_SAMPLINGMODE:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_LINEAR;
@@ -11150,7 +11150,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_SAMPLINGMODE:
+            case Engine.TEXTURE_NEAREST_SAMPLINGMODE:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_LINEAR;
@@ -11159,7 +11159,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_NEAREST_MIPNEAREST:
+            case Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_NEAREST;
@@ -11168,7 +11168,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR_MIPNEAREST:
+            case Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_NEAREST;
@@ -11177,7 +11177,7 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR_MIPLINEAR:
+            case Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR:
                 magFilter = gl.NEAREST;
                 if (generateMipMaps) {
                     minFilter = gl.LINEAR_MIPMAP_LINEAR;
@@ -11186,15 +11186,15 @@ var BABYLON;
                     minFilter = gl.LINEAR;
                 }
                 break;
-            case BABYLON.Texture.NEAREST_LINEAR:
+            case Engine.TEXTURE_NEAREST_LINEAR:
                 magFilter = gl.NEAREST;
                 minFilter = gl.LINEAR;
                 break;
-            case BABYLON.Texture.NEAREST_NEAREST:
+            case Engine.TEXTURE_NEAREST_NEAREST:
                 magFilter = gl.NEAREST;
                 minFilter = gl.NEAREST;
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST_MIPNEAREST:
+            case Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_NEAREST;
@@ -11203,7 +11203,7 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST_MIPLINEAR:
+            case Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR:
                 magFilter = gl.LINEAR;
                 if (generateMipMaps) {
                     minFilter = gl.NEAREST_MIPMAP_LINEAR;
@@ -11212,11 +11212,11 @@ var BABYLON;
                     minFilter = gl.NEAREST;
                 }
                 break;
-            case BABYLON.Texture.LINEAR_LINEAR:
+            case Engine.TEXTURE_LINEAR_LINEAR:
                 magFilter = gl.LINEAR;
                 minFilter = gl.LINEAR;
                 break;
-            case BABYLON.Texture.LINEAR_NEAREST:
+            case Engine.TEXTURE_LINEAR_NEAREST:
                 magFilter = gl.LINEAR;
                 minFilter = gl.NEAREST;
                 break;
@@ -11795,368 +11795,12 @@ var BABYLON;
                 }
             }
         };
-        Object.defineProperty(Engine, "NEVER", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
-            get: function () {
-                return Engine._NEVER;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALWAYS", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
-            get: function () {
-                return Engine._ALWAYS;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "LESS", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
-            get: function () {
-                return Engine._LESS;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "EQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
-            get: function () {
-                return Engine._EQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "LEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
-            get: function () {
-                return Engine._LEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "GREATER", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
-            get: function () {
-                return Engine._GREATER;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "GEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
-            get: function () {
-                return Engine._GEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "NOTEQUAL", {
-            /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
-            get: function () {
-                return Engine._NOTEQUAL;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "KEEP", {
-            /** Passed to stencilOperation to specify that stencil value must be kept */
-            get: function () {
-                return Engine._KEEP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "REPLACE", {
-            /** Passed to stencilOperation to specify that stencil value must be replaced */
-            get: function () {
-                return Engine._REPLACE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INCR", {
-            /** Passed to stencilOperation to specify that stencil value must be incremented */
-            get: function () {
-                return Engine._INCR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DECR", {
-            /** Passed to stencilOperation to specify that stencil value must be decremented */
-            get: function () {
-                return Engine._DECR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INVERT", {
-            /** Passed to stencilOperation to specify that stencil value must be inverted */
-            get: function () {
-                return Engine._INVERT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "INCR_WRAP", {
-            /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
-            get: function () {
-                return Engine._INCR_WRAP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DECR_WRAP", {
-            /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
-            get: function () {
-                return Engine._DECR_WRAP;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_DISABLE", {
-            // Alpha
-            /** Defines that alpha blending is disabled */
-            get: function () {
-                return Engine._ALPHA_DISABLE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_ONEONE", {
-            /** Defines that alpha blending to SRC + DEST */
-            get: function () {
-                return Engine._ALPHA_ONEONE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_ADD", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + DEST */
-            get: function () {
-                return Engine._ALPHA_ADD;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_COMBINE", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
-            get: function () {
-                return Engine._ALPHA_COMBINE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_SUBTRACT", {
-            /** Defines that alpha blending to DEST - SRC * DEST */
-            get: function () {
-                return Engine._ALPHA_SUBTRACT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_MULTIPLY", {
-            /** Defines that alpha blending to SRC * DEST */
-            get: function () {
-                return Engine._ALPHA_MULTIPLY;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_MAXIMIZED", {
-            /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */
-            get: function () {
-                return Engine._ALPHA_MAXIMIZED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_PREMULTIPLIED", {
-            /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */
-            get: function () {
-                return Engine._ALPHA_PREMULTIPLIED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_PREMULTIPLIED_PORTERDUFF", {
-            /**
-             * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
-             * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
-             */
-            get: function () {
-                return Engine._ALPHA_PREMULTIPLIED_PORTERDUFF;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_INTERPOLATE", {
-            /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */
-            get: function () {
-                return Engine._ALPHA_INTERPOLATE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "ALPHA_SCREENMODE", {
-            /**
-             * Defines that alpha blending to SRC + (1 - SRC) * DEST
-             * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
-             */
-            get: function () {
-                return Engine._ALPHA_SCREENMODE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_NONE", {
-            // Delays
-            /** Defines that the ressource is not delayed*/
-            get: function () {
-                return Engine._DELAYLOADSTATE_NONE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_LOADED", {
-            /** Defines that the ressource was successfully delay loaded */
-            get: function () {
-                return Engine._DELAYLOADSTATE_LOADED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_LOADING", {
-            /** Defines that the ressource is currently delay loading */
-            get: function () {
-                return Engine._DELAYLOADSTATE_LOADING;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "DELAYLOADSTATE_NOTLOADED", {
-            /** Defines that the ressource is delayed and has not started loading */
-            get: function () {
-                return Engine._DELAYLOADSTATE_NOTLOADED;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_ALPHA", {
-            /** ALPHA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_ALPHA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_LUMINANCE", {
-            /** LUMINANCE */
-            get: function () {
-                return Engine._TEXTUREFORMAT_LUMINANCE;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_R", {
-            /**
-             * R
-             */
-            get: function () {
-                return Engine._TEXTUREFORMAT_R;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RG", {
-            /**
-             * RG
-             */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RG;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_LUMINANCE_ALPHA", {
-            /** LUMINANCE_ALPHA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_LUMINANCE_ALPHA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RGB", {
-            /** RGB */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RGB;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTUREFORMAT_RGBA", {
-            /** RGBA */
-            get: function () {
-                return Engine._TEXTUREFORMAT_RGBA;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_UNSIGNED_INT", {
-            /** UNSIGNED_INT */
-            get: function () {
-                return Engine._TEXTURETYPE_UNSIGNED_INT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_FLOAT", {
-            /** FLOAT */
-            get: function () {
-                return Engine._TEXTURETYPE_FLOAT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "TEXTURETYPE_HALF_FLOAT", {
-            /** HALF_FLOAT */
-            get: function () {
-                return Engine._TEXTURETYPE_HALF_FLOAT;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_FLOOR", {
-            /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_FLOOR;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_NEAREST", {
-            /** Defines that texture rescaling will look for the nearest power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_NEAREST;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Engine, "SCALEMODE_CEILING", {
-            /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
-            get: function () {
-                return Engine._SCALEMODE_CEILING;
-            },
-            enumerable: true,
-            configurable: true
-        });
         Object.defineProperty(Engine, "Version", {
             /**
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.9";
+                return "3.3.0-alpha.10";
             },
             enumerable: true,
             configurable: true
@@ -12255,7 +11899,7 @@ var BABYLON;
              */
             get: function () {
                 if (!this._emptyTexture) {
-                    this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyTexture;
             },
@@ -12268,7 +11912,7 @@ var BABYLON;
              */
             get: function () {
                 if (!this._emptyTexture3D) {
-                    this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, Engine.TEXTUREFORMAT_RGBA, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyTexture3D;
             },
@@ -12283,7 +11927,7 @@ var BABYLON;
                 if (!this._emptyCubeTexture) {
                     var faceData = new Uint8Array(4);
                     var cubeData = [faceData, faceData, faceData, faceData, faceData, faceData];
-                    this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, Engine.TEXTUREFORMAT_RGBA, Engine.TEXTURETYPE_UNSIGNED_INT, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+                    this._emptyCubeTexture = this.createRawCubeTexture(cubeData, 1, Engine.TEXTUREFORMAT_RGBA, Engine.TEXTURETYPE_UNSIGNED_INT, false, false, Engine.TEXTURE_NEAREST_SAMPLINGMODE);
                 }
                 return this._emptyCubeTexture;
             },
@@ -14725,7 +14369,7 @@ var BABYLON;
          */
         Engine.prototype.createTexture = function (urlArg, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, fallback, format) {
             var _this = this;
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             if (onLoad === void 0) { onLoad = null; }
             if (onError === void 0) { onError = null; }
             if (buffer === void 0) { buffer = null; }
@@ -14903,12 +14547,12 @@ var BABYLON;
             }, {
                 generateMipMaps: false,
                 type: Engine.TEXTURETYPE_UNSIGNED_INT,
-                samplingMode: BABYLON.Texture.BILINEAR_SAMPLINGMODE,
+                samplingMode: Engine.TEXTURE_BILINEAR_SAMPLINGMODE,
                 generateDepthBuffer: false,
                 generateStencilBuffer: false
             });
             if (!this._rescalePostProcess) {
-                this._rescalePostProcess = new BABYLON.PassPostProcess("rescale", 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, this, false, Engine.TEXTURETYPE_UNSIGNED_INT);
+                this._rescalePostProcess = new BABYLON.PassPostProcess("rescale", 1, null, Engine.TEXTURE_BILINEAR_SAMPLINGMODE, this, false, Engine.TEXTURETYPE_UNSIGNED_INT);
             }
             this._rescalePostProcess.getEffect().executeWhenCompiled(function () {
                 _this._rescalePostProcess.onApply = function (effect) {
@@ -15209,7 +14853,7 @@ var BABYLON;
             internalTexture.generateMipMaps = false;
             internalTexture._generateDepthBuffer = true;
             internalTexture._generateStencilBuffer = generateStencil;
-            internalTexture.samplingMode = bilinearFiltering ? BABYLON.Texture.BILINEAR_SAMPLINGMODE : BABYLON.Texture.NEAREST_SAMPLINGMODE;
+            internalTexture.samplingMode = bilinearFiltering ? Engine.TEXTURE_BILINEAR_SAMPLINGMODE : Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             internalTexture.type = Engine.TEXTURETYPE_UNSIGNED_INT;
             internalTexture._comparisonFunction = comparisonFunction;
             var gl = this._gl;
@@ -15354,7 +14998,7 @@ var BABYLON;
                 fullOptions.generateDepthBuffer = options.generateDepthBuffer === undefined ? true : options.generateDepthBuffer;
                 fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && options.generateStencilBuffer;
                 fullOptions.type = options.type === undefined ? Engine.TEXTURETYPE_UNSIGNED_INT : options.type;
-                fullOptions.samplingMode = options.samplingMode === undefined ? BABYLON.Texture.TRILINEAR_SAMPLINGMODE : options.samplingMode;
+                fullOptions.samplingMode = options.samplingMode === undefined ? Engine.TEXTURE_TRILINEAR_SAMPLINGMODE : options.samplingMode;
                 fullOptions.format = options.format === undefined ? Engine.TEXTUREFORMAT_RGBA : options.format;
             }
             else {
@@ -15362,16 +15006,16 @@ var BABYLON;
                 fullOptions.generateDepthBuffer = true;
                 fullOptions.generateStencilBuffer = false;
                 fullOptions.type = Engine.TEXTURETYPE_UNSIGNED_INT;
-                fullOptions.samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
                 fullOptions.format = Engine.TEXTUREFORMAT_RGBA;
             }
             if (fullOptions.type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                 // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             else if (fullOptions.type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                 // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             var gl = this._gl;
             var texture = new BABYLON.InternalTexture(this, BABYLON.InternalTexture.DATASOURCE_RENDERTARGET);
@@ -15431,7 +15075,7 @@ var BABYLON;
             var generateDepthTexture = false;
             var textureCount = 1;
             var defaultType = Engine.TEXTURETYPE_UNSIGNED_INT;
-            var defaultSamplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE;
+            var defaultSamplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
             var types = new Array();
             var samplingModes = new Array();
             if (options !== undefined) {
@@ -15461,11 +15105,11 @@ var BABYLON;
                 var type = types[i] || defaultType;
                 if (type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                     // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                    samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                    samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
                 }
                 else if (type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                     // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                    samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                    samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
                 }
                 var filters = getSamplingParameters(samplingMode, generateMipMaps, gl);
                 if (type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloat) {
@@ -15714,15 +15358,15 @@ var BABYLON;
          * @returns a new render target cube texture stored in an InternalTexture
          */
         Engine.prototype.createRenderTargetCubeTexture = function (size, options) {
-            var fullOptions = __assign({ generateMipMaps: true, generateDepthBuffer: true, generateStencilBuffer: false, type: Engine.TEXTURETYPE_UNSIGNED_INT, samplingMode: BABYLON.Texture.TRILINEAR_SAMPLINGMODE, format: Engine.TEXTUREFORMAT_RGBA }, options);
+            var fullOptions = __assign({ generateMipMaps: true, generateDepthBuffer: true, generateStencilBuffer: false, type: Engine.TEXTURETYPE_UNSIGNED_INT, samplingMode: Engine.TEXTURE_TRILINEAR_SAMPLINGMODE, format: Engine.TEXTUREFORMAT_RGBA }, options);
             fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;
             if (fullOptions.type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
                 // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             else if (fullOptions.type === Engine.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {
                 // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE
-                fullOptions.samplingMode = BABYLON.Texture.NEAREST_SAMPLINGMODE;
+                fullOptions.samplingMode = Engine.TEXTURE_NEAREST_SAMPLINGMODE;
             }
             var gl = this._gl;
             var texture = new BABYLON.InternalTexture(this, BABYLON.InternalTexture.DATASOURCE_RENDERTARGET);
@@ -16187,7 +15831,7 @@ var BABYLON;
             var _this = this;
             if (onLoad === void 0) { onLoad = null; }
             if (onError === void 0) { onError = null; }
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             if (invertY === void 0) { invertY = false; }
             var gl = this._gl;
             var texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode);
@@ -16352,7 +15996,7 @@ var BABYLON;
         };
         Engine.prototype._prepareWebGLTexture = function (texture, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {
             var _this = this;
-            if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
+            if (samplingMode === void 0) { samplingMode = Engine.TEXTURE_TRILINEAR_SAMPLINGMODE; }
             var maxTextureSize = this.getCaps().maxTextureSize;
             var potWidth = Math.min(maxTextureSize, this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(width, maxTextureSize) : width);
             var potHeight = Math.min(maxTextureSize, this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(height, maxTextureSize) : height);
@@ -16674,11 +16318,11 @@ var BABYLON;
         };
         Engine.prototype._getTextureWrapMode = function (mode) {
             switch (mode) {
-                case BABYLON.Texture.WRAP_ADDRESSMODE:
+                case Engine.TEXTURE_WRAP_ADDRESSMODE:
                     return this._gl.REPEAT;
-                case BABYLON.Texture.CLAMP_ADDRESSMODE:
+                case Engine.TEXTURE_CLAMP_ADDRESSMODE:
                     return this._gl.CLAMP_TO_EDGE;
-                case BABYLON.Texture.MIRROR_ADDRESSMODE:
+                case Engine.TEXTURE_MIRROR_ADDRESSMODE:
                     return this._gl.MIRRORED_REPEAT;
             }
             return this._gl.REPEAT;
@@ -16760,7 +16404,7 @@ var BABYLON;
                 if (internalTexture._cachedCoordinatesMode !== texture.coordinatesMode) {
                     internalTexture._cachedCoordinatesMode = texture.coordinatesMode;
                     // CUBIC_MODE and SKYBOX_MODE both require CLAMP_TO_EDGE.  All other modes use REPEAT.
-                    var textureWrapMode = (texture.coordinatesMode !== BABYLON.Texture.CUBIC_MODE && texture.coordinatesMode !== BABYLON.Texture.SKYBOX_MODE) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;
+                    var textureWrapMode = (texture.coordinatesMode !== Engine.TEXTURE_CUBIC_MODE && texture.coordinatesMode !== Engine.TEXTURE_SKYBOX_MODE) ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;
                     this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_S, textureWrapMode, internalTexture);
                     this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP, this._gl.TEXTURE_WRAP_T, textureWrapMode);
                 }
@@ -16811,9 +16455,9 @@ var BABYLON;
             }
             var anisotropicFilterExtension = this._caps.textureAnisotropicFilterExtension;
             var value = texture.anisotropicFilteringLevel;
-            if (internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR_MIPNEAREST
-                && internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR_MIPLINEAR
-                && internalTexture.samplingMode !== BABYLON.Texture.LINEAR_LINEAR) {
+            if (internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST
+                && internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR
+                && internalTexture.samplingMode !== Engine.TEXTURE_LINEAR_LINEAR) {
                 value = 1; // Forcing the anisotropic to 1 because else webgl will force filters to linear
             }
             if (anisotropicFilterExtension && internalTexture._cachedAnisotropicFilteringLevel !== value) {
@@ -17666,52 +17310,157 @@ var BABYLON;
         /** Gets the list of created engines */
         Engine.Instances = new Array();
         // Const statics
-        Engine._ALPHA_DISABLE = 0;
-        Engine._ALPHA_ADD = 1;
-        Engine._ALPHA_COMBINE = 2;
-        Engine._ALPHA_SUBTRACT = 3;
-        Engine._ALPHA_MULTIPLY = 4;
-        Engine._ALPHA_MAXIMIZED = 5;
-        Engine._ALPHA_ONEONE = 6;
-        Engine._ALPHA_PREMULTIPLIED = 7;
-        Engine._ALPHA_PREMULTIPLIED_PORTERDUFF = 8;
-        Engine._ALPHA_INTERPOLATE = 9;
-        Engine._ALPHA_SCREENMODE = 10;
-        Engine._DELAYLOADSTATE_NONE = 0;
-        Engine._DELAYLOADSTATE_LOADED = 1;
-        Engine._DELAYLOADSTATE_LOADING = 2;
-        Engine._DELAYLOADSTATE_NOTLOADED = 4;
-        Engine._TEXTUREFORMAT_ALPHA = 0;
-        Engine._TEXTUREFORMAT_LUMINANCE = 1;
-        Engine._TEXTUREFORMAT_LUMINANCE_ALPHA = 2;
-        Engine._TEXTUREFORMAT_RGB = 4;
-        Engine._TEXTUREFORMAT_RGBA = 5;
-        Engine._TEXTUREFORMAT_R = 6;
-        Engine._TEXTUREFORMAT_RG = 7;
-        Engine._TEXTURETYPE_UNSIGNED_INT = 0;
-        Engine._TEXTURETYPE_FLOAT = 1;
-        Engine._TEXTURETYPE_HALF_FLOAT = 2;
+        /** Defines that alpha blending is disabled */
+        Engine.ALPHA_DISABLE = 0;
+        /** Defines that alpha blending to SRC ALPHA * SRC + DEST */
+        Engine.ALPHA_ADD = 1;
+        /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
+        Engine.ALPHA_COMBINE = 2;
+        /** Defines that alpha blending to DEST - SRC * DEST */
+        Engine.ALPHA_SUBTRACT = 3;
+        /** Defines that alpha blending to SRC * DEST */
+        Engine.ALPHA_MULTIPLY = 4;
+        /** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */
+        Engine.ALPHA_MAXIMIZED = 5;
+        /** Defines that alpha blending to SRC + DEST */
+        Engine.ALPHA_ONEONE = 6;
+        /** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */
+        Engine.ALPHA_PREMULTIPLIED = 7;
+        /**
+         * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
+         * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
+         */
+        Engine.ALPHA_PREMULTIPLIED_PORTERDUFF = 8;
+        /** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */
+        Engine.ALPHA_INTERPOLATE = 9;
+        /**
+         * Defines that alpha blending to SRC + (1 - SRC) * DEST
+         * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
+         */
+        Engine.ALPHA_SCREENMODE = 10;
+        /** Defines that the ressource is not delayed*/
+        Engine.DELAYLOADSTATE_NONE = 0;
+        /** Defines that the ressource was successfully delay loaded */
+        Engine.DELAYLOADSTATE_LOADED = 1;
+        /** Defines that the ressource is currently delay loading */
+        Engine.DELAYLOADSTATE_LOADING = 2;
+        /** Defines that the ressource is delayed and has not started loading */
+        Engine.DELAYLOADSTATE_NOTLOADED = 4;
         // Depht or Stencil test Constants.
-        Engine._NEVER = 0x0200; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn.
-        Engine._ALWAYS = 0x0207; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn.
-        Engine._LESS = 0x0201; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value.
-        Engine._EQUAL = 0x0202; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value.
-        Engine._LEQUAL = 0x0203; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value.
-        Engine._GREATER = 0x0204; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value.
-        Engine._GEQUAL = 0x0206; //	Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value.
-        Engine._NOTEQUAL = 0x0205; //  Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value.
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
+        Engine.NEVER = 0x0200;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
+        Engine.ALWAYS = 0x0207;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
+        Engine.LESS = 0x0201;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
+        Engine.EQUAL = 0x0202;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
+        Engine.LEQUAL = 0x0203;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
+        Engine.GREATER = 0x0204;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
+        Engine.GEQUAL = 0x0206;
+        /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
+        Engine.NOTEQUAL = 0x0205;
         // Stencil Actions Constants.
-        Engine._KEEP = 0x1E00;
-        Engine._REPLACE = 0x1E01;
-        Engine._INCR = 0x1E02;
-        Engine._DECR = 0x1E03;
-        Engine._INVERT = 0x150A;
-        Engine._INCR_WRAP = 0x8507;
-        Engine._DECR_WRAP = 0x8508;
+        /** Passed to stencilOperation to specify that stencil value must be kept */
+        Engine.KEEP = 0x1E00;
+        /** Passed to stencilOperation to specify that stencil value must be replaced */
+        Engine.REPLACE = 0x1E01;
+        /** Passed to stencilOperation to specify that stencil value must be incremented */
+        Engine.INCR = 0x1E02;
+        /** Passed to stencilOperation to specify that stencil value must be decremented */
+        Engine.DECR = 0x1E03;
+        /** Passed to stencilOperation to specify that stencil value must be inverted */
+        Engine.INVERT = 0x150A;
+        /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
+        Engine.INCR_WRAP = 0x8507;
+        /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
+        Engine.DECR_WRAP = 0x8508;
+        /** Texture is not repeating outside of 0..1 UVs */
+        Engine.TEXTURE_CLAMP_ADDRESSMODE = 0;
+        /** Texture is repeating outside of 0..1 UVs */
+        Engine.TEXTURE_WRAP_ADDRESSMODE = 1;
+        /** Texture is repeating and mirrored */
+        Engine.TEXTURE_MIRROR_ADDRESSMODE = 2;
+        /** ALPHA */
+        Engine.TEXTUREFORMAT_ALPHA = 0;
+        /** LUMINANCE */
+        Engine.TEXTUREFORMAT_LUMINANCE = 1;
+        /** LUMINANCE_ALPHA */
+        Engine.TEXTUREFORMAT_LUMINANCE_ALPHA = 2;
+        /** RGB */
+        Engine.TEXTUREFORMAT_RGB = 4;
+        /** RGBA */
+        Engine.TEXTUREFORMAT_RGBA = 5;
+        /** R */
+        Engine.TEXTUREFORMAT_R = 6;
+        /** RG */
+        Engine.TEXTUREFORMAT_RG = 7;
+        /** UNSIGNED_INT */
+        Engine.TEXTURETYPE_UNSIGNED_INT = 0;
+        /** FLOAT */
+        Engine.TEXTURETYPE_FLOAT = 1;
+        /** HALF_FLOAT */
+        Engine.TEXTURETYPE_HALF_FLOAT = 2;
+        /** nearest is mag = nearest and min = nearest and mip = linear */
+        Engine.TEXTURE_NEAREST_SAMPLINGMODE = 1;
+        /** Bilinear is mag = linear and min = linear and mip = nearest */
+        Engine.TEXTURE_BILINEAR_SAMPLINGMODE = 2;
+        /** Trilinear is mag = linear and min = linear and mip = linear */
+        Engine.TEXTURE_TRILINEAR_SAMPLINGMODE = 3;
+        /** nearest is mag = nearest and min = nearest and mip = linear */
+        Engine.TEXTURE_NEAREST_NEAREST_MIPLINEAR = 1;
+        /** Bilinear is mag = linear and min = linear and mip = nearest */
+        Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST = 2;
+        /** Trilinear is mag = linear and min = linear and mip = linear */
+        Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;
+        /** mag = nearest and min = nearest and mip = nearest */
+        Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;
+        /** mag = nearest and min = linear and mip = nearest */
+        Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;
+        /** mag = nearest and min = linear and mip = linear */
+        Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;
+        /** mag = nearest and min = linear and mip = none */
+        Engine.TEXTURE_NEAREST_LINEAR = 7;
+        /** mag = nearest and min = nearest and mip = none */
+        Engine.TEXTURE_NEAREST_NEAREST = 8;
+        /** mag = linear and min = nearest and mip = nearest */
+        Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;
+        /** mag = linear and min = nearest and mip = linear */
+        Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;
+        /** mag = linear and min = linear and mip = none */
+        Engine.TEXTURE_LINEAR_LINEAR = 11;
+        /** mag = linear and min = nearest and mip = none */
+        Engine.TEXTURE_LINEAR_NEAREST = 12;
+        /** Explicit coordinates mode */
+        Engine.TEXTURE_EXPLICIT_MODE = 0;
+        /** Spherical coordinates mode */
+        Engine.TEXTURE_SPHERICAL_MODE = 1;
+        /** Planar coordinates mode */
+        Engine.TEXTURE_PLANAR_MODE = 2;
+        /** Cubic coordinates mode */
+        Engine.TEXTURE_CUBIC_MODE = 3;
+        /** Projection coordinates mode */
+        Engine.TEXTURE_PROJECTION_MODE = 4;
+        /** Skybox coordinates mode */
+        Engine.TEXTURE_SKYBOX_MODE = 5;
+        /** Inverse Cubic coordinates mode */
+        Engine.TEXTURE_INVCUBIC_MODE = 6;
+        /** Equirectangular coordinates mode */
+        Engine.TEXTURE_EQUIRECTANGULAR_MODE = 7;
+        /** Equirectangular Fixed coordinates mode */
+        Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;
+        /** Equirectangular Fixed Mirrored coordinates mode */
+        Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;
         // Texture rescaling mode
-        Engine._SCALEMODE_FLOOR = 1;
-        Engine._SCALEMODE_NEAREST = 2;
-        Engine._SCALEMODE_CEILING = 3;
+        /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
+        Engine.SCALEMODE_FLOOR = 1;
+        /** Defines that texture rescaling will look for the nearest power of 2 size */
+        Engine.SCALEMODE_NEAREST = 2;
+        /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
+        Engine.SCALEMODE_CEILING = 3;
         // Updatable statics so stick with vars here
         /**
          * Gets or sets the epsilon value used by collision engine
@@ -31413,34 +31162,34 @@ var BABYLON;
             return new Texture(name, scene, noMipmap, invertY, samplingMode, onLoad, onError, buffer, deleteBuffer, format);
         };
         // Constants
-        Texture.NEAREST_SAMPLINGMODE = 1;
-        Texture.NEAREST_NEAREST_MIPLINEAR = 1; // nearest is mag = nearest and min = nearest and mip = linear
-        Texture.BILINEAR_SAMPLINGMODE = 2;
-        Texture.LINEAR_LINEAR_MIPNEAREST = 2; // Bilinear is mag = linear and min = linear and mip = nearest
-        Texture.TRILINEAR_SAMPLINGMODE = 3;
-        Texture.LINEAR_LINEAR_MIPLINEAR = 3; // Trilinear is mag = linear and min = linear and mip = linear
-        Texture.NEAREST_NEAREST_MIPNEAREST = 4;
-        Texture.NEAREST_LINEAR_MIPNEAREST = 5;
-        Texture.NEAREST_LINEAR_MIPLINEAR = 6;
-        Texture.NEAREST_LINEAR = 7;
-        Texture.NEAREST_NEAREST = 8;
-        Texture.LINEAR_NEAREST_MIPNEAREST = 9;
-        Texture.LINEAR_NEAREST_MIPLINEAR = 10;
-        Texture.LINEAR_LINEAR = 11;
-        Texture.LINEAR_NEAREST = 12;
-        Texture.EXPLICIT_MODE = 0;
-        Texture.SPHERICAL_MODE = 1;
-        Texture.PLANAR_MODE = 2;
-        Texture.CUBIC_MODE = 3;
-        Texture.PROJECTION_MODE = 4;
-        Texture.SKYBOX_MODE = 5;
-        Texture.INVCUBIC_MODE = 6;
-        Texture.EQUIRECTANGULAR_MODE = 7;
-        Texture.FIXED_EQUIRECTANGULAR_MODE = 8;
-        Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;
-        Texture.CLAMP_ADDRESSMODE = 0;
-        Texture.WRAP_ADDRESSMODE = 1;
-        Texture.MIRROR_ADDRESSMODE = 2;
+        Texture.NEAREST_SAMPLINGMODE = BABYLON.Engine.TEXTURE_NEAREST_SAMPLINGMODE;
+        Texture.NEAREST_NEAREST_MIPLINEAR = BABYLON.Engine.TEXTURE_NEAREST_NEAREST_MIPLINEAR; // nearest is mag = nearest and min = nearest and mip = linear
+        Texture.BILINEAR_SAMPLINGMODE = BABYLON.Engine.TEXTURE_BILINEAR_SAMPLINGMODE;
+        Texture.LINEAR_LINEAR_MIPNEAREST = BABYLON.Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST; // Bilinear is mag = linear and min = linear and mip = nearest
+        Texture.TRILINEAR_SAMPLINGMODE = BABYLON.Engine.TEXTURE_TRILINEAR_SAMPLINGMODE;
+        Texture.LINEAR_LINEAR_MIPLINEAR = BABYLON.Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR; // Trilinear is mag = linear and min = linear and mip = linear
+        Texture.NEAREST_NEAREST_MIPNEAREST = BABYLON.Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST;
+        Texture.NEAREST_LINEAR_MIPNEAREST = BABYLON.Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST;
+        Texture.NEAREST_LINEAR_MIPLINEAR = BABYLON.Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR;
+        Texture.NEAREST_LINEAR = BABYLON.Engine.TEXTURE_NEAREST_LINEAR;
+        Texture.NEAREST_NEAREST = BABYLON.Engine.TEXTURE_NEAREST_NEAREST;
+        Texture.LINEAR_NEAREST_MIPNEAREST = BABYLON.Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST;
+        Texture.LINEAR_NEAREST_MIPLINEAR = BABYLON.Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR;
+        Texture.LINEAR_LINEAR = BABYLON.Engine.TEXTURE_LINEAR_LINEAR;
+        Texture.LINEAR_NEAREST = BABYLON.Engine.TEXTURE_LINEAR_NEAREST;
+        Texture.EXPLICIT_MODE = BABYLON.Engine.TEXTURE_EXPLICIT_MODE;
+        Texture.SPHERICAL_MODE = BABYLON.Engine.TEXTURE_SPHERICAL_MODE;
+        Texture.PLANAR_MODE = BABYLON.Engine.TEXTURE_PLANAR_MODE;
+        Texture.CUBIC_MODE = BABYLON.Engine.TEXTURE_CUBIC_MODE;
+        Texture.PROJECTION_MODE = BABYLON.Engine.TEXTURE_PROJECTION_MODE;
+        Texture.SKYBOX_MODE = BABYLON.Engine.TEXTURE_SKYBOX_MODE;
+        Texture.INVCUBIC_MODE = BABYLON.Engine.TEXTURE_INVCUBIC_MODE;
+        Texture.EQUIRECTANGULAR_MODE = BABYLON.Engine.TEXTURE_EQUIRECTANGULAR_MODE;
+        Texture.FIXED_EQUIRECTANGULAR_MODE = BABYLON.Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE;
+        Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE = BABYLON.Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE;
+        Texture.CLAMP_ADDRESSMODE = BABYLON.Engine.TEXTURE_CLAMP_ADDRESSMODE;
+        Texture.WRAP_ADDRESSMODE = BABYLON.Engine.TEXTURE_WRAP_ADDRESSMODE;
+        Texture.MIRROR_ADDRESSMODE = BABYLON.Engine.TEXTURE_MIRROR_ADDRESSMODE;
         /**
          * Gets or sets a boolean which defines if the texture url must be build from the serialized URL instead of just using the name and loading them side by side with the scene file
          */
@@ -101442,6 +101191,14 @@ var BABYLON;
         NullEngine.prototype.updateDynamicTexture = function (texture, canvas, invertY, premulAlpha, format) {
             if (premulAlpha === void 0) { premulAlpha = false; }
         };
+        /**
+         * Get the current error code of the webGL context
+         * @returns the error code
+         * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError
+         */
+        NullEngine.prototype.getError = function () {
+            return 0;
+        };
         NullEngine.prototype.updateDynamicIndexBuffer = function (indexBuffer, indices, offset) {
             if (offset === void 0) { offset = 0; }
         };

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

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

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.3.0-alpha.9",
+    "version": "3.3.0-alpha.10",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

Разлика између датотеке није приказан због своје велике величине
+ 2 - 2
dist/preview release/inspector/babylon.inspector.bundle.js


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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "3.3.0-alpha.9",
+    "version": "3.3.0-alpha.10",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

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

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.9",
+    "version": "3.3.0-alpha.10",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.9",
+    "version": "3.3.0-alpha.10",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.9",
+    "version": "3.3.0-alpha.10",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "3.3.0-alpha.9",
+    "version": "3.3.0-alpha.10",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-alpha.9"
+        "babylonjs-gltf2interface": "3.3.0-alpha.10"
     },
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"

Разлика између датотеке није приказан због своје велике величине
+ 65 - 65
dist/preview release/viewer/babylon.viewer.js


Разлика између датотеке није приказан због своје велике величине
+ 240 - 486
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 1
package.json

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

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

@@ -589,7 +589,7 @@
          * Returns the current version of the framework
          */
         public static get Version(): string {
-            return "3.3.0-alpha.9";
+            return "3.3.0-alpha.10";
         }
 
         // Updatable statics so stick with vars here