Explorar o código

Fix stl loader in IE

In IE there is no 'xhr.overrideMimeType' option, so it fails to load model.
Alexander %!s(int64=11) %!d(string=hai) anos
pai
achega
a7f772f670
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/js/loaders/STLLoader.js

+ 1 - 1
examples/js/loaders/STLLoader.js

@@ -71,7 +71,7 @@ THREE.STLLoader.prototype.load = function (url, callback) {
 
 
 	}, false );
 	}, false );
 
 
-	xhr.overrideMimeType('text/plain; charset=x-user-defined');
+	if (xhr.overrideMimeType) { xhr.overrideMimeType('text/plain; charset=x-user-defined'); }
 	xhr.open( 'GET', url, true );
 	xhr.open( 'GET', url, true );
 	xhr.responseType = "arraybuffer";
 	xhr.responseType = "arraybuffer";
 	xhr.send( null );
 	xhr.send( null );