Files
the-nexus/modules/core/ticker.js
Alexander Whitestone aa65e39bfe
Some checks failed
CI / validate (pull_request) Failing after 14s
CI / auto-merge (pull_request) Has been skipped
feat: wire effects/ modules into app.js via globalTicker (Refs #413)
- init all 6 effects modules in app.js (matrix-rain, lightning, energy-beam, rune-ring, gravity-zones, shockwave)
- subscribe each to globalTicker; tick() called in the RAF loop
- add subscribe() named export to core/ticker.js for panels compatibility
- bridge data to core/state.js: zoneIntensity from heatmap.js, activeAgentCount + commitHashes from data/gitea.js, portals from portals.js
- update portals.js and weather.js to use new effects/rune-ring and effects/gravity-zones instead of legacy effects.js

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 18:17:37 -04:00

12 lines
303 B
JavaScript

export class Ticker {
constructor() {
this.callbacks = [];
}
subscribe(fn) { this.callbacks.push(fn); }
tick(delta, elapsed) {
this.callbacks.forEach(fn => fn(delta, elapsed));
}
}
export const globalTicker = new Ticker();
export function subscribe(fn) { globalTicker.subscribe(fn); }