Phase 0: fix typecheck, format, build; remove stray emit; pin port via env
CI / Lint, typecheck, test, build (push) Failing after 22s

This commit is contained in:
Mavis
2026-06-02 16:07:09 +00:00
parent 7b19c54943
commit 938ba042b3
23 changed files with 6693 additions and 83 deletions
-5
View File
@@ -41,13 +41,8 @@ export function shadowFraction(
const perpDist = Math.hypot(px, py, pz);
if (perpDist >= occluderRadius) return 0;
// Approximate chord length through the occluder disc
const halfChord = Math.sqrt(occluderRadius * occluderRadius - perpDist * perpDist);
// Approximate the angular size of the sun as seen from the occluder
// vs the angular size of the occluder; we use 1.0 for the sun
// (i.e. effectively point source) — good enough for visualization.
// For a "fraction in shadow" treat the occluder disc as fully shadowing
// when perpDist + halfChord reaches the observer; that simplifies to
// perpDist < occluderRadius which we already check.
return Math.min(1, 1 - perpDist / occluderRadius);
}