mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-11 04:54:17 -05:00
35 lines
862 B
C#
35 lines
862 B
C#
using System;
|
|
using UniJSON;
|
|
|
|
namespace UniGLTF
|
|
{
|
|
[Serializable]
|
|
public class glTFSkin : JsonSerializableBase
|
|
{
|
|
[JsonSchema(Minimum = 0, ExplicitIgnorableValue = -1)]
|
|
public int inverseBindMatrices = -1;
|
|
|
|
[JsonSchema(Required = true, MinItems = 1)]
|
|
[ItemJsonSchema(Minimum = 0)]
|
|
public int[] joints;
|
|
|
|
[JsonSchema(Minimum = 0, ExplicitIgnorableValue = -1)]
|
|
public int skeleton = -1;
|
|
|
|
// empty schemas
|
|
public object extensions;
|
|
public object extras;
|
|
public string name;
|
|
|
|
protected override void SerializeMembers(GLTFJsonFormatter f)
|
|
{
|
|
f.KeyValue(() => inverseBindMatrices);
|
|
f.KeyValue(() => joints);
|
|
if (skeleton >= 0)
|
|
{
|
|
f.KeyValue(() => skeleton);
|
|
}
|
|
}
|
|
}
|
|
}
|