Expression Portrait: a Character Who Looks Toward Your Pointer and Reacts
- Lab Skill
- v0.2.0
- Web design
Build a hero with a stylized character portrait that reacts to the pointer: it looks wherever the pointer is with a matching expression (curious above, shy below, sly to one side) and laughs when the pointer is on its face. A click shows an alternate look such as new hair, and after a pause it returns to calm. SandBase generates the character and nine expression edits (or edits your own character picture), and the Skill lines every edit up with the original. The hero is followed by a full landing page: chapter titles, an intro, a product console drawn in HTML, feature cards, specs, stats, a quote, a call to action and a footer, with a moving glow and a floating section pill.
範例 · 2

在沙箱框架中執行,無法存取此頁面。
線上執行
在 SandBase sandbox 中執行,並在 Lab 中查看結果。
在 Lab 中開啟 ↗您可獲得什麼
Bring a character to draw (or your own character picture), your brand, copy, links and language. The Skill returns a full landing page (index.html), a section to paste into an existing site, the runtime script and stylesheet, the eleven aligned pictures and the bundled open fonts.
運作方式
- 01
Plan the character and page
Expression Portrait asks for a stylized character, never a real person, plus the click look, brand, copy, links, a couple of stats, palette and language, and writes site.json. face.center sets the face centre as a share of the picture and face.radius its radius. node scripts/sample.mjs fern --site site.json --out preview builds a free preview from a bundled character, checked by SHA-256.
- 02
Generate ten matched edits
After you accept the estimate, node scripts/generate.mjs --character "<description>" --site site.json --out run runs again with --confirm-real. It calls gpt-image-2 through the logged-in sandbase CLI or SANDBASE_API_KEY for a calm portrait, nine expression edits and an alt look, then lines each edit up by comparing edge maps. It needs Node.js 18+ with ffmpeg and ffprobe on PATH.
- 03
Review the zones
Check the ten pictures in run/ for the same face size and position and the right expression per zone, then node scripts/serve.mjs run/site and move the pointer around the face. Inside one face radius shows c, otherwise the nearest of eight 45 degree zones fades in over 0.1 s; a click shows alt for 2.2 s. Hand over run/site/.
常見問題
What does Expression Portrait build?
Expression Portrait builds a hero where a stylized character looks toward the pointer with a matching expression: curious above, shy below, sly to the sides, laughing when the pointer is on its face. After 2.5 s without movement the calm picture returns. A full landing page follows with chapter titles, a product console in HTML, feature cards, stats, a quote and a footer.
Is Expression Portrait billed on SandBase?
Yes, Expression Portrait is billed for generation. It calls gpt-image-2 through SandBase for the character and its edits, billed to your SandBase account. The agent quotes the estimate first, and generate.mjs spends only with --confirm-real; --budget-usd sets a spending cap. The free commands are sample.mjs, build-web.mjs and serve.mjs. Current rates are at https://www.sandbase.ai/pricing.
Can Expression Portrait use my own character picture?
Yes. Expression Portrait accepts --image with a file or URL and makes the nine edits from it. A local file is uploaded through sandbase upload, which makes it publicly readable, so the agent asks first. With your own finished pictures, build-web.mjs builds the page for free from at least four of the slots c, n, ne, e, se, s, sw, w, nw and alt.
What files does Expression Portrait output?
Expression Portrait writes index.html, section.html, expression-portrait.js with no dependencies, expression-portrait.css with ep- prefixed classes, landing.js for the page sections, a fonts folder with Geist, Geist Mono and Instrument Serif under the SIL OFL, and media/<slot>.jpg at 1600 px wide. One page carries about 2.3 to 3 MB of pictures.
Why does an Expression Portrait zone look wrong?
Expression Portrait shows each zone as one still picture with only a fast cross-fade, so an edit that changes the hairstyle shows through. Edits can also shift strands or lighting slightly. Delete that zone's entry in run.json and rerun to regenerate just it. For your own pictures, check face.center, because the face position is set, not detected.
Does Expression Portrait work on phones?
Yes. Expression Portrait lets a tap pick the zone on touch screens instead of a moving pointer. The bundled fern and otto examples were checked in headless Chrome under a no-network policy, including a 390 px phone viewport with no sideways overflow, both languages and no console errors.
更多 Skills
所有 Web design Skills →
Baked 3D Story Site
A three-page 3D story site with baked light, scroll stops that loop and a shader cut between pages, in one offline file.

UI Finishes
Metal, jewel, halo, roll, fill, offset and ring buttons, media cards, glass and textures, each checked in rest, hover, focus and pressed for real contrast.

Headline Motion
Headlines, labels and numbers that rise, decode, type, rotate, count and draw themselves without moving the layout, measured in a real browser.

Scroll Chapters
Long pages told chapter by chapter: a pinned stage, sliding panels, a text crawl, lit paragraphs, stacking cards and drifting columns, checked in a real browser for dead scroll.

Scroll 3D Product Site
A complete product website where scroll turns, opens and takes apart a live 3D model, with every video and image rendered from that model, in one offline file.

Landing Page System
A complete single-file landing page with a conversion structure and a shared visual system, checked by a rendered-page audit before delivery.
