[claude] Phase 4: Effects modules — matrix rain, lightning, beam, runes, gravity, shockwave (#423) #444
Reference in New Issue
Block a user
Delete Branch "claude/issue-423"
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?
Fixes #423
What
Phase 4 of the app.js modularization effort. Creates six self-contained ES modules under
modules/effects/, each following theinit(scene, state, theme)/update(elapsed, delta)contract from CLAUDE.md.Modules Created
matrix-rain.jslightning.jsenergy-beam.jsrune-ring.jsgravity-zones.jsshockwave.jsData Integrity Audit
state.zoneIntensity(commit activity) +state.commitHashesstate.zoneIntensity→totalActivity()state.zoneIntensity→totalActivity()state.activeAgentCountstate.portals(count, colors, online status)state.portals(positions, online status)onMergeFlash()callbacksNotes
app.jsis not modified — final wiring into the ticker happens in Phase 5 (slim-down).shockwave.jsuses anonMergeFlash(fn)callback registration API soterrain/stars.js(Phase 5) can own its own star-flash state without cross-module coupling.rune-ring.jsandgravity-zones.jsexposerebuild()/rebuildFromPortals()for external callers (portal health check system).Test Plan
node --check app.js— passes ✅modules/effects/passesnode --input-type=module --check✅init(scene, state, theme)on each module, effects should appear with the same visual behavior as the current monolith.Verification
Modules are pure additions — no runtime change until Phase 5 wires them. Existing behavior in
app.jsis unchanged.