[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93276":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":26,"discoverSource":27},93276,"ayagami","AyagamiDev\u002Fayagami","AyagamiDev","2D puppet model renderer compatible with Live2D",null,"Rust",153,5,4,2,0,8,21,48.43,"Apache License 2.0",false,"main",[],"2026-07-23 04:02:09","# Ayagami: Open source 2D puppet rendering SDK\n\n**[Web Demo](https:\u002F\u002Fdemo.ayagami.dev)**\n\n[![Github-sponsors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fsponsors\u002Fhoshinolina?label=Sponsor&logo=GitHub)](https:\u002F\u002Flina.yt\u002Fsponsor)\n[![Ko-Fi](https:\u002F\u002Fshields.io\u002Fbadge\u002Fko--fi-Tip-ff5f5f?logo=ko-fi)](https:\u002F\u002Flina.yt\u002Fkofi)\n\nAyagami (彩紙) is a 2D puppet model loading and rendering library written in Rust. It is designed to be compatible with models in the Live2D model format, while being extensible to new model formats and features in the future.\n\n**Ayagami is completely free software dual licensed under the MIT and Apache2 licenses**. You may use it for any purpose as long as you abide by your choice of either license, without having to pay any royalties or obtain permission from anyone. This includes any use cases, **including both games with built-in models and expandable applications that load user-provided models**.\n\nThis software is developed strictly **using black-box reverse engineering only**. That means that it is a complete, from-scratch, independent implementation, and no license terms were violated during its development. **We have never and will never disassemble or decompile any proprietary software in order to develop this project**. To guarantee this, we have a strict [contributor policy](CONTRIBUTING.md).\n\n## Demo\n\nCheck out the [Web demo & model poser](https:\u002F\u002Fdemo.ayagami.dev)! This demo runs entirely in your browser, and your model data is not sent anywhere outside your machine. You can use it to manually pose your model (high quality screenshot feature coming soon).\n\nYou can also build and run the demo as a native app by running `cargo run -r` in the `ayagami-demo` directory. Use `trunk serve --release` instead to run the web version locally (using [trunk](https:\u002F\u002Ftrunk-rs.github.io\u002Ftrunk\u002F)).\n\n## Status\n\nThe API is pretty unstable and subject to change, and there is no documentation yet! crates.io release coming soon. For now, take a look at `ayagami-demo` for a usage example.\n\nThe code is messy and I haven't even run it though clippy yet. I'm releasing this early to get feedback on the API and start enabling users, but expect significant cleanup over time.\n\n### Supported features\n\n* MOC3 file loading & features up to SDK 5.0: Parts, ArtMeshes, Rotation & Warp deformers, Glue, Blendshape Parameters, etc.\n* Computing the final ArtMeshes given a model & parameters: `driver`\n  * Live2D-equivalent interpolation, extrapolation, and deformer chaining algorithms\n* Reference renderer using [wgpu-rs](https:\u002F\u002Fwgpu.rs): `ayagami-render` (supports Vulkan, Metal, DirectX, OpenGL, WebGL\u002FWebGPU backends):\n  * Partial recomputation of only changed model portions\u002Fmasks when parameters change\n  * Skipping computation of invisible items\n  * 1:1 pixel quality masks\n  * Supports linear and sRGB (gamma space) blending color modes (selectable depending on color attachment config)\n  * Premultiplied alpha and correct texture sampling (no weird edges like VTube Studio).\n  * Multithreaded texture decoding & GPU optimized color conversion, for fast model loading.\n* Demo app built on [egui](https:\u002F\u002Fegui.rs) (web & native): `ayagami-demo`\n  * Support for loading model metadata (model3, cdi3), model and textures from a ZIP archive\n  * sRGB (gamma space) blending for now due to egui limitations, hoping to switch to linear light in the future.\n\n### TODO\n\n* [ ] Document MOC3 file format\n* [ ] Screenshot tool in demo poser app\n* [ ] Physics engine\n* [ ] Expression file support\n* [ ] Pose file (part linking?) support\n* [ ] Motion file (animation) support\n* [ ] Full model file verification (reject models with inconsistencies at load time, see Safety section below)\n* [ ] Godot component\n* [ ] C compatible API\n* [ ] Embeddable web component\n* [ ] Mesh deform acceleration via GPU compute\n* [ ] SDK 5.3 features (advanced blend & off screen rendering) - need a test model!\n* [ ] Position tracking helper features (for object pinning etc.)\n* [ ] Conservative, fast bounding box calculations\n* [ ] Optimized clipping masks\n* [ ] Optimization & `safe-only` feature.\n\n### Safety & security \n\nAyagami is currently written in 100% pure rust (other than a tiny code path in the optimized vertex buffer blending code which can be trivially proven to be sound). This means that an invalid model cannot cause undefined behavior or lead to an exploitable vulnerability other than DoS. Currently there is limited model validation, which means that an inconsistent model (or a bug) may cause the library to panic at runtime. This will be improved in the future to proactively and gracefully reject inconsistent models at load time.\n\nIn the future we plan to introduce carefully controlled and limited scope `unsafe` code to speed up some of the codebase (such as eliding bounds checks on object field array accesses when the object index is already known to be in bounds). While this is not expected to lead to any vulnerabilities (it will always be a design goal to have zero UB regardless of input, and unsafe code will be wrapped in safe abstractions), it will be done by introducing a `safe-only` feature so that paranoid users can opt in to disabling the unsafe code and trade off performance for absolute memory safety certainty. \n\n## Architecture\n\nNo docs yet, so here's a quick overview:\n\n* `ayagami::core`: Core traits that describe a puppet model (rig only, not textures nor auxiliary data). These traits make the rest of the codebase generic over the model format, to allow new formats and in-memory representations to be used on the future (including potentially editing tools).\n* `ayagami::file`: Packed (MOC3) file loader. This uses a bunch of gnarly macros to automate generating accessors for file objects and properties, while keeping the struct-of-arrays data organization of the on-disk file in memory, based on a high level description of the file objects (`ayagami::file::classes`). As the API is largely automatically generated, it is fairly obtuse and not documented, but it may be used to access the raw data model of MOC3 files if desired.\n* `ayagami::file::model` bridges the raw data model and higher level traits, providing a cleaner abstraction over the model data. This elides implementation specific data (likely intended for the original implementation, but not very useful\u002Fsafe to rely on).\n* `ayagami::driver`: An API that builds on the `core` traits to compute model positions and deformations for a given pose. Essentially: model and parameters in, deformed ArtMeshes (draw objects) out. The core algorithms that implement the behavior of the models live here, including subtle ones like deformer interpolation\u002Fextrapolation.\n* `ayagami-render`: A reference model renderer implementation, intended to be high quality, cross platform, efficient for desktop\u002FVTubing use cases, and easy to integrate anywhere that `wgpu` can run on. This implementation is suitable for engines that can run arbitrary GPU rendering code inside their render loop, or it can also be used to draw into an offscreen texture. Users who need more advanced features such as custom shaders, additional texture layers (emissive, normals, etc.), between-layer item rendering, effects, or tight integration into an existing engine are encouraged to use this renderer as a reference and either fork it or develop their own, using the `driver` API.\n* `ayagami-demo`: A demo and test app for the rest of the stack, built using egui. This is what runs on [demo.ayagami.dev](https:\u002F\u002Fdemo.ayagami.dev). It lets you load a model, pan\u002Fzoom freely, and adjust all parameter values.\n\n## Contributing\n\nPRs are not currently accepted, as the codebase is in quick flux and we want to make sure the reverse engineering work is [completed entirely in public and with full transparency](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=eEa0-wt1SqE&list=PL8S0yfRexZULmW9fhF2gcMsuPBi6jeVhZ). However, if you have feature requests or bug reports, please feel free to file an issue!\n\n## FAQ\n\n### Is this legal?\n\nYes. As Ayagami is completely original software, it is just like any other piece of open source software.\n\n### How did you pull this off?\n\nBlack-box reverse engineering! That means looking at Live2D model (MOC3) files with a hex editor to understand their structure, and then manually creating test models and feeding them into a test application (in this case, VTube Studio) to observe how they render.\n\nSee also Lina's [Live2D Reverse Engineering FAQ](https:\u002F\u002Flina.yt\u002Fmoc3faq).\n\n## Legal & Trademark Notice\n\nAyagami is an independent, community-developed project.  It is **not affiliated with, authorized by, endorsed by, or sponsored by Live2D Inc.** (formerly Cybernoids Co., Ltd.) or any of its affiliates.\n\n\"Live2D®\" and \"Cubism\" are trademarks of Live2D Inc. in Japan and\u002For other countries; all other trademarks are the property of their respective owners.  These marks are used here only nominatively, to describe file-format compatibility, and **no endorsement, affiliation, or sponsorship is implied.**\n","Ayagami 是一个开源的 2D 人偶模型渲染 SDK，专为兼容 Live2D 格式模型而设计。它基于 Rust 实现，支持 MOC3 文件加载与解析，涵盖部件（Parts）、美术网格（ArtMeshes）、变形器（Rotation\u002FWarp）、黏合（Glue）、混合形状（Blendshape）等核心功能；提供高性能参考渲染器（基于 wgpu），支持跨平台图形后端，并具备局部更新、可见性裁剪、精确掩码与正确预乘 Alpha 渲染等优化特性。适用于需要嵌入式或可扩展 2D 角色渲染能力的应用场景，如桌面\u002F网页虚拟主播工具、游戏内角色系统及用户自定义模型加载平台。","2026-07-15 02:30:06","CREATED_QUERY"]