Skip to content

Add animated ASCII ridged-mountains background to the home page#282

Merged
alexisbohns merged 2 commits into
mainfrom
claude/animated-home-background-71yaf3
Jul 19, 2026
Merged

Add animated ASCII ridged-mountains background to the home page#282
alexisbohns merged 2 commits into
mainfrom
claude/animated-home-background-71yaf3

Conversation

@alexisbohns

Copy link
Copy Markdown
Owner

Summary

  • Adds AsciiTerrainBackground, a full-bleed <canvas> that renders a grid of ASCII characters shaded by animated ridged Perlin noise behind the home page's hero content — a native port of ComputerK's "ridged mountains" CodePen (p5.js) to a hand-rolled Canvas2D loop, matching the app's existing no-animation-library convention (ArkaikLogoBoil, the wobble system).
  • New lib/background/perlin.ts (deterministic 2D Perlin noise) and lib/background/constants.ts (tuning knobs ported from the pen's CONFIG).
  • Theme-aware: paints the app's --foreground custom property at a low, brightness-modulated alpha, re-reading it live when ThemeToggle flips the dark class.
  • Respects prefers-reduced-motion: reduce — renders a single static frame instead of animating.
  • Wired into app/page.tsx, layered behind the existing radial-gradient vignette so hero content stays legible.

Closes #280.

Test plan

  • npm run lint
  • Verified in a headless browser: renders correctly in light and dark theme, animates smoothly, reflows on resize, and freezes to a static frame under prefers-reduced-motion: reduce (confirmed two frames captured 1.5s apart are pixel-identical in reduced motion, and differ in normal mode).
  • No console/page errors.

Lab Note

en:
  title: A living background on the home page
  summary: The home page now has a quiet, animated backdrop of drifting ASCII terrain — it adapts to light and dark mode and holds still if you prefer reduced motion.
fr:
  title: Un fond animé sur la page d'accueil
  summary: La page d'accueil a maintenant un fond discret et animé, un relief ASCII qui dérive doucement — il s'adapte au mode clair et sombre, et reste immobile si tu préfères moins d'animations.
suggested:
  molecule: arkaik
  type: feature
  tags: [changelog]

Generated by Claude Code

Ports ComputerK's "ridged mountains" CodePen (jENaeKp) from p5.js to a
hand-rolled Canvas2D loop: a grid of ASCII characters shaded by ridged
Perlin noise, panning slowly for a living terrain texture. Theme-aware
(paints the app's --foreground color), respects prefers-reduced-motion,
and follows the existing wobble/boil system's no-animation-library
convention.

Fixes #280

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZWExYDE1QhSsz5Z5ofybC
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arkaik Ready Ready Preview, Comment Jul 19, 2026 6:02pm

The texture now starts at ~6% opacity and eases up to full contrast
over 6s (smoothstep), so the logo reads first and the terrain grows
in behind it rather than appearing at full intensity immediately.
Skipped under prefers-reduced-motion, which still renders straight
at the resting frame.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZWExYDE1QhSsz5Z5ofybC
@alexisbohns alexisbohns self-assigned this Jul 19, 2026
@alexisbohns
alexisbohns merged commit ba6ddce into main Jul 19, 2026
5 checks passed
@alexisbohns
alexisbohns deleted the claude/animated-home-background-71yaf3 branch July 19, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add animated ASCII "ridged mountains" background to the home page

2 participants