Skip to content

Commit

Permalink
Merge pull request #27 from Live2D/develop
Browse files Browse the repository at this point in the history
Update to Cubism 4 SDK for Native beta1
  • Loading branch information
wada-at-live2d-com committed Sep 4, 2019
2 parents 0f5da49 + aa57257 commit badbaa8
Show file tree
Hide file tree
Showing 107 changed files with 1,246 additions and 935 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
# TODO: Specify character set
charset = unset
insert_final_newline = true
trim_trailing_whitespace = true
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Auto detect text files and perform LF normalization
* text=auto

# Explicitly declare files as LF
*.cpp text eol=lf
*.hpp text eol=lf
*.txt text eol=lf
*.md text eol=lf
.editorconfig text eol=lf
.gitattributes text eol=lf
*.gitignore text eol=lf
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [4-beta.1] - 2019-09-04

### Added

- Support new Inverted Masking features.
- Add `.editorconfig` and `.gitattributes` to manage file formats.
- Add `.gitignore`.
- Add `CHANGELOG.md`.

### Changed

- Convert all file formats according to `.editorconfig`.

### Fixed

- Fix typo of `CubismCdiJson`.
- Fix invalid expressions of `CubismCdiJson`.


[4-beta.1]: https://github.com/Live2D/CubismNativeFramework/compare/0f5da4981cc636fe3892bb94d5c60137c9cf1eb1...4-beta.1
66 changes: 30 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,96 +1,90 @@
# Cubism Native Framework

Live2D Cubism 3 Editorで出力したモデルをアプリケーションで利用するためのフレームワークです。
Live2D Cubism 4 Editorで出力したモデルをアプリケーションで利用するためのフレームワークです。

モデルを表示、操作するための各種機能を提供します。

モデルをロードするにはCubism Coreライブラリと組み合わせて使用します。


# コンポーネント
## コンポーネント

## Effect
### Effect

自動まばたきやリップシンクなど、モデルに対してモーション情報をエフェクト的に付加する機能を提供します。

## Id
### Id

モデルに設定されたパラメータ名・パーツ名・Drawable名を独自の型で管理する機能を提供します。

## Math
### Math

行列計算やベクトル計算など、モデルの操作や描画に必要な算術演算の機能を提供します。

## Model
### Model

モデルを取り扱うための各種機能(生成、更新、破棄)を提供します。

## Motion
### Motion

モデルにモーションデータを適用するための各種機能(モーション再生、パラメータブレンド)を提供します。

## Physics
### Physics

モデルに物理演算による変形操作を適用するための機能を提供します。

## Rendering
### Rendering

各種プラットフォームでモデルを描画するためのグラフィックス命令を実装したレンダラを提供します。

## Type
### Type

フレームワーク内で使用するC++型定義を提供します。

## Utils
### Utils

JSONパーサーやログ出力などのユーティリティ機能を提供します。


# Live2D Cubism Core for Native
## Live2D Cubism Core for Native

当リポジトリにはLive2D Cubism Core for Nativeは同梱されていません。

