diff -pruN --exclude build ./demo_clean/CMakeLists.txt ./demo_dev/CMakeLists.txt
---- ./demo_clean/CMakeLists.txt 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/CMakeLists.txt 2022-10-11 20:18:15.217358999 +0100
+--- ./demo_clean/CMakeLists.txt 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/CMakeLists.txt 2023-05-28 08:11:25.750067591 +0100
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
# Set app name.
set(APP_NAME Demo)
# Set directory paths.
-set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
-+set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../CubismSdkForNative-4-r.6.2)
++set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../CubismSdkForNative-4-r.7)
set(CORE_PATH ${SDK_ROOT_PATH}/Core)
set(FRAMEWORK_PATH ${SDK_ROOT_PATH}/Framework)
set(THIRD_PARTY_PATH ${SDK_ROOT_PATH}/Samples/OpenGL/thirdParty)
# Copy resource directory to build directory.
add_custom_command(
diff -pruN --exclude build ./demo_clean/scripts/make_gcc ./demo_dev/scripts/make_gcc
---- ./demo_clean/scripts/make_gcc 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/scripts/make_gcc 2021-05-29 02:04:17.338257917 +0100
+--- ./demo_clean/scripts/make_gcc 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/scripts/make_gcc 2023-05-28 08:11:25.750067591 +0100
@@ -5,41 +5,9 @@ set -ue
SCRIPT_PATH=$(cd $(dirname $0) && pwd)
CMAKE_PATH=$SCRIPT_PATH/..
+ -D CMAKE_BUILD_TYPE=Release
+cd "$BUILD_PATH" && make -j4
diff -pruN --exclude build ./demo_clean/src/CMakeLists.txt ./demo_dev/src/CMakeLists.txt
---- ./demo_clean/src/CMakeLists.txt 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/CMakeLists.txt 2021-04-28 11:49:43.166296000 +0100
+--- ./demo_clean/src/CMakeLists.txt 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/CMakeLists.txt 2023-05-28 08:11:25.750067591 +0100
@@ -1,49 +1,22 @@
-if (CSM_MINIMUM_DEMO)
- target_sources(${APP_NAME}
+ ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
+)
diff -pruN --exclude build ./demo_clean/src/LAppDelegate.cpp ./demo_dev/src/LAppDelegate.cpp
---- ./demo_clean/src/LAppDelegate.cpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppDelegate.cpp 2021-04-28 11:49:43.166296000 +0100
+--- ./demo_clean/src/LAppDelegate.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppDelegate.cpp 2023-05-28 08:11:25.750067591 +0100
@@ -45,7 +45,8 @@ void LAppDelegate::ReleaseInstance()
s_instance = NULL;
}
Csm::csmVector<string> LAppDelegate::Split(const std::string& baseString, char delimiter)
diff -pruN --exclude build ./demo_clean/src/LAppDelegate.hpp ./demo_dev/src/LAppDelegate.hpp
---- ./demo_clean/src/LAppDelegate.hpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppDelegate.hpp 2021-04-28 11:49:43.166296000 +0100
+--- ./demo_clean/src/LAppDelegate.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppDelegate.hpp 2023-05-28 08:11:25.754067666 +0100
@@ -40,7 +40,8 @@ public:
/**
* @brief APPに必要なものを初期化する。
-
-};
diff -pruN --exclude build ./demo_clean/src/LAppLive2DManager.cpp ./demo_dev/src/LAppLive2DManager.cpp
---- ./demo_clean/src/LAppLive2DManager.cpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppLive2DManager.cpp 2022-10-11 20:23:29.310727507 +0100
+--- ./demo_clean/src/LAppLive2DManager.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppLive2DManager.cpp 2023-05-28 08:11:25.754067666 +0100
@@ -52,11 +52,11 @@ void LAppLive2DManager::ReleaseInstance(
LAppLive2DManager::LAppLive2DManager()
+ _translateY = translateY;
+}
diff -pruN --exclude build ./demo_clean/src/LAppLive2DManager.hpp ./demo_dev/src/LAppLive2DManager.hpp
---- ./demo_clean/src/LAppLive2DManager.hpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppLive2DManager.hpp 2021-04-28 11:49:43.166296000 +0100
+--- ./demo_clean/src/LAppLive2DManager.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppLive2DManager.hpp 2023-05-28 08:11:25.750067591 +0100
@@ -6,12 +6,15 @@
*/
#pragma once
+ float _translateY;
};
diff -pruN --exclude build ./demo_clean/src/LAppModel.cpp ./demo_dev/src/LAppModel.cpp
---- ./demo_clean/src/LAppModel.cpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppModel.cpp 2021-04-28 11:49:43.166296000 +0100
+--- ./demo_clean/src/LAppModel.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppModel.cpp 2023-05-28 08:18:01.721395676 +0100
@@ -21,6 +21,8 @@
#include "LAppTextureManager.hpp"
#include "LAppDelegate.hpp"
//Layout
csmMap<csmString, csmFloat32> layout;
_modelSetting->GetLayoutMap(layout);
-@@ -347,59 +306,57 @@ void LAppModel::Update()
+@@ -347,62 +306,57 @@ void LAppModel::Update()
const csmFloat32 deltaTimeSeconds = LAppPal::GetDeltaTime();
_userTimeSeconds += deltaTimeSeconds;
+ auto idMan = CubismFramework::GetIdManager();
+ auto params = _detector->getParams();
+- // 不透明度
+- _opacity = _model->GetModelOpacity();
+-
- // まばたき
- if (!motionUpdated)
- {
}
// 物理演算の設定
-@@ -408,22 +365,6 @@ void LAppModel::Update()
+@@ -411,22 +365,6 @@ void LAppModel::Update()
_physics->Evaluate(_model, deltaTimeSeconds);
}
// ポーズの設定
if (_pose != NULL)
{
-@@ -492,7 +433,6 @@ CubismMotionQueueEntryHandle LAppModel::
+@@ -495,7 +433,6 @@ CubismMotionQueueEntryHandle LAppModel::
{
csmString path = voice;
path = _modelHomeDir + path;
}
if (_debugMode)
-@@ -644,3 +584,37 @@ Csm::Rendering::CubismOffscreenFrame_Ope
+@@ -647,3 +584,37 @@ Csm::Rendering::CubismOffscreenFrame_Ope
{
return _renderBuffer;
}
+}
+
diff -pruN --exclude build ./demo_clean/src/LAppModel.hpp ./demo_dev/src/LAppModel.hpp
---- ./demo_clean/src/LAppModel.hpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppModel.hpp 2021-04-28 11:49:43.166296000 +0100
+--- ./demo_clean/src/LAppModel.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppModel.hpp 2023-05-28 08:11:25.754067666 +0100
@@ -13,7 +13,7 @@
#include <Type/csmRectF.hpp>
#include <Rendering/OpenGL/CubismOffscreenSurface_OpenGLES2.hpp>
diff -pruN --exclude build ./demo_clean/src/LAppPal.cpp ./demo_dev/src/LAppPal.cpp
---- ./demo_clean/src/LAppPal.cpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppPal.cpp 2021-04-28 11:49:43.170296000 +0100
+--- ./demo_clean/src/LAppPal.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppPal.cpp 2023-05-28 08:11:25.750067591 +0100
@@ -6,6 +6,7 @@
*/
}
file.read(buf, size);
diff -pruN --exclude build ./demo_clean/src/LAppTextureManager.cpp ./demo_dev/src/LAppTextureManager.cpp
---- ./demo_clean/src/LAppTextureManager.cpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppTextureManager.cpp 2021-04-28 11:49:43.178296000 +0100
+--- ./demo_clean/src/LAppTextureManager.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppTextureManager.cpp 2023-05-28 08:11:25.754067666 +0100
@@ -96,6 +96,46 @@ LAppTextureManager::TextureInfo* LAppTex
}
{
for (Csm::csmUint32 i = 0; i < _textures.GetSize(); i++)
diff -pruN --exclude build ./demo_clean/src/LAppTextureManager.hpp ./demo_dev/src/LAppTextureManager.hpp
---- ./demo_clean/src/LAppTextureManager.hpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppTextureManager.hpp 2021-04-28 11:49:43.178296000 +0100
+--- ./demo_clean/src/LAppTextureManager.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppTextureManager.hpp 2023-05-28 08:11:25.750067591 +0100
@@ -72,6 +72,8 @@ public:
*/
TextureInfo* CreateTextureFromPngFile(std::string fileName);
* @brief 画像の解放
*
diff -pruN --exclude build ./demo_clean/src/LAppView.cpp ./demo_dev/src/LAppView.cpp
---- ./demo_clean/src/LAppView.cpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppView.cpp 2021-04-28 11:49:43.178296000 +0100
+--- ./demo_clean/src/LAppView.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppView.cpp 2023-05-28 08:11:25.750067591 +0100
@@ -13,7 +13,6 @@
#include "LAppLive2DManager.hpp"
#include "LAppTextureManager.hpp"
- }
}
diff -pruN --exclude build ./demo_clean/src/LAppView.hpp ./demo_dev/src/LAppView.hpp
---- ./demo_clean/src/LAppView.hpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/LAppView.hpp 2021-04-28 11:49:43.178296000 +0100
+--- ./demo_clean/src/LAppView.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppView.hpp 2023-05-28 08:11:25.750067591 +0100
@@ -14,7 +14,6 @@
#include "CubismFramework.hpp"
#include <Rendering/OpenGL/CubismOffscreenSurface_OpenGLES2.hpp>
// レンダリング先を別ターゲットにする方式の場合に使用
LAppSprite* _renderSprite; ///< モードによっては_renderBufferのテクスチャを描画
diff -pruN --exclude build ./demo_clean/src/main.cpp ./demo_dev/src/main.cpp
---- ./demo_clean/src/main.cpp 2022-09-14 12:08:43.000000000 +0100
-+++ ./demo_dev/src/main.cpp 2021-04-28 11:49:43.178296000 +0100
+--- ./demo_clean/src/main.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/main.cpp 2023-05-28 08:11:25.750067591 +0100
@@ -5,18 +5,162 @@
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
diff -pruN --exclude build ./demo_clean/CMakeLists.txt ./demo_dev/CMakeLists.txt
---- ./demo_clean/CMakeLists.txt 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/CMakeLists.txt 2023-03-05 23:22:10.756801200 +0000
+--- ./demo_clean/CMakeLists.txt 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/CMakeLists.txt 2023-05-28 08:28:27.492813451 +0100
@@ -9,7 +9,7 @@ option(
# Set app name.
set(APP_NAME Demo)
# Set directory paths.
-set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
-+set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../CubismSdkForNative-4-r.6.2)
++set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../CubismSdkForNative-4-r.7)
set(CORE_PATH ${SDK_ROOT_PATH}/Core)
set(FRAMEWORK_PATH ${SDK_ROOT_PATH}/Framework)
set(THIRD_PARTY_PATH ${SDK_ROOT_PATH}/Samples/OpenGL/thirdParty)
target_compile_options(${APP_NAME} PRIVATE /MP)
diff -pruN --exclude build ./demo_clean/src/CMakeLists.txt ./demo_dev/src/CMakeLists.txt
---- ./demo_clean/src/CMakeLists.txt 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/CMakeLists.txt 2023-03-05 23:22:10.976777100 +0000
+--- ./demo_clean/src/CMakeLists.txt 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/CMakeLists.txt 2023-05-28 08:28:27.492813451 +0100
@@ -1,49 +1,22 @@
-if (CSM_MINIMUM_DEMO)
- target_sources(${APP_NAME}
+ ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
+)
diff -pruN --exclude build ./demo_clean/src/CubismUserModelExtend.cpp ./demo_dev/src/CubismUserModelExtend.cpp
---- ./demo_clean/src/CubismUserModelExtend.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/CubismUserModelExtend.cpp 2023-03-05 23:22:10.780128700 +0000
+--- ./demo_clean/src/CubismUserModelExtend.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/CubismUserModelExtend.cpp 2023-05-28 08:28:27.492813451 +0100
@@ -1,4 +1,4 @@
-/**
+/**
if (_physics)
{
diff -pruN --exclude build ./demo_clean/src/CubismUserModelExtend.hpp ./demo_dev/src/CubismUserModelExtend.hpp
---- ./demo_clean/src/CubismUserModelExtend.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/CubismUserModelExtend.hpp 2023-03-05 23:22:10.986750400 +0000
+--- ./demo_clean/src/CubismUserModelExtend.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/CubismUserModelExtend.hpp 2023-05-28 08:28:27.492813451 +0100
@@ -27,17 +27,13 @@ class CubismUserModelExtend :
{
public:
/**
diff -pruN --exclude build ./demo_clean/src/LAppAllocator.cpp ./demo_dev/src/LAppAllocator.cpp
---- ./demo_clean/src/LAppAllocator.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppAllocator.cpp 2023-03-05 23:22:10.847976000 +0000
+--- ./demo_clean/src/LAppAllocator.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppAllocator.cpp 2023-05-28 08:28:27.492813451 +0100
@@ -1,4 +1,4 @@
-/**
+/**
return malloc(size);
}
diff -pruN --exclude build ./demo_clean/src/LAppAllocator.hpp ./demo_dev/src/LAppAllocator.hpp
---- ./demo_clean/src/LAppAllocator.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppAllocator.hpp 2023-03-05 23:22:10.953083600 +0000
+--- ./demo_clean/src/LAppAllocator.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppAllocator.hpp 2023-05-28 08:28:27.492813451 +0100
@@ -1,4 +1,4 @@
-/**
+/**
*
* Use of this source code is governed by the Live2D Open Software license
diff -pruN --exclude build ./demo_clean/src/LAppDefine.cpp ./demo_dev/src/LAppDefine.cpp
---- ./demo_clean/src/LAppDefine.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppDefine.cpp 2023-03-05 23:22:10.995458800 +0000
+--- ./demo_clean/src/LAppDefine.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppDefine.cpp 2023-05-28 08:28:27.496813523 +0100
@@ -1,4 +1,4 @@
-/**
+/**
const csmFloat32 ViewLogicalMaxLeft = -2.0f;
const csmFloat32 ViewLogicalMaxRight = 2.0f;
diff -pruN --exclude build ./demo_clean/src/LAppDefine.hpp ./demo_dev/src/LAppDefine.hpp
---- ./demo_clean/src/LAppDefine.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppDefine.hpp 2023-03-05 23:22:10.947784100 +0000
+--- ./demo_clean/src/LAppDefine.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppDefine.hpp 2023-05-28 08:28:27.496813523 +0100
@@ -1,9 +1,10 @@
-/**
+/**
#include <CubismFramework.hpp>
diff -pruN --exclude build ./demo_clean/src/LAppDelegate.cpp ./demo_dev/src/LAppDelegate.cpp
---- ./demo_clean/src/LAppDelegate.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppDelegate.cpp 2023-03-05 23:22:10.975780100 +0000
+--- ./demo_clean/src/LAppDelegate.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppDelegate.cpp 2023-05-28 08:28:27.496813523 +0100
@@ -1,4 +1,4 @@
-/**
+/**
+ return elems;
}
diff -pruN --exclude build ./demo_clean/src/LAppDelegate.hpp ./demo_dev/src/LAppDelegate.hpp
---- ./demo_clean/src/LAppDelegate.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppDelegate.hpp 2023-03-05 23:22:10.789104800 +0000
+--- ./demo_clean/src/LAppDelegate.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppDelegate.hpp 2023-05-28 08:28:27.496813523 +0100
@@ -1,4 +1,4 @@
-/**
+/**
-
-};
diff -pruN --exclude build ./demo_clean/src/LAppLive2DManager.cpp ./demo_dev/src/LAppLive2DManager.cpp
---- ./demo_clean/src/LAppLive2DManager.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppLive2DManager.cpp 2023-03-05 23:22:10.967799000 +0000
+--- ./demo_clean/src/LAppLive2DManager.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppLive2DManager.cpp 2023-05-28 08:28:27.496813523 +0100
@@ -1,4 +1,4 @@
-/**
+/**
+ _translateY = translateY;
+}
diff -pruN --exclude build ./demo_clean/src/LAppLive2DManager.hpp ./demo_dev/src/LAppLive2DManager.hpp
---- ./demo_clean/src/LAppLive2DManager.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppLive2DManager.hpp 2023-03-05 23:22:10.829032000 +0000
+--- ./demo_clean/src/LAppLive2DManager.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppLive2DManager.hpp 2023-05-28 08:28:27.496813523 +0100
@@ -1,18 +1,20 @@
-/**
+/**
+ float _translateY;
};
diff -pruN --exclude build ./demo_clean/src/LAppModel.cpp ./demo_dev/src/LAppModel.cpp
---- ./demo_clean/src/LAppModel.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppModel.cpp 2023-03-05 23:22:10.797100200 +0000
+--- ./demo_clean/src/LAppModel.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppModel.cpp 2023-05-28 08:34:09.047010843 +0100
@@ -1,4 +1,4 @@
-/**
+/**
using namespace Live2D::Cubism::Framework;
using namespace Live2D::Cubism::Framework::DefaultParameterId;
using namespace LAppDefine;
-@@ -45,22 +47,24 @@ namespace {
+@@ -45,10 +47,12 @@ namespace {
}
}
+ , _detector(nullptr)
+ , _useOldParamId(useOldParamId)
{
- if (DebugLogEnable)
+ if (MocConsistencyValidationEnable)
{
+@@ -60,12 +64,12 @@ LAppModel::LAppModel()
_debugMode = true;
}
}
LAppModel::~LAppModel()
-@@ -96,12 +100,6 @@ void LAppModel::LoadAssets(const csmChar
+@@ -101,12 +105,6 @@ void LAppModel::LoadAssets(const csmChar
SetupModel(setting);
CreateRenderer();
SetupTextures();
-@@ -134,30 +132,6 @@ void LAppModel::SetupModel(ICubismModelS
+@@ -138,30 +136,6 @@ void LAppModel::SetupModel(ICubismModelS
DeleteBuffer(buffer, path.GetRawString());
}
//Physics
if (strcmp(_modelSetting->GetPhysicsFileName(), "") != 0)
{
-@@ -196,7 +170,7 @@ void LAppModel::SetupModel(ICubismModelS
+@@ -200,7 +174,7 @@ void LAppModel::SetupModel(ICubismModelS
breathParameters.PushBack(CubismBreath::BreathParameterData(_idParamAngleY, 0.0f, 8.0f, 3.5345f, 0.5f));
breathParameters.PushBack(CubismBreath::BreathParameterData(_idParamAngleZ, 0.0f, 10.0f, 5.5345f, 0.5f));
breathParameters.PushBack(CubismBreath::BreathParameterData(_idParamBodyAngleX, 0.0f, 4.0f, 15.5345f, 0.5f));
_breath->SetParameters(breathParameters);
}
-@@ -220,21 +194,6 @@ void LAppModel::SetupModel(ICubismModelS
+@@ -224,21 +198,6 @@ void LAppModel::SetupModel(ICubismModelS
}
}
//Layout
csmMap<csmString, csmFloat32> layout;
_modelSetting->GetLayoutMap(layout);
-@@ -347,59 +306,57 @@ void LAppModel::Update()
+@@ -351,62 +310,57 @@ void LAppModel::Update()
const csmFloat32 deltaTimeSeconds = LAppPal::GetDeltaTime();
_userTimeSeconds += deltaTimeSeconds;
- //-----------------------------------------------------------------
- _model->LoadParameters(); // 前回セーブされた状態をロード
- if (_motionManager->IsFinished())
-+ if (_detector)
- {
+- {
- // モーションの再生がない場合、待機モーションの中からランダムで再生する
- StartRandomMotion(MotionGroupIdle, PriorityIdle);
- }
- else
-- {
++ if (_detector)
+ {
- motionUpdated = _motionManager->UpdateMotion(_model, deltaTimeSeconds); // モーションを更新
- }
- _model->SaveParameters(); // 状態を保存
+ auto idMan = CubismFramework::GetIdManager();
+ auto params = _detector->getParams();
+- // 不透明度
+- _opacity = _model->GetModelOpacity();
+-
- // まばたき
- if (!motionUpdated)
- {
}
// 物理演算の設定
-@@ -408,22 +365,6 @@ void LAppModel::Update()
+@@ -415,22 +369,6 @@ void LAppModel::Update()
_physics->Evaluate(_model, deltaTimeSeconds);
}
// ポーズの設定
if (_pose != NULL)
{
-@@ -492,7 +433,6 @@ CubismMotionQueueEntryHandle LAppModel::
+@@ -499,7 +437,6 @@ CubismMotionQueueEntryHandle LAppModel::
{
csmString path = voice;
path = _modelHomeDir + path;
}
if (_debugMode)
-@@ -644,3 +584,37 @@ Csm::Rendering::CubismOffscreenFrame_Ope
- {
- return _renderBuffer;
+@@ -678,3 +615,37 @@ csmBool LAppModel::HasMocConsistencyFrom
+
+ return consistency;
}
+
+void LAppModel::SetFacialLandmarkDetector(FacialLandmarkDetector *detector)
+}
+
diff -pruN --exclude build ./demo_clean/src/LAppModel.hpp ./demo_dev/src/LAppModel.hpp
---- ./demo_clean/src/LAppModel.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppModel.hpp 2023-03-05 23:22:10.907889300 +0000
+--- ./demo_clean/src/LAppModel.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppModel.hpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
/**
* @brief デストラクタ
-@@ -114,6 +117,13 @@ public:
+@@ -122,6 +125,13 @@ public:
*/
- Csm::Rendering::CubismOffscreenFrame_OpenGLES2& GetRenderBuffer();
+ Csm::csmBool HasMocConsistencyFromFile(const Csm::csmChar* mocFileName);
+ /**
+ * @brief Set the pointer to the FacialLandmarkDetector instance
protected:
/**
* @brief モデルを描画する処理。モデルを描画する空間のView-Projection行列を渡す。
-@@ -167,6 +177,17 @@ private:
+@@ -175,6 +185,17 @@ private:
*/
void ReleaseExpressions();
Csm::ICubismModelSetting* _modelSetting; ///< モデルセッティング情報
Csm::csmString _modelHomeDir; ///< モデルセッティングが置かれたディレクトリ
Csm::csmFloat32 _userTimeSeconds; ///< デルタ時間の積算値[秒]
-@@ -183,9 +204,9 @@ private:
+@@ -191,9 +212,9 @@ private:
const Csm::CubismId* _idParamEyeBallX; ///< パラメータID: ParamEyeBallX
const Csm::CubismId* _idParamEyeBallY; ///< パラメータID: ParamEyeBallXY
diff -pruN --exclude build ./demo_clean/src/LAppPal.cpp ./demo_dev/src/LAppPal.cpp
---- ./demo_clean/src/LAppPal.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppPal.cpp 2023-03-05 23:22:10.834981800 +0000
+--- ./demo_clean/src/LAppPal.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppPal.cpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
}
diff -pruN --exclude build ./demo_clean/src/LAppPal.hpp ./demo_dev/src/LAppPal.hpp
---- ./demo_clean/src/LAppPal.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppPal.hpp 2023-03-05 23:22:10.939820800 +0000
+--- ./demo_clean/src/LAppPal.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppPal.hpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
/**
diff -pruN --exclude build ./demo_clean/src/LAppSprite.cpp ./demo_dev/src/LAppSprite.cpp
---- ./demo_clean/src/LAppSprite.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppSprite.cpp 2023-03-05 23:22:10.900085700 +0000
+--- ./demo_clean/src/LAppSprite.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppSprite.cpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
float y = maxHeight - pointY;
diff -pruN --exclude build ./demo_clean/src/LAppSprite.hpp ./demo_dev/src/LAppSprite.hpp
---- ./demo_clean/src/LAppSprite.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppSprite.hpp 2023-03-05 23:22:10.876156000 +0000
+--- ./demo_clean/src/LAppSprite.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppSprite.hpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
int _uvLocation; ///< UVアトリビュート
int _textureLocation; ///< テクスチャアトリビュート
diff -pruN --exclude build ./demo_clean/src/LAppTextureManager.cpp ./demo_dev/src/LAppTextureManager.cpp
---- ./demo_clean/src/LAppTextureManager.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppTextureManager.cpp 2023-03-05 23:22:10.765166600 +0000
+--- ./demo_clean/src/LAppTextureManager.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppTextureManager.cpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
{
for (Csm::csmUint32 i = 0; i < _textures.GetSize(); i++)
diff -pruN --exclude build ./demo_clean/src/LAppTextureManager.hpp ./demo_dev/src/LAppTextureManager.hpp
---- ./demo_clean/src/LAppTextureManager.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppTextureManager.hpp 2023-03-05 23:22:10.822016600 +0000
+--- ./demo_clean/src/LAppTextureManager.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppTextureManager.hpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
private:
diff -pruN --exclude build ./demo_clean/src/LAppView.cpp ./demo_dev/src/LAppView.cpp
---- ./demo_clean/src/LAppView.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppView.cpp 2023-03-05 23:22:10.804064800 +0000
+--- ./demo_clean/src/LAppView.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppView.cpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
- for (csmUint32 i = 0; i < Live2DManager->GetModelNum(); i++)
+ for(csmUint32 i=0; i<Live2DManager->GetModelNum(); i++)
{
- float alpha = GetSpriteAlpha(i); // サンプルとしてαに適当な差をつける
- _renderSprite->SetColor(1.0f, 1.0f, 1.0f, alpha);
+ LAppModel* model = Live2DManager->GetModel(i);
+ float alpha = i < 1 ? 1.0f : model->GetOpacity(); // 片方のみ不透明度を取得できるようにする
@@ -133,7 +126,7 @@ void LAppView::Render()
- LAppModel *model = Live2DManager->GetModel(i);
+
if (model)
{
- _renderSprite->RenderImmidiate( model->GetRenderBuffer().GetColorBuffer(), uvVertex);
- }
}
diff -pruN --exclude build ./demo_clean/src/LAppView.hpp ./demo_dev/src/LAppView.hpp
---- ./demo_clean/src/LAppView.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/LAppView.hpp 2023-03-05 23:22:10.892081200 +0000
+--- ./demo_clean/src/LAppView.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/LAppView.hpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
SelectTarget _renderTarget; ///< レンダリング先の選択肢
float _clearColor[4]; ///< レンダリングターゲットのクリアカラー
diff -pruN --exclude build ./demo_clean/src/MouseActionManager.cpp ./demo_dev/src/MouseActionManager.cpp
---- ./demo_clean/src/MouseActionManager.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/MouseActionManager.cpp 2023-03-05 23:22:10.841970900 +0000
+--- ./demo_clean/src/MouseActionManager.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/MouseActionManager.cpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,9 +1,9 @@
-/**
- * Copyright(c) Live2D Inc. All rights reserved.
}
diff -pruN --exclude build ./demo_clean/src/MouseActionManager.hpp ./demo_dev/src/MouseActionManager.hpp
---- ./demo_clean/src/MouseActionManager.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/MouseActionManager.hpp 2023-03-05 23:22:10.961094400 +0000
+--- ./demo_clean/src/MouseActionManager.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/MouseActionManager.hpp 2023-05-28 08:28:27.500813596 +0100
@@ -1,4 +1,4 @@
-/**
+/**
*
* Use of this source code is governed by the Live2D Open Software license
diff -pruN --exclude build ./demo_clean/src/TouchManager.cpp ./demo_dev/src/TouchManager.cpp
---- ./demo_clean/src/TouchManager.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/TouchManager.cpp 2023-03-05 23:22:10.861957900 +0000
+--- ./demo_clean/src/TouchManager.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/TouchManager.cpp 2023-05-28 08:28:27.504813669 +0100
@@ -1,4 +1,4 @@
-/**
+/**
*
* Use of this source code is governed by the Live2D Open Software license
diff -pruN --exclude build ./demo_clean/src/TouchManager.hpp ./demo_dev/src/TouchManager.hpp
---- ./demo_clean/src/TouchManager.hpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/TouchManager.hpp 2023-03-05 23:22:10.884102300 +0000
+--- ./demo_clean/src/TouchManager.hpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/TouchManager.hpp 2023-05-28 08:28:27.504813669 +0100
@@ -1,4 +1,4 @@
-/**
+/**
*
* Use of this source code is governed by the Live2D Open Software license
diff -pruN --exclude build ./demo_clean/src/main.cpp ./demo_dev/src/main.cpp
---- ./demo_clean/src/main.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/main.cpp 2023-03-05 23:22:10.772150300 +0000
+--- ./demo_clean/src/main.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/main.cpp 2023-05-28 08:28:27.504813669 +0100
@@ -1,22 +1,166 @@
-/**
+/**
}
-
diff -pruN --exclude build ./demo_clean/src/mainMinimum.cpp ./demo_dev/src/mainMinimum.cpp
---- ./demo_clean/src/mainMinimum.cpp 2023-02-20 11:39:40.000000000 +0000
-+++ ./demo_dev/src/mainMinimum.cpp 2023-03-05 23:22:10.854990900 +0000
+--- ./demo_clean/src/mainMinimum.cpp 2023-05-18 09:58:50.000000000 +0100
++++ ./demo_dev/src/mainMinimum.cpp 2023-05-28 08:28:27.504813669 +0100
@@ -1,4 +1,4 @@
-/**
+/**