Browse Source

Added node 'metadata' support

Added a general purpose untyped node ‘metadata’ field
MackeyK24 8 years ago
parent
commit
3ba2a6ae7c
2 changed files with 7 additions and 0 deletions
  1. 4 0
      src/babylon.node.js
  2. 3 0
      src/babylon.node.ts

+ 4 - 0
src/babylon.node.js

@@ -17,6 +17,7 @@ var BABYLON;
          */
         function Node(name, scene) {
             this.state = "";
+            this.metadata = null;
             this.animations = new Array();
             this._ranges = {};
             this._childrenFlag = -1;
@@ -292,6 +293,9 @@ var BABYLON;
         __decorate([
             BABYLON.serialize()
         ], Node.prototype, "state", void 0);
+        __decorate([
+            BABYLON.serialize()
+        ], Node.prototype, "metadata", void 0);
         return Node;
     }());
     BABYLON.Node = Node;

+ 3 - 0
src/babylon.node.ts

@@ -16,6 +16,9 @@
         @serialize()
         public state = "";
 
+        @serialize()
+        public metadata:any = null;
+
         public animations = new Array<Animation>();
         private _ranges: { [name: string]: AnimationRange; } = {};