You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A native Java binding for the [Live2D Cubism SDK](https://www.live2d.com/en/products/cubism-sdk), enabling seamless integration of Live2D models in Java applications.
4
4
5
5
> **Status: Work in Progress**
6
-
> This project is currently under development
6
+
> This project is currently under active development. Contributions are welcome!
7
7
8
8
## Features
9
9
10
-
-**Distributed Separately**: Java logic and native binaries are decoupled. Native JARs are self-contained (statically linked with Cubism Core).
11
-
-**Cross-Platform**: Supports Windows (x64), Linux (x64, arm64), and macOS (x64, arm64).
12
-
-**Simple API**: Easy-to-use Apis to rendering.
10
+
-**Decoupled Distribution**: Java logic and native binaries are separated for flexibility. Native JARs are fully self-contained.
11
+
-**Cross-Platform Support**: Compatible with Windows (x64), Linux (x64, arm64), and macOS (x64, arm64).
12
+
-**Simple and Intuitive API**: Easy-to-use interfaces for model loading, rendering, and interaction.
JNI (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:
18
+
19
+
- JNI bridges the Java API (in the `binding/` directory) with the native C++ implementation of the Live2D Cubism SDK (in the `native/` directory).
20
+
- The native components are built using CMake and compiled into platform-specific shared libraries, which are bundled into JAR files for easy distribution.
21
+
22
+
For more details on JNI, refer to the [official Oracle JNI documentation](https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html).
23
+
24
+
## Quick Start
25
+
26
+
Here's a simple example to get you up and running:
15
27
16
28
```java
17
29
importdev.eatgrapes.live2d.CubismFramework;
@@ -23,49 +35,60 @@ CubismFramework.initialize();
23
35
24
36
// 2. Load Model & Components
25
37
CubismUserModel model =newCubismUserModel();
26
-
model.loadModel(moc3Bytes);
27
-
model.loadPose(poseBytes);
28
-
model.loadPhysics(physicsBytes);
38
+
model.loadModel(moc3Bytes);// Load model data
39
+
model.loadPose(poseBytes);// Load pose data
40
+
model.loadPhysics(physicsBytes);// Load physics data
Pull Requests (PRs) are welcome! Help us implement more SDK features or improve platform compatibility.
85
+
We 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:
86
+
1. Fork the repository.
87
+
2. Create a feature branch.
88
+
3. Commit your changes.
89
+
4. Open a PR with a clear description.
67
90
68
91
## License
69
92
70
-
-**Binding Code**: Distributed under the [MIT License](LICENSE).
71
-
-**Live2D Cubism SDK**: The use of the underlying SDK is governed by the [Live2D Open Software License Agreement](https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html). You must agree to their terms to use the native components.
93
+
-**Binding Code**: Licensed under the [MIT License](LICENSE).
94
+
-**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.
0 commit comments