|
@@ -10540,7 +10540,9 @@ var BABYLON;
|
|
|
this.cullBackFaces = true;
|
|
|
this.renderEvenInBackground = true;
|
|
|
this.preventCacheWipeBetweenFrames = false;
|
|
|
- // To enable/disable IDB support and avoid XHR on .manifest
|
|
|
+ /**
|
|
|
+ * To enable/disable IDB support and avoid XHR on .manifest
|
|
|
+ **/
|
|
|
this.enableOfflineSupport = false;
|
|
|
this.scenes = new Array();
|
|
|
this.postProcesses = new Array();
|
|
@@ -21668,6 +21670,10 @@ var BABYLON;
|
|
|
// Metadata
|
|
|
this.metadata = null;
|
|
|
/**
|
|
|
+ * Use this array to add regular expressions used to disable offline support for specific urls
|
|
|
+ */
|
|
|
+ this.disableOfflineSupportExceptionRules = new Array();
|
|
|
+ /**
|
|
|
* An event triggered when the scene is disposed.
|
|
|
* @type {BABYLON.Observable}
|
|
|
*/
|
|
@@ -49048,6 +49054,7 @@ var BABYLON;
|
|
|
}
|
|
|
/**
|
|
|
* Check if the current condition is valid
|
|
|
+ * @returns a boolean
|
|
|
*/
|
|
|
Condition.prototype.isValid = function () {
|
|
|
return true;
|
|
@@ -49068,6 +49075,7 @@ var BABYLON;
|
|
|
};
|
|
|
/**
|
|
|
* Serialize placeholder for child classes
|
|
|
+ * @returns the serialized object
|
|
|
*/
|
|
|
Condition.prototype.serialize = function () {
|
|
|
};
|
|
@@ -49112,7 +49120,7 @@ var BABYLON;
|
|
|
}
|
|
|
Object.defineProperty(ValueCondition, "IsEqual", {
|
|
|
/**
|
|
|
- * @returns the number for IsEqual
|
|
|
+ * returns the number for IsEqual
|
|
|
*/
|
|
|
get: function () {
|
|
|
return ValueCondition._IsEqual;
|
|
@@ -49122,7 +49130,7 @@ var BABYLON;
|
|
|
});
|
|
|
Object.defineProperty(ValueCondition, "IsDifferent", {
|
|
|
/**
|
|
|
- * @returns the number for IsDifferent
|
|
|
+ * Returns the number for IsDifferent
|
|
|
*/
|
|
|
get: function () {
|
|
|
return ValueCondition._IsDifferent;
|
|
@@ -49132,7 +49140,7 @@ var BABYLON;
|
|
|
});
|
|
|
Object.defineProperty(ValueCondition, "IsGreater", {
|
|
|
/**
|
|
|
- * @returns the number for IsGreater
|
|
|
+ * Returns the number for IsGreater
|
|
|
*/
|
|
|
get: function () {
|
|
|
return ValueCondition._IsGreater;
|
|
@@ -49142,7 +49150,7 @@ var BABYLON;
|
|
|
});
|
|
|
Object.defineProperty(ValueCondition, "IsLesser", {
|
|
|
/**
|
|
|
- * @returns the number for IsLesser
|
|
|
+ * Returns the number for IsLesser
|
|
|
*/
|
|
|
get: function () {
|
|
|
return ValueCondition._IsLesser;
|
|
@@ -49411,6 +49419,7 @@ var BABYLON;
|
|
|
/**
|
|
|
* Serialize placeholder for child classes
|
|
|
* @param parent of child
|
|
|
+ * @returns the serialized object
|
|
|
*/
|
|
|
Action.prototype.serialize = function (parent) {
|
|
|
};
|
|
@@ -63181,7 +63190,20 @@ var BABYLON;
|
|
|
return plugin;
|
|
|
}
|
|
|
if (rootUrl.indexOf("file:") === -1) {
|
|
|
- if (scene.getEngine().enableOfflineSupport) {
|
|
|
+ var canUseOfflineSupport = scene.getEngine().enableOfflineSupport;
|
|
|
+ if (canUseOfflineSupport) {
|
|
|
+ // Also check for exceptions
|
|
|
+ var exceptionFound = false;
|
|
|
+ for (var _i = 0, _a = scene.disableOfflineSupportExceptionRules; _i < _a.length; _i++) {
|
|
|
+ var regex = _a[_i];
|
|
|
+ if (regex.test(rootUrl + sceneFilename)) {
|
|
|
+ exceptionFound = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ canUseOfflineSupport = !exceptionFound;
|
|
|
+ }
|
|
|
+ if (canUseOfflineSupport) {
|
|
|
// Checking if a manifest file has been set for this scene and if offline mode has been requested
|
|
|
database = new BABYLON.Database(rootUrl + sceneFilename, manifestChecked);
|
|
|
}
|