mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-12 05:48:47 -05:00
Skip R, S
This commit is contained in:
@@ -1127,12 +1127,12 @@ public static void Serialize_gltf_nodes_ITEM(JsonFormatter f, glTFNode value)
|
||||
Serialize_gltf_nodes__translation(f, value.translation);
|
||||
}
|
||||
|
||||
if(value.rotation!=null&&value.rotation.Length>=4){
|
||||
if(value.rotation!=null&&value.rotation.Length>=4&&!value.rotation.SequenceEqual(new float[]{0, 0, 0, 1})){
|
||||
f.Key("rotation");
|
||||
Serialize_gltf_nodes__rotation(f, value.rotation);
|
||||
}
|
||||
|
||||
if(value.scale!=null&&value.scale.Length>=3){
|
||||
if(value.scale!=null&&value.scale.Length>=3&&!value.scale.SequenceEqual(new float[]{1, 1, 1})){
|
||||
f.Key("scale");
|
||||
Serialize_gltf_nodes__scale(f, value.scale);
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ namespace UniGLTF
|
||||
[JsonSchema(MinItems = 3, MaxItems = 3, SerializationConditions = new string[] { "!value.translation.SequenceEqual(new float[]{0, 0, 0})" })]
|
||||
public float[] translation;
|
||||
|
||||
[JsonSchema(MinItems = 4, MaxItems = 4)]
|
||||
[JsonSchema(MinItems = 4, MaxItems = 4, SerializationConditions = new string[] { "!value.rotation.SequenceEqual(new float[]{0, 0, 0, 1})" })]
|
||||
[ItemJsonSchema(Minimum = -1.0, Maximum = 1.0)]
|
||||
public float[] rotation;
|
||||
|
||||
[JsonSchema(MinItems = 3, MaxItems = 3)]
|
||||
[JsonSchema(MinItems = 3, MaxItems = 3, SerializationConditions = new string[] { "!value.scale.SequenceEqual(new float[]{1, 1, 1})" })]
|
||||
public float[] scale;
|
||||
|
||||
[JsonSchema(Minimum = 0, ExplicitIgnorableValue = -1)]
|
||||
|
||||
Reference in New Issue
Block a user