feat: Medaille entfernt, Flug-Fotos erkennen Hoch- und Querformat

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Leon TonhäuserandClaude Fable 5 committed 2026-06-11 16:13:28 +02:00
1 parent 8f02002223
commit 96d4ebc679
3 files changed
+19 -42

No files matched your search

+15 -3
View File
@@ -27,7 +27,6 @@
var nameMoment = document.getElementById('name-moment');
var nameGefuellt = false;
var preisBild = document.getElementById('preis-bild');
var medaille = document.getElementById('medaille');
var preisText = document.getElementById('preis-text');
var verlauf = document.getElementById('landung-verlauf');
var geister = [].slice.call(buehne.querySelectorAll('.geist'));
@@ -36,6 +35,20 @@
var partikel = [].slice.call(buehne.querySelectorAll('.partikel'))
.filter(function (p) { return p.offsetParent !== null; });
// Bildformat übernehmen: Rahmen ans echte Seitenverhältnis des Fotos
// anpassen, damit Hochformat-Bilder nicht auf 3:2 zugeschnitten werden
fotos.forEach(function (foto) {
var bild = foto.querySelector('img');
if (!bild) return;
function formatSetzen() {
if (!bild.naturalWidth || !bild.naturalHeight) return;
foto.style.aspectRatio = bild.naturalWidth + ' / ' + bild.naturalHeight;
foto.classList.toggle('hochformat', bild.naturalHeight > bild.naturalWidth);
}
if (bild.complete) formatSetzen();
else bild.addEventListener('load', formatSetzen, { once: true });
});
var FLUG_TIEFE = 1650; // px, die die Kamera nach vorn fliegt
var FLUG_ENDE = 0.65; // Anteil der Strecke, bis zu dem die Kamerafahrt läuft
var ABSCHIED = [0.55, 0.65]; // Fotos räumen die Bühne (alles ausblenden)
@@ -147,7 +160,7 @@
}, 350);
}
// Vollbild: Bild wächst über den Viewport, Medaille/Schriftzug blenden
// Vollbild: Bild wächst über den Viewport, der Schriftzug blendet
// aus, der weiße Verlauf holt die Landung herein
var vollT = Math.max(0, Math.min((fortschritt - VOLLBILD[0]) / (VOLLBILD[1] - VOLLBILD[0]), 1));
var weichVoll = 1 - Math.pow(1 - vollT, 3);
@@ -160,7 +173,6 @@
preisBild.style.transform = '';
}
preis.classList.toggle('vollbild', vollT > 0.01);
medaille.style.opacity = Math.max(0, 1 - vollT * 3);
preisText.style.opacity = Math.max(0, 1 - vollT * 2);
verlauf.style.opacity = vollT;