hex/site
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dax b2b7e56c5b
perf(site): a smoother homepage show with identical pixels (#727)
- WebGPU: upload changed atlas rects through a small staging canvas, once each per
  frame, instead of copying from the 4096² atlas (each copy snapshotted the whole
  canvas); the canvas is opaque, so it says so.
- Canvas 2D: cut each shard's face from the card atlas once instead of clipping the
  card twice a frame per shard.
- Screen break: settled cracks keep their paths, styles and crater gradient; the
  idle glass layer leaves the layout.
- Make the AudioContext when the visitor reaches for the key, stop the hidden
  keycap glow, and drop the unused motion wrapper (~24 KB gzip of first-load JS).
2026-10-31 21:49:35 -04:00
..
public Move to dev and production branches 2026-10-25 06:46:14 -07:00
scripts Site: one install switcher with every way to install Hex, and nothing else (#396) 2026-10-29 16:12:07 -04:00
src perf(site): a smoother homepage show with identical pixels (#727) 2026-10-31 21:49:35 -04:00
.gitignore feat(release): publish every platform to the Anomaly release service 2026-10-24 10:15:59 -04:00
bun.lock perf(site): a smoother homepage show with identical pixels (#727) 2026-10-31 21:49:35 -04:00
cloudflare.config.ts Add a dev update channel: Settings and hex settings choose Stable or Dev, Release publishes dev builds to anoma.ly/release, and /hex/download/dev links the newest Mac dev build 2026-10-27 08:32:08 -07:00
index.html feat(release): serve Hex at anoma.ly/hex with its files at /hex/files 2026-10-23 08:57:57 -04:00
package.json perf(site): a smoother homepage show with identical pixels (#727) 2026-10-31 21:49:35 -04:00
README.md Site: sliding equal-width OS tabs, a steady install stack, and an Intel Mac notice (#468) 2026-10-30 13:35:27 +00:00
tsconfig.app.json feat: add HEX marketing site 2026-07-19 14:18:50 -04:00
tsconfig.json feat: add HEX marketing site 2026-07-19 14:18:50 -04:00
tsconfig.node.json feat(release): serve Hex at anoma.ly/hex with its files at /hex/files 2026-10-23 08:57:57 -04:00
vite.config.ts feat(release): serve Hex at anoma.ly/hex with its files at /hex/files 2026-10-23 08:57:57 -04:00
worker.ts Lowercase release file names; README downloads by channel (#456) (#601) 2026-10-31 12:51:09 -04:00

Hex website

https://anoma.ly/hex is the one Hex site (dev: https://dev.anoma.ly/hex). bun run dev starts Vite. bun run build [--mode dev] checks TypeScript and builds Cloudflare Build Output with base /hex/; bun run check:downloads checks that every download link serves a file. cloudflare.config.ts defines both Workers. CI deploys them, never a laptop: Site builds without secrets and .github/release/deploy-site.sh deploys the verified Build Output (cf deploy --prebuilt --mode <mode>), refusing any Worker, route, or binding other than this config's (docs/releasing.md). worker.ts serves the site and, at /hex/files/, the environment's R2 bucket of release files, and 301s other hosts and plain HTTP to the canonical host.

The download section (src/Download.tsx) is one install switcher and nothing else: macOS, Windows, and Linux tabs of equal width with a sliding pill, each with every way to install there in at most three rows (Mac: DMG, Homebrew; Windows: installer, PowerShell script; Linux: script, package, binary), a small switch inside a row where it has variants (x64/ARM64 for the Windows installer and the Linux binary, which the Linux packages follow too; Debian, Fedora, Nix, and AUR for the Linux package), and the download button or copyable command. All three stacks share one grid cell, so switching tabs never moves the page. An Intel Mac sees that Hex requires Apple silicon instead of a download. It selects the visitor's OS and architecture on first paint and refines them with UA client hints. Versions, URLs, and commands live in src/release.ts; file links name /hex/download/<target>, which the Worker sends to the stable release once there is one and to the newest dev build until then. The AUR package appears from the first build after a stable release, which pushes hex-bin. Add ?platform=mac|mac-intel|windows-x64|windows-arm64|linux|linux-arm64|mobile to see each default.

The hero is a show (src/shout/, plain JS): Kit's notifications pile up around a floating head that answers them out loud, dictates prompts into an OpenCode window that fixes the complaints, powers up, and finally sprays the inbox clean. WebGPU renders it, with a Canvas 2D fallback (?canvas2d forces it).

  • The prerendered page shows public/shout-idle.webp, a still of the idle head, in .show__head. The engine chunk loads when the browser is idle or the visitor reaches for the ⌥ key (phones wait for the tap), then draws the same head into that box (the canvas reads the box, 3.2 head radii wide, so nothing moves).
  • Nothing audible or heavy loads before the key press: the voice bank and its manifest are fetched on start, the opening clips first. The sound toggle in the header remembers its choice in localStorage.
  • It pauses when the tab is hidden or the hero is off screen, runs the idle head at 30 fps, caps the pixel ratio (1.5 on phones), and thins the messages on small screens. Reduced motion keeps the still until the key is pressed, then runs only the calm stage with no shake or flashes.
  • Dax, Jay and Frank (teammates) appear with their real X avatars; everyone else is invented with a generated portrait (src/shout/assets/people.webp). Brand glyphs are Simple Icons (CC0) and Lucide (ISC); OpenCode's mark is from opencode.ai.

VITE_SHOUT_CAPTURE=1 builds a capture variant with a deterministic frame stepper (?capture, window.__shout) and an audio play log; production builds strip it. Regenerate the idle still after changing the head:

VITE_SHOUT_CAPTURE=1 bunx vite --port 5531
HEX_SITE_URL=http://127.0.0.1:5531 bun run generate:poster

Social image

The Open Graph and Twitter image is public/og.png (1200 × 630): the app icon, the name, and one line. scripts/og/hex-icon.png is the 1024 px icon exported from the built app (iconutil -c iconset Hex.app/Contents/Resources/AppIcon.icns). Regenerate with bun run generate:og, bump the ?v= on both image tags in index.html, rebuild, deploy, and fetch the published PNG.

Messages also plays public/og.mp4 (og:video) inline on a loop in place of the image; other apps keep the PNG. It's a 4.5 s, 1200 × 630, 60 fps silent H.264 loop: the icon speaks and the words pile up under it (scripts/og-video/hex-pour.js, matter.js physics, deterministic per frame so the last frame meets the first). bun run generate:og-video [hex-line|hex-key] renders it through Chromium and ffmpeg; bump the ?v= on both og:video tags after changing it. The Worker answers Range requests for .mp4, which Safari and AVFoundation need.