diff --git a/examples/js/loaders/BVHLoader.js b/examples/js/loaders/BVHLoader.js index c7f5ab61e0d9574052cda2e6f67649388d628cba..d26a7de7956ecfa5dbb4f05c4ee98440ed5eb4d6 100644 --- a/examples/js/loaders/BVHLoader.js +++ b/examples/js/loaders/BVHLoader.js @@ -25,16 +25,15 @@ THREE.BVHLoader.prototype = { var scope = this; var loader = new THREE.FileLoader( scope.manager ); - loader.setResponseType( 'arraybuffer' ); - loader.load( url, function( buffer ) { + loader.load( url, function( text ) { - onLoad( scope.parse( buffer ) ); + onLoad( scope.parse( text ) ); }, onProgress, onError ); }, - parse: function ( buffer ) { + parse: function ( text ) { /* reads a string array (lines) from a BVH file @@ -376,15 +375,6 @@ THREE.BVHLoader.prototype = { var scope = this; - // convert buffer to ASCII string - var text = ""; - var raw = new Uint8Array( buffer ); - for ( var i = 0; i < raw.length; ++ i ) { - - text += String.fromCharCode( raw[ i ] ); - - } - var lines = text.split( /[\r\n]+/g ); var bones = readBvh( lines );