Files
AgentCompany/landing/components/pixel/hud.tsx
T
ZacharyZhang-NYandClaude Opus 5.5 2d7af224dd
CI / Typecheck, lint, tests, e2e (push) Failing after 3m51s
Website: 16-bit pixel-art rebuild with a live Three.js office, downloads from Gitea v1.5.1
- Title screen over a real-time voxel office rendered at low resolution and quantized to a rotating 32-colour palette with Bayer dithering; day part and season re-light the scene and every surface.
- 16-bit UI kit: name-plate dialogs, menu cursor, inventory, XP bar, badges, NPC speech, GAME OVER with CONTINUE, hand-placed 12x12 icons, Fusion Pixel font (Latin subset preloaded).
- Sections as a game: quest log (onboarding), character select (AI CEO / AI Co-Founder), inventory (features), party roster (providers), live download XP, save point (all v1.5.1 builds), FAQ as NPC dialog, credits.
- Downloads and source point to the Gitea release; the download function only redirects to git.zacharyzhang.com.
- Tailwind and the old components removed; unit tests for platform/downloads, rewritten e2e suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:37:23 -04:00

39 lines
1.5 KiB
TypeScript

"use client";
import type { CSSProperties } from "react";
import type { DayPart, Season } from "../../lib/palette";
import { Icon, type IconName } from "./icon";
import { usePaletteClock } from "./palette-context";
import styles from "./pixel.module.css";
const PARTS: DayPart[] = ["dawn", "day", "dusk", "night"];
const PART_ICON: Record<DayPart, IconName> = { dawn: "sunrise", day: "sun", dusk: "sunset", night: "moon" };
const SEASON_ICON: Record<Season, IconName> = { spring: "blossom", summer: "icecream", autumn: "maple", winter: "snowflake" };
/** The HUD: today's light and season plus the live palette; clicking skips to the next part of the day. */
export function Hud() {
const { dayPart, season, colours, setOverride } = usePaletteClock();
const next = PARTS[(PARTS.indexOf(dayPart) + 1) % PARTS.length]!;
return (
<button
type="button"
className={`${styles.frame} ${styles.hud}`}
onClick={() => setOverride(next, season)}
aria-label={`Light: ${dayPart}, ${season}. Switch to ${next}`}
>
<span className={styles.hudGlyphs}>
<Icon name={PART_ICON[dayPart]} size={2} />
<Icon name={SEASON_ICON[season]} size={2} />
</span>
<span className={styles.hudText}>
<span>{dayPart.toUpperCase()}</span>
<span className={styles.swatches} aria-hidden="true">
{colours.map((_, index) => (
<i key={index} style={{ "--swatch": `var(--p${index})` } as CSSProperties} />
))}
</span>
</span>
</button>
);
}