Skip to content

Commit 5349541

Browse files
Merge pull request #8 from Live2D/develop
Update to Cubism 5 SDK for Java R1 beta2
2 parents 2c93022 + 596cf12 commit 5349541

File tree

4 files changed

+30
-16
lines changed

4 files changed

+30
-16
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ 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+
## [5-r.1-beta.2] - 2023-09-28
8+
9+
### Added
10+
11+
* Add final modifier to some private fields in `CubismModel`.
12+
13+
### Changed
14+
15+
* Change getter functions to get some data without `getIdManager` in `CubismModel`.
16+
* Change some private fields in `CubismModel` to `final` variable.
17+
18+
719
## [5-r.1-beta.1] - 2023-08-17
820

921
### Added
@@ -122,6 +134,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
122134

123135
* New released!
124136

137+
[5-r.1-beta.2]: https://github.com/Live2D/CubismJavaFramework/compare/5-r.1-beta.1...5-r.1-beta.2
125138
[5-r.1-beta.1]: https://github.com/Live2D/CubismJavaFramework/compare/4-r.1...5-r.1-beta.1
126139
[4-r.1]: https://github.com/Live2D/CubismJavaFramework/compare/4-r.1-beta.4...4-r.1
127140
[4-r.1-beta.4]: https://github.com/Live2D/CubismJavaFramework/compare/4-r.1-beta.3...4-r.1-beta.4

README.ja.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ Live2Dコミュニティでは、問題のレポートと機能リクエスト
104104

105105
SDKの将来についてのフィードバックにも関心があります。Live2Dコミュニティで提案や機能のリクエストを送信できます。このプロセスをより効果的にするために、それらをより明確に定義するのに役立つより多くの情報を含めるようお願いしています。
106106

107-
## コミュニティ
107+
## フォーラム
108108

109-
ユーザー同士でCubism SDKの活用方法の提案や質問をしたい場合は、是非コミュニティをご活用ください
109+
ユーザー同士でCubism SDKの活用方法の提案や質問をしたい場合は、是非フォーラムをご活用ください
110110

111-
- [Live2D 公式コミュニティ](https://creatorsforum.live2d.com/)
112-
- [Live2D community(English)](https://community.live2d.com/)
111+
- [Live2D 公式クリエイターズフォーラム](https://creatorsforum.live2d.com/)
112+
- [Live2D Creator's Forum(English)](https://community.live2d.com/)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ We are regularly checking issue-reports and feature requests at Live2D Community
104104

105105
We're also interested in your feedback for the future of the SDK. You can submit a suggestion or feature request at Live2D Community. To make this process more effective, we're asking that you include more information to help define them more clearly.
106106

107-
## Community
107+
## Forum
108108

109-
If you want to suggest or ask questions about how to use the Cubism SDK between users, please use the community.
109+
If you want to suggest or ask questions about how to use the Cubism SDK between users, please use the forum.
110110

111-
- [Live2D community](https://community.live2d.com/)
112-
- [Live2D 公式コミュニティ (Japanese)](https://creatorsforum.live2d.com/)
111+
- [Live2D Creator's Forum](https://community.live2d.com/)
112+
- [Live2D 公式クリエイターズフォーラム (Japanese)](https://creatorsforum.live2d.com/)

framework/src/main/java/com/live2d/sdk/cubism/framework/model/CubismModel.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ public int getPartIndex(CubismId partId) {
267267
* @return パーツのID
268268
*/
269269
public CubismId getPartId(int partIndex){
270-
String partId = model.getPartViews()[partIndex].getId();
271-
return CubismFramework.getIdManager().getId(partId);
270+
assert (0 <= partIndex && partIndex < partIds.size());
271+
return partIds.get(partIndex);
272272
}
273273

274274
/**
@@ -395,7 +395,8 @@ public int getParameterIndex(CubismId parameterId) {
395395
* @return パラメータのID
396396
*/
397397
public CubismId getParameterId(int parameterIndex) {
398-
return CubismFramework.getIdManager().getId(parameterIds.get(parameterIndex));
398+
assert (0 <= parameterIndex && parameterIndex < parameterIds.size());
399+
return parameterIds.get(parameterIndex);
399400
}
400401

401402
/**
@@ -669,8 +670,8 @@ public int getDrawableCount() {
669670
* @return Drawable ID
670671
*/
671672
public CubismId getDrawableId(int drawableIndex) {
672-
final String drawableId = model.getDrawableViews()[drawableIndex].getId();
673-
return CubismFramework.getIdManager().getId(drawableId);
673+
assert (0 <= drawableIndex && drawableIndex < drawableIds.size());
674+
return drawableIds.get(drawableIndex);
674675
}
675676

676677
/**
@@ -1573,9 +1574,9 @@ private void setOverwriteColorsForPartColors(
15731574
*/
15741575
private float modelOpacity = 1.0f;
15751576

1576-
private List<CubismId> parameterIds = new ArrayList<CubismId>();
1577-
private List<CubismId> partIds = new ArrayList<CubismId>();
1578-
private List<CubismId> drawableIds = new ArrayList<CubismId>();
1577+
private final List<CubismId> parameterIds = new ArrayList<>();
1578+
private final List<CubismId> partIds = new ArrayList<>();
1579+
private final List<CubismId> drawableIds = new ArrayList<>();
15791580

15801581
/**
15811582
* Drawableの乗算色のリスト

0 commit comments

Comments
 (0)