{"id":35114075,"url":"https://github.com/eatgrapes/live2d-javabinding","last_synced_at":"2026-01-13T22:00:06.642Z","repository":{"id":331233759,"uuid":"1123678202","full_name":"Eatgrapes/Live2D-JavaBinding","owner":"Eatgrapes","description":"Live2D Cubism SDK JavaBindings","archived":false,"fork":false,"pushed_at":"2025-12-31T13:20:24.000Z","size":18101,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T20:44:59.466Z","etag":null,"topics":["bindings","cpp","java","java-bindings","jni","jni-java","live2d","opengl"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eatgrapes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-27T11:38:30.000Z","updated_at":"2026-01-06T01:37:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Eatgrapes/Live2D-JavaBinding","commit_stats":null,"previous_names":["eatgrapes/live2d-javabinding"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Eatgrapes/Live2D-JavaBinding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eatgrapes%2FLive2D-JavaBinding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eatgrapes%2FLive2D-JavaBinding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eatgrapes%2FLive2D-JavaBinding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eatgrapes%2FLive2D-JavaBinding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eatgrapes","download_url":"https://codeload.github.com/Eatgrapes/Live2D-JavaBinding/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eatgrapes%2FLive2D-JavaBinding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28403750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bindings","cpp","java","java-bindings","jni","jni-java","live2d","opengl"],"created_at":"2025-12-27T20:24:14.259Z","updated_at":"2026-01-13T22:00:06.629Z","avatar_url":"https://github.com/Eatgrapes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Live2D-JavaBinding\n\nA native Java binding for the [Live2D Cubism SDK](https://www.live2d.com/en/sdk/about/), enabling seamless integration of Live2D models in Java applications (Suitable for OpenGL).\n\nFor detailed documentation, please visit our [Wiki](https://github.com/Eatgrapes/Live2D-JavaBinding/wiki).\n\n## Features\n\n- **Decoupled Distribution**: Java logic and native binaries are separated for flexibility. Native JARs are fully self-contained.\n- **Cross-Platform Support**: Compatible with Windows (x64), Linux (x64, arm64), and macOS (x64, arm64).\n- **OpenGL Based**: Designed for OpenGL-accelerated applications (e.g., LWJGL, JOGL).\n- **Simple and Intuitive API**: Easy-to-use interfaces for model loading, rendering, and interaction.\n- **JNI Integration**: Leverages Java Native Interface (JNI) for high-performance native code execution.\n\n## Implemented Features\n\n- [x] **Model Loading**: Support for `.moc3`, physics, and pose loading.\n- [x] **Expression System**: Load and switch model expressions.\n- [x] **Motion System**: Playback with priority control and callbacks.\n- [x] **Parameter Control**: Manually set or get model parameter values.\n- [x] **Interaction**: Dragging support and hit detection.\n- [x] **Rendering**: OpenGL-based rendering and texture management.\n\n## About JNI Integration\n\nJNI (Java Native Interface) is a programming framework that enables Java code to interact with native applications and libraries written in languages like C or C++. In this project:\n\n- JNI bridges the Java API (in the `binding/` directory) with the native C++ implementation of the Live2D Cubism SDK (in the `native/` directory).\n- The native components are built using CMake and compiled into platform-specific shared libraries, which are bundled into JAR files for easy distribution.\n\nFor more details on JNI, refer to the [official Oracle JNI documentation](https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html).\n\n## Quick Start\n\nHere's a simple example to get you up and running:\n\n```java\nimport dev.eatgrapes.live2d.CubismFramework;\nimport dev.eatgrapes.live2d.CubismUserModel;\n\n// 1. Initialize the Framework\nCubismFramework.startUp();\nCubismFramework.initialize();\n\n// 2. Load Model \u0026 Components\nCubismUserModel model = new CubismUserModel();\nmodel.loadModel(moc3Bytes);     // Load model data\nmodel.loadPose(poseBytes);      // Load pose data\nmodel.loadPhysics(physicsBytes); // Load physics data\n\n// 3. Setup Renderer\nmodel.createRenderer();\nmodel.registerTexture(0, openGLTextureId); // Bind textures\n\n// 4. Handle Interactions \u0026 Motions\nmodel.setDragging(nx, ny); // Enable eye tracking or dragging\nmodel.startMotion(motionBytes, priority, loop, name -\u003e {\n    System.out.println(\"Motion finished!\"); // Callback on completion\n});\n\n// 5. Update \u0026 Draw (in your main render loop)\nmodel.update(deltaTime); // Update model state\nmodel.draw(mvpMatrix);   // Render the model\n```\n\n## Project Structure\n\n- **`binding/`**: Contains the Java API definitions and module configurations.\n- **`native/`**: Houses the JNI C++ implementation, along with CMake build scripts for native compilation.\n- **`scripts/`**: Python scripts for automating builds across all supported platforms.\n- **`example/`**: A complete Maven-based demo project using LWJGL 3 for OpenGL integration.\n\n## Building the Project\n\n### Prerequisites\n- Python 3.x\n- CMake 3.10+\n- A C++14-compatible compiler (e.g., GCC, Clang, or MSVC)\n- JDK 9 or higher\n\n### Build Command\nRun the following in the project root:\n\n```bash\npython3 scripts/build.py\n```\n\nThis will generate artifacts in the `out/` directory:\n- `live2d-shared.jar`: The core Java API.\n- `live2d-native-[platform].jar`: Platform-specific native libraries (e.g., `live2d-native-windows-x64.jar`).\n\n## Contributing\n\nWe welcome Pull Requests (PRs)! Whether it's implementing additional SDK features, enhancing platform support, or fixing bugs, your help is appreciated. Please follow these steps:\n1. Fork the repository.\n2. Create a feature branch.\n3. Commit your changes.\n4. Open a PR with a clear description.\n\n## License\n\n- **Binding Code**: Licensed under the [MIT License](LICENSE).\n- **Live2D Cubism SDK**: Usage is subject to the [Live2D Open Software License Agreement](https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html). You must review and agree to their terms before using the native components.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Featgrapes%2Flive2d-javabinding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Featgrapes%2Flive2d-javabinding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Featgrapes%2Flive2d-javabinding/lists"}