Explorar o código

Added forwarders methods on the object for which tags have been enabled.
Added BABYLON.Tags.DisableFor

Gwenaël Hagenmuller %!s(int64=11) %!d(string=hai) anos
pai
achega
2c28a4e7f4

+ 24 - 0
Babylon/Tools/babylon.tags.js

@@ -7,6 +7,30 @@ var BABYLON = BABYLON || {};
 
 
     BABYLON.Tags.EnableFor = function (obj) {
     BABYLON.Tags.EnableFor = function (obj) {
         obj._tags = obj._tags || {};
         obj._tags = obj._tags || {};
+
+        obj.hasTags = function () {
+            return BABYLON.Tags.HasTags(obj);
+        };
+
+        obj.addTags = function (tagsString) {
+            return BABYLON.Tags.AddTagsTo(obj, tagsString);
+        };
+
+        obj.removeTags = function (tagsString) {
+            return BABYLON.Tags.RemoveTagsFrom(obj, tagsString);
+        };
+
+        obj.matchesTagsQuery = function (tagsQuery) {
+            return BABYLON.Tags.MatchesQuery(obj, tagsQuery);
+        };
+    };
+
+    BABYLON.Tags.DisableFor = function (obj) {
+        delete obj._tags;
+        delete obj.hasTags;
+        delete obj.addTags;
+        delete obj.removeTags;
+        delete obj.matchesTagsQuery;
     };
     };
 
 
     BABYLON.Tags.HasTags = function (obj) {
     BABYLON.Tags.HasTags = function (obj) {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
Tools/BuildOurOwnBabylonJS/BuildOurOwnBabylonJS/ourOwnBabylon.js