David Catuhe %!s(int64=7) %!d(string=hai) anos
pai
achega
63825c6b6b

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 13801 - 13511
Playground/babylon.d.txt


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 13544 - 13534
dist/preview release/babylon.d.ts


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 17 - 17
dist/preview release/babylon.js


+ 28 - 6
dist/preview release/babylon.max.js

@@ -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);
                 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 17 - 17
dist/preview release/babylon.worker.js


+ 28 - 6
dist/preview release/es6.js

@@ -10512,7 +10512,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();
@@ -21640,6 +21642,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}
             */
@@ -49020,6 +49026,7 @@ var BABYLON;
         }
         /**
          * Check if the current condition is valid
+         * @returns a boolean
          */
         Condition.prototype.isValid = function () {
             return true;
@@ -49040,6 +49047,7 @@ var BABYLON;
         };
         /**
          * Serialize placeholder for child classes
+         * @returns the serialized object
          */
         Condition.prototype.serialize = function () {
         };
@@ -49084,7 +49092,7 @@ var BABYLON;
         }
         Object.defineProperty(ValueCondition, "IsEqual", {
             /**
-             * @returns the number for IsEqual
+             * returns the number for IsEqual
              */
             get: function () {
                 return ValueCondition._IsEqual;
@@ -49094,7 +49102,7 @@ var BABYLON;
         });
         Object.defineProperty(ValueCondition, "IsDifferent", {
             /**
-             * @returns the number for IsDifferent
+             * Returns the number for IsDifferent
              */
             get: function () {
                 return ValueCondition._IsDifferent;
@@ -49104,7 +49112,7 @@ var BABYLON;
         });
         Object.defineProperty(ValueCondition, "IsGreater", {
             /**
-             * @returns the number for IsGreater
+             * Returns the number for IsGreater
              */
             get: function () {
                 return ValueCondition._IsGreater;
@@ -49114,7 +49122,7 @@ var BABYLON;
         });
         Object.defineProperty(ValueCondition, "IsLesser", {
             /**
-             * @returns the number for IsLesser
+             * Returns the number for IsLesser
              */
             get: function () {
                 return ValueCondition._IsLesser;
@@ -49383,6 +49391,7 @@ var BABYLON;
         /**
          * Serialize placeholder for child classes
          * @param parent of child
+         * @returns the serialized object
          */
         Action.prototype.serialize = function (parent) {
         };
@@ -63153,7 +63162,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);
                 }

+ 2 - 362
dist/preview release/typedocValidationBaseline.json

@@ -1,7 +1,7 @@
 {
-  "errors": 7152,
+  "errors": 7088,
   "babylon.typedoc.json": {
-    "errors": 7152,
+    "errors": 7088,
     "AnimationKeyInterpolation": {
       "Enumeration": {
         "Comments": {
@@ -1418,147 +1418,15 @@
       }
     },
     "Action": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Constructor": {
-        "new Action": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "triggerOptions": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "condition": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      },
       "Property": {
-        "_actionManager": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "onBeforeExecuteObservable": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "trigger": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
         "triggerOptions": {
           "Comments": {
             "MissingText": true
           }
-        },
-        "_GetTargetProperty": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "_SerializeValueAsString": {
-          "Comments": {
-            "MissingText": true
-          }
         }
       },
       "Method": {
-        "_executeCurrent": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "evt": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "_getEffectiveTarget": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "target": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "propertyPath": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "_getProperty": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "propertyPath": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "_prepare": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "execute": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "evt": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "getTriggerParameter": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "serialize": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "parent": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "skipToNextActiveAction": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
         "then": {
-          "Comments": {
-            "MissingText": true
-          },
           "Parameter": {
             "action": {
               "Comments": {
@@ -8024,85 +7892,6 @@
         }
       }
     },
-    "Condition": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Constructor": {
-        "new Condition": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "actionManager": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      },
-      "Property": {
-        "_actionManager": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "_currentResult": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "_evaluationId": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      },
-      "Method": {
-        "_getEffectiveTarget": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "target": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "propertyPath": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "_getProperty": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "propertyPath": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "isValid": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "serialize": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      }
-    },
     "CubeTexture": {
       "Class": {
         "Comments": {
@@ -8861,101 +8650,6 @@
         }
       }
     },
-    "DynamicTexture": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
-      "Method": {
-        "clear": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "drawText": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "text": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "x": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "y": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "font": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "color": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "clearColor": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "invertY": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "update": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "getContext": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "scaleTo": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "width": {
-              "Comments": {
-                "MissingText": true
-              }
-            },
-            "height": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        },
-        "update": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "invertY": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
-        }
-      }
-    },
     "EasingFunction": {
       "Class": {
         "Comments": {
@@ -9196,11 +8890,6 @@
             "MissingText": true
           }
         },
-        "enableOfflineSupport": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
         "forcePOTTextures": {
           "Comments": {
             "MissingText": true
@@ -23329,11 +23018,6 @@
       }
     },
     "PredicateCondition": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
       "Property": {
         "predicate": {
           "Comments": {
@@ -31252,11 +30936,6 @@
       }
     },
     "StateCondition": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
       "Property": {
         "value": {
           "Comments": {
@@ -34564,11 +34243,6 @@
       }
     },
     "ValueCondition": {
-      "Class": {
-        "Comments": {
-          "MissingText": true
-        }
-      },
       "Property": {
         "operator": {
           "Comments": {
@@ -34584,40 +34258,6 @@
           "Comments": {
             "MissingText": true
           }
-        },
-        "IsDifferent": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "IsEqual": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "IsGreater": {
-          "Comments": {
-            "MissingText": true
-          }
-        },
-        "IsLesser": {
-          "Comments": {
-            "MissingText": true
-          }
-        }
-      },
-      "Method": {
-        "GetOperatorName": {
-          "Comments": {
-            "MissingText": true
-          },
-          "Parameter": {
-            "operator": {
-              "Comments": {
-                "MissingText": true
-              }
-            }
-          }
         }
       }
     },

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 22 - 22
dist/preview release/viewer/babylon.viewer.js


+ 28 - 6
dist/preview release/viewer/babylon.viewer.max.js

@@ -10628,7 +10628,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();
@@ -21756,6 +21758,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}
             */
@@ -49136,6 +49142,7 @@ var BABYLON;
         }
         /**
          * Check if the current condition is valid
+         * @returns a boolean
          */
         Condition.prototype.isValid = function () {
             return true;
@@ -49156,6 +49163,7 @@ var BABYLON;
         };
         /**
          * Serialize placeholder for child classes
+         * @returns the serialized object
          */
         Condition.prototype.serialize = function () {
         };
@@ -49200,7 +49208,7 @@ var BABYLON;
         }
         Object.defineProperty(ValueCondition, "IsEqual", {
             /**
-             * @returns the number for IsEqual
+             * returns the number for IsEqual
              */
             get: function () {
                 return ValueCondition._IsEqual;
@@ -49210,7 +49218,7 @@ var BABYLON;
         });
         Object.defineProperty(ValueCondition, "IsDifferent", {
             /**
-             * @returns the number for IsDifferent
+             * Returns the number for IsDifferent
              */
             get: function () {
                 return ValueCondition._IsDifferent;
@@ -49220,7 +49228,7 @@ var BABYLON;
         });
         Object.defineProperty(ValueCondition, "IsGreater", {
             /**
-             * @returns the number for IsGreater
+             * Returns the number for IsGreater
              */
             get: function () {
                 return ValueCondition._IsGreater;
@@ -49230,7 +49238,7 @@ var BABYLON;
         });
         Object.defineProperty(ValueCondition, "IsLesser", {
             /**
-             * @returns the number for IsLesser
+             * Returns the number for IsLesser
              */
             get: function () {
                 return ValueCondition._IsLesser;
@@ -49499,6 +49507,7 @@ var BABYLON;
         /**
          * Serialize placeholder for child classes
          * @param parent of child
+         * @returns the serialized object
          */
         Action.prototype.serialize = function (parent) {
         };
@@ -63269,7 +63278,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);
                 }

+ 1 - 0
src/Actions/babylon.action.ts

@@ -149,6 +149,7 @@
         /**
          * Serialize placeholder for child classes
          * @param parent of child
+         * @returns the serialized object
          */
         public serialize(parent: any): any {
         }

+ 6 - 4
src/Actions/babylon.condition.ts

@@ -31,6 +31,7 @@
 
         /**
          * Check if the current condition is valid
+         * @returns a boolean
          */
         public isValid(): boolean {
             return true;
@@ -54,6 +55,7 @@
         
         /**
          * Serialize placeholder for child classes
+         * @returns the serialized object
          */
         public serialize(): any {
         }
@@ -102,28 +104,28 @@
         private static _IsLesser = 3;
 
         /**
-         * @returns the number for IsEqual
+         * returns the number for IsEqual
          */
         public static get IsEqual(): number {
             return ValueCondition._IsEqual;
         }
 
         /**
-         * @returns the number for IsDifferent
+         * Returns the number for IsDifferent
          */
         public static get IsDifferent(): number {
             return ValueCondition._IsDifferent;
         }
 
         /**
-         * @returns the number for IsGreater
+         * Returns the number for IsGreater
          */
         public static get IsGreater(): number {
             return ValueCondition._IsGreater;
         }
 
         /**
-         * @returns the number for IsLesser
+         * Returns the number for IsLesser
          */
         public static get IsLesser(): number {
             return ValueCondition._IsLesser;

+ 5 - 1
src/Engine/babylon.engine.ts

@@ -612,8 +612,12 @@
         public cullBackFaces = true;
         public renderEvenInBackground = true;
         public preventCacheWipeBetweenFrames = false;
-        // To enable/disable IDB support and avoid XHR on .manifest
+
+        /** 
+         * To enable/disable IDB support and avoid XHR on .manifest
+         **/
         public enableOfflineSupport = false;
+
         public scenes = new Array<Scene>();
         public postProcesses = new Array<PostProcess>();
 

+ 15 - 1
src/Loading/babylon.sceneLoader.ts

@@ -309,7 +309,21 @@
             }
 
             if (rootUrl.indexOf("file:") === -1) {
-                if (scene.getEngine().enableOfflineSupport) {
+                let canUseOfflineSupport = scene.getEngine().enableOfflineSupport;
+                if (canUseOfflineSupport) {
+                    // Also check for exceptions
+                    let exceptionFound = false;
+                    for (var regex of scene.disableOfflineSupportExceptionRules) {
+                        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 Database(rootUrl + sceneFilename, manifestChecked);
                 }

+ 5 - 0
src/babylon.scene.ts

@@ -212,6 +212,11 @@
         public metadata: any = null;
         public loadingPluginName: string;
 
+        /**
+         * Use this array to add regular expressions used to disable offline support for specific urls
+         */
+        public disableOfflineSupportExceptionRules = new Array<RegExp>();        
+
         // Events
 
         private _spritePredicate: (sprite: Sprite) => boolean;