summaryrefslogtreecommitdiff
path: root/world/src/vrm.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-02-07 17:46:11 +0100
committermetamuffin <metamuffin@disroot.org>2025-02-07 17:46:11 +0100
commitcdbb04b49e04716387eda47e72eadc6ef24c40ff (patch)
tree455d60aeeb8dfd65dc389f3956030bce35ec008d /world/src/vrm.rs
parent111b2e89fec8d035dc5cbb54cd0a4197c18b947e (diff)
downloadweareserver-cdbb04b49e04716387eda47e72eadc6ef24c40ff.tar
weareserver-cdbb04b49e04716387eda47e72eadc6ef24c40ff.tar.bz2
weareserver-cdbb04b49e04716387eda47e72eadc6ef24c40ff.tar.zst
vrm bone names
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,
+}