David Catuhe 6 năm trước cách đây
mục cha
commit
f8065b23a4
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      serializers/src/glTF/2.0/glTFExporter.ts

+ 5 - 0
serializers/src/glTF/2.0/glTFExporter.ts

@@ -1259,6 +1259,11 @@ export class _Exporter {
                     glTFNodeIndex = this._nodeMap[babylonNode.uniqueId];
                     if (glTFNodeIndex !== undefined) {
                         glTFNode = this._nodes[glTFNodeIndex];
+
+                        if (babylonNode.metadata) {
+                            glTFNode.extras = babylonNode.metadata;
+                        }
+
                         if (!babylonNode.parent) {
                             if (!this._shouldExportNode(babylonNode)) {
                                 Tools.Log("Omitting " + babylonNode.name + " from scene.");