mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-11 13:04:17 -05:00
60 lines
1.9 KiB
C#
60 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UniGLTF;
|
|
|
|
|
|
namespace VRM
|
|
{
|
|
[Serializable]
|
|
public class glTF_VRM_extensions : JsonSerializableBase
|
|
{
|
|
[Obsolete("use gltf.asset.generator")]
|
|
public string version = VRMVersion.VERSION;
|
|
|
|
public glTF_VRM_Meta meta = new glTF_VRM_Meta();
|
|
public glTF_VRM_Humanoid humanoid = new glTF_VRM_Humanoid();
|
|
public glTF_VRM_Firstperson firstPerson = new glTF_VRM_Firstperson();
|
|
public glTF_VRM_BlendShapeMaster blendShapeMaster = new glTF_VRM_BlendShapeMaster();
|
|
public glTF_VRM_SecondaryAnimation secondaryAnimation = new glTF_VRM_SecondaryAnimation();
|
|
public List<glTF_VRM_Material> materialProperties = new List<glTF_VRM_Material>();
|
|
|
|
protected override void SerializeMembers(JsonFormatter f)
|
|
{
|
|
//f.KeyValue(() => version);
|
|
f.KeyValue(() => meta);
|
|
f.KeyValue(() => humanoid);
|
|
f.KeyValue(() => firstPerson);
|
|
f.KeyValue(() => blendShapeMaster);
|
|
f.KeyValue(() => secondaryAnimation);
|
|
f.KeyValue(() => materialProperties);
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class glTF_extensions : JsonSerializableBase
|
|
{
|
|
public glTF_VRM_extensions VRM = new glTF_VRM_extensions();
|
|
|
|
protected override void SerializeMembers(JsonFormatter f)
|
|
{
|
|
f.KeyValue(() => VRM);
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class glTF_VRM : glTF
|
|
{
|
|
public glTF_extensions extensions = new glTF_extensions();
|
|
public List<string> extensionsUsed = new List<string>
|
|
{
|
|
"VRM",
|
|
};
|
|
|
|
protected override void SerializeMembers(JsonFormatter f)
|
|
{
|
|
f.KeyValue(() => extensions);
|
|
base.SerializeMembers(f);
|
|
}
|
|
}
|
|
}
|