Skip to content

Commit 917d01c

Browse files
Merge pull request #13 from Live2D/develop
Update to Cubism 5 SDK for Java R2
2 parents b0a5ab2 + 0abad96 commit 917d01c

18 files changed

Lines changed: 273 additions & 56 deletions

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
8+
## [5-r.2] - 2024-11-07
9+
10+
### Added
11+
12+
* Add a function to notify when motion playback starts.
13+
* Add right orientation to the fixed orientations in the Android app.
14+
* Add a feature to change render target to the minimum sample.
15+
16+
### Fixed
17+
18+
* Fix a hang-up caused by an improper function call in the application termination process.
19+
* Fix a bug that caused white edge-like objects to be drawn when enabling the `USE_RENDER_TARGET` or `USE_MODEL_RENDER_TARGET` flag in `LAppDefine`.
20+
* Fix a bug where the method of obtaining color location differs between full sample and minimum sample.
21+
22+
### Removed
23+
24+
* Remove armeabi-v7a from architecture support.
25+
* Remove the `startMotion()` method that receives a callback in the minimum sample.
26+
* If you want to use the callback feature, please check the Full sample.
27+
28+
729
## [5-r.1] - 2024-03-26
830

931
### Added
@@ -140,6 +162,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
140162
* New released!
141163

142164

165+
[5-r.2]: https://github.com/Live2D/CubismJavaSamples/compare/5-r.1...5-r.2
143166
[5-r.1]: https://github.com/Live2D/CubismJavaSamples/compare/5-r.1-beta.3...5-r.1
144167
[5-r.1-beta.3]: https://github.com/Live2D/CubismJavaSamples/compare/5-r.1-beta.2...5-r.1-beta.3
145168
[5-r.1-beta.2]: https://github.com/Live2D/CubismJavaSamples/compare/5-r.1-beta.1...5-r.1-beta.2

Core/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77

8+
## 2024-11-07
9+
10+
### Added
11+
12+
* [Native] Add experimental support `arm64` library for linux.
13+
14+
### Removed
15+
16+
* [Unity,Native,Java] Remove Android ARM v7 library.
17+
18+
19+
## 2024-04-04
20+
21+
### Added
22+
23+
* [Unity] Add library(.so) for HarmonyOS build.
24+
25+
826
## 2024-03-26
927

1028
### Remove

Core/README.ja.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ Javaで開発する場合は、このファイルを使用してください。
1818
| プラットフォーム | アーキテクチャ | jar | aar | パス | 注記 |
1919
| --- |----------|---|-----|---|-----|
2020
| Android | ARM64 | || android/Live2DCubismCore.aar | |
21-
| Android | ARMv7 | || android/Live2DCubismCore.aar | このライブラリは現在非推奨で、近日中に削除される予定です。 |
2221
| Android | x86 | || android/Live2DCubismCore.aar | |
2322
| Android | x86_64 | || android/Live2DCubismCore.aar | |

Core/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ Use this file when developing with Java.
1818
| Platform | Architecture | jar | aar | Path | Note |
1919
| --- | --- | --- | --- |------------------------------| --- |
2020
| Android | ARM64 | || android/Live2DCubismCore.aar | |
21-
| Android | ARMv7 | || android/Live2DCubismCore.aar | This library is currently deprecated and will be removed in the near future. |
2221
| Android | x86 | || android/Live2DCubismCore.aar | |
2322
| Android | x86_64 | || android/Live2DCubismCore.aar | |

README.ja.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ Core : [CHANGELOG.md](Core/CHANGELOG.md)
7171

7272
| 開発ツール | バージョン |
7373
|----------------|------------------|
74-
| Android Studio | Iguana 2023.2.1 |
74+
| Android Studio | Ladybug 2024.2.1 Patch 2 |
7575
| Gradle | 8.2 |
76+
| Gradle JDK | 17.0.12 |
7677
| Android SDK | 34.0.0 |
7778

7879
## 動作確認環境
@@ -82,11 +83,11 @@ Core : [CHANGELOG.md](Core/CHANGELOG.md)
8283
本サンプルアプリケーションは**Java SE 7**以上のJavaバージョンで動作します。
8384

