diff --git a/src/loaders/XHRLoader.js b/src/loaders/XHRLoader.js index 9c144a4026673832c9a884428d85e048a621bbaf..2f8f1ebca4aab4954c17ca8f30b597065fa44cf0 100644 --- a/src/loaders/XHRLoader.js +++ b/src/loaders/XHRLoader.js @@ -12,6 +12,8 @@ THREE.XHRLoader.prototype = { constructor: THREE.XHRLoader, + ignoreHTTPStatus: false, + load: function ( url, onLoad, onProgress, onError ) { if ( this.path !== undefined ) url = this.path + url; @@ -46,7 +48,7 @@ THREE.XHRLoader.prototype = { THREE.Cache.add( url, response ); - if ( this.status === 200 && this.readyState === 4 ) { + if ( ( this.status === 200 && this.readyState === 4 ) || scope.ignoreHTTPStatus ) { if ( onLoad ) onLoad( response ); @@ -109,4 +111,10 @@ THREE.XHRLoader.prototype = { } + setIgnoreHTTPStatus: function ( value ) { + + this.ignoreHTTPStatus = value; + + } + };