From c73ff96dfe072454cbaea632a8aa7867387402d1 Mon Sep 17 00:00:00 2001 From: byrongamatos Date: Sun, 12 Jul 2026 20:51:41 +0200 Subject: [PATCH] fix(venue-crowd): keep rear video layer opaque during crossfades MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two half-transparent layers let the static bg plate bleed through (~25% at mid-fade) — visible as a flash of the old still image on every state transition. The crossfade is now always the front layer fading over an opaque rear layer. Co-Authored-By: Claude Fable 5 --- plugins/highway_3d/screen.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/highway_3d/screen.js b/plugins/highway_3d/screen.js index a070750..8d9ffe4 100644 --- a/plugins/highway_3d/screen.js +++ b/plugins/highway_3d/screen.js @@ -3499,7 +3499,14 @@ layer.lastVidH = el.videoHeight; layer.applyCoverCrop(); } - const opacity = i === 0 ? 1 - _venueCrowdMix : _venueCrowdMix; + // Layer 0 (rear) stays fully opaque whenever any of the + // fade involves it: two half-transparent layers would + // let the static plate behind bleed through (~25% at + // mid-fade). The crossfade is therefore layer 1 (front) + // fading over an opaque layer 0 — in both directions. + const opacity = i === 0 + ? (_venueCrowdMix < 0.999 ? 1 : 0) + : _venueCrowdMix; layer.mat.opacity = opacity; layer.mesh.visible = ready && opacity > 0.01; if (layer.mesh.visible) {