[claude] Phase 1: Core Foundation — scene, ticker, theme, state (#410) #463
Reference in New Issue
Block a user
Delete Branch "claude/issue-410"
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 #410
Summary
modules/core/scene.js(new): re-exportsscene,camera,renderer,orbitControls,composer, resize handler fromscene-setup.jsandcontrols.js— canonical scene primitives for app.js and future modulesmodules/core/ticker.js(updated): addssubscribe(fn),unsubscribe(fn), andstart()exports with a single internalrequestAnimationFrameloop andTHREE.Clock— no module may call RAF directlymodules/core/theme.js(updated): expandsNEXUSexport with fullthemeobject covering accent, panel surfaces, agent status colors, sovereignty meter, holographic earth, LoRA panel, and font constants; retainsTHEMEexport for legacy consumersapp.js(updated): imports all four core modules, replaces manualrequestAnimationFrameloop withsubscribe()+start()Data Integrity Audit
This PR is a pure structural/architectural change. No new visual elements are added or modified.
Test Plan
http://localhost:3000— scene renders with no visual changesubscribefromcore/ticker.jsandNEXUSfromcore/theme.js— these now resolve correctlynode --check app.jspassessubscribecallbackVerification
node --check app.js✅All panel + effects module syntax checks pass ✅
Acceptance Criteria
modules/core/scene.jscreated and exportedmodules/core/ticker.jshas single RAF loop + subscribe/unsubscribemodules/core/theme.jsexports fullNEXUS.thememodules/core/state.jsalready complete (from prior work)node --check app.jspassesapp.jsimports all four core modules