From f3019d044fa574306325289ce63357dea0254c81 Mon Sep 17 00:00:00 2001 From: vini Date: Sun, 19 Jul 2026 16:09:00 -0300 Subject: [PATCH] Keep planets visible near enlarged Moon --- plugin/contents/ui/dancer.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugin/contents/ui/dancer.html b/plugin/contents/ui/dancer.html index eee34df..4c16932 100644 --- a/plugin/contents/ui/dancer.html +++ b/plugin/contents/ui/dancer.html @@ -1858,6 +1858,7 @@ function updateSolarSystem(date, lst, W, H, horizonPx) { const moon = moonScreen ? { ...moonScreen, radius: moonRadius, + realRadius: realMoonRadius, phase, illuminated: moonIllumination.phase_fraction, brightAngle, @@ -1877,6 +1878,13 @@ function updateSolarSystem(date, lst, W, H, horizonPx) { radius: Math.max(1.8, Math.min(5.2, 3.45 - illumination.mag * 0.46)), }); } + if (moon) { + for (const planet of planets) { + const distance = Math.hypot(planet.x - moon.x, planet.y - moon.y); + const safeRadius = distance - planet.radius - 6; + moon.radius = Math.max(moon.realRadius, Math.min(moon.radius, safeRadius)); + } + } solarSystemFrame = { moon, planets }; } catch (error) { console.error('[skeledance] falha nas efemérides:', error); @@ -1907,6 +1915,12 @@ function drawSolarSystem(c) { const [r, g, b] = planet.color; c.save(); c.globalAlpha = fade; + c.shadowBlur = 0; + c.strokeStyle = 'rgba(3,7,18,0.92)'; + c.lineWidth = Math.max(1.1, planet.radius * 0.42); + c.beginPath(); + c.arc(planet.x, planet.y, planet.radius + 1.3, 0, Math.PI * 2); + c.stroke(); c.shadowColor = `rgba(${r},${g},${b},0.95)`; c.shadowBlur = Math.max(2.5, 5.5 - planet.magnitude * 0.45); c.fillStyle = `rgb(${r},${g},${b})`;