فهرست منبع

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

Gwenaël Hagenmuller 11 سال پیش
والد
کامیت
2c28a4e7f4
2فایلهای تغییر یافته به همراه25 افزوده شده و 1 حذف شده
  1. 24 0
      Babylon/Tools/babylon.tags.js
  2. 1 1
      Tools/BuildOurOwnBabylonJS/BuildOurOwnBabylonJS/ourOwnBabylon.js

+ 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