Fix fire gap: restore flame positions, increase clip topBuffer to 20px
Flames back at y=177 (tips touching pot bottom at y=174), viewBox back to 255. topBuffer raised from 10 to 20px to cover flicker overshoot without clipping the tips. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DGKe8JzTM2Gr1fdx9wYXTi
This commit is contained in:
+3
-3
@@ -294,8 +294,8 @@ function updateFireVisualization() {
|
||||
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 fireBase = 248; // y of flame base (all paths end here)
|
||||
const fireTip = 177; // y of tallest flame tip
|
||||
const fireH = fireBase - fireTip; // 71px total flame height
|
||||
if (heaterPowerIst <= 0) {
|
||||
g.style.opacity = '0';
|
||||
@@ -304,7 +304,7 @@ function updateFireVisualization() {
|
||||
const intensity = Math.min(1, heaterPowerIst / heaterMaxPower);
|
||||
// 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
|
||||
const topBuffer = 20; // headroom for flicker scaleY overshoot (~12% of height)
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user