Skip to content

Put a globe in the hero instead of the phone - #145

Merged
xuelink merged 1 commit into
mainfrom
feat/hero-globe
Sep 6, 2026
Merged

Put a globe in the hero instead of the phone#145
xuelink merged 1 commit into
mainfrom
feat/hero-globe

Conversation

@xuelink

@xuelink xuelink commented Sep 6, 2026

Copy link
Copy Markdown
Member

A Three.js globe replaces the phone in the homepage hero: a dotted sphere, twenty cities, six arcs that grow between them, rest, fade and start again.

  • three is imported after mount from its own chunk (129 KB gzipped), homepage only; the prerendered HTML does not reference it.
  • Colours come from the theme tokens, so the light/dark toggle recolours the globe live.
  • Rendering pauses off-screen and in hidden tabs; reduced motion gets one still frame with every arc complete.
  • Mouse/pen drag rotates it; touch is left to page scrolling.
  • No WebGL: the component hides itself and the hero shows the copy alone.

ChatScreen.svelte no longer has a user and is left in place.

Verified in the dev server in both themes and at phone width; npm run check, npm run lint and npx vite build pass.

🤖 Generated with Claude Code

A dotted sphere with twenty cities and six arcs that grow from one city to
another, rest, fade and start again elsewhere. Three.js is loaded after mount
from a separate chunk (129 KB gzipped) that only the homepage requests; the
prerendered HTML has no reference to it.

Colours are read from the theme tokens on the element, so the globe follows
the light/dark toggle without a reload. Rendering stops while the hero is
off-screen or the tab is hidden, and under reduced motion it draws one
complete frame. Mouse and pen can drag the globe; touch is left to the page
so the hero does not trap scrolling. If WebGL is missing the component hides
itself and the hero collapses to the copy.

ChatScreen.svelte has no remaining user after this change; it is left in
place for now.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@xuelink
xuelink merged commit 0a20fb6 into main Sep 6, 2026
1 check passed
@xuelink
xuelink deleted the feat/hero-globe branch September 6, 2026 08:52
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