diff --git a/Scripts/Format/glTF_VRM_SecondaryAnimation.cs b/Scripts/Format/glTF_VRM_SecondaryAnimation.cs index c5f091a8f..323b2d847 100644 --- a/Scripts/Format/glTF_VRM_SecondaryAnimation.cs +++ b/Scripts/Format/glTF_VRM_SecondaryAnimation.cs @@ -10,7 +10,10 @@ namespace VRM [Serializable] public class glTF_VRM_SecondaryAnimationCollider : JsonSerializableBase { + [JsonSchema(Description = "The local coordinate from the collision detection node.")] public Vector3 offset; + + [JsonSchema(Description = "The radius of the sphere (specified body part) used for collision detection with swaying objects.")] public float radius; protected override void SerializeMembers(GLTFJsonFormatter f) @@ -20,10 +23,14 @@ namespace VRM } } + [Serializable] + [JsonSchema(Title = "vrm.secondaryanimation.collidergroup", Description = "Set sphere balls (specified body parts) to collide with swaying objects.")] public class glTF_VRM_SecondaryAnimationColliderGroup : JsonSerializableBase { + [JsonSchema(Description = "Where the collision detection is set up.")] public int node; + public List colliders = new List(); protected override void SerializeMembers(GLTFJsonFormatter f) @@ -35,16 +42,34 @@ namespace VRM [Serializable] + [JsonSchema(Title = "vrm.secondaryanimation.spring")] public class glTF_VRM_SecondaryAnimationGroup : JsonSerializableBase { + [JsonSchema(Description = "Annotation comment")] public string comment; + + [JsonSchema(Description = "The resilience of the swaying object (the power of returning to the initial pose).")] public float stiffiness; + + [JsonSchema(Description = "The strength of gravity.")] public float gravityPower; + + [JsonSchema(Description = "The direction of gravity. Gravity can be enabled by (0, -1, 0) and setting (1, 0, 0) will act like wind.")] public Vector3 gravityDir; + + [JsonSchema(Description = "The resistance (deceleration) of automatic animation.")] public float dragForce; + + [JsonSchema(Description = @"The reference point of a swaying object can be set at any location except the origin. When implementing UI moving with warp, the parent node to be moved with warp can be specified if you don’t want to make the object moving by warp movement.")] public int center; + + [JsonSchema(Description = "The radius of the sphere (swaying object) used for collision detection with colliders (specified body parts).")] public float hitRadius; + + [JsonSchema(Description = "Specify the node index of the root bone of the swaying object.")] public int[] bones = new int[] { }; + + [JsonSchema(Description = "Specify the index of the collision detection group for the swaying object.")] public int[] colliderGroups = new int[] { }; protected override void SerializeMembers(GLTFJsonFormatter f) @@ -62,7 +87,7 @@ namespace VRM } [Serializable] - [JsonSchema(Title = "vrm.secondaryanimation")] + [JsonSchema(Title = "vrm.secondaryanimation", Description = "Automatic animation setting for string-shaped objects such as tail and hair.")] public class glTF_VRM_SecondaryAnimation : JsonSerializableBase { public List boneGroups = new List(); diff --git a/UniGLTF b/UniGLTF index d5ab49333..520de27a3 160000 --- a/UniGLTF +++ b/UniGLTF @@ -1 +1 @@ -Subproject commit d5ab49333e76bf91b347360eae468d81a345e4e7 +Subproject commit 520de27a3ea7e52c91829fa5a5803891725de9fa diff --git a/specification/0.0/schema/vrm.humanoid.bone.schema.json b/specification/0.0/schema/vrm.humanoid.bone.schema.json index 3e4853de8..4a71b908e 100644 --- a/specification/0.0/schema/vrm.humanoid.bone.schema.json +++ b/specification/0.0/schema/vrm.humanoid.bone.schema.json @@ -13,7 +13,7 @@ }, "useDefaultValues": { "description": "Unity's HumanLimit.useDefaultValues", - "type": "bool" + "type": "boolean" }, "min": { "description": "Unity's HumanLimit.min", diff --git a/specification/0.0/schema/vrm.humanoid.schema.json b/specification/0.0/schema/vrm.humanoid.schema.json index ed7a8ecfd..aac02c930 100644 --- a/specification/0.0/schema/vrm.humanoid.schema.json +++ b/specification/0.0/schema/vrm.humanoid.schema.json @@ -38,7 +38,7 @@ }, "hasTranslationDoF": { "description": "Unity's HumanDescription.hasTranslationDoF", - "type": "bool" + "type": "boolean" } } } \ No newline at end of file diff --git a/specification/0.0/schema/vrm.secondaryanimation.collidergroup.schema.json b/specification/0.0/schema/vrm.secondaryanimation.collidergroup.schema.json new file mode 100644 index 000000000..c9feb1570 --- /dev/null +++ b/specification/0.0/schema/vrm.secondaryanimation.collidergroup.schema.json @@ -0,0 +1,26 @@ +{ + "title": "vrm.secondaryanimation.collidergroup", + "type": "object", + "properties": { + "node": { + "description": "Where the collision detection is set up.", + "type": "integer" + }, + "colliders": { + "type": "array", + "items": { + "type": "object", + "properties": { + "offset": { + "description": "The local coordinate from the collision detection node.", + "type": "array" + }, + "radius": { + "description": "The radius of the sphere (specified body part) used for collision detection with swaying objects.", + "type": "number" + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/0.0/schema/vrm.secondaryanimation.collidergroup.schema.json.meta b/specification/0.0/schema/vrm.secondaryanimation.collidergroup.schema.json.meta new file mode 100644 index 000000000..27db2b8f1 --- /dev/null +++ b/specification/0.0/schema/vrm.secondaryanimation.collidergroup.schema.json.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d57ba668470e9e744aacafb819485689 +timeCreated: 1534915676 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/specification/0.0/schema/vrm.secondaryanimation.schema.json b/specification/0.0/schema/vrm.secondaryanimation.schema.json index af5148781..8f481c1e3 100644 --- a/specification/0.0/schema/vrm.secondaryanimation.schema.json +++ b/specification/0.0/schema/vrm.secondaryanimation.schema.json @@ -5,67 +5,13 @@ "boneGroups": { "type": "array", "items": { - "type": "object", - "properties": { - "comment": { - "type": "string" - }, - "stiffiness": { - "type": "number" - }, - "gravityPower": { - "type": "number" - }, - "gravityDir": { - "type": "array" - }, - "dragForce": { - "type": "number" - }, - "center": { - "type": "integer" - }, - "hitRadius": { - "type": "number" - }, - "bones": { - "type": "array", - "items": { - "type": "integer" - } - }, - "colliderGroups": { - "type": "array", - "items": { - "type": "integer" - } - } - } + "$ref": "vrm.secondaryanimation.spring.schema.json" } }, "colliderGroups": { "type": "array", "items": { - "type": "object", - "properties": { - "node": { - "type": "integer" - }, - "colliders": { - "type": "array", - "items": { - "type": "object", - "properties": { - "offset": { - "type": "array" - }, - "radius": { - "type": "number" - } - } - } - } - } + "$ref": "vrm.secondaryanimation.collidergroup.schema.json" } } } diff --git a/specification/0.0/schema/vrm.secondaryanimation.spring.schema.json b/specification/0.0/schema/vrm.secondaryanimation.spring.schema.json new file mode 100644 index 000000000..ce9e174c5 --- /dev/null +++ b/specification/0.0/schema/vrm.secondaryanimation.spring.schema.json @@ -0,0 +1,48 @@ +{ + "title": "vrm.secondaryanimation.spring", + "type": "object", + "properties": { + "comment": { + "description": "Annotation comment", + "type": "string" + }, + "stiffiness": { + "description": "The resilience of the swaying object (the power of returning to the initial pose).", + "type": "number" + }, + "gravityPower": { + "description": "The strength of gravity.", + "type": "number" + }, + "gravityDir": { + "description": "The direction of gravity. Gravity can be enabled by (0, -1, 0) and setting (1, 0, 0) will act like wind.", + "type": "array" + }, + "dragForce": { + "description": "The resistance (deceleration) of automatic animation.", + "type": "number" + }, + "center": { + "description": "The reference point of a swaying object can be set at any location except the origin. When implementing UI moving with warp, the parent node to be moved with warp can be specified if you don’t want to make the object moving by warp movement.", + "type": "integer" + }, + "hitRadius": { + "description": "The radius of the sphere (swaying object) used for collision detection with colliders (specified body parts).", + "type": "number" + }, + "bones": { + "description": "Specify the node index of the root bone of the swaying object.", + "type": "array", + "items": { + "type": "integer" + } + }, + "colliderGroups": { + "description": "Specify the index of the collision detection group for the swaying object.", + "type": "array", + "items": { + "type": "integer" + } + } + } +} \ No newline at end of file diff --git a/specification/0.0/schema/vrm.secondaryanimation.spring.schema.json.meta b/specification/0.0/schema/vrm.secondaryanimation.spring.schema.json.meta new file mode 100644 index 000000000..ab9a500f8 --- /dev/null +++ b/specification/0.0/schema/vrm.secondaryanimation.spring.schema.json.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 24a28bb1620e6a1499d11961d1237250 +timeCreated: 1534915676 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: