feat: Flug-Partikel (Staub, Lichtstreifen, Bokeh) im Tiefenflug

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Leon TonhäuserandClaude Fable 5 committed 2026-06-11 12:08:04 +02:00
1 parent ceacdb5398
commit 8b1c7080b9
3 files changed
+59

No files matched your search

+15
View File
@@ -27,6 +27,8 @@
var geister = [].slice.call(buehne.querySelectorAll('.geist'));
var fotos = [].slice.call(buehne.querySelectorAll('.flug-foto'))
.filter(function (f) { return f.offsetParent !== null; }); // mobil ausgeblendete überspringen
var partikel = [].slice.call(buehne.querySelectorAll('.partikel'))
.filter(function (p) { return p.offsetParent !== null; });
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
@@ -87,6 +89,19 @@
' rotateY(' + foto.dataset.kipp + 'deg) rotateZ(' + kurve + 'deg)';
});
// Partikel: gleiche Kamerafahrt wie die Fotos, leicht stärkere Parallaxe
partikel.forEach(function (teil) {
var z = parseFloat(teil.dataset.z) + kamZ;
var x = parseFloat(teil.dataset.x) - kamX * 1.2;
var y = parseFloat(teil.dataset.y) - kamY * 1.2;
var sicht = parseFloat(teil.dataset.op);
if (z > 200) sicht *= Math.max(0, 1 - (z - 200) / 140); // vorbeigeflogen
teil.style.opacity = sicht * (1 - wegT);
teil.style.transform =
'translate(-50%, -50%) translate3d(' + x + 'px,' + y + 'px,' + z + 'px)' +
(teil.dataset.w ? ' rotate(' + teil.dataset.w + 'deg)' : '');
});
// Name: Buchstabenabstand zieht sich zusammen, wächst leicht, Parallaxe
var abstand = 18 - flug * 16;
var deckkraftName = flug < 0.8 ? 1 : Math.max(0, 1 - (flug - 0.8) / 0.15);