Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

Expression Portrait: a Character Who Looks Toward Your Pointer and Reacts

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.

Contoh · 2

Illustrator portfolio hero with a character who looks toward the pointer
Buka di tab baru

Berjalan di frame sandbox tanpa akses ke halaman ini.

Jalankan online

Jalankan di sandbox SandBase dan lihat hasil Anda di Lab.

Buka di Lab ↗

Apa yang Anda dapatkan

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.

Cara kerjanya

  1. 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.

  2. 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.

  3. 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/.

FAQ

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.

Lebih Banyak Skills

Semua Skills Web design →