diff --git a/menus/assets/p1/garland_anim/lights_00.png b/menus/assets/p1/garland_anim/lights_00.png index b67da56..9051cc7 100644 Binary files a/menus/assets/p1/garland_anim/lights_00.png and b/menus/assets/p1/garland_anim/lights_00.png differ diff --git a/menus/assets/p1/garland_anim/lights_01.png b/menus/assets/p1/garland_anim/lights_01.png index 8e2a1aa..e1b238f 100644 Binary files a/menus/assets/p1/garland_anim/lights_01.png and b/menus/assets/p1/garland_anim/lights_01.png differ diff --git a/menus/assets/p1/garland_anim/lights_02.png b/menus/assets/p1/garland_anim/lights_02.png index da2c176..569df65 100644 Binary files a/menus/assets/p1/garland_anim/lights_02.png and b/menus/assets/p1/garland_anim/lights_02.png differ diff --git a/menus/assets/p1/garland_anim/lights_03.png b/menus/assets/p1/garland_anim/lights_03.png index e4b9b44..7c9f93f 100644 Binary files a/menus/assets/p1/garland_anim/lights_03.png and b/menus/assets/p1/garland_anim/lights_03.png differ diff --git a/menus/assets/p1/garland_anim/lights_04.png b/menus/assets/p1/garland_anim/lights_04.png index 2d6708c..aa91e07 100644 Binary files a/menus/assets/p1/garland_anim/lights_04.png and b/menus/assets/p1/garland_anim/lights_04.png differ diff --git a/menus/assets/p1/garland_anim/lights_05.png b/menus/assets/p1/garland_anim/lights_05.png index be58fc8..dd873d3 100644 Binary files a/menus/assets/p1/garland_anim/lights_05.png and b/menus/assets/p1/garland_anim/lights_05.png differ diff --git a/menus/assets/shaders/tent_lights.gdshader b/menus/assets/shaders/tent_lights.gdshader index 1ca992f..09d5a1b 100644 --- a/menus/assets/shaders/tent_lights.gdshader +++ b/menus/assets/shaders/tent_lights.gdshader @@ -38,6 +38,18 @@ const vec3 bulbs[20] = vec3[20]( vec3(0.7773, 0.5613, 0.0) ); +// 4 grandi luci sui punti di ancoraggio delle funi a terra lungo la balza: +// 0: Esterno Sinistro (131.3, 502.1) -> fase 4 (in fase con L9 in fondo a sinistra) +// 1: Palo/Fune SX Ingresso (306.5, 544.1) -> fase 0 +// 2: Palo/Fune DX Ingresso (558.6, 550.7) -> fase 2 +// 3: Esterno Destro (737.2, 499.3) -> fase 4 (in fase con la discesa a destra) +const vec3 anchor_bulbs[4] = vec3[4]( + vec3(0.1492, 0.6695, 4.0), + vec3(0.3483, 0.7255, 0.0), + vec3(0.6348, 0.7342, 2.0), + vec3(0.8378, 0.6657, 4.0) +); + // Intensità nel ciclo di 6 frame della singola lampadina (d = frame dalla rampa), // ricavata dalle aree misurate sui frame della GIF: ~25%, ~50%, pieno, pieno, 0, 0. float chase_intensity(float d) { @@ -96,6 +108,22 @@ void fragment() { color.rgb += GOLD_HALO * (halo * ga * 0.7 * (1.0 - core)); color.a = max(color.a, halo * ga * 0.5); } + + // 4 grandi luci sui punti di ancoraggio delle funi (intermittenti a inseguimento con ritmo proprio) + for (int j = 0; j < 4; j++) { + float d = mod(cycle - anchor_bulbs[j].z + 6.0, 6.0); + float intensity = chase_intensity(d); + if (intensity <= 0.0) { + continue; + } + float r = length(px - anchor_bulbs[j].xy * vec2(880.0, 750.0)); + float core = 1.0 - smoothstep(4.0, 10.0, r); + float halo = exp(-r / 15.0); + float ga = clamp(intensity * garland_strength, 0.0, 1.0); + color.rgb = mix(color.rgb, GOLD_CORE, core * ga); + color.rgb += GOLD_HALO * (halo * ga * 0.8 * (1.0 - core)); + color.a = max(color.a, halo * ga * 0.6); + } } color.rgb = min(color.rgb, vec3(1.0)); diff --git a/menus/scripts/screens/p1_home_screen.gd b/menus/scripts/screens/p1_home_screen.gd index c6b0bb3..13898a2 100644 --- a/menus/scripts/screens/p1_home_screen.gd +++ b/menus/scripts/screens/p1_home_screen.gd @@ -63,13 +63,21 @@ func _build() -> void: func _add_tent_button(texture: Texture2D, center: Vector2, has_lights := false) -> TextureButton: var button := MenuUI.add_image_button(self, texture, center, Vector2(0.36, 0.59)) - var star_mat := MenuUI.tent_star_material() - button.material = star_mat + var mat := MenuUI.tent_material(0.0) if has_lights else MenuUI.tent_star_material() + button.material = mat button.tooltip_text = "Apri questo percorso" # Glow stella su entrambi i tendoni al passaggio del mouse - button.mouse_entered.connect(func(): star_mat.set_shader_parameter("hover_strength", 1.0)) - button.mouse_exited.connect(func(): star_mat.set_shader_parameter("hover_strength", 0.0)) + button.mouse_entered.connect(func(): + mat.set_shader_parameter("hover_strength", 1.0) + if has_lights: + mat.set_shader_parameter("garland_strength", 1.0) + ) + button.mouse_exited.connect(func(): + mat.set_shader_parameter("hover_strength", 0.0) + if has_lights: + mat.set_shader_parameter("garland_strength", 0.0) + ) # Animazione apertura sipario e lucine in hover if has_lights: