Files
the-matrix/js
Alexander Whitestone 87486d2c7f feat: add day/night cycle driven by real UTC time
- New js/daynight.js module: computes sun elevation from UTC time,
  drives a DirectionalLight sun arc (east → zenith → west), adjusts
  ambient color/intensity, fog color, and star opacity each frame.
- Sunrise ~06:00 UTC, sunset ~18:00 UTC with smooth transitions.
- Stars (existing starfield) fade during day and glow green at night.
- Agent emissive glow and point-light intensity boost at night via
  nightFactor passed to updateAgents().
- WebGL context-loss recovery: daynight refs disposed in disposeWorld /
  disposeEffects and re-initialised on rebuild.

Fixes #4

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 14:06:37 -04:00
..