- 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>
Applies Replit PR #28 feature on top of current main:
- Root sw.js template with __PRECACHE_URLS__ placeholder
- generate-sw Vite plugin: reads build manifest, injects actual asset URLs
- manifest: true in Vite build config for asset manifest generation
- SW registration gated to import.meta.env.PROD (no dev interference)
- Preserves existing manifest.json and public/sw.js as dev fallback
Applies Replit PR #21 feature on top of current main:
- buildWorld()/teardown() lifecycle for world rebuild on context restore
- disposeWorld(), disposeAgents(), disposeEffects(), disposeInteraction()
- getAgentStates()/applyAgentStates() for state preservation across rebuilds
- webgl-recovery-overlay in index.html
- Canvas reuse on reinit (existingCanvas param in initWorld)
- Preserves: visibility-change pause, visitor init, debounced resize
Applies Replit PR #20 feature on top of current main:
- Per-agent localStorage chat history (max 100 per agent)
- Timestamps on chat entries
- Load all histories on init, sorted by time
- Clear button handler
- Auto-persist on each appendChatMessage call