Browse Source

#fixes 621

David Catuhe 10 years ago
parent
commit
f63093dfaf

File diff suppressed because it is too large
+ 24 - 22
dist/preview release - alpha/babylon.2.2.js


File diff suppressed because it is too large
+ 603 - 511
dist/preview release - alpha/babylon.2.2.max.js


File diff suppressed because it is too large
+ 24 - 22
dist/preview release - alpha/babylon.2.2.noworker.js


+ 4 - 4
src/Cameras/babylon.virtualJoysticksCamera.js

@@ -12,12 +12,12 @@ var BABYLON;
         function VirtualJoysticksCamera(name, position, scene) {
             _super.call(this, name, position, scene);
             this._leftjoystick = new BABYLON.VirtualJoystick(true);
-            this._leftjoystick.setAxisForUpDown(2 /* Z */);
-            this._leftjoystick.setAxisForLeftRight(0 /* X */);
+            this._leftjoystick.setAxisForUpDown(BABYLON.JoystickAxis.Z);
+            this._leftjoystick.setAxisForLeftRight(BABYLON.JoystickAxis.X);
             this._leftjoystick.setJoystickSensibility(0.15);
             this._rightjoystick = new BABYLON.VirtualJoystick(false);
-            this._rightjoystick.setAxisForUpDown(0 /* X */);
-            this._rightjoystick.setAxisForLeftRight(1 /* Y */);
+            this._rightjoystick.setAxisForUpDown(BABYLON.JoystickAxis.X);
+            this._rightjoystick.setAxisForLeftRight(BABYLON.JoystickAxis.Y);
             this._rightjoystick.reverseUpDown = true;
             this._rightjoystick.setJoystickSensibility(0.05);
             this._rightjoystick.setJoystickColor("yellow");

+ 1 - 1
src/LensFlare/babylon.lensFlareSystem.js

@@ -131,7 +131,7 @@ var BABYLON;
             engine.enableEffect(this._effect);
             engine.setState(false);
             engine.setDepthBuffer(false);
-            engine.setAlphaMode(BABYLON.Engine.ALPHA_ADD);
+            engine.setAlphaMode(BABYLON.Engine.ALPHA_ONEONE);
             // VBOs
             engine.bindBuffers(this._vertexBuffer, this._indexBuffer, this._vertexDeclaration, this._vertexStrideSize, this._effect);
             // Flares

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

@@ -169,7 +169,7 @@
             engine.enableEffect(this._effect);
             engine.setState(false);
             engine.setDepthBuffer(false);
-            engine.setAlphaMode(Engine.ALPHA_ADD);
+            engine.setAlphaMode(Engine.ALPHA_ONEONE);
 
             // VBOs
             engine.bindBuffers(this._vertexBuffer, this._indexBuffer, this._vertexDeclaration, this._vertexStrideSize, this._effect);

+ 9 - 16
src/Materials/babylon.standardMaterial.js

@@ -78,12 +78,11 @@ var BABYLON;
             this.BONES4 = false;
             this.BonesPerMesh = 0;
             this.INSTANCES = false;
+            this._keys = Object.keys(this);
         }
         StandardMaterialDefines.prototype.isEqual = function (other) {
-            for (var prop in this) {
-                if (!this.hasOwnProperty(prop)) {
-                    continue;
-                }
+            for (var index = 0; index < this._keys.length; index++) {
+                var prop = this._keys[index];
                 if (this[prop] !== other[prop]) {
                     return false;
                 }
@@ -91,18 +90,14 @@ var BABYLON;
             return true;
         };
         StandardMaterialDefines.prototype.cloneTo = function (other) {
-            for (var prop in this) {
-                if (!this.hasOwnProperty(prop)) {
-                    continue;
-                }
+            for (var index = 0; index < this._keys.length; index++) {
+                var prop = this._keys[index];
                 other[prop] = this[prop];
             }
         };
         StandardMaterialDefines.prototype.reset = function () {
-            for (var prop in this) {
-                if (!this.hasOwnProperty(prop)) {
-                    continue;
-                }
+            for (var index = 0; index < this._keys.length; index++) {
+                var prop = this._keys[index];
                 if (prop === "BonesPerMesh") {
                     this[prop] = 0;
                     continue;
@@ -112,10 +107,8 @@ var BABYLON;
         };
         StandardMaterialDefines.prototype.toString = function () {
             var result = "";
-            for (var prop in this) {
-                if (!this.hasOwnProperty(prop)) {
-                    continue;
-                }
+            for (var index = 0; index < this._keys.length; index++) {
+                var prop = this._keys[index];
                 if (prop === "BonesPerMesh" && this[prop] > 0) {
                     result += "#define BonesPerMesh " + this[prop] + "\n";
                     continue;

+ 14 - 16
src/Materials/babylon.standardMaterial.ts

@@ -69,11 +69,15 @@
         public BonesPerMesh = 0;
         public INSTANCES = false;
 
+        _keys: string[];
+
+        constructor() {
+            this._keys = Object.keys(this);
+        }
+
         public isEqual(other: StandardMaterialDefines): boolean {
-            for (var prop in this) {
-                if (!this.hasOwnProperty(prop)) {
-                    continue;
-                }
+            for (var index = 0; index < this._keys.length; index++) {
+                var prop = this._keys[index];
 
                 if (this[prop] !== other[prop]) {
                     return false;
@@ -84,20 +88,16 @@
         }
 
         public cloneTo(other: StandardMaterialDefines): void {
-            for (var prop in this) {
-                if (!this.hasOwnProperty(prop)) {
-                    continue;
-                }
+            for (var index = 0; index < this._keys.length; index++) {
+                var prop = this._keys[index];
 
                 other[prop] = this[prop];
             }
         }
 
         public reset(): void {
-            for (var prop in this) {
-                if (!this.hasOwnProperty(prop)) {
-                    continue;
-                }
+            for (var index = 0; index < this._keys.length; index++) {
+                var prop = this._keys[index];
 
                 if (prop === "BonesPerMesh") {
                     this[prop] = 0;
@@ -110,10 +110,8 @@
 
         public toString(): string {
             var result = "";
-            for (var prop in this) {
-                if (!this.hasOwnProperty(prop)) {
-                    continue;
-                }
+            for (var index = 0; index < this._keys.length; index++) {
+                var prop = this._keys[index];
 
                 if (prop === "BonesPerMesh" && this[prop] > 0) {
                     result += "#define BonesPerMesh " + this[prop] + "\n";

+ 49 - 3
src/Mesh/babylon.mesh.js

@@ -1162,9 +1162,55 @@ var BABYLON;
                 scene = subdivisions;
                 subdivisions = 1;
             }
-            var cylinder = new Mesh(name, scene);
-            var vertexData = BABYLON.VertexData.CreateCylinder(height, diameterTop, diameterBottom, tessellation, subdivisions);
-            vertexData.applyToMesh(cylinder, updatable);
+            // setup tube creation parameters
+            var path = [
+                new BABYLON.Vector3(0, -height / 2, 0),
+                new BABYLON.Vector3(0, height / 2, 0),
+            ];
+            var radiusFunction = function (i, distance) {
+                return (diameterBottom + (diameterTop - diameterBottom) * distance / height) / 2;
+            };
+            // create tube without caps
+            var cylinder = Mesh.CreateTube(name, path, 1.0, tessellation, radiusFunction, Mesh.NO_CAP, scene, updatable, sideOrientation);
+            // extract geometry data to add caps
+            var geometry_data = BABYLON.VertexData.ExtractFromMesh(cylinder);
+            var createCylinderCap = function (isTop) {
+                var radius = isTop ? diameterTop / 2 : diameterBottom / 2;
+                if (radius === 0) {
+                    return;
+                }
+                var vbase = geometry_data.positions.length / 3;
+                var offset = new BABYLON.Vector3(0, isTop ? height / 2 : -height / 2, 0);
+                var textureScale = new BABYLON.Vector2(0.5, 0.5);
+                // Positions, normals & uvs
+                var angle;
+                for (var i = 0; i < tessellation; i++) {
+                    angle = Math.PI * 2 * i / tessellation;
+                    var circleVector = new BABYLON.Vector3(Math.cos(angle), 0, Math.sin(angle));
+                    var position = circleVector.scale(radius).add(offset);
+                    var textureCoordinate = new BABYLON.Vector2(circleVector.x * textureScale.x + 0.5, circleVector.z * textureScale.y + 0.5);
+                    geometry_data.positions.push(position.x, position.y, position.z);
+                    geometry_data.normals.push(0, isTop ? 1 : -1, 0);
+                    geometry_data.uvs.push(textureCoordinate.x, textureCoordinate.y);
+                }
+                // Indices
+                for (i = 0; i < tessellation - 2; i++) {
+                    if (!isTop) {
+                        geometry_data.indices.push(vbase);
+                        geometry_data.indices.push(vbase + (i + 2) % tessellation);
+                        geometry_data.indices.push(vbase + (i + 1) % tessellation);
+                    }
+                    else {
+                        geometry_data.indices.push(vbase);
+                        geometry_data.indices.push(vbase + (i + 1) % tessellation);
+                        geometry_data.indices.push(vbase + (i + 2) % tessellation);
+                    }
+                }
+            };
+            // add caps to geometry and apply to mesh
+            createCylinderCap(true);
+            createCylinderCap(false);
+            geometry_data.applyToMesh(cylinder);
             return cylinder;
         };
         // Torus  (Code from SharpDX.org)

+ 38 - 37
src/Mesh/babylon.mesh.ts

@@ -1356,12 +1356,12 @@
 
             // setup tube creation parameters
             var path = [
-            	new Vector3(0, -height/2, 0), 
-            	new Vector3(0, height/2, 0), 
+                new Vector3(0, -height / 2, 0),
+                new Vector3(0, height / 2, 0),
             ];
-            
+
             var radiusFunction = function (i, distance) {
-            	return (diameterBottom + (diameterTop - diameterBottom) * distance / height)/2;
+                return (diameterBottom + (diameterTop - diameterBottom) * distance / height) / 2;
             };
             
             // create tube without caps
@@ -1369,46 +1369,46 @@
             
             // extract geometry data to add caps
             var geometry_data = VertexData.ExtractFromMesh(cylinder);
-            
+
             var createCylinderCap = function (isTop) {
-            	var radius = isTop ? diameterTop/2 : diameterBottom/2;
-            	if (radius === 0) {
-            	    return;
-            	}
-            	var vbase = geometry_data.positions.length / 3;
-            	var offset = new Vector3(0, isTop ? height / 2 : -height / 2, 0);
-            	var textureScale = new Vector2(0.5, 0.5);
-            	// Positions, normals & uvs
-            	var angle;
-            	for (var i = 0; i < tessellation; i++) {
-            		angle = Math.PI * 2 * i / tessellation;
-            	    var circleVector = new Vector3(Math.cos(angle), 0, Math.sin(angle));
-            	    var position = circleVector.scale(radius).add(offset);
-            	    var textureCoordinate = new Vector2(circleVector.x * textureScale.x + 0.5, circleVector.z * textureScale.y + 0.5);
-            		geometry_data.positions.push(position.x, position.y, position.z);
-            		geometry_data.normals.push(0, isTop ? 1 : -1, 0);
-            	    geometry_data.uvs.push(textureCoordinate.x, textureCoordinate.y);
-            	}
-            	// Indices
-            	for (i = 0; i < tessellation - 2; i++) {
-            	    if (!isTop) {
-            	        geometry_data.indices.push(vbase);
-            	        geometry_data.indices.push(vbase + (i + 2) % tessellation);
-            	        geometry_data.indices.push(vbase + (i + 1) % tessellation);
-            	    }
-            	    else {
-            	        geometry_data.indices.push(vbase);
-            	        geometry_data.indices.push(vbase + (i + 1) % tessellation);
-            	        geometry_data.indices.push(vbase + (i + 2) % tessellation);
-            	    }
-            	}
+                var radius = isTop ? diameterTop / 2 : diameterBottom / 2;
+                if (radius === 0) {
+                    return;
+                }
+                var vbase = geometry_data.positions.length / 3;
+                var offset = new Vector3(0, isTop ? height / 2 : -height / 2, 0);
+                var textureScale = new Vector2(0.5, 0.5);
+                // Positions, normals & uvs
+                var angle;
+                for (var i = 0; i < tessellation; i++) {
+                    angle = Math.PI * 2 * i / tessellation;
+                    var circleVector = new Vector3(Math.cos(angle), 0, Math.sin(angle));
+                    var position = circleVector.scale(radius).add(offset);
+                    var textureCoordinate = new Vector2(circleVector.x * textureScale.x + 0.5, circleVector.z * textureScale.y + 0.5);
+                    geometry_data.positions.push(position.x, position.y, position.z);
+                    geometry_data.normals.push(0, isTop ? 1 : -1, 0);
+                    geometry_data.uvs.push(textureCoordinate.x, textureCoordinate.y);
+                }
+                // Indices
+                for (i = 0; i < tessellation - 2; i++) {
+                    if (!isTop) {
+                        geometry_data.indices.push(vbase);
+                        geometry_data.indices.push(vbase + (i + 2) % tessellation);
+                        geometry_data.indices.push(vbase + (i + 1) % tessellation);
+                    }
+                    else {
+                        geometry_data.indices.push(vbase);
+                        geometry_data.indices.push(vbase + (i + 1) % tessellation);
+                        geometry_data.indices.push(vbase + (i + 2) % tessellation);
+                    }
+                }
             };
             
             // add caps to geometry and apply to mesh
             createCylinderCap(true);
             createCylinderCap(false);
             geometry_data.applyToMesh(cylinder);
-            
+
             return cylinder;
         }
 
@@ -2096,3 +2096,4 @@
         }
     }
 }
+

+ 1 - 1
src/Particles/babylon.particleSystem.js

@@ -280,7 +280,7 @@ var BABYLON;
             engine.bindBuffers(this._vertexBuffer, this._indexBuffer, this._vertexDeclaration, this._vertexStrideSize, effect);
             // Draw order
             if (this.blendMode === ParticleSystem.BLENDMODE_ONEONE) {
-                engine.setAlphaMode(BABYLON.Engine.ALPHA_ADD);
+                engine.setAlphaMode(BABYLON.Engine.ALPHA_ONEONE);
             }
             else {
                 engine.setAlphaMode(BABYLON.Engine.ALPHA_COMBINE);

+ 1 - 1
src/Particles/babylon.particleSystem.ts

@@ -383,7 +383,7 @@
 
             // Draw order
             if (this.blendMode === ParticleSystem.BLENDMODE_ONEONE) {
-                engine.setAlphaMode(Engine.ALPHA_ADD);
+                engine.setAlphaMode(Engine.ALPHA_ONEONE);
             } else {
                 engine.setAlphaMode(Engine.ALPHA_COMBINE);
             }

+ 18 - 22
src/Tools/babylon.virtualJoystick.js

@@ -22,8 +22,8 @@ var BABYLON;
             VirtualJoystick._globalJoystickIndex++;
             // By default left & right arrow keys are moving the X
             // and up & down keys are moving the Y
-            this._axisTargetedByLeftAndRight = 0 /* X */;
-            this._axisTargetedByUpAndDown = 1 /* Y */;
+            this._axisTargetedByLeftAndRight = JoystickAxis.X;
+            this._axisTargetedByUpAndDown = JoystickAxis.Y;
             this.reverseLeftRight = false;
             this.reverseUpDown = false;
             // collections of pointers
@@ -93,9 +93,7 @@ var BABYLON;
             VirtualJoystick.vjCanvas.addEventListener("contextmenu", function (evt) {
                 evt.preventDefault(); // Disables system menu
             }, false);
-            requestAnimationFrame(function () {
-                _this._drawVirtualJoystick();
-            });
+            requestAnimationFrame(function () { _this._drawVirtualJoystick(); });
         }
         VirtualJoystick.prototype.setJoystickSensibility = function (newJoystickSensibility) {
             this._joystickSensibility = newJoystickSensibility;
@@ -139,26 +137,26 @@ var BABYLON;
                 var directionLeftRight = this.reverseLeftRight ? -1 : 1;
                 var deltaJoystickX = directionLeftRight * this._deltaJoystickVector.x / this._inversedSensibility;
                 switch (this._axisTargetedByLeftAndRight) {
-                    case 0 /* X */:
+                    case JoystickAxis.X:
                         this.deltaPosition.x = Math.min(1, Math.max(-1, deltaJoystickX));
                         break;
-                    case 1 /* Y */:
+                    case JoystickAxis.Y:
                         this.deltaPosition.y = Math.min(1, Math.max(-1, deltaJoystickX));
                         break;
-                    case 2 /* Z */:
+                    case JoystickAxis.Z:
                         this.deltaPosition.z = Math.min(1, Math.max(-1, deltaJoystickX));
                         break;
                 }
                 var directionUpDown = this.reverseUpDown ? 1 : -1;
                 var deltaJoystickY = directionUpDown * this._deltaJoystickVector.y / this._inversedSensibility;
                 switch (this._axisTargetedByUpAndDown) {
-                    case 0 /* X */:
+                    case JoystickAxis.X:
                         this.deltaPosition.x = Math.min(1, Math.max(-1, deltaJoystickY));
                         break;
-                    case 1 /* Y */:
+                    case JoystickAxis.Y:
                         this.deltaPosition.y = Math.min(1, Math.max(-1, deltaJoystickY));
                         break;
-                    case 2 /* Z */:
+                    case JoystickAxis.Z:
                         this.deltaPosition.z = Math.min(1, Math.max(-1, deltaJoystickY));
                         break;
                 }
@@ -193,26 +191,26 @@ var BABYLON;
         // Define which axis you'd like to control for left & right 
         VirtualJoystick.prototype.setAxisForLeftRight = function (axis) {
             switch (axis) {
-                case 0 /* X */:
-                case 1 /* Y */:
-                case 2 /* Z */:
+                case JoystickAxis.X:
+                case JoystickAxis.Y:
+                case JoystickAxis.Z:
                     this._axisTargetedByLeftAndRight = axis;
                     break;
                 default:
-                    this._axisTargetedByLeftAndRight = 0 /* X */;
+                    this._axisTargetedByLeftAndRight = JoystickAxis.X;
                     break;
             }
         };
         // Define which axis you'd like to control for up & down 
         VirtualJoystick.prototype.setAxisForUpDown = function (axis) {
             switch (axis) {
-                case 0 /* X */:
-                case 1 /* Y */:
-                case 2 /* Z */:
+                case JoystickAxis.X:
+                case JoystickAxis.Y:
+                case JoystickAxis.Z:
                     this._axisTargetedByUpAndDown = axis;
                     break;
                 default:
-                    this._axisTargetedByUpAndDown = 1 /* Y */;
+                    this._axisTargetedByUpAndDown = JoystickAxis.Y;
                     break;
             }
         };
@@ -257,9 +255,7 @@ var BABYLON;
                     ;
                 });
             }
-            requestAnimationFrame(function () {
-                _this._drawVirtualJoystick();
-            });
+            requestAnimationFrame(function () { _this._drawVirtualJoystick(); });
         };
         VirtualJoystick.prototype.releaseCanvas = function () {
             if (VirtualJoystick.vjCanvas) {

+ 53 - 1
src/babylon.engine.js

@@ -494,6 +494,13 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Engine, "ALPHA_ONEONE", {
+            get: function () {
+                return Engine._ALPHA_ONEONE;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(Engine, "ALPHA_ADD", {
             get: function () {
                 return Engine._ALPHA_ADD;
@@ -508,6 +515,27 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Engine, "ALPHA_SUBTRACT", {
+            get: function () {
+                return Engine._ALPHA_SUBTRACT;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(Engine, "ALPHA_MULTIPLY", {
+            get: function () {
+                return Engine._ALPHA_MULTIPLY;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(Engine, "ALPHA_MAXIMIZED", {
+            get: function () {
+                return Engine._ALPHA_MAXIMIZED;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(Engine, "DELAYLOADSTATE_NONE", {
             get: function () {
                 return Engine._DELAYLOADSTATE_NONE;
@@ -1203,11 +1231,31 @@ var BABYLON;
                     this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);
                     this._alphaState.alphaBlend = true;
                     break;
-                case Engine.ALPHA_ADD:
+                case Engine.ALPHA_ONEONE:
                     this.setDepthWrite(false);
                     this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ZERO, this._gl.ONE);
                     this._alphaState.alphaBlend = true;
                     break;
+                case Engine.ALPHA_ADD:
+                    this.setDepthWrite(false);
+                    this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE, this._gl.ZERO, this._gl.ONE);
+                    this._alphaState.alphaBlend = true;
+                    break;
+                case Engine.ALPHA_SUBTRACT:
+                    this.setDepthWrite(false);
+                    this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE);
+                    this._alphaState.alphaBlend = true;
+                    break;
+                case Engine.ALPHA_MULTIPLY:
+                    this.setDepthWrite(false);
+                    this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR, this._gl.ZERO, this._gl.ONE, this._gl.ONE);
+                    this._alphaState.alphaBlend = true;
+                    break;
+                case Engine.ALPHA_MAXIMIZED:
+                    this.setDepthWrite(false);
+                    this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE);
+                    this._alphaState.alphaBlend = true;
+                    break;
             }
             this._alphaMode = mode;
         };
@@ -1931,6 +1979,10 @@ var BABYLON;
         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._DELAYLOADSTATE_NONE = 0;
         Engine._DELAYLOADSTATE_LOADED = 1;
         Engine._DELAYLOADSTATE_LOADING = 2;

+ 13 - 2
src/babylon.engine.ts

@@ -392,7 +392,8 @@
         private static _ALPHA_SUBTRACT = 3;
         private static _ALPHA_MULTIPLY = 4;
         private static _ALPHA_MAXIMIZED = 5;
-        
+        private static _ALPHA_ONEONE = 6;
+
         private static _DELAYLOADSTATE_NONE = 0;
         private static _DELAYLOADSTATE_LOADED = 1;
         private static _DELAYLOADSTATE_LOADING = 2;
@@ -411,6 +412,10 @@
             return Engine._ALPHA_DISABLE;
         }
 
+        public static get ALPHA_ONEONE(): number {
+            return Engine._ALPHA_ONEONE;
+        }
+
         public static get ALPHA_ADD(): number {
             return Engine._ALPHA_ADD;
         }
@@ -1454,6 +1459,11 @@
                     this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);
                     this._alphaState.alphaBlend = true;
                     break;
+                case Engine.ALPHA_ONEONE:
+                    this.setDepthWrite(false);
+                    this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ZERO, this._gl.ONE);
+                    this._alphaState.alphaBlend = true;
+                    break;
                 case Engine.ALPHA_ADD:
                     this.setDepthWrite(false);
                     this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE, this._gl.ZERO, this._gl.ONE);
@@ -1653,7 +1663,7 @@
 
             return texture;
         }
-        
+
         public updateRawTexture(texture: WebGLTexture, data: ArrayBufferView, format: number, invertY: boolean): void {
             var internalFormat = this._gl.RGBA;
             switch (format) {
@@ -2342,3 +2352,4 @@
         }
     }
 }
+