-diff -pruN --exclude build ./demo_clean/CMakeLists.txt ./demo_dev/CMakeLists.txt
---- ./demo_clean/CMakeLists.txt 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/CMakeLists.txt 2025-05-30 00:21:21.567335561 +0100
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 45c4b1a..81273bc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
@@ -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-5-r.4.1)
++set(SDK_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../CubismSdkForNative-5-r.5)
set(CORE_PATH ${SDK_ROOT_PATH}/Core)
set(FRAMEWORK_PATH ${SDK_ROOT_PATH}/Framework)
set(THIRD_PARTY_PATH ${SDK_ROOT_PATH}/Samples/OpenGL/thirdParty)
-@@ -35,7 +35,7 @@ set(GLFW_INSTALL OFF CACHE BOOL "" FORCE
+@@ -35,7 +35,7 @@ set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
set(BUILD_UTILS OFF CACHE BOOL "" FORCE)
# Specify version of compiler.
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
-@@ -67,6 +67,9 @@ target_link_libraries(Framework Live2DCu
+@@ -67,6 +67,9 @@ target_link_libraries(Framework Live2DCubismCore glew_s)
# Find opengl libraries.
find_package(OpenGL REQUIRED)
# 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 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/scripts/make_gcc 2023-05-28 08:11:25.750067591 +0100
+diff --git a/scripts/make_gcc b/scripts/make_gcc
+index 4441a91..71adb1a 100755
+--- a/scripts/make_gcc
++++ b/scripts/make_gcc
@@ -5,42 +5,9 @@ set -ue
SCRIPT_PATH=$(cd $(dirname $0) && pwd)
CMAKE_PATH=$SCRIPT_PATH/..
-cd "$BUILD_PATH" && make
+ -D CMAKE_BUILD_TYPE=Release
+cd "$BUILD_PATH" && make -j4
-diff -pruN --exclude build ./demo_clean/src/LAppDelegate.cpp ./demo_dev/src/LAppDelegate.cpp
---- ./demo_clean/src/LAppDelegate.cpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppDelegate.cpp 2025-05-30 00:26:43.606709298 +0100
+diff --git a/src/LAppDelegate.cpp b/src/LAppDelegate.cpp
+index 242e3ca..2da992d 100644
+--- a/src/LAppDelegate.cpp
++++ b/src/LAppDelegate.cpp
@@ -46,7 +46,8 @@ void LAppDelegate::ReleaseInstance()
s_instance = NULL;
}
// ウィンドウサイズ記憶
int width, height;
glfwGetWindowSize(LAppDelegate::GetInstance()->GetWindow(), &width, &height);
-diff -pruN --exclude build ./demo_clean/src/LAppDelegate.hpp ./demo_dev/src/LAppDelegate.hpp
---- ./demo_clean/src/LAppDelegate.hpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppDelegate.hpp 2025-05-30 00:27:33.073033913 +0100
+diff --git a/src/LAppDelegate.hpp b/src/LAppDelegate.hpp
+index 89ea99b..50279fd 100644
+--- a/src/LAppDelegate.hpp
++++ b/src/LAppDelegate.hpp
@@ -40,7 +40,8 @@ public:
/**
* @brief APPに必要なものを初期化する。
/**
* @brief 解放する。
-diff -pruN --exclude build ./demo_clean/src/LAppLive2DManager.cpp ./demo_dev/src/LAppLive2DManager.cpp
---- ./demo_clean/src/LAppLive2DManager.cpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppLive2DManager.cpp 2025-05-30 00:44:31.339709983 +0100
+diff --git a/src/LAppLive2DManager.cpp b/src/LAppLive2DManager.cpp
+index ac3d356..18973df 100644
+--- a/src/LAppLive2DManager.cpp
++++ b/src/LAppLive2DManager.cpp
@@ -6,13 +6,7 @@
*/
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <Rendering/CubismRenderer.hpp>
-@@ -68,12 +62,11 @@ void LAppLive2DManager::ReleaseInstance(
+@@ -69,12 +63,11 @@ void LAppLive2DManager::ReleaseInstance()
LAppLive2DManager::LAppLive2DManager()
: _viewMatrix(NULL)
}
LAppLive2DManager::~LAppLive2DManager()
-@@ -92,60 +85,6 @@ void LAppLive2DManager::ReleaseAllModel(
+@@ -94,60 +87,6 @@ void LAppLive2DManager::ReleaseAllModel()
_models.Clear();
}
LAppModel* LAppLive2DManager::GetModel(csmUint32 no) const
{
if (no < _models.GetSize())
-@@ -172,26 +111,6 @@ void LAppLive2DManager::OnTap(csmFloat32
+@@ -184,26 +123,6 @@ void LAppLive2DManager::OnTap(csmFloat32 x, csmFloat32 y)
{
LAppPal::PrintLogLn("[APP]tap point: {x:%.2f y:%.2f}", x, y);
}
}
void LAppLive2DManager::OnUpdate() const
-@@ -215,12 +134,15 @@ void LAppLive2DManager::OnUpdate() const
+@@ -230,12 +149,15 @@ void LAppLive2DManager::OnUpdate() const
{
// 横に長いモデルを縦長ウィンドウに表示する際モデルの横サイズでscaleを算出する
model->GetModelMatrix()->SetWidth(2.0f);
// 必要があればここで乗算
if (_viewMatrix != NULL)
-@@ -237,37 +159,15 @@ void LAppLive2DManager::OnUpdate() const
- }
+@@ -257,37 +179,15 @@ void LAppLive2DManager::OnUpdate() const
+ Csm::Rendering::CubismOffscreenManager_OpenGLES2::GetInstance()->ReleaseStaleRenderTextures();
}
-void LAppLive2DManager::NextScene()
/*
* モデル半透明表示を行うサンプルを提示する。
-@@ -288,8 +188,8 @@ void LAppLive2DManager::ChangeScene(Csm:
+@@ -308,8 +208,8 @@ void LAppLive2DManager::ChangeScene(Csm::csmInt32 index)
#if defined(USE_RENDER_TARGET) || defined(USE_MODEL_RENDER_TARGET)
// モデル個別にαを付けるサンプルとして、もう1体モデルを作成し、少し位置をずらす
_models[1]->GetModelMatrix()->TranslateX(0.2f);
#endif
-@@ -317,3 +217,20 @@ void LAppLive2DManager::SetViewMatrix(Cu
+@@ -337,3 +237,20 @@ void LAppLive2DManager::SetViewMatrix(CubismMatrix44* m)
_viewMatrix->GetArray()[i] = m->GetArray()[i];
}
}
+ _translateX = translateX;
+ _translateY = translateY;
+}
-diff -pruN --exclude build ./demo_clean/src/LAppLive2DManager.hpp ./demo_dev/src/LAppLive2DManager.hpp
---- ./demo_clean/src/LAppLive2DManager.hpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppLive2DManager.hpp 2025-05-30 00:29:35.257630136 +0100
+diff --git a/src/LAppLive2DManager.hpp b/src/LAppLive2DManager.hpp
+index 2c9939c..1d9755c 100644
+--- a/src/LAppLive2DManager.hpp
++++ b/src/LAppLive2DManager.hpp
@@ -6,12 +6,15 @@
*/
#pragma once
/**
* @brief サンプルアプリケーションにおいてCubismModelを管理するクラス<br>
* モデル生成と破棄、タップイベントの処理、モデル切り替えを行う。
-@@ -36,24 +39,6 @@ public:
+@@ -35,24 +38,6 @@ public:
+ */
static void ReleaseInstance();
- /**
+- /**
- * @brief Resources フォルダにあるモデルフォルダ名をセットする
- *
- */
- */
- Csm::csmInt32 GetModelDirSize() const;
-
-- /**
+ /**
* @brief 現在のシーンで保持しているモデルを返す
*
- * @param[in] no モデルリストのインデックス値
-@@ -90,16 +75,14 @@ public:
+@@ -98,16 +83,14 @@ public:
void OnUpdate() const;
/**
/**
* @brief モデル個数を得る
-@@ -112,6 +95,24 @@ public:
+@@ -120,6 +103,24 @@ public:
*/
void SetViewMatrix(Live2D::Cubism::Framework::CubismMatrix44* m);
private:
/**
* @brief コンストラクタ
-@@ -125,7 +126,8 @@ private:
+@@ -133,7 +134,8 @@ private:
Csm::CubismMatrix44* _viewMatrix; ///< モデル描画に用いるView行列
Csm::csmVector<LAppModel*> _models; ///< モデルインスタンスのコンテナ
+ float _translateX;
+ float _translateY;
};
-diff -pruN --exclude build ./demo_clean/src/LAppModel.cpp ./demo_dev/src/LAppModel.cpp
---- ./demo_clean/src/LAppModel.cpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppModel.cpp 2025-05-30 00:31:25.128030278 +0100
-@@ -21,26 +21,30 @@
- #include "LAppTextureManager.hpp"
- #include "LAppDelegate.hpp"
+diff --git a/src/LAppModel.cpp b/src/LAppModel.cpp
+index 7b8e0ea..48a4128 100644
+--- a/src/LAppModel.cpp
++++ b/src/LAppModel.cpp
+@@ -28,27 +28,31 @@
+ #include "Motion/CubismPhysicsUpdater.hpp"
+ #include "Motion/CubismPoseUpdater.hpp"
+#include "facial_landmark_detector.h"
+
: LAppModel_Common()
, _modelSetting(NULL)
, _userTimeSeconds(0.0f)
+ , _motionUpdated(false)
+ , _detector(nullptr)
+ , _useOldParamId(useOldParamId)
{
}
LAppModel::~LAppModel()
-@@ -114,33 +118,6 @@ void LAppModel::SetupModel(ICubismModelS
+@@ -122,36 +126,6 @@ void LAppModel::SetupModel(ICubismModelSetting* setting)
DeleteBuffer(buffer, path.GetRawString());
}
-
- DeleteBuffer(buffer, path.GetRawString());
- }
+-
+- CubismExpressionUpdater* expression = CSM_NEW CubismExpressionUpdater(*_expressionManager);
+- _updateScheduler.AddUpdatableList(expression);
- }
-
//Physics
if (strcmp(_modelSetting->GetPhysicsFileName(), "") != 0)
{
-@@ -179,7 +156,7 @@ void LAppModel::SetupModel(ICubismModelS
+@@ -207,7 +181,7 @@ void LAppModel::SetupModel(ICubismModelSetting* setting)
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));
+ breathParameters.PushBack(CubismBreath::BreathParameterData(CubismFramework::GetIdManager()->GetId(_(ParamBreath)), 0.5f, 0.5f, 3.2345f, 0.5f));
_breath->SetParameters(breathParameters);
- }
-@@ -203,21 +180,6 @@ void LAppModel::SetupModel(ICubismModelS
+
+@@ -234,45 +208,6 @@ void LAppModel::SetupModel(ICubismModelSetting* setting)
}
}
- {
- _lipSyncIds.PushBack(_modelSetting->GetLipSyncParameterId(i));
- }
+-
+- CubismLipSyncUpdater* lipSync = CSM_NEW CubismLipSyncUpdater(_lipSyncIds, _wavFileHandler);
+- _updateScheduler.AddUpdatableList(lipSync);
+- }
+-
+- // Look
+- {
+- _look = CubismLook::Create();
+-
+- csmVector<CubismLook::LookParameterData> lookParameters;
+-
+- lookParameters.PushBack(CubismLook::LookParameterData(_idParamAngleX, 30.0f));
+- lookParameters.PushBack(CubismLook::LookParameterData(_idParamAngleY, 0.0f, 30.0f));
+- lookParameters.PushBack(CubismLook::LookParameterData(_idParamAngleZ, 0.0f, 0.0f, -30.0f));
+- lookParameters.PushBack(CubismLook::LookParameterData(_idParamBodyAngleX, 10.0f));
+- lookParameters.PushBack(CubismLook::LookParameterData(_idParamEyeBallX, 1.0f));
+- lookParameters.PushBack(CubismLook::LookParameterData(_idParamEyeBallY, 0.0f, 1.0f));
+-
+- _look->SetParameters(lookParameters);
+-
+- CubismLookUpdater* look = CSM_NEW CubismLookUpdater(*_look, *_dragManager);
+- _updateScheduler.AddUpdatableList(look);
- }
-
+- _updateScheduler.SortUpdatableList();
+-
- if (_modelSetting == NULL || _modelMatrix == NULL)
- {
- LAppPal::PrintLogLn("Failed to SetupModel().");
//Layout
csmMap<csmString, csmFloat32> layout;
_modelSetting->GetLayoutMap(layout);
-@@ -322,62 +284,57 @@ void LAppModel::Update()
+@@ -377,27 +312,70 @@ void LAppModel::Update()
const csmFloat32 deltaTimeSeconds = LAppPal::GetDeltaTime();
_userTimeSeconds += deltaTimeSeconds;
-- _dragManager->Update(deltaTimeSeconds);
-- _dragX = _dragManager->GetX();
-- _dragY = _dragManager->GetY();
--
- // モーションによるパラメータ更新の有無
-- csmBool motionUpdated = false;
+- _motionUpdated = false;
-
- //-----------------------------------------------------------------
- _model->LoadParameters(); // 前回セーブされた状態をロード
{
- // モーションの再生がない場合、待機モーションの中からランダムで再生する
- StartRandomMotion(MotionGroupIdle, PriorityIdle);
-- }
-- else
-- {
-- motionUpdated = _motionManager->UpdateMotion(_model, deltaTimeSeconds); // モーションを更新
-- }
-- _model->SaveParameters(); // 状態を保存
-- //-----------------------------------------------------------------
+ auto idMan = CubismFramework::GetIdManager();
+ auto params = _detector->getParams();
-
-- // 不透明度
-- _opacity = _model->GetModelOpacity();
--
-- // まばたき
-- if (!motionUpdated)
-- {
-- if (_eyeBlink != NULL)
++
+ // NOTE: Apparently, this LoadParameters/SaveParameters pair
+ // is needed for auto breath to work.
+ _model->LoadParameters(); // 前回セーブされた状態をロード
+ if (_motionManager->IsFinished() && params.randomMotion)
- {
-- // メインモーションの更新がないとき
-- _eyeBlink->UpdateParameters(_model, deltaTimeSeconds); // 目パチ
++ {
+ // モーションの再生がない場合、待機モーションの中からランダムで再生する
+ StartRandomMotion(MotionGroupIdle, PriorityIdle);
- }
-- }
--
-- if (_expressionManager != NULL)
-- {
-- _expressionManager->UpdateMotion(_model, deltaTimeSeconds); // 表情でパラメータ更新(相対変化)
-- }
--
-- //ドラッグによる変化
-- //ドラッグによる顔の向きの調整
-- _model->AddParameterValue(_idParamAngleX, _dragX * 30); // -30から30の値を加える
-- _model->AddParameterValue(_idParamAngleY, _dragY * 30);
-- _model->AddParameterValue(_idParamAngleZ, _dragX * _dragY * -30);
--
-- //ドラッグによる体の向きの調整
-- _model->AddParameterValue(_idParamBodyAngleX, _dragX * 10); // -10から10の値を加える
++ }
+ else
+ {
+ _motionManager->UpdateMotion(_model, deltaTimeSeconds); // モーションを更新
+ }
+ _model->SaveParameters(); // 状態を保存
-
-- //ドラッグによる目の向きの調整
-- _model->AddParameterValue(_idParamEyeBallX, _dragX); // -1から1の値を加える
-- _model->AddParameterValue(_idParamEyeBallY, _dragY);
-
-- // 呼吸など
-- if (_breath != NULL)
-- {
-- _breath->UpdateParameters(_model, deltaTimeSeconds);
++
++
+ if (params.autoBlink && _eyeBlink)
+ {
+ _eyeBlink->UpdateParameters(_model, deltaTimeSeconds);
+ _breath->UpdateParameters(_model, deltaTimeSeconds);
+ }
}
-
- // 物理演算の設定
-@@ -386,22 +343,6 @@ void LAppModel::Update()
- _physics->Evaluate(_model, deltaTimeSeconds);
+- else
++
++ // 物理演算の設定
++ if (_physics != NULL)
+ {
+- _motionUpdated = _motionManager->UpdateMotion(_model, deltaTimeSeconds); // モーションを更新
++ _physics->Evaluate(_model, deltaTimeSeconds);
}
-
-- // リップシンクの設定
-- if (_lipSync)
-- {
-- // リアルタイムでリップシンクを行う場合、システムから音量を取得して0〜1の範囲で値を入力します。
-- csmFloat32 value = 0.0f;
--
-- // 状態更新/RMS値取得
-- _wavFileHandler.Update(deltaTimeSeconds);
-- value = _wavFileHandler.GetRms();
--
-- for (csmUint32 i = 0; i < _lipSyncIds.GetSize(); ++i)
-- {
-- _model->AddParameterValue(_lipSyncIds[i], value, 0.8f);
-- }
-- }
+- _model->SaveParameters(); // 状態を保存
+- //-----------------------------------------------------------------
-
- // ポーズの設定
- if (_pose != NULL)
- {
-@@ -464,7 +405,6 @@ CubismMotionQueueEntryHandle LAppModel::
+- // 不透明度
+- _opacity = _model->GetModelOpacity();
+
+- _updateScheduler.OnLateUpdate(_model, deltaTimeSeconds);
++ // ポーズの設定
++ if (_pose != NULL)
++ {
++ _pose->UpdateParameters(_model, deltaTimeSeconds);
++ }
+
+ _model->Update();
+
+@@ -455,7 +433,6 @@ CubismMotionQueueEntryHandle LAppModel::StartMotion(const csmChar* group, csmInt
{
csmString path = voice;
path = _modelHomeDir + path;
}
if (_debugMode)
-@@ -616,3 +556,37 @@ Csm::Rendering::CubismOffscreenSurface_O
+@@ -607,3 +584,37 @@ Csm::Rendering::CubismRenderTarget_OpenGLES2& LAppModel::GetRenderBuffer()
{
return _renderBuffer;
}
+ return csmString(ans.c_str());
+}
+
-diff -pruN --exclude build ./demo_clean/src/LAppModel.hpp ./demo_dev/src/LAppModel.hpp
---- ./demo_clean/src/LAppModel.hpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppModel.hpp 2025-05-30 00:31:59.753598558 +0100
+diff --git a/src/LAppModel.hpp b/src/LAppModel.hpp
+index 2637a54..3c0e83a 100644
+--- a/src/LAppModel.hpp
++++ b/src/LAppModel.hpp
@@ -12,8 +12,8 @@
#include <Type/csmRectF.hpp>
- #include <Rendering/OpenGL/CubismOffscreenSurface_OpenGLES2.hpp>
+ #include <Rendering/OpenGL/CubismRenderTarget_OpenGLES2.hpp>
-#include "LAppWavFileHandler_Common.hpp"
#include "LAppModel_Common.hpp"
/**
* @brief ユーザーが実際に使用するモデルの実装クラス<br>
-@@ -25,8 +25,11 @@ class LAppModel : public LAppModel_Commo
+@@ -25,8 +25,11 @@ class LAppModel : public LAppModel_Common
public:
/**
* @brief コンストラクタ
* @brief デストラクタ
@@ -116,6 +119,13 @@ public:
*/
- Csm::Rendering::CubismOffscreenSurface_OpenGLES2& GetRenderBuffer();
+ Csm::Rendering::CubismRenderTarget_OpenGLES2& GetRenderBuffer();
+ /**
+ * @brief Set the pointer to the FacialLandmarkDetector instance
Csm::ICubismModelSetting* _modelSetting; ///< モデルセッティング情報
Csm::csmString _modelHomeDir; ///< モデルセッティングが置かれたディレクトリ
Csm::csmFloat32 _userTimeSeconds; ///< デルタ時間の積算値[秒]
-@@ -185,7 +206,10 @@ private:
- const Csm::CubismId* _idParamEyeBallX; ///< パラメータID: ParamEyeBallX
- const Csm::CubismId* _idParamEyeBallY; ///< パラメータID: ParamEyeBallXY
+@@ -187,7 +208,7 @@ private:
+
+ Csm::csmBool _motionUpdated; ///< モーション更新フラグ
- LAppWavFileHandler_Common _wavFileHandler; ///< wavファイルハンドラ
-
- Csm::Rendering::CubismOffscreenSurface_OpenGLES2 _renderBuffer; ///< フレームバッファ以外の描画先
+ Csm::Rendering::CubismRenderTarget_OpenGLES2 _renderBuffer; ///< フレームバッファ以外の描画先
+
+ FacialLandmarkDetector *_detector;
};
-+
-+
-+
-diff -pruN --exclude build ./demo_clean/src/LAppTextureManager.cpp ./demo_dev/src/LAppTextureManager.cpp
---- ./demo_clean/src/LAppTextureManager.cpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppTextureManager.cpp 2025-05-30 00:33:38.759669165 +0100
-@@ -96,6 +96,46 @@ LAppTextureManager::TextureInfo* LAppTex
+diff --git a/src/LAppTextureManager.cpp b/src/LAppTextureManager.cpp
+index 97cec74..191bdc0 100644
+--- a/src/LAppTextureManager.cpp
++++ b/src/LAppTextureManager.cpp
+@@ -96,6 +96,46 @@ LAppTextureManager::TextureInfo* LAppTextureManager::CreateTextureFromPngFile(st
}
void LAppTextureManager::ReleaseTextures()
{
for (Csm::csmUint32 i = 0; i < _texturesInfo.GetSize(); i++)
-diff -pruN --exclude build ./demo_clean/src/LAppTextureManager.hpp ./demo_dev/src/LAppTextureManager.hpp
---- ./demo_clean/src/LAppTextureManager.hpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppTextureManager.hpp 2025-05-30 00:33:05.342204345 +0100
+diff --git a/src/LAppTextureManager.hpp b/src/LAppTextureManager.hpp
+index a6713df..a42a112 100644
+--- a/src/LAppTextureManager.hpp
++++ b/src/LAppTextureManager.hpp
@@ -41,6 +41,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 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/LAppView.cpp 2025-05-30 00:38:38.310466491 +0100
-@@ -81,9 +81,6 @@ void LAppView::Initialize(int width, int
+diff --git a/src/LAppView.cpp b/src/LAppView.cpp
+index 4e42040..ed4c4b9 100644
+--- a/src/LAppView.cpp
++++ b/src/LAppView.cpp
+@@ -84,9 +84,6 @@ void LAppView::Initialize(int width, int height)
void LAppView::Render()
{
_back->Render();
LAppLive2DManager* Live2DManager = LAppLive2DManager::GetInstance();
-@@ -125,35 +122,17 @@ void LAppView::InitializeSprite()
+@@ -128,36 +125,17 @@ void LAppView::InitializeSprite()
glfwGetWindowSize(LAppDelegate::GetInstance()->GetWindow(), &width, &height);
LAppTextureManager* textureManager = LAppDelegate::GetInstance()->GetTextureManager();
float x = width * 0.5f;
float y = height * 0.5f;
-- float fWidth = static_cast<float>(backgroundTexture->width * 2.0f);
- float fHeight = static_cast<float>(height) * 0.95f;
+- float ratio = fHeight / static_cast<float>(backgroundTexture->height);
+- float fWidth = static_cast<float>(backgroundTexture->width) * ratio;
+ float fWidth = static_cast<float>(width);
+ float fHeight = static_cast<float>(height);
_back = new LAppSprite(x, y, fWidth, fHeight, backgroundTexture->id, programId);
// 画面全体を覆うサイズ
x = width * 0.5f;
y = height * 0.5f;
-@@ -192,18 +171,6 @@ void LAppView::OnTouchesEnded(float px,
+@@ -196,18 +174,6 @@ void LAppView::OnTouchesEnded(float px, float py) const
LAppPal::PrintLogLn("[APP]touchesEnded x:%.2f y:%.2f", x, y);
}
live2DManager->OnTap(x, y);
}
}
-diff -pruN --exclude build ./demo_clean/src/main.cpp ./demo_dev/src/main.cpp
---- ./demo_clean/src/main.cpp 2025-05-28 10:36:54.000000000 +0100
-+++ ./demo_dev/src/main.cpp 2025-05-30 00:34:06.180000583 +0100
+diff --git a/src/main.cpp b/src/main.cpp
+index b65c1f0..8bb3d38 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
@@ -5,18 +5,160 @@
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/