feat: limita constelações aos signos do zodíaco

This commit is contained in:
vini 2026-07-19 14:00:43 -03:00
parent bfb8f31952
commit 03692a0398
3 changed files with 29 additions and 8 deletions

View file

@ -1400,7 +1400,7 @@ function renderMilkyWay(lstDeg, glareOn) {
return true;
}
/* Figuras convencionais das 88 constelações, ancoradas em RA/Dec J2000.
/* Figuras convencionais dos 12 signos zodiacais, ancoradas em RA/Dec J2000.
São desenhadas antes das estrelas para os pontos reais ficarem por cima. */
function drawConstellations(c, lst, W, H, horizonPx) {
if (!showConstellations || typeof CONSTELLATIONS === 'undefined') return;
@ -1439,7 +1439,7 @@ function drawConstellations(c, lst, W, H, horizonPx) {
}
}
/* Nomes só nas figuras principais/intermediárias para não lotar a tela. */
/* Todos os signos recebem nome; colisões na tela ainda são evitadas. */
c.shadowBlur = 5;
c.font = `${Math.max(10, Math.round(H * 0.0105))}px ui-monospace, monospace`;
c.textAlign = 'center';
@ -1447,7 +1447,7 @@ function drawConstellations(c, lst, W, H, horizonPx) {
c.fillStyle = 'rgba(170,225,255,0.66)';
const occupied = [];
for (const constellation of CONSTELLATIONS) {
if (constellation.rank > 2 || !constellation.label) continue;
if (!constellation.label) continue;
const aa = altAz(constellation.label[0], constellation.label[1], lst);
const sc = skyToScreen(aa.alt, aa.az, W, horizonPx);
if (!sc || sc.y < 24 || sc.y > horizonPx - 18) continue;