summaryrefslogtreecommitdiff
path: root/world/src/vrm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'world/src/vrm.rs')
-rw-r--r--world/src/vrm.rs38
1 files changed, 38 insertions, 0 deletions
diff --git a/world/src/vrm.rs b/world/src/vrm.rs
new file mode 100644
index 0000000..a9ea6f4
--- /dev/null
+++ b/world/src/vrm.rs
@@ -0,0 +1,38 @@
+use std::collections::BTreeMap;
+
+use serde::Deserialize;
+
+#[derive(Debug, Deserialize)]
+pub struct Vrm {
+ pub humanoid: VrmHumanoid,
+}
+
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct VrmHumanoid {
+ pub human_bones: Vec<VrmHumanBone>,
+}
+
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct VrmHumanBone {
+ pub bone: String,
+ pub node: usize,
+}
+
+#[derive(Debug, Deserialize)]
+pub struct Vrmc {
+ pub humanoid: VrmcHumanoid,
+}
+
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct VrmcHumanoid {
+ pub human_bones: BTreeMap<String, VrmcHumanBone>,
+}
+
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct VrmcHumanBone {
+ pub node: usize,
+}