Veykril / cubism-rs

A rust wrapper around the Live2D Cubism SDK with extra functionality
Apache License 2.0
39 stars 10 forks source link

CubismNativeFramework features #7

Open 3c1u opened 5 years ago

3c1u commented 5 years ago

There are some options to implement these:

Currently working on re-implementing some features of Cubism 3 Native SDK Framework (Such as loading .model3.json, 3c1u:cubism-fw-port) and I found out that there is no well-documented information for files it handles (Even in Japanese!).

Veykril commented 5 years ago

My plan was to reimplement the framework in rust, since the cubism-core already is a somewhat more rustic wrapper ffi interop would prove difficult. The idea for the crates is that cubism-core is just a rust like abstraction over the core clib while the cubism crate itself will offer bigger features similar to what the framework offers for C/C++.

I was planning on adding the json file loading myself soon as well but since you seem to have started working on it I'll wait for what you are making. Good to see you are using serde for this. Just open a PR if you want me to look over it properly and give you pointers about things I would like to be different. One small point regarding the json loading, I'd prefer that the json definitions and the loading related code get their own module in the source folder like:

├─src/
├─lib.rs
├─json.rs <--this module 
├─json/ <--this module 
│   ├─model..
│   ├─phyics..
│   ├─etc..

If you got question feel free to ask here or on discord Veykril#6658

Veykril commented 5 years ago

I've made an extra issue #8 regarding serialization and implemented the model3 files partially myself as to give an idea how I'd think the definitions should be.