ソースを参照

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

Gwenaël Hagenmuller 11 年 前
コミット
2c28a4e7f4

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

@@ -7,6 +7,30 @@ var BABYLON = BABYLON || {};
 
     BABYLON.Tags.EnableFor = function (obj) {
         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) {

ファイルの差分が大きいため隠しています
+ 1 - 1
Tools/BuildOurOwnBabylonJS/BuildOurOwnBabylonJS/ourOwnBabylon.js