8485
### Android
85-
| バージョン | デバイス | Tegra |
86-
|-------|----------|-------|
87-
| 14 | Pixel 7a | |
88-
| 7.1.1 | Nexus 9 | |
89-
| 4.1 | Pixel 5 | |
86+
87+
| バージョン | デバイス | エミュレーター |
88+
|-------|----------|:-------:|
89+
| 14 | Pixel 7a | |
90+
| 5.0 | Pixel 7a | |
9091

9192
本サンプルアプリケーションは**Android API 21**以上のAndroidバージョンで動作します。
9293

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ Core : [CHANGELOG.md](Core/CHANGELOG.md)
7171

7272
| Development Tools | Version |
7373
|-------------------|--|
74-
| Android Studio | Iguana 2023.2.1 |
74+
| Android Studio | Ladybug 2024.2.1 Patch 2 |
7575
| Gradle | 8.2 |
76+
| Gradle JDK | 17.0.12 |
7677
| Android SDK | 34.0.0 |
7778

7879
## Operation environment
@@ -83,11 +84,10 @@ This sample application runs with **Java SE 7** or higher Java versions.
8384

8485
### Android
8586

86-
| Version | Device | Tegra |
87-
|---------|----------| --- |
88-
| 14 | Pixel 7a ||
89-
| 7.1.1 | Nexus 9 | ✔︎ |
90-
| 4.1 | Pixel 5 ||
87+
| Version | Device | Emulator |
88+
|---------|----------|:--------:|
89+
| 14 | Pixel 7a | |
90+
| 5.0 | Pixel 7a ||
9191

9292
This sample application runs with **Android API 21** or higher Android versions.
9393

Sample/src/full/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<activity
1616
android:name=".full.MainActivity"
1717
android:configChanges="orientation|screenSize"
18-
android:screenOrientation="landscape"
18+
android:screenOrientation="sensorLandscape"
1919
android:exported="true">
2020
<intent-filter>
2121
<action android:name="android.intent.action.MAIN"/>

Sample/src/full/java/com/live2d/demo/full/LAppDelegate.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public void run() {
113113
// アプリケーションを非アクティブにする
114114
if (!isActive) {
115115
activity.finishAndRemoveTask();
116-
System.exit(0);
117116
}
118117
}
119118

Sample/src/full/java/com/live2d/demo/full/LAppLive2DManager.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import com.live2d.sdk.cubism.framework.math.CubismMatrix44;
1111
import com.live2d.sdk.cubism.framework.motion.ACubismMotion;
12+
import com.live2d.sdk.cubism.framework.motion.IBeganMotionCallback;
1213
import com.live2d.sdk.cubism.framework.motion.IFinishedMotionCallback;
1314

1415
import java.io.IOException;
@@ -154,7 +155,7 @@ else if (model.hitTest(HitAreaName.BODY.getId(), x, y)) {
154155
LAppPal.printLog("hit area: " + HitAreaName.HEAD.getId());
155156
}
156157

157-
model.startRandomMotion(MotionGroup.TAP_BODY.getId(), Priority.NORMAL.getPriority(), finishedMotion);
158+
model.startRandomMotion(MotionGroup.TAP_BODY.getId(), Priority.NORMAL.getPriority(), finishedMotion, beganMotion);
158159
}
159160
}
160161
}
@@ -218,7 +219,7 @@ public void changeScene(int index) {
218219
LAppDelegate.getInstance().getView().switchRenderingTarget(useRenderingTarget);
219220

220221
// 別レンダリング先を選択した際の背景クリア色
221-
float[] clearColor = {1.0f, 1.0f, 1.0f};
222+
float[] clearColor = {0.0f, 0.0f, 0.0f};
222223
LAppDelegate.getInstance().getView().setRenderingTargetClearColor(clearColor[0], clearColor[1], clearColor[2]);
223224
}
224225

@@ -256,6 +257,18 @@ public int getModelNum() {
256257
return models.size();
257258
}
258259

260+
/**
261+
* モーション再生時に実行されるコールバック関数
262+
*/
263+
private static class BeganMotion implements IBeganMotionCallback {
264+
@Override
265+
public void execute(ACubismMotion motion) {
266+
LAppPal.printLog("Motion Began: " + motion);
267+
}
268+
}
269+
270+
private static final BeganMotion beganMotion = new BeganMotion();
271+
259272
/**
260273
* モーション終了時に実行されるコールバック関数
261274
*/

0 commit comments

Comments
 (0)