|
@@ -12,8 +12,6 @@ THREE.XHRLoader.prototype = {
|
|
|
|
|
|
constructor: THREE.XHRLoader,
|
|
|
|
|
|
- strict: true,
|
|
|
-
|
|
|
load: function ( url, onLoad, onProgress, onError ) {
|
|
|
|
|
|
if ( this.path !== undefined ) url = this.path + url;
|
|
@@ -48,7 +46,18 @@ THREE.XHRLoader.prototype = {
|
|
|
|
|
|
THREE.Cache.add( url, response );
|
|
|
|
|
|
- if ( ( this.status === 200 && this.readyState === 4 ) && scope.strict ) {
|
|
|
+ if ( this.status === 200 ) {
|
|
|
+
|
|
|
+ if ( onLoad ) onLoad( response );
|
|
|
+
|
|
|
+ scope.manager.itemEnd( url );
|
|
|
+
|
|
|
+ } else if ( this.status === 0 ) {
|
|
|
+
|
|
|
+ // Some browsers return HTTP Status 0 when using non-http protocol
|
|
|
+ // e.g. 'file://' or 'data://'. Handle as success.
|
|
|
+
|
|
|
+ console.warn( 'THREE.XHRLoader: HTTP Status 0 received.' );
|
|
|
|
|
|
if ( onLoad ) onLoad( response );
|
|
|
|
|
@@ -111,10 +120,4 @@ THREE.XHRLoader.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
- setStrict: function ( value ) {
|
|
|
-
|
|
|
- this.strict = value;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
};
|