hex/site
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-21 12:25:15 -07:00
..
public site: og:video link preview loop (icon speaks, words pile up) 2026-10-21 12:14:56 -07:00
scripts site: og:video link preview loop (icon speaks, words pile up) 2026-10-21 12:14:56 -07:00
src docs: publish Hex 2.3.1 downloads 2026-10-21 12:25:15 -07:00
.gitignore Windows Setup.exe, one site, and a download section that works (#166) 2026-10-19 19:26:41 -07:00
bun.lock site: og:video link preview loop (icon speaks, words pile up) 2026-10-21 12:14:56 -07:00
index.html site: og:video link preview loop (icon speaks, words pile up) 2026-10-21 12:14:56 -07:00
package.json site: og:video link preview loop (icon speaks, words pile up) 2026-10-21 12:14:56 -07:00
README.md site: og:video link preview loop (icon speaks, words pile up) 2026-10-21 12:14:56 -07: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: add HEX marketing site 2026-07-19 14:18:50 -04:00
vite.config.ts feat: add HEX marketing site 2026-07-19 14:18:50 -04:00
worker.ts site: answer HEAD Range requests for og.mp4 with 206 headers 2026-10-21 12:23:51 -07:00
wrangler.jsonc site: serve hex.kitlangton.com; redirect hex.kitlangton.dev to it 2026-10-19 19:38:39 -07:00

Hex website

hex.kitlangton.com is the one Hex site. bun run dev starts Vite. bun run build checks TypeScript and builds it; bun run check:downloads checks that every download link serves a file; bunx wrangler deploy publishes the Worker, whose worker.ts 301s hex.kitlangton.dev, plain HTTP, and workers.dev to the same path on hex.kitlangton.com.

The download section (src/Download.tsx) names the visitor's platform on first paint and refines it with UA client hints: a DMG for Apple silicon Macs, the x64 or ARM64 Setup.exe for Windows, the copyable install command for Linux, and "Send yourself the link" on phones. Versions and URLs live in src/release.ts. Add ?platform=mac|mac-intel|windows-x64|windows-arm64|linux|mobile to see each state.

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.