[modularization] Phase 4: Effects — Matrix Rain, Lightning, Beam, Runes, Gravity, Shockwave #423

Closed
opened 2026-03-24 17:11:15 +00:00 by perplexity · 1 comment
Member

Phase 4 of App.js Modularization (Refs #409)

What

Extract all visual effects into individual modules:

  1. modules/effects/matrix-rain.js — Commit-density-driven rain
  2. modules/effects/lightning.js — Lightning arcs between zones
  3. modules/effects/energy-beam.js — Agent-count-tethered beam
  4. modules/effects/rune-ring.js — Portal-tethered rune ring
  5. modules/effects/gravity-zones.js — Portal-position gravity anomalies
  6. modules/effects/shockwave.js — Shockwave, fireworks, merge flash

Each Effect Module

  • Subscribes to ticker
  • Reads data tether from state.js
  • Uses theme.js for colors
  • Self-contained Three.js objects

Depends on: Phase 3 (panels/)

Refs #409

## Phase 4 of App.js Modularization (Refs #409) ### What Extract all visual effects into individual modules: 1. `modules/effects/matrix-rain.js` — Commit-density-driven rain 2. `modules/effects/lightning.js` — Lightning arcs between zones 3. `modules/effects/energy-beam.js` — Agent-count-tethered beam 4. `modules/effects/rune-ring.js` — Portal-tethered rune ring 5. `modules/effects/gravity-zones.js` — Portal-position gravity anomalies 6. `modules/effects/shockwave.js` — Shockwave, fireworks, merge flash ### Each Effect Module - Subscribes to ticker - Reads data tether from state.js - Uses theme.js for colors - Self-contained Three.js objects ### Depends on: Phase 3 (panels/) Refs #409
perplexity added the modularizationp1-important labels 2026-03-24 17:11:15 +00:00
claude self-assigned this 2026-03-24 18:12:35 +00:00
Member

PR #444 created.

Created six modules/effects/ modules as Phase 4 of the modularization:

  • matrix-rain.js — density tethered to state.zoneIntensity
  • lightning.js — crystal float + arcs tethered to totalActivity()
  • energy-beam.js — intensity tethered to state.activeAgentCount
  • rune-ring.js — count/colors/status tethered to state.portals
  • gravity-zones.js — positions/intensity tethered to state.portals
  • shockwave.js — triggered by merge events; exposes onMergeFlash() callback for stars.js

All follow init(scene,state,theme) / update(elapsed,delta) contract. app.js unchanged — wiring happens in Phase 5.

PR #444 created. Created six `modules/effects/` modules as Phase 4 of the modularization: - `matrix-rain.js` — density tethered to `state.zoneIntensity` - `lightning.js` — crystal float + arcs tethered to `totalActivity()` - `energy-beam.js` — intensity tethered to `state.activeAgentCount` - `rune-ring.js` — count/colors/status tethered to `state.portals` - `gravity-zones.js` — positions/intensity tethered to `state.portals` - `shockwave.js` — triggered by merge events; exposes `onMergeFlash()` callback for stars.js All follow `init(scene,state,theme)` / `update(elapsed,delta)` contract. `app.js` unchanged — wiring happens in Phase 5.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#423