提交 49071e5a 编写于 作者: M Mr.doob

Revert "*Loader: Testing setResponseType( 'json' )"

This reverts commit e4feff11.
上级 f9edcec8
......@@ -19,10 +19,9 @@ Object.assign( AnimationLoader.prototype, {
var scope = this;
var loader = new FileLoader( scope.manager );
loader.setResponseType( 'json' );
loader.load( url, function ( json ) {
loader.load( url, function ( text ) {
onLoad( scope.parse( json ) );
onLoad( scope.parse( JSON.parse( text ) ) );
}, onProgress, onError );
......
......@@ -22,10 +22,9 @@ Object.assign( BufferGeometryLoader.prototype, {
var scope = this;
var loader = new FileLoader( scope.manager );
loader.setResponseType( 'json' );
loader.load( url, function ( json ) {
loader.load( url, function ( text ) {
onLoad( scope.parse( json ) );
onLoad( scope.parse( JSON.parse( text ) ) );
}, onProgress, onError );
......
......@@ -38,10 +38,10 @@ Object.assign( JSONLoader.prototype, {
var texturePath = this.texturePath && ( typeof this.texturePath === "string" ) ? this.texturePath : Loader.prototype.extractUrlBase( url );
var loader = new FileLoader( this.manager );
loader.setResponseType( 'json' );
loader.setWithCredentials( this.withCredentials );
loader.load( url, function ( json ) {
loader.load( url, function ( text ) {
var json = JSON.parse( text );
var metadata = json.metadata;
if ( metadata !== undefined ) {
......
......@@ -21,10 +21,9 @@ Object.assign( MaterialLoader.prototype, {
var scope = this;
var loader = new FileLoader( scope.manager );
loader.setResponseType( 'json' );
loader.load( url, function ( json ) {
loader.load( url, function ( text ) {
onLoad( scope.parse( json ) );
onLoad( scope.parse( JSON.parse( text ) ) );
}, onProgress, onError );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册