Esempio n. 1
0
 void PrimitiveMembers(GLTFJsonFormatter f)
 {
     if (targetNames.Count > 0)
     {
         f.Key("targetNames");
         f.BeginList();
         foreach (var x in targetNames)
         {
             f.Value(x);
         }
         f.EndList();
     }
 }
Esempio n. 2
0
        protected override void SerializeMembers(GLTFJsonFormatter f)
        {
            if (children != null && children.Any())
            {
                f.Key("children"); f.BeginList();
                foreach (var child in children)
                {
                    f.Value(child);
                }
                f.EndList();
            }

            if (!string.IsNullOrEmpty(name))
            {
                f.KeyValue(() => name);
            }
            if (matrix != null)
            {
                f.KeyValue(() => matrix);
            }
            if (translation != null)
            {
                f.KeyValue(() => translation);
            }
            if (rotation != null)
            {
                f.KeyValue(() => rotation);
            }
            if (scale != null)
            {
                f.KeyValue(() => scale);
            }

            if (mesh >= 0)
            {
                f.KeyValue(() => mesh);
            }
            if (camera >= 0)
            {
                f.KeyValue(() => camera);
            }
            if (skin >= 0)
            {
                f.KeyValue(() => skin);

                if (extras.__count > 0)
                {
                    f.KeyValue(() => extras);
                }
            }
        }