diff --git a/web/app.js b/web/app.js index 18f64f5..95fa04f 100644 --- a/web/app.js +++ b/web/app.js @@ -291,14 +291,22 @@ function updateStirrerVisualization() { // --- Fire visualization --- function updateFireVisualization() { - const g = document.getElementById('fire-group'); + const g = document.getElementById('fire-group'); + const clipRect = document.getElementById('fire-clip-rect'); if (!g) return; + const fireBase = 256; // y of flame base (all paths end here) + const fireTip = 185; // y of tallest flame tip + const fireH = fireBase - fireTip; // 71px total flame height if (heaterPowerIst <= 0) { g.style.opacity = '0'; - g.style.transform = 'scaleY(0.3)'; + clipRect.setAttribute('height', '0'); } else { const intensity = Math.min(1, heaterPowerIst / heaterMaxPower); - g.style.transform = `scaleY(${(0.45 + 0.55 * intensity).toFixed(2)})`; + // Always show the lower 35% (base), scale upper 65% with intensity + const visibleH = (0.35 + 0.65 * intensity) * fireH; + const topBuffer = 10; // headroom for flicker scaleY overshoot + clipRect.setAttribute('y', (fireBase - visibleH - topBuffer).toFixed(1)); + clipRect.setAttribute('height', (visibleH + topBuffer + 2).toFixed(1)); g.style.opacity = String((0.6 + 0.4 * intensity).toFixed(2)); } } diff --git a/web/index.html b/web/index.html index 3f9f2bd..afbfbca 100644 --- a/web/index.html +++ b/web/index.html @@ -47,7 +47,7 @@
- + @@ -58,6 +58,9 @@ + + + @@ -74,18 +77,18 @@ - + diff --git a/web/style.css b/web/style.css index 845235b..0ea5c32 100644 --- a/web/style.css +++ b/web/style.css @@ -206,8 +206,6 @@ header#connection-bar { #flame-inner { animation: flicker-3 0.45s ease-in-out infinite 0.15s; } #fire-group { - transform-box: fill-box; - transform-origin: 50% 100%; opacity: 0; transition: opacity 0.4s; }