feat(border): refactor a Graphics::Border amb bumps i flash verd clar per impactes contra les parets
This commit is contained in:
1 parent
ccda7113c1
commit
e678f8d538
10 files changed
+306
-76
No files matched your search
@@ -0,0 +1,25 @@
|
||||
// border.hpp - Configuració del border del playfield (estàtic + reaccions)
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Defaults::Border {
|
||||
|
||||
// Desplaçament del border per impactes
|
||||
constexpr float MAX_DISPLACEMENT_PX = 6.0F; // tope màxim de separació respecte la posició natural
|
||||
constexpr float DISPLACEMENT_RECOVERY_PER_S = 30.0F; // px/s tornant cap a 0 (ease lineal)
|
||||
|
||||
// Flash al impacte. Intensitat proporcional al desplaçament:
|
||||
// max displacement → color = FLASH_COLOR pur
|
||||
// 0 displacement → color = oscil·lador (base verd)
|
||||
// La línia es dibuixa amb el color resultant del lerp; no hi ha sobreposició.
|
||||
constexpr bool FLASH_ENABLED = true;
|
||||
constexpr unsigned char FLASH_COLOR_R = 180;
|
||||
constexpr unsigned char FLASH_COLOR_G = 255;
|
||||
constexpr unsigned char FLASH_COLOR_B = 180;
|
||||
|
||||
// Conversió velocitat d'impacte → strength del bump
|
||||
constexpr float BUMP_VELOCITY_REFERENCE = 120.0F; // px/s donen strength 1.0
|
||||
constexpr float BUMP_MIN_VELOCITY = 20.0F; // sota d'açò no genera bump (filtrar fregaments)
|
||||
|
||||
} // namespace Defaults::Border
|
||||
Reference in new issue
Block a user