|0.1.2||Nov 7, 2022|
|0.1.0||Aug 30, 2022|
#465 in WebAssembly
mdanceio is a cross-platform MMD(MikuMikuDance) compatible implementation. It targets at browser though WebGPU on wasm. Rewrite nanoem in Rust.
This project is still in initial development phase.
I built this project mainly to learn Rust and WebGPU. I hope to provide a MikuMikuDance implementation in the browser, as well as via cloud rendering and on AR/VR in the future.
mdanceio works as a crate that provides MMD rendering service on a specific
Canvas. Or it can directly return a BytesArray.
There is another project build on
mdanceio which provides basic MMD remote rendering service via WebRTC.
How can I get supported Models and Motions
You can fetch models and motions from 模之屋(PlayBox), a community sharing character models.
The project build is likely buggy and unfinished. You can try the following model and motion which is tested and welling working to get started.
- Model: 【原神】砂糖Sucrose
- Motion: 神里凌华传说任务舞蹈
The demo GIFs in this README use the above model and motion.
The example will play a model with specific motion in a native window.
cargo run --package mdanceio --example winit_app -- --model <Model Path> --motion <Motion Path>
You can build as an executable as well.
cargo build --package mdanceio --example winit_app --release
You can also fetch the executable in Actions.
You can visit the demo here(requires Chrome Canary with
You can visit the demo using WebGL.
Install wasm-pack, a rust -> wasm workflow tool.
nodejs to serve the demo.
You also need Google Chrome Canary that supports
WebGPU, and enable the feature flag
Build wasm package
wasm-pack build mdanceio --out-dir ../target/pkg
Build requires environment variable: RUSTFLAGS=--cfg=web_sys_unstable_apis
Run Web Demo
cd mdance-demo npm install npm run start
You can also fetch prebuilt web bundle in Actions.
I have a demo project about how to use mdanceio as a rendering service here.
The service uses WebRTC to communicate with the browser.
You can follow its guidance to play with it.
Cooperate with Arcore
A demo project is provided about how to use mdanceio-ar in Android project.
Target Platform Support
✅ = First Class Support 🆗 = Best Effort Support 🛠️ = Unsupported, but planned
File Format Support
- The core functionality has not yet completed. We will cover all MikuMikuDance features in the future.
- I'm interested in supporting
mdanceioin an AR/VR environment. We will extract SDK for AR usage and provide a demo.
- Provide an architecture that supports cloud rendering will.
- Provide support for MME or similar technologies.