From 093ca2b2b729b89bd38988172909a691e4be0694 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 08:15:33 +0200 Subject: [PATCH] Increase moon opacity to 0.6 when below horizon --- index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 1a283d2..1427047 100644 --- a/index.html +++ b/index.html @@ -540,15 +540,18 @@ // Moon position - interpolated between moonrise and moonset on the orbit var moonPos = getMoonPosition(now, moonTimes); if (!moonPos || !moonPos.point || isNaN(moonPos.point.x) || isNaN(moonPos.point.y)) { - // Fallback to current time position var fallbackP = pointOnCircle(now, MOON_ORBIT_RADIUS); rpgMoon.setAttribute('transform', 'translate(' + fallbackP.x + ', ' + fallbackP.y + ')'); - rpgMoon.setAttribute('opacity', '0.35'); + rpgMoon.setAttribute('opacity', '0.6'); } else { rpgMoon.setAttribute('transform', 'translate(' + moonPos.point.x + ', ' + moonPos.point.y + ')'); - rpgMoon.setAttribute('opacity', moonPos.isVisible ? '1' : '0.35'); + rpgMoon.setAttribute('opacity', moonPos.isVisible ? '1' : '0.6'); } + // TEMP DEBUG: show moon at center + // rpgMoon.setAttribute('transform', 'translate(100, 100)'); + // rpgMoon.setAttribute('opacity', '1'); + // Sun rise/set arrows var srP = pointOnCircle(sunTimes.sunrise, SUN_ORBIT_RADIUS); sunRiseArrow.setAttribute('transform', 'translate(' + srP.x + ', ' + srP.y + ')');