|
@@ -5563,19 +5563,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- let onInternalError = (request?: XMLHttpRequest, exception?: any) => {
|
|
|
- if (loader) {
|
|
|
- const fallbackUrl = loader.getFallbackTextureUrl(rootUrl, this._textureFormatInUse);
|
|
|
- if (fallbackUrl) {
|
|
|
- this.createCubeTexture(fallbackUrl, scene, files, noMipmap, onLoad, onError, format, extension, createPolynomials, lodScale, lodOffset, texture);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (onError && request) {
|
|
|
- onError(request.status + " " + request.statusText, exception);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (loader) {
|
|
|
rootUrl = loader.transformUrl(rootUrl, this._textureFormatInUse);
|
|
|
|
|
@@ -5592,6 +5579,19 @@
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
+ let onInternalError = (request?: XMLHttpRequest, exception?: any) => {
|
|
|
+ if (loader) {
|
|
|
+ const fallbackUrl = loader.getFallbackTextureUrl(rootUrl, this._textureFormatInUse);
|
|
|
+ if (fallbackUrl) {
|
|
|
+ this.createCubeTexture(fallbackUrl, scene, files, noMipmap, onLoad, onError, format, extension, createPolynomials, lodScale, lodOffset, texture);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (onError && request) {
|
|
|
+ onError(request.status + " " + request.statusText, exception);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this._loadFile(rootUrl, onloaddata, undefined, undefined, true, onInternalError);
|
|
|
}
|
|
|
}
|
|
@@ -7389,7 +7389,7 @@
|
|
|
this._loadFile(url, onload, undefined, undefined, true, onerror);
|
|
|
}
|
|
|
|
|
|
- private _cascadeLoadFiles(scene: Nullable<Scene>, onfinish: (images: (string | ArrayBuffer)[]) => void, files: string[], onError: Nullable<(message?: string, exception?: any) => void> = null): void {
|
|
|
+ protected _cascadeLoadFiles(scene: Nullable<Scene>, onfinish: (images: (string | ArrayBuffer)[]) => void, files: string[], onError: Nullable<(message?: string, exception?: any) => void> = null): void {
|
|
|
var loadedFiles: (string | ArrayBuffer)[] = [];
|
|
|
(<any>loadedFiles)._internalCount = 0;
|
|
|
|