From f68acc65c07a269f5175478800842e8f723de2ea Mon Sep 17 00:00:00 2001 From: Nyk <0xnykcd@googlemail.com> Date: Thu, 5 Mar 2026 15:55:41 +0700 Subject: [PATCH] feat(office): animate day-cycle ambience --- src/components/panels/office-panel.tsx | 113 +++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/src/components/panels/office-panel.tsx b/src/components/panels/office-panel.tsx index 8fc3bdf..a70cb24 100644 --- a/src/components/panels/office-panel.tsx +++ b/src/components/panels/office-panel.tsx @@ -108,6 +108,7 @@ interface ThemePalette { roomTone: string floorOpacityA: number floorOpacityB: number + accentGlow: string } interface PersistedOfficePrefs { @@ -899,6 +900,7 @@ export function OfficePanel() { roomTone: 'linear-gradient(to bottom right, rgba(255,219,167,0.2), rgba(82,67,96,0.12))', floorOpacityA: 0.95, floorOpacityB: 0.8, + accentGlow: 'rgba(255,183,120,0.32)', } } if (timeTheme === 'day') { @@ -916,6 +918,7 @@ export function OfficePanel() { roomTone: 'linear-gradient(to bottom right, rgba(196,236,255,0.18), rgba(81,116,171,0.08))', floorOpacityA: 0.98, floorOpacityB: 0.86, + accentGlow: 'rgba(176,232,255,0.3)', } } if (timeTheme === 'dusk') { @@ -933,6 +936,7 @@ export function OfficePanel() { roomTone: 'linear-gradient(to bottom right, rgba(244,164,209,0.17), rgba(88,62,126,0.16))', floorOpacityA: 0.9, floorOpacityB: 0.75, + accentGlow: 'rgba(232,141,206,0.27)', } } return { @@ -949,9 +953,25 @@ export function OfficePanel() { roomTone: 'linear-gradient(to bottom right, rgba(94,133,207,0.17), rgba(19,27,52,0.24))', floorOpacityA: 0.84, floorOpacityB: 0.66, + accentGlow: 'rgba(116,152,255,0.26)', } }, [timeTheme]) + const nightSparkles = useMemo( + () => + Array.from({ length: 14 }, (_, idx) => { + const seed = hashNumber(`night-${idx}`) + return { + id: idx, + x: 6 + (seed % 88), + y: 6 + ((seed >> 3) % 38), + delay: (seed % 7) * 0.4, + size: 2 + (seed % 3), + } + }), + [], + ) + const heatmapPoints = useMemo(() => { return renderedWorkers.map((worker) => { const action = agentActionOverrides.get(worker.agent.id) @@ -1644,6 +1664,72 @@ export function OfficePanel() {
+ {timeTheme === 'dawn' && ( + + )} + {timeTheme === 'day' && ( + <> + + + > + )} + {timeTheme === 'dusk' && ( + + )} + {timeTheme === 'night' && ( + <> + + {nightSparkles.map((spark) => ( + + ))} + > + )}