瀏覽代碼

Removed xhr.overrideMimeType and xhr.setRequestHeader from loaders. Closes #2395.

Mr.doob 13 年之前
父節點
當前提交
4ef1bb30ee

+ 0 - 2
src/loaders/BinaryLoader.js

@@ -57,8 +57,6 @@ THREE.BinaryLoader.prototype.loadAjaxJSON = function ( context, url, callback, t
 	};
 
 	xhr.open( "GET", url, true );
-	if ( xhr.overrideMimeType ) xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
-	xhr.setRequestHeader( "Content-Type", "text/plain" );
 	xhr.send( null );
 
 };

+ 0 - 1
src/loaders/GeometryLoader.js

@@ -54,7 +54,6 @@ THREE.GeometryLoader.prototype = {
 		}, false );
 
 		xhr.open( 'GET', url, true );
-		xhr.setRequestHeader( "Content-Type", "application/json" );
 		xhr.send( null );
 
 		//

+ 0 - 2
src/loaders/JSONLoader.js

@@ -80,8 +80,6 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
 	};
 
 	xhr.open( "GET", url, true );
-	if ( xhr.overrideMimeType ) xhr.overrideMimeType( "application/json; charset=x-user-defined" );
-	xhr.setRequestHeader( "Content-Type", "application/json" );
 	xhr.send( null );
 
 };

+ 0 - 2
src/loaders/SceneLoader.js

@@ -46,8 +46,6 @@ THREE.SceneLoader.prototype.load = function ( url, callbackFinished ) {
 	};
 
 	xhr.open( "GET", url, true );
-	if ( xhr.overrideMimeType ) xhr.overrideMimeType( "application/json; charset=x-user-defined" );
-	xhr.setRequestHeader( "Content-Type", "application/json" );
 	xhr.send( null );
 
 };

+ 3 - 3
src/loaders/TextureLoader.js

@@ -19,7 +19,7 @@ THREE.TextureLoader.prototype = {
 		var scope = this;
 
 		var image = new Image();
-		
+
 		image.addEventListener( 'load', function () {
 
 			var texture = new THREE.Texture( image );
@@ -30,9 +30,9 @@ THREE.TextureLoader.prototype = {
 		}, false );
 
 		image.addEventListener( 'error', function () {
-		
+
 			scope.dispatchEvent( { type: 'error', message: 'Couldn\'t load URL [' + url + ']' } );
-		
+
 		}, false );
 
 		if ( scope.crossOrigin ) image.crossOrigin = scope.crossOrigin;