|
@@ -13,7 +13,8 @@ module BABYLON {
|
|
|
// Handling various flavors of prefixed version of IndexedDB
|
|
|
private idbFactory = <IDBFactory> (window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB);
|
|
|
|
|
|
- static isUASupportingBlobStorage: boolean = true;
|
|
|
+ static IsUASupportingBlobStorage = true;
|
|
|
+ static IDBStorageEnabled = true;
|
|
|
|
|
|
constructor(urlToScene: string, callbackManifestChecked: (boolean) => any) {
|
|
|
this.callbackManifestChecked = callbackManifestChecked;
|
|
@@ -24,7 +25,12 @@ module BABYLON {
|
|
|
this.manifestVersionFound = 0;
|
|
|
this.mustUpdateRessources = false;
|
|
|
this.hasReachedQuota = false;
|
|
|
- this.checkManifestFile();
|
|
|
+
|
|
|
+ if (!Database.IDBStorageEnabled) {
|
|
|
+ this.callbackManifestChecked(true);
|
|
|
+ } else {
|
|
|
+ this.checkManifestFile();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static parseURL = (url: string) => {
|
|
@@ -47,7 +53,6 @@ module BABYLON {
|
|
|
|
|
|
public checkManifestFile() {
|
|
|
function noManifestFile() {
|
|
|
- //BABYLON.Tools.Log("Valid manifest file not found. Scene & textures will be loaded directly from the web server.");
|
|
|
that.enableSceneOffline = false;
|
|
|
that.enableTexturesOffline = false;
|
|
|
that.callbackManifestChecked(false);
|
|
@@ -240,7 +245,7 @@ module BABYLON {
|
|
|
image.src = blobTextureURL;
|
|
|
};
|
|
|
|
|
|
- if (Database.isUASupportingBlobStorage) { // Create XHR
|
|
|
+ if (Database.IsUASupportingBlobStorage) { // Create XHR
|
|
|
var xhr = new XMLHttpRequest(),
|
|
|
blob: Blob;
|
|
|
|
|
@@ -284,7 +289,7 @@ module BABYLON {
|
|
|
catch (ex) {
|
|
|
// "DataCloneError" generated by Chrome when you try to inject blob into IndexedDB
|
|
|
if (ex.code === 25) {
|
|
|
- Database.isUASupportingBlobStorage = false;
|
|
|
+ Database.IsUASupportingBlobStorage = false;
|
|
|
}
|
|
|
image.src = url;
|
|
|
}
|