Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(city): add scene lighting controls and improve billboard readability

Adam Eivy42eec044183a
diff --git a/client/src/components/city/Borough.jsx b/client/src/components/city/Borough.jsx
index e0fefb2826..379ce8c6f6 100644
--- a/client/src/components/city/Borough.jsx
+++ b/client/src/components/city/Borough.jsx
@@ -13,7 +13,7 @@ const hashString = (str) => {
return Math.abs(hash);
};
-export default function Borough({ app, position, agentMap, onBuildingClick, playSfx }) {
+export default function Borough({ app, position, agentMap, onBuildingClick, playSfx, neonBrightness }) {
const agentData = agentMap.get(app.id);
const agents = agentData?.agents || [];
const height = getBuildingHeight(app);
@@ -53,6 +53,7 @@ export default function Borough({ app, position, agentMap, onBuildingClick, play
agentCount={agents.length}
onClick={() => onBuildingClick?.(app)}
playSfx={playSfx}
+ neonBrightness={neonBrightness}
/>
{/* Process buildings in ring around main building */}
diff --git a/client/src/components/city/Building.jsx b/client/src/components/city/Building.jsx
index bf8c612978..bae74ac2d4 100644
--- a/client/src/components/city/Building.jsx
+++ b/client/src/components/city/Building.jsx
@@ -267,7 +267,7 @@ function NeonEdgeStrip({ position, height, color, delay }) {
);
}
-export default function Building({ app, position, agentCount, onClick, playSfx }) {
+export default function Building({ app, position, agentCount, onClick, playSfx, neonBrightness = 1.2 }) {
const meshRef = useRef();
const glowRef = useRef();
const haloRef = useRef();
@@ -305,9 +305,10 @@ export default function Building({ app, position, agentCount, onClick, playSfx }
if (!meshRef.current) return;
const t = clock.getElapsedTime();
- const baseIntensity = isOnline ? 0.5 : 0.2;
- const pulse = isOnline ? Math.sin(t * 2 + seed) * 0.15 : 0;
- const hoverBoost = hovered ? 0.4 : 0;
+ const nb = neonBrightness;
+ const baseIntensity = (isOnline ? 0.5 : 0.2) * nb;
+ const pulse = isOnline ? Math.sin(t * 2 + seed) * 0.15 * nb : 0;
+ const hoverBoost = hovered ? 0.4 * nb : 0;
meshRef.current.material.emissiveIntensity = baseIntensity + pulse + hoverBoost;
if (glowRef.current) {
@@ -336,7 +337,7 @@ export default function Building({ app, position, agentCount, onClick, playSfx }
<meshStandardMaterial
color={CITY_COLORS.buildingBody}
emissive={edgeColor}
- emissiveIntensity={0.35}
+ emissiveIntensity={0.35 * neonBrightness}
map={windowTexture}
transparent
opacity={app.archived ? 0.75 : 0.95}
diff --git a/client/src/components/city/BuildingCluster.jsx b/client/src/components/city/BuildingCluster.jsx
index 80dfbb64b5..48d2a4c2f4 100644
--- a/client/src/components/city/BuildingCluster.jsx
+++ b/client/src/components/city/BuildingCluster.jsx
@@ -4,7 +4,7 @@ import { computeCityLayout } from './cityLayout';
import { DISTRICT_PARAMS, PIXEL_FONT_URL } from './cityConstants';
import Borough from './Borough';
-export default function BuildingCluster({ apps, agentMap, onBuildingClick, onPositionsReady, playSfx }) {
+export default function BuildingCluster({ apps, agentMap, onBuildingClick, onPositionsReady, playSfx, settings }) {
const positions = useMemo(() => computeCityLayout(apps), [apps]);
// Notify parent when positions change (for data streams, roads, traffic)
@@ -36,6 +36,7 @@ export default function BuildingCluster({ apps, agentMap, onBuildingClick, onPos
agentMap={agentMap}
onBuildingClick={onBuildingClick}
playSfx={playSfx}
+ neonBrightness={settings?.neonBrightness ?? 1.2}
/>
);
})}
diff --git a/client/src/components/city/CityBillboards.jsx b/client/src/components/city/CityBillboards.jsx
index 442e3ea4e3..8346b19279 100644
--- a/client/src/components/city/CityBillboards.jsx
+++ b/client/src/components/city/CityBillboards.jsx
@@ -112,24 +112,24 @@ function Billboard({ position, rotation, messages, color, width = 3.5, height =
{/* Billboard background panel (front face only) */}
<mesh>
<planeGeometry args={[width, height]} />
- <meshBasicMaterial color="#020208" transparent opacity={0.7} />
+ <meshBasicMaterial color="#080820" transparent opacity={0.85} />
</mesh>
{/* Solid back blocker to prevent mirrored text bleed-through */}
<mesh position={[0, 0, -0.01]}>
<planeGeometry args={[width, height]} />
- <meshBasicMaterial color="#020208" side={THREE.BackSide} />
+ <meshBasicMaterial color="#080820" side={THREE.BackSide} />
</mesh>
{/* Neon border frame */}
<mesh ref={borderRef} geometry={borderGeom} position={[0, 0, 0.01]}>
- <meshBasicMaterial color={color} transparent opacity={0.2} />
+ <meshBasicMaterial color={color} transparent opacity={0.4} />
</mesh>
{/* Top label */}
<Text
position={[0, height / 2 - 0.28, 0.02]}
- fontSize={0.15}
+ fontSize={0.18}
color={color}
anchorX="center"
anchorY="middle"
@@ -143,20 +143,20 @@ function Billboard({ position, rotation, messages, color, width = 3.5, height =
<Text
ref={textRef}
position={[0, -0.05, 0.02]}
- fontSize={0.22}
- color="#ffffff"
+ fontSize={0.26}
+ color="#e0e8ff"
anchorX="center"
anchorY="middle"
font={PIXEL_FONT_URL}
- maxWidth={width - 0.6}
+ maxWidth={width - 0.5}
>
{displayText.current}
</Text>
{/* Accent line under label */}
<mesh position={[0, height / 2 - 0.45, 0.01]}>
- <planeGeometry args={[width - 0.4, 0.02]} />
- <meshBasicMaterial color={color} transparent opacity={0.4} />
+ <planeGeometry args={[width - 0.3, 0.025]} />
+ <meshBasicMaterial color={color} transparent opacity={0.6} />
</mesh>
{/* Holographic scan line overlay */}
@@ -178,11 +178,11 @@ function Billboard({ position, rotation, messages, color, width = 3.5, height =
{/* Glow halo behind billboard */}
<mesh ref={glowRef} position={[0, 0, -0.05]}>
- <planeGeometry args={[width + 1.2, height + 0.8]} />
+ <planeGeometry args={[width + 1.5, height + 1.0]} />
<meshBasicMaterial
color={color}
transparent
- opacity={0.1}
+ opacity={0.18}
blending={THREE.AdditiveBlending}
depthWrite={false}
/>
diff --git a/client/src/components/city/CityGround.jsx b/client/src/components/city/CityGround.jsx
index e97b6ac9d5..574e30c7b3 100644
--- a/client/src/components/city/CityGround.jsx
+++ b/client/src/components/city/CityGround.jsx
@@ -35,7 +35,7 @@ function RollingFog() {
useFrame(({ clock }) => {
if (!ref.current) return;
const t = clock.getElapsedTime();
- ref.current.material.opacity = 0.012 + Math.sin(t * 0.15) * 0.008;
+ ref.current.material.opacity = 0.025 + Math.sin(t * 0.15) * 0.012;
ref.current.position.z = Math.sin(t * 0.05) * 3;
});
@@ -81,9 +81,9 @@ export default function CityGround({ settings }) {
<mesh rotation={[-Math.PI / 2, 0, 0]} position={[0, -0.02, 0]}>
<planeGeometry args={[120, 120]} />
<meshStandardMaterial
- color="#050510"
- metalness={0.9}
- roughness={0.15}
+ color="#0a0a20"
+ metalness={0.85}
+ roughness={0.2}
side={THREE.DoubleSide}
/>
</mesh>
@@ -97,8 +97,8 @@ export default function CityGround({ settings }) {
sectionColor={CITY_COLORS.ground}
cellThickness={0.4}
sectionThickness={1}
- fadeDistance={50}
- fadeStrength={1}
+ fadeDistance={70}
+ fadeStrength={0.8}
position={[0, -0.01, 0]}
/>
@@ -113,7 +113,7 @@ export default function CityGround({ settings }) {
<meshBasicMaterial
color="#06b6d4"
transparent
- opacity={0.015}
+ opacity={0.03}
blending={THREE.AdditiveBlending}
side={THREE.DoubleSide}
/>
diff --git a/client/src/components/city/CityLights.jsx b/client/src/components/city/CityLights.jsx
index 900a560759..4dd620278a 100644
--- a/client/src/components/city/CityLights.jsx
+++ b/client/src/components/city/CityLights.jsx
@@ -54,26 +54,27 @@ function Searchlight() {
);
}
-export default function CityLights() {
+export default function CityLights({ settings }) {
+ const b = settings?.ambientBrightness ?? 1.2;
return (
<>
- <ambientLight intensity={0.18} color="#1a1a3a" />
+ <ambientLight intensity={0.18 * b} color="#1a1a3a" />
{/* Main overhead cyan */}
- <pointLight position={[0, 30, 0]} intensity={1.2} color="#06b6d4" distance={100} />
+ <pointLight position={[0, 30, 0]} intensity={1.2 * b} color="#06b6d4" distance={100} />
{/* Secondary overhead fill - broad white/blue */}
- <pointLight position={[0, 20, 10]} intensity={0.5} color="#4488cc" distance={90} />
+ <pointLight position={[0, 20, 10]} intensity={0.5 * b} color="#4488cc" distance={90} />
{/* Magenta accent from left - animated color shift */}
- <AnimatedLight position={[-20, 12, -15]} baseColor="#ec4899" intensity={0.7} distance={60} speed={0.3} shiftRange={0.15} />
+ <AnimatedLight position={[-20, 12, -15]} baseColor="#ec4899" intensity={0.7 * b} distance={60} speed={0.3} shiftRange={0.15} />
{/* Blue accent from right - animated shift */}
- <AnimatedLight position={[20, 12, 15]} baseColor="#3b82f6" intensity={0.7} distance={60} speed={0.4} shiftRange={0.12} />
+ <AnimatedLight position={[20, 12, 15]} baseColor="#3b82f6" intensity={0.7 * b} distance={60} speed={0.4} shiftRange={0.12} />
{/* Purple from behind - more presence */}
- <pointLight position={[0, 15, -25]} intensity={0.5} color="#8b5cf6" distance={60} />
+ <pointLight position={[0, 15, -25]} intensity={0.5 * b} color="#8b5cf6" distance={60} />
{/* Warm orange ground level accent */}
- <pointLight position={[10, 3, 5]} intensity={0.35} color="#f97316" distance={35} />
+ <pointLight position={[10, 3, 5]} intensity={0.35 * b} color="#f97316" distance={35} />
{/* Additional green accent - ground level from opposite side */}
- <pointLight position={[-12, 3, 8]} intensity={0.2} color="#22c55e" distance={25} />
+ <pointLight position={[-12, 3, 8]} intensity={0.2 * b} color="#22c55e" distance={25} />
{/* Red warning accent from below-right */}
- <pointLight position={[15, 2, -10]} intensity={0.15} color="#f43f5e" distance={22} />
+ <pointLight position={[15, 2, -10]} intensity={0.15 * b} color="#f43f5e" distance={22} />
{/* Sweeping searchlight */}
<Searchlight />
</>
diff --git a/client/src/components/city/CityScene.jsx b/client/src/components/city/CityScene.jsx
index 36ad2dfce3..333fe1b741 100644
--- a/client/src/components/city/CityScene.jsx
+++ b/client/src/components/city/CityScene.jsx
@@ -40,8 +40,8 @@ export default function CityScene({ apps, agentMap, onBuildingClick, cosStatus,
style={{ background: '#030308' }}
gl={{ antialias: true }}
>
- <fogExp2 attach="fog" args={['#030308', 0.01]} />
- <CityLights />
+ <fogExp2 attach="fog" args={['#030308', settings?.fogDensity ?? 0.008]} />
+ <CityLights settings={settings} />
<CityStarfield />
<CityShootingStars playSfx={playSfx} />
<CityCelestial />
@@ -54,6 +54,7 @@ export default function CityScene({ apps, agentMap, onBuildingClick, cosStatus,
onBuildingClick={onBuildingClick}
onPositionsReady={handlePositionsReady}
playSfx={playSfx}
+ settings={settings}
/>
<CityDataStreams positions={positions} />
<CityTraffic positions={positions} />
diff --git a/client/src/components/city/CitySettingsPanel.jsx b/client/src/components/city/CitySettingsPanel.jsx
index b24aaceea8..85ac3d24b4 100644
--- a/client/src/components/city/CitySettingsPanel.jsx
+++ b/client/src/components/city/CitySettingsPanel.jsx
@@ -33,12 +33,15 @@ function SettingToggle({ label, value, onChange }) {
);
}
-function SettingSlider({ label, value, onChange, min = 0, max = 1, step = 0.05 }) {
+function SettingSlider({ label, value, onChange, min = 0, max = 1, step = 0.05, format }) {
+ const displayValue = format
+ ? format(value)
+ : `${Math.round(value * 100)}%`;
return (
<div className="py-1">
<div className="flex items-center justify-between mb-1">
<span className="font-pixel text-[10px] text-gray-400 tracking-wide">{label}</span>
- <span className="font-pixel text-[9px] text-cyan-400/60">{Math.round(value * 100)}%</span>
+ <span className="font-pixel text-[9px] text-cyan-400/60">{displayValue}</span>
</div>
<input
type="range"
@@ -188,6 +191,38 @@ export default function CitySettingsPanel() {
/>
</div>
+ {/* Scene Lighting */}
+ <div>
+ <div className="font-pixel text-[9px] text-cyan-500/60 tracking-wider mb-1">SCENE LIGHTING</div>
+ <SettingSlider
+ label="AMBIENT BRIGHTNESS"
+ value={settings.ambientBrightness}
+ onChange={(v) => updateSetting('ambientBrightness', v)}
+ min={0.5}
+ max={2.5}
+ step={0.1}
+ format={(v) => `${v.toFixed(1)}x`}
+ />
+ <SettingSlider
+ label="NEON BRIGHTNESS"
+ value={settings.neonBrightness}
+ onChange={(v) => updateSetting('neonBrightness', v)}
+ min={0.5}
+ max={2.5}
+ step={0.1}
+ format={(v) => `${v.toFixed(1)}x`}
+ />
+ <SettingSlider
+ label="FOG DENSITY"
+ value={settings.fogDensity}
+ onChange={(v) => updateSetting('fogDensity', v)}
+ min={0}
+ max={0.03}
+ step={0.001}
+ format={(v) => v === 0 ? 'OFF' : v.toFixed(3)}
+ />
+ </div>
+
{/* Reset */}
<button
onClick={resetSettings}
diff --git a/client/src/hooks/useCitySettings.js b/client/src/hooks/useCitySettings.js
index a69fec610b..2c3e00999b 100644
--- a/client/src/hooks/useCitySettings.js
+++ b/client/src/hooks/useCitySettings.js
@@ -8,6 +8,8 @@ const QUALITY_PRESETS = {
reflectionsEnabled: false, chromaticAberration: false,
filmGrain: false, colorGrading: false,
particleDensity: 0.5, scanlineOverlay: false,
+ ambientBrightness: 1.0, fogDensity: 0.008,
+ neonBrightness: 1.0,
dpr: [1, 1],
},
medium: {
@@ -15,6 +17,8 @@ const QUALITY_PRESETS = {
reflectionsEnabled: true, chromaticAberration: false,
filmGrain: false, colorGrading: true,
particleDensity: 0.75, scanlineOverlay: true,
+ ambientBrightness: 1.0, fogDensity: 0.01,
+ neonBrightness: 1.0,
dpr: [1, 1.25],
},
high: {
@@ -22,6 +26,8 @@ const QUALITY_PRESETS = {
reflectionsEnabled: true, chromaticAberration: true,
filmGrain: true, colorGrading: true,
particleDensity: 1.0, scanlineOverlay: true,
+ ambientBrightness: 1.2, fogDensity: 0.008,
+ neonBrightness: 1.2,
dpr: [1, 1.5],
},
ultra: {
@@ -29,6 +35,8 @@ const QUALITY_PRESETS = {
reflectionsEnabled: true, chromaticAberration: true,
filmGrain: true, colorGrading: true,
particleDensity: 1.5, scanlineOverlay: true,
+ ambientBrightness: 1.5, fogDensity: 0.006,
+ neonBrightness: 1.5,
dpr: [1, 2],
},
};