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

fix(city): brighten noon sky to actual daytime blue and add ambient color per time-of-day

Adam Eivy2a41cf3dce9b
diff --git a/client/src/components/city/CityLights.jsx b/client/src/components/city/CityLights.jsx
index 87ae73c90a..b508fbe397 100644
--- a/client/src/components/city/CityLights.jsx
+++ b/client/src/components/city/CityLights.jsx
@@ -1,5 +1,6 @@
import { useRef } from 'react';
import { useFrame } from '@react-three/fiber';
+import * as THREE from 'three';
import { CITY_COLORS } from './cityConstants';
// Animated accent light that slowly shifts color, with reactive brightness
@@ -78,14 +79,19 @@ function ReactivePointLight({ position, baseIntensity, color, distance, brightne
export default function CityLights({ settings }) {
// Combine ambient brightness slider with time-of-day daylight factor
const timeOfDay = settings?.timeOfDay ?? 'sunset';
- const daylightFactor = CITY_COLORS.timeOfDay[timeOfDay]?.daylightFactor ?? 0.6;
- const brightnessRef = useRef((settings?.ambientBrightness ?? 1.2) * daylightFactor);
- brightnessRef.current = (settings?.ambientBrightness ?? 1.2) * daylightFactor;
+ const preset = CITY_COLORS.timeOfDay[timeOfDay] ?? CITY_COLORS.timeOfDay.sunset;
+ const brightnessRef = useRef((settings?.ambientBrightness ?? 1.2) * preset.daylightFactor);
+ brightnessRef.current = (settings?.ambientBrightness ?? 1.2) * preset.daylightFactor;
+
+ const ambientColorTarget = useRef(new THREE.Color(preset.ambientColor));
+ ambientColorTarget.current.set(preset.ambientColor);
const ambientRef = useRef();
- useFrame(() => {
+ useFrame((_, delta) => {
if (!ambientRef.current) return;
ambientRef.current.intensity = 0.18 * brightnessRef.current;
+ // Smoothly lerp ambient color toward target
+ ambientRef.current.color.lerp(ambientColorTarget.current, Math.min(1, delta * 3));
});
return (
diff --git a/client/src/components/city/cityConstants.js b/client/src/components/city/cityConstants.js
index 447af31a76..9ceace756e 100644
--- a/client/src/components/city/cityConstants.js
+++ b/client/src/components/city/cityConstants.js
@@ -36,20 +36,22 @@ export const CITY_COLORS = {
sunScale: 1.0,
isMoon: false,
daylightFactor: 0.6,
+ ambientColor: '#2a1a3a',
},
noon: {
hour: 12,
- zenith: '#182848',
- midSky: '#2a3d6a',
- horizonHigh: '#506888',
- horizonLow: '#7090a8',
- sunCore: '#ffffdd',
- sunGlow: '#ffffbb',
- sunLight: '#eeeeff',
- sunIntensity: 1.0,
+ zenith: '#2266bb',
+ midSky: '#4499dd',
+ horizonHigh: '#88ccee',
+ horizonLow: '#bbddee',
+ sunCore: '#ffffee',
+ sunGlow: '#ffffcc',
+ sunLight: '#ffffff',
+ sunIntensity: 1.5,
sunScale: 0.7,
isMoon: false,
- daylightFactor: 1.8,
+ daylightFactor: 2.5,
+ ambientColor: '#6688aa',
},
sunset: {
hour: 18,
@@ -64,6 +66,7 @@ export const CITY_COLORS = {
sunScale: 1.0,
isMoon: false,
daylightFactor: 0.6,
+ ambientColor: '#1a1a3a',
},
midnight: {
hour: 0,
@@ -78,6 +81,7 @@ export const CITY_COLORS = {
sunScale: 0.6,
isMoon: true,
daylightFactor: 0.3,
+ ambientColor: '#0a0a1a',
},
},
};