Skip to content

docs: draw the website's scene in each theme's own style - #389

Merged
Seb-GRAF merged 2 commits into
docs/website-absurd-inkfrom
docs/website-scene-styles
Oct 31, 2026
Merged

Seb-GRAF merged 2 commits into
docs/website-absurd-inkfrom
docs/website-scene-styles

Conversation

@Seb-GRAF

@Seb-GRAF Seb-GRAF commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #385, the website revamp.

Problem

Picking a theme on the website only changes the lighthouse's stripes and hat, so the scene behind the page looks the same for every theme.

Changes

Each theme now draws the whole scene in its own medium. The hill, animals, gags and hours stay the same, and the lighthouse keeps its pyjamas.

Theme Style
Built-in Felt pen, unchanged
Catppuccin Clay stop-motion: lit plasticine, rolled clay strands for lines, a cellophane beam, 12 frames a second
Notch Magazine cartoon: still brush line, grey washes on white paper, one caption per section
Phosphor Pen-plotter drawing by day, glowing amber vector screen at night, with a radar sweep for the beam
Nord Paper cut: cast shadows, paper fibre, a vellum beam, a paper aurora at night, a slight parallax with the pointer
Gruvbox 70s screen print: fat lines, halftone dots, grain, a striped sunset
Léman Swiss travel poster: flat lit and shadow planes, an airbrushed sky, the Alps across the lake
  • scene.js gets a style layer, documented in its "styles" comment block. A style can swap the line, the fills, the palette, the colour constants, the font, the frame rate, passes before and after the frame, and any of the 43 drawings. The drawings now call each other through that layer.
    • Strokes say whether they are an outline or hatching, so styles without lines can drop them.
    • The iris and lamplight colours moved into C.
  • Each style is one file in site/styles/, loaded after scene.js.
  • The switch: changing theme turns the beam once round, and the new style appears where the light passes. This replaces the sparkle. With reduced motion, or out at sea, the style changes at once.
  • The dive: each island is drawn in its own theme's style. The far island seen from the page is in the page's style and fades into its own as the dive begins.
  • Font: the cartoon's captions use Libre Caslon Text Italic (SIL OFL), self-hosted at 18 KB with its licence.
  • Out at sea, the theme follows the islands. As each island goes past, the sky, sea, clouds and bar switch to the next island's theme.
    • A circle opens out from the middle of the horizon over 0.9 s, and the bar switches when the circle reaches it.
    • Only the sky and sea are drawn twice meanwhile.
    • Back on the page, the visitor's pick returns.
  • Speed:
    • Phosphor's glow is baked once into the cached layers and sprites, through a new cached lever, instead of blurring the whole screen every frame.
    • Notch's sea draws its far dashes as rectangles and keeps its hash arguments small.

The cartoon's captions, for a copy check:

  • Hero: "He's very stable. He hasn't moved in forty years."
  • Edit: "A little to the left. No, my left."
  • Themes: "He changes every evening. It's always stripes."
  • Widgets: "It shows how full the disk is. I find it calming."
  • Tiling: "We each have our own workspace now. It's done wonders for the marriage."
  • Install: "Come in. I've only just set it up, so don't touch anything."

Testing

  • Rendered offscreen in headless Chrome: all seven themes, every section and the dive, by day and at night, at 1440×900, 390×844 and 2560×1440. No page errors.
  • Built-in matches the base branch apart from animation timing.
  • Frame costs, measured with the GPU on (headless Chrome, ANGLE Metal, M3 Pro), at 3440×1440 at 1x and 1512×982 at 2x:
    • Phosphor at night went from about 9 ms a frame, with spikes past 20 ms, to about 3 ms, the same as built-in.
    • A theme switch at sea costs 1.0 to 1.3 times a normal frame.
    • Notch's sea went from 8 ms to 1.4 ms.
  • Not checked: Safari, Firefox or a real GPU, and how fonts fall back off macOS. Rockwell, Avenir Next, Monaco, SF Pro Rounded and condensed Helvetica are Mac system fonts. There is no recording of the beam's sweep.

Before, the seven themes by day on the base branch:

Before: the seven themes by day

After, by day (built-in, Catppuccin, Notch, Phosphor, Nord, Gruvbox, Léman):

After: the seven themes by day

After, at night:

After: the seven themes at night

The dive, past one island per theme, each in its own style:

The dive past the islands

Known gaps:

  • On a phone, the cards cover the cartoon's Themes and Widgets captions and the bottom of the Install one.
  • In the Swiss and vector styles, "a sheep (in a box)" sometimes overlaps a sheep.
  • Gruvbox's striped sunset replaces the fried egg.
  • The copy "Same lighthouse, different pyjamas." under the theme picker is unchanged.

Merging

Two commits; a merge commit keeps both. It targets docs/website-absurd-ink: merge it there before #385 lands, or retarget it to main afterwards.

Claude Opus 5.5 via Claude Code in T3 Code

@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eaa5c0b0-b608-45d2-86af-40de32f8d74d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Seb-GRAF
Seb-GRAF merged commit 3d1eda7 into docs/website-absurd-ink Oct 31, 2026
9 checks passed
@Seb-GRAF
Seb-GRAF deleted the docs/website-scene-styles branch October 31, 2026 13:49
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.

1 participant