live2d-parser

Crates.iolive2d-parser
lib.rslive2d-parser
version0.1.3
created_at2025-04-01 07:50:47.302324+00
updated_at2025-04-05 00:23:54.854321+00
descriptionThe pure rust parser for Live2D's `*.model.json` and `*.moc`
homepage
repositoryhttps://github.com/oovm/live2d-unpacker
max_upload_size
id1614526
size957,758
Publisher (github:doki-land:publisher)

documentation

https://docs.rs/live2d-parser

README

Live2d Parser

A Rust library for parsing Live2D model files, without any ffi calls.

Supports Cubism 2.0/3.0/4.0/4.0 formats.

Examples

  • Analyze Cubism 2.0 model
use live2d_parser::cubism_v1::Moc;

let moc = unsafe { Moc::new(include_bytes!("BCY.moc"))? };
let mut json = File::create("BCY.json")?;
json.write_all(serde_json::to_string_pretty(&moc)?.as_bytes())?;
  • Analyze Cubism 3.0 model
use live2d_parser::cubism_v3::Moc3;

let moc = unsafe { Moc3::new(include_bytes!("mao_pro.moc3"))? };
let mut json = File::create("mao_pro.json")?;
json.write_all(serde_json::to_string_pretty(&moc)?.as_bytes())?;
Commit count: 24

cargo fmt