Explorar el Código

Small patch for getting IEWEBGL support. Fixes #2173.

Mr.doob hace 13 años
padre
commit
8439417fc3
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/loaders/BinaryLoader.js

+ 3 - 1
src/loaders/BinaryLoader.js

@@ -76,7 +76,9 @@ THREE.BinaryLoader.prototype.loadAjaxBuffers = function ( json, callback, binary
 
 			if ( xhr.status == 200 || xhr.status == 0 ) {
 
-				THREE.BinaryLoader.prototype.createBinModel( xhr.response, callback, texturePath, json.materials );
+				var buffer = xhr.response;
+				if ( buffer === undefined ) buffer = ( new Uint8Array( xhr.responseBody ) ).buffer; // IEWEBGL needs this
+				THREE.BinaryLoader.prototype.createBinModel( buffer, callback, texturePath, json.materials );
 
 			} else {