Browse Source

DataTexture clean up.

Mr.doob 10 years ago
parent
commit
b9a2372f23
1 changed files with 4 additions and 13 deletions
  1. 4 13
      src/textures/DataTexture.js

+ 4 - 13
src/textures/DataTexture.js

@@ -3,22 +3,13 @@
  */
 
 THREE.DataTexture = function ( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy ) {
-	
-	if ( magFilter === undefined ) {
-		
-		magFilter = THREE.NearestFilter;
-		
-	}
-	
-	if ( minFilter === undefined ) {
-		
-		minFilter = THREE.NearestFilter;
-		
-	}
 
 	THREE.Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
 
 	this.image = { data: data, width: width, height: height };
+
+	this.magFilter = magFilter !== undefined ? magFilter : THREE.NearestFilter;
+	this.minFilter = minFilter !== undefined ? minFilter : THREE.NearestFilter;
 	
 	this.flipY = false;
 	this.generateMipmaps  = false;
@@ -26,4 +17,4 @@ THREE.DataTexture = function ( data, width, height, format, type, mapping, wrapS
 };
 
 THREE.DataTexture.prototype = Object.create( THREE.Texture.prototype );
-THREE.DataTexture.prototype.constructor = THREE.DataTexture;
+THREE.DataTexture.prototype.constructor = THREE.DataTexture;