Add day/night cycle based on real UTC time #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement a day/night cycle following real UTC time. Sunrise/sunset lighting transitions. Agents glow brighter at night. Stars appear. Use Three.js directional lights.
PR created: http://143.198.27.163:3000/rockachopa/the-matrix/pulls/11
Summary of changes:
js/daynight.js: computes sun elevation from real UTC time, drives aTHREE.DirectionalLightsun arc (east → overhead → west), adjusts ambient color, fog, and star visibility each frame viasmoothsteptransitionsnightFactorpassed toupdateAgents()disposeWorld/disposeEffects, re-initialised on rebuildvite buildpasses clean