summaryrefslogtreecommitdiff
path: root/world/src/vrm.rs
blob: a9ea6f46ce4871a50a4072303e6ab425ec1872d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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,
}