feat: Vollbild, Landung und Übergang im Auto-Player

This commit is contained in:
Leon Tonhäuser committed 2026-06-17 23:02:45 +02:00
1 parent 5438cf12d3
commit 8f0ddcd5c6
1 file changed
+20
+20
View File
@@ -113,6 +113,26 @@
} }
// Phase Halten (22.0 – 27.0): nichts tweenen – Vollbild + Text stehen. // Phase Halten (22.0 – 27.0): nichts tweenen – Vollbild + Text stehen.
// Phase Vollbild-Wachstum (27.0 – 30.0): Vollbild füllt Viewport, Verlauf ein, Text aus.
if (t >= T.haltenEnd && t < T.wachstumEnd) {
var w = (t - T.haltenEnd) / (T.wachstumEnd - T.haltenEnd), e = easeOutCubic(w);
if (preisBild) {
var sMax = Math.max(window.innerWidth / preisBild.offsetWidth,
window.innerHeight / preisBild.offsetHeight) * 1.02;
preisBild.style.transform = 'scale(' + lerp(1.0, sMax, e) + ')';
}
if (verlauf) verlauf.style.opacity = lerp(0, 0.6, e);
if (preisText) preisText.style.opacity = 1 - e;
}
// Phase Landung (30.0 – 33.0): Bühne fährt nach unten, Bühne + Vollbild aus.
if (t >= T.wachstumEnd && t < T.landungEnd) {
var l = (t - T.wachstumEnd) / (T.landungEnd - T.wachstumEnd), e = easeOutCubic(l);
if (buehne) buehne.style.transform = 'translateY(' + lerp(0, window.innerHeight, e) + 'px)';
if (buehne) buehne.style.opacity = 1 - e;
if (preis) preis.style.opacity = 1 - e;
}
// Phase Übergang (ab 33.0): beenden() gibt die normale Seite frei (s. unten).
// Konfetti (Spec §2): Burst 1 bei 20.0 s, Burst 2 bei 22.5 s. // Konfetti (Spec §2): Burst 1 bei 20.0 s, Burst 2 bei 22.5 s.
if (!burst1 && t >= 20.0) { burst1 = true; burst(90, 0.35); } if (!burst1 && t >= 20.0) { burst1 = true; burst(90, 0.35); }
if (!burst2 && t >= 22.5) { burst2 = true; burst(50); } if (!burst2 && t >= 22.5) { burst2 = true; burst(50); }