debug: Agregar logging detallado a FADE_OUT de AppLogo

- Log de timer_, delta_time, progress en cada frame
- Log de alpha1/alpha2 calculados
- Log de valores de animación por tipo (ZOOM/ELASTIC/SPIRAL/BOUNCE)
- Log de ease_t1 en ROTATE_SPIRAL para diagnosticar desincronización
- Log cuando FADE_OUT se completa

Propósito: Diagnosticar por qué el fade parece instantáneo
y desincronizado con la animación (serie en lugar de paralelo).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-18 19:26:14 +02:00
parent 97c0683f6e
commit d30a4fd440

View File

@@ -343,8 +343,15 @@ void AppLogo::update(float delta_time, AppMode current_mode) {
float fade_progress_logo1 = timer_ / APPLOGO_ANIMATION_DURATION; float fade_progress_logo1 = timer_ / APPLOGO_ANIMATION_DURATION;
float fade_progress_logo2 = std::max(0.0f, (timer_ - APPLOGO_LOGO2_DELAY) / APPLOGO_ANIMATION_DURATION); float fade_progress_logo2 = std::max(0.0f, (timer_ - APPLOGO_LOGO2_DELAY) / APPLOGO_ANIMATION_DURATION);
// LOG: Estado completo de FADE_OUT para diagnóstico
std::cout << "[FADE_OUT] timer=" << timer_
<< " | delta_time=" << delta_time
<< " | prog1=" << fade_progress_logo1
<< " | prog2=" << fade_progress_logo2 << std::endl;
// Verificar si fade out completado (cuando logo2 también termina) // Verificar si fade out completado (cuando logo2 también termina)
if (fade_progress_logo2 >= 1.0f) { if (fade_progress_logo2 >= 1.0f) {
std::cout << " [FADE_OUT COMPLETADO - Cambiando a HIDDEN]" << std::endl;
// Fade out completado, volver a HIDDEN // Fade out completado, volver a HIDDEN
state_ = AppLogoState::HIDDEN; state_ = AppLogoState::HIDDEN;
timer_ = 0.0f; timer_ = 0.0f;
@@ -364,6 +371,9 @@ void AppLogo::update(float delta_time, AppMode current_mode) {
logo1_alpha_ = static_cast<int>((1.0f - std::min(1.0f, fade_progress_logo1)) * 255.0f); logo1_alpha_ = static_cast<int>((1.0f - std::min(1.0f, fade_progress_logo1)) * 255.0f);
logo2_alpha_ = static_cast<int>((1.0f - std::min(1.0f, fade_progress_logo2)) * 255.0f); logo2_alpha_ = static_cast<int>((1.0f - std::min(1.0f, fade_progress_logo2)) * 255.0f);
std::cout << " → alpha1=" << logo1_alpha_
<< " | alpha2=" << logo2_alpha_ << std::endl;
// ================================================================ // ================================================================
// Aplicar MISMA animación (current_animation_) de forma invertida // Aplicar MISMA animación (current_animation_) de forma invertida
// ================================================================ // ================================================================
@@ -378,6 +388,9 @@ void AppLogo::update(float delta_time, AppMode current_mode) {
logo2_squash_y_ = 1.0f; logo2_squash_y_ = 1.0f;
logo2_stretch_x_ = 1.0f; logo2_stretch_x_ = 1.0f;
logo2_rotation_ = 0.0f; logo2_rotation_ = 0.0f;
std::cout << " → ZOOM: scale1=" << logo1_scale_
<< " | scale2=" << logo2_scale_ << std::endl;
break; break;
case AppLogoAnimationType::ELASTIC_STICK: case AppLogoAnimationType::ELASTIC_STICK:
@@ -393,6 +406,10 @@ void AppLogo::update(float delta_time, AppMode current_mode) {
logo2_squash_y_ = 1.0f + (prog2 * 0.3f); logo2_squash_y_ = 1.0f + (prog2 * 0.3f);
logo2_stretch_x_ = 1.0f - (prog2 * 0.2f); logo2_stretch_x_ = 1.0f - (prog2 * 0.2f);
logo2_rotation_ = prog2 * 0.1f; logo2_rotation_ = prog2 * 0.1f;
std::cout << " → ELASTIC: scale1=" << logo1_scale_
<< " | squash1=" << logo1_squash_y_
<< " | stretch1=" << logo1_stretch_x_ << std::endl;
} }
break; break;
@@ -411,6 +428,10 @@ void AppLogo::update(float delta_time, AppMode current_mode) {
logo2_rotation_ = prog2 * 6.28f; logo2_rotation_ = prog2 * 6.28f;
logo2_squash_y_ = 1.0f; logo2_squash_y_ = 1.0f;
logo2_stretch_x_ = 1.0f; logo2_stretch_x_ = 1.0f;
std::cout << " → SPIRAL: scale1=" << logo1_scale_
<< " | rotation1=" << logo1_rotation_
<< " | ease_t1=" << ease_t1 << std::endl;
} }
break; break;
@@ -441,6 +462,9 @@ void AppLogo::update(float delta_time, AppMode current_mode) {
} }
logo2_scale_ = 1.0f + (prog2 * 0.3f); logo2_scale_ = 1.0f + (prog2 * 0.3f);
logo2_rotation_ = 0.0f; logo2_rotation_ = 0.0f;
std::cout << " → BOUNCE: scale1=" << logo1_scale_
<< " | squash1=" << logo1_squash_y_ << std::endl;
} }
break; break;
} }