2个版本

0.0.2 2024年7月12日
0.0.1 2024年7月12日

#29 in 数据格式

每月44次下载

Apache-2.0

55KB
1K SLoC

vrm-spec

VRM格式的数据结构。

架构定义:https://github.com/vrm-c/vrm-specification

示例

use vrm_spec::vrmc_vrm_1_0::{VRMCVrmSchema, VRMC_VRM};

let file = include_bytes!("../../../fixtures/VRM1_Constraint_Twist_Sample.vrm");
let (doc, _, _) = gltf::import_slice(file).expect("ok");
let value = doc.extension_value(VRMC_VRM).expect("exist");
let vrmc_vrm: VRMCVrmSchema = serde_json::from_value(value.to_owned()).expect("ok");
// do something with vrm

lib.rs:

vrm-spec

VRM格式的数据结构。

架构定义:https://github.com/vrm-c/vrm-specification

示例

use vrm_spec::vrmc_vrm_1_0::{VRMCVrmSchema, VRMC_VRM};

let file = include_bytes!("../../../fixtures/VRM1_Constraint_Twist_Sample.vrm");
let (doc, _, _) = gltf::import_slice(file).expect("ok");
let value = doc.extension_value(VRMC_VRM).expect("exist");
let vrmc_vrm: VRMCVrmSchema = serde_json::from_value(value.to_owned()).expect("ok");

// do something with vrm

依赖项

~0.7–1.7MB
~38K SLoC