当リポジトリにはLive2D Cubism Core for Nativeは同梱されていません。ダウンロードするには[こちら](https://live2d.github.io/)のページを参照ください。
ダウンロードするには[こちら](https://www.live2d.com/download/cubism-sdk/download-native/)のページを参照ください。


# サンプル
## サンプル

標準的なアプリケーションの実装例については、下記サンプルリポジトリを参照ください。

[CubismNativeSamples](https://github.com/Live2D/CubismNativeSamples)


# マニュアル

[Cubism SDK Manual](http://docs.live2d.com/cubism-sdk-manual/top/)

## マニュアル

# 変更履歴
[Cubism SDK Manual](https://docs.live2d.com/cubism-sdk-manual/top/)

当リポジトリの変更履歴については[コミットログ](https://github.com/Live2D/CubismNativeFramework/commits/master)を参照ください。

## 変更履歴

# TODO
当リポジトリの変更履歴については[CHANGELOG.md](/CHANGELOG.md)を参照ください。

- 無し

## ライセンス

# ライセンス
Cubism Native Framework は Live2D Open Software License で提供しています。
- Live2D Open Software License
[日本語](http://www.live2d.com/eula/live2d-open-software-license-agreement_jp.html)
[English](http://www.live2d.com/eula/live2d-open-software-license-agreement_en.html)
- Live2D Open Software License

[日本語](https://www.live2d.com/eula/live2d-open-software-license-agreement_jp.html)
[English](https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html)

Live2D Cubism Core for Native は Live2D Proprietary Software License で提供しています。
- Live2D Proprietary Software License
[日本語](http://www.live2d.com/eula/live2d-proprietary-software-license-agreement_jp.html)
[English](http://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html)
- Live2D Proprietary Software License

[日本語](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_jp.html)
[English](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html)

直近会計年度の売上高が 1000 万円以上の事業者様がご利用になる場合は、SDKリリース(出版許諾)ライセンスに同意していただく必要がございます。
- [SDKリリース(出版許諾)ライセンス](http://www.live2d.com/ja/products/releaselicense)

直近会計年度の売上高が 1000 万円以上の事業者様がご利用になる場合は、SDKリリース(出版許諾)ライセンスに同意していただく必要がございます。
- [SDKリリース(出版許諾)ライセンス](https://www.live2d.com/ja/products/releaselicense)

*All business* users must obtain a Publication License. "Business" means an entity with the annual gross revenue more than ten million (10,000,000) JPY for the most recent fiscal year.
- [SDK Release (Publication) License](http://www.live2d.com/en/products/releaselicense)


- [SDK Release (Publication) License](https://www.live2d.com/en/products/releaselicense)
16 changes: 8 additions & 8 deletions src/CubismCdiJson.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at http://live2d.com/eula/live2d-open-software-license-agreement_en.html.
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/

#include "CubismCdiJson.hpp"
Expand All @@ -26,7 +26,7 @@ CubismCdiJson::CubismCdiJson(const csmByte* buffer, csmSizeInt size)
_json = Utils::CubismJson::Create(buffer, size);
}

CubismCdiJson::~CubismCdiJson()
CubismCdiJson::~CubismCdiJson()
{
Utils::CubismJson::Delete(_json);
}
Expand All @@ -51,23 +51,23 @@ csmBool CubismCdiJson::IsExistParts() const
}

// パラメータについて
csmInt32 CubismCdiJson::GetPrametersCount()
csmInt32 CubismCdiJson::GetParametersCount()
{
if (!IsExistParameters()) return 0;
return _json->GetRoot()[Parameters].GetSize();
}

const csmChar* CubismCdiJson::GetPrametersId(csmInt32 index)
const csmChar* CubismCdiJson::GetParametersId(csmInt32 index)
{
return _json->GetRoot()[Parameters][index][Id].GetRawString();
}

const csmChar* CubismCdiJson::GetPrametersGroupId(csmInt32 index)
const csmChar* CubismCdiJson::GetParametersGroupId(csmInt32 index)
{
return _json->GetRoot()[Parameters][index][GroupId].GetRawString();
}

const csmChar* CubismCdiJson::GetPrametersName(csmInt32 index)
const csmChar* CubismCdiJson::GetParametersName(csmInt32 index)
{
return _json->GetRoot()[Parameters][index][Name].GetRawString();
}
Expand Down Expand Up @@ -111,4 +111,4 @@ const csmChar* CubismCdiJson::GetPartsName(csmInt32 index)
return _json->GetRoot()[Parts][index][Name].GetRawString();
}

}}}
}}}
12 changes: 6 additions & 6 deletions src/CubismCdiJson.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at http://live2d.com/eula/live2d-open-software-license-agreement_en.html.
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/

#pragma once
Expand Down Expand Up @@ -34,13 +34,13 @@ class CubismCdiJson

// Parameters

csmInt32 GetPrametersCount();
csmInt32 GetParametersCount();

const csmChar* GetPrametersId(csmInt32 index);
const csmChar* GetParametersId(csmInt32 index);

const csmChar* GetPrametersGroupId(csmInt32 index);
const csmChar* GetParametersGroupId(csmInt32 index);

const csmChar* GetPrametersName(csmInt32 index);
const csmChar* GetParametersName(csmInt32 index);

// ParameterGroups

Expand Down
4 changes: 2 additions & 2 deletions src/CubismDefaultParameterId.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at http://live2d.com/eula/live2d-open-software-license-agreement_en.html.
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/

#include "CubismDefaultParameterId.hpp"
Expand Down
6 changes: 3 additions & 3 deletions src/CubismDefaultParameterId.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at http://live2d.com/eula/live2d-open-software-license-agreement_en.html.
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/

#pragma once
Expand All @@ -12,7 +12,7 @@
/**
* @brief パラメータIDのデフォルト値を保持する定数<br>
* デフォルト値の仕様は以下のマニュアルに基づく<br>
* http://docs.live2d.com/cubism-editor-manual/standard-parametor-list/
* https://docs.live2d.com/cubism-editor-manual/standard-parametor-list/
*/

//--------- LIVE2D NAMESPACE ------------
Expand Down
4 changes: 2 additions & 2 deletions src/CubismFramework.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at http://live2d.com/eula/live2d-open-software-license-agreement_en.html.
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/

#include "CubismFramework.hpp"
Expand Down
8 changes: 4 additions & 4 deletions src/CubismFramework.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at http://live2d.com/eula/live2d-open-software-license-agreement_en.html.
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/

#pragma once
Expand Down Expand Up @@ -176,7 +176,7 @@ extern const csmInt32 VertexStep; ///< メッシュ頂点のステップ値
}

/**
* @brief Live2D Cubism3 Original Workflow SDKのエントリポイント<br>
* @brief Live2D Cubism Original Workflow SDKのエントリポイント<br>
* 利用開始時はCubismFramework::Initialize()を呼び、CubismFramework::Dispose()で終了する。
*
*/
Expand Down Expand Up @@ -303,4 +303,4 @@ class CubismFramework
};

}}}
//--------- LIVE2D NAMESPACE ------------
//--------- LIVE2D NAMESPACE ------------
4 changes: 2 additions & 2 deletions src/CubismFrameworkConfig.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at http://live2d.com/eula/live2d-open-software-license-agreement_en.html.
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/

#pragma once
Expand Down
12 changes: 6 additions & 6 deletions src/CubismModelSettingJson.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at http://live2d.com/eula/live2d-open-software-license-agreement_en.html.
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/

#include "CubismModelSettingJson.hpp"
Expand All @@ -18,12 +18,12 @@ namespace Live2D { namespace Cubism { namespace Framework {
*
*/
namespace {

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-variable"
#endif

// JSON keys
const csmChar* Version = "Version";
const csmChar* FileReferences = "FileReferences";
Expand Down Expand Up @@ -179,7 +179,7 @@ CubismModelSettingJson::CubismModelSettingJson(const csmByte* buffer, csmSizeInt
{
_jsonValue.Clear();

// 順番はenum FrequentNodeと一致させる
// 順番はenum FrequentNodeと一致させる
_jsonValue.PushBack(&(_json->GetRoot()[Groups]));
_jsonValue.PushBack(&(_json->GetRoot()[FileReferences][Moc]));
_jsonValue.PushBack(&(_json->GetRoot()[FileReferences][Motions]));
Expand Down Expand Up @@ -329,7 +329,7 @@ const csmChar* CubismModelSettingJson::GetUserDataFile()
return _json->GetRoot()[FileReferences][UserData].GetRawString();
}

csmBool CubismModelSettingJson::GetLayoutMap(csmMap<csmString, csmFloat32>& outLayoutMap)
csmBool CubismModelSettingJson::GetLayoutMap(csmMap<csmString, csmFloat32>& outLayoutMap)
{
csmMap<csmString, Utils::Value*>* map = _json->GetRoot()[Layout].GetMap();
if (map == NULL)
Expand Down
Loading

0 comments on commit badbaa8

Please sign in to comment.