Files
the-nexus/modules/core/theme.js
Alexander Whitestone 538e88f972
Some checks failed
CI / validate (pull_request) Failing after 14s
CI / auto-merge (pull_request) Has been skipped
feat: Phase 1 core foundation — scene, ticker, theme, state
- modules/core/scene.js: new module exporting scene, camera, renderer,
  OrbitControls, composer, and resize handler via re-exports from
  scene-setup.js and controls.js
- modules/core/ticker.js: single RAF loop with subscribe(fn)/unsubscribe(fn)/
  start() — no module calls requestAnimationFrame directly
- modules/core/theme.js: expand NEXUS export with full theme object covering
  accent, panel, agent-status, sovereignty, earth, LoRA, and font constants;
  retain THEME for SovOS.js consumers
- app.js: wire to all four core modules; replace manual RAF loop with
  ticker subscribe + start()

Fixes #410

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

79 lines
2.1 KiB
JavaScript

// modules/core/theme.js — NEXUS visual constants
// Single source of truth for all colors, fonts, line weights, glow params.
// No module may use inline hex codes or hardcoded font strings.
/** NEXUS — the canonical theme object used by all visual modules */
export const NEXUS = {
/** Numeric hex colors for THREE.js materials */
colors: {
bg: 0x000008,
starCore: 0xffffff,
starDim: 0x8899cc,
constellationLine: 0x334488,
constellationFade: 0x112244,
accent: 0x4488ff,
},
/** All canvas/CSS/string visual constants */
theme: {
// Accent (hex number + CSS string pair)
accent: 0x4488ff,
accentStr: '#4488ff',
// Panel surfaces
panelBg: '#0a1428',
panelText: '#4af0c0',
panelDim: '#7b9bbf',
panelVeryDim: '#3a5070',
panelBorderFaint: '#1a3050',
// Agent status colors (CSS strings for canvas)
agentWorking: '#4af0c0',
agentIdle: '#7b5cff',
agentDormant: '#2a4060',
agentDormantHex: 0x2a4060,
agentDead: '#3a2040',
// Sovereignty meter
sovereignHigh: '#4af0c0',
sovereignHighHex: 0x4af0c0,
sovereignMid: '#ffd700',
sovereignMidHex: 0xffd700,
sovereignLow: '#ff4444',
sovereignLowHex: 0xff4444,
// Holographic earth
earthOcean: '#0a2040',
earthLand: '#1a4020',
earthAtm: '#204070',
earthGlow: '#4488ff',
// LoRA panel
loraActive: '#4af0c0',
loraInactive: '#3a5070',
loraAccent: '#7b5cff',
// Typography
fontMono: 'monospace',
},
};
/** THEME — glass / text presets (kept for SovOS.js and other legacy consumers) */
export const THEME = {
glass: {
color: 0x112244,
opacity: 0.35,
roughness: 0.05,
metalness: 0.1,
transmission: 0.95,
thickness: 0.8,
ior: 1.5,
},
text: {
primary: '#4af0c0',
secondary: '#7b5cff',
white: '#ffffff',
dim: '#a0b8d0',
},